1 | var type = 'full';
|
2 |
|
3 | var active = false;
|
4 |
|
5 | var description = 'adds attributes to an outer <svg> element';
|
6 |
|
7 | var ENOCLS = `Error in plugin "addAttributesToSVGElement": absent parameters.
|
8 | It should have a list of "attributes" or one "attribute".
|
9 | Config example:
|
10 |
|
11 | plugins:
|
12 | - addAttributesToSVGElement:
|
13 | attribute: "mySvg"
|
14 |
|
15 | plugins:
|
16 | - addAttributesToSVGElement:
|
17 | attributes: ["mySvg", "size-big"]
|
18 |
|
19 | plugins:
|
20 | - addAttributesToSVGElement:
|
21 | attributes:
|
22 | - focusable: false
|
23 | - data-image: icon`;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | var fn = function(data, params) {
|
45 | if (!params || !(Array.isArray(params.attributes) || params.attribute)) {
|
46 | console.error(ENOCLS);
|
47 | return data;
|
48 | }
|
49 |
|
50 | var attributes = params.attributes || [ params.attribute ],
|
51 | svg = data.content[0];
|
52 |
|
53 | if (svg.isElem('svg')) {
|
54 | attributes.forEach(function (attribute) {
|
55 | if (typeof attribute === 'string') {
|
56 | if (!svg.hasAttr(attribute)) {
|
57 | svg.addAttr({
|
58 | name: attribute,
|
59 | prefix: '',
|
60 | local: attribute
|
61 | });
|
62 | }
|
63 | } else if (typeof attribute === 'object') {
|
64 | Object.keys(attribute).forEach(function (key) {
|
65 | if (!svg.hasAttr(key)) {
|
66 | svg.addAttr({
|
67 | name: key,
|
68 | value: attribute[key],
|
69 | prefix: '',
|
70 | local: key
|
71 | });
|
72 | }
|
73 | });
|
74 | }
|
75 | });
|
76 | }
|
77 |
|
78 | return data;
|
79 |
|
80 | };
|
81 |
|
82 | var addAttributesToSVGElement = {
|
83 | type: type,
|
84 | active: active,
|
85 | description: description,
|
86 | fn: fn
|
87 | };
|
88 |
|
89 | var type$1 = 'full';
|
90 |
|
91 | var active$1 = false;
|
92 |
|
93 | var description$1 = 'adds classnames to an outer <svg> element';
|
94 |
|
95 | var ENOCLS$1 = `Error in plugin "addClassesToSVGElement": absent parameters.
|
96 | It should have a list of classes in "classNames" or one "className".
|
97 | Config example:
|
98 |
|
99 | plugins:
|
100 | - addClassesToSVGElement:
|
101 | className: "mySvg"
|
102 |
|
103 | plugins:
|
104 | - addClassesToSVGElement:
|
105 | classNames: ["mySvg", "size-big"]
|
106 | `;
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 | var fn$1 = function(data, params) {
|
122 | if (!params || !(Array.isArray(params.classNames) && params.classNames.some(String) || params.className)) {
|
123 | console.error(ENOCLS$1);
|
124 | return data;
|
125 | }
|
126 |
|
127 | var classNames = params.classNames || [ params.className ],
|
128 | svg = data.content[0];
|
129 |
|
130 | if (svg.isElem('svg')) {
|
131 | svg.class.add.apply(svg.class, classNames);
|
132 | }
|
133 |
|
134 | return data;
|
135 |
|
136 | };
|
137 |
|
138 | var addClassesToSVGElement = {
|
139 | type: type$1,
|
140 | active: active$1,
|
141 | description: description$1,
|
142 | fn: fn$1
|
143 | };
|
144 |
|
145 | var type$2 = 'perItem';
|
146 |
|
147 | var active$2 = true;
|
148 |
|
149 | var description$2 = 'cleanups attributes from newlines, trailing and repeating spaces';
|
150 |
|
151 | var params = {
|
152 | newlines: true,
|
153 | trim: true,
|
154 | spaces: true
|
155 | };
|
156 |
|
157 | var regNewlinesNeedSpace = /(\S)\r?\n(\S)/g,
|
158 | regNewlines = /\r?\n/g,
|
159 | regSpaces = /\s{2,}/g;
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 | var fn$2 = function(item, params) {
|
171 |
|
172 | if (item.isElem()) {
|
173 |
|
174 | item.eachAttr(function(attr) {
|
175 |
|
176 | if (params.newlines) {
|
177 |
|
178 | attr.value = attr.value.replace(regNewlinesNeedSpace, function(match, p1, p2) {
|
179 | return p1 + ' ' + p2;
|
180 | });
|
181 |
|
182 |
|
183 | attr.value = attr.value.replace(regNewlines, '');
|
184 | }
|
185 |
|
186 | if (params.trim) {
|
187 | attr.value = attr.value.trim();
|
188 | }
|
189 |
|
190 | if (params.spaces) {
|
191 | attr.value = attr.value.replace(regSpaces, ' ');
|
192 | }
|
193 |
|
194 | });
|
195 |
|
196 | }
|
197 |
|
198 | };
|
199 |
|
200 | var cleanupAttrs = {
|
201 | type: type$2,
|
202 | active: active$2,
|
203 | description: description$2,
|
204 | params: params,
|
205 | fn: fn$2
|
206 | };
|
207 |
|
208 | var type$3 = 'full';
|
209 |
|
210 | var active$3 = true;
|
211 |
|
212 | var description$3 = 'remove or cleanup enable-background attribute when possible';
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 | var fn$3 = function(data) {
|
230 |
|
231 | var regEnableBackground = /^new\s0\s0\s([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)\s([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)$/,
|
232 | hasFilter = false,
|
233 | elems = ['svg', 'mask', 'pattern'];
|
234 |
|
235 | function checkEnableBackground(item) {
|
236 | if (
|
237 | item.isElem(elems) &&
|
238 | item.hasAttr('enable-background') &&
|
239 | item.hasAttr('width') &&
|
240 | item.hasAttr('height')
|
241 | ) {
|
242 |
|
243 | var match = item.attr('enable-background').value.match(regEnableBackground);
|
244 |
|
245 | if (match) {
|
246 | if (
|
247 | item.attr('width').value === match[1] &&
|
248 | item.attr('height').value === match[3]
|
249 | ) {
|
250 | if (item.isElem('svg')) {
|
251 | item.removeAttr('enable-background');
|
252 | } else {
|
253 | item.attr('enable-background').value = 'new';
|
254 | }
|
255 | }
|
256 | }
|
257 |
|
258 | }
|
259 | }
|
260 |
|
261 | function checkForFilter(item) {
|
262 | if (item.isElem('filter')) {
|
263 | hasFilter = true;
|
264 | }
|
265 | }
|
266 |
|
267 | function monkeys(items, fn) {
|
268 | items.content.forEach(function(item) {
|
269 | fn(item);
|
270 |
|
271 | if (item.content) {
|
272 | monkeys(item, fn);
|
273 | }
|
274 | });
|
275 | return items;
|
276 | }
|
277 |
|
278 | var firstStep = monkeys(data, function(item) {
|
279 | checkEnableBackground(item);
|
280 | if (!hasFilter) {
|
281 | checkForFilter(item);
|
282 | }
|
283 | });
|
284 |
|
285 | return hasFilter ? firstStep : monkeys(firstStep, function(item) {
|
286 |
|
287 | item.removeAttr('enable-background');
|
288 | });
|
289 | };
|
290 |
|
291 | var cleanupEnableBackground = {
|
292 | type: type$3,
|
293 | active: active$3,
|
294 | description: description$3,
|
295 | fn: fn$3
|
296 | };
|
297 |
|
298 |
|
299 | var elemsGroups = {
|
300 | animation: ['animate', 'animateColor', 'animateMotion', 'animateTransform', 'set'],
|
301 | descriptive: ['desc', 'metadata', 'title'],
|
302 | shape: ['circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect'],
|
303 | structural: ['defs', 'g', 'svg', 'symbol', 'use'],
|
304 | paintServer: ['solidColor', 'linearGradient', 'radialGradient', 'meshGradient', 'pattern', 'hatch'],
|
305 | nonRendering: ['linearGradient', 'radialGradient', 'pattern', 'clipPath', 'mask', 'marker', 'symbol', 'filter', 'solidColor'],
|
306 | container: ['a', 'defs', 'g', 'marker', 'mask', 'missing-glyph', 'pattern', 'svg', 'switch', 'symbol', 'foreignObject'],
|
307 | textContent: ['altGlyph', 'altGlyphDef', 'altGlyphItem', 'glyph', 'glyphRef', 'textPath', 'text', 'tref', 'tspan'],
|
308 | textContentChild: ['altGlyph', 'textPath', 'tref', 'tspan'],
|
309 | lightSource: ['feDiffuseLighting', 'feSpecularLighting', 'feDistantLight', 'fePointLight', 'feSpotLight'],
|
310 | filterPrimitive: ['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feFlood', 'feGaussianBlur', 'feImage', 'feMerge', 'feMorphology', 'feOffset', 'feSpecularLighting', 'feTile', 'feTurbulence']
|
311 | };
|
312 |
|
313 | var pathElems = ['path', 'glyph', 'missing-glyph'];
|
314 |
|
315 |
|
316 | var attrsGroups = {
|
317 | animationAddition: ['additive', 'accumulate'],
|
318 | animationAttributeTarget: ['attributeType', 'attributeName'],
|
319 | animationEvent: ['onbegin', 'onend', 'onrepeat', 'onload'],
|
320 | animationTiming: ['begin', 'dur', 'end', 'min', 'max', 'restart', 'repeatCount', 'repeatDur', 'fill'],
|
321 | animationValue: ['calcMode', 'values', 'keyTimes', 'keySplines', 'from', 'to', 'by'],
|
322 | conditionalProcessing: ['requiredFeatures', 'requiredExtensions', 'systemLanguage'],
|
323 | core: ['id', 'tabindex', 'xml:base', 'xml:lang', 'xml:space'],
|
324 | graphicalEvent: ['onfocusin', 'onfocusout', 'onactivate', 'onclick', 'onmousedown', 'onmouseup', 'onmouseover', 'onmousemove', 'onmouseout', 'onload'],
|
325 | presentation: [
|
326 | 'alignment-baseline',
|
327 | 'baseline-shift',
|
328 | 'clip',
|
329 | 'clip-path',
|
330 | 'clip-rule',
|
331 | 'color',
|
332 | 'color-interpolation',
|
333 | 'color-interpolation-filters',
|
334 | 'color-profile',
|
335 | 'color-rendering',
|
336 | 'cursor',
|
337 | 'direction',
|
338 | 'display',
|
339 | 'dominant-baseline',
|
340 | 'enable-background',
|
341 | 'fill',
|
342 | 'fill-opacity',
|
343 | 'fill-rule',
|
344 | 'filter',
|
345 | 'flood-color',
|
346 | 'flood-opacity',
|
347 | 'font-family',
|
348 | 'font-size',
|
349 | 'font-size-adjust',
|
350 | 'font-stretch',
|
351 | 'font-style',
|
352 | 'font-variant',
|
353 | 'font-weight',
|
354 | 'glyph-orientation-horizontal',
|
355 | 'glyph-orientation-vertical',
|
356 | 'image-rendering',
|
357 | 'letter-spacing',
|
358 | 'lighting-color',
|
359 | 'marker-end',
|
360 | 'marker-mid',
|
361 | 'marker-start',
|
362 | 'mask',
|
363 | 'opacity',
|
364 | 'overflow',
|
365 | 'paint-order',
|
366 | 'pointer-events',
|
367 | 'shape-rendering',
|
368 | 'stop-color',
|
369 | 'stop-opacity',
|
370 | 'stroke',
|
371 | 'stroke-dasharray',
|
372 | 'stroke-dashoffset',
|
373 | 'stroke-linecap',
|
374 | 'stroke-linejoin',
|
375 | 'stroke-miterlimit',
|
376 | 'stroke-opacity',
|
377 | 'stroke-width',
|
378 | 'text-anchor',
|
379 | 'text-decoration',
|
380 | 'text-overflow',
|
381 | 'text-rendering',
|
382 | 'transform',
|
383 | 'unicode-bidi',
|
384 | 'vector-effect',
|
385 | 'visibility',
|
386 | 'word-spacing',
|
387 | 'writing-mode'
|
388 | ],
|
389 | xlink: ['xlink:href', 'xlink:show', 'xlink:actuate', 'xlink:type', 'xlink:role', 'xlink:arcrole', 'xlink:title'],
|
390 | documentEvent: ['onunload', 'onabort', 'onerror', 'onresize', 'onscroll', 'onzoom'],
|
391 | filterPrimitive: ['x', 'y', 'width', 'height', 'result'],
|
392 | transferFunction: ['type', 'tableValues', 'slope', 'intercept', 'amplitude', 'exponent', 'offset']
|
393 | };
|
394 |
|
395 | var attrsGroupsDefaults = {
|
396 | core: {'xml:space': 'preserve'},
|
397 | filterPrimitive: {x: '0', y: '0', width: '100%', height: '100%'},
|
398 | presentation: {
|
399 | clip: 'auto',
|
400 | 'clip-path': 'none',
|
401 | 'clip-rule': 'nonzero',
|
402 | mask: 'none',
|
403 | opacity: '1',
|
404 | 'stop-color': '#000',
|
405 | 'stop-opacity': '1',
|
406 | 'fill-opacity': '1',
|
407 | 'fill-rule': 'nonzero',
|
408 | fill: '#000',
|
409 | stroke: 'none',
|
410 | 'stroke-width': '1',
|
411 | 'stroke-linecap': 'butt',
|
412 | 'stroke-linejoin': 'miter',
|
413 | 'stroke-miterlimit': '4',
|
414 | 'stroke-dasharray': 'none',
|
415 | 'stroke-dashoffset': '0',
|
416 | 'stroke-opacity': '1',
|
417 | 'paint-order': 'normal',
|
418 | 'vector-effect': 'none',
|
419 | display: 'inline',
|
420 | visibility: 'visible',
|
421 | 'marker-start': 'none',
|
422 | 'marker-mid': 'none',
|
423 | 'marker-end': 'none',
|
424 | 'color-interpolation': 'sRGB',
|
425 | 'color-interpolation-filters': 'linearRGB',
|
426 | 'color-rendering': 'auto',
|
427 | 'shape-rendering': 'auto',
|
428 | 'text-rendering': 'auto',
|
429 | 'image-rendering': 'auto',
|
430 | 'font-style': 'normal',
|
431 | 'font-variant': 'normal',
|
432 | 'font-weight': 'normal',
|
433 | 'font-stretch': 'normal',
|
434 | 'font-size': 'medium',
|
435 | 'font-size-adjust': 'none',
|
436 | kerning: 'auto',
|
437 | 'letter-spacing': 'normal',
|
438 | 'word-spacing': 'normal',
|
439 | 'text-decoration': 'none',
|
440 | 'text-anchor': 'start',
|
441 | 'text-overflow': 'clip',
|
442 | 'writing-mode': 'lr-tb',
|
443 | 'glyph-orientation-vertical': 'auto',
|
444 | 'glyph-orientation-horizontal': '0deg',
|
445 | direction: 'ltr',
|
446 | 'unicode-bidi': 'normal',
|
447 | 'dominant-baseline': 'auto',
|
448 | 'alignment-baseline': 'baseline',
|
449 | 'baseline-shift': 'baseline'
|
450 | },
|
451 | transferFunction: {slope: '1', intercept: '0', amplitude: '1', exponent: '1', offset: '0'}
|
452 | };
|
453 |
|
454 |
|
455 | var elems = {
|
456 | a: {
|
457 | attrsGroups: [
|
458 | 'conditionalProcessing',
|
459 | 'core',
|
460 | 'graphicalEvent',
|
461 | 'presentation',
|
462 | 'xlink'
|
463 | ],
|
464 | attrs: [
|
465 | 'class',
|
466 | 'style',
|
467 | 'externalResourcesRequired',
|
468 | 'transform',
|
469 | 'target'
|
470 | ],
|
471 | defaults: {
|
472 | target: '_self'
|
473 | },
|
474 | contentGroups: [
|
475 | 'animation',
|
476 | 'descriptive',
|
477 | 'shape',
|
478 | 'structural',
|
479 | 'paintServer'
|
480 | ],
|
481 | content: [
|
482 | 'a',
|
483 | 'altGlyphDef',
|
484 | 'clipPath',
|
485 | 'color-profile',
|
486 | 'cursor',
|
487 | 'filter',
|
488 | 'font',
|
489 | 'font-face',
|
490 | 'foreignObject',
|
491 | 'image',
|
492 | 'marker',
|
493 | 'mask',
|
494 | 'pattern',
|
495 | 'script',
|
496 | 'style',
|
497 | 'switch',
|
498 | 'text',
|
499 | 'view'
|
500 | ]
|
501 | },
|
502 | altGlyph: {
|
503 | attrsGroups: [
|
504 | 'conditionalProcessing',
|
505 | 'core',
|
506 | 'graphicalEvent',
|
507 | 'presentation',
|
508 | 'xlink'
|
509 | ],
|
510 | attrs: [
|
511 | 'class',
|
512 | 'style',
|
513 | 'externalResourcesRequired',
|
514 | 'x',
|
515 | 'y',
|
516 | 'dx',
|
517 | 'dy',
|
518 | 'glyphRef',
|
519 | 'format',
|
520 | 'rotate'
|
521 | ]
|
522 | },
|
523 | altGlyphDef: {
|
524 | attrsGroups: [
|
525 | 'core'
|
526 | ],
|
527 | content: [
|
528 | 'glyphRef'
|
529 | ]
|
530 | },
|
531 | altGlyphItem: {
|
532 | attrsGroups: [
|
533 | 'core'
|
534 | ],
|
535 | content: [
|
536 | 'glyphRef',
|
537 | 'altGlyphItem'
|
538 | ]
|
539 | },
|
540 | animate: {
|
541 | attrsGroups: [
|
542 | 'conditionalProcessing',
|
543 | 'core',
|
544 | 'animationAddition',
|
545 | 'animationAttributeTarget',
|
546 | 'animationEvent',
|
547 | 'animationTiming',
|
548 | 'animationValue',
|
549 | 'presentation',
|
550 | 'xlink'
|
551 | ],
|
552 | attrs: [
|
553 | 'externalResourcesRequired'
|
554 | ],
|
555 | contentGroups: [
|
556 | 'descriptive'
|
557 | ]
|
558 | },
|
559 | animateColor: {
|
560 | attrsGroups: [
|
561 | 'conditionalProcessing',
|
562 | 'core',
|
563 | 'animationEvent',
|
564 | 'xlink',
|
565 | 'animationAttributeTarget',
|
566 | 'animationTiming',
|
567 | 'animationValue',
|
568 | 'animationAddition',
|
569 | 'presentation'
|
570 | ],
|
571 | attrs: [
|
572 | 'externalResourcesRequired'
|
573 | ],
|
574 | contentGroups: [
|
575 | 'descriptive'
|
576 | ]
|
577 | },
|
578 | animateMotion: {
|
579 | attrsGroups: [
|
580 | 'conditionalProcessing',
|
581 | 'core',
|
582 | 'animationEvent',
|
583 | 'xlink',
|
584 | 'animationTiming',
|
585 | 'animationValue',
|
586 | 'animationAddition'
|
587 | ],
|
588 | attrs: [
|
589 | 'externalResourcesRequired',
|
590 | 'path',
|
591 | 'keyPoints',
|
592 | 'rotate',
|
593 | 'origin'
|
594 | ],
|
595 | defaults: {
|
596 | 'rotate': '0'
|
597 | },
|
598 | contentGroups: [
|
599 | 'descriptive'
|
600 | ],
|
601 | content: [
|
602 | 'mpath'
|
603 | ]
|
604 | },
|
605 | animateTransform: {
|
606 | attrsGroups: [
|
607 | 'conditionalProcessing',
|
608 | 'core',
|
609 | 'animationEvent',
|
610 | 'xlink',
|
611 | 'animationAttributeTarget',
|
612 | 'animationTiming',
|
613 | 'animationValue',
|
614 | 'animationAddition'
|
615 | ],
|
616 | attrs: [
|
617 | 'externalResourcesRequired',
|
618 | 'type'
|
619 | ],
|
620 | contentGroups: [
|
621 | 'descriptive'
|
622 | ]
|
623 | },
|
624 | circle: {
|
625 | attrsGroups: [
|
626 | 'conditionalProcessing',
|
627 | 'core',
|
628 | 'graphicalEvent',
|
629 | 'presentation'
|
630 | ],
|
631 | attrs: [
|
632 | 'class',
|
633 | 'style',
|
634 | 'externalResourcesRequired',
|
635 | 'transform',
|
636 | 'cx',
|
637 | 'cy',
|
638 | 'r'
|
639 | ],
|
640 | defaults: {
|
641 | cx: '0',
|
642 | cy: '0'
|
643 | },
|
644 | contentGroups: [
|
645 | 'animation',
|
646 | 'descriptive'
|
647 | ]
|
648 | },
|
649 | clipPath: {
|
650 | attrsGroups: [
|
651 | 'conditionalProcessing',
|
652 | 'core',
|
653 | 'presentation'
|
654 | ],
|
655 | attrs: [
|
656 | 'class',
|
657 | 'style',
|
658 | 'externalResourcesRequired',
|
659 | 'transform',
|
660 | 'clipPathUnits'
|
661 | ],
|
662 | defaults: {
|
663 | clipPathUnits: 'userSpaceOnUse'
|
664 | },
|
665 | contentGroups: [
|
666 | 'animation',
|
667 | 'descriptive',
|
668 | 'shape'
|
669 | ],
|
670 | content: [
|
671 | 'text',
|
672 | 'use'
|
673 | ]
|
674 | },
|
675 | 'color-profile': {
|
676 | attrsGroups: [
|
677 | 'core',
|
678 | 'xlink'
|
679 | ],
|
680 | attrs: [
|
681 | 'local',
|
682 | 'name',
|
683 | 'rendering-intent'
|
684 | ],
|
685 | defaults: {
|
686 | name: 'sRGB',
|
687 | 'rendering-intent': 'auto'
|
688 | },
|
689 | contentGroups: [
|
690 | 'descriptive'
|
691 | ]
|
692 | },
|
693 | cursor: {
|
694 | attrsGroups: [
|
695 | 'core',
|
696 | 'conditionalProcessing',
|
697 | 'xlink'
|
698 | ],
|
699 | attrs: [
|
700 | 'externalResourcesRequired',
|
701 | 'x',
|
702 | 'y'
|
703 | ],
|
704 | defaults: {
|
705 | x: '0',
|
706 | y: '0'
|
707 | },
|
708 | contentGroups: [
|
709 | 'descriptive'
|
710 | ]
|
711 | },
|
712 | defs: {
|
713 | attrsGroups: [
|
714 | 'conditionalProcessing',
|
715 | 'core',
|
716 | 'graphicalEvent',
|
717 | 'presentation'
|
718 | ],
|
719 | attrs: [
|
720 | 'class',
|
721 | 'style',
|
722 | 'externalResourcesRequired',
|
723 | 'transform'
|
724 | ],
|
725 | contentGroups: [
|
726 | 'animation',
|
727 | 'descriptive',
|
728 | 'shape',
|
729 | 'structural',
|
730 | 'paintServer'
|
731 | ],
|
732 | content: [
|
733 | 'a',
|
734 | 'altGlyphDef',
|
735 | 'clipPath',
|
736 | 'color-profile',
|
737 | 'cursor',
|
738 | 'filter',
|
739 | 'font',
|
740 | 'font-face',
|
741 | 'foreignObject',
|
742 | 'image',
|
743 | 'marker',
|
744 | 'mask',
|
745 | 'pattern',
|
746 | 'script',
|
747 | 'style',
|
748 | 'switch',
|
749 | 'text',
|
750 | 'view'
|
751 | ]
|
752 | },
|
753 | desc: {
|
754 | attrsGroups: [
|
755 | 'core'
|
756 | ],
|
757 | attrs: [
|
758 | 'class',
|
759 | 'style'
|
760 | ]
|
761 | },
|
762 | ellipse: {
|
763 | attrsGroups: [
|
764 | 'conditionalProcessing',
|
765 | 'core',
|
766 | 'graphicalEvent',
|
767 | 'presentation'
|
768 | ],
|
769 | attrs: [
|
770 | 'class',
|
771 | 'style',
|
772 | 'externalResourcesRequired',
|
773 | 'transform',
|
774 | 'cx',
|
775 | 'cy',
|
776 | 'rx',
|
777 | 'ry'
|
778 | ],
|
779 | defaults: {
|
780 | cx: '0',
|
781 | cy: '0'
|
782 | },
|
783 | contentGroups: [
|
784 | 'animation',
|
785 | 'descriptive'
|
786 | ]
|
787 | },
|
788 | feBlend: {
|
789 | attrsGroups: [
|
790 | 'core',
|
791 | 'presentation',
|
792 | 'filterPrimitive'
|
793 | ],
|
794 | attrs: [
|
795 | 'class',
|
796 | 'style',
|
797 |
|
798 |
|
799 | 'in',
|
800 | 'in2',
|
801 | 'mode'
|
802 | ],
|
803 | defaults: {
|
804 | mode: 'normal'
|
805 | },
|
806 | content: [
|
807 | 'animate',
|
808 | 'set'
|
809 | ]
|
810 | },
|
811 | feColorMatrix: {
|
812 | attrsGroups: [
|
813 | 'core',
|
814 | 'presentation',
|
815 | 'filterPrimitive'
|
816 | ],
|
817 | attrs: [
|
818 | 'class',
|
819 | 'style',
|
820 | 'in',
|
821 | 'type',
|
822 | 'values'
|
823 | ],
|
824 | defaults: {
|
825 | type: 'matrix'
|
826 | },
|
827 | content: [
|
828 | 'animate',
|
829 | 'set'
|
830 | ]
|
831 | },
|
832 | feComponentTransfer: {
|
833 | attrsGroups: [
|
834 | 'core',
|
835 | 'presentation',
|
836 | 'filterPrimitive'
|
837 | ],
|
838 | attrs: [
|
839 | 'class',
|
840 | 'style',
|
841 | 'in'
|
842 | ],
|
843 | content: [
|
844 | 'feFuncA',
|
845 | 'feFuncB',
|
846 | 'feFuncG',
|
847 | 'feFuncR'
|
848 | ]
|
849 | },
|
850 | feComposite: {
|
851 | attrsGroups: [
|
852 | 'core',
|
853 | 'presentation',
|
854 | 'filterPrimitive'
|
855 | ],
|
856 | attrs: [
|
857 | 'class',
|
858 | 'style',
|
859 | 'in',
|
860 | 'in2',
|
861 | 'operator',
|
862 | 'k1',
|
863 | 'k2',
|
864 | 'k3',
|
865 | 'k4'
|
866 | ],
|
867 | defaults: {
|
868 | operator: 'over',
|
869 | k1: '0',
|
870 | k2: '0',
|
871 | k3: '0',
|
872 | k4: '0'
|
873 | },
|
874 | content: [
|
875 | 'animate',
|
876 | 'set'
|
877 | ]
|
878 | },
|
879 | feConvolveMatrix: {
|
880 | attrsGroups: [
|
881 | 'core',
|
882 | 'presentation',
|
883 | 'filterPrimitive'
|
884 | ],
|
885 | attrs: [
|
886 | 'class',
|
887 | 'style',
|
888 | 'in',
|
889 | 'order',
|
890 | 'kernelMatrix',
|
891 |
|
892 |
|
893 | 'divisor',
|
894 | 'bias',
|
895 |
|
896 |
|
897 | 'targetX',
|
898 | 'targetY',
|
899 | 'edgeMode',
|
900 |
|
901 |
|
902 | 'kernelUnitLength',
|
903 | 'preserveAlpha'
|
904 | ],
|
905 | defaults: {
|
906 | order: '3',
|
907 | bias: '0',
|
908 | edgeMode: 'duplicate',
|
909 | preserveAlpha: 'false'
|
910 | },
|
911 | content: [
|
912 | 'animate',
|
913 | 'set'
|
914 | ]
|
915 | },
|
916 | feDiffuseLighting: {
|
917 | attrsGroups: [
|
918 | 'core',
|
919 | 'presentation',
|
920 | 'filterPrimitive'
|
921 | ],
|
922 | attrs: [
|
923 | 'class',
|
924 | 'style',
|
925 | 'in',
|
926 | 'surfaceScale',
|
927 | 'diffuseConstant',
|
928 | 'kernelUnitLength'
|
929 | ],
|
930 | defaults: {
|
931 | surfaceScale: '1',
|
932 | diffuseConstant: '1'
|
933 | },
|
934 | contentGroups: [
|
935 | 'descriptive'
|
936 | ],
|
937 | content: [
|
938 |
|
939 | 'feDistantLight',
|
940 | 'fePointLight',
|
941 | 'feSpotLight'
|
942 | ]
|
943 | },
|
944 | feDisplacementMap: {
|
945 | attrsGroups: [
|
946 | 'core',
|
947 | 'presentation',
|
948 | 'filterPrimitive'
|
949 | ],
|
950 | attrs: [
|
951 | 'class',
|
952 | 'style',
|
953 | 'in',
|
954 | 'in2',
|
955 | 'scale',
|
956 | 'xChannelSelector',
|
957 | 'yChannelSelector'
|
958 | ],
|
959 | defaults: {
|
960 | scale: '0',
|
961 | xChannelSelector: 'A',
|
962 | yChannelSelector: 'A'
|
963 | },
|
964 | content: [
|
965 | 'animate',
|
966 | 'set'
|
967 | ]
|
968 | },
|
969 | feDistantLight: {
|
970 | attrsGroups: [
|
971 | 'core'
|
972 | ],
|
973 | attrs: [
|
974 | 'azimuth',
|
975 | 'elevation'
|
976 | ],
|
977 | defaults: {
|
978 | azimuth: '0',
|
979 | elevation: '0'
|
980 | },
|
981 | content: [
|
982 | 'animate',
|
983 | 'set'
|
984 | ]
|
985 | },
|
986 | feFlood: {
|
987 | attrsGroups: [
|
988 | 'core',
|
989 | 'presentation',
|
990 | 'filterPrimitive'
|
991 | ],
|
992 | attrs: [
|
993 | 'class',
|
994 | 'style'
|
995 | ],
|
996 | content: [
|
997 | 'animate',
|
998 | 'animateColor',
|
999 | 'set'
|
1000 | ]
|
1001 | },
|
1002 | feFuncA: {
|
1003 | attrsGroups: [
|
1004 | 'core',
|
1005 | 'transferFunction'
|
1006 | ],
|
1007 | content: [
|
1008 | 'set',
|
1009 | 'animate'
|
1010 | ]
|
1011 | },
|
1012 | feFuncB: {
|
1013 | attrsGroups: [
|
1014 | 'core',
|
1015 | 'transferFunction'
|
1016 | ],
|
1017 | content: [
|
1018 | 'set',
|
1019 | 'animate'
|
1020 | ]
|
1021 | },
|
1022 | feFuncG: {
|
1023 | attrsGroups: [
|
1024 | 'core',
|
1025 | 'transferFunction'
|
1026 | ],
|
1027 | content: [
|
1028 | 'set',
|
1029 | 'animate'
|
1030 | ]
|
1031 | },
|
1032 | feFuncR: {
|
1033 | attrsGroups: [
|
1034 | 'core',
|
1035 | 'transferFunction'
|
1036 | ],
|
1037 | content: [
|
1038 | 'set',
|
1039 | 'animate'
|
1040 | ]
|
1041 | },
|
1042 | feGaussianBlur: {
|
1043 | attrsGroups: [
|
1044 | 'core',
|
1045 | 'presentation',
|
1046 | 'filterPrimitive'
|
1047 | ],
|
1048 | attrs: [
|
1049 | 'class',
|
1050 | 'style',
|
1051 | 'in',
|
1052 | 'stdDeviation'
|
1053 | ],
|
1054 | defaults: {
|
1055 | stdDeviation: '0'
|
1056 | },
|
1057 | content: [
|
1058 | 'set',
|
1059 | 'animate'
|
1060 | ]
|
1061 | },
|
1062 | feImage: {
|
1063 | attrsGroups: [
|
1064 | 'core',
|
1065 | 'presentation',
|
1066 | 'filterPrimitive',
|
1067 | 'xlink'
|
1068 | ],
|
1069 | attrs: [
|
1070 | 'class',
|
1071 | 'style',
|
1072 | 'externalResourcesRequired',
|
1073 | 'preserveAspectRatio',
|
1074 | 'href',
|
1075 | 'xlink:href'
|
1076 | ],
|
1077 | defaults: {
|
1078 | preserveAspectRatio: 'xMidYMid meet'
|
1079 | },
|
1080 | content: [
|
1081 | 'animate',
|
1082 | 'animateTransform',
|
1083 | 'set'
|
1084 | ]
|
1085 | },
|
1086 | feMerge: {
|
1087 | attrsGroups: [
|
1088 | 'core',
|
1089 | 'presentation',
|
1090 | 'filterPrimitive'
|
1091 | ],
|
1092 | attrs: [
|
1093 | 'class',
|
1094 | 'style'
|
1095 | ],
|
1096 | content: [
|
1097 | 'feMergeNode'
|
1098 | ]
|
1099 | },
|
1100 | feMergeNode: {
|
1101 | attrsGroups: [
|
1102 | 'core'
|
1103 | ],
|
1104 | attrs: [
|
1105 | 'in'
|
1106 | ],
|
1107 | content: [
|
1108 | 'animate',
|
1109 | 'set'
|
1110 | ]
|
1111 | },
|
1112 | feMorphology: {
|
1113 | attrsGroups: [
|
1114 | 'core',
|
1115 | 'presentation',
|
1116 | 'filterPrimitive'
|
1117 | ],
|
1118 | attrs: [
|
1119 | 'class',
|
1120 | 'style',
|
1121 | 'in',
|
1122 | 'operator',
|
1123 | 'radius'
|
1124 | ],
|
1125 | defaults: {
|
1126 | operator: 'erode',
|
1127 | radius: '0'
|
1128 | },
|
1129 | content: [
|
1130 | 'animate',
|
1131 | 'set'
|
1132 | ]
|
1133 | },
|
1134 | feOffset: {
|
1135 | attrsGroups: [
|
1136 | 'core',
|
1137 | 'presentation',
|
1138 | 'filterPrimitive'
|
1139 | ],
|
1140 | attrs: [
|
1141 | 'class',
|
1142 | 'style',
|
1143 | 'in',
|
1144 | 'dx',
|
1145 | 'dy'
|
1146 | ],
|
1147 | defaults: {
|
1148 | dx: '0',
|
1149 | dy: '0'
|
1150 | },
|
1151 | content: [
|
1152 | 'animate',
|
1153 | 'set'
|
1154 | ]
|
1155 | },
|
1156 | fePointLight: {
|
1157 | attrsGroups: [
|
1158 | 'core'
|
1159 | ],
|
1160 | attrs: [
|
1161 | 'x',
|
1162 | 'y',
|
1163 | 'z'
|
1164 | ],
|
1165 | defaults: {
|
1166 | x: '0',
|
1167 | y: '0',
|
1168 | z: '0'
|
1169 | },
|
1170 | content: [
|
1171 | 'animate',
|
1172 | 'set'
|
1173 | ]
|
1174 | },
|
1175 | feSpecularLighting: {
|
1176 | attrsGroups: [
|
1177 | 'core',
|
1178 | 'presentation',
|
1179 | 'filterPrimitive'
|
1180 | ],
|
1181 | attrs: [
|
1182 | 'class',
|
1183 | 'style',
|
1184 | 'in',
|
1185 | 'surfaceScale',
|
1186 | 'specularConstant',
|
1187 | 'specularExponent',
|
1188 | 'kernelUnitLength'
|
1189 | ],
|
1190 | defaults: {
|
1191 | surfaceScale: '1',
|
1192 | specularConstant: '1',
|
1193 | specularExponent: '1'
|
1194 | },
|
1195 | contentGroups: [
|
1196 | 'descriptive',
|
1197 |
|
1198 | 'lightSource'
|
1199 | ]
|
1200 | },
|
1201 | feSpotLight: {
|
1202 | attrsGroups: [
|
1203 | 'core'
|
1204 | ],
|
1205 | attrs: [
|
1206 | 'x',
|
1207 | 'y',
|
1208 | 'z',
|
1209 | 'pointsAtX',
|
1210 | 'pointsAtY',
|
1211 | 'pointsAtZ',
|
1212 | 'specularExponent',
|
1213 | 'limitingConeAngle'
|
1214 | ],
|
1215 | defaults: {
|
1216 | x: '0',
|
1217 | y: '0',
|
1218 | z: '0',
|
1219 | pointsAtX: '0',
|
1220 | pointsAtY: '0',
|
1221 | pointsAtZ: '0',
|
1222 | specularExponent: '1'
|
1223 | },
|
1224 | content: [
|
1225 | 'animate',
|
1226 | 'set'
|
1227 | ]
|
1228 | },
|
1229 | feTile: {
|
1230 | attrsGroups: [
|
1231 | 'core',
|
1232 | 'presentation',
|
1233 | 'filterPrimitive'
|
1234 | ],
|
1235 | attrs: [
|
1236 | 'class',
|
1237 | 'style',
|
1238 | 'in'
|
1239 | ],
|
1240 | content: [
|
1241 | 'animate',
|
1242 | 'set'
|
1243 | ]
|
1244 | },
|
1245 | feTurbulence: {
|
1246 | attrsGroups: [
|
1247 | 'core',
|
1248 | 'presentation',
|
1249 | 'filterPrimitive'
|
1250 | ],
|
1251 | attrs: [
|
1252 | 'class',
|
1253 | 'style',
|
1254 | 'baseFrequency',
|
1255 | 'numOctaves',
|
1256 | 'seed',
|
1257 | 'stitchTiles',
|
1258 | 'type'
|
1259 | ],
|
1260 | defaults: {
|
1261 | baseFrequency: '0',
|
1262 | numOctaves: '1',
|
1263 | seed: '0',
|
1264 | stitchTiles: 'noStitch',
|
1265 | type: 'turbulence'
|
1266 | },
|
1267 | content: [
|
1268 | 'animate',
|
1269 | 'set'
|
1270 | ]
|
1271 | },
|
1272 | filter: {
|
1273 | attrsGroups: [
|
1274 | 'core',
|
1275 | 'presentation',
|
1276 | 'xlink'
|
1277 | ],
|
1278 | attrs: [
|
1279 | 'class',
|
1280 | 'style',
|
1281 | 'externalResourcesRequired',
|
1282 | 'x',
|
1283 | 'y',
|
1284 | 'width',
|
1285 | 'height',
|
1286 | 'filterRes',
|
1287 | 'filterUnits',
|
1288 | 'primitiveUnits',
|
1289 | 'href',
|
1290 | 'xlink:href'
|
1291 | ],
|
1292 | defaults: {
|
1293 | primitiveUnits: 'userSpaceOnUse',
|
1294 | x: '-10%',
|
1295 | y: '-10%',
|
1296 | width: '120%',
|
1297 | height: '120%'
|
1298 | },
|
1299 | contentGroups: [
|
1300 | 'descriptive',
|
1301 | 'filterPrimitive'
|
1302 | ],
|
1303 | content: [
|
1304 | 'animate',
|
1305 | 'set'
|
1306 | ]
|
1307 | },
|
1308 | font: {
|
1309 | attrsGroups: [
|
1310 | 'core',
|
1311 | 'presentation'
|
1312 | ],
|
1313 | attrs: [
|
1314 | 'class',
|
1315 | 'style',
|
1316 | 'externalResourcesRequired',
|
1317 | 'horiz-origin-x',
|
1318 | 'horiz-origin-y',
|
1319 | 'horiz-adv-x',
|
1320 | 'vert-origin-x',
|
1321 | 'vert-origin-y',
|
1322 | 'vert-adv-y'
|
1323 | ],
|
1324 | defaults: {
|
1325 | 'horiz-origin-x': '0',
|
1326 | 'horiz-origin-y': '0'
|
1327 | },
|
1328 | contentGroups: [
|
1329 | 'descriptive'
|
1330 | ],
|
1331 | content: [
|
1332 | 'font-face',
|
1333 | 'glyph',
|
1334 | 'hkern',
|
1335 | 'missing-glyph',
|
1336 | 'vkern'
|
1337 | ]
|
1338 | },
|
1339 | 'font-face': {
|
1340 | attrsGroups: [
|
1341 | 'core'
|
1342 | ],
|
1343 | attrs: [
|
1344 | 'font-family',
|
1345 | 'font-style',
|
1346 | 'font-variant',
|
1347 | 'font-weight',
|
1348 | 'font-stretch',
|
1349 | 'font-size',
|
1350 | 'unicode-range',
|
1351 | 'units-per-em',
|
1352 | 'panose-1',
|
1353 | 'stemv',
|
1354 | 'stemh',
|
1355 | 'slope',
|
1356 | 'cap-height',
|
1357 | 'x-height',
|
1358 | 'accent-height',
|
1359 | 'ascent',
|
1360 | 'descent',
|
1361 | 'widths',
|
1362 | 'bbox',
|
1363 | 'ideographic',
|
1364 | 'alphabetic',
|
1365 | 'mathematical',
|
1366 | 'hanging',
|
1367 | 'v-ideographic',
|
1368 | 'v-alphabetic',
|
1369 | 'v-mathematical',
|
1370 | 'v-hanging',
|
1371 | 'underline-position',
|
1372 | 'underline-thickness',
|
1373 | 'strikethrough-position',
|
1374 | 'strikethrough-thickness',
|
1375 | 'overline-position',
|
1376 | 'overline-thickness'
|
1377 | ],
|
1378 | defaults: {
|
1379 | 'font-style': 'all',
|
1380 | 'font-variant': 'normal',
|
1381 | 'font-weight': 'all',
|
1382 | 'font-stretch': 'normal',
|
1383 | 'unicode-range': 'U+0-10FFFF',
|
1384 | 'units-per-em': '1000',
|
1385 | 'panose-1': '0 0 0 0 0 0 0 0 0 0',
|
1386 | 'slope': '0'
|
1387 | },
|
1388 | contentGroups: [
|
1389 | 'descriptive'
|
1390 | ],
|
1391 | content: [
|
1392 |
|
1393 | 'font-face-src'
|
1394 | ]
|
1395 | },
|
1396 |
|
1397 | 'font-face-format': {
|
1398 | attrsGroups: [
|
1399 | 'core'
|
1400 | ],
|
1401 | attrs: [
|
1402 | 'string'
|
1403 | ]
|
1404 | },
|
1405 | 'font-face-name': {
|
1406 | attrsGroups: [
|
1407 | 'core'
|
1408 | ],
|
1409 | attrs: [
|
1410 | 'name'
|
1411 | ]
|
1412 | },
|
1413 | 'font-face-src': {
|
1414 | attrsGroups: [
|
1415 | 'core'
|
1416 | ],
|
1417 | content: [
|
1418 | 'font-face-name',
|
1419 | 'font-face-uri'
|
1420 | ]
|
1421 | },
|
1422 | 'font-face-uri': {
|
1423 | attrsGroups: [
|
1424 | 'core',
|
1425 | 'xlink'
|
1426 | ],
|
1427 | attrs: [
|
1428 | 'href',
|
1429 | 'xlink:href'
|
1430 | ],
|
1431 | content: [
|
1432 | 'font-face-format'
|
1433 | ]
|
1434 | },
|
1435 | foreignObject: {
|
1436 | attrsGroups: [
|
1437 | 'core',
|
1438 | 'conditionalProcessing',
|
1439 | 'graphicalEvent',
|
1440 | 'presentation'
|
1441 | ],
|
1442 | attrs: [
|
1443 | 'class',
|
1444 | 'style',
|
1445 | 'externalResourcesRequired',
|
1446 | 'transform',
|
1447 | 'x',
|
1448 | 'y',
|
1449 | 'width',
|
1450 | 'height'
|
1451 | ],
|
1452 | defaults: {
|
1453 | x: 0,
|
1454 | y: 0
|
1455 | }
|
1456 | },
|
1457 | g: {
|
1458 | attrsGroups: [
|
1459 | 'conditionalProcessing',
|
1460 | 'core',
|
1461 | 'graphicalEvent',
|
1462 | 'presentation'
|
1463 | ],
|
1464 | attrs: [
|
1465 | 'class',
|
1466 | 'style',
|
1467 | 'externalResourcesRequired',
|
1468 | 'transform'
|
1469 | ],
|
1470 | contentGroups: [
|
1471 | 'animation',
|
1472 | 'descriptive',
|
1473 | 'shape',
|
1474 | 'structural',
|
1475 | 'paintServer'
|
1476 | ],
|
1477 | content: [
|
1478 | 'a',
|
1479 | 'altGlyphDef',
|
1480 | 'clipPath',
|
1481 | 'color-profile',
|
1482 | 'cursor',
|
1483 | 'filter',
|
1484 | 'font',
|
1485 | 'font-face',
|
1486 | 'foreignObject',
|
1487 | 'image',
|
1488 | 'marker',
|
1489 | 'mask',
|
1490 | 'pattern',
|
1491 | 'script',
|
1492 | 'style',
|
1493 | 'switch',
|
1494 | 'text',
|
1495 | 'view'
|
1496 | ]
|
1497 | },
|
1498 | glyph: {
|
1499 | attrsGroups: [
|
1500 | 'core',
|
1501 | 'presentation'
|
1502 | ],
|
1503 | attrs: [
|
1504 | 'class',
|
1505 | 'style',
|
1506 | 'd',
|
1507 | 'horiz-adv-x',
|
1508 | 'vert-origin-x',
|
1509 | 'vert-origin-y',
|
1510 | 'vert-adv-y',
|
1511 | 'unicode',
|
1512 | 'glyph-name',
|
1513 | 'orientation',
|
1514 | 'arabic-form',
|
1515 | 'lang'
|
1516 | ],
|
1517 | defaults: {
|
1518 | 'arabic-form': 'initial'
|
1519 | },
|
1520 | contentGroups: [
|
1521 | 'animation',
|
1522 | 'descriptive',
|
1523 | 'shape',
|
1524 | 'structural',
|
1525 | 'paintServer'
|
1526 | ],
|
1527 | content: [
|
1528 | 'a',
|
1529 | 'altGlyphDef',
|
1530 | 'clipPath',
|
1531 | 'color-profile',
|
1532 | 'cursor',
|
1533 | 'filter',
|
1534 | 'font',
|
1535 | 'font-face',
|
1536 | 'foreignObject',
|
1537 | 'image',
|
1538 | 'marker',
|
1539 | 'mask',
|
1540 | 'pattern',
|
1541 | 'script',
|
1542 | 'style',
|
1543 | 'switch',
|
1544 | 'text',
|
1545 | 'view'
|
1546 | ],
|
1547 | },
|
1548 | glyphRef: {
|
1549 | attrsGroups: [
|
1550 | 'core',
|
1551 | 'presentation'
|
1552 | ],
|
1553 | attrs: [
|
1554 | 'class',
|
1555 | 'style',
|
1556 | 'd',
|
1557 | 'horiz-adv-x',
|
1558 | 'vert-origin-x',
|
1559 | 'vert-origin-y',
|
1560 | 'vert-adv-y'
|
1561 | ],
|
1562 | contentGroups: [
|
1563 | 'animation',
|
1564 | 'descriptive',
|
1565 | 'shape',
|
1566 | 'structural',
|
1567 | 'paintServer'
|
1568 | ],
|
1569 | content: [
|
1570 | 'a',
|
1571 | 'altGlyphDef',
|
1572 | 'clipPath',
|
1573 | 'color-profile',
|
1574 | 'cursor',
|
1575 | 'filter',
|
1576 | 'font',
|
1577 | 'font-face',
|
1578 | 'foreignObject',
|
1579 | 'image',
|
1580 | 'marker',
|
1581 | 'mask',
|
1582 | 'pattern',
|
1583 | 'script',
|
1584 | 'style',
|
1585 | 'switch',
|
1586 | 'text',
|
1587 | 'view'
|
1588 | ]
|
1589 | },
|
1590 | hatch: {
|
1591 | attrsGroups: [
|
1592 | 'core',
|
1593 | 'presentation',
|
1594 | 'xlink'
|
1595 | ],
|
1596 | attrs: [
|
1597 | 'class',
|
1598 | 'style',
|
1599 | 'x',
|
1600 | 'y',
|
1601 | 'pitch',
|
1602 | 'rotate',
|
1603 | 'hatchUnits',
|
1604 | 'hatchContentUnits',
|
1605 | 'transform'
|
1606 | ],
|
1607 | defaults: {
|
1608 | hatchUnits: 'objectBoundingBox',
|
1609 | hatchContentUnits: 'userSpaceOnUse',
|
1610 | x: '0',
|
1611 | y: '0',
|
1612 | pitch: '0',
|
1613 | rotate: '0'
|
1614 | },
|
1615 | contentGroups: [
|
1616 | 'animation',
|
1617 | 'descriptive'
|
1618 | ],
|
1619 | content: [
|
1620 | 'hatchPath'
|
1621 | ]
|
1622 | },
|
1623 | hatchPath: {
|
1624 | attrsGroups: [
|
1625 | 'core',
|
1626 | 'presentation',
|
1627 | 'xlink'
|
1628 | ],
|
1629 | attrs: [
|
1630 | 'class',
|
1631 | 'style',
|
1632 | 'd',
|
1633 | 'offset'
|
1634 | ],
|
1635 | defaults: {
|
1636 | offset: '0'
|
1637 | },
|
1638 | contentGroups: [
|
1639 | 'animation',
|
1640 | 'descriptive'
|
1641 | ]
|
1642 | },
|
1643 | hkern: {
|
1644 | attrsGroups: [
|
1645 | 'core'
|
1646 | ],
|
1647 | attrs: [
|
1648 | 'u1',
|
1649 | 'g1',
|
1650 | 'u2',
|
1651 | 'g2',
|
1652 | 'k'
|
1653 | ]
|
1654 | },
|
1655 | image: {
|
1656 | attrsGroups: [
|
1657 | 'core',
|
1658 | 'conditionalProcessing',
|
1659 | 'graphicalEvent',
|
1660 | 'xlink',
|
1661 | 'presentation'
|
1662 | ],
|
1663 | attrs: [
|
1664 | 'class',
|
1665 | 'style',
|
1666 | 'externalResourcesRequired',
|
1667 | 'preserveAspectRatio',
|
1668 | 'transform',
|
1669 | 'x',
|
1670 | 'y',
|
1671 | 'width',
|
1672 | 'height',
|
1673 | 'href',
|
1674 | 'xlink:href'
|
1675 | ],
|
1676 | defaults: {
|
1677 | x: '0',
|
1678 | y: '0',
|
1679 | preserveAspectRatio: 'xMidYMid meet'
|
1680 | },
|
1681 | contentGroups: [
|
1682 | 'animation',
|
1683 | 'descriptive'
|
1684 | ]
|
1685 | },
|
1686 | line: {
|
1687 | attrsGroups: [
|
1688 | 'conditionalProcessing',
|
1689 | 'core',
|
1690 | 'graphicalEvent',
|
1691 | 'presentation'
|
1692 | ],
|
1693 | attrs: [
|
1694 | 'class',
|
1695 | 'style',
|
1696 | 'externalResourcesRequired',
|
1697 | 'transform',
|
1698 | 'x1',
|
1699 | 'y1',
|
1700 | 'x2',
|
1701 | 'y2'
|
1702 | ],
|
1703 | defaults: {
|
1704 | x1: '0',
|
1705 | y1: '0',
|
1706 | x2: '0',
|
1707 | y2: '0'
|
1708 | },
|
1709 | contentGroups: [
|
1710 | 'animation',
|
1711 | 'descriptive'
|
1712 | ]
|
1713 | },
|
1714 | linearGradient: {
|
1715 | attrsGroups: [
|
1716 | 'core',
|
1717 | 'presentation',
|
1718 | 'xlink'
|
1719 | ],
|
1720 | attrs: [
|
1721 | 'class',
|
1722 | 'style',
|
1723 | 'externalResourcesRequired',
|
1724 | 'x1',
|
1725 | 'y1',
|
1726 | 'x2',
|
1727 | 'y2',
|
1728 | 'gradientUnits',
|
1729 | 'gradientTransform',
|
1730 | 'spreadMethod',
|
1731 | 'href',
|
1732 | 'xlink:href'
|
1733 | ],
|
1734 | defaults: {
|
1735 | x1: '0',
|
1736 | y1: '0',
|
1737 | x2: '100%',
|
1738 | y2: '0',
|
1739 | spreadMethod: 'pad'
|
1740 | },
|
1741 | contentGroups: [
|
1742 | 'descriptive'
|
1743 | ],
|
1744 | content: [
|
1745 | 'animate',
|
1746 | 'animateTransform',
|
1747 | 'set',
|
1748 | 'stop'
|
1749 | ]
|
1750 | },
|
1751 | marker: {
|
1752 | attrsGroups: [
|
1753 | 'core',
|
1754 | 'presentation'
|
1755 | ],
|
1756 | attrs: [
|
1757 | 'class',
|
1758 | 'style',
|
1759 | 'externalResourcesRequired',
|
1760 | 'viewBox',
|
1761 | 'preserveAspectRatio',
|
1762 | 'refX',
|
1763 | 'refY',
|
1764 | 'markerUnits',
|
1765 | 'markerWidth',
|
1766 | 'markerHeight',
|
1767 | 'orient'
|
1768 | ],
|
1769 | defaults: {
|
1770 | markerUnits: 'strokeWidth',
|
1771 | refX: '0',
|
1772 | refY: '0',
|
1773 | markerWidth: '3',
|
1774 | markerHeight: '3'
|
1775 | },
|
1776 | contentGroups: [
|
1777 | 'animation',
|
1778 | 'descriptive',
|
1779 | 'shape',
|
1780 | 'structural',
|
1781 | 'paintServer'
|
1782 | ],
|
1783 | content: [
|
1784 | 'a',
|
1785 | 'altGlyphDef',
|
1786 | 'clipPath',
|
1787 | 'color-profile',
|
1788 | 'cursor',
|
1789 | 'filter',
|
1790 | 'font',
|
1791 | 'font-face',
|
1792 | 'foreignObject',
|
1793 | 'image',
|
1794 | 'marker',
|
1795 | 'mask',
|
1796 | 'pattern',
|
1797 | 'script',
|
1798 | 'style',
|
1799 | 'switch',
|
1800 | 'text',
|
1801 | 'view'
|
1802 | ]
|
1803 | },
|
1804 | mask: {
|
1805 | attrsGroups: [
|
1806 | 'conditionalProcessing',
|
1807 | 'core',
|
1808 | 'presentation'
|
1809 | ],
|
1810 | attrs: [
|
1811 | 'class',
|
1812 | 'style',
|
1813 | 'externalResourcesRequired',
|
1814 | 'x',
|
1815 | 'y',
|
1816 | 'width',
|
1817 | 'height',
|
1818 | 'maskUnits',
|
1819 | 'maskContentUnits'
|
1820 | ],
|
1821 | defaults: {
|
1822 | maskUnits: 'objectBoundingBox',
|
1823 | maskContentUnits: 'userSpaceOnUse',
|
1824 | x: '-10%',
|
1825 | y: '-10%',
|
1826 | width: '120%',
|
1827 | height: '120%'
|
1828 | },
|
1829 | contentGroups: [
|
1830 | 'animation',
|
1831 | 'descriptive',
|
1832 | 'shape',
|
1833 | 'structural',
|
1834 | 'paintServer'
|
1835 | ],
|
1836 | content: [
|
1837 | 'a',
|
1838 | 'altGlyphDef',
|
1839 | 'clipPath',
|
1840 | 'color-profile',
|
1841 | 'cursor',
|
1842 | 'filter',
|
1843 | 'font',
|
1844 | 'font-face',
|
1845 | 'foreignObject',
|
1846 | 'image',
|
1847 | 'marker',
|
1848 | 'mask',
|
1849 | 'pattern',
|
1850 | 'script',
|
1851 | 'style',
|
1852 | 'switch',
|
1853 | 'text',
|
1854 | 'view'
|
1855 | ]
|
1856 | },
|
1857 | metadata: {
|
1858 | attrsGroups: [
|
1859 | 'core'
|
1860 | ]
|
1861 | },
|
1862 | 'missing-glyph': {
|
1863 | attrsGroups: [
|
1864 | 'core',
|
1865 | 'presentation'
|
1866 | ],
|
1867 | attrs: [
|
1868 | 'class',
|
1869 | 'style',
|
1870 | 'd',
|
1871 | 'horiz-adv-x',
|
1872 | 'vert-origin-x',
|
1873 | 'vert-origin-y',
|
1874 | 'vert-adv-y'
|
1875 | ],
|
1876 | contentGroups: [
|
1877 | 'animation',
|
1878 | 'descriptive',
|
1879 | 'shape',
|
1880 | 'structural',
|
1881 | 'paintServer'
|
1882 | ],
|
1883 | content: [
|
1884 | 'a',
|
1885 | 'altGlyphDef',
|
1886 | 'clipPath',
|
1887 | 'color-profile',
|
1888 | 'cursor',
|
1889 | 'filter',
|
1890 | 'font',
|
1891 | 'font-face',
|
1892 | 'foreignObject',
|
1893 | 'image',
|
1894 | 'marker',
|
1895 | 'mask',
|
1896 | 'pattern',
|
1897 | 'script',
|
1898 | 'style',
|
1899 | 'switch',
|
1900 | 'text',
|
1901 | 'view'
|
1902 | ]
|
1903 | },
|
1904 | mpath: {
|
1905 | attrsGroups: [
|
1906 | 'core',
|
1907 | 'xlink'
|
1908 | ],
|
1909 | attrs: [
|
1910 | 'externalResourcesRequired',
|
1911 | 'href',
|
1912 | 'xlink:href'
|
1913 | ],
|
1914 | contentGroups: [
|
1915 | 'descriptive'
|
1916 | ]
|
1917 | },
|
1918 | path: {
|
1919 | attrsGroups: [
|
1920 | 'conditionalProcessing',
|
1921 | 'core',
|
1922 | 'graphicalEvent',
|
1923 | 'presentation'
|
1924 | ],
|
1925 | attrs: [
|
1926 | 'class',
|
1927 | 'style',
|
1928 | 'externalResourcesRequired',
|
1929 | 'transform',
|
1930 | 'd',
|
1931 | 'pathLength'
|
1932 | ],
|
1933 | contentGroups: [
|
1934 | 'animation',
|
1935 | 'descriptive'
|
1936 | ]
|
1937 | },
|
1938 | pattern: {
|
1939 | attrsGroups: [
|
1940 | 'conditionalProcessing',
|
1941 | 'core',
|
1942 | 'presentation',
|
1943 | 'xlink'
|
1944 | ],
|
1945 | attrs: [
|
1946 | 'class',
|
1947 | 'style',
|
1948 | 'externalResourcesRequired',
|
1949 | 'viewBox',
|
1950 | 'preserveAspectRatio',
|
1951 | 'x',
|
1952 | 'y',
|
1953 | 'width',
|
1954 | 'height',
|
1955 | 'patternUnits',
|
1956 | 'patternContentUnits',
|
1957 | 'patternTransform',
|
1958 | 'href',
|
1959 | 'xlink:href'
|
1960 | ],
|
1961 | defaults: {
|
1962 | patternUnits: 'objectBoundingBox',
|
1963 | patternContentUnits: 'userSpaceOnUse',
|
1964 | x: '0',
|
1965 | y: '0',
|
1966 | width: '0',
|
1967 | height: '0',
|
1968 | preserveAspectRatio: 'xMidYMid meet'
|
1969 | },
|
1970 | contentGroups: [
|
1971 | 'animation',
|
1972 | 'descriptive',
|
1973 | 'paintServer',
|
1974 | 'shape',
|
1975 | 'structural'
|
1976 | ],
|
1977 | content: [
|
1978 | 'a',
|
1979 | 'altGlyphDef',
|
1980 | 'clipPath',
|
1981 | 'color-profile',
|
1982 | 'cursor',
|
1983 | 'filter',
|
1984 | 'font',
|
1985 | 'font-face',
|
1986 | 'foreignObject',
|
1987 | 'image',
|
1988 | 'marker',
|
1989 | 'mask',
|
1990 | 'pattern',
|
1991 | 'script',
|
1992 | 'style',
|
1993 | 'switch',
|
1994 | 'text',
|
1995 | 'view'
|
1996 | ]
|
1997 | },
|
1998 | polygon: {
|
1999 | attrsGroups: [
|
2000 | 'conditionalProcessing',
|
2001 | 'core',
|
2002 | 'graphicalEvent',
|
2003 | 'presentation'
|
2004 | ],
|
2005 | attrs: [
|
2006 | 'class',
|
2007 | 'style',
|
2008 | 'externalResourcesRequired',
|
2009 | 'transform',
|
2010 | 'points'
|
2011 | ],
|
2012 | contentGroups: [
|
2013 | 'animation',
|
2014 | 'descriptive'
|
2015 | ]
|
2016 | },
|
2017 | polyline: {
|
2018 | attrsGroups: [
|
2019 | 'conditionalProcessing',
|
2020 | 'core',
|
2021 | 'graphicalEvent',
|
2022 | 'presentation'
|
2023 | ],
|
2024 | attrs: [
|
2025 | 'class',
|
2026 | 'style',
|
2027 | 'externalResourcesRequired',
|
2028 | 'transform',
|
2029 | 'points'
|
2030 | ],
|
2031 | contentGroups: [
|
2032 | 'animation',
|
2033 | 'descriptive'
|
2034 | ]
|
2035 | },
|
2036 | radialGradient: {
|
2037 | attrsGroups: [
|
2038 | 'core',
|
2039 | 'presentation',
|
2040 | 'xlink'
|
2041 | ],
|
2042 | attrs: [
|
2043 | 'class',
|
2044 | 'style',
|
2045 | 'externalResourcesRequired',
|
2046 | 'cx',
|
2047 | 'cy',
|
2048 | 'r',
|
2049 | 'fx',
|
2050 | 'fy',
|
2051 | 'fr',
|
2052 | 'gradientUnits',
|
2053 | 'gradientTransform',
|
2054 | 'spreadMethod',
|
2055 | 'href',
|
2056 | 'xlink:href'
|
2057 | ],
|
2058 | defaults: {
|
2059 | gradientUnits: 'objectBoundingBox',
|
2060 | cx: '50%',
|
2061 | cy: '50%',
|
2062 | r: '50%'
|
2063 | },
|
2064 | contentGroups: [
|
2065 | 'descriptive'
|
2066 | ],
|
2067 | content: [
|
2068 | 'animate',
|
2069 | 'animateTransform',
|
2070 | 'set',
|
2071 | 'stop'
|
2072 | ]
|
2073 | },
|
2074 | meshGradient: {
|
2075 | attrsGroups: [
|
2076 | 'core',
|
2077 | 'presentation',
|
2078 | 'xlink'
|
2079 | ],
|
2080 | attrs: [
|
2081 | 'class',
|
2082 | 'style',
|
2083 | 'x',
|
2084 | 'y',
|
2085 | 'gradientUnits',
|
2086 | 'transform'
|
2087 | ],
|
2088 | contentGroups: [
|
2089 | 'descriptive',
|
2090 | 'paintServer',
|
2091 | 'animation',
|
2092 | ],
|
2093 | content: [
|
2094 | 'meshRow'
|
2095 | ]
|
2096 | },
|
2097 | meshRow: {
|
2098 | attrsGroups: [
|
2099 | 'core',
|
2100 | 'presentation'
|
2101 | ],
|
2102 | attrs: [
|
2103 | 'class',
|
2104 | 'style'
|
2105 | ],
|
2106 | contentGroups: [
|
2107 | 'descriptive'
|
2108 | ],
|
2109 | content: [
|
2110 | 'meshPatch'
|
2111 | ]
|
2112 | },
|
2113 | meshPatch: {
|
2114 | attrsGroups: [
|
2115 | 'core',
|
2116 | 'presentation'
|
2117 | ],
|
2118 | attrs: [
|
2119 | 'class',
|
2120 | 'style'
|
2121 | ],
|
2122 | contentGroups: [
|
2123 | 'descriptive'
|
2124 | ],
|
2125 | content: [
|
2126 | 'stop'
|
2127 | ]
|
2128 | },
|
2129 | rect: {
|
2130 | attrsGroups: [
|
2131 | 'conditionalProcessing',
|
2132 | 'core',
|
2133 | 'graphicalEvent',
|
2134 | 'presentation'
|
2135 | ],
|
2136 | attrs: [
|
2137 | 'class',
|
2138 | 'style',
|
2139 | 'externalResourcesRequired',
|
2140 | 'transform',
|
2141 | 'x',
|
2142 | 'y',
|
2143 | 'width',
|
2144 | 'height',
|
2145 | 'rx',
|
2146 | 'ry'
|
2147 | ],
|
2148 | defaults: {
|
2149 | x: '0',
|
2150 | y: '0'
|
2151 | },
|
2152 | contentGroups: [
|
2153 | 'animation',
|
2154 | 'descriptive'
|
2155 | ]
|
2156 | },
|
2157 | script: {
|
2158 | attrsGroups: [
|
2159 | 'core',
|
2160 | 'xlink'
|
2161 | ],
|
2162 | attrs: [
|
2163 | 'externalResourcesRequired',
|
2164 | 'type',
|
2165 | 'href',
|
2166 | 'xlink:href'
|
2167 | ]
|
2168 | },
|
2169 | set: {
|
2170 | attrsGroups: [
|
2171 | 'conditionalProcessing',
|
2172 | 'core',
|
2173 | 'animation',
|
2174 | 'xlink',
|
2175 | 'animationAttributeTarget',
|
2176 | 'animationTiming',
|
2177 | ],
|
2178 | attrs: [
|
2179 | 'externalResourcesRequired',
|
2180 | 'to'
|
2181 | ],
|
2182 | contentGroups: [
|
2183 | 'descriptive'
|
2184 | ]
|
2185 | },
|
2186 | solidColor: {
|
2187 | attrsGroups: [
|
2188 | 'core',
|
2189 | 'presentation'
|
2190 | ],
|
2191 | attrs: [
|
2192 | 'class',
|
2193 | 'style'
|
2194 | ],
|
2195 | contentGroups: [
|
2196 | 'paintServer'
|
2197 | ]
|
2198 | },
|
2199 | stop: {
|
2200 | attrsGroups: [
|
2201 | 'core',
|
2202 | 'presentation'
|
2203 | ],
|
2204 | attrs: [
|
2205 | 'class',
|
2206 | 'style',
|
2207 | 'offset',
|
2208 | 'path'
|
2209 | ],
|
2210 | content: [
|
2211 | 'animate',
|
2212 | 'animateColor',
|
2213 | 'set'
|
2214 | ]
|
2215 | },
|
2216 | style: {
|
2217 | attrsGroups: [
|
2218 | 'core'
|
2219 | ],
|
2220 | attrs: [
|
2221 | 'type',
|
2222 | 'media',
|
2223 | 'title'
|
2224 | ],
|
2225 | defaults: {
|
2226 | type: 'text/css'
|
2227 | }
|
2228 | },
|
2229 | svg: {
|
2230 | attrsGroups: [
|
2231 | 'conditionalProcessing',
|
2232 | 'core',
|
2233 | 'documentEvent',
|
2234 | 'graphicalEvent',
|
2235 | 'presentation'
|
2236 | ],
|
2237 | attrs: [
|
2238 | 'class',
|
2239 | 'style',
|
2240 | 'x',
|
2241 | 'y',
|
2242 | 'width',
|
2243 | 'height',
|
2244 | 'viewBox',
|
2245 | 'preserveAspectRatio',
|
2246 | 'zoomAndPan',
|
2247 | 'version',
|
2248 | 'baseProfile',
|
2249 | 'contentScriptType',
|
2250 | 'contentStyleType'
|
2251 | ],
|
2252 | defaults: {
|
2253 | x: '0',
|
2254 | y: '0',
|
2255 | width: '100%',
|
2256 | height: '100%',
|
2257 | preserveAspectRatio: 'xMidYMid meet',
|
2258 | zoomAndPan: 'magnify',
|
2259 | version: '1.1',
|
2260 | baseProfile: 'none',
|
2261 | contentScriptType: 'application/ecmascript',
|
2262 | contentStyleType: 'text/css'
|
2263 | },
|
2264 | contentGroups: [
|
2265 | 'animation',
|
2266 | 'descriptive',
|
2267 | 'shape',
|
2268 | 'structural',
|
2269 | 'paintServer'
|
2270 | ],
|
2271 | content: [
|
2272 | 'a',
|
2273 | 'altGlyphDef',
|
2274 | 'clipPath',
|
2275 | 'color-profile',
|
2276 | 'cursor',
|
2277 | 'filter',
|
2278 | 'font',
|
2279 | 'font-face',
|
2280 | 'foreignObject',
|
2281 | 'image',
|
2282 | 'marker',
|
2283 | 'mask',
|
2284 | 'pattern',
|
2285 | 'script',
|
2286 | 'style',
|
2287 | 'switch',
|
2288 | 'text',
|
2289 | 'view'
|
2290 | ]
|
2291 | },
|
2292 | switch: {
|
2293 | attrsGroups: [
|
2294 | 'conditionalProcessing',
|
2295 | 'core',
|
2296 | 'graphicalEvent',
|
2297 | 'presentation'
|
2298 | ],
|
2299 | attrs: [
|
2300 | 'class',
|
2301 | 'style',
|
2302 | 'externalResourcesRequired',
|
2303 | 'transform'
|
2304 | ],
|
2305 | contentGroups: [
|
2306 | 'animation',
|
2307 | 'descriptive',
|
2308 | 'shape'
|
2309 | ],
|
2310 | content: [
|
2311 | 'a',
|
2312 | 'foreignObject',
|
2313 | 'g',
|
2314 | 'image',
|
2315 | 'svg',
|
2316 | 'switch',
|
2317 | 'text',
|
2318 | 'use'
|
2319 | ]
|
2320 | },
|
2321 | symbol: {
|
2322 | attrsGroups: [
|
2323 | 'core',
|
2324 | 'graphicalEvent',
|
2325 | 'presentation'
|
2326 | ],
|
2327 | attrs: [
|
2328 | 'class',
|
2329 | 'style',
|
2330 | 'externalResourcesRequired',
|
2331 | 'preserveAspectRatio',
|
2332 | 'viewBox',
|
2333 | 'refX',
|
2334 | 'refY'
|
2335 | ],
|
2336 | defaults: {
|
2337 | refX: 0,
|
2338 | refY: 0
|
2339 | },
|
2340 | contentGroups: [
|
2341 | 'animation',
|
2342 | 'descriptive',
|
2343 | 'shape',
|
2344 | 'structural',
|
2345 | 'paintServer'
|
2346 | ],
|
2347 | content: [
|
2348 | 'a',
|
2349 | 'altGlyphDef',
|
2350 | 'clipPath',
|
2351 | 'color-profile',
|
2352 | 'cursor',
|
2353 | 'filter',
|
2354 | 'font',
|
2355 | 'font-face',
|
2356 | 'foreignObject',
|
2357 | 'image',
|
2358 | 'marker',
|
2359 | 'mask',
|
2360 | 'pattern',
|
2361 | 'script',
|
2362 | 'style',
|
2363 | 'switch',
|
2364 | 'text',
|
2365 | 'view'
|
2366 | ]
|
2367 | },
|
2368 | text: {
|
2369 | attrsGroups: [
|
2370 | 'conditionalProcessing',
|
2371 | 'core',
|
2372 | 'graphicalEvent',
|
2373 | 'presentation'
|
2374 | ],
|
2375 | attrs: [
|
2376 | 'class',
|
2377 | 'style',
|
2378 | 'externalResourcesRequired',
|
2379 | 'transform',
|
2380 | 'lengthAdjust',
|
2381 | 'x',
|
2382 | 'y',
|
2383 | 'dx',
|
2384 | 'dy',
|
2385 | 'rotate',
|
2386 | 'textLength'
|
2387 | ],
|
2388 | defaults: {
|
2389 | x: '0',
|
2390 | y: '0',
|
2391 | lengthAdjust: 'spacing'
|
2392 | },
|
2393 | contentGroups: [
|
2394 | 'animation',
|
2395 | 'descriptive',
|
2396 | 'textContentChild'
|
2397 | ],
|
2398 | content: [
|
2399 | 'a'
|
2400 | ]
|
2401 | },
|
2402 | textPath: {
|
2403 | attrsGroups: [
|
2404 | 'conditionalProcessing',
|
2405 | 'core',
|
2406 | 'graphicalEvent',
|
2407 | 'presentation',
|
2408 | 'xlink'
|
2409 | ],
|
2410 | attrs: [
|
2411 | 'class',
|
2412 | 'style',
|
2413 | 'externalResourcesRequired',
|
2414 | 'href',
|
2415 | 'xlink:href',
|
2416 | 'startOffset',
|
2417 | 'method',
|
2418 | 'spacing',
|
2419 | 'd'
|
2420 | ],
|
2421 | defaults: {
|
2422 | startOffset: '0',
|
2423 | method: 'align',
|
2424 | spacing: 'exact'
|
2425 | },
|
2426 | contentGroups: [
|
2427 | 'descriptive'
|
2428 | ],
|
2429 | content: [
|
2430 | 'a',
|
2431 | 'altGlyph',
|
2432 | 'animate',
|
2433 | 'animateColor',
|
2434 | 'set',
|
2435 | 'tref',
|
2436 | 'tspan'
|
2437 | ]
|
2438 | },
|
2439 | title: {
|
2440 | attrsGroups: [
|
2441 | 'core'
|
2442 | ],
|
2443 | attrs: [
|
2444 | 'class',
|
2445 | 'style'
|
2446 | ]
|
2447 | },
|
2448 | tref: {
|
2449 | attrsGroups: [
|
2450 | 'conditionalProcessing',
|
2451 | 'core',
|
2452 | 'graphicalEvent',
|
2453 | 'presentation',
|
2454 | 'xlink'
|
2455 | ],
|
2456 | attrs: [
|
2457 | 'class',
|
2458 | 'style',
|
2459 | 'externalResourcesRequired',
|
2460 | 'href',
|
2461 | 'xlink:href'
|
2462 | ],
|
2463 | contentGroups: [
|
2464 | 'descriptive'
|
2465 | ],
|
2466 | content: [
|
2467 | 'animate',
|
2468 | 'animateColor',
|
2469 | 'set'
|
2470 | ]
|
2471 | },
|
2472 | tspan: {
|
2473 | attrsGroups: [
|
2474 | 'conditionalProcessing',
|
2475 | 'core',
|
2476 | 'graphicalEvent',
|
2477 | 'presentation'
|
2478 | ],
|
2479 | attrs: [
|
2480 | 'class',
|
2481 | 'style',
|
2482 | 'externalResourcesRequired',
|
2483 | 'x',
|
2484 | 'y',
|
2485 | 'dx',
|
2486 | 'dy',
|
2487 | 'rotate',
|
2488 | 'textLength',
|
2489 | 'lengthAdjust'
|
2490 | ],
|
2491 | contentGroups: [
|
2492 | 'descriptive'
|
2493 | ],
|
2494 | content: [
|
2495 | 'a',
|
2496 | 'altGlyph',
|
2497 | 'animate',
|
2498 | 'animateColor',
|
2499 | 'set',
|
2500 | 'tref',
|
2501 | 'tspan'
|
2502 | ]
|
2503 | },
|
2504 | use: {
|
2505 | attrsGroups: [
|
2506 | 'core',
|
2507 | 'conditionalProcessing',
|
2508 | 'graphicalEvent',
|
2509 | 'presentation',
|
2510 | 'xlink'
|
2511 | ],
|
2512 | attrs: [
|
2513 | 'class',
|
2514 | 'style',
|
2515 | 'externalResourcesRequired',
|
2516 | 'transform',
|
2517 | 'x',
|
2518 | 'y',
|
2519 | 'width',
|
2520 | 'height',
|
2521 | 'href',
|
2522 | 'xlink:href'
|
2523 | ],
|
2524 | defaults: {
|
2525 | x: '0',
|
2526 | y: '0'
|
2527 | },
|
2528 | contentGroups: [
|
2529 | 'animation',
|
2530 | 'descriptive'
|
2531 | ]
|
2532 | },
|
2533 | view: {
|
2534 | attrsGroups: [
|
2535 | 'core'
|
2536 | ],
|
2537 | attrs: [
|
2538 | 'externalResourcesRequired',
|
2539 | 'viewBox',
|
2540 | 'preserveAspectRatio',
|
2541 | 'zoomAndPan',
|
2542 | 'viewTarget'
|
2543 | ],
|
2544 | contentGroups: [
|
2545 | 'descriptive'
|
2546 | ]
|
2547 | },
|
2548 | vkern: {
|
2549 | attrsGroups: [
|
2550 | 'core'
|
2551 | ],
|
2552 | attrs: [
|
2553 | 'u1',
|
2554 | 'g1',
|
2555 | 'u2',
|
2556 | 'g2',
|
2557 | 'k'
|
2558 | ]
|
2559 | }
|
2560 | };
|
2561 |
|
2562 |
|
2563 | var editorNamespaces = [
|
2564 | 'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
|
2565 | 'http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd',
|
2566 | 'http://www.inkscape.org/namespaces/inkscape',
|
2567 | 'http://www.bohemiancoding.com/sketch/ns',
|
2568 | 'http://ns.adobe.com/AdobeIllustrator/10.0/',
|
2569 | 'http://ns.adobe.com/Graphs/1.0/',
|
2570 | 'http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/',
|
2571 | 'http://ns.adobe.com/Variables/1.0/',
|
2572 | 'http://ns.adobe.com/SaveForWeb/1.0/',
|
2573 | 'http://ns.adobe.com/Extensibility/1.0/',
|
2574 | 'http://ns.adobe.com/Flows/1.0/',
|
2575 | 'http://ns.adobe.com/ImageReplacement/1.0/',
|
2576 | 'http://ns.adobe.com/GenericCustomNamespace/1.0/',
|
2577 | 'http://ns.adobe.com/XPath/1.0/',
|
2578 | 'http://schemas.microsoft.com/visio/2003/SVGExtensions/',
|
2579 | 'http://taptrix.com/vectorillustrator/svg_extensions',
|
2580 | 'http://www.figma.com/figma/ns',
|
2581 | 'http://purl.org/dc/elements/1.1/',
|
2582 | 'http://creativecommons.org/ns#',
|
2583 | 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
2584 | 'http://www.serif.com/',
|
2585 | 'http://www.vector.evaxdesign.sk'
|
2586 | ];
|
2587 |
|
2588 |
|
2589 | var referencesProps = [
|
2590 | 'clip-path',
|
2591 | 'color-profile',
|
2592 | 'fill',
|
2593 | 'filter',
|
2594 | 'marker-start',
|
2595 | 'marker-mid',
|
2596 | 'marker-end',
|
2597 | 'mask',
|
2598 | 'stroke',
|
2599 | 'style'
|
2600 | ];
|
2601 |
|
2602 |
|
2603 | var inheritableAttrs = [
|
2604 | 'clip-rule',
|
2605 | 'color',
|
2606 | 'color-interpolation',
|
2607 | 'color-interpolation-filters',
|
2608 | 'color-profile',
|
2609 | 'color-rendering',
|
2610 | 'cursor',
|
2611 | 'direction',
|
2612 | 'dominant-baseline',
|
2613 | 'fill',
|
2614 | 'fill-opacity',
|
2615 | 'fill-rule',
|
2616 | 'font',
|
2617 | 'font-family',
|
2618 | 'font-size',
|
2619 | 'font-size-adjust',
|
2620 | 'font-stretch',
|
2621 | 'font-style',
|
2622 | 'font-variant',
|
2623 | 'font-weight',
|
2624 | 'glyph-orientation-horizontal',
|
2625 | 'glyph-orientation-vertical',
|
2626 | 'image-rendering',
|
2627 | 'letter-spacing',
|
2628 | 'marker',
|
2629 | 'marker-end',
|
2630 | 'marker-mid',
|
2631 | 'marker-start',
|
2632 | 'paint-order',
|
2633 | 'pointer-events',
|
2634 | 'shape-rendering',
|
2635 | 'stroke',
|
2636 | 'stroke-dasharray',
|
2637 | 'stroke-dashoffset',
|
2638 | 'stroke-linecap',
|
2639 | 'stroke-linejoin',
|
2640 | 'stroke-miterlimit',
|
2641 | 'stroke-opacity',
|
2642 | 'stroke-width',
|
2643 | 'text-anchor',
|
2644 | 'text-rendering',
|
2645 | 'transform',
|
2646 | 'visibility',
|
2647 | 'word-spacing',
|
2648 | 'writing-mode'
|
2649 | ];
|
2650 |
|
2651 | var presentationNonInheritableGroupAttrs = [
|
2652 | 'display',
|
2653 | 'clip-path',
|
2654 | 'filter',
|
2655 | 'mask',
|
2656 | 'opacity',
|
2657 | 'text-decoration',
|
2658 | 'transform',
|
2659 | 'unicode-bidi',
|
2660 | 'visibility'
|
2661 | ];
|
2662 |
|
2663 |
|
2664 | var colorsNames = {
|
2665 | 'aliceblue': '#f0f8ff',
|
2666 | 'antiquewhite': '#faebd7',
|
2667 | 'aqua': '#0ff',
|
2668 | 'aquamarine': '#7fffd4',
|
2669 | 'azure': '#f0ffff',
|
2670 | 'beige': '#f5f5dc',
|
2671 | 'bisque': '#ffe4c4',
|
2672 | 'black': '#000',
|
2673 | 'blanchedalmond': '#ffebcd',
|
2674 | 'blue': '#00f',
|
2675 | 'blueviolet': '#8a2be2',
|
2676 | 'brown': '#a52a2a',
|
2677 | 'burlywood': '#deb887',
|
2678 | 'cadetblue': '#5f9ea0',
|
2679 | 'chartreuse': '#7fff00',
|
2680 | 'chocolate': '#d2691e',
|
2681 | 'coral': '#ff7f50',
|
2682 | 'cornflowerblue': '#6495ed',
|
2683 | 'cornsilk': '#fff8dc',
|
2684 | 'crimson': '#dc143c',
|
2685 | 'cyan': '#0ff',
|
2686 | 'darkblue': '#00008b',
|
2687 | 'darkcyan': '#008b8b',
|
2688 | 'darkgoldenrod': '#b8860b',
|
2689 | 'darkgray': '#a9a9a9',
|
2690 | 'darkgreen': '#006400',
|
2691 | 'darkgrey': '#a9a9a9',
|
2692 | 'darkkhaki': '#bdb76b',
|
2693 | 'darkmagenta': '#8b008b',
|
2694 | 'darkolivegreen': '#556b2f',
|
2695 | 'darkorange': '#ff8c00',
|
2696 | 'darkorchid': '#9932cc',
|
2697 | 'darkred': '#8b0000',
|
2698 | 'darksalmon': '#e9967a',
|
2699 | 'darkseagreen': '#8fbc8f',
|
2700 | 'darkslateblue': '#483d8b',
|
2701 | 'darkslategray': '#2f4f4f',
|
2702 | 'darkslategrey': '#2f4f4f',
|
2703 | 'darkturquoise': '#00ced1',
|
2704 | 'darkviolet': '#9400d3',
|
2705 | 'deeppink': '#ff1493',
|
2706 | 'deepskyblue': '#00bfff',
|
2707 | 'dimgray': '#696969',
|
2708 | 'dimgrey': '#696969',
|
2709 | 'dodgerblue': '#1e90ff',
|
2710 | 'firebrick': '#b22222',
|
2711 | 'floralwhite': '#fffaf0',
|
2712 | 'forestgreen': '#228b22',
|
2713 | 'fuchsia': '#f0f',
|
2714 | 'gainsboro': '#dcdcdc',
|
2715 | 'ghostwhite': '#f8f8ff',
|
2716 | 'gold': '#ffd700',
|
2717 | 'goldenrod': '#daa520',
|
2718 | 'gray': '#808080',
|
2719 | 'green': '#008000',
|
2720 | 'greenyellow': '#adff2f',
|
2721 | 'grey': '#808080',
|
2722 | 'honeydew': '#f0fff0',
|
2723 | 'hotpink': '#ff69b4',
|
2724 | 'indianred': '#cd5c5c',
|
2725 | 'indigo': '#4b0082',
|
2726 | 'ivory': '#fffff0',
|
2727 | 'khaki': '#f0e68c',
|
2728 | 'lavender': '#e6e6fa',
|
2729 | 'lavenderblush': '#fff0f5',
|
2730 | 'lawngreen': '#7cfc00',
|
2731 | 'lemonchiffon': '#fffacd',
|
2732 | 'lightblue': '#add8e6',
|
2733 | 'lightcoral': '#f08080',
|
2734 | 'lightcyan': '#e0ffff',
|
2735 | 'lightgoldenrodyellow': '#fafad2',
|
2736 | 'lightgray': '#d3d3d3',
|
2737 | 'lightgreen': '#90ee90',
|
2738 | 'lightgrey': '#d3d3d3',
|
2739 | 'lightpink': '#ffb6c1',
|
2740 | 'lightsalmon': '#ffa07a',
|
2741 | 'lightseagreen': '#20b2aa',
|
2742 | 'lightskyblue': '#87cefa',
|
2743 | 'lightslategray': '#789',
|
2744 | 'lightslategrey': '#789',
|
2745 | 'lightsteelblue': '#b0c4de',
|
2746 | 'lightyellow': '#ffffe0',
|
2747 | 'lime': '#0f0',
|
2748 | 'limegreen': '#32cd32',
|
2749 | 'linen': '#faf0e6',
|
2750 | 'magenta': '#f0f',
|
2751 | 'maroon': '#800000',
|
2752 | 'mediumaquamarine': '#66cdaa',
|
2753 | 'mediumblue': '#0000cd',
|
2754 | 'mediumorchid': '#ba55d3',
|
2755 | 'mediumpurple': '#9370db',
|
2756 | 'mediumseagreen': '#3cb371',
|
2757 | 'mediumslateblue': '#7b68ee',
|
2758 | 'mediumspringgreen': '#00fa9a',
|
2759 | 'mediumturquoise': '#48d1cc',
|
2760 | 'mediumvioletred': '#c71585',
|
2761 | 'midnightblue': '#191970',
|
2762 | 'mintcream': '#f5fffa',
|
2763 | 'mistyrose': '#ffe4e1',
|
2764 | 'moccasin': '#ffe4b5',
|
2765 | 'navajowhite': '#ffdead',
|
2766 | 'navy': '#000080',
|
2767 | 'oldlace': '#fdf5e6',
|
2768 | 'olive': '#808000',
|
2769 | 'olivedrab': '#6b8e23',
|
2770 | 'orange': '#ffa500',
|
2771 | 'orangered': '#ff4500',
|
2772 | 'orchid': '#da70d6',
|
2773 | 'palegoldenrod': '#eee8aa',
|
2774 | 'palegreen': '#98fb98',
|
2775 | 'paleturquoise': '#afeeee',
|
2776 | 'palevioletred': '#db7093',
|
2777 | 'papayawhip': '#ffefd5',
|
2778 | 'peachpuff': '#ffdab9',
|
2779 | 'peru': '#cd853f',
|
2780 | 'pink': '#ffc0cb',
|
2781 | 'plum': '#dda0dd',
|
2782 | 'powderblue': '#b0e0e6',
|
2783 | 'purple': '#800080',
|
2784 | 'rebeccapurple': '#639',
|
2785 | 'red': '#f00',
|
2786 | 'rosybrown': '#bc8f8f',
|
2787 | 'royalblue': '#4169e1',
|
2788 | 'saddlebrown': '#8b4513',
|
2789 | 'salmon': '#fa8072',
|
2790 | 'sandybrown': '#f4a460',
|
2791 | 'seagreen': '#2e8b57',
|
2792 | 'seashell': '#fff5ee',
|
2793 | 'sienna': '#a0522d',
|
2794 | 'silver': '#c0c0c0',
|
2795 | 'skyblue': '#87ceeb',
|
2796 | 'slateblue': '#6a5acd',
|
2797 | 'slategray': '#708090',
|
2798 | 'slategrey': '#708090',
|
2799 | 'snow': '#fffafa',
|
2800 | 'springgreen': '#00ff7f',
|
2801 | 'steelblue': '#4682b4',
|
2802 | 'tan': '#d2b48c',
|
2803 | 'teal': '#008080',
|
2804 | 'thistle': '#d8bfd8',
|
2805 | 'tomato': '#ff6347',
|
2806 | 'turquoise': '#40e0d0',
|
2807 | 'violet': '#ee82ee',
|
2808 | 'wheat': '#f5deb3',
|
2809 | 'white': '#fff',
|
2810 | 'whitesmoke': '#f5f5f5',
|
2811 | 'yellow': '#ff0',
|
2812 | 'yellowgreen': '#9acd32'
|
2813 | };
|
2814 |
|
2815 | var colorsShortNames = {
|
2816 | '#f0ffff': 'azure',
|
2817 | '#f5f5dc': 'beige',
|
2818 | '#ffe4c4': 'bisque',
|
2819 | '#a52a2a': 'brown',
|
2820 | '#ff7f50': 'coral',
|
2821 | '#ffd700': 'gold',
|
2822 | '#808080': 'gray',
|
2823 | '#008000': 'green',
|
2824 | '#4b0082': 'indigo',
|
2825 | '#fffff0': 'ivory',
|
2826 | '#f0e68c': 'khaki',
|
2827 | '#faf0e6': 'linen',
|
2828 | '#800000': 'maroon',
|
2829 | '#000080': 'navy',
|
2830 | '#808000': 'olive',
|
2831 | '#ffa500': 'orange',
|
2832 | '#da70d6': 'orchid',
|
2833 | '#cd853f': 'peru',
|
2834 | '#ffc0cb': 'pink',
|
2835 | '#dda0dd': 'plum',
|
2836 | '#800080': 'purple',
|
2837 | '#f00': 'red',
|
2838 | '#ff0000': 'red',
|
2839 | '#fa8072': 'salmon',
|
2840 | '#a0522d': 'sienna',
|
2841 | '#c0c0c0': 'silver',
|
2842 | '#fffafa': 'snow',
|
2843 | '#d2b48c': 'tan',
|
2844 | '#008080': 'teal',
|
2845 | '#ff6347': 'tomato',
|
2846 | '#ee82ee': 'violet',
|
2847 | '#f5deb3': 'wheat'
|
2848 | };
|
2849 |
|
2850 |
|
2851 | var colorsProps = [
|
2852 | 'color', 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color'
|
2853 | ];
|
2854 |
|
2855 | var _collections = {
|
2856 | elemsGroups: elemsGroups,
|
2857 | pathElems: pathElems,
|
2858 | attrsGroups: attrsGroups,
|
2859 | attrsGroupsDefaults: attrsGroupsDefaults,
|
2860 | elems: elems,
|
2861 | editorNamespaces: editorNamespaces,
|
2862 | referencesProps: referencesProps,
|
2863 | inheritableAttrs: inheritableAttrs,
|
2864 | presentationNonInheritableGroupAttrs: presentationNonInheritableGroupAttrs,
|
2865 | colorsNames: colorsNames,
|
2866 | colorsShortNames: colorsShortNames,
|
2867 | colorsProps: colorsProps
|
2868 | };
|
2869 |
|
2870 | var type$4 = 'full';
|
2871 |
|
2872 | var active$4 = true;
|
2873 |
|
2874 | var description$4 = 'removes unused IDs and minifies used';
|
2875 |
|
2876 | var params$1 = {
|
2877 | remove: true,
|
2878 | minify: true,
|
2879 | prefix: '',
|
2880 | preserve: [],
|
2881 | preservePrefixes: [],
|
2882 | force: false
|
2883 | };
|
2884 |
|
2885 | var referencesProps$1 = new Set(_collections.referencesProps),
|
2886 | regReferencesUrl = /\burl\(("|')?#(.+?)\1\)/,
|
2887 | regReferencesHref = /^#(.+?)$/,
|
2888 | regReferencesBegin = /(\w+)\./,
|
2889 | styleOrScript = ['style', 'script'],
|
2890 | generateIDchars = [
|
2891 | 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
2892 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
|
2893 | ],
|
2894 | maxIDindex = generateIDchars.length - 1;
|
2895 |
|
2896 |
|
2897 |
|
2898 |
|
2899 |
|
2900 |
|
2901 |
|
2902 |
|
2903 |
|
2904 |
|
2905 | var fn$4 = function(data, params) {
|
2906 | var currentID,
|
2907 | currentIDstring,
|
2908 | IDs = new Map(),
|
2909 | referencesIDs = new Map(),
|
2910 | hasStyleOrScript = false,
|
2911 | preserveIDs = new Set(Array.isArray(params.preserve) ? params.preserve : params.preserve ? [params.preserve] : []),
|
2912 | preserveIDPrefixes = new Set(Array.isArray(params.preservePrefixes) ? params.preservePrefixes : (params.preservePrefixes ? [params.preservePrefixes] : [])),
|
2913 | idValuePrefix = '#',
|
2914 | idValuePostfix = '.';
|
2915 |
|
2916 | |
2917 |
|
2918 |
|
2919 |
|
2920 |
|
2921 |
|
2922 | function monkeys(items) {
|
2923 | for (var i = 0; i < items.content.length && !hasStyleOrScript; i++) {
|
2924 | var item = items.content[i];
|
2925 |
|
2926 |
|
2927 | if (!params.force) {
|
2928 | var isNotEmpty = Boolean(item.content);
|
2929 | if (item.isElem(styleOrScript) && isNotEmpty) {
|
2930 | hasStyleOrScript = true;
|
2931 | continue;
|
2932 | }
|
2933 |
|
2934 |
|
2935 | if (item.isElem('svg')) {
|
2936 | var hasDefsOnly = true;
|
2937 |
|
2938 | for (var j = 0; j < item.content.length; j++) {
|
2939 | if (!item.content[j].isElem('defs')) {
|
2940 | hasDefsOnly = false;
|
2941 | break;
|
2942 | }
|
2943 | }
|
2944 | if (hasDefsOnly) {
|
2945 | break;
|
2946 | }
|
2947 | }
|
2948 | }
|
2949 |
|
2950 | if (item.isElem()) {
|
2951 | item.eachAttr(function(attr) {
|
2952 | var key, match;
|
2953 |
|
2954 |
|
2955 | if (attr.name === 'id') {
|
2956 | key = attr.value;
|
2957 | if (IDs.has(key)) {
|
2958 | item.removeAttr('id');
|
2959 | } else {
|
2960 | IDs.set(key, item);
|
2961 | }
|
2962 | return;
|
2963 | }
|
2964 |
|
2965 | if (referencesProps$1.has(attr.name) && (match = attr.value.match(regReferencesUrl))) {
|
2966 | key = match[2];
|
2967 | } else if (
|
2968 | attr.local === 'href' && (match = attr.value.match(regReferencesHref)) ||
|
2969 | attr.name === 'begin' && (match = attr.value.match(regReferencesBegin))
|
2970 | ) {
|
2971 | key = match[1];
|
2972 | }
|
2973 | if (key) {
|
2974 | var ref = referencesIDs.get(key) || [];
|
2975 | ref.push(attr);
|
2976 | referencesIDs.set(key, ref);
|
2977 | }
|
2978 | });
|
2979 | }
|
2980 |
|
2981 | if (item.content) {
|
2982 | monkeys(item);
|
2983 | }
|
2984 | }
|
2985 | return items;
|
2986 | }
|
2987 |
|
2988 | data = monkeys(data);
|
2989 |
|
2990 | if (hasStyleOrScript) {
|
2991 | return data;
|
2992 | }
|
2993 |
|
2994 | const idPreserved = id => preserveIDs.has(id) || idMatchesPrefix(preserveIDPrefixes, id);
|
2995 |
|
2996 | for (var ref of referencesIDs) {
|
2997 | var key = ref[0];
|
2998 |
|
2999 | if (IDs.has(key)) {
|
3000 |
|
3001 | if (params.minify && !idPreserved(key)) {
|
3002 | do {
|
3003 | currentIDstring = getIDstring(currentID = generateID(currentID), params);
|
3004 | } while (idPreserved(currentIDstring));
|
3005 |
|
3006 | IDs.get(key).attr('id').value = currentIDstring;
|
3007 |
|
3008 | for (var attr of ref[1]) {
|
3009 | attr.value = attr.value.includes(idValuePrefix) ?
|
3010 | attr.value.replace(idValuePrefix + key, idValuePrefix + currentIDstring) :
|
3011 | attr.value.replace(key + idValuePostfix, currentIDstring + idValuePostfix);
|
3012 | }
|
3013 | }
|
3014 |
|
3015 | IDs.delete(key);
|
3016 | }
|
3017 | }
|
3018 |
|
3019 | if (params.remove) {
|
3020 | for(var keyElem of IDs) {
|
3021 | if (!idPreserved(keyElem[0])) {
|
3022 | keyElem[1].removeAttr('id');
|
3023 | }
|
3024 | }
|
3025 | }
|
3026 | return data;
|
3027 | };
|
3028 |
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 |
|
3034 |
|
3035 |
|
3036 | function idMatchesPrefix(prefixArray, currentID) {
|
3037 | if (!currentID) return false;
|
3038 |
|
3039 | for (var prefix of prefixArray) if (currentID.startsWith(prefix)) return true;
|
3040 | return false;
|
3041 | }
|
3042 |
|
3043 |
|
3044 |
|
3045 |
|
3046 |
|
3047 |
|
3048 |
|
3049 | function generateID(currentID) {
|
3050 | if (!currentID) return [0];
|
3051 |
|
3052 | currentID[currentID.length - 1]++;
|
3053 |
|
3054 | for(var i = currentID.length - 1; i > 0; i--) {
|
3055 | if (currentID[i] > maxIDindex) {
|
3056 | currentID[i] = 0;
|
3057 |
|
3058 | if (currentID[i - 1] !== undefined) {
|
3059 | currentID[i - 1]++;
|
3060 | }
|
3061 | }
|
3062 | }
|
3063 | if (currentID[0] > maxIDindex) {
|
3064 | currentID[0] = 0;
|
3065 | currentID.unshift(0);
|
3066 | }
|
3067 | return currentID;
|
3068 | }
|
3069 |
|
3070 |
|
3071 |
|
3072 |
|
3073 |
|
3074 |
|
3075 |
|
3076 | function getIDstring(arr, params) {
|
3077 | var str = params.prefix;
|
3078 | return str + arr.map(i => generateIDchars[i]).join('');
|
3079 | }
|
3080 |
|
3081 | var cleanupIDs = {
|
3082 | type: type$4,
|
3083 | active: active$4,
|
3084 | description: description$4,
|
3085 | params: params$1,
|
3086 | fn: fn$4
|
3087 | };
|
3088 |
|
3089 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
3090 |
|
3091 | function getAugmentedNamespace(n) {
|
3092 | if (n.__esModule) return n;
|
3093 | var a = Object.defineProperty({}, '__esModule', {value: true});
|
3094 | Object.keys(n).forEach(function (k) {
|
3095 | var d = Object.getOwnPropertyDescriptor(n, k);
|
3096 | Object.defineProperty(a, k, d.get ? d : {
|
3097 | enumerable: true,
|
3098 | get: function () {
|
3099 | return n[k];
|
3100 | }
|
3101 | });
|
3102 | });
|
3103 | return a;
|
3104 | }
|
3105 |
|
3106 | function createCommonjsModule(fn) {
|
3107 | var module = { exports: {} };
|
3108 | return fn(module, module.exports), module.exports;
|
3109 | }
|
3110 |
|
3111 | var tools = createCommonjsModule(function (module, exports) {
|
3112 |
|
3113 |
|
3114 |
|
3115 |
|
3116 |
|
3117 |
|
3118 |
|
3119 |
|
3120 | exports.encodeSVGDatauri = function(str, type) {
|
3121 | var prefix = 'data:image/svg+xml';
|
3122 | if (!type || type === 'base64') {
|
3123 |
|
3124 | prefix += ';base64,';
|
3125 | if (Buffer.from) {
|
3126 | str = prefix + Buffer.from(str).toString('base64');
|
3127 | } else {
|
3128 | str = prefix + new Buffer(str).toString('base64');
|
3129 | }
|
3130 | } else if (type === 'enc') {
|
3131 |
|
3132 | str = prefix + ',' + encodeURIComponent(str);
|
3133 | } else if (type === 'unenc') {
|
3134 |
|
3135 | str = prefix + ',' + str;
|
3136 | }
|
3137 | return str;
|
3138 | };
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 | exports.decodeSVGDatauri = function(str) {
|
3147 | var regexp = /data:image\/svg\+xml(;charset=[^;,]*)?(;base64)?,(.*)/;
|
3148 | var match = regexp.exec(str);
|
3149 |
|
3150 |
|
3151 | if (!match) return str;
|
3152 |
|
3153 | var data = match[3];
|
3154 |
|
3155 | if (match[2]) {
|
3156 |
|
3157 | str = new Buffer(data, 'base64').toString('utf8');
|
3158 | } else if (data.charAt(0) === '%') {
|
3159 |
|
3160 | str = decodeURIComponent(data);
|
3161 | } else if (data.charAt(0) === '<') {
|
3162 |
|
3163 | str = data;
|
3164 | }
|
3165 | return str;
|
3166 | };
|
3167 |
|
3168 | exports.intersectArrays = function(a, b) {
|
3169 | return a.filter(function(n) {
|
3170 | return b.indexOf(n) > -1;
|
3171 | });
|
3172 | };
|
3173 |
|
3174 |
|
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 |
|
3182 |
|
3183 |
|
3184 |
|
3185 | exports.cleanupOutData = function(data, params, command) {
|
3186 | var str = '',
|
3187 | delimiter,
|
3188 | prev;
|
3189 |
|
3190 | data.forEach(function(item, i) {
|
3191 |
|
3192 | delimiter = ' ';
|
3193 |
|
3194 |
|
3195 | if (i == 0) delimiter = '';
|
3196 |
|
3197 |
|
3198 | if (params.noSpaceAfterFlags && (command == 'A' || command == 'a')) {
|
3199 | var pos = i % 7;
|
3200 | if (pos == 4 || pos == 5) delimiter = '';
|
3201 | }
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 | if (params.leadingZero) {
|
3207 | item = removeLeadingZero(item);
|
3208 | }
|
3209 |
|
3210 |
|
3211 |
|
3212 | if (
|
3213 | params.negativeExtraSpace &&
|
3214 | delimiter != '' &&
|
3215 | (item < 0 ||
|
3216 | (String(item).charCodeAt(0) == 46 && prev % 1 !== 0)
|
3217 | )
|
3218 | ) {
|
3219 | delimiter = '';
|
3220 | }
|
3221 |
|
3222 | prev = item;
|
3223 | str += delimiter + item;
|
3224 | });
|
3225 | return str;
|
3226 | };
|
3227 |
|
3228 |
|
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 | var removeLeadingZero = exports.removeLeadingZero = function(num) {
|
3242 | var strNum = num.toString();
|
3243 |
|
3244 | if (0 < num && num < 1 && strNum.charCodeAt(0) == 48) {
|
3245 | strNum = strNum.slice(1);
|
3246 | } else if (-1 < num && num < 0 && strNum.charCodeAt(1) == 48) {
|
3247 | strNum = strNum.charAt(0) + strNum.slice(2);
|
3248 | }
|
3249 | return strNum;
|
3250 | };
|
3251 | });
|
3252 |
|
3253 | var type$5 = 'perItem';
|
3254 |
|
3255 | var active$5 = false;
|
3256 |
|
3257 | var description$5 = 'rounds list of values to the fixed precision';
|
3258 |
|
3259 | var params$2 = {
|
3260 | floatPrecision: 3,
|
3261 | leadingZero: true,
|
3262 | defaultPx: true,
|
3263 | convertToPx: true
|
3264 | };
|
3265 |
|
3266 | var regNumericValues = /^([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/,
|
3267 | regSeparator = /\s+,?\s*|,\s*/,
|
3268 | removeLeadingZero = tools.removeLeadingZero,
|
3269 | absoluteLengths = {
|
3270 | cm: 96/2.54,
|
3271 | mm: 96/25.4,
|
3272 | in: 96,
|
3273 | pt: 4/3,
|
3274 | pc: 16
|
3275 | };
|
3276 |
|
3277 |
|
3278 |
|
3279 |
|
3280 |
|
3281 |
|
3282 |
|
3283 |
|
3284 |
|
3285 |
|
3286 |
|
3287 |
|
3288 |
|
3289 |
|
3290 |
|
3291 |
|
3292 |
|
3293 |
|
3294 |
|
3295 |
|
3296 |
|
3297 | var fn$5 = function(item, params) {
|
3298 |
|
3299 |
|
3300 | if ( item.hasAttr('points') ) {
|
3301 | roundValues(item.attrs.points);
|
3302 | }
|
3303 |
|
3304 | if ( item.hasAttr('enable-background') ) {
|
3305 | roundValues(item.attrs['enable-background']);
|
3306 | }
|
3307 |
|
3308 | if ( item.hasAttr('viewBox') ) {
|
3309 | roundValues(item.attrs.viewBox);
|
3310 | }
|
3311 |
|
3312 | if ( item.hasAttr('stroke-dasharray') ) {
|
3313 | roundValues(item.attrs['stroke-dasharray']);
|
3314 | }
|
3315 |
|
3316 | if ( item.hasAttr('dx') ) {
|
3317 | roundValues(item.attrs.dx);
|
3318 | }
|
3319 |
|
3320 | if ( item.hasAttr('dy') ) {
|
3321 | roundValues(item.attrs.dy);
|
3322 | }
|
3323 |
|
3324 | if ( item.hasAttr('x') ) {
|
3325 | roundValues(item.attrs.x);
|
3326 | }
|
3327 |
|
3328 | if ( item.hasAttr('y') ) {
|
3329 | roundValues(item.attrs.y);
|
3330 | }
|
3331 |
|
3332 |
|
3333 | function roundValues($prop){
|
3334 |
|
3335 | var num, units,
|
3336 | match,
|
3337 | matchNew,
|
3338 | lists = $prop.value,
|
3339 | listsArr = lists.split(regSeparator),
|
3340 | roundedListArr = [],
|
3341 | roundedList;
|
3342 |
|
3343 | listsArr.forEach(function(elem){
|
3344 |
|
3345 | match = elem.match(regNumericValues);
|
3346 | matchNew = elem.match(/new/);
|
3347 |
|
3348 |
|
3349 | if (match) {
|
3350 |
|
3351 | num = +(+match[1]).toFixed(params.floatPrecision),
|
3352 | units = match[3] || '';
|
3353 |
|
3354 |
|
3355 | if (params.convertToPx && units && (units in absoluteLengths)) {
|
3356 | var pxNum = +(absoluteLengths[units] * match[1]).toFixed(params.floatPrecision);
|
3357 |
|
3358 | if (String(pxNum).length < match[0].length)
|
3359 | num = pxNum,
|
3360 | units = 'px';
|
3361 | }
|
3362 |
|
3363 |
|
3364 | if (params.leadingZero) {
|
3365 | num = removeLeadingZero(num);
|
3366 | }
|
3367 |
|
3368 |
|
3369 | if (params.defaultPx && units === 'px') {
|
3370 | units = '';
|
3371 | }
|
3372 |
|
3373 | roundedListArr.push(num+units);
|
3374 | }
|
3375 |
|
3376 | else if (matchNew) {
|
3377 | roundedListArr.push('new');
|
3378 | } else if (elem) {
|
3379 | roundedListArr.push(elem);
|
3380 | }
|
3381 |
|
3382 | });
|
3383 |
|
3384 | roundedList = roundedListArr.join(' ');
|
3385 | $prop.value = roundedList;
|
3386 |
|
3387 | }
|
3388 |
|
3389 | };
|
3390 |
|
3391 | var cleanupListOfValues = {
|
3392 | type: type$5,
|
3393 | active: active$5,
|
3394 | description: description$5,
|
3395 | params: params$2,
|
3396 | fn: fn$5
|
3397 | };
|
3398 |
|
3399 | var type$6 = 'perItem';
|
3400 |
|
3401 | var active$6 = true;
|
3402 |
|
3403 | var description$6 = 'rounds numeric values to the fixed precision, removes default ‘px’ units';
|
3404 |
|
3405 | var params$3 = {
|
3406 | floatPrecision: 3,
|
3407 | leadingZero: true,
|
3408 | defaultPx: true,
|
3409 | convertToPx: true
|
3410 | };
|
3411 |
|
3412 | var regNumericValues$1 = /^([\-+]?\d*\.?\d+([eE][\-+]?\d+)?)(px|pt|pc|mm|cm|m|in|ft|em|ex|%)?$/,
|
3413 | removeLeadingZero$1 = tools.removeLeadingZero,
|
3414 | absoluteLengths$1 = {
|
3415 | cm: 96/2.54,
|
3416 | mm: 96/25.4,
|
3417 | in: 96,
|
3418 | pt: 4/3,
|
3419 | pc: 16
|
3420 | };
|
3421 |
|
3422 |
|
3423 |
|
3424 |
|
3425 |
|
3426 |
|
3427 |
|
3428 |
|
3429 |
|
3430 |
|
3431 |
|
3432 | var fn$6 = function(item, params) {
|
3433 |
|
3434 | if (item.isElem()) {
|
3435 |
|
3436 | var floatPrecision = params.floatPrecision;
|
3437 |
|
3438 | if (item.hasAttr('viewBox')) {
|
3439 | var nums = item.attr('viewBox').value.split(/\s,?\s*|,\s*/g);
|
3440 | item.attr('viewBox').value = nums.map(function(value) {
|
3441 | var num = +value;
|
3442 | return isNaN(num) ? value : +num.toFixed(floatPrecision);
|
3443 | }).join(' ');
|
3444 | }
|
3445 |
|
3446 | item.eachAttr(function(attr) {
|
3447 |
|
3448 | if (attr.name === 'version') { return }
|
3449 |
|
3450 | var match = attr.value.match(regNumericValues$1);
|
3451 |
|
3452 |
|
3453 | if (match) {
|
3454 |
|
3455 | var num = +(+match[1]).toFixed(floatPrecision),
|
3456 | units = match[3] || '';
|
3457 |
|
3458 |
|
3459 | if (params.convertToPx && units && (units in absoluteLengths$1)) {
|
3460 | var pxNum = +(absoluteLengths$1[units] * match[1]).toFixed(floatPrecision);
|
3461 |
|
3462 | if (String(pxNum).length < match[0].length) {
|
3463 | num = pxNum;
|
3464 | units = 'px';
|
3465 | }
|
3466 | }
|
3467 |
|
3468 |
|
3469 | if (params.leadingZero) {
|
3470 | num = removeLeadingZero$1(num);
|
3471 | }
|
3472 |
|
3473 |
|
3474 | if (params.defaultPx && units === 'px') {
|
3475 | units = '';
|
3476 | }
|
3477 |
|
3478 | attr.value = num + units;
|
3479 | }
|
3480 | });
|
3481 |
|
3482 | }
|
3483 |
|
3484 | };
|
3485 |
|
3486 | var cleanupNumericValues = {
|
3487 | type: type$6,
|
3488 | active: active$6,
|
3489 | description: description$6,
|
3490 | params: params$3,
|
3491 | fn: fn$6
|
3492 | };
|
3493 |
|
3494 | var type$7 = 'perItemReverse';
|
3495 |
|
3496 | var active$7 = true;
|
3497 |
|
3498 | var description$7 = 'collapses useless groups';
|
3499 |
|
3500 | var attrsInheritable = _collections.inheritableAttrs,
|
3501 | animationElems = _collections.elemsGroups.animation;
|
3502 |
|
3503 | function hasAnimatedAttr(item) {
|
3504 |
|
3505 | return item.isElem(animationElems) && item.hasAttr('attributeName', this) ||
|
3506 | !item.isEmpty() && item.content.some(hasAnimatedAttr, this);
|
3507 | }
|
3508 |
|
3509 |
|
3510 |
|
3511 |
|
3512 |
|
3513 |
|
3514 |
|
3515 |
|
3516 |
|
3517 |
|
3518 |
|
3519 |
|
3520 |
|
3521 |
|
3522 |
|
3523 |
|
3524 |
|
3525 |
|
3526 |
|
3527 |
|
3528 |
|
3529 |
|
3530 |
|
3531 |
|
3532 | var fn$7 = function(item) {
|
3533 |
|
3534 |
|
3535 | if (item.isElem() && !item.isElem('switch') && !item.isEmpty()) {
|
3536 | item.content.forEach(function(g, i) {
|
3537 |
|
3538 | if (g.isElem('g') && !g.isEmpty()) {
|
3539 |
|
3540 | if (g.hasAttr() && g.content.length === 1) {
|
3541 | var inner = g.content[0];
|
3542 |
|
3543 | if (inner.isElem() && !inner.hasAttr('id') && !g.hasAttr('filter') &&
|
3544 | !(g.hasAttr('class') && inner.hasAttr('class')) && (
|
3545 | !g.hasAttr('clip-path') && !g.hasAttr('mask') ||
|
3546 | inner.isElem('g') && !g.hasAttr('transform') && !inner.hasAttr('transform')
|
3547 | )
|
3548 | ) {
|
3549 | g.eachAttr(function(attr) {
|
3550 | if (g.content.some(hasAnimatedAttr, attr.name)) return;
|
3551 |
|
3552 | if (!inner.hasAttr(attr.name)) {
|
3553 | inner.addAttr(attr);
|
3554 | } else if (attr.name == 'transform') {
|
3555 | inner.attr(attr.name).value = attr.value + ' ' + inner.attr(attr.name).value;
|
3556 | } else if (inner.hasAttr(attr.name, 'inherit')) {
|
3557 | inner.attr(attr.name).value = attr.value;
|
3558 | } else if (
|
3559 | attrsInheritable.indexOf(attr.name) < 0 &&
|
3560 | !inner.hasAttr(attr.name, attr.value)
|
3561 | ) {
|
3562 | return;
|
3563 | }
|
3564 |
|
3565 | g.removeAttr(attr.name);
|
3566 | });
|
3567 | }
|
3568 | }
|
3569 |
|
3570 |
|
3571 | if (!g.hasAttr() && !g.content.some(function(item) { return item.isElem(animationElems) })) {
|
3572 | item.spliceContent(i, 1, g.content);
|
3573 | }
|
3574 | }
|
3575 | });
|
3576 | }
|
3577 | };
|
3578 |
|
3579 | var collapseGroups = {
|
3580 | type: type$7,
|
3581 | active: active$7,
|
3582 | description: description$7,
|
3583 | fn: fn$7
|
3584 | };
|
3585 |
|
3586 | var type$8 = 'perItem';
|
3587 |
|
3588 | var active$8 = true;
|
3589 |
|
3590 | var description$8 = 'converts colors: rgb() to #rrggbb and #rrggbb to #rgb';
|
3591 |
|
3592 | var params$4 = {
|
3593 | currentColor: false,
|
3594 | names2hex: true,
|
3595 | rgb2hex: true,
|
3596 | shorthex: true,
|
3597 | shortname: true
|
3598 | };
|
3599 |
|
3600 | var rNumber = '([+-]?(?:\\d*\\.\\d+|\\d+\\.?)%?)',
|
3601 | rComma = '\\s*,\\s*',
|
3602 | regRGB = new RegExp('^rgb\\(\\s*' + rNumber + rComma + rNumber + rComma + rNumber + '\\s*\\)$'),
|
3603 | regHEX = /^\#(([a-fA-F0-9])\2){3}$/,
|
3604 | none = /\bnone\b/i;
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 |
|
3610 |
|
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 |
|
3616 |
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 |
|
3622 |
|
3623 |
|
3624 |
|
3625 |
|
3626 |
|
3627 |
|
3628 |
|
3629 |
|
3630 |
|
3631 |
|
3632 | var fn$8 = function(item, params) {
|
3633 |
|
3634 | if (item.elem) {
|
3635 |
|
3636 | item.eachAttr(function(attr) {
|
3637 |
|
3638 | if (_collections.colorsProps.indexOf(attr.name) > -1) {
|
3639 |
|
3640 | var val = attr.value,
|
3641 | match;
|
3642 |
|
3643 |
|
3644 | if (params.currentColor) {
|
3645 | if (typeof params.currentColor === 'string') {
|
3646 | match = val === params.currentColor;
|
3647 | } else if (params.currentColor.exec) {
|
3648 | match = params.currentColor.exec(val);
|
3649 | } else {
|
3650 | match = !val.match(none);
|
3651 | }
|
3652 | if (match) {
|
3653 | val = 'currentColor';
|
3654 | }
|
3655 | }
|
3656 |
|
3657 |
|
3658 | if (params.names2hex && val.toLowerCase() in _collections.colorsNames) {
|
3659 | val = _collections.colorsNames[val.toLowerCase()];
|
3660 | }
|
3661 |
|
3662 |
|
3663 | if (params.rgb2hex && (match = val.match(regRGB))) {
|
3664 | match = match.slice(1, 4).map(function(m) {
|
3665 | if (m.indexOf('%') > -1)
|
3666 | m = Math.round(parseFloat(m) * 2.55);
|
3667 |
|
3668 | return Math.max(0, Math.min(m, 255));
|
3669 | });
|
3670 |
|
3671 | val = rgb2hex(match);
|
3672 | }
|
3673 |
|
3674 |
|
3675 | if (params.shorthex && (match = val.match(regHEX))) {
|
3676 | val = '#' + match[0][1] + match[0][3] + match[0][5];
|
3677 | }
|
3678 |
|
3679 |
|
3680 | if (params.shortname) {
|
3681 | var lowerVal = val.toLowerCase();
|
3682 | if (lowerVal in _collections.colorsShortNames) {
|
3683 | val = _collections.colorsShortNames[lowerVal];
|
3684 | }
|
3685 | }
|
3686 |
|
3687 | attr.value = val;
|
3688 |
|
3689 | }
|
3690 |
|
3691 | });
|
3692 |
|
3693 | }
|
3694 |
|
3695 | };
|
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 |
|
3701 |
|
3702 |
|
3703 |
|
3704 |
|
3705 |
|
3706 |
|
3707 |
|
3708 |
|
3709 |
|
3710 | function rgb2hex(rgb) {
|
3711 | return '#' + ('00000' + (rgb[0] << 16 | rgb[1] << 8 | rgb[2]).toString(16)).slice(-6).toUpperCase();
|
3712 | }
|
3713 |
|
3714 | var convertColors = {
|
3715 | type: type$8,
|
3716 | active: active$8,
|
3717 | description: description$8,
|
3718 | params: params$4,
|
3719 | fn: fn$8
|
3720 | };
|
3721 |
|
3722 | var type$9 = 'perItem';
|
3723 |
|
3724 | var active$9 = true;
|
3725 |
|
3726 | var description$9 = 'converts non-eccentric <ellipse>s to <circle>s';
|
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 |
|
3732 |
|
3733 |
|
3734 |
|
3735 |
|
3736 |
|
3737 |
|
3738 | var fn$9 = function(item) {
|
3739 | if (item.isElem('ellipse')) {
|
3740 | var rx = item.attr('rx').value || 0;
|
3741 | var ry = item.attr('ry').value || 0;
|
3742 |
|
3743 | if (rx === ry ||
|
3744 | rx === 'auto' || ry === 'auto'
|
3745 | ) {
|
3746 | var radius = rx !== 'auto' ? rx : ry;
|
3747 | item.renameElem('circle');
|
3748 | item.removeAttr(['rx', 'ry']);
|
3749 | item.addAttr({
|
3750 | name: 'r',
|
3751 | value: radius,
|
3752 | prefix: '',
|
3753 | local: 'r',
|
3754 | });
|
3755 | }
|
3756 | }
|
3757 | return;
|
3758 | };
|
3759 |
|
3760 | var convertEllipseToCircle = {
|
3761 | type: type$9,
|
3762 | active: active$9,
|
3763 | description: description$9,
|
3764 | fn: fn$9
|
3765 | };
|
3766 |
|
3767 | var _transforms = createCommonjsModule(function (module, exports) {
|
3768 |
|
3769 | var regTransformTypes = /matrix|translate|scale|rotate|skewX|skewY/,
|
3770 | regTransformSplit = /\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,
|
3771 | regNumericValues = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
|
3772 |
|
3773 |
|
3774 |
|
3775 |
|
3776 |
|
3777 |
|
3778 |
|
3779 |
|
3780 | exports.transform2js = function(transformString) {
|
3781 |
|
3782 |
|
3783 | var transforms = [],
|
3784 |
|
3785 | current;
|
3786 |
|
3787 |
|
3788 | transformString.split(regTransformSplit).forEach(function(item) {
|
3789 |
|
3790 | var num;
|
3791 |
|
3792 | if (item) {
|
3793 |
|
3794 | if (regTransformTypes.test(item)) {
|
3795 |
|
3796 | transforms.push(current = { name: item });
|
3797 |
|
3798 | } else {
|
3799 |
|
3800 | while (num = regNumericValues.exec(item)) {
|
3801 | num = Number(num);
|
3802 | if (current.data)
|
3803 | current.data.push(num);
|
3804 | else
|
3805 | current.data = [num];
|
3806 | }
|
3807 | }
|
3808 | }
|
3809 | });
|
3810 |
|
3811 |
|
3812 | return current && current.data ? transforms : [];
|
3813 | };
|
3814 |
|
3815 |
|
3816 |
|
3817 |
|
3818 |
|
3819 |
|
3820 |
|
3821 | exports.transformsMultiply = function(transforms) {
|
3822 |
|
3823 |
|
3824 | transforms = transforms.map(function(transform) {
|
3825 | if (transform.name === 'matrix') {
|
3826 | return transform.data;
|
3827 | }
|
3828 | return transformToMatrix(transform);
|
3829 | });
|
3830 |
|
3831 |
|
3832 | transforms = {
|
3833 | name: 'matrix',
|
3834 | data: transforms.length > 0 ? transforms.reduce(multiplyTransformMatrices) : []
|
3835 | };
|
3836 |
|
3837 | return transforms;
|
3838 |
|
3839 | };
|
3840 |
|
3841 |
|
3842 |
|
3843 |
|
3844 |
|
3845 |
|
3846 | var mth = exports.mth = {
|
3847 |
|
3848 | rad: function(deg) {
|
3849 | return deg * Math.PI / 180;
|
3850 | },
|
3851 |
|
3852 | deg: function(rad) {
|
3853 | return rad * 180 / Math.PI;
|
3854 | },
|
3855 |
|
3856 | cos: function(deg) {
|
3857 | return Math.cos(this.rad(deg));
|
3858 | },
|
3859 |
|
3860 | acos: function(val, floatPrecision) {
|
3861 | return +(this.deg(Math.acos(val)).toFixed(floatPrecision));
|
3862 | },
|
3863 |
|
3864 | sin: function(deg) {
|
3865 | return Math.sin(this.rad(deg));
|
3866 | },
|
3867 |
|
3868 | asin: function(val, floatPrecision) {
|
3869 | return +(this.deg(Math.asin(val)).toFixed(floatPrecision));
|
3870 | },
|
3871 |
|
3872 | tan: function(deg) {
|
3873 | return Math.tan(this.rad(deg));
|
3874 | },
|
3875 |
|
3876 | atan: function(val, floatPrecision) {
|
3877 | return +(this.deg(Math.atan(val)).toFixed(floatPrecision));
|
3878 | }
|
3879 |
|
3880 | };
|
3881 |
|
3882 |
|
3883 |
|
3884 |
|
3885 |
|
3886 |
|
3887 |
|
3888 |
|
3889 | exports.matrixToTransform = function(transform, params) {
|
3890 | var floatPrecision = params.floatPrecision,
|
3891 | data = transform.data,
|
3892 | transforms = [],
|
3893 | sx = +Math.hypot(data[0], data[1]).toFixed(params.transformPrecision),
|
3894 | sy = +((data[0] * data[3] - data[1] * data[2]) / sx).toFixed(params.transformPrecision),
|
3895 | colsSum = data[0] * data[2] + data[1] * data[3],
|
3896 | rowsSum = data[0] * data[1] + data[2] * data[3],
|
3897 | scaleBefore = rowsSum != 0 || sx == sy;
|
3898 |
|
3899 |
|
3900 | if (data[4] || data[5]) {
|
3901 | transforms.push({ name: 'translate', data: data.slice(4, data[5] ? 6 : 5) });
|
3902 | }
|
3903 |
|
3904 |
|
3905 | if (!data[1] && data[2]) {
|
3906 | transforms.push({ name: 'skewX', data: [mth.atan(data[2] / sy, floatPrecision)] });
|
3907 |
|
3908 |
|
3909 | } else if (data[1] && !data[2]) {
|
3910 | transforms.push({ name: 'skewY', data: [mth.atan(data[1] / data[0], floatPrecision)] });
|
3911 | sx = data[0];
|
3912 | sy = data[3];
|
3913 |
|
3914 |
|
3915 |
|
3916 | } else if (!colsSum || (sx == 1 && sy == 1) || !scaleBefore) {
|
3917 | if (!scaleBefore) {
|
3918 | sx = (data[0] < 0 ? -1 : 1) * Math.hypot(data[0], data[2]);
|
3919 | sy = (data[3] < 0 ? -1 : 1) * Math.hypot(data[1], data[3]);
|
3920 | transforms.push({ name: 'scale', data: [sx, sy] });
|
3921 | }
|
3922 | var angle = Math.min(Math.max(-1, data[0] / sx), 1),
|
3923 | rotate = [mth.acos(angle, floatPrecision) * ((scaleBefore ? 1 : sy) * data[1] < 0 ? -1 : 1)];
|
3924 |
|
3925 | if (rotate[0]) transforms.push({ name: 'rotate', data: rotate });
|
3926 |
|
3927 | if (rowsSum && colsSum) transforms.push({
|
3928 | name: 'skewX',
|
3929 | data: [mth.atan(colsSum / (sx * sx), floatPrecision)]
|
3930 | });
|
3931 |
|
3932 |
|
3933 | if (rotate[0] && (data[4] || data[5])) {
|
3934 | transforms.shift();
|
3935 | var cos = data[0] / sx,
|
3936 | sin = data[1] / (scaleBefore ? sx : sy),
|
3937 | x = data[4] * (scaleBefore || sy),
|
3938 | y = data[5] * (scaleBefore || sx),
|
3939 | denom = (Math.pow(1 - cos, 2) + Math.pow(sin, 2)) * (scaleBefore || sx * sy);
|
3940 | rotate.push(((1 - cos) * x - sin * y) / denom);
|
3941 | rotate.push(((1 - cos) * y + sin * x) / denom);
|
3942 | }
|
3943 |
|
3944 |
|
3945 | } else if (data[1] || data[2]) {
|
3946 | return transform;
|
3947 | }
|
3948 |
|
3949 | if (scaleBefore && (sx != 1 || sy != 1) || !transforms.length) transforms.push({
|
3950 | name: 'scale',
|
3951 | data: sx == sy ? [sx] : [sx, sy]
|
3952 | });
|
3953 |
|
3954 | return transforms;
|
3955 | };
|
3956 |
|
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 |
|
3963 | function transformToMatrix(transform) {
|
3964 |
|
3965 | if (transform.name === 'matrix') return transform.data;
|
3966 |
|
3967 | var matrix;
|
3968 |
|
3969 | switch (transform.name) {
|
3970 | case 'translate':
|
3971 |
|
3972 | matrix = [1, 0, 0, 1, transform.data[0], transform.data[1] || 0];
|
3973 | break;
|
3974 | case 'scale':
|
3975 |
|
3976 | matrix = [transform.data[0], 0, 0, transform.data[1] || transform.data[0], 0, 0];
|
3977 | break;
|
3978 | case 'rotate':
|
3979 |
|
3980 | var cos = mth.cos(transform.data[0]),
|
3981 | sin = mth.sin(transform.data[0]),
|
3982 | cx = transform.data[1] || 0,
|
3983 | cy = transform.data[2] || 0;
|
3984 |
|
3985 | matrix = [cos, sin, -sin, cos, (1 - cos) * cx + sin * cy, (1 - cos) * cy - sin * cx];
|
3986 | break;
|
3987 | case 'skewX':
|
3988 |
|
3989 | matrix = [1, 0, mth.tan(transform.data[0]), 1, 0, 0];
|
3990 | break;
|
3991 | case 'skewY':
|
3992 |
|
3993 | matrix = [1, mth.tan(transform.data[0]), 0, 1, 0, 0];
|
3994 | break;
|
3995 | }
|
3996 |
|
3997 | return matrix;
|
3998 |
|
3999 | }
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 |
|
4010 |
|
4011 | exports.transformArc = function(arc, transform) {
|
4012 |
|
4013 | var a = arc[0],
|
4014 | b = arc[1],
|
4015 | rot = arc[2] * Math.PI / 180,
|
4016 | cos = Math.cos(rot),
|
4017 | sin = Math.sin(rot),
|
4018 | h = Math.pow(arc[5] * cos + arc[6] * sin, 2) / (4 * a * a) +
|
4019 | Math.pow(arc[6] * cos - arc[5] * sin, 2) / (4 * b * b);
|
4020 | if (h > 1) {
|
4021 | h = Math.sqrt(h);
|
4022 | a *= h;
|
4023 | b *= h;
|
4024 | }
|
4025 | var ellipse = [a * cos, a * sin, -b * sin, b * cos, 0, 0],
|
4026 | m = multiplyTransformMatrices(transform, ellipse),
|
4027 |
|
4028 | lastCol = m[2] * m[2] + m[3] * m[3],
|
4029 | squareSum = m[0] * m[0] + m[1] * m[1] + lastCol,
|
4030 | root = Math.hypot(m[0] - m[3], m[1] + m[2]) * Math.hypot(m[0] + m[3], m[1] - m[2]);
|
4031 |
|
4032 | if (!root) {
|
4033 | arc[0] = arc[1] = Math.sqrt(squareSum / 2);
|
4034 | arc[2] = 0;
|
4035 | } else {
|
4036 | var majorAxisSqr = (squareSum + root) / 2,
|
4037 | minorAxisSqr = (squareSum - root) / 2,
|
4038 | major = Math.abs(majorAxisSqr - lastCol) > 1e-6,
|
4039 | sub = (major ? majorAxisSqr : minorAxisSqr) - lastCol,
|
4040 | rowsSum = m[0] * m[2] + m[1] * m[3],
|
4041 | term1 = m[0] * sub + m[2] * rowsSum,
|
4042 | term2 = m[1] * sub + m[3] * rowsSum;
|
4043 | arc[0] = Math.sqrt(majorAxisSqr);
|
4044 | arc[1] = Math.sqrt(minorAxisSqr);
|
4045 | arc[2] = ((major ? term2 < 0 : term1 > 0) ? -1 : 1) *
|
4046 | Math.acos((major ? term1 : term2) / Math.hypot(term1, term2)) * 180 / Math.PI;
|
4047 | }
|
4048 |
|
4049 | if ((transform[0] < 0) !== (transform[3] < 0)) {
|
4050 |
|
4051 | arc[4] = 1 - arc[4];
|
4052 | }
|
4053 |
|
4054 | return arc;
|
4055 |
|
4056 | };
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 |
|
4064 |
|
4065 | function multiplyTransformMatrices(a, b) {
|
4066 |
|
4067 | return [
|
4068 | a[0] * b[0] + a[2] * b[1],
|
4069 | a[1] * b[0] + a[3] * b[1],
|
4070 | a[0] * b[2] + a[2] * b[3],
|
4071 | a[1] * b[2] + a[3] * b[3],
|
4072 | a[0] * b[4] + a[2] * b[5] + a[4],
|
4073 | a[1] * b[4] + a[3] * b[5] + a[5]
|
4074 | ];
|
4075 |
|
4076 | }
|
4077 | });
|
4078 |
|
4079 |
|
4080 |
|
4081 | var _path = createCommonjsModule(function (module, exports) {
|
4082 |
|
4083 | var rNumber = String.raw`[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?\s*`,
|
4084 | rCommaWsp = String.raw`(?:\s,?\s*|,\s*)`,
|
4085 | rNumberCommaWsp = `(${rNumber})` + rCommaWsp,
|
4086 | rFlagCommaWsp = `([01])${rCommaWsp}?`,
|
4087 | rCoordinatePair = String.raw`(${rNumber})${rCommaWsp}?(${rNumber})`,
|
4088 | rArcSeq = (rNumberCommaWsp + '?').repeat(2) + rNumberCommaWsp + rFlagCommaWsp.repeat(2) + rCoordinatePair;
|
4089 |
|
4090 | var regPathInstructions = /([MmLlHhVvCcSsQqTtAaZz])\s*/,
|
4091 | regCoordinateSequence = new RegExp(rNumber, 'g'),
|
4092 | regArcArgumentSequence = new RegExp(rArcSeq, 'g'),
|
4093 | regNumericValues = /[-+]?(\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/,
|
4094 | transform2js = _transforms.transform2js,
|
4095 | transformsMultiply = _transforms.transformsMultiply,
|
4096 | transformArc = _transforms.transformArc,
|
4097 | referencesProps = _collections.referencesProps,
|
4098 | defaultStrokeWidth = _collections.attrsGroupsDefaults.presentation['stroke-width'],
|
4099 | cleanupOutData = tools.cleanupOutData,
|
4100 | removeLeadingZero = tools.removeLeadingZero,
|
4101 | prevCtrlPoint;
|
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 | exports.path2js = function(path) {
|
4111 | if (path.pathJS) return path.pathJS;
|
4112 |
|
4113 | var paramsLength = {
|
4114 | H: 1, V: 1, M: 2, L: 2, T: 2, Q: 4, S: 4, C: 6, A: 7,
|
4115 | h: 1, v: 1, m: 2, l: 2, t: 2, q: 4, s: 4, c: 6, a: 7
|
4116 | },
|
4117 | pathData = [],
|
4118 | instruction,
|
4119 | startMoveto = false;
|
4120 |
|
4121 |
|
4122 | path.attr('d').value.split(regPathInstructions).forEach(function(data) {
|
4123 | if (!data) return;
|
4124 | if (!startMoveto) {
|
4125 | if (data == 'M' || data == 'm') {
|
4126 | startMoveto = true;
|
4127 | } else return;
|
4128 | }
|
4129 |
|
4130 |
|
4131 | if (regPathInstructions.test(data)) {
|
4132 | instruction = data;
|
4133 |
|
4134 |
|
4135 | if (instruction == 'Z' || instruction == 'z') {
|
4136 | pathData.push({
|
4137 | instruction: 'z'
|
4138 | });
|
4139 | }
|
4140 |
|
4141 | } else {
|
4142 |
|
4143 | if (instruction == 'A' || instruction == 'a') {
|
4144 | var newData = [];
|
4145 | for (var args; (args = regArcArgumentSequence.exec(data));) {
|
4146 | for (var i = 1; i < args.length; i++) {
|
4147 | newData.push(args[i]);
|
4148 | }
|
4149 | }
|
4150 | data = newData;
|
4151 | } else {
|
4152 | data = data.match(regCoordinateSequence);
|
4153 | }
|
4154 | if (!data) return;
|
4155 |
|
4156 | data = data.map(Number);
|
4157 |
|
4158 |
|
4159 | if (instruction == 'M' || instruction == 'm') {
|
4160 | pathData.push({
|
4161 | instruction: pathData.length == 0 ? 'M' : instruction,
|
4162 | data: data.splice(0, 2)
|
4163 | });
|
4164 | instruction = instruction == 'M' ? 'L' : 'l';
|
4165 | }
|
4166 |
|
4167 | for (var pair = paramsLength[instruction]; data.length;) {
|
4168 | pathData.push({
|
4169 | instruction: instruction,
|
4170 | data: data.splice(0, pair)
|
4171 | });
|
4172 | }
|
4173 | }
|
4174 | });
|
4175 |
|
4176 |
|
4177 | if (pathData.length && pathData[0].instruction == 'm') {
|
4178 | pathData[0].instruction = 'M';
|
4179 | }
|
4180 | path.pathJS = pathData;
|
4181 |
|
4182 | return pathData;
|
4183 | };
|
4184 |
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 | var relative2absolute = exports.relative2absolute = function(data) {
|
4192 | var currentPoint = [0, 0],
|
4193 | subpathPoint = [0, 0],
|
4194 | i;
|
4195 |
|
4196 | return data.map(function(item) {
|
4197 |
|
4198 | var instruction = item.instruction,
|
4199 | itemData = item.data && item.data.slice();
|
4200 |
|
4201 | if (instruction == 'M') {
|
4202 |
|
4203 | set(currentPoint, itemData);
|
4204 | set(subpathPoint, itemData);
|
4205 |
|
4206 | } else if ('mlcsqt'.indexOf(instruction) > -1) {
|
4207 |
|
4208 | for (i = 0; i < itemData.length; i++) {
|
4209 | itemData[i] += currentPoint[i % 2];
|
4210 | }
|
4211 | set(currentPoint, itemData);
|
4212 |
|
4213 | if (instruction == 'm') {
|
4214 | set(subpathPoint, itemData);
|
4215 | }
|
4216 |
|
4217 | } else if (instruction == 'a') {
|
4218 |
|
4219 | itemData[5] += currentPoint[0];
|
4220 | itemData[6] += currentPoint[1];
|
4221 | set(currentPoint, itemData);
|
4222 |
|
4223 | } else if (instruction == 'h') {
|
4224 |
|
4225 | itemData[0] += currentPoint[0];
|
4226 | currentPoint[0] = itemData[0];
|
4227 |
|
4228 | } else if (instruction == 'v') {
|
4229 |
|
4230 | itemData[0] += currentPoint[1];
|
4231 | currentPoint[1] = itemData[0];
|
4232 |
|
4233 | } else if ('MZLCSQTA'.indexOf(instruction) > -1) {
|
4234 |
|
4235 | set(currentPoint, itemData);
|
4236 |
|
4237 | } else if (instruction == 'H') {
|
4238 |
|
4239 | currentPoint[0] = itemData[0];
|
4240 |
|
4241 | } else if (instruction == 'V') {
|
4242 |
|
4243 | currentPoint[1] = itemData[0];
|
4244 |
|
4245 | } else if (instruction == 'z') {
|
4246 |
|
4247 | set(currentPoint, subpathPoint);
|
4248 |
|
4249 | }
|
4250 |
|
4251 | return instruction == 'z' ?
|
4252 | { instruction: 'z' } :
|
4253 | {
|
4254 | instruction: instruction.toUpperCase(),
|
4255 | data: itemData
|
4256 | };
|
4257 |
|
4258 | });
|
4259 | };
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 | exports.applyTransforms = function(elem, path, params) {
|
4270 |
|
4271 |
|
4272 | if (!elem.hasAttr('transform') || !elem.attr('transform').value ||
|
4273 | elem.someAttr(function(attr) {
|
4274 | return ~referencesProps.indexOf(attr.name) && ~attr.value.indexOf('url(');
|
4275 | }))
|
4276 | return path;
|
4277 |
|
4278 | var matrix = transformsMultiply(transform2js(elem.attr('transform').value)),
|
4279 | stroke = elem.computedAttr('stroke'),
|
4280 | id = elem.computedAttr('id'),
|
4281 | transformPrecision = params.transformPrecision,
|
4282 | newPoint, scale;
|
4283 |
|
4284 | if (stroke && stroke != 'none') {
|
4285 | if (!params.applyTransformsStroked ||
|
4286 | (matrix.data[0] != matrix.data[3] || matrix.data[1] != -matrix.data[2]) &&
|
4287 | (matrix.data[0] != -matrix.data[3] || matrix.data[1] != matrix.data[2]))
|
4288 | return path;
|
4289 |
|
4290 |
|
4291 | if (id) {
|
4292 | var idElem = elem,
|
4293 | hasStrokeWidth = false;
|
4294 |
|
4295 | do {
|
4296 | if (idElem.hasAttr('stroke-width')) hasStrokeWidth = true;
|
4297 | } while (!idElem.hasAttr('id', id) && !hasStrokeWidth && (idElem = idElem.parentNode));
|
4298 |
|
4299 | if (!hasStrokeWidth) return path;
|
4300 | }
|
4301 |
|
4302 | scale = +Math.sqrt(matrix.data[0] * matrix.data[0] + matrix.data[1] * matrix.data[1]).toFixed(transformPrecision);
|
4303 |
|
4304 | if (scale !== 1) {
|
4305 | var strokeWidth = elem.computedAttr('stroke-width') || defaultStrokeWidth;
|
4306 |
|
4307 | if (!elem.hasAttr('vector-effect') || elem.attr('vector-effect').value !== 'non-scaling-stroke') {
|
4308 | if (elem.hasAttr('stroke-width')) {
|
4309 | elem.attrs['stroke-width'].value = elem.attrs['stroke-width'].value.trim()
|
4310 | .replace(regNumericValues, function(num) {
|
4311 | return removeLeadingZero(num * scale);
|
4312 | });
|
4313 | } else {
|
4314 | elem.addAttr({
|
4315 | name: 'stroke-width',
|
4316 | prefix: '',
|
4317 | local: 'stroke-width',
|
4318 | value: strokeWidth.replace(regNumericValues, function(num) {
|
4319 | return removeLeadingZero(num * scale);
|
4320 | })
|
4321 | });
|
4322 | }
|
4323 | }
|
4324 | }
|
4325 | } else if (id) {
|
4326 | return path;
|
4327 | }
|
4328 |
|
4329 | path.forEach(function(pathItem) {
|
4330 |
|
4331 | if (pathItem.data) {
|
4332 |
|
4333 |
|
4334 | if (pathItem.instruction === 'h') {
|
4335 |
|
4336 | pathItem.instruction = 'l';
|
4337 | pathItem.data[1] = 0;
|
4338 |
|
4339 |
|
4340 | } else if (pathItem.instruction === 'v') {
|
4341 |
|
4342 | pathItem.instruction = 'l';
|
4343 | pathItem.data[1] = pathItem.data[0];
|
4344 | pathItem.data[0] = 0;
|
4345 |
|
4346 | }
|
4347 |
|
4348 |
|
4349 | if (pathItem.instruction === 'M' &&
|
4350 | (matrix.data[4] !== 0 ||
|
4351 | matrix.data[5] !== 0)
|
4352 | ) {
|
4353 |
|
4354 |
|
4355 | newPoint = transformPoint(matrix.data, pathItem.data[0], pathItem.data[1]);
|
4356 | set(pathItem.data, newPoint);
|
4357 | set(pathItem.coords, newPoint);
|
4358 |
|
4359 | // clear translate() data from transform matrix
|
4360 | matrix.data[4] = 0;
|
4361 | matrix.data[5] = 0;
|
4362 |
|
4363 | } else {
|
4364 |
|
4365 | if (pathItem.instruction == 'a') {
|
4366 |
|
4367 | transformArc(pathItem.data, matrix.data);
|
4368 |
|
4369 |
|
4370 | if (Math.abs(pathItem.data[2]) > 80) {
|
4371 | var a = pathItem.data[0],
|
4372 | rotation = pathItem.data[2];
|
4373 | pathItem.data[0] = pathItem.data[1];
|
4374 | pathItem.data[1] = a;
|
4375 | pathItem.data[2] = rotation + (rotation > 0 ? -90 : 90);
|
4376 | }
|
4377 |
|
4378 | newPoint = transformPoint(matrix.data, pathItem.data[5], pathItem.data[6]);
|
4379 | pathItem.data[5] = newPoint[0];
|
4380 | pathItem.data[6] = newPoint[1];
|
4381 |
|
4382 | } else {
|
4383 |
|
4384 | for (var i = 0; i < pathItem.data.length; i += 2) {
|
4385 | newPoint = transformPoint(matrix.data, pathItem.data[i], pathItem.data[i + 1]);
|
4386 | pathItem.data[i] = newPoint[0];
|
4387 | pathItem.data[i + 1] = newPoint[1];
|
4388 | }
|
4389 | }
|
4390 |
|
4391 | pathItem.coords[0] = pathItem.base[0] + pathItem.data[pathItem.data.length - 2];
|
4392 | pathItem.coords[1] = pathItem.base[1] + pathItem.data[pathItem.data.length - 1];
|
4393 |
|
4394 | }
|
4395 |
|
4396 | }
|
4397 |
|
4398 | });
|
4399 |
|
4400 |
|
4401 | elem.removeAttr('transform');
|
4402 |
|
4403 | return path;
|
4404 | };
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 | function transformPoint(matrix, x, y) {
|
4414 |
|
4415 | return [
|
4416 | matrix[0] * x + matrix[2] * y + matrix[4],
|
4417 | matrix[1] * x + matrix[3] * y + matrix[5]
|
4418 | ];
|
4419 |
|
4420 | }
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 |
|
4428 |
|
4429 |
|
4430 |
|
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 | exports.computeCubicBoundingBox = function(xa, ya, xb, yb, xc, yc, xd, yd) {
|
4439 |
|
4440 | var minx = Number.POSITIVE_INFINITY,
|
4441 | miny = Number.POSITIVE_INFINITY,
|
4442 | maxx = Number.NEGATIVE_INFINITY,
|
4443 | maxy = Number.NEGATIVE_INFINITY,
|
4444 | ts,
|
4445 | t,
|
4446 | x,
|
4447 | y,
|
4448 | i;
|
4449 |
|
4450 |
|
4451 | if (xa < minx) { minx = xa; }
|
4452 | if (xa > maxx) { maxx = xa; }
|
4453 | if (xd < minx) { minx= xd; }
|
4454 | if (xd > maxx) { maxx = xd; }
|
4455 |
|
4456 | ts = computeCubicFirstDerivativeRoots(xa, xb, xc, xd);
|
4457 |
|
4458 | for (i = 0; i < ts.length; i++) {
|
4459 |
|
4460 | t = ts[i];
|
4461 |
|
4462 | if (t >= 0 && t <= 1) {
|
4463 | x = computeCubicBaseValue(t, xa, xb, xc, xd);
|
4464 |
|
4465 |
|
4466 | if (x < minx) { minx = x; }
|
4467 | if (x > maxx) { maxx = x; }
|
4468 | }
|
4469 |
|
4470 | }
|
4471 |
|
4472 |
|
4473 | if (ya < miny) { miny = ya; }
|
4474 | if (ya > maxy) { maxy = ya; }
|
4475 | if (yd < miny) { miny = yd; }
|
4476 | if (yd > maxy) { maxy = yd; }
|
4477 |
|
4478 | ts = computeCubicFirstDerivativeRoots(ya, yb, yc, yd);
|
4479 |
|
4480 | for (i = 0; i < ts.length; i++) {
|
4481 |
|
4482 | t = ts[i];
|
4483 |
|
4484 | if (t >= 0 && t <= 1) {
|
4485 |
|
4486 | y = computeCubicBaseValue(t, ya, yb, yc, yd);
|
4487 |
|
4488 | if (y < miny) { miny = y; }
|
4489 | if (y > maxy) { maxy = y; }
|
4490 | }
|
4491 |
|
4492 | }
|
4493 |
|
4494 | return {
|
4495 | minx: minx,
|
4496 | miny: miny,
|
4497 | maxx: maxx,
|
4498 | maxy: maxy
|
4499 | };
|
4500 |
|
4501 | };
|
4502 |
|
4503 |
|
4504 | function computeCubicBaseValue(t, a, b, c, d) {
|
4505 |
|
4506 | var mt = 1 - t;
|
4507 |
|
4508 | return mt * mt * mt * a + 3 * mt * mt * t * b + 3 * mt * t * t * c + t * t * t * d;
|
4509 |
|
4510 | }
|
4511 |
|
4512 |
|
4513 | function computeCubicFirstDerivativeRoots(a, b, c, d) {
|
4514 |
|
4515 | var result = [-1, -1],
|
4516 | tl = -a + 2 * b - c,
|
4517 | tr = -Math.sqrt(-a * (c - d) + b * b - b * (c + d) + c * c),
|
4518 | dn = -a + 3 * b - 3 * c + d;
|
4519 |
|
4520 | if (dn !== 0) {
|
4521 | result[0] = (tl + tr) / dn;
|
4522 | result[1] = (tl - tr) / dn;
|
4523 | }
|
4524 |
|
4525 | return result;
|
4526 |
|
4527 | }
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 |
|
4537 |
|
4538 |
|
4539 |
|
4540 |
|
4541 |
|
4542 |
|
4543 | exports.computeQuadraticBoundingBox = function(xa, ya, xb, yb, xc, yc) {
|
4544 |
|
4545 | var minx = Number.POSITIVE_INFINITY,
|
4546 | miny = Number.POSITIVE_INFINITY,
|
4547 | maxx = Number.NEGATIVE_INFINITY,
|
4548 | maxy = Number.NEGATIVE_INFINITY,
|
4549 | t,
|
4550 | x,
|
4551 | y;
|
4552 |
|
4553 |
|
4554 | if (xa < minx) { minx = xa; }
|
4555 | if (xa > maxx) { maxx = xa; }
|
4556 | if (xc < minx) { minx = xc; }
|
4557 | if (xc > maxx) { maxx = xc; }
|
4558 |
|
4559 | t = computeQuadraticFirstDerivativeRoot(xa, xb, xc);
|
4560 |
|
4561 | if (t >= 0 && t <= 1) {
|
4562 | x = computeQuadraticBaseValue(t, xa, xb, xc);
|
4563 |
|
4564 |
|
4565 | if (x < minx) { minx = x; }
|
4566 | if (x > maxx) { maxx = x; }
|
4567 | }
|
4568 |
|
4569 |
|
4570 | if (ya < miny) { miny = ya; }
|
4571 | if (ya > maxy) { maxy = ya; }
|
4572 | if (yc < miny) { miny = yc; }
|
4573 | if (yc > maxy) { maxy = yc; }
|
4574 |
|
4575 | t = computeQuadraticFirstDerivativeRoot(ya, yb, yc);
|
4576 |
|
4577 | if (t >= 0 && t <=1 ) {
|
4578 |
|
4579 | y = computeQuadraticBaseValue(t, ya, yb, yc);
|
4580 |
|
4581 | if (y < miny) { miny = y; }
|
4582 | if (y > maxy) { maxy = y ; }
|
4583 |
|
4584 | }
|
4585 |
|
4586 | return {
|
4587 | minx: minx,
|
4588 | miny: miny,
|
4589 | maxx: maxx,
|
4590 | maxy: maxy
|
4591 | };
|
4592 |
|
4593 | };
|
4594 |
|
4595 |
|
4596 | function computeQuadraticBaseValue(t, a, b, c) {
|
4597 |
|
4598 | var mt = 1 - t;
|
4599 |
|
4600 | return mt * mt * a + 2 * mt * t * b + t * t * c;
|
4601 |
|
4602 | }
|
4603 |
|
4604 |
|
4605 | function computeQuadraticFirstDerivativeRoot(a, b, c) {
|
4606 |
|
4607 | var t = -1,
|
4608 | denominator = a - 2 * b + c;
|
4609 |
|
4610 | if (denominator !== 0) {
|
4611 | t = (a - b) / denominator;
|
4612 | }
|
4613 |
|
4614 | return t;
|
4615 |
|
4616 | }
|
4617 |
|
4618 |
|
4619 |
|
4620 |
|
4621 |
|
4622 |
|
4623 |
|
4624 |
|
4625 | exports.js2path = function(path, data, params) {
|
4626 |
|
4627 | path.pathJS = data;
|
4628 |
|
4629 | if (params.collapseRepeated) {
|
4630 | data = collapseRepeated(data);
|
4631 | }
|
4632 |
|
4633 | path.attr('d').value = data.reduce(function(pathString, item) {
|
4634 | var strData = '';
|
4635 | if (item.data) {
|
4636 | strData = cleanupOutData(item.data, params, item.instruction);
|
4637 | }
|
4638 | return pathString += item.instruction + strData;
|
4639 | }, '');
|
4640 |
|
4641 | };
|
4642 |
|
4643 |
|
4644 |
|
4645 |
|
4646 |
|
4647 |
|
4648 |
|
4649 | function collapseRepeated(data) {
|
4650 |
|
4651 | var prev,
|
4652 | prevIndex;
|
4653 |
|
4654 |
|
4655 | data = data.reduce(function(newPath, item) {
|
4656 | if (
|
4657 | prev && item.data &&
|
4658 | item.instruction == prev.instruction
|
4659 | ) {
|
4660 |
|
4661 | if (item.instruction != 'M') {
|
4662 | prev = newPath[prevIndex] = {
|
4663 | instruction: prev.instruction,
|
4664 | data: prev.data.concat(item.data),
|
4665 | coords: item.coords,
|
4666 | base: prev.base
|
4667 | };
|
4668 | } else {
|
4669 | prev.data = item.data;
|
4670 | prev.coords = item.coords;
|
4671 | }
|
4672 | } else {
|
4673 | newPath.push(item);
|
4674 | prev = item;
|
4675 | prevIndex = newPath.length - 1;
|
4676 | }
|
4677 |
|
4678 | return newPath;
|
4679 | }, []);
|
4680 |
|
4681 | return data;
|
4682 |
|
4683 | }
|
4684 |
|
4685 | function set(dest, source) {
|
4686 | dest[0] = source[source.length - 2];
|
4687 | dest[1] = source[source.length - 1];
|
4688 | return dest;
|
4689 | }
|
4690 |
|
4691 |
|
4692 |
|
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 | exports.intersects = function(path1, path2) {
|
4701 |
|
4702 | var points1 = relative2absolute(path1).reduce(gatherPoints, []),
|
4703 | points2 = relative2absolute(path2).reduce(gatherPoints, []);
|
4704 |
|
4705 |
|
4706 | if (points1.maxX <= points2.minX || points2.maxX <= points1.minX ||
|
4707 | points1.maxY <= points2.minY || points2.maxY <= points1.minY ||
|
4708 | points1.every(function (set1) {
|
4709 | return points2.every(function (set2) {
|
4710 | return set1[set1.maxX][0] <= set2[set2.minX][0] ||
|
4711 | set2[set2.maxX][0] <= set1[set1.minX][0] ||
|
4712 | set1[set1.maxY][1] <= set2[set2.minY][1] ||
|
4713 | set2[set2.maxY][1] <= set1[set1.minY][1];
|
4714 | });
|
4715 | })
|
4716 | ) return false;
|
4717 |
|
4718 |
|
4719 | var hullNest1 = points1.map(convexHull),
|
4720 | hullNest2 = points2.map(convexHull);
|
4721 |
|
4722 |
|
4723 | return hullNest1.some(function(hull1) {
|
4724 | if (hull1.length < 3) return false;
|
4725 |
|
4726 | return hullNest2.some(function(hull2) {
|
4727 | if (hull2.length < 3) return false;
|
4728 |
|
4729 | var simplex = [getSupport(hull1, hull2, [1, 0])],
|
4730 | direction = minus(simplex[0]);
|
4731 |
|
4732 | var iterations = 1e4;
|
4733 | while (true) {
|
4734 | if (iterations-- == 0) {
|
4735 | console.error('Error: infinite loop while processing mergePaths plugin.');
|
4736 | return true;
|
4737 | }
|
4738 |
|
4739 | simplex.push(getSupport(hull1, hull2, direction));
|
4740 |
|
4741 | if (dot(direction, simplex[simplex.length - 1]) <= 0) return false;
|
4742 |
|
4743 | if (processSimplex(simplex, direction)) return true;
|
4744 | }
|
4745 | });
|
4746 | });
|
4747 |
|
4748 | function getSupport(a, b, direction) {
|
4749 | return sub(supportPoint(a, direction), supportPoint(b, minus(direction)));
|
4750 | }
|
4751 |
|
4752 |
|
4753 |
|
4754 |
|
4755 | function supportPoint(polygon, direction) {
|
4756 | var index = direction[1] >= 0 ?
|
4757 | direction[0] < 0 ? polygon.maxY : polygon.maxX :
|
4758 | direction[0] < 0 ? polygon.minX : polygon.minY,
|
4759 | max = -Infinity,
|
4760 | value;
|
4761 | while ((value = dot(polygon[index], direction)) > max) {
|
4762 | max = value;
|
4763 | index = ++index % polygon.length;
|
4764 | }
|
4765 | return polygon[(index || polygon.length) - 1];
|
4766 | }
|
4767 | };
|
4768 |
|
4769 | function processSimplex(simplex, direction) {
|
4770 |
|
4771 |
|
4772 |
|
4773 | if (simplex.length == 2) {
|
4774 | var a = simplex[1],
|
4775 | b = simplex[0],
|
4776 | AO = minus(simplex[1]),
|
4777 | AB = sub(b, a);
|
4778 |
|
4779 | if (dot(AO, AB) > 0) {
|
4780 |
|
4781 | set(direction, orth(AB, a));
|
4782 | } else {
|
4783 | set(direction, AO);
|
4784 | // only A remains in the simplex
|
4785 | simplex.shift();
|
4786 | }
|
4787 | } else {
|
4788 | var a = simplex[2],
|
4789 | b = simplex[1],
|
4790 | c = simplex[0],
|
4791 | AB = sub(b, a),
|
4792 | AC = sub(c, a),
|
4793 | AO = minus(a),
|
4794 | ACB = orth(AB, AC),
|
4795 | ABC = orth(AC, AB);
|
4796 |
|
4797 | if (dot(ACB, AO) > 0) {
|
4798 | if (dot(AB, AO) > 0) {
|
4799 | set(direction, ACB);
|
4800 | simplex.shift(); // simplex = [b, a]
|
4801 | } else {
|
4802 | set(direction, AO);
|
4803 | simplex.splice(0, 2); // simplex = [a]
|
4804 | }
|
4805 | } else if (dot(ABC, AO) > 0) {
|
4806 | if (dot(AC, AO) > 0) {
|
4807 | set(direction, ABC);
|
4808 | simplex.splice(1, 1); // simplex = [c, a]
|
4809 | } else {
|
4810 | set(direction, AO);
|
4811 | simplex.splice(0, 2); // simplex = [a]
|
4812 | }
|
4813 | } else // region 7
|
4814 | return true;
|
4815 | }
|
4816 | return false;
|
4817 | }
|
4818 |
|
4819 | function minus(v) {
|
4820 | return [-v[0], -v[1]];
|
4821 | }
|
4822 |
|
4823 | function sub(v1, v2) {
|
4824 | return [v1[0] - v2[0], v1[1] - v2[1]];
|
4825 | }
|
4826 |
|
4827 | function dot(v1, v2) {
|
4828 | return v1[0] * v2[0] + v1[1] * v2[1];
|
4829 | }
|
4830 |
|
4831 | function orth(v, from) {
|
4832 | var o = [-v[1], v[0]];
|
4833 | return dot(o, minus(from)) < 0 ? minus(o) : o;
|
4834 | }
|
4835 |
|
4836 | function gatherPoints(points, item, index, path) {
|
4837 |
|
4838 | var subPath = points.length && points[points.length - 1],
|
4839 | prev = index && path[index - 1],
|
4840 | basePoint = subPath.length && subPath[subPath.length - 1],
|
4841 | data = item.data,
|
4842 | ctrlPoint = basePoint;
|
4843 |
|
4844 | switch (item.instruction) {
|
4845 | case 'M':
|
4846 | points.push(subPath = []);
|
4847 | break;
|
4848 | case 'H':
|
4849 | addPoint(subPath, [data[0], basePoint[1]]);
|
4850 | break;
|
4851 | case 'V':
|
4852 | addPoint(subPath, [basePoint[0], data[0]]);
|
4853 | break;
|
4854 | case 'Q':
|
4855 | addPoint(subPath, data.slice(0, 2));
|
4856 | prevCtrlPoint = [data[2] - data[0], data[3] - data[1]];
|
4857 | break;
|
4858 | case 'T':
|
4859 | if (prev.instruction == 'Q' || prev.instruction == 'T') {
|
4860 | ctrlPoint = [basePoint[0] + prevCtrlPoint[0], basePoint[1] + prevCtrlPoint[1]];
|
4861 | addPoint(subPath, ctrlPoint);
|
4862 | prevCtrlPoint = [data[0] - ctrlPoint[0], data[1] - ctrlPoint[1]];
|
4863 | }
|
4864 | break;
|
4865 | case 'C':
|
4866 |
|
4867 | addPoint(subPath, [.5 * (basePoint[0] + data[0]), .5 * (basePoint[1] + data[1])]);
|
4868 | addPoint(subPath, [.5 * (data[0] + data[2]), .5 * (data[1] + data[3])]);
|
4869 | addPoint(subPath, [.5 * (data[2] + data[4]), .5 * (data[3] + data[5])]);
|
4870 | prevCtrlPoint = [data[4] - data[2], data[5] - data[3]];
|
4871 | break;
|
4872 | case 'S':
|
4873 | if (prev.instruction == 'C' || prev.instruction == 'S') {
|
4874 | addPoint(subPath, [basePoint[0] + .5 * prevCtrlPoint[0], basePoint[1] + .5 * prevCtrlPoint[1]]);
|
4875 | ctrlPoint = [basePoint[0] + prevCtrlPoint[0], basePoint[1] + prevCtrlPoint[1]];
|
4876 | }
|
4877 | addPoint(subPath, [.5 * (ctrlPoint[0] + data[0]), .5 * (ctrlPoint[1]+ data[1])]);
|
4878 | addPoint(subPath, [.5 * (data[0] + data[2]), .5 * (data[1] + data[3])]);
|
4879 | prevCtrlPoint = [data[2] - data[0], data[3] - data[1]];
|
4880 | break;
|
4881 | case 'A':
|
4882 |
|
4883 | var curves = a2c.apply(0, basePoint.concat(data));
|
4884 | for (var cData; (cData = curves.splice(0,6).map(toAbsolute)).length;) {
|
4885 | addPoint(subPath, [.5 * (basePoint[0] + cData[0]), .5 * (basePoint[1] + cData[1])]);
|
4886 | addPoint(subPath, [.5 * (cData[0] + cData[2]), .5 * (cData[1] + cData[3])]);
|
4887 | addPoint(subPath, [.5 * (cData[2] + cData[4]), .5 * (cData[3] + cData[5])]);
|
4888 | if (curves.length) addPoint(subPath, basePoint = cData.slice(-2));
|
4889 | }
|
4890 | break;
|
4891 | }
|
4892 |
|
4893 | if (data && data.length >= 2) addPoint(subPath, data.slice(-2));
|
4894 | return points;
|
4895 |
|
4896 | function toAbsolute(n, i) { return n + basePoint[i % 2] }
|
4897 |
|
4898 |
|
4899 | function addPoint(path, point) {
|
4900 | if (!path.length || point[1] > path[path.maxY][1]) {
|
4901 | path.maxY = path.length;
|
4902 | points.maxY = points.length ? Math.max(point[1], points.maxY) : point[1];
|
4903 | }
|
4904 | if (!path.length || point[0] > path[path.maxX][0]) {
|
4905 | path.maxX = path.length;
|
4906 | points.maxX = points.length ? Math.max(point[0], points.maxX) : point[0];
|
4907 | }
|
4908 | if (!path.length || point[1] < path[path.minY][1]) {
|
4909 | path.minY = path.length;
|
4910 | points.minY = points.length ? Math.min(point[1], points.minY) : point[1];
|
4911 | }
|
4912 | if (!path.length || point[0] < path[path.minX][0]) {
|
4913 | path.minX = path.length;
|
4914 | points.minX = points.length ? Math.min(point[0], points.minX) : point[0];
|
4915 | }
|
4916 | path.push(point);
|
4917 | }
|
4918 | }
|
4919 |
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 |
|
4925 |
|
4926 | function convexHull(points) {
|
4927 |
|
4928 |
|
4929 | points.sort(function(a, b) {
|
4930 | return a[0] == b[0] ? a[1] - b[1] : a[0] - b[0];
|
4931 | });
|
4932 |
|
4933 | var lower = [],
|
4934 | minY = 0,
|
4935 | bottom = 0;
|
4936 | for (var i = 0; i < points.length; i++) {
|
4937 | while (lower.length >= 2 && cross(lower[lower.length - 2], lower[lower.length - 1], points[i]) <= 0) {
|
4938 | lower.pop();
|
4939 | }
|
4940 | if (points[i][1] < points[minY][1]) {
|
4941 | minY = i;
|
4942 | bottom = lower.length;
|
4943 | }
|
4944 | lower.push(points[i]);
|
4945 | }
|
4946 |
|
4947 | var upper = [],
|
4948 | maxY = points.length - 1,
|
4949 | top = 0;
|
4950 | for (var i = points.length; i--;) {
|
4951 | while (upper.length >= 2 && cross(upper[upper.length - 2], upper[upper.length - 1], points[i]) <= 0) {
|
4952 | upper.pop();
|
4953 | }
|
4954 | if (points[i][1] > points[maxY][1]) {
|
4955 | maxY = i;
|
4956 | top = upper.length;
|
4957 | }
|
4958 | upper.push(points[i]);
|
4959 | }
|
4960 |
|
4961 |
|
4962 | upper.pop();
|
4963 | lower.pop();
|
4964 |
|
4965 | var hull = lower.concat(upper);
|
4966 |
|
4967 | hull.minX = 0;
|
4968 | hull.maxX = lower.length;
|
4969 | hull.minY = bottom;
|
4970 | hull.maxY = (lower.length + top) % hull.length;
|
4971 |
|
4972 | return hull;
|
4973 | }
|
4974 |
|
4975 | function cross(o, a, b) {
|
4976 | return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
|
4977 | }
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 |
|
4983 |
|
4984 | function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {
|
4985 |
|
4986 |
|
4987 | var _120 = Math.PI * 120 / 180,
|
4988 | rad = Math.PI / 180 * (+angle || 0),
|
4989 | res = [],
|
4990 | rotateX = function(x, y, rad) { return x * Math.cos(rad) - y * Math.sin(rad) },
|
4991 | rotateY = function(x, y, rad) { return x * Math.sin(rad) + y * Math.cos(rad) };
|
4992 | if (!recursive) {
|
4993 | x1 = rotateX(x1, y1, -rad);
|
4994 | y1 = rotateY(x1, y1, -rad);
|
4995 | x2 = rotateX(x2, y2, -rad);
|
4996 | y2 = rotateY(x2, y2, -rad);
|
4997 | var x = (x1 - x2) / 2,
|
4998 | y = (y1 - y2) / 2;
|
4999 | var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);
|
5000 | if (h > 1) {
|
5001 | h = Math.sqrt(h);
|
5002 | rx = h * rx;
|
5003 | ry = h * ry;
|
5004 | }
|
5005 | var rx2 = rx * rx,
|
5006 | ry2 = ry * ry,
|
5007 | k = (large_arc_flag == sweep_flag ? -1 : 1) *
|
5008 | Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),
|
5009 | cx = k * rx * y / ry + (x1 + x2) / 2,
|
5010 | cy = k * -ry * x / rx + (y1 + y2) / 2,
|
5011 | f1 = Math.asin(((y1 - cy) / ry).toFixed(9)),
|
5012 | f2 = Math.asin(((y2 - cy) / ry).toFixed(9));
|
5013 |
|
5014 | f1 = x1 < cx ? Math.PI - f1 : f1;
|
5015 | f2 = x2 < cx ? Math.PI - f2 : f2;
|
5016 | f1 < 0 && (f1 = Math.PI * 2 + f1);
|
5017 | f2 < 0 && (f2 = Math.PI * 2 + f2);
|
5018 | if (sweep_flag && f1 > f2) {
|
5019 | f1 = f1 - Math.PI * 2;
|
5020 | }
|
5021 | if (!sweep_flag && f2 > f1) {
|
5022 | f2 = f2 - Math.PI * 2;
|
5023 | }
|
5024 | } else {
|
5025 | f1 = recursive[0];
|
5026 | f2 = recursive[1];
|
5027 | cx = recursive[2];
|
5028 | cy = recursive[3];
|
5029 | }
|
5030 | var df = f2 - f1;
|
5031 | if (Math.abs(df) > _120) {
|
5032 | var f2old = f2,
|
5033 | x2old = x2,
|
5034 | y2old = y2;
|
5035 | f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);
|
5036 | x2 = cx + rx * Math.cos(f2);
|
5037 | y2 = cy + ry * Math.sin(f2);
|
5038 | res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);
|
5039 | }
|
5040 | df = f2 - f1;
|
5041 | var c1 = Math.cos(f1),
|
5042 | s1 = Math.sin(f1),
|
5043 | c2 = Math.cos(f2),
|
5044 | s2 = Math.sin(f2),
|
5045 | t = Math.tan(df / 4),
|
5046 | hx = 4 / 3 * rx * t,
|
5047 | hy = 4 / 3 * ry * t,
|
5048 | m = [
|
5049 | - hx * s1, hy * c1,
|
5050 | x2 + hx * s2 - x1, y2 - hy * c2 - y1,
|
5051 | x2 - x1, y2 - y1
|
5052 | ];
|
5053 | if (recursive) {
|
5054 | return m.concat(res);
|
5055 | } else {
|
5056 | res = m.concat(res);
|
5057 | var newres = [];
|
5058 | for (var i = 0, n = res.length; i < n; i++) {
|
5059 | newres[i] = i % 2 ? rotateY(res[i - 1], res[i], rad) : rotateX(res[i], res[i + 1], rad);
|
5060 | }
|
5061 | return newres;
|
5062 | }
|
5063 | }
|
5064 |
|
5065 | });
|
5066 |
|
5067 | var type$a = 'perItem';
|
5068 |
|
5069 | var active$a = true;
|
5070 |
|
5071 | var description$a = 'optimizes path data: writes in shorter form, applies transformations';
|
5072 |
|
5073 | var params$5 = {
|
5074 | applyTransforms: true,
|
5075 | applyTransformsStroked: true,
|
5076 | makeArcs: {
|
5077 | threshold: 2.5,
|
5078 | tolerance: 0.5
|
5079 | },
|
5080 | straightCurves: true,
|
5081 | lineShorthands: true,
|
5082 | curveSmoothShorthands: true,
|
5083 | floatPrecision: 3,
|
5084 | transformPrecision: 5,
|
5085 | removeUseless: true,
|
5086 | collapseRepeated: true,
|
5087 | utilizeAbsolute: true,
|
5088 | leadingZero: true,
|
5089 | negativeExtraSpace: true,
|
5090 | noSpaceAfterFlags: true,
|
5091 | forceAbsolutePath: false
|
5092 | };
|
5093 |
|
5094 | var pathElems$1 = _collections.pathElems,
|
5095 | path2js = _path.path2js,
|
5096 | js2path = _path.js2path,
|
5097 | applyTransforms = _path.applyTransforms,
|
5098 | cleanupOutData = tools.cleanupOutData,
|
5099 | roundData,
|
5100 | precision,
|
5101 | error,
|
5102 | arcThreshold,
|
5103 | arcTolerance,
|
5104 | hasMarkerMid,
|
5105 | hasStrokeLinecap;
|
5106 |
|
5107 |
|
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 | var fn$a = function(item, params) {
|
5124 |
|
5125 | if (item.isElem(pathElems$1) && item.hasAttr('d')) {
|
5126 |
|
5127 | precision = params.floatPrecision;
|
5128 | error = precision !== false ? +Math.pow(.1, precision).toFixed(precision) : 1e-2;
|
5129 | roundData = precision > 0 && precision < 20 ? strongRound : round;
|
5130 | if (params.makeArcs) {
|
5131 | arcThreshold = params.makeArcs.threshold;
|
5132 | arcTolerance = params.makeArcs.tolerance;
|
5133 | }
|
5134 | hasMarkerMid = item.hasAttr('marker-mid');
|
5135 |
|
5136 | var stroke = item.computedAttr('stroke'),
|
5137 | strokeLinecap = item.computedAttr('stroke');
|
5138 | hasStrokeLinecap = stroke && stroke != 'none' && strokeLinecap && strokeLinecap != 'butt';
|
5139 |
|
5140 | var data = path2js(item);
|
5141 |
|
5142 |
|
5143 | if (data.length) {
|
5144 | convertToRelative(data);
|
5145 |
|
5146 | if (params.applyTransforms) {
|
5147 | data = applyTransforms(item, data, params);
|
5148 | }
|
5149 |
|
5150 | data = filters(data, params);
|
5151 |
|
5152 | if (params.utilizeAbsolute) {
|
5153 | data = convertToMixed(data, params);
|
5154 | }
|
5155 |
|
5156 | js2path(item, data, params);
|
5157 | }
|
5158 |
|
5159 | }
|
5160 |
|
5161 | };
|
5162 |
|
5163 |
|
5164 |
|
5165 |
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 | function convertToRelative(path) {
|
5171 |
|
5172 | var point = [0, 0],
|
5173 | subpathPoint = [0, 0],
|
5174 | baseItem;
|
5175 |
|
5176 | path.forEach(function(item, index) {
|
5177 |
|
5178 | var instruction = item.instruction,
|
5179 | data = item.data;
|
5180 |
|
5181 |
|
5182 | if (data) {
|
5183 |
|
5184 |
|
5185 |
|
5186 | if ('mcslqta'.indexOf(instruction) > -1) {
|
5187 |
|
5188 | point[0] += data[data.length - 2];
|
5189 | point[1] += data[data.length - 1];
|
5190 |
|
5191 | if (instruction === 'm') {
|
5192 | subpathPoint[0] = point[0];
|
5193 | subpathPoint[1] = point[1];
|
5194 | baseItem = item;
|
5195 | }
|
5196 |
|
5197 | } else if (instruction === 'h') {
|
5198 |
|
5199 | point[0] += data[0];
|
5200 |
|
5201 | } else if (instruction === 'v') {
|
5202 |
|
5203 | point[1] += data[0];
|
5204 |
|
5205 | }
|
5206 |
|
5207 |
|
5208 |
|
5209 |
|
5210 | if (instruction === 'M') {
|
5211 |
|
5212 | if (index > 0) instruction = 'm';
|
5213 |
|
5214 | data[0] -= point[0];
|
5215 | data[1] -= point[1];
|
5216 |
|
5217 | subpathPoint[0] = point[0] += data[0];
|
5218 | subpathPoint[1] = point[1] += data[1];
|
5219 |
|
5220 | baseItem = item;
|
5221 |
|
5222 | }
|
5223 |
|
5224 |
|
5225 |
|
5226 | else if ('LT'.indexOf(instruction) > -1) {
|
5227 |
|
5228 | instruction = instruction.toLowerCase();
|
5229 |
|
5230 |
|
5231 |
|
5232 | data[0] -= point[0];
|
5233 | data[1] -= point[1];
|
5234 |
|
5235 | point[0] += data[0];
|
5236 | point[1] += data[1];
|
5237 |
|
5238 |
|
5239 | } else if (instruction === 'C') {
|
5240 |
|
5241 | instruction = 'c';
|
5242 |
|
5243 |
|
5244 |
|
5245 | data[0] -= point[0];
|
5246 | data[1] -= point[1];
|
5247 | data[2] -= point[0];
|
5248 | data[3] -= point[1];
|
5249 | data[4] -= point[0];
|
5250 | data[5] -= point[1];
|
5251 |
|
5252 | point[0] += data[4];
|
5253 | point[1] += data[5];
|
5254 |
|
5255 |
|
5256 |
|
5257 | } else if ('SQ'.indexOf(instruction) > -1) {
|
5258 |
|
5259 | instruction = instruction.toLowerCase();
|
5260 |
|
5261 |
|
5262 |
|
5263 | data[0] -= point[0];
|
5264 | data[1] -= point[1];
|
5265 | data[2] -= point[0];
|
5266 | data[3] -= point[1];
|
5267 |
|
5268 | point[0] += data[2];
|
5269 | point[1] += data[3];
|
5270 |
|
5271 |
|
5272 | } else if (instruction === 'A') {
|
5273 |
|
5274 | instruction = 'a';
|
5275 |
|
5276 |
|
5277 |
|
5278 | data[5] -= point[0];
|
5279 | data[6] -= point[1];
|
5280 |
|
5281 | point[0] += data[5];
|
5282 | point[1] += data[6];
|
5283 |
|
5284 |
|
5285 | } else if (instruction === 'H') {
|
5286 |
|
5287 | instruction = 'h';
|
5288 |
|
5289 | data[0] -= point[0];
|
5290 |
|
5291 | point[0] += data[0];
|
5292 |
|
5293 |
|
5294 | } else if (instruction === 'V') {
|
5295 |
|
5296 | instruction = 'v';
|
5297 |
|
5298 | data[0] -= point[1];
|
5299 |
|
5300 | point[1] += data[0];
|
5301 |
|
5302 | }
|
5303 |
|
5304 | item.instruction = instruction;
|
5305 | item.data = data;
|
5306 |
|
5307 |
|
5308 | item.coords = point.slice(-2);
|
5309 |
|
5310 | }
|
5311 |
|
5312 |
|
5313 | else if (instruction == 'z') {
|
5314 | if (baseItem) {
|
5315 | item.coords = baseItem.coords;
|
5316 | }
|
5317 | point[0] = subpathPoint[0];
|
5318 | point[1] = subpathPoint[1];
|
5319 | }
|
5320 |
|
5321 | item.base = index > 0 ? path[index - 1].coords : [0, 0];
|
5322 |
|
5323 | });
|
5324 |
|
5325 | return path;
|
5326 |
|
5327 | }
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 | function filters(path, params) {
|
5337 |
|
5338 | var stringify = data2Path.bind(null, params),
|
5339 | relSubpoint = [0, 0],
|
5340 | pathBase = [0, 0],
|
5341 | prev = {};
|
5342 |
|
5343 | path = path.filter(function(item, index, path) {
|
5344 |
|
5345 | var instruction = item.instruction,
|
5346 | data = item.data,
|
5347 | next = path[index + 1];
|
5348 |
|
5349 | if (data) {
|
5350 |
|
5351 | var sdata = data,
|
5352 | circle;
|
5353 |
|
5354 | if (instruction === 's') {
|
5355 | sdata = [0, 0].concat(data);
|
5356 |
|
5357 | if ('cs'.indexOf(prev.instruction) > -1) {
|
5358 | var pdata = prev.data,
|
5359 | n = pdata.length;
|
5360 |
|
5361 |
|
5362 | sdata[0] = pdata[n - 2] - pdata[n - 4];
|
5363 | sdata[1] = pdata[n - 1] - pdata[n - 3];
|
5364 | }
|
5365 |
|
5366 | }
|
5367 |
|
5368 |
|
5369 | if (
|
5370 | params.makeArcs &&
|
5371 | (instruction == 'c' || instruction == 's') &&
|
5372 | isConvex(sdata) &&
|
5373 | (circle = findCircle(sdata))
|
5374 | ) {
|
5375 | var r = roundData([circle.radius])[0],
|
5376 | angle = findArcAngle(sdata, circle),
|
5377 | sweep = sdata[5] * sdata[0] - sdata[4] * sdata[1] > 0 ? 1 : 0,
|
5378 | arc = {
|
5379 | instruction: 'a',
|
5380 | data: [r, r, 0, 0, sweep, sdata[4], sdata[5]],
|
5381 | coords: item.coords.slice(),
|
5382 | base: item.base
|
5383 | },
|
5384 | output = [arc],
|
5385 |
|
5386 | relCenter = [circle.center[0] - sdata[4], circle.center[1] - sdata[5]],
|
5387 | relCircle = { center: relCenter, radius: circle.radius },
|
5388 | arcCurves = [item],
|
5389 | hasPrev = 0,
|
5390 | suffix = '',
|
5391 | nextLonghand;
|
5392 |
|
5393 | if (
|
5394 | prev.instruction == 'c' && isConvex(prev.data) && isArcPrev(prev.data, circle) ||
|
5395 | prev.instruction == 'a' && prev.sdata && isArcPrev(prev.sdata, circle)
|
5396 | ) {
|
5397 | arcCurves.unshift(prev);
|
5398 | arc.base = prev.base;
|
5399 | arc.data[5] = arc.coords[0] - arc.base[0];
|
5400 | arc.data[6] = arc.coords[1] - arc.base[1];
|
5401 | var prevData = prev.instruction == 'a' ? prev.sdata : prev.data;
|
5402 | var prevAngle = findArcAngle(prevData,
|
5403 | {
|
5404 | center: [prevData[4] + circle.center[0], prevData[5] + circle.center[1]],
|
5405 | radius: circle.radius
|
5406 | }
|
5407 | );
|
5408 | angle += prevAngle;
|
5409 | if (angle > Math.PI) arc.data[3] = 1;
|
5410 | hasPrev = 1;
|
5411 | }
|
5412 |
|
5413 |
|
5414 | for (var j = index; (next = path[++j]) && ~'cs'.indexOf(next.instruction);) {
|
5415 | var nextData = next.data;
|
5416 | if (next.instruction == 's') {
|
5417 | nextLonghand = makeLonghand({instruction: 's', data: next.data.slice() },
|
5418 | path[j - 1].data);
|
5419 | nextData = nextLonghand.data;
|
5420 | nextLonghand.data = nextData.slice(0, 2);
|
5421 | suffix = stringify([nextLonghand]);
|
5422 | }
|
5423 | if (isConvex(nextData) && isArc(nextData, relCircle)) {
|
5424 | angle += findArcAngle(nextData, relCircle);
|
5425 | if (angle - 2 * Math.PI > 1e-3) break;
|
5426 | if (angle > Math.PI) arc.data[3] = 1;
|
5427 | arcCurves.push(next);
|
5428 | if (2 * Math.PI - angle > 1e-3) {
|
5429 | arc.coords = next.coords;
|
5430 | arc.data[5] = arc.coords[0] - arc.base[0];
|
5431 | arc.data[6] = arc.coords[1] - arc.base[1];
|
5432 | } else {
|
5433 |
|
5434 | arc.data[5] = 2 * (relCircle.center[0] - nextData[4]);
|
5435 | arc.data[6] = 2 * (relCircle.center[1] - nextData[5]);
|
5436 | arc.coords = [arc.base[0] + arc.data[5], arc.base[1] + arc.data[6]];
|
5437 | arc = {
|
5438 | instruction: 'a',
|
5439 | data: [r, r, 0, 0, sweep,
|
5440 | next.coords[0] - arc.coords[0], next.coords[1] - arc.coords[1]],
|
5441 | coords: next.coords,
|
5442 | base: arc.coords
|
5443 | };
|
5444 | output.push(arc);
|
5445 | j++;
|
5446 | break;
|
5447 | }
|
5448 | relCenter[0] -= nextData[4];
|
5449 | relCenter[1] -= nextData[5];
|
5450 | } else break;
|
5451 | }
|
5452 |
|
5453 | if ((stringify(output) + suffix).length < stringify(arcCurves).length) {
|
5454 | if (path[j] && path[j].instruction == 's') {
|
5455 | makeLonghand(path[j], path[j - 1].data);
|
5456 | }
|
5457 | if (hasPrev) {
|
5458 | var prevArc = output.shift();
|
5459 | roundData(prevArc.data);
|
5460 | relSubpoint[0] += prevArc.data[5] - prev.data[prev.data.length - 2];
|
5461 | relSubpoint[1] += prevArc.data[6] - prev.data[prev.data.length - 1];
|
5462 | prev.instruction = 'a';
|
5463 | prev.data = prevArc.data;
|
5464 | item.base = prev.coords = prevArc.coords;
|
5465 | }
|
5466 | arc = output.shift();
|
5467 | if (arcCurves.length == 1) {
|
5468 | item.sdata = sdata.slice();
|
5469 | } else if (arcCurves.length - 1 - hasPrev > 0) {
|
5470 |
|
5471 | path.splice.apply(path, [index + 1, arcCurves.length - 1 - hasPrev].concat(output));
|
5472 | }
|
5473 | if (!arc) return false;
|
5474 | instruction = 'a';
|
5475 | data = arc.data;
|
5476 | item.coords = arc.coords;
|
5477 | }
|
5478 | }
|
5479 |
|
5480 |
|
5481 |
|
5482 |
|
5483 | if (precision !== false) {
|
5484 | if ('mltqsc'.indexOf(instruction) > -1) {
|
5485 | for (var i = data.length; i--;) {
|
5486 | data[i] += item.base[i % 2] - relSubpoint[i % 2];
|
5487 | }
|
5488 | } else if (instruction == 'h') {
|
5489 | data[0] += item.base[0] - relSubpoint[0];
|
5490 | } else if (instruction == 'v') {
|
5491 | data[0] += item.base[1] - relSubpoint[1];
|
5492 | } else if (instruction == 'a') {
|
5493 | data[5] += item.base[0] - relSubpoint[0];
|
5494 | data[6] += item.base[1] - relSubpoint[1];
|
5495 | }
|
5496 | roundData(data);
|
5497 |
|
5498 | if (instruction == 'h') relSubpoint[0] += data[0];
|
5499 | else if (instruction == 'v') relSubpoint[1] += data[0];
|
5500 | else {
|
5501 | relSubpoint[0] += data[data.length - 2];
|
5502 | relSubpoint[1] += data[data.length - 1];
|
5503 | }
|
5504 | roundData(relSubpoint);
|
5505 |
|
5506 | if (instruction.toLowerCase() == 'm') {
|
5507 | pathBase[0] = relSubpoint[0];
|
5508 | pathBase[1] = relSubpoint[1];
|
5509 | }
|
5510 | }
|
5511 |
|
5512 |
|
5513 | if (params.straightCurves) {
|
5514 |
|
5515 | if (
|
5516 | instruction === 'c' &&
|
5517 | isCurveStraightLine(data) ||
|
5518 | instruction === 's' &&
|
5519 | isCurveStraightLine(sdata)
|
5520 | ) {
|
5521 | if (next && next.instruction == 's')
|
5522 | makeLonghand(next, data);
|
5523 | instruction = 'l';
|
5524 | data = data.slice(-2);
|
5525 | }
|
5526 |
|
5527 | else if (
|
5528 | instruction === 'q' &&
|
5529 | isCurveStraightLine(data)
|
5530 | ) {
|
5531 | if (next && next.instruction == 't')
|
5532 | makeLonghand(next, data);
|
5533 | instruction = 'l';
|
5534 | data = data.slice(-2);
|
5535 | }
|
5536 |
|
5537 | else if (
|
5538 | instruction === 't' &&
|
5539 | prev.instruction !== 'q' &&
|
5540 | prev.instruction !== 't'
|
5541 | ) {
|
5542 | instruction = 'l';
|
5543 | data = data.slice(-2);
|
5544 | }
|
5545 |
|
5546 | else if (
|
5547 | instruction === 'a' &&
|
5548 | (data[0] === 0 || data[1] === 0)
|
5549 | ) {
|
5550 | instruction = 'l';
|
5551 | data = data.slice(-2);
|
5552 | }
|
5553 | }
|
5554 |
|
5555 |
|
5556 |
|
5557 |
|
5558 | if (
|
5559 | params.lineShorthands &&
|
5560 | instruction === 'l'
|
5561 | ) {
|
5562 | if (data[1] === 0) {
|
5563 | instruction = 'h';
|
5564 | data.pop();
|
5565 | } else if (data[0] === 0) {
|
5566 | instruction = 'v';
|
5567 | data.shift();
|
5568 | }
|
5569 | }
|
5570 |
|
5571 |
|
5572 |
|
5573 | if (
|
5574 | params.collapseRepeated &&
|
5575 | !hasMarkerMid &&
|
5576 | ('mhv'.indexOf(instruction) > -1) &&
|
5577 | prev.instruction &&
|
5578 | instruction == prev.instruction.toLowerCase() &&
|
5579 | (
|
5580 | (instruction != 'h' && instruction != 'v') ||
|
5581 | (prev.data[0] >= 0) == (data[0] >= 0)
|
5582 | )) {
|
5583 | prev.data[0] += data[0];
|
5584 | if (instruction != 'h' && instruction != 'v') {
|
5585 | prev.data[1] += data[1];
|
5586 | }
|
5587 | prev.coords = item.coords;
|
5588 | path[index] = prev;
|
5589 | return false;
|
5590 | }
|
5591 |
|
5592 |
|
5593 | if (params.curveSmoothShorthands && prev.instruction) {
|
5594 |
|
5595 |
|
5596 | if (instruction === 'c') {
|
5597 |
|
5598 |
|
5599 | if (
|
5600 | prev.instruction === 'c' &&
|
5601 | data[0] === -(prev.data[2] - prev.data[4]) &&
|
5602 | data[1] === -(prev.data[3] - prev.data[5])
|
5603 | ) {
|
5604 | instruction = 's';
|
5605 | data = data.slice(2);
|
5606 | }
|
5607 |
|
5608 |
|
5609 | else if (
|
5610 | prev.instruction === 's' &&
|
5611 | data[0] === -(prev.data[0] - prev.data[2]) &&
|
5612 | data[1] === -(prev.data[1] - prev.data[3])
|
5613 | ) {
|
5614 | instruction = 's';
|
5615 | data = data.slice(2);
|
5616 | }
|
5617 |
|
5618 |
|
5619 | else if (
|
5620 | 'cs'.indexOf(prev.instruction) === -1 &&
|
5621 | data[0] === 0 &&
|
5622 | data[1] === 0
|
5623 | ) {
|
5624 | instruction = 's';
|
5625 | data = data.slice(2);
|
5626 | }
|
5627 |
|
5628 | }
|
5629 |
|
5630 |
|
5631 | else if (instruction === 'q') {
|
5632 |
|
5633 |
|
5634 | if (
|
5635 | prev.instruction === 'q' &&
|
5636 | data[0] === (prev.data[2] - prev.data[0]) &&
|
5637 | data[1] === (prev.data[3] - prev.data[1])
|
5638 | ) {
|
5639 | instruction = 't';
|
5640 | data = data.slice(2);
|
5641 | }
|
5642 |
|
5643 |
|
5644 | else if (
|
5645 | prev.instruction === 't' &&
|
5646 | data[2] === prev.data[0] &&
|
5647 | data[3] === prev.data[1]
|
5648 | ) {
|
5649 | instruction = 't';
|
5650 | data = data.slice(2);
|
5651 | }
|
5652 |
|
5653 | }
|
5654 |
|
5655 | }
|
5656 |
|
5657 |
|
5658 | if (params.removeUseless && !hasStrokeLinecap) {
|
5659 |
|
5660 |
|
5661 | if (
|
5662 | (
|
5663 | 'lhvqtcs'.indexOf(instruction) > -1
|
5664 | ) &&
|
5665 | data.every(function(i) { return i === 0; })
|
5666 | ) {
|
5667 | path[index] = prev;
|
5668 | return false;
|
5669 | }
|
5670 |
|
5671 |
|
5672 | if (
|
5673 | instruction === 'a' &&
|
5674 | data[5] === 0 &&
|
5675 | data[6] === 0
|
5676 | ) {
|
5677 | path[index] = prev;
|
5678 | return false;
|
5679 | }
|
5680 |
|
5681 | }
|
5682 |
|
5683 | item.instruction = instruction;
|
5684 | item.data = data;
|
5685 |
|
5686 | prev = item;
|
5687 |
|
5688 | } else {
|
5689 |
|
5690 |
|
5691 | relSubpoint[0] = pathBase[0];
|
5692 | relSubpoint[1] = pathBase[1];
|
5693 | if (prev.instruction == 'z') return false;
|
5694 | prev = item;
|
5695 |
|
5696 | }
|
5697 |
|
5698 | return true;
|
5699 |
|
5700 | });
|
5701 |
|
5702 | return path;
|
5703 |
|
5704 | }
|
5705 |
|
5706 |
|
5707 |
|
5708 |
|
5709 |
|
5710 |
|
5711 |
|
5712 | function convertToMixed(path, params) {
|
5713 |
|
5714 | var prev = path[0];
|
5715 |
|
5716 | path = path.filter(function(item, index) {
|
5717 |
|
5718 | if (index == 0) return true;
|
5719 | if (!item.data) {
|
5720 | prev = item;
|
5721 | return true;
|
5722 | }
|
5723 |
|
5724 | var instruction = item.instruction,
|
5725 | data = item.data,
|
5726 | adata = data && data.slice(0);
|
5727 |
|
5728 | if ('mltqsc'.indexOf(instruction) > -1) {
|
5729 | for (var i = adata.length; i--;) {
|
5730 | adata[i] += item.base[i % 2];
|
5731 | }
|
5732 | } else if (instruction == 'h') {
|
5733 | adata[0] += item.base[0];
|
5734 | } else if (instruction == 'v') {
|
5735 | adata[0] += item.base[1];
|
5736 | } else if (instruction == 'a') {
|
5737 | adata[5] += item.base[0];
|
5738 | adata[6] += item.base[1];
|
5739 | }
|
5740 |
|
5741 | roundData(adata);
|
5742 |
|
5743 | var absoluteDataStr = cleanupOutData(adata, params),
|
5744 | relativeDataStr = cleanupOutData(data, params);
|
5745 |
|
5746 |
|
5747 |
|
5748 |
|
5749 |
|
5750 | if (
|
5751 | params.forceAbsolutePath || (
|
5752 | absoluteDataStr.length < relativeDataStr.length &&
|
5753 | !(
|
5754 | params.negativeExtraSpace &&
|
5755 | instruction == prev.instruction &&
|
5756 | prev.instruction.charCodeAt(0) > 96 &&
|
5757 | absoluteDataStr.length == relativeDataStr.length - 1 &&
|
5758 | (data[0] < 0 || /^0\./.test(data[0]) && prev.data[prev.data.length - 1] % 1)
|
5759 | ))
|
5760 | ) {
|
5761 | item.instruction = instruction.toUpperCase();
|
5762 | item.data = adata;
|
5763 | }
|
5764 |
|
5765 | prev = item;
|
5766 |
|
5767 | return true;
|
5768 |
|
5769 | });
|
5770 |
|
5771 | return path;
|
5772 |
|
5773 | }
|
5774 |
|
5775 |
|
5776 |
|
5777 |
|
5778 |
|
5779 |
|
5780 |
|
5781 |
|
5782 | function isConvex(data) {
|
5783 |
|
5784 | var center = getIntersection([0, 0, data[2], data[3], data[0], data[1], data[4], data[5]]);
|
5785 |
|
5786 | return center &&
|
5787 | (data[2] < center[0] == center[0] < 0) &&
|
5788 | (data[3] < center[1] == center[1] < 0) &&
|
5789 | (data[4] < center[0] == center[0] < data[0]) &&
|
5790 | (data[5] < center[1] == center[1] < data[1]);
|
5791 |
|
5792 | }
|
5793 |
|
5794 |
|
5795 |
|
5796 |
|
5797 |
|
5798 |
|
5799 |
|
5800 | function getIntersection(coords) {
|
5801 |
|
5802 |
|
5803 | var a1 = coords[1] - coords[3],
|
5804 | b1 = coords[2] - coords[0],
|
5805 | c1 = coords[0] * coords[3] - coords[2] * coords[1],
|
5806 |
|
5807 |
|
5808 | a2 = coords[5] - coords[7],
|
5809 | b2 = coords[6] - coords[4],
|
5810 | c2 = coords[4] * coords[7] - coords[5] * coords[6],
|
5811 | denom = (a1 * b2 - a2 * b1);
|
5812 |
|
5813 | if (!denom) return;
|
5814 |
|
5815 | var cross = [
|
5816 | (b1 * c2 - b2 * c1) / denom,
|
5817 | (a1 * c2 - a2 * c1) / -denom
|
5818 | ];
|
5819 | if (
|
5820 | !isNaN(cross[0]) && !isNaN(cross[1]) &&
|
5821 | isFinite(cross[0]) && isFinite(cross[1])
|
5822 | ) {
|
5823 | return cross;
|
5824 | }
|
5825 |
|
5826 | }
|
5827 |
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 | function strongRound(data) {
|
5838 | for (var i = data.length; i-- > 0;) {
|
5839 | if (data[i].toFixed(precision) != data[i]) {
|
5840 | var rounded = +data[i].toFixed(precision - 1);
|
5841 | data[i] = +Math.abs(rounded - data[i]).toFixed(precision + 1) >= error ?
|
5842 | +data[i].toFixed(precision) :
|
5843 | rounded;
|
5844 | }
|
5845 | }
|
5846 | return data;
|
5847 | }
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 |
|
5853 |
|
5854 |
|
5855 | function round(data) {
|
5856 | for (var i = data.length; i-- > 0;) {
|
5857 | data[i] = Math.round(data[i]);
|
5858 | }
|
5859 | return data;
|
5860 | }
|
5861 |
|
5862 |
|
5863 |
|
5864 |
|
5865 |
|
5866 |
|
5867 |
|
5868 |
|
5869 |
|
5870 |
|
5871 | function isCurveStraightLine(data) {
|
5872 |
|
5873 |
|
5874 | var i = data.length - 2,
|
5875 | a = -data[i + 1],
|
5876 | b = data[i],
|
5877 | d = 1 / (a * a + b * b);
|
5878 |
|
5879 | if (i <= 1 || !isFinite(d)) return false;
|
5880 |
|
5881 |
|
5882 | while ((i -= 2) >= 0) {
|
5883 | if (Math.sqrt(Math.pow(a * data[i] + b * data[i + 1], 2) * d) > error)
|
5884 | return false;
|
5885 | }
|
5886 |
|
5887 | return true;
|
5888 |
|
5889 | }
|
5890 |
|
5891 |
|
5892 |
|
5893 |
|
5894 |
|
5895 |
|
5896 |
|
5897 |
|
5898 | function makeLonghand(item, data) {
|
5899 | switch (item.instruction) {
|
5900 | case 's': item.instruction = 'c'; break;
|
5901 | case 't': item.instruction = 'q'; break;
|
5902 | }
|
5903 | item.data.unshift(data[data.length - 2] - data[data.length - 4], data[data.length - 1] - data[data.length - 3]);
|
5904 | return item;
|
5905 | }
|
5906 |
|
5907 |
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 | function getDistance(point1, point2) {
|
5916 | return Math.hypot(point1[0] - point2[0], point1[1] - point2[1]);
|
5917 | }
|
5918 |
|
5919 |
|
5920 |
|
5921 |
|
5922 |
|
5923 |
|
5924 |
|
5925 |
|
5926 |
|
5927 |
|
5928 |
|
5929 | function getCubicBezierPoint(curve, t) {
|
5930 | var sqrT = t * t,
|
5931 | cubT = sqrT * t,
|
5932 | mt = 1 - t,
|
5933 | sqrMt = mt * mt;
|
5934 |
|
5935 | return [
|
5936 | 3 * sqrMt * t * curve[0] + 3 * mt * sqrT * curve[2] + cubT * curve[4],
|
5937 | 3 * sqrMt * t * curve[1] + 3 * mt * sqrT * curve[3] + cubT * curve[5]
|
5938 | ];
|
5939 | }
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 | function findCircle(curve) {
|
5949 | var midPoint = getCubicBezierPoint(curve, 1/2),
|
5950 | m1 = [midPoint[0] / 2, midPoint[1] / 2],
|
5951 | m2 = [(midPoint[0] + curve[4]) / 2, (midPoint[1] + curve[5]) / 2],
|
5952 | center = getIntersection([
|
5953 | m1[0], m1[1],
|
5954 | m1[0] + m1[1], m1[1] - m1[0],
|
5955 | m2[0], m2[1],
|
5956 | m2[0] + (m2[1] - midPoint[1]), m2[1] - (m2[0] - midPoint[0])
|
5957 | ]),
|
5958 | radius = center && getDistance([0, 0], center),
|
5959 | tolerance = Math.min(arcThreshold * error, arcTolerance * radius / 100);
|
5960 |
|
5961 | if (center && radius < 1e15 &&
|
5962 | [1/4, 3/4].every(function(point) {
|
5963 | return Math.abs(getDistance(getCubicBezierPoint(curve, point), center) - radius) <= tolerance;
|
5964 | }))
|
5965 | return { center: center, radius: radius};
|
5966 | }
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 |
|
5972 |
|
5973 |
|
5974 |
|
5975 |
|
5976 | function isArc(curve, circle) {
|
5977 | var tolerance = Math.min(arcThreshold * error, arcTolerance * circle.radius / 100);
|
5978 |
|
5979 | return [0, 1/4, 1/2, 3/4, 1].every(function(point) {
|
5980 | return Math.abs(getDistance(getCubicBezierPoint(curve, point), circle.center) - circle.radius) <= tolerance;
|
5981 | });
|
5982 | }
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 | function isArcPrev(curve, circle) {
|
5993 | return isArc(curve, {
|
5994 | center: [circle.center[0] + curve[4], circle.center[1] + curve[5]],
|
5995 | radius: circle.radius
|
5996 | });
|
5997 | }
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 |
|
6005 |
|
6006 |
|
6007 | function findArcAngle(curve, relCircle) {
|
6008 | var x1 = -relCircle.center[0],
|
6009 | y1 = -relCircle.center[1],
|
6010 | x2 = curve[4] - relCircle.center[0],
|
6011 | y2 = curve[5] - relCircle.center[1];
|
6012 |
|
6013 | return Math.acos(
|
6014 | (x1 * x2 + y1 * y2) /
|
6015 | Math.sqrt((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2))
|
6016 | );
|
6017 | }
|
6018 |
|
6019 |
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 |
|
6025 |
|
6026 |
|
6027 | function data2Path(params, pathData) {
|
6028 | return pathData.reduce(function(pathString, item) {
|
6029 | var strData = '';
|
6030 | if (item.data) {
|
6031 | strData = cleanupOutData(roundData(item.data.slice()), params);
|
6032 | }
|
6033 | return pathString + item.instruction + strData;
|
6034 | }, '');
|
6035 | }
|
6036 |
|
6037 | var convertPathData = {
|
6038 | type: type$a,
|
6039 | active: active$a,
|
6040 | description: description$a,
|
6041 | params: params$5,
|
6042 | fn: fn$a
|
6043 | };
|
6044 |
|
6045 | var type$b = 'perItem';
|
6046 |
|
6047 | var active$b = true;
|
6048 |
|
6049 | var description$b = 'converts basic shapes to more compact path form';
|
6050 |
|
6051 | var params$6 = {
|
6052 | convertArcs: false
|
6053 | };
|
6054 |
|
6055 | var none$1 = { value: 0 },
|
6056 | regNumber = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
|
6057 |
|
6058 |
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 | var fn$b = function(item, params) {
|
6072 | var convertArcs = params && params.convertArcs;
|
6073 |
|
6074 | if (
|
6075 | item.isElem('rect') &&
|
6076 | item.hasAttr('width') &&
|
6077 | item.hasAttr('height') &&
|
6078 | !item.hasAttr('rx') &&
|
6079 | !item.hasAttr('ry')
|
6080 | ) {
|
6081 |
|
6082 | var x = +(item.attr('x') || none$1).value,
|
6083 | y = +(item.attr('y') || none$1).value,
|
6084 | width = +item.attr('width').value,
|
6085 | height = +item.attr('height').value;
|
6086 |
|
6087 |
|
6088 |
|
6089 |
|
6090 | if (isNaN(x - y + width - height)) return;
|
6091 |
|
6092 | var pathData =
|
6093 | 'M' + x + ' ' + y +
|
6094 | 'H' + (x + width) +
|
6095 | 'V' + (y + height) +
|
6096 | 'H' + x +
|
6097 | 'z';
|
6098 |
|
6099 | item.addAttr({
|
6100 | name: 'd',
|
6101 | value: pathData,
|
6102 | prefix: '',
|
6103 | local: 'd'
|
6104 | });
|
6105 |
|
6106 | item.renameElem('path')
|
6107 | .removeAttr(['x', 'y', 'width', 'height']);
|
6108 |
|
6109 | } else if (item.isElem('line')) {
|
6110 |
|
6111 | var x1 = +(item.attr('x1') || none$1).value,
|
6112 | y1 = +(item.attr('y1') || none$1).value,
|
6113 | x2 = +(item.attr('x2') || none$1).value,
|
6114 | y2 = +(item.attr('y2') || none$1).value;
|
6115 | if (isNaN(x1 - y1 + x2 - y2)) return;
|
6116 |
|
6117 | item.addAttr({
|
6118 | name: 'd',
|
6119 | value: 'M' + x1 + ' ' + y1 + 'L' + x2 + ' ' + y2,
|
6120 | prefix: '',
|
6121 | local: 'd'
|
6122 | });
|
6123 |
|
6124 | item.renameElem('path')
|
6125 | .removeAttr(['x1', 'y1', 'x2', 'y2']);
|
6126 |
|
6127 | } else if ((
|
6128 | item.isElem('polyline') ||
|
6129 | item.isElem('polygon')
|
6130 | ) &&
|
6131 | item.hasAttr('points')
|
6132 | ) {
|
6133 |
|
6134 | var coords = (item.attr('points').value.match(regNumber) || []).map(Number);
|
6135 | if (coords.length < 4) return false;
|
6136 |
|
6137 | item.addAttr({
|
6138 | name: 'd',
|
6139 | value: 'M' + coords.slice(0,2).join(' ') +
|
6140 | 'L' + coords.slice(2).join(' ') +
|
6141 | (item.isElem('polygon') ? 'z' : ''),
|
6142 | prefix: '',
|
6143 | local: 'd'
|
6144 | });
|
6145 |
|
6146 | item.renameElem('path')
|
6147 | .removeAttr('points');
|
6148 | } else if (item.isElem('circle') && convertArcs) {
|
6149 |
|
6150 | var cx = +(item.attr('cx') || none$1).value;
|
6151 | var cy = +(item.attr('cy') || none$1).value;
|
6152 | var r = +(item.attr('r') || none$1).value;
|
6153 | if (isNaN(cx - cy + r)) {
|
6154 | return;
|
6155 | }
|
6156 | var cPathData =
|
6157 | 'M' + cx + ' ' + (cy - r) +
|
6158 | 'A' + r + ' ' + r + ' 0 1 0 ' + cx + ' ' + (cy + r) +
|
6159 | 'A' + r + ' ' + r + ' 0 1 0 ' + cx + ' ' + (cy - r) +
|
6160 | 'Z';
|
6161 | item.addAttr({
|
6162 | name: 'd',
|
6163 | value: cPathData,
|
6164 | prefix: '',
|
6165 | local: 'd',
|
6166 | });
|
6167 | item.renameElem('path').removeAttr(['cx', 'cy', 'r']);
|
6168 |
|
6169 | } else if (item.isElem('ellipse') && convertArcs) {
|
6170 |
|
6171 | var ecx = +(item.attr('cx') || none$1).value;
|
6172 | var ecy = +(item.attr('cy') || none$1).value;
|
6173 | var rx = +(item.attr('rx') || none$1).value;
|
6174 | var ry = +(item.attr('ry') || none$1).value;
|
6175 | if (isNaN(ecx - ecy + rx - ry)) {
|
6176 | return;
|
6177 | }
|
6178 | var ePathData =
|
6179 | 'M' + ecx + ' ' + (ecy - ry) +
|
6180 | 'A' + rx + ' ' + ry + ' 0 1 0 ' + ecx + ' ' + (ecy + ry) +
|
6181 | 'A' + rx + ' ' + ry + ' 0 1 0 ' + ecx + ' ' + (ecy - ry) +
|
6182 | 'Z';
|
6183 | item.addAttr({
|
6184 | name: 'd',
|
6185 | value: ePathData,
|
6186 | prefix: '',
|
6187 | local: 'd',
|
6188 | });
|
6189 | item.renameElem('path').removeAttr(['cx', 'cy', 'rx', 'ry']);
|
6190 | }
|
6191 | };
|
6192 |
|
6193 | var convertShapeToPath = {
|
6194 | type: type$b,
|
6195 | active: active$b,
|
6196 | description: description$b,
|
6197 | params: params$6,
|
6198 | fn: fn$b
|
6199 | };
|
6200 |
|
6201 |
|
6202 |
|
6203 | var type$c = 'perItem';
|
6204 |
|
6205 | var active$c = true;
|
6206 |
|
6207 | var description$c = 'converts style to attributes';
|
6208 |
|
6209 | var params$7 = {
|
6210 | keepImportant: false
|
6211 | };
|
6212 |
|
6213 | var stylingProps = _collections.attrsGroups.presentation,
|
6214 | rEscape = '\\\\(?:[0-9a-f]{1,6}\\s?|\\r\\n|.)',
|
6215 | rAttr = '\\s*(' + g('[^:;\\\\]', rEscape) + '*?)\\s*',
|
6216 | rSingleQuotes = "'(?:[^'\\n\\r\\\\]|" + rEscape + ")*?(?:'|$)",
|
6217 | rQuotes = '"(?:[^"\\n\\r\\\\]|' + rEscape + ')*?(?:"|$)',
|
6218 | rQuotedString = new RegExp('^' + g(rSingleQuotes, rQuotes) + '$'),
|
6219 |
|
6220 |
|
6221 |
|
6222 | rParenthesis = '\\(' + g('[^\'"()\\\\]+', rEscape, rSingleQuotes, rQuotes) + '*?' + '\\)',
|
6223 |
|
6224 |
|
6225 | rValue = '\\s*(' + g('[^!\'"();\\\\]+?', rEscape, rSingleQuotes, rQuotes, rParenthesis, '[^;]*?') + '*?' + ')',
|
6226 |
|
6227 |
|
6228 | rDeclEnd = '\\s*(?:;\\s*|$)',
|
6229 |
|
6230 |
|
6231 | rImportant = '(\\s*!important(?![-(\w]))?',
|
6232 |
|
6233 |
|
6234 | regDeclarationBlock = new RegExp(rAttr + ':' + rValue + rImportant + rDeclEnd, 'ig'),
|
6235 |
|
6236 |
|
6237 | regStripComments = new RegExp(g(rEscape, rSingleQuotes, rQuotes, '/\\*[^]*?\\*/'), 'ig');
|
6238 |
|
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 |
|
6245 |
|
6246 |
|
6247 |
|
6248 |
|
6249 |
|
6250 |
|
6251 |
|
6252 |
|
6253 |
|
6254 |
|
6255 |
|
6256 |
|
6257 | var fn$c = function(item, params) {
|
6258 |
|
6259 |
|
6260 | if (item.elem && item.hasAttr('style')) {
|
6261 |
|
6262 | var styleValue = item.attr('style').value,
|
6263 | styles = [],
|
6264 | attrs = {};
|
6265 |
|
6266 |
|
6267 | styleValue = styleValue.replace(regStripComments, function(match) {
|
6268 | return match[0] == '/' ? '' :
|
6269 | match[0] == '\\' && /[-g-z]/i.test(match[1]) ? match[1] : match;
|
6270 | });
|
6271 |
|
6272 | regDeclarationBlock.lastIndex = 0;
|
6273 | for (var rule; rule = regDeclarationBlock.exec(styleValue);) {
|
6274 | if (!params.keepImportant || !rule[3]) {
|
6275 | styles.push([rule[1], rule[2]]);
|
6276 | }
|
6277 | }
|
6278 |
|
6279 | if (styles.length) {
|
6280 |
|
6281 | styles = styles.filter(function(style) {
|
6282 | if (style[0]) {
|
6283 | var prop = style[0].toLowerCase(),
|
6284 | val = style[1];
|
6285 |
|
6286 | if (rQuotedString.test(val)) {
|
6287 | val = val.slice(1, -1);
|
6288 | }
|
6289 |
|
6290 | if (stylingProps.indexOf(prop) > -1) {
|
6291 |
|
6292 | attrs[prop] = {
|
6293 | name: prop,
|
6294 | value: val,
|
6295 | local: prop,
|
6296 | prefix: ''
|
6297 | };
|
6298 |
|
6299 | return false;
|
6300 | }
|
6301 | }
|
6302 |
|
6303 | return true;
|
6304 | });
|
6305 |
|
6306 | Object.assign(item.attrs, attrs);
|
6307 |
|
6308 | if (styles.length) {
|
6309 | item.attr('style').value = styles
|
6310 | .map(function(declaration) { return declaration.join(':') })
|
6311 | .join(';');
|
6312 | } else {
|
6313 | item.removeAttr('style');
|
6314 | }
|
6315 |
|
6316 | }
|
6317 |
|
6318 | }
|
6319 |
|
6320 | };
|
6321 |
|
6322 | function g() {
|
6323 | return '(?:' + Array.prototype.join.call(arguments, '|') + ')';
|
6324 | }
|
6325 |
|
6326 | var convertStyleToAttrs = {
|
6327 | type: type$c,
|
6328 | active: active$c,
|
6329 | description: description$c,
|
6330 | params: params$7,
|
6331 | fn: fn$c
|
6332 | };
|
6333 |
|
6334 | var type$d = 'perItem';
|
6335 |
|
6336 | var active$d = true;
|
6337 |
|
6338 | var description$d = 'collapses multiple transformations and optimizes it';
|
6339 |
|
6340 | var params$8 = {
|
6341 | convertToShorts: true,
|
6342 |
|
6343 | floatPrecision: 3,
|
6344 | transformPrecision: 5,
|
6345 | matrixToTransform: true,
|
6346 | shortTranslate: true,
|
6347 | shortScale: true,
|
6348 | shortRotate: true,
|
6349 | removeUseless: true,
|
6350 | collapseIntoOne: true,
|
6351 | leadingZero: true,
|
6352 | negativeExtraSpace: false
|
6353 | };
|
6354 |
|
6355 | var cleanupOutData$1 = tools.cleanupOutData,
|
6356 | transform2js = _transforms.transform2js,
|
6357 | transformsMultiply = _transforms.transformsMultiply,
|
6358 | matrixToTransform = _transforms.matrixToTransform,
|
6359 | degRound,
|
6360 | floatRound,
|
6361 | transformRound;
|
6362 |
|
6363 |
|
6364 |
|
6365 |
|
6366 |
|
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 |
|
6375 |
|
6376 |
|
6377 | var fn$d = function(item, params) {
|
6378 |
|
6379 | if (item.elem) {
|
6380 |
|
6381 |
|
6382 | if (item.hasAttr('transform')) {
|
6383 | convertTransform(item, 'transform', params);
|
6384 | }
|
6385 |
|
6386 |
|
6387 | if (item.hasAttr('gradientTransform')) {
|
6388 | convertTransform(item, 'gradientTransform', params);
|
6389 | }
|
6390 |
|
6391 |
|
6392 | if (item.hasAttr('patternTransform')) {
|
6393 | convertTransform(item, 'patternTransform', params);
|
6394 | }
|
6395 |
|
6396 | }
|
6397 |
|
6398 | };
|
6399 |
|
6400 |
|
6401 |
|
6402 |
|
6403 |
|
6404 |
|
6405 |
|
6406 |
|
6407 | function convertTransform(item, attrName, params) {
|
6408 | var data = transform2js(item.attr(attrName).value);
|
6409 | params = definePrecision(data, params);
|
6410 |
|
6411 | if (params.collapseIntoOne && data.length > 1) {
|
6412 | data = [transformsMultiply(data)];
|
6413 | }
|
6414 |
|
6415 | if (params.convertToShorts) {
|
6416 | data = convertToShorts(data, params);
|
6417 | } else {
|
6418 | data.forEach(roundTransform);
|
6419 | }
|
6420 |
|
6421 | if (params.removeUseless) {
|
6422 | data = removeUseless(data);
|
6423 | }
|
6424 |
|
6425 | if (data.length) {
|
6426 | item.attr(attrName).value = js2transform(data, params);
|
6427 | } else {
|
6428 | item.removeAttr(attrName);
|
6429 | }
|
6430 | }
|
6431 |
|
6432 |
|
6433 |
|
6434 |
|
6435 |
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 | function definePrecision(data, params) {
|
6444 |
|
6445 | var matrixData = data.reduce(getMatrixData, []),
|
6446 | significantDigits = params.transformPrecision;
|
6447 |
|
6448 |
|
6449 | params = Object.assign({}, params);
|
6450 |
|
6451 |
|
6452 | if (matrixData.length) {
|
6453 | params.transformPrecision = Math.min(params.transformPrecision,
|
6454 | Math.max.apply(Math, matrixData.map(floatDigits)) || params.transformPrecision);
|
6455 |
|
6456 | significantDigits = Math.max.apply(Math, matrixData.map(function(n) {
|
6457 | return String(n).replace(/\D+/g, '').length;
|
6458 | }));
|
6459 | }
|
6460 |
|
6461 | if (!('degPrecision' in params)) {
|
6462 | params.degPrecision = Math.max(0, Math.min(params.floatPrecision, significantDigits - 2));
|
6463 | }
|
6464 |
|
6465 | floatRound = params.floatPrecision >= 1 && params.floatPrecision < 20 ?
|
6466 | smartRound.bind(this, params.floatPrecision) :
|
6467 | round$1;
|
6468 | degRound = params.degPrecision >= 1 && params.floatPrecision < 20 ?
|
6469 | smartRound.bind(this, params.degPrecision) :
|
6470 | round$1;
|
6471 | transformRound = params.transformPrecision >= 1 && params.floatPrecision < 20 ?
|
6472 | smartRound.bind(this, params.transformPrecision) :
|
6473 | round$1;
|
6474 |
|
6475 | return params;
|
6476 | }
|
6477 |
|
6478 |
|
6479 |
|
6480 |
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 | function getMatrixData(a, b) {
|
6486 | return b.name == 'matrix' ? a.concat(b.data.slice(0, 4)) : a;
|
6487 | }
|
6488 |
|
6489 |
|
6490 |
|
6491 |
|
6492 | function floatDigits(n) {
|
6493 | return (n = String(n)).slice(n.indexOf('.')).length - 1;
|
6494 | }
|
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 |
|
6500 |
|
6501 |
|
6502 |
|
6503 | function convertToShorts(transforms, params) {
|
6504 |
|
6505 | for(var i = 0; i < transforms.length; i++) {
|
6506 |
|
6507 | var transform = transforms[i];
|
6508 |
|
6509 |
|
6510 | if (
|
6511 | params.matrixToTransform &&
|
6512 | transform.name === 'matrix'
|
6513 | ) {
|
6514 | var decomposed = matrixToTransform(transform, params);
|
6515 | if (decomposed != transform &&
|
6516 | js2transform(decomposed, params).length <= js2transform([transform], params).length) {
|
6517 |
|
6518 | transforms.splice.apply(transforms, [i, 1].concat(decomposed));
|
6519 | }
|
6520 | transform = transforms[i];
|
6521 | }
|
6522 |
|
6523 |
|
6524 |
|
6525 | roundTransform(transform);
|
6526 |
|
6527 |
|
6528 |
|
6529 | if (
|
6530 | params.shortTranslate &&
|
6531 | transform.name === 'translate' &&
|
6532 | transform.data.length === 2 &&
|
6533 | !transform.data[1]
|
6534 | ) {
|
6535 | transform.data.pop();
|
6536 | }
|
6537 |
|
6538 |
|
6539 |
|
6540 | if (
|
6541 | params.shortScale &&
|
6542 | transform.name === 'scale' &&
|
6543 | transform.data.length === 2 &&
|
6544 | transform.data[0] === transform.data[1]
|
6545 | ) {
|
6546 | transform.data.pop();
|
6547 | }
|
6548 |
|
6549 |
|
6550 |
|
6551 | if (
|
6552 | params.shortRotate &&
|
6553 | transforms[i - 2] &&
|
6554 | transforms[i - 2].name === 'translate' &&
|
6555 | transforms[i - 1].name === 'rotate' &&
|
6556 | transforms[i].name === 'translate' &&
|
6557 | transforms[i - 2].data[0] === -transforms[i].data[0] &&
|
6558 | transforms[i - 2].data[1] === -transforms[i].data[1]
|
6559 | ) {
|
6560 | transforms.splice(i - 2, 3, {
|
6561 | name: 'rotate',
|
6562 | data: [
|
6563 | transforms[i - 1].data[0],
|
6564 | transforms[i - 2].data[0],
|
6565 | transforms[i - 2].data[1]
|
6566 | ]
|
6567 | });
|
6568 |
|
6569 |
|
6570 | i -= 2;
|
6571 |
|
6572 | transform = transforms[i];
|
6573 | }
|
6574 |
|
6575 | }
|
6576 |
|
6577 | return transforms;
|
6578 |
|
6579 | }
|
6580 |
|
6581 |
|
6582 |
|
6583 |
|
6584 |
|
6585 |
|
6586 |
|
6587 | function removeUseless(transforms) {
|
6588 |
|
6589 | return transforms.filter(function(transform) {
|
6590 |
|
6591 |
|
6592 | if (
|
6593 | ['translate', 'rotate', 'skewX', 'skewY'].indexOf(transform.name) > -1 &&
|
6594 | (transform.data.length == 1 || transform.name == 'rotate') &&
|
6595 | !transform.data[0] ||
|
6596 |
|
6597 |
|
6598 | transform.name == 'translate' &&
|
6599 | !transform.data[0] &&
|
6600 | !transform.data[1] ||
|
6601 |
|
6602 |
|
6603 | transform.name == 'scale' &&
|
6604 | transform.data[0] == 1 &&
|
6605 | (transform.data.length < 2 || transform.data[1] == 1) ||
|
6606 |
|
6607 |
|
6608 | transform.name == 'matrix' &&
|
6609 | transform.data[0] == 1 &&
|
6610 | transform.data[3] == 1 &&
|
6611 | !(transform.data[1] || transform.data[2] || transform.data[4] || transform.data[5])
|
6612 | ) {
|
6613 | return false;
|
6614 | }
|
6615 |
|
6616 | return true;
|
6617 |
|
6618 | });
|
6619 |
|
6620 | }
|
6621 |
|
6622 |
|
6623 |
|
6624 |
|
6625 |
|
6626 |
|
6627 |
|
6628 |
|
6629 | function js2transform(transformJS, params) {
|
6630 |
|
6631 | var transformString = '';
|
6632 |
|
6633 |
|
6634 | transformJS.forEach(function(transform) {
|
6635 | roundTransform(transform);
|
6636 | transformString += (transformString && ' ') + transform.name + '(' + cleanupOutData$1(transform.data, params) + ')';
|
6637 | });
|
6638 |
|
6639 | return transformString;
|
6640 |
|
6641 | }
|
6642 |
|
6643 | function roundTransform(transform) {
|
6644 | switch (transform.name) {
|
6645 | case 'translate':
|
6646 | transform.data = floatRound(transform.data);
|
6647 | break;
|
6648 | case 'rotate':
|
6649 | transform.data = degRound(transform.data.slice(0, 1)).concat(floatRound(transform.data.slice(1)));
|
6650 | break;
|
6651 | case 'skewX':
|
6652 | case 'skewY':
|
6653 | transform.data = degRound(transform.data);
|
6654 | break;
|
6655 | case 'scale':
|
6656 | transform.data = transformRound(transform.data);
|
6657 | break;
|
6658 | case 'matrix':
|
6659 | transform.data = transformRound(transform.data.slice(0, 4)).concat(floatRound(transform.data.slice(4)));
|
6660 | break;
|
6661 | }
|
6662 | return transform;
|
6663 | }
|
6664 |
|
6665 |
|
6666 |
|
6667 |
|
6668 |
|
6669 |
|
6670 |
|
6671 | function round$1(data) {
|
6672 | return data.map(Math.round);
|
6673 | }
|
6674 |
|
6675 |
|
6676 |
|
6677 |
|
6678 |
|
6679 |
|
6680 |
|
6681 |
|
6682 |
|
6683 |
|
6684 | function smartRound(precision, data) {
|
6685 | for (var i = data.length, tolerance = +Math.pow(.1, precision).toFixed(precision); i--;) {
|
6686 | if (data[i].toFixed(precision) != data[i]) {
|
6687 | var rounded = +data[i].toFixed(precision - 1);
|
6688 | data[i] = +Math.abs(rounded - data[i]).toFixed(precision + 1) >= tolerance ?
|
6689 | +data[i].toFixed(precision) :
|
6690 | rounded;
|
6691 | }
|
6692 | }
|
6693 | return data;
|
6694 | }
|
6695 |
|
6696 | var convertTransform_1 = {
|
6697 | type: type$d,
|
6698 | active: active$d,
|
6699 | description: description$d,
|
6700 | params: params$8,
|
6701 | fn: fn$d
|
6702 | };
|
6703 |
|
6704 |
|
6705 |
|
6706 |
|
6707 |
|
6708 |
|
6709 |
|
6710 |
|
6711 |
|
6712 |
|
6713 |
|
6714 |
|
6715 |
|
6716 |
|
6717 |
|
6718 |
|
6719 |
|
6720 | function createItem(data) {
|
6721 | return {
|
6722 | prev: null,
|
6723 | next: null,
|
6724 | data: data
|
6725 | };
|
6726 | }
|
6727 |
|
6728 | function allocateCursor(node, prev, next) {
|
6729 | var cursor;
|
6730 |
|
6731 | if (cursors !== null) {
|
6732 | cursor = cursors;
|
6733 | cursors = cursors.cursor;
|
6734 | cursor.prev = prev;
|
6735 | cursor.next = next;
|
6736 | cursor.cursor = node.cursor;
|
6737 | } else {
|
6738 | cursor = {
|
6739 | prev: prev,
|
6740 | next: next,
|
6741 | cursor: node.cursor
|
6742 | };
|
6743 | }
|
6744 |
|
6745 | node.cursor = cursor;
|
6746 |
|
6747 | return cursor;
|
6748 | }
|
6749 |
|
6750 | function releaseCursor(node) {
|
6751 | var cursor = node.cursor;
|
6752 |
|
6753 | node.cursor = cursor.cursor;
|
6754 | cursor.prev = null;
|
6755 | cursor.next = null;
|
6756 | cursor.cursor = cursors;
|
6757 | cursors = cursor;
|
6758 | }
|
6759 |
|
6760 | var cursors = null;
|
6761 | var List = function() {
|
6762 | this.cursor = null;
|
6763 | this.head = null;
|
6764 | this.tail = null;
|
6765 | };
|
6766 |
|
6767 | List.createItem = createItem;
|
6768 | List.prototype.createItem = createItem;
|
6769 |
|
6770 | List.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) {
|
6771 | var cursor = this.cursor;
|
6772 |
|
6773 | while (cursor !== null) {
|
6774 | if (cursor.prev === prevOld) {
|
6775 | cursor.prev = prevNew;
|
6776 | }
|
6777 |
|
6778 | if (cursor.next === nextOld) {
|
6779 | cursor.next = nextNew;
|
6780 | }
|
6781 |
|
6782 | cursor = cursor.cursor;
|
6783 | }
|
6784 | };
|
6785 |
|
6786 | List.prototype.getSize = function() {
|
6787 | var size = 0;
|
6788 | var cursor = this.head;
|
6789 |
|
6790 | while (cursor) {
|
6791 | size++;
|
6792 | cursor = cursor.next;
|
6793 | }
|
6794 |
|
6795 | return size;
|
6796 | };
|
6797 |
|
6798 | List.prototype.fromArray = function(array) {
|
6799 | var cursor = null;
|
6800 |
|
6801 | this.head = null;
|
6802 |
|
6803 | for (var i = 0; i < array.length; i++) {
|
6804 | var item = createItem(array[i]);
|
6805 |
|
6806 | if (cursor !== null) {
|
6807 | cursor.next = item;
|
6808 | } else {
|
6809 | this.head = item;
|
6810 | }
|
6811 |
|
6812 | item.prev = cursor;
|
6813 | cursor = item;
|
6814 | }
|
6815 |
|
6816 | this.tail = cursor;
|
6817 |
|
6818 | return this;
|
6819 | };
|
6820 |
|
6821 | List.prototype.toArray = function() {
|
6822 | var cursor = this.head;
|
6823 | var result = [];
|
6824 |
|
6825 | while (cursor) {
|
6826 | result.push(cursor.data);
|
6827 | cursor = cursor.next;
|
6828 | }
|
6829 |
|
6830 | return result;
|
6831 | };
|
6832 |
|
6833 | List.prototype.toJSON = List.prototype.toArray;
|
6834 |
|
6835 | List.prototype.isEmpty = function() {
|
6836 | return this.head === null;
|
6837 | };
|
6838 |
|
6839 | List.prototype.first = function() {
|
6840 | return this.head && this.head.data;
|
6841 | };
|
6842 |
|
6843 | List.prototype.last = function() {
|
6844 | return this.tail && this.tail.data;
|
6845 | };
|
6846 |
|
6847 | List.prototype.each = function(fn, context) {
|
6848 | var item;
|
6849 |
|
6850 | if (context === undefined) {
|
6851 | context = this;
|
6852 | }
|
6853 |
|
6854 |
|
6855 | var cursor = allocateCursor(this, null, this.head);
|
6856 |
|
6857 | while (cursor.next !== null) {
|
6858 | item = cursor.next;
|
6859 | cursor.next = item.next;
|
6860 |
|
6861 | fn.call(context, item.data, item, this);
|
6862 | }
|
6863 |
|
6864 |
|
6865 | releaseCursor(this);
|
6866 | };
|
6867 |
|
6868 | List.prototype.forEach = List.prototype.each;
|
6869 |
|
6870 | List.prototype.eachRight = function(fn, context) {
|
6871 | var item;
|
6872 |
|
6873 | if (context === undefined) {
|
6874 | context = this;
|
6875 | }
|
6876 |
|
6877 |
|
6878 | var cursor = allocateCursor(this, this.tail, null);
|
6879 |
|
6880 | while (cursor.prev !== null) {
|
6881 | item = cursor.prev;
|
6882 | cursor.prev = item.prev;
|
6883 |
|
6884 | fn.call(context, item.data, item, this);
|
6885 | }
|
6886 |
|
6887 |
|
6888 | releaseCursor(this);
|
6889 | };
|
6890 |
|
6891 | List.prototype.forEachRight = List.prototype.eachRight;
|
6892 |
|
6893 | List.prototype.reduce = function(fn, initialValue, context) {
|
6894 | var item;
|
6895 |
|
6896 | if (context === undefined) {
|
6897 | context = this;
|
6898 | }
|
6899 |
|
6900 |
|
6901 | var cursor = allocateCursor(this, null, this.head);
|
6902 | var acc = initialValue;
|
6903 |
|
6904 | while (cursor.next !== null) {
|
6905 | item = cursor.next;
|
6906 | cursor.next = item.next;
|
6907 |
|
6908 | acc = fn.call(context, acc, item.data, item, this);
|
6909 | }
|
6910 |
|
6911 |
|
6912 | releaseCursor(this);
|
6913 |
|
6914 | return acc;
|
6915 | };
|
6916 |
|
6917 | List.prototype.reduceRight = function(fn, initialValue, context) {
|
6918 | var item;
|
6919 |
|
6920 | if (context === undefined) {
|
6921 | context = this;
|
6922 | }
|
6923 |
|
6924 |
|
6925 | var cursor = allocateCursor(this, this.tail, null);
|
6926 | var acc = initialValue;
|
6927 |
|
6928 | while (cursor.prev !== null) {
|
6929 | item = cursor.prev;
|
6930 | cursor.prev = item.prev;
|
6931 |
|
6932 | acc = fn.call(context, acc, item.data, item, this);
|
6933 | }
|
6934 |
|
6935 |
|
6936 | releaseCursor(this);
|
6937 |
|
6938 | return acc;
|
6939 | };
|
6940 |
|
6941 | List.prototype.nextUntil = function(start, fn, context) {
|
6942 | if (start === null) {
|
6943 | return;
|
6944 | }
|
6945 |
|
6946 | var item;
|
6947 |
|
6948 | if (context === undefined) {
|
6949 | context = this;
|
6950 | }
|
6951 |
|
6952 |
|
6953 | var cursor = allocateCursor(this, null, start);
|
6954 |
|
6955 | while (cursor.next !== null) {
|
6956 | item = cursor.next;
|
6957 | cursor.next = item.next;
|
6958 |
|
6959 | if (fn.call(context, item.data, item, this)) {
|
6960 | break;
|
6961 | }
|
6962 | }
|
6963 |
|
6964 |
|
6965 | releaseCursor(this);
|
6966 | };
|
6967 |
|
6968 | List.prototype.prevUntil = function(start, fn, context) {
|
6969 | if (start === null) {
|
6970 | return;
|
6971 | }
|
6972 |
|
6973 | var item;
|
6974 |
|
6975 | if (context === undefined) {
|
6976 | context = this;
|
6977 | }
|
6978 |
|
6979 |
|
6980 | var cursor = allocateCursor(this, start, null);
|
6981 |
|
6982 | while (cursor.prev !== null) {
|
6983 | item = cursor.prev;
|
6984 | cursor.prev = item.prev;
|
6985 |
|
6986 | if (fn.call(context, item.data, item, this)) {
|
6987 | break;
|
6988 | }
|
6989 | }
|
6990 |
|
6991 |
|
6992 | releaseCursor(this);
|
6993 | };
|
6994 |
|
6995 | List.prototype.some = function(fn, context) {
|
6996 | var cursor = this.head;
|
6997 |
|
6998 | if (context === undefined) {
|
6999 | context = this;
|
7000 | }
|
7001 |
|
7002 | while (cursor !== null) {
|
7003 | if (fn.call(context, cursor.data, cursor, this)) {
|
7004 | return true;
|
7005 | }
|
7006 |
|
7007 | cursor = cursor.next;
|
7008 | }
|
7009 |
|
7010 | return false;
|
7011 | };
|
7012 |
|
7013 | List.prototype.map = function(fn, context) {
|
7014 | var result = new List();
|
7015 | var cursor = this.head;
|
7016 |
|
7017 | if (context === undefined) {
|
7018 | context = this;
|
7019 | }
|
7020 |
|
7021 | while (cursor !== null) {
|
7022 | result.appendData(fn.call(context, cursor.data, cursor, this));
|
7023 | cursor = cursor.next;
|
7024 | }
|
7025 |
|
7026 | return result;
|
7027 | };
|
7028 |
|
7029 | List.prototype.filter = function(fn, context) {
|
7030 | var result = new List();
|
7031 | var cursor = this.head;
|
7032 |
|
7033 | if (context === undefined) {
|
7034 | context = this;
|
7035 | }
|
7036 |
|
7037 | while (cursor !== null) {
|
7038 | if (fn.call(context, cursor.data, cursor, this)) {
|
7039 | result.appendData(cursor.data);
|
7040 | }
|
7041 | cursor = cursor.next;
|
7042 | }
|
7043 |
|
7044 | return result;
|
7045 | };
|
7046 |
|
7047 | List.prototype.clear = function() {
|
7048 | this.head = null;
|
7049 | this.tail = null;
|
7050 | };
|
7051 |
|
7052 | List.prototype.copy = function() {
|
7053 | var result = new List();
|
7054 | var cursor = this.head;
|
7055 |
|
7056 | while (cursor !== null) {
|
7057 | result.insert(createItem(cursor.data));
|
7058 | cursor = cursor.next;
|
7059 | }
|
7060 |
|
7061 | return result;
|
7062 | };
|
7063 |
|
7064 | List.prototype.prepend = function(item) {
|
7065 |
|
7066 |
|
7067 |
|
7068 | this.updateCursors(null, item, this.head, item);
|
7069 |
|
7070 |
|
7071 | if (this.head !== null) {
|
7072 |
|
7073 | this.head.prev = item;
|
7074 |
|
7075 |
|
7076 | item.next = this.head;
|
7077 | } else {
|
7078 |
|
7079 |
|
7080 | this.tail = item;
|
7081 | }
|
7082 |
|
7083 |
|
7084 | this.head = item;
|
7085 |
|
7086 | return this;
|
7087 | };
|
7088 |
|
7089 | List.prototype.prependData = function(data) {
|
7090 | return this.prepend(createItem(data));
|
7091 | };
|
7092 |
|
7093 | List.prototype.append = function(item) {
|
7094 | return this.insert(item);
|
7095 | };
|
7096 |
|
7097 | List.prototype.appendData = function(data) {
|
7098 | return this.insert(createItem(data));
|
7099 | };
|
7100 |
|
7101 | List.prototype.insert = function(item, before) {
|
7102 | if (before !== undefined && before !== null) {
|
7103 |
|
7104 |
|
7105 |
|
7106 | this.updateCursors(before.prev, item, before, item);
|
7107 |
|
7108 | if (before.prev === null) {
|
7109 |
|
7110 | if (this.head !== before) {
|
7111 | throw new Error('before doesn\'t belong to list');
|
7112 | }
|
7113 |
|
7114 |
|
7115 |
|
7116 | this.head = item;
|
7117 | before.prev = item;
|
7118 | item.next = before;
|
7119 |
|
7120 | this.updateCursors(null, item);
|
7121 | } else {
|
7122 |
|
7123 |
|
7124 | before.prev.next = item;
|
7125 | item.prev = before.prev;
|
7126 |
|
7127 | before.prev = item;
|
7128 | item.next = before;
|
7129 | }
|
7130 | } else {
|
7131 |
|
7132 |
|
7133 |
|
7134 | this.updateCursors(this.tail, item, null, item);
|
7135 |
|
7136 |
|
7137 | if (this.tail !== null) {
|
7138 |
|
7139 | this.tail.next = item;
|
7140 |
|
7141 |
|
7142 | item.prev = this.tail;
|
7143 | } else {
|
7144 |
|
7145 |
|
7146 | this.head = item;
|
7147 | }
|
7148 |
|
7149 |
|
7150 | this.tail = item;
|
7151 | }
|
7152 |
|
7153 | return this;
|
7154 | };
|
7155 |
|
7156 | List.prototype.insertData = function(data, before) {
|
7157 | return this.insert(createItem(data), before);
|
7158 | };
|
7159 |
|
7160 | List.prototype.remove = function(item) {
|
7161 |
|
7162 |
|
7163 |
|
7164 | this.updateCursors(item, item.prev, item, item.next);
|
7165 |
|
7166 | if (item.prev !== null) {
|
7167 | item.prev.next = item.next;
|
7168 | } else {
|
7169 | if (this.head !== item) {
|
7170 | throw new Error('item doesn\'t belong to list');
|
7171 | }
|
7172 |
|
7173 | this.head = item.next;
|
7174 | }
|
7175 |
|
7176 | if (item.next !== null) {
|
7177 | item.next.prev = item.prev;
|
7178 | } else {
|
7179 | if (this.tail !== item) {
|
7180 | throw new Error('item doesn\'t belong to list');
|
7181 | }
|
7182 |
|
7183 | this.tail = item.prev;
|
7184 | }
|
7185 |
|
7186 | item.prev = null;
|
7187 | item.next = null;
|
7188 |
|
7189 | return item;
|
7190 | };
|
7191 |
|
7192 | List.prototype.push = function(data) {
|
7193 | this.insert(createItem(data));
|
7194 | };
|
7195 |
|
7196 | List.prototype.pop = function() {
|
7197 | if (this.tail !== null) {
|
7198 | return this.remove(this.tail);
|
7199 | }
|
7200 | };
|
7201 |
|
7202 | List.prototype.unshift = function(data) {
|
7203 | this.prepend(createItem(data));
|
7204 | };
|
7205 |
|
7206 | List.prototype.shift = function() {
|
7207 | if (this.head !== null) {
|
7208 | return this.remove(this.head);
|
7209 | }
|
7210 | };
|
7211 |
|
7212 | List.prototype.prependList = function(list) {
|
7213 | return this.insertList(list, this.head);
|
7214 | };
|
7215 |
|
7216 | List.prototype.appendList = function(list) {
|
7217 | return this.insertList(list);
|
7218 | };
|
7219 |
|
7220 | List.prototype.insertList = function(list, before) {
|
7221 |
|
7222 | if (list.head === null) {
|
7223 | return this;
|
7224 | }
|
7225 |
|
7226 | if (before !== undefined && before !== null) {
|
7227 | this.updateCursors(before.prev, list.tail, before, list.head);
|
7228 |
|
7229 |
|
7230 | if (before.prev !== null) {
|
7231 |
|
7232 | before.prev.next = list.head;
|
7233 | list.head.prev = before.prev;
|
7234 | } else {
|
7235 | this.head = list.head;
|
7236 | }
|
7237 |
|
7238 | before.prev = list.tail;
|
7239 | list.tail.next = before;
|
7240 | } else {
|
7241 | this.updateCursors(this.tail, list.tail, null, list.head);
|
7242 |
|
7243 |
|
7244 | if (this.tail !== null) {
|
7245 |
|
7246 |
|
7247 |
|
7248 |
|
7249 | this.tail.next = list.head;
|
7250 |
|
7251 |
|
7252 | list.head.prev = this.tail;
|
7253 | } else {
|
7254 |
|
7255 |
|
7256 | this.head = list.head;
|
7257 | }
|
7258 |
|
7259 |
|
7260 | this.tail = list.tail;
|
7261 | }
|
7262 |
|
7263 | list.head = null;
|
7264 | list.tail = null;
|
7265 |
|
7266 | return this;
|
7267 | };
|
7268 |
|
7269 | List.prototype.replace = function(oldItem, newItemOrList) {
|
7270 | if ('head' in newItemOrList) {
|
7271 | this.insertList(newItemOrList, oldItem);
|
7272 | } else {
|
7273 | this.insert(newItemOrList, oldItem);
|
7274 | }
|
7275 |
|
7276 | this.remove(oldItem);
|
7277 | };
|
7278 |
|
7279 | var List_1 = List;
|
7280 |
|
7281 | var createCustomError = function createCustomError(name, message) {
|
7282 |
|
7283 |
|
7284 | var error = Object.create(SyntaxError.prototype);
|
7285 | var errorStack = new Error();
|
7286 |
|
7287 | error.name = name;
|
7288 | error.message = message;
|
7289 |
|
7290 | Object.defineProperty(error, 'stack', {
|
7291 | get: function() {
|
7292 | return (errorStack.stack || '').replace(/^(.+\n){1,3}/, name + ': ' + message + '\n');
|
7293 | }
|
7294 | });
|
7295 |
|
7296 | return error;
|
7297 | };
|
7298 |
|
7299 | var MAX_LINE_LENGTH = 100;
|
7300 | var OFFSET_CORRECTION = 60;
|
7301 | var TAB_REPLACEMENT = ' ';
|
7302 |
|
7303 | function sourceFragment(error, extraLines) {
|
7304 | function processLines(start, end) {
|
7305 | return lines.slice(start, end).map(function(line, idx) {
|
7306 | var num = String(start + idx + 1);
|
7307 |
|
7308 | while (num.length < maxNumLength) {
|
7309 | num = ' ' + num;
|
7310 | }
|
7311 |
|
7312 | return num + ' |' + line;
|
7313 | }).join('\n');
|
7314 | }
|
7315 |
|
7316 | var lines = error.source.split(/\r\n?|\n|\f/);
|
7317 | var line = error.line;
|
7318 | var column = error.column;
|
7319 | var startLine = Math.max(1, line - extraLines) - 1;
|
7320 | var endLine = Math.min(line + extraLines, lines.length + 1);
|
7321 | var maxNumLength = Math.max(4, String(endLine).length) + 1;
|
7322 | var cutLeft = 0;
|
7323 |
|
7324 |
|
7325 | column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length;
|
7326 |
|
7327 | if (column > MAX_LINE_LENGTH) {
|
7328 | cutLeft = column - OFFSET_CORRECTION + 3;
|
7329 | column = OFFSET_CORRECTION - 2;
|
7330 | }
|
7331 |
|
7332 | for (var i = startLine; i <= endLine; i++) {
|
7333 | if (i >= 0 && i < lines.length) {
|
7334 | lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
|
7335 | lines[i] =
|
7336 | (cutLeft > 0 && lines[i].length > cutLeft ? '\u2026' : '') +
|
7337 | lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) +
|
7338 | (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? '\u2026' : '');
|
7339 | }
|
7340 | }
|
7341 |
|
7342 | return [
|
7343 | processLines(startLine, line),
|
7344 | new Array(column + maxNumLength + 2).join('-') + '^',
|
7345 | processLines(line, endLine)
|
7346 | ].filter(Boolean).join('\n');
|
7347 | }
|
7348 |
|
7349 | var SyntaxError$1 = function(message, source, offset, line, column) {
|
7350 | var error = createCustomError('SyntaxError', message);
|
7351 |
|
7352 | error.source = source;
|
7353 | error.offset = offset;
|
7354 | error.line = line;
|
7355 | error.column = column;
|
7356 |
|
7357 | error.sourceFragment = function(extraLines) {
|
7358 | return sourceFragment(error, isNaN(extraLines) ? 0 : extraLines);
|
7359 | };
|
7360 | Object.defineProperty(error, 'formattedMessage', {
|
7361 | get: function() {
|
7362 | return (
|
7363 | 'Parse error: ' + error.message + '\n' +
|
7364 | sourceFragment(error, 2)
|
7365 | );
|
7366 | }
|
7367 | });
|
7368 |
|
7369 |
|
7370 | error.parseError = {
|
7371 | offset: offset,
|
7372 | line: line,
|
7373 | column: column
|
7374 | };
|
7375 |
|
7376 | return error;
|
7377 | };
|
7378 |
|
7379 | var _SyntaxError = SyntaxError$1;
|
7380 |
|
7381 |
|
7382 |
|
7383 | var TYPE = {
|
7384 | EOF: 0,
|
7385 | Ident: 1,
|
7386 | Function: 2,
|
7387 | AtKeyword: 3,
|
7388 | Hash: 4,
|
7389 | String: 5,
|
7390 | BadString: 6,
|
7391 | Url: 7,
|
7392 | BadUrl: 8,
|
7393 | Delim: 9,
|
7394 | Number: 10,
|
7395 | Percentage: 11,
|
7396 | Dimension: 12,
|
7397 | WhiteSpace: 13,
|
7398 | CDO: 14,
|
7399 | CDC: 15,
|
7400 | Colon: 16,
|
7401 | Semicolon: 17,
|
7402 | Comma: 18,
|
7403 | LeftSquareBracket: 19,
|
7404 | RightSquareBracket: 20,
|
7405 | LeftParenthesis: 21,
|
7406 | RightParenthesis: 22,
|
7407 | LeftCurlyBracket: 23,
|
7408 | RightCurlyBracket: 24,
|
7409 | Comment: 25
|
7410 | };
|
7411 |
|
7412 | var NAME = Object.keys(TYPE).reduce(function(result, key) {
|
7413 | result[TYPE[key]] = key;
|
7414 | return result;
|
7415 | }, {});
|
7416 |
|
7417 | var _const = {
|
7418 | TYPE: TYPE,
|
7419 | NAME: NAME
|
7420 | };
|
7421 |
|
7422 | var EOF = 0;
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 |
|
7429 | function isDigit(code) {
|
7430 | return code >= 0x0030 && code <= 0x0039;
|
7431 | }
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 | function isHexDigit(code) {
|
7437 | return (
|
7438 | isDigit(code) ||
|
7439 | (code >= 0x0041 && code <= 0x0046) ||
|
7440 | (code >= 0x0061 && code <= 0x0066)
|
7441 | );
|
7442 | }
|
7443 |
|
7444 |
|
7445 |
|
7446 | function isUppercaseLetter(code) {
|
7447 | return code >= 0x0041 && code <= 0x005A;
|
7448 | }
|
7449 |
|
7450 |
|
7451 |
|
7452 | function isLowercaseLetter(code) {
|
7453 | return code >= 0x0061 && code <= 0x007A;
|
7454 | }
|
7455 |
|
7456 |
|
7457 |
|
7458 | function isLetter(code) {
|
7459 | return isUppercaseLetter(code) || isLowercaseLetter(code);
|
7460 | }
|
7461 |
|
7462 |
|
7463 |
|
7464 | function isNonAscii(code) {
|
7465 | return code >= 0x0080;
|
7466 | }
|
7467 |
|
7468 |
|
7469 |
|
7470 | function isNameStart(code) {
|
7471 | return isLetter(code) || isNonAscii(code) || code === 0x005F;
|
7472 | }
|
7473 |
|
7474 |
|
7475 |
|
7476 | function isName(code) {
|
7477 | return isNameStart(code) || isDigit(code) || code === 0x002D;
|
7478 | }
|
7479 |
|
7480 |
|
7481 |
|
7482 |
|
7483 | function isNonPrintable(code) {
|
7484 | return (
|
7485 | (code >= 0x0000 && code <= 0x0008) ||
|
7486 | (code === 0x000B) ||
|
7487 | (code >= 0x000E && code <= 0x001F) ||
|
7488 | (code === 0x007F)
|
7489 | );
|
7490 | }
|
7491 |
|
7492 |
|
7493 |
|
7494 |
|
7495 |
|
7496 | function isNewline(code) {
|
7497 | return code === 0x000A || code === 0x000D || code === 0x000C;
|
7498 | }
|
7499 |
|
7500 |
|
7501 |
|
7502 | function isWhiteSpace(code) {
|
7503 | return isNewline(code) || code === 0x0020 || code === 0x0009;
|
7504 | }
|
7505 |
|
7506 |
|
7507 | function isValidEscape(first, second) {
|
7508 |
|
7509 | if (first !== 0x005C) {
|
7510 | return false;
|
7511 | }
|
7512 |
|
7513 |
|
7514 | if (isNewline(second) || second === EOF) {
|
7515 | return false;
|
7516 | }
|
7517 |
|
7518 |
|
7519 | return true;
|
7520 | }
|
7521 |
|
7522 |
|
7523 | function isIdentifierStart(first, second, third) {
|
7524 |
|
7525 |
|
7526 |
|
7527 | if (first === 0x002D) {
|
7528 |
|
7529 |
|
7530 | return (
|
7531 | isNameStart(second) ||
|
7532 | second === 0x002D ||
|
7533 | isValidEscape(second, third)
|
7534 | );
|
7535 | }
|
7536 |
|
7537 |
|
7538 | if (isNameStart(first)) {
|
7539 |
|
7540 | return true;
|
7541 | }
|
7542 |
|
7543 |
|
7544 | if (first === 0x005C) {
|
7545 |
|
7546 | return isValidEscape(first, second);
|
7547 | }
|
7548 |
|
7549 |
|
7550 |
|
7551 | return false;
|
7552 | }
|
7553 |
|
7554 |
|
7555 | function isNumberStart(first, second, third) {
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 | if (first === 0x002B || first === 0x002D) {
|
7561 |
|
7562 | if (isDigit(second)) {
|
7563 | return 2;
|
7564 | }
|
7565 |
|
7566 |
|
7567 |
|
7568 |
|
7569 | return second === 0x002E && isDigit(third) ? 3 : 0;
|
7570 | }
|
7571 |
|
7572 |
|
7573 | if (first === 0x002E) {
|
7574 |
|
7575 | return isDigit(second) ? 2 : 0;
|
7576 | }
|
7577 |
|
7578 |
|
7579 | if (isDigit(first)) {
|
7580 |
|
7581 | return 1;
|
7582 | }
|
7583 |
|
7584 |
|
7585 |
|
7586 | return 0;
|
7587 | }
|
7588 |
|
7589 |
|
7590 |
|
7591 |
|
7592 |
|
7593 |
|
7594 | function isBOM(code) {
|
7595 |
|
7596 | if (code === 0xFEFF) {
|
7597 | return 1;
|
7598 | }
|
7599 |
|
7600 |
|
7601 | if (code === 0xFFFE) {
|
7602 | return 1;
|
7603 | }
|
7604 |
|
7605 | return 0;
|
7606 | }
|
7607 |
|
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 |
|
7613 |
|
7614 |
|
7615 |
|
7616 |
|
7617 |
|
7618 | var CATEGORY = new Array(0x80);
|
7619 | charCodeCategory.Eof = 0x80;
|
7620 | charCodeCategory.WhiteSpace = 0x82;
|
7621 | charCodeCategory.Digit = 0x83;
|
7622 | charCodeCategory.NameStart = 0x84;
|
7623 | charCodeCategory.NonPrintable = 0x85;
|
7624 |
|
7625 | for (var i = 0; i < CATEGORY.length; i++) {
|
7626 | switch (true) {
|
7627 | case isWhiteSpace(i):
|
7628 | CATEGORY[i] = charCodeCategory.WhiteSpace;
|
7629 | break;
|
7630 |
|
7631 | case isDigit(i):
|
7632 | CATEGORY[i] = charCodeCategory.Digit;
|
7633 | break;
|
7634 |
|
7635 | case isNameStart(i):
|
7636 | CATEGORY[i] = charCodeCategory.NameStart;
|
7637 | break;
|
7638 |
|
7639 | case isNonPrintable(i):
|
7640 | CATEGORY[i] = charCodeCategory.NonPrintable;
|
7641 | break;
|
7642 |
|
7643 | default:
|
7644 | CATEGORY[i] = i || charCodeCategory.Eof;
|
7645 | }
|
7646 | }
|
7647 |
|
7648 | function charCodeCategory(code) {
|
7649 | return code < 0x80 ? CATEGORY[code] : charCodeCategory.NameStart;
|
7650 | }
|
7651 | var charCodeDefinitions = {
|
7652 | isDigit: isDigit,
|
7653 | isHexDigit: isHexDigit,
|
7654 | isUppercaseLetter: isUppercaseLetter,
|
7655 | isLowercaseLetter: isLowercaseLetter,
|
7656 | isLetter: isLetter,
|
7657 | isNonAscii: isNonAscii,
|
7658 | isNameStart: isNameStart,
|
7659 | isName: isName,
|
7660 | isNonPrintable: isNonPrintable,
|
7661 | isNewline: isNewline,
|
7662 | isWhiteSpace: isWhiteSpace,
|
7663 | isValidEscape: isValidEscape,
|
7664 | isIdentifierStart: isIdentifierStart,
|
7665 | isNumberStart: isNumberStart,
|
7666 |
|
7667 | isBOM: isBOM,
|
7668 | charCodeCategory: charCodeCategory
|
7669 | };
|
7670 |
|
7671 | var isDigit$1 = charCodeDefinitions.isDigit;
|
7672 | var isHexDigit$1 = charCodeDefinitions.isHexDigit;
|
7673 | var isUppercaseLetter$1 = charCodeDefinitions.isUppercaseLetter;
|
7674 | var isName$1 = charCodeDefinitions.isName;
|
7675 | var isWhiteSpace$1 = charCodeDefinitions.isWhiteSpace;
|
7676 | var isValidEscape$1 = charCodeDefinitions.isValidEscape;
|
7677 |
|
7678 | function getCharCode(source, offset) {
|
7679 | return offset < source.length ? source.charCodeAt(offset) : 0;
|
7680 | }
|
7681 |
|
7682 | function getNewlineLength(source, offset, code) {
|
7683 | if (code === 13 && getCharCode(source, offset + 1) === 10 ) {
|
7684 | return 2;
|
7685 | }
|
7686 |
|
7687 | return 1;
|
7688 | }
|
7689 |
|
7690 | function cmpChar(testStr, offset, referenceCode) {
|
7691 | var code = testStr.charCodeAt(offset);
|
7692 |
|
7693 |
|
7694 | if (isUppercaseLetter$1(code)) {
|
7695 | code = code | 32;
|
7696 | }
|
7697 |
|
7698 | return code === referenceCode;
|
7699 | }
|
7700 |
|
7701 | function cmpStr(testStr, start, end, referenceStr) {
|
7702 | if (end - start !== referenceStr.length) {
|
7703 | return false;
|
7704 | }
|
7705 |
|
7706 | if (start < 0 || end > testStr.length) {
|
7707 | return false;
|
7708 | }
|
7709 |
|
7710 | for (var i = start; i < end; i++) {
|
7711 | var testCode = testStr.charCodeAt(i);
|
7712 | var referenceCode = referenceStr.charCodeAt(i - start);
|
7713 |
|
7714 |
|
7715 | if (isUppercaseLetter$1(testCode)) {
|
7716 | testCode = testCode | 32;
|
7717 | }
|
7718 |
|
7719 | if (testCode !== referenceCode) {
|
7720 | return false;
|
7721 | }
|
7722 | }
|
7723 |
|
7724 | return true;
|
7725 | }
|
7726 |
|
7727 | function findWhiteSpaceStart(source, offset) {
|
7728 | for (; offset >= 0; offset--) {
|
7729 | if (!isWhiteSpace$1(source.charCodeAt(offset))) {
|
7730 | break;
|
7731 | }
|
7732 | }
|
7733 |
|
7734 | return offset + 1;
|
7735 | }
|
7736 |
|
7737 | function findWhiteSpaceEnd(source, offset) {
|
7738 | for (; offset < source.length; offset++) {
|
7739 | if (!isWhiteSpace$1(source.charCodeAt(offset))) {
|
7740 | break;
|
7741 | }
|
7742 | }
|
7743 |
|
7744 | return offset;
|
7745 | }
|
7746 |
|
7747 | function findDecimalNumberEnd(source, offset) {
|
7748 | for (; offset < source.length; offset++) {
|
7749 | if (!isDigit$1(source.charCodeAt(offset))) {
|
7750 | break;
|
7751 | }
|
7752 | }
|
7753 |
|
7754 | return offset;
|
7755 | }
|
7756 |
|
7757 |
|
7758 | function consumeEscaped(source, offset) {
|
7759 |
|
7760 |
|
7761 | offset += 2;
|
7762 |
|
7763 |
|
7764 | if (isHexDigit$1(getCharCode(source, offset - 1))) {
|
7765 |
|
7766 |
|
7767 | for (var maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) {
|
7768 | if (!isHexDigit$1(getCharCode(source, offset))) {
|
7769 | break;
|
7770 | }
|
7771 | }
|
7772 |
|
7773 |
|
7774 | var code = getCharCode(source, offset);
|
7775 | if (isWhiteSpace$1(code)) {
|
7776 | offset += getNewlineLength(source, offset, code);
|
7777 | }
|
7778 | }
|
7779 |
|
7780 | return offset;
|
7781 | }
|
7782 |
|
7783 |
|
7784 |
|
7785 |
|
7786 |
|
7787 | function consumeName(source, offset) {
|
7788 |
|
7789 |
|
7790 | for (; offset < source.length; offset++) {
|
7791 | var code = source.charCodeAt(offset);
|
7792 |
|
7793 |
|
7794 | if (isName$1(code)) {
|
7795 |
|
7796 | continue;
|
7797 | }
|
7798 |
|
7799 |
|
7800 | if (isValidEscape$1(code, getCharCode(source, offset + 1))) {
|
7801 |
|
7802 | offset = consumeEscaped(source, offset) - 1;
|
7803 | continue;
|
7804 | }
|
7805 |
|
7806 |
|
7807 |
|
7808 | break;
|
7809 | }
|
7810 |
|
7811 | return offset;
|
7812 | }
|
7813 |
|
7814 |
|
7815 | function consumeNumber(source, offset) {
|
7816 | var code = source.charCodeAt(offset);
|
7817 |
|
7818 |
|
7819 |
|
7820 | if (code === 0x002B || code === 0x002D) {
|
7821 | code = source.charCodeAt(offset += 1);
|
7822 | }
|
7823 |
|
7824 |
|
7825 | if (isDigit$1(code)) {
|
7826 | offset = findDecimalNumberEnd(source, offset + 1);
|
7827 | code = source.charCodeAt(offset);
|
7828 | }
|
7829 |
|
7830 |
|
7831 | if (code === 0x002E && isDigit$1(source.charCodeAt(offset + 1))) {
|
7832 |
|
7833 |
|
7834 | code = source.charCodeAt(offset += 2);
|
7835 |
|
7836 |
|
7837 |
|
7838 |
|
7839 |
|
7840 |
|
7841 | offset = findDecimalNumberEnd(source, offset);
|
7842 | }
|
7843 |
|
7844 |
|
7845 |
|
7846 | if (cmpChar(source, offset, 101 )) {
|
7847 | var sign = 0;
|
7848 | code = source.charCodeAt(offset + 1);
|
7849 |
|
7850 |
|
7851 | if (code === 0x002D || code === 0x002B) {
|
7852 | sign = 1;
|
7853 | code = source.charCodeAt(offset + 2);
|
7854 | }
|
7855 |
|
7856 |
|
7857 | if (isDigit$1(code)) {
|
7858 |
|
7859 |
|
7860 |
|
7861 |
|
7862 |
|
7863 |
|
7864 |
|
7865 | offset = findDecimalNumberEnd(source, offset + 1 + sign + 1);
|
7866 | }
|
7867 | }
|
7868 |
|
7869 | return offset;
|
7870 | }
|
7871 |
|
7872 |
|
7873 |
|
7874 |
|
7875 | function consumeBadUrlRemnants(source, offset) {
|
7876 |
|
7877 | for (; offset < source.length; offset++) {
|
7878 | var code = source.charCodeAt(offset);
|
7879 |
|
7880 |
|
7881 |
|
7882 | if (code === 0x0029) {
|
7883 |
|
7884 | offset++;
|
7885 | break;
|
7886 | }
|
7887 |
|
7888 | if (isValidEscape$1(code, getCharCode(source, offset + 1))) {
|
7889 |
|
7890 |
|
7891 |
|
7892 |
|
7893 | offset = consumeEscaped(source, offset);
|
7894 | }
|
7895 | }
|
7896 |
|
7897 | return offset;
|
7898 | }
|
7899 |
|
7900 | var utils = {
|
7901 | consumeEscaped: consumeEscaped,
|
7902 | consumeName: consumeName,
|
7903 | consumeNumber: consumeNumber,
|
7904 | consumeBadUrlRemnants: consumeBadUrlRemnants,
|
7905 |
|
7906 | cmpChar: cmpChar,
|
7907 | cmpStr: cmpStr,
|
7908 |
|
7909 | getNewlineLength: getNewlineLength,
|
7910 | findWhiteSpaceStart: findWhiteSpaceStart,
|
7911 | findWhiteSpaceEnd: findWhiteSpaceEnd
|
7912 | };
|
7913 |
|
7914 | var TYPE$1 = _const.TYPE;
|
7915 | var NAME$1 = _const.NAME;
|
7916 |
|
7917 |
|
7918 | var cmpStr$1 = utils.cmpStr;
|
7919 |
|
7920 | var EOF$1 = TYPE$1.EOF;
|
7921 | var WHITESPACE = TYPE$1.WhiteSpace;
|
7922 | var COMMENT = TYPE$1.Comment;
|
7923 |
|
7924 | var OFFSET_MASK = 0x00FFFFFF;
|
7925 | var TYPE_SHIFT = 24;
|
7926 |
|
7927 | var TokenStream = function() {
|
7928 | this.offsetAndType = null;
|
7929 | this.balance = null;
|
7930 |
|
7931 | this.reset();
|
7932 | };
|
7933 |
|
7934 | TokenStream.prototype = {
|
7935 | reset: function() {
|
7936 | this.eof = false;
|
7937 | this.tokenIndex = -1;
|
7938 | this.tokenType = 0;
|
7939 | this.tokenStart = this.firstCharOffset;
|
7940 | this.tokenEnd = this.firstCharOffset;
|
7941 | },
|
7942 |
|
7943 | lookupType: function(offset) {
|
7944 | offset += this.tokenIndex;
|
7945 |
|
7946 | if (offset < this.tokenCount) {
|
7947 | return this.offsetAndType[offset] >> TYPE_SHIFT;
|
7948 | }
|
7949 |
|
7950 | return EOF$1;
|
7951 | },
|
7952 | lookupOffset: function(offset) {
|
7953 | offset += this.tokenIndex;
|
7954 |
|
7955 | if (offset < this.tokenCount) {
|
7956 | return this.offsetAndType[offset - 1] & OFFSET_MASK;
|
7957 | }
|
7958 |
|
7959 | return this.source.length;
|
7960 | },
|
7961 | lookupValue: function(offset, referenceStr) {
|
7962 | offset += this.tokenIndex;
|
7963 |
|
7964 | if (offset < this.tokenCount) {
|
7965 | return cmpStr$1(
|
7966 | this.source,
|
7967 | this.offsetAndType[offset - 1] & OFFSET_MASK,
|
7968 | this.offsetAndType[offset] & OFFSET_MASK,
|
7969 | referenceStr
|
7970 | );
|
7971 | }
|
7972 |
|
7973 | return false;
|
7974 | },
|
7975 | getTokenStart: function(tokenIndex) {
|
7976 | if (tokenIndex === this.tokenIndex) {
|
7977 | return this.tokenStart;
|
7978 | }
|
7979 |
|
7980 | if (tokenIndex > 0) {
|
7981 | return tokenIndex < this.tokenCount
|
7982 | ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK
|
7983 | : this.offsetAndType[this.tokenCount] & OFFSET_MASK;
|
7984 | }
|
7985 |
|
7986 | return this.firstCharOffset;
|
7987 | },
|
7988 |
|
7989 |
|
7990 | getRawLength: function(startToken, mode) {
|
7991 | var cursor = startToken;
|
7992 | var balanceEnd;
|
7993 | var offset = this.offsetAndType[Math.max(cursor - 1, 0)] & OFFSET_MASK;
|
7994 | var type;
|
7995 |
|
7996 | loop:
|
7997 | for (; cursor < this.tokenCount; cursor++) {
|
7998 | balanceEnd = this.balance[cursor];
|
7999 |
|
8000 |
|
8001 | if (balanceEnd < startToken) {
|
8002 | break loop;
|
8003 | }
|
8004 |
|
8005 | type = this.offsetAndType[cursor] >> TYPE_SHIFT;
|
8006 |
|
8007 |
|
8008 | switch (mode(type, this.source, offset)) {
|
8009 | case 1:
|
8010 | break loop;
|
8011 |
|
8012 | case 2:
|
8013 | cursor++;
|
8014 | break loop;
|
8015 |
|
8016 | default:
|
8017 | offset = this.offsetAndType[cursor] & OFFSET_MASK;
|
8018 |
|
8019 |
|
8020 | if (this.balance[balanceEnd] === cursor) {
|
8021 | cursor = balanceEnd;
|
8022 | }
|
8023 | }
|
8024 | }
|
8025 |
|
8026 | return cursor - this.tokenIndex;
|
8027 | },
|
8028 | isBalanceEdge: function(pos) {
|
8029 | return this.balance[this.tokenIndex] < pos;
|
8030 | },
|
8031 | isDelim: function(code, offset) {
|
8032 | if (offset) {
|
8033 | return (
|
8034 | this.lookupType(offset) === TYPE$1.Delim &&
|
8035 | this.source.charCodeAt(this.lookupOffset(offset)) === code
|
8036 | );
|
8037 | }
|
8038 |
|
8039 | return (
|
8040 | this.tokenType === TYPE$1.Delim &&
|
8041 | this.source.charCodeAt(this.tokenStart) === code
|
8042 | );
|
8043 | },
|
8044 |
|
8045 | getTokenValue: function() {
|
8046 | return this.source.substring(this.tokenStart, this.tokenEnd);
|
8047 | },
|
8048 | getTokenLength: function() {
|
8049 | return this.tokenEnd - this.tokenStart;
|
8050 | },
|
8051 | substrToCursor: function(start) {
|
8052 | return this.source.substring(start, this.tokenStart);
|
8053 | },
|
8054 |
|
8055 | skipWS: function() {
|
8056 | for (var i = this.tokenIndex, skipTokenCount = 0; i < this.tokenCount; i++, skipTokenCount++) {
|
8057 | if ((this.offsetAndType[i] >> TYPE_SHIFT) !== WHITESPACE) {
|
8058 | break;
|
8059 | }
|
8060 | }
|
8061 |
|
8062 | if (skipTokenCount > 0) {
|
8063 | this.skip(skipTokenCount);
|
8064 | }
|
8065 | },
|
8066 | skipSC: function() {
|
8067 | while (this.tokenType === WHITESPACE || this.tokenType === COMMENT) {
|
8068 | this.next();
|
8069 | }
|
8070 | },
|
8071 | skip: function(tokenCount) {
|
8072 | var next = this.tokenIndex + tokenCount;
|
8073 |
|
8074 | if (next < this.tokenCount) {
|
8075 | this.tokenIndex = next;
|
8076 | this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK;
|
8077 | next = this.offsetAndType[next];
|
8078 | this.tokenType = next >> TYPE_SHIFT;
|
8079 | this.tokenEnd = next & OFFSET_MASK;
|
8080 | } else {
|
8081 | this.tokenIndex = this.tokenCount;
|
8082 | this.next();
|
8083 | }
|
8084 | },
|
8085 | next: function() {
|
8086 | var next = this.tokenIndex + 1;
|
8087 |
|
8088 | if (next < this.tokenCount) {
|
8089 | this.tokenIndex = next;
|
8090 | this.tokenStart = this.tokenEnd;
|
8091 | next = this.offsetAndType[next];
|
8092 | this.tokenType = next >> TYPE_SHIFT;
|
8093 | this.tokenEnd = next & OFFSET_MASK;
|
8094 | } else {
|
8095 | this.tokenIndex = this.tokenCount;
|
8096 | this.eof = true;
|
8097 | this.tokenType = EOF$1;
|
8098 | this.tokenStart = this.tokenEnd = this.source.length;
|
8099 | }
|
8100 | },
|
8101 |
|
8102 | forEachToken(fn) {
|
8103 | for (var i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) {
|
8104 | var start = offset;
|
8105 | var item = this.offsetAndType[i];
|
8106 | var end = item & OFFSET_MASK;
|
8107 | var type = item >> TYPE_SHIFT;
|
8108 |
|
8109 | offset = end;
|
8110 |
|
8111 | fn(type, start, end, i);
|
8112 | }
|
8113 | },
|
8114 |
|
8115 | dump() {
|
8116 | var tokens = new Array(this.tokenCount);
|
8117 |
|
8118 | this.forEachToken((type, start, end, index) => {
|
8119 | tokens[index] = {
|
8120 | idx: index,
|
8121 | type: NAME$1[type],
|
8122 | chunk: this.source.substring(start, end),
|
8123 | balance: this.balance[index]
|
8124 | };
|
8125 | });
|
8126 |
|
8127 | return tokens;
|
8128 | }
|
8129 | };
|
8130 |
|
8131 | var TokenStream_1 = TokenStream;
|
8132 |
|
8133 | function noop(value) {
|
8134 | return value;
|
8135 | }
|
8136 |
|
8137 | function generateMultiplier(multiplier) {
|
8138 | if (multiplier.min === 0 && multiplier.max === 0) {
|
8139 | return '*';
|
8140 | }
|
8141 |
|
8142 | if (multiplier.min === 0 && multiplier.max === 1) {
|
8143 | return '?';
|
8144 | }
|
8145 |
|
8146 | if (multiplier.min === 1 && multiplier.max === 0) {
|
8147 | return multiplier.comma ? '#' : '+';
|
8148 | }
|
8149 |
|
8150 | if (multiplier.min === 1 && multiplier.max === 1) {
|
8151 | return '';
|
8152 | }
|
8153 |
|
8154 | return (
|
8155 | (multiplier.comma ? '#' : '') +
|
8156 | (multiplier.min === multiplier.max
|
8157 | ? '{' + multiplier.min + '}'
|
8158 | : '{' + multiplier.min + ',' + (multiplier.max !== 0 ? multiplier.max : '') + '}'
|
8159 | )
|
8160 | );
|
8161 | }
|
8162 |
|
8163 | function generateTypeOpts(node) {
|
8164 | switch (node.type) {
|
8165 | case 'Range':
|
8166 | return (
|
8167 | ' [' +
|
8168 | (node.min === null ? '-∞' : node.min) +
|
8169 | ',' +
|
8170 | (node.max === null ? '∞' : node.max) +
|
8171 | ']'
|
8172 | );
|
8173 |
|
8174 | default:
|
8175 | throw new Error('Unknown node type `' + node.type + '`');
|
8176 | }
|
8177 | }
|
8178 |
|
8179 | function generateSequence(node, decorate, forceBraces, compact) {
|
8180 | var combinator = node.combinator === ' ' || compact ? node.combinator : ' ' + node.combinator + ' ';
|
8181 | var result = node.terms.map(function(term) {
|
8182 | return generate(term, decorate, forceBraces, compact);
|
8183 | }).join(combinator);
|
8184 |
|
8185 | if (node.explicit || forceBraces) {
|
8186 | result = (compact || result[0] === ',' ? '[' : '[ ') + result + (compact ? ']' : ' ]');
|
8187 | }
|
8188 |
|
8189 | return result;
|
8190 | }
|
8191 |
|
8192 | function generate(node, decorate, forceBraces, compact) {
|
8193 | var result;
|
8194 |
|
8195 | switch (node.type) {
|
8196 | case 'Group':
|
8197 | result =
|
8198 | generateSequence(node, decorate, forceBraces, compact) +
|
8199 | (node.disallowEmpty ? '!' : '');
|
8200 | break;
|
8201 |
|
8202 | case 'Multiplier':
|
8203 |
|
8204 | return (
|
8205 | generate(node.term, decorate, forceBraces, compact) +
|
8206 | decorate(generateMultiplier(node), node)
|
8207 | );
|
8208 |
|
8209 | case 'Type':
|
8210 | result = '<' + node.name + (node.opts ? decorate(generateTypeOpts(node.opts), node.opts) : '') + '>';
|
8211 | break;
|
8212 |
|
8213 | case 'Property':
|
8214 | result = '<\'' + node.name + '\'>';
|
8215 | break;
|
8216 |
|
8217 | case 'Keyword':
|
8218 | result = node.name;
|
8219 | break;
|
8220 |
|
8221 | case 'AtKeyword':
|
8222 | result = '@' + node.name;
|
8223 | break;
|
8224 |
|
8225 | case 'Function':
|
8226 | result = node.name + '(';
|
8227 | break;
|
8228 |
|
8229 | case 'String':
|
8230 | case 'Token':
|
8231 | result = node.value;
|
8232 | break;
|
8233 |
|
8234 | case 'Comma':
|
8235 | result = ',';
|
8236 | break;
|
8237 |
|
8238 | default:
|
8239 | throw new Error('Unknown node type `' + node.type + '`');
|
8240 | }
|
8241 |
|
8242 | return decorate(result, node);
|
8243 | }
|
8244 |
|
8245 | var generate_1 = function(node, options) {
|
8246 | var decorate = noop;
|
8247 | var forceBraces = false;
|
8248 | var compact = false;
|
8249 |
|
8250 | if (typeof options === 'function') {
|
8251 | decorate = options;
|
8252 | } else if (options) {
|
8253 | forceBraces = Boolean(options.forceBraces);
|
8254 | compact = Boolean(options.compact);
|
8255 | if (typeof options.decorate === 'function') {
|
8256 | decorate = options.decorate;
|
8257 | }
|
8258 | }
|
8259 |
|
8260 | return generate(node, decorate, forceBraces, compact);
|
8261 | };
|
8262 |
|
8263 | const defaultLoc = { offset: 0, line: 1, column: 1 };
|
8264 |
|
8265 | function locateMismatch(matchResult, node) {
|
8266 | const tokens = matchResult.tokens;
|
8267 | const longestMatch = matchResult.longestMatch;
|
8268 | const mismatchNode = longestMatch < tokens.length ? tokens[longestMatch].node || null : null;
|
8269 | const badNode = mismatchNode !== node ? mismatchNode : null;
|
8270 | let mismatchOffset = 0;
|
8271 | let mismatchLength = 0;
|
8272 | let entries = 0;
|
8273 | let css = '';
|
8274 | let start;
|
8275 | let end;
|
8276 |
|
8277 | for (let i = 0; i < tokens.length; i++) {
|
8278 | const token = tokens[i].value;
|
8279 |
|
8280 | if (i === longestMatch) {
|
8281 | mismatchLength = token.length;
|
8282 | mismatchOffset = css.length;
|
8283 | }
|
8284 |
|
8285 | if (badNode !== null && tokens[i].node === badNode) {
|
8286 | if (i <= longestMatch) {
|
8287 | entries++;
|
8288 | } else {
|
8289 | entries = 0;
|
8290 | }
|
8291 | }
|
8292 |
|
8293 | css += token;
|
8294 | }
|
8295 |
|
8296 | if (longestMatch === tokens.length || entries > 1) {
|
8297 | start = fromLoc(badNode || node, 'end') || buildLoc(defaultLoc, css);
|
8298 | end = buildLoc(start);
|
8299 | } else {
|
8300 | start = fromLoc(badNode, 'start') ||
|
8301 | buildLoc(fromLoc(node, 'start') || defaultLoc, css.slice(0, mismatchOffset));
|
8302 | end = fromLoc(badNode, 'end') ||
|
8303 | buildLoc(start, css.substr(mismatchOffset, mismatchLength));
|
8304 | }
|
8305 |
|
8306 | return {
|
8307 | css,
|
8308 | mismatchOffset,
|
8309 | mismatchLength,
|
8310 | start,
|
8311 | end
|
8312 | };
|
8313 | }
|
8314 |
|
8315 | function fromLoc(node, point) {
|
8316 | const value = node && node.loc && node.loc[point];
|
8317 |
|
8318 | if (value) {
|
8319 | return 'line' in value ? buildLoc(value) : value;
|
8320 | }
|
8321 |
|
8322 | return null;
|
8323 | }
|
8324 |
|
8325 | function buildLoc({ offset, line, column }, extra) {
|
8326 | const loc = {
|
8327 | offset,
|
8328 | line,
|
8329 | column
|
8330 | };
|
8331 |
|
8332 | if (extra) {
|
8333 | const lines = extra.split(/\n|\r\n?|\f/);
|
8334 |
|
8335 | loc.offset += extra.length;
|
8336 | loc.line += lines.length - 1;
|
8337 | loc.column = lines.length === 1 ? loc.column + extra.length : lines.pop().length + 1;
|
8338 | }
|
8339 |
|
8340 | return loc;
|
8341 | }
|
8342 |
|
8343 | const SyntaxReferenceError = function(type, referenceName) {
|
8344 | const error = createCustomError(
|
8345 | 'SyntaxReferenceError',
|
8346 | type + (referenceName ? ' `' + referenceName + '`' : '')
|
8347 | );
|
8348 |
|
8349 | error.reference = referenceName;
|
8350 |
|
8351 | return error;
|
8352 | };
|
8353 |
|
8354 | const SyntaxMatchError = function(message, syntax, node, matchResult) {
|
8355 | const error = createCustomError('SyntaxMatchError', message);
|
8356 | const {
|
8357 | css,
|
8358 | mismatchOffset,
|
8359 | mismatchLength,
|
8360 | start,
|
8361 | end
|
8362 | } = locateMismatch(matchResult, node);
|
8363 |
|
8364 | error.rawMessage = message;
|
8365 | error.syntax = syntax ? generate_1(syntax) : '<generic>';
|
8366 | error.css = css;
|
8367 | error.mismatchOffset = mismatchOffset;
|
8368 | error.mismatchLength = mismatchLength;
|
8369 | error.message = message + '\n' +
|
8370 | ' syntax: ' + error.syntax + '\n' +
|
8371 | ' value: ' + (css || '<empty string>') + '\n' +
|
8372 | ' --------' + new Array(error.mismatchOffset + 1).join('-') + '^';
|
8373 |
|
8374 | Object.assign(error, start);
|
8375 | error.loc = {
|
8376 | source: (node && node.loc && node.loc.source) || '<unknown>',
|
8377 | start,
|
8378 | end
|
8379 | };
|
8380 |
|
8381 | return error;
|
8382 | };
|
8383 |
|
8384 | var error$1 = {
|
8385 | SyntaxReferenceError,
|
8386 | SyntaxMatchError
|
8387 | };
|
8388 |
|
8389 | var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
8390 | var keywords = Object.create(null);
|
8391 | var properties = Object.create(null);
|
8392 | var HYPHENMINUS = 45;
|
8393 |
|
8394 | function isCustomProperty(str, offset) {
|
8395 | offset = offset || 0;
|
8396 |
|
8397 | return str.length - offset >= 2 &&
|
8398 | str.charCodeAt(offset) === HYPHENMINUS &&
|
8399 | str.charCodeAt(offset + 1) === HYPHENMINUS;
|
8400 | }
|
8401 |
|
8402 | function getVendorPrefix(str, offset) {
|
8403 | offset = offset || 0;
|
8404 |
|
8405 |
|
8406 | if (str.length - offset >= 3) {
|
8407 |
|
8408 | if (str.charCodeAt(offset) === HYPHENMINUS &&
|
8409 | str.charCodeAt(offset + 1) !== HYPHENMINUS) {
|
8410 |
|
8411 | var secondDashIndex = str.indexOf('-', offset + 2);
|
8412 |
|
8413 | if (secondDashIndex !== -1) {
|
8414 | return str.substring(offset, secondDashIndex + 1);
|
8415 | }
|
8416 | }
|
8417 | }
|
8418 |
|
8419 | return '';
|
8420 | }
|
8421 |
|
8422 | function getKeywordDescriptor(keyword) {
|
8423 | if (hasOwnProperty$1.call(keywords, keyword)) {
|
8424 | return keywords[keyword];
|
8425 | }
|
8426 |
|
8427 | var name = keyword.toLowerCase();
|
8428 |
|
8429 | if (hasOwnProperty$1.call(keywords, name)) {
|
8430 | return keywords[keyword] = keywords[name];
|
8431 | }
|
8432 |
|
8433 | var custom = isCustomProperty(name, 0);
|
8434 | var vendor = !custom ? getVendorPrefix(name, 0) : '';
|
8435 |
|
8436 | return keywords[keyword] = Object.freeze({
|
8437 | basename: name.substr(vendor.length),
|
8438 | name: name,
|
8439 | vendor: vendor,
|
8440 | prefix: vendor,
|
8441 | custom: custom
|
8442 | });
|
8443 | }
|
8444 |
|
8445 | function getPropertyDescriptor(property) {
|
8446 | if (hasOwnProperty$1.call(properties, property)) {
|
8447 | return properties[property];
|
8448 | }
|
8449 |
|
8450 | var name = property;
|
8451 | var hack = property[0];
|
8452 |
|
8453 | if (hack === '/') {
|
8454 | hack = property[1] === '/' ? '//' : '/';
|
8455 | } else if (hack !== '_' &&
|
8456 | hack !== '*' &&
|
8457 | hack !== '$' &&
|
8458 | hack !== '#' &&
|
8459 | hack !== '+' &&
|
8460 | hack !== '&') {
|
8461 | hack = '';
|
8462 | }
|
8463 |
|
8464 | var custom = isCustomProperty(name, hack.length);
|
8465 |
|
8466 |
|
8467 | if (!custom) {
|
8468 | name = name.toLowerCase();
|
8469 | if (hasOwnProperty$1.call(properties, name)) {
|
8470 | return properties[property] = properties[name];
|
8471 | }
|
8472 | }
|
8473 |
|
8474 | var vendor = !custom ? getVendorPrefix(name, hack.length) : '';
|
8475 | var prefix = name.substr(0, hack.length + vendor.length);
|
8476 |
|
8477 | return properties[property] = Object.freeze({
|
8478 | basename: name.substr(prefix.length),
|
8479 | name: name.substr(hack.length),
|
8480 | hack: hack,
|
8481 | vendor: vendor,
|
8482 | prefix: prefix,
|
8483 | custom: custom
|
8484 | });
|
8485 | }
|
8486 |
|
8487 | var names = {
|
8488 | keyword: getKeywordDescriptor,
|
8489 | property: getPropertyDescriptor,
|
8490 | isCustomProperty: isCustomProperty,
|
8491 | vendorPrefix: getVendorPrefix
|
8492 | };
|
8493 |
|
8494 | var MIN_SIZE = 16 * 1024;
|
8495 | var SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array;
|
8496 |
|
8497 | var adoptBuffer = function adoptBuffer(buffer, size) {
|
8498 | if (buffer === null || buffer.length < size) {
|
8499 | return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE));
|
8500 | }
|
8501 |
|
8502 | return buffer;
|
8503 | };
|
8504 |
|
8505 | var TYPE$2 = _const.TYPE;
|
8506 |
|
8507 |
|
8508 | var isNewline$1 = charCodeDefinitions.isNewline;
|
8509 | var isName$2 = charCodeDefinitions.isName;
|
8510 | var isValidEscape$2 = charCodeDefinitions.isValidEscape;
|
8511 | var isNumberStart$1 = charCodeDefinitions.isNumberStart;
|
8512 | var isIdentifierStart$1 = charCodeDefinitions.isIdentifierStart;
|
8513 | var charCodeCategory$1 = charCodeDefinitions.charCodeCategory;
|
8514 | var isBOM$1 = charCodeDefinitions.isBOM;
|
8515 |
|
8516 |
|
8517 | var cmpStr$2 = utils.cmpStr;
|
8518 | var getNewlineLength$1 = utils.getNewlineLength;
|
8519 | var findWhiteSpaceEnd$1 = utils.findWhiteSpaceEnd;
|
8520 | var consumeEscaped$1 = utils.consumeEscaped;
|
8521 | var consumeName$1 = utils.consumeName;
|
8522 | var consumeNumber$1 = utils.consumeNumber;
|
8523 | var consumeBadUrlRemnants$1 = utils.consumeBadUrlRemnants;
|
8524 |
|
8525 | var OFFSET_MASK$1 = 0x00FFFFFF;
|
8526 | var TYPE_SHIFT$1 = 24;
|
8527 |
|
8528 | function tokenize(source, stream) {
|
8529 | function getCharCode(offset) {
|
8530 | return offset < sourceLength ? source.charCodeAt(offset) : 0;
|
8531 | }
|
8532 |
|
8533 |
|
8534 | function consumeNumericToken() {
|
8535 |
|
8536 | offset = consumeNumber$1(source, offset);
|
8537 |
|
8538 |
|
8539 | if (isIdentifierStart$1(getCharCode(offset), getCharCode(offset + 1), getCharCode(offset + 2))) {
|
8540 |
|
8541 |
|
8542 |
|
8543 | type = TYPE$2.Dimension;
|
8544 | offset = consumeName$1(source, offset);
|
8545 | return;
|
8546 | }
|
8547 |
|
8548 |
|
8549 | if (getCharCode(offset) === 0x0025) {
|
8550 |
|
8551 | type = TYPE$2.Percentage;
|
8552 | offset++;
|
8553 | return;
|
8554 | }
|
8555 |
|
8556 |
|
8557 | type = TYPE$2.Number;
|
8558 | }
|
8559 |
|
8560 |
|
8561 | function consumeIdentLikeToken() {
|
8562 | const nameStartOffset = offset;
|
8563 |
|
8564 |
|
8565 | offset = consumeName$1(source, offset);
|
8566 |
|
8567 |
|
8568 |
|
8569 | if (cmpStr$2(source, nameStartOffset, offset, 'url') && getCharCode(offset) === 0x0028) {
|
8570 |
|
8571 | offset = findWhiteSpaceEnd$1(source, offset + 1);
|
8572 |
|
8573 |
|
8574 |
|
8575 |
|
8576 | if (getCharCode(offset) === 0x0022 ||
|
8577 | getCharCode(offset) === 0x0027) {
|
8578 | type = TYPE$2.Function;
|
8579 | offset = nameStartOffset + 4;
|
8580 | return;
|
8581 | }
|
8582 |
|
8583 |
|
8584 | consumeUrlToken();
|
8585 | return;
|
8586 | }
|
8587 |
|
8588 |
|
8589 |
|
8590 | if (getCharCode(offset) === 0x0028) {
|
8591 | type = TYPE$2.Function;
|
8592 | offset++;
|
8593 | return;
|
8594 | }
|
8595 |
|
8596 |
|
8597 | type = TYPE$2.Ident;
|
8598 | }
|
8599 |
|
8600 |
|
8601 | function consumeStringToken(endingCodePoint) {
|
8602 |
|
8603 |
|
8604 |
|
8605 | if (!endingCodePoint) {
|
8606 | endingCodePoint = getCharCode(offset++);
|
8607 | }
|
8608 |
|
8609 |
|
8610 | type = TYPE$2.String;
|
8611 |
|
8612 |
|
8613 | for (; offset < source.length; offset++) {
|
8614 | var code = source.charCodeAt(offset);
|
8615 |
|
8616 | switch (charCodeCategory$1(code)) {
|
8617 |
|
8618 | case endingCodePoint:
|
8619 |
|
8620 | offset++;
|
8621 | return;
|
8622 |
|
8623 |
|
8624 | case charCodeCategory$1.Eof:
|
8625 |
|
8626 | return;
|
8627 |
|
8628 |
|
8629 | case charCodeCategory$1.WhiteSpace:
|
8630 | if (isNewline$1(code)) {
|
8631 |
|
8632 |
|
8633 | offset += getNewlineLength$1(source, offset, code);
|
8634 | type = TYPE$2.BadString;
|
8635 | return;
|
8636 | }
|
8637 | break;
|
8638 |
|
8639 |
|
8640 | case 0x005C:
|
8641 |
|
8642 | if (offset === source.length - 1) {
|
8643 | break;
|
8644 | }
|
8645 |
|
8646 | var nextCode = getCharCode(offset + 1);
|
8647 |
|
8648 |
|
8649 | if (isNewline$1(nextCode)) {
|
8650 | offset += getNewlineLength$1(source, offset + 1, nextCode);
|
8651 | } else if (isValidEscape$2(code, nextCode)) {
|
8652 |
|
8653 |
|
8654 |
|
8655 | offset = consumeEscaped$1(source, offset) - 1;
|
8656 | }
|
8657 | break;
|
8658 |
|
8659 |
|
8660 |
|
8661 | }
|
8662 | }
|
8663 | }
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 | function consumeUrlToken() {
|
8671 |
|
8672 | type = TYPE$2.Url;
|
8673 |
|
8674 |
|
8675 | offset = findWhiteSpaceEnd$1(source, offset);
|
8676 |
|
8677 |
|
8678 | for (; offset < source.length; offset++) {
|
8679 | var code = source.charCodeAt(offset);
|
8680 |
|
8681 | switch (charCodeCategory$1(code)) {
|
8682 |
|
8683 | case 0x0029:
|
8684 |
|
8685 | offset++;
|
8686 | return;
|
8687 |
|
8688 |
|
8689 | case charCodeCategory$1.Eof:
|
8690 |
|
8691 | return;
|
8692 |
|
8693 |
|
8694 | case charCodeCategory$1.WhiteSpace:
|
8695 |
|
8696 | offset = findWhiteSpaceEnd$1(source, offset);
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 | if (getCharCode(offset) === 0x0029 || offset >= source.length) {
|
8702 | if (offset < source.length) {
|
8703 | offset++;
|
8704 | }
|
8705 | return;
|
8706 | }
|
8707 |
|
8708 |
|
8709 |
|
8710 | offset = consumeBadUrlRemnants$1(source, offset);
|
8711 | type = TYPE$2.BadUrl;
|
8712 | return;
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 | case 0x0022:
|
8719 | case 0x0027:
|
8720 | case 0x0028:
|
8721 | case charCodeCategory$1.NonPrintable:
|
8722 |
|
8723 |
|
8724 | offset = consumeBadUrlRemnants$1(source, offset);
|
8725 | type = TYPE$2.BadUrl;
|
8726 | return;
|
8727 |
|
8728 |
|
8729 | case 0x005C:
|
8730 |
|
8731 |
|
8732 | if (isValidEscape$2(code, getCharCode(offset + 1))) {
|
8733 | offset = consumeEscaped$1(source, offset) - 1;
|
8734 | break;
|
8735 | }
|
8736 |
|
8737 |
|
8738 |
|
8739 | offset = consumeBadUrlRemnants$1(source, offset);
|
8740 | type = TYPE$2.BadUrl;
|
8741 | return;
|
8742 |
|
8743 |
|
8744 |
|
8745 | }
|
8746 | }
|
8747 | }
|
8748 |
|
8749 | if (!stream) {
|
8750 | stream = new TokenStream_1();
|
8751 | }
|
8752 |
|
8753 |
|
8754 | source = String(source || '');
|
8755 |
|
8756 | var sourceLength = source.length;
|
8757 | var offsetAndType = adoptBuffer(stream.offsetAndType, sourceLength + 1);
|
8758 | var balance = adoptBuffer(stream.balance, sourceLength + 1);
|
8759 | var tokenCount = 0;
|
8760 | var start = isBOM$1(getCharCode(0));
|
8761 | var offset = start;
|
8762 | var balanceCloseType = 0;
|
8763 | var balanceStart = 0;
|
8764 | var balancePrev = 0;
|
8765 |
|
8766 |
|
8767 |
|
8768 | while (offset < sourceLength) {
|
8769 | var code = source.charCodeAt(offset);
|
8770 | var type = 0;
|
8771 |
|
8772 | balance[tokenCount] = sourceLength;
|
8773 |
|
8774 | switch (charCodeCategory$1(code)) {
|
8775 |
|
8776 | case charCodeCategory$1.WhiteSpace:
|
8777 |
|
8778 | type = TYPE$2.WhiteSpace;
|
8779 | offset = findWhiteSpaceEnd$1(source, offset + 1);
|
8780 | break;
|
8781 |
|
8782 |
|
8783 | case 0x0022:
|
8784 |
|
8785 | consumeStringToken();
|
8786 | break;
|
8787 |
|
8788 |
|
8789 | case 0x0023:
|
8790 |
|
8791 | if (isName$2(getCharCode(offset + 1)) || isValidEscape$2(getCharCode(offset + 1), getCharCode(offset + 2))) {
|
8792 |
|
8793 | type = TYPE$2.Hash;
|
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 |
|
8800 |
|
8801 | offset = consumeName$1(source, offset + 1);
|
8802 |
|
8803 |
|
8804 | } else {
|
8805 |
|
8806 | type = TYPE$2.Delim;
|
8807 | offset++;
|
8808 | }
|
8809 |
|
8810 | break;
|
8811 |
|
8812 |
|
8813 | case 0x0027:
|
8814 |
|
8815 | consumeStringToken();
|
8816 | break;
|
8817 |
|
8818 |
|
8819 | case 0x0028:
|
8820 |
|
8821 | type = TYPE$2.LeftParenthesis;
|
8822 | offset++;
|
8823 | break;
|
8824 |
|
8825 |
|
8826 | case 0x0029:
|
8827 |
|
8828 | type = TYPE$2.RightParenthesis;
|
8829 | offset++;
|
8830 | break;
|
8831 |
|
8832 |
|
8833 | case 0x002B:
|
8834 |
|
8835 | if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
|
8836 |
|
8837 | consumeNumericToken();
|
8838 | } else {
|
8839 |
|
8840 | type = TYPE$2.Delim;
|
8841 | offset++;
|
8842 | }
|
8843 | break;
|
8844 |
|
8845 |
|
8846 | case 0x002C:
|
8847 |
|
8848 | type = TYPE$2.Comma;
|
8849 | offset++;
|
8850 | break;
|
8851 |
|
8852 |
|
8853 | case 0x002D:
|
8854 |
|
8855 | if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
|
8856 | consumeNumericToken();
|
8857 | } else {
|
8858 |
|
8859 | if (getCharCode(offset + 1) === 0x002D &&
|
8860 | getCharCode(offset + 2) === 0x003E) {
|
8861 | type = TYPE$2.CDC;
|
8862 | offset = offset + 3;
|
8863 | } else {
|
8864 |
|
8865 | if (isIdentifierStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
|
8866 |
|
8867 | consumeIdentLikeToken();
|
8868 | } else {
|
8869 |
|
8870 | type = TYPE$2.Delim;
|
8871 | offset++;
|
8872 | }
|
8873 | }
|
8874 | }
|
8875 | break;
|
8876 |
|
8877 |
|
8878 | case 0x002E:
|
8879 |
|
8880 | if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
|
8881 |
|
8882 | consumeNumericToken();
|
8883 | } else {
|
8884 |
|
8885 | type = TYPE$2.Delim;
|
8886 | offset++;
|
8887 | }
|
8888 |
|
8889 | break;
|
8890 |
|
8891 |
|
8892 | case 0x002F:
|
8893 |
|
8894 | if (getCharCode(offset + 1) === 0x002A) {
|
8895 |
|
8896 |
|
8897 | type = TYPE$2.Comment;
|
8898 | offset = source.indexOf('*/', offset + 2) + 2;
|
8899 | if (offset === 1) {
|
8900 | offset = source.length;
|
8901 | }
|
8902 | } else {
|
8903 | type = TYPE$2.Delim;
|
8904 | offset++;
|
8905 | }
|
8906 | break;
|
8907 |
|
8908 |
|
8909 | case 0x003A:
|
8910 |
|
8911 | type = TYPE$2.Colon;
|
8912 | offset++;
|
8913 | break;
|
8914 |
|
8915 |
|
8916 | case 0x003B:
|
8917 |
|
8918 | type = TYPE$2.Semicolon;
|
8919 | offset++;
|
8920 | break;
|
8921 |
|
8922 |
|
8923 | case 0x003C:
|
8924 |
|
8925 | if (getCharCode(offset + 1) === 0x0021 &&
|
8926 | getCharCode(offset + 2) === 0x002D &&
|
8927 | getCharCode(offset + 3) === 0x002D) {
|
8928 |
|
8929 | type = TYPE$2.CDO;
|
8930 | offset = offset + 4;
|
8931 | } else {
|
8932 |
|
8933 | type = TYPE$2.Delim;
|
8934 | offset++;
|
8935 | }
|
8936 |
|
8937 | break;
|
8938 |
|
8939 |
|
8940 | case 0x0040:
|
8941 |
|
8942 | if (isIdentifierStart$1(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {
|
8943 |
|
8944 | type = TYPE$2.AtKeyword;
|
8945 | offset = consumeName$1(source, offset + 1);
|
8946 | } else {
|
8947 |
|
8948 | type = TYPE$2.Delim;
|
8949 | offset++;
|
8950 | }
|
8951 |
|
8952 | break;
|
8953 |
|
8954 |
|
8955 | case 0x005B:
|
8956 |
|
8957 | type = TYPE$2.LeftSquareBracket;
|
8958 | offset++;
|
8959 | break;
|
8960 |
|
8961 |
|
8962 | case 0x005C:
|
8963 |
|
8964 | if (isValidEscape$2(code, getCharCode(offset + 1))) {
|
8965 |
|
8966 | consumeIdentLikeToken();
|
8967 | } else {
|
8968 |
|
8969 | type = TYPE$2.Delim;
|
8970 | offset++;
|
8971 | }
|
8972 | break;
|
8973 |
|
8974 |
|
8975 | case 0x005D:
|
8976 |
|
8977 | type = TYPE$2.RightSquareBracket;
|
8978 | offset++;
|
8979 | break;
|
8980 |
|
8981 |
|
8982 | case 0x007B:
|
8983 |
|
8984 | type = TYPE$2.LeftCurlyBracket;
|
8985 | offset++;
|
8986 | break;
|
8987 |
|
8988 |
|
8989 | case 0x007D:
|
8990 |
|
8991 | type = TYPE$2.RightCurlyBracket;
|
8992 | offset++;
|
8993 | break;
|
8994 |
|
8995 |
|
8996 | case charCodeCategory$1.Digit:
|
8997 |
|
8998 | consumeNumericToken();
|
8999 | break;
|
9000 |
|
9001 |
|
9002 | case charCodeCategory$1.NameStart:
|
9003 |
|
9004 | consumeIdentLikeToken();
|
9005 | break;
|
9006 |
|
9007 |
|
9008 | case charCodeCategory$1.Eof:
|
9009 |
|
9010 | break;
|
9011 |
|
9012 |
|
9013 | default:
|
9014 |
|
9015 | type = TYPE$2.Delim;
|
9016 | offset++;
|
9017 | }
|
9018 |
|
9019 | switch (type) {
|
9020 | case balanceCloseType:
|
9021 | balancePrev = balanceStart & OFFSET_MASK$1;
|
9022 | balanceStart = balance[balancePrev];
|
9023 | balanceCloseType = balanceStart >> TYPE_SHIFT$1;
|
9024 | balance[tokenCount] = balancePrev;
|
9025 | balance[balancePrev++] = tokenCount;
|
9026 | for (; balancePrev < tokenCount; balancePrev++) {
|
9027 | if (balance[balancePrev] === sourceLength) {
|
9028 | balance[balancePrev] = tokenCount;
|
9029 | }
|
9030 | }
|
9031 | break;
|
9032 |
|
9033 | case TYPE$2.LeftParenthesis:
|
9034 | case TYPE$2.Function:
|
9035 | balance[tokenCount] = balanceStart;
|
9036 | balanceCloseType = TYPE$2.RightParenthesis;
|
9037 | balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
|
9038 | break;
|
9039 |
|
9040 | case TYPE$2.LeftSquareBracket:
|
9041 | balance[tokenCount] = balanceStart;
|
9042 | balanceCloseType = TYPE$2.RightSquareBracket;
|
9043 | balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
|
9044 | break;
|
9045 |
|
9046 | case TYPE$2.LeftCurlyBracket:
|
9047 | balance[tokenCount] = balanceStart;
|
9048 | balanceCloseType = TYPE$2.RightCurlyBracket;
|
9049 | balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
|
9050 | break;
|
9051 | }
|
9052 |
|
9053 | offsetAndType[tokenCount++] = (type << TYPE_SHIFT$1) | offset;
|
9054 | }
|
9055 |
|
9056 |
|
9057 | offsetAndType[tokenCount] = (TYPE$2.EOF << TYPE_SHIFT$1) | offset;
|
9058 | balance[tokenCount] = sourceLength;
|
9059 | balance[sourceLength] = sourceLength;
|
9060 | while (balanceStart !== 0) {
|
9061 | balancePrev = balanceStart & OFFSET_MASK$1;
|
9062 | balanceStart = balance[balancePrev];
|
9063 | balance[balancePrev] = sourceLength;
|
9064 | }
|
9065 |
|
9066 |
|
9067 | stream.source = source;
|
9068 | stream.firstCharOffset = start;
|
9069 | stream.offsetAndType = offsetAndType;
|
9070 | stream.tokenCount = tokenCount;
|
9071 | stream.balance = balance;
|
9072 | stream.reset();
|
9073 | stream.next();
|
9074 |
|
9075 | return stream;
|
9076 | }
|
9077 |
|
9078 |
|
9079 | Object.keys(_const).forEach(function(key) {
|
9080 | tokenize[key] = _const[key];
|
9081 | });
|
9082 |
|
9083 |
|
9084 | Object.keys(charCodeDefinitions).forEach(function(key) {
|
9085 | tokenize[key] = charCodeDefinitions[key];
|
9086 | });
|
9087 | Object.keys(utils).forEach(function(key) {
|
9088 | tokenize[key] = utils[key];
|
9089 | });
|
9090 |
|
9091 | var tokenizer = tokenize;
|
9092 |
|
9093 | var isDigit$2 = tokenizer.isDigit;
|
9094 | var cmpChar$1 = tokenizer.cmpChar;
|
9095 | var TYPE$3 = tokenizer.TYPE;
|
9096 |
|
9097 | var DELIM = TYPE$3.Delim;
|
9098 | var WHITESPACE$1 = TYPE$3.WhiteSpace;
|
9099 | var COMMENT$1 = TYPE$3.Comment;
|
9100 | var IDENT = TYPE$3.Ident;
|
9101 | var NUMBER = TYPE$3.Number;
|
9102 | var DIMENSION = TYPE$3.Dimension;
|
9103 | var PLUSSIGN = 0x002B;
|
9104 | var HYPHENMINUS$1 = 0x002D;
|
9105 | var N = 0x006E;
|
9106 | var DISALLOW_SIGN = true;
|
9107 | var ALLOW_SIGN = false;
|
9108 |
|
9109 | function isDelim(token, code) {
|
9110 | return token !== null && token.type === DELIM && token.value.charCodeAt(0) === code;
|
9111 | }
|
9112 |
|
9113 | function skipSC(token, offset, getNextToken) {
|
9114 | while (token !== null && (token.type === WHITESPACE$1 || token.type === COMMENT$1)) {
|
9115 | token = getNextToken(++offset);
|
9116 | }
|
9117 |
|
9118 | return offset;
|
9119 | }
|
9120 |
|
9121 | function checkInteger(token, valueOffset, disallowSign, offset) {
|
9122 | if (!token) {
|
9123 | return 0;
|
9124 | }
|
9125 |
|
9126 | var code = token.value.charCodeAt(valueOffset);
|
9127 |
|
9128 | if (code === PLUSSIGN || code === HYPHENMINUS$1) {
|
9129 | if (disallowSign) {
|
9130 |
|
9131 | return 0;
|
9132 | }
|
9133 | valueOffset++;
|
9134 | }
|
9135 |
|
9136 | for (; valueOffset < token.value.length; valueOffset++) {
|
9137 | if (!isDigit$2(token.value.charCodeAt(valueOffset))) {
|
9138 |
|
9139 | return 0;
|
9140 | }
|
9141 | }
|
9142 |
|
9143 | return offset + 1;
|
9144 | }
|
9145 |
|
9146 |
|
9147 |
|
9148 | function consumeB(token, offset_, getNextToken) {
|
9149 | var sign = false;
|
9150 | var offset = skipSC(token, offset_, getNextToken);
|
9151 |
|
9152 | token = getNextToken(offset);
|
9153 |
|
9154 | if (token === null) {
|
9155 | return offset_;
|
9156 | }
|
9157 |
|
9158 | if (token.type !== NUMBER) {
|
9159 | if (isDelim(token, PLUSSIGN) || isDelim(token, HYPHENMINUS$1)) {
|
9160 | sign = true;
|
9161 | offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
9162 | token = getNextToken(offset);
|
9163 |
|
9164 | if (token === null && token.type !== NUMBER) {
|
9165 | return 0;
|
9166 | }
|
9167 | } else {
|
9168 | return offset_;
|
9169 | }
|
9170 | }
|
9171 |
|
9172 | if (!sign) {
|
9173 | var code = token.value.charCodeAt(0);
|
9174 | if (code !== PLUSSIGN && code !== HYPHENMINUS$1) {
|
9175 |
|
9176 | return 0;
|
9177 | }
|
9178 | }
|
9179 |
|
9180 | return checkInteger(token, sign ? 0 : 1, sign, offset);
|
9181 | }
|
9182 |
|
9183 |
|
9184 | var genericAnPlusB = function anPlusB(token, getNextToken) {
|
9185 |
|
9186 | var offset = 0;
|
9187 |
|
9188 | if (!token) {
|
9189 | return 0;
|
9190 | }
|
9191 |
|
9192 |
|
9193 | if (token.type === NUMBER) {
|
9194 | return checkInteger(token, 0, ALLOW_SIGN, offset);
|
9195 | }
|
9196 |
|
9197 |
|
9198 |
|
9199 |
|
9200 |
|
9201 |
|
9202 | else if (token.type === IDENT && token.value.charCodeAt(0) === HYPHENMINUS$1) {
|
9203 |
|
9204 | if (!cmpChar$1(token.value, 1, N)) {
|
9205 | return 0;
|
9206 | }
|
9207 |
|
9208 | switch (token.value.length) {
|
9209 |
|
9210 |
|
9211 |
|
9212 | case 2:
|
9213 | return consumeB(getNextToken(++offset), offset, getNextToken);
|
9214 |
|
9215 |
|
9216 | case 3:
|
9217 | if (token.value.charCodeAt(2) !== HYPHENMINUS$1) {
|
9218 | return 0;
|
9219 | }
|
9220 |
|
9221 | offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
9222 | token = getNextToken(offset);
|
9223 |
|
9224 | return checkInteger(token, 0, DISALLOW_SIGN, offset);
|
9225 |
|
9226 |
|
9227 | default:
|
9228 | if (token.value.charCodeAt(2) !== HYPHENMINUS$1) {
|
9229 | return 0;
|
9230 | }
|
9231 |
|
9232 | return checkInteger(token, 3, DISALLOW_SIGN, offset);
|
9233 | }
|
9234 | }
|
9235 |
|
9236 |
|
9237 |
|
9238 |
|
9239 |
|
9240 |
|
9241 | else if (token.type === IDENT || (isDelim(token, PLUSSIGN) && getNextToken(offset + 1).type === IDENT)) {
|
9242 |
|
9243 | if (token.type !== IDENT) {
|
9244 | token = getNextToken(++offset);
|
9245 | }
|
9246 |
|
9247 | if (token === null || !cmpChar$1(token.value, 0, N)) {
|
9248 | return 0;
|
9249 | }
|
9250 |
|
9251 | switch (token.value.length) {
|
9252 |
|
9253 |
|
9254 |
|
9255 | case 1:
|
9256 | return consumeB(getNextToken(++offset), offset, getNextToken);
|
9257 |
|
9258 |
|
9259 | case 2:
|
9260 | if (token.value.charCodeAt(1) !== HYPHENMINUS$1) {
|
9261 | return 0;
|
9262 | }
|
9263 |
|
9264 | offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
9265 | token = getNextToken(offset);
|
9266 |
|
9267 | return checkInteger(token, 0, DISALLOW_SIGN, offset);
|
9268 |
|
9269 |
|
9270 | default:
|
9271 | if (token.value.charCodeAt(1) !== HYPHENMINUS$1) {
|
9272 | return 0;
|
9273 | }
|
9274 |
|
9275 | return checkInteger(token, 2, DISALLOW_SIGN, offset);
|
9276 | }
|
9277 | }
|
9278 |
|
9279 |
|
9280 |
|
9281 |
|
9282 |
|
9283 |
|
9284 | else if (token.type === DIMENSION) {
|
9285 | var code = token.value.charCodeAt(0);
|
9286 | var sign = code === PLUSSIGN || code === HYPHENMINUS$1 ? 1 : 0;
|
9287 |
|
9288 | for (var i = sign; i < token.value.length; i++) {
|
9289 | if (!isDigit$2(token.value.charCodeAt(i))) {
|
9290 | break;
|
9291 | }
|
9292 | }
|
9293 |
|
9294 | if (i === sign) {
|
9295 |
|
9296 | return 0;
|
9297 | }
|
9298 |
|
9299 | if (!cmpChar$1(token.value, i, N)) {
|
9300 | return 0;
|
9301 | }
|
9302 |
|
9303 |
|
9304 |
|
9305 |
|
9306 | if (i + 1 === token.value.length) {
|
9307 | return consumeB(getNextToken(++offset), offset, getNextToken);
|
9308 | } else {
|
9309 | if (token.value.charCodeAt(i + 1) !== HYPHENMINUS$1) {
|
9310 | return 0;
|
9311 | }
|
9312 |
|
9313 |
|
9314 | if (i + 2 === token.value.length) {
|
9315 | offset = skipSC(getNextToken(++offset), offset, getNextToken);
|
9316 | token = getNextToken(offset);
|
9317 |
|
9318 | return checkInteger(token, 0, DISALLOW_SIGN, offset);
|
9319 | }
|
9320 |
|
9321 | else {
|
9322 | return checkInteger(token, i + 2, DISALLOW_SIGN, offset);
|
9323 | }
|
9324 | }
|
9325 | }
|
9326 |
|
9327 | return 0;
|
9328 | };
|
9329 |
|
9330 | var isHexDigit$2 = tokenizer.isHexDigit;
|
9331 | var cmpChar$2 = tokenizer.cmpChar;
|
9332 | var TYPE$4 = tokenizer.TYPE;
|
9333 |
|
9334 | var IDENT$1 = TYPE$4.Ident;
|
9335 | var DELIM$1 = TYPE$4.Delim;
|
9336 | var NUMBER$1 = TYPE$4.Number;
|
9337 | var DIMENSION$1 = TYPE$4.Dimension;
|
9338 | var PLUSSIGN$1 = 0x002B;
|
9339 | var HYPHENMINUS$2 = 0x002D;
|
9340 | var QUESTIONMARK = 0x003F;
|
9341 | var U = 0x0075;
|
9342 |
|
9343 | function isDelim$1(token, code) {
|
9344 | return token !== null && token.type === DELIM$1 && token.value.charCodeAt(0) === code;
|
9345 | }
|
9346 |
|
9347 | function startsWith(token, code) {
|
9348 | return token.value.charCodeAt(0) === code;
|
9349 | }
|
9350 |
|
9351 | function hexSequence(token, offset, allowDash) {
|
9352 | for (var pos = offset, hexlen = 0; pos < token.value.length; pos++) {
|
9353 | var code = token.value.charCodeAt(pos);
|
9354 |
|
9355 | if (code === HYPHENMINUS$2 && allowDash && hexlen !== 0) {
|
9356 | if (hexSequence(token, offset + hexlen + 1, false) > 0) {
|
9357 | return 6;
|
9358 | }
|
9359 |
|
9360 | return 0;
|
9361 | }
|
9362 |
|
9363 | if (!isHexDigit$2(code)) {
|
9364 | return 0;
|
9365 | }
|
9366 |
|
9367 | if (++hexlen > 6) {
|
9368 | return 0;
|
9369 | } }
|
9370 |
|
9371 | return hexlen;
|
9372 | }
|
9373 |
|
9374 | function withQuestionMarkSequence(consumed, length, getNextToken) {
|
9375 | if (!consumed) {
|
9376 | return 0;
|
9377 | }
|
9378 |
|
9379 | while (isDelim$1(getNextToken(length), QUESTIONMARK)) {
|
9380 | if (++consumed > 6) {
|
9381 | return 0;
|
9382 | }
|
9383 |
|
9384 | length++;
|
9385 | }
|
9386 |
|
9387 | return length;
|
9388 | }
|
9389 |
|
9390 |
|
9391 |
|
9392 |
|
9393 |
|
9394 |
|
9395 |
|
9396 |
|
9397 |
|
9398 |
|
9399 |
|
9400 |
|
9401 |
|
9402 |
|
9403 |
|
9404 |
|
9405 |
|
9406 |
|
9407 |
|
9408 |
|
9409 | var genericUrange = function urange(token, getNextToken) {
|
9410 | var length = 0;
|
9411 |
|
9412 |
|
9413 | if (token === null || token.type !== IDENT$1 || !cmpChar$2(token.value, 0, U)) {
|
9414 | return 0;
|
9415 | }
|
9416 |
|
9417 | token = getNextToken(++length);
|
9418 | if (token === null) {
|
9419 | return 0;
|
9420 | }
|
9421 |
|
9422 |
|
9423 |
|
9424 | if (isDelim$1(token, PLUSSIGN$1)) {
|
9425 | token = getNextToken(++length);
|
9426 | if (token === null) {
|
9427 | return 0;
|
9428 | }
|
9429 |
|
9430 | if (token.type === IDENT$1) {
|
9431 |
|
9432 | return withQuestionMarkSequence(hexSequence(token, 0, true), ++length, getNextToken);
|
9433 | }
|
9434 |
|
9435 | if (isDelim$1(token, QUESTIONMARK)) {
|
9436 |
|
9437 | return withQuestionMarkSequence(1, ++length, getNextToken);
|
9438 | }
|
9439 |
|
9440 |
|
9441 | return 0;
|
9442 | }
|
9443 |
|
9444 |
|
9445 |
|
9446 |
|
9447 | if (token.type === NUMBER$1) {
|
9448 | if (!startsWith(token, PLUSSIGN$1)) {
|
9449 | return 0;
|
9450 | }
|
9451 |
|
9452 | var consumedHexLength = hexSequence(token, 1, true);
|
9453 | if (consumedHexLength === 0) {
|
9454 | return 0;
|
9455 | }
|
9456 |
|
9457 | token = getNextToken(++length);
|
9458 | if (token === null) {
|
9459 |
|
9460 | return length;
|
9461 | }
|
9462 |
|
9463 | if (token.type === DIMENSION$1 || token.type === NUMBER$1) {
|
9464 |
|
9465 |
|
9466 | if (!startsWith(token, HYPHENMINUS$2) || !hexSequence(token, 1, false)) {
|
9467 | return 0;
|
9468 | }
|
9469 |
|
9470 | return length + 1;
|
9471 | }
|
9472 |
|
9473 |
|
9474 | return withQuestionMarkSequence(consumedHexLength, length, getNextToken);
|
9475 | }
|
9476 |
|
9477 |
|
9478 | if (token.type === DIMENSION$1) {
|
9479 | if (!startsWith(token, PLUSSIGN$1)) {
|
9480 | return 0;
|
9481 | }
|
9482 |
|
9483 | return withQuestionMarkSequence(hexSequence(token, 1, true), ++length, getNextToken);
|
9484 | }
|
9485 |
|
9486 | return 0;
|
9487 | };
|
9488 |
|
9489 | var isIdentifierStart$2 = tokenizer.isIdentifierStart;
|
9490 | var isHexDigit$3 = tokenizer.isHexDigit;
|
9491 | var isDigit$3 = tokenizer.isDigit;
|
9492 | var cmpStr$3 = tokenizer.cmpStr;
|
9493 | var consumeNumber$2 = tokenizer.consumeNumber;
|
9494 | var TYPE$5 = tokenizer.TYPE;
|
9495 |
|
9496 |
|
9497 |
|
9498 | var cssWideKeywords = ['unset', 'initial', 'inherit'];
|
9499 | var calcFunctionNames = ['calc(', '-moz-calc(', '-webkit-calc('];
|
9500 |
|
9501 |
|
9502 | var LENGTH = {
|
9503 |
|
9504 | 'px': true,
|
9505 | 'mm': true,
|
9506 | 'cm': true,
|
9507 | 'in': true,
|
9508 | 'pt': true,
|
9509 | 'pc': true,
|
9510 | 'q': true,
|
9511 |
|
9512 |
|
9513 | 'em': true,
|
9514 | 'ex': true,
|
9515 | 'ch': true,
|
9516 | 'rem': true,
|
9517 |
|
9518 |
|
9519 | 'vh': true,
|
9520 | 'vw': true,
|
9521 | 'vmin': true,
|
9522 | 'vmax': true,
|
9523 | 'vm': true
|
9524 | };
|
9525 |
|
9526 | var ANGLE = {
|
9527 | 'deg': true,
|
9528 | 'grad': true,
|
9529 | 'rad': true,
|
9530 | 'turn': true
|
9531 | };
|
9532 |
|
9533 | var TIME = {
|
9534 | 's': true,
|
9535 | 'ms': true
|
9536 | };
|
9537 |
|
9538 | var FREQUENCY = {
|
9539 | 'hz': true,
|
9540 | 'khz': true
|
9541 | };
|
9542 |
|
9543 |
|
9544 | var RESOLUTION = {
|
9545 | 'dpi': true,
|
9546 | 'dpcm': true,
|
9547 | 'dppx': true,
|
9548 | 'x': true
|
9549 | };
|
9550 |
|
9551 |
|
9552 | var FLEX = {
|
9553 | 'fr': true
|
9554 | };
|
9555 |
|
9556 |
|
9557 | var DECIBEL = {
|
9558 | 'db': true
|
9559 | };
|
9560 |
|
9561 |
|
9562 | var SEMITONES = {
|
9563 | 'st': true
|
9564 | };
|
9565 |
|
9566 |
|
9567 | function charCode(str, index) {
|
9568 | return index < str.length ? str.charCodeAt(index) : 0;
|
9569 | }
|
9570 |
|
9571 | function eqStr(actual, expected) {
|
9572 | return cmpStr$3(actual, 0, actual.length, expected);
|
9573 | }
|
9574 |
|
9575 | function eqStrAny(actual, expected) {
|
9576 | for (var i = 0; i < expected.length; i++) {
|
9577 | if (eqStr(actual, expected[i])) {
|
9578 | return true;
|
9579 | }
|
9580 | }
|
9581 |
|
9582 | return false;
|
9583 | }
|
9584 |
|
9585 |
|
9586 | function isPostfixIeHack(str, offset) {
|
9587 | if (offset !== str.length - 2) {
|
9588 | return false;
|
9589 | }
|
9590 |
|
9591 | return (
|
9592 | str.charCodeAt(offset) === 0x005C &&
|
9593 | isDigit$3(str.charCodeAt(offset + 1))
|
9594 | );
|
9595 | }
|
9596 |
|
9597 | function outOfRange(opts, value, numEnd) {
|
9598 | if (opts && opts.type === 'Range') {
|
9599 | var num = Number(
|
9600 | numEnd !== undefined && numEnd !== value.length
|
9601 | ? value.substr(0, numEnd)
|
9602 | : value
|
9603 | );
|
9604 |
|
9605 | if (isNaN(num)) {
|
9606 | return true;
|
9607 | }
|
9608 |
|
9609 | if (opts.min !== null && num < opts.min) {
|
9610 | return true;
|
9611 | }
|
9612 |
|
9613 | if (opts.max !== null && num > opts.max) {
|
9614 | return true;
|
9615 | }
|
9616 | }
|
9617 |
|
9618 | return false;
|
9619 | }
|
9620 |
|
9621 | function consumeFunction(token, getNextToken) {
|
9622 | var startIdx = token.index;
|
9623 | var length = 0;
|
9624 |
|
9625 |
|
9626 | do {
|
9627 | length++;
|
9628 |
|
9629 | if (token.balance <= startIdx) {
|
9630 | break;
|
9631 | }
|
9632 | } while (token = getNextToken(length));
|
9633 |
|
9634 | return length;
|
9635 | }
|
9636 |
|
9637 |
|
9638 |
|
9639 |
|
9640 | function calc(next) {
|
9641 | return function(token, getNextToken, opts) {
|
9642 | if (token === null) {
|
9643 | return 0;
|
9644 | }
|
9645 |
|
9646 | if (token.type === TYPE$5.Function && eqStrAny(token.value, calcFunctionNames)) {
|
9647 | return consumeFunction(token, getNextToken);
|
9648 | }
|
9649 |
|
9650 | return next(token, getNextToken, opts);
|
9651 | };
|
9652 | }
|
9653 |
|
9654 | function tokenType(expectedTokenType) {
|
9655 | return function(token) {
|
9656 | if (token === null || token.type !== expectedTokenType) {
|
9657 | return 0;
|
9658 | }
|
9659 |
|
9660 | return 1;
|
9661 | };
|
9662 | }
|
9663 |
|
9664 | function func(name) {
|
9665 | name = name + '(';
|
9666 |
|
9667 | return function(token, getNextToken) {
|
9668 | if (token !== null && eqStr(token.value, name)) {
|
9669 | return consumeFunction(token, getNextToken);
|
9670 | }
|
9671 |
|
9672 | return 0;
|
9673 | };
|
9674 | }
|
9675 |
|
9676 |
|
9677 |
|
9678 |
|
9679 |
|
9680 |
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 | function customIdent(token) {
|
9688 | if (token === null || token.type !== TYPE$5.Ident) {
|
9689 | return 0;
|
9690 | }
|
9691 |
|
9692 | var name = token.value.toLowerCase();
|
9693 |
|
9694 |
|
9695 | if (eqStrAny(name, cssWideKeywords)) {
|
9696 | return 0;
|
9697 | }
|
9698 |
|
9699 |
|
9700 | if (eqStr(name, 'default')) {
|
9701 | return 0;
|
9702 | }
|
9703 |
|
9704 |
|
9705 |
|
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 | return 1;
|
9711 | }
|
9712 |
|
9713 |
|
9714 |
|
9715 |
|
9716 |
|
9717 |
|
9718 | function customPropertyName(token) {
|
9719 |
|
9720 | if (token === null || token.type !== TYPE$5.Ident) {
|
9721 | return 0;
|
9722 | }
|
9723 |
|
9724 |
|
9725 | if (charCode(token.value, 0) !== 0x002D || charCode(token.value, 1) !== 0x002D) {
|
9726 | return 0;
|
9727 | }
|
9728 |
|
9729 | return 1;
|
9730 | }
|
9731 |
|
9732 |
|
9733 |
|
9734 |
|
9735 |
|
9736 | function hexColor(token) {
|
9737 | if (token === null || token.type !== TYPE$5.Hash) {
|
9738 | return 0;
|
9739 | }
|
9740 |
|
9741 | var length = token.value.length;
|
9742 |
|
9743 |
|
9744 | if (length !== 4 && length !== 5 && length !== 7 && length !== 9) {
|
9745 | return 0;
|
9746 | }
|
9747 |
|
9748 | for (var i = 1; i < length; i++) {
|
9749 | if (!isHexDigit$3(token.value.charCodeAt(i))) {
|
9750 | return 0;
|
9751 | }
|
9752 | }
|
9753 |
|
9754 | return 1;
|
9755 | }
|
9756 |
|
9757 | function idSelector(token) {
|
9758 | if (token === null || token.type !== TYPE$5.Hash) {
|
9759 | return 0;
|
9760 | }
|
9761 |
|
9762 | if (!isIdentifierStart$2(charCode(token.value, 1), charCode(token.value, 2), charCode(token.value, 3))) {
|
9763 | return 0;
|
9764 | }
|
9765 |
|
9766 | return 1;
|
9767 | }
|
9768 |
|
9769 |
|
9770 |
|
9771 | function declarationValue(token, getNextToken) {
|
9772 | if (!token) {
|
9773 | return 0;
|
9774 | }
|
9775 |
|
9776 | var length = 0;
|
9777 | var level = 0;
|
9778 | var startIdx = token.index;
|
9779 |
|
9780 |
|
9781 |
|
9782 | scan:
|
9783 | do {
|
9784 | switch (token.type) {
|
9785 |
|
9786 | case TYPE$5.BadString:
|
9787 | case TYPE$5.BadUrl:
|
9788 | break scan;
|
9789 |
|
9790 |
|
9791 | case TYPE$5.RightCurlyBracket:
|
9792 | case TYPE$5.RightParenthesis:
|
9793 | case TYPE$5.RightSquareBracket:
|
9794 | if (token.balance > token.index || token.balance < startIdx) {
|
9795 | break scan;
|
9796 | }
|
9797 |
|
9798 | level--;
|
9799 | break;
|
9800 |
|
9801 |
|
9802 | case TYPE$5.Semicolon:
|
9803 | if (level === 0) {
|
9804 | break scan;
|
9805 | }
|
9806 |
|
9807 | break;
|
9808 |
|
9809 |
|
9810 | case TYPE$5.Delim:
|
9811 | if (token.value === '!' && level === 0) {
|
9812 | break scan;
|
9813 | }
|
9814 |
|
9815 | break;
|
9816 |
|
9817 | case TYPE$5.Function:
|
9818 | case TYPE$5.LeftParenthesis:
|
9819 | case TYPE$5.LeftSquareBracket:
|
9820 | case TYPE$5.LeftCurlyBracket:
|
9821 | level++;
|
9822 | break;
|
9823 | }
|
9824 |
|
9825 | length++;
|
9826 |
|
9827 |
|
9828 | if (token.balance <= startIdx) {
|
9829 | break;
|
9830 | }
|
9831 | } while (token = getNextToken(length));
|
9832 |
|
9833 | return length;
|
9834 | }
|
9835 |
|
9836 |
|
9837 |
|
9838 |
|
9839 |
|
9840 | function anyValue(token, getNextToken) {
|
9841 | if (!token) {
|
9842 | return 0;
|
9843 | }
|
9844 |
|
9845 | var startIdx = token.index;
|
9846 | var length = 0;
|
9847 |
|
9848 |
|
9849 |
|
9850 | scan:
|
9851 | do {
|
9852 | switch (token.type) {
|
9853 |
|
9854 | case TYPE$5.BadString:
|
9855 | case TYPE$5.BadUrl:
|
9856 | break scan;
|
9857 |
|
9858 |
|
9859 | case TYPE$5.RightCurlyBracket:
|
9860 | case TYPE$5.RightParenthesis:
|
9861 | case TYPE$5.RightSquareBracket:
|
9862 | if (token.balance > token.index || token.balance < startIdx) {
|
9863 | break scan;
|
9864 | }
|
9865 |
|
9866 | break;
|
9867 | }
|
9868 |
|
9869 | length++;
|
9870 |
|
9871 |
|
9872 | if (token.balance <= startIdx) {
|
9873 | break;
|
9874 | }
|
9875 | } while (token = getNextToken(length));
|
9876 |
|
9877 | return length;
|
9878 | }
|
9879 |
|
9880 |
|
9881 |
|
9882 |
|
9883 |
|
9884 | function dimension(type) {
|
9885 | return function(token, getNextToken, opts) {
|
9886 | if (token === null || token.type !== TYPE$5.Dimension) {
|
9887 | return 0;
|
9888 | }
|
9889 |
|
9890 | var numberEnd = consumeNumber$2(token.value, 0);
|
9891 |
|
9892 |
|
9893 | if (type !== null) {
|
9894 |
|
9895 | var reverseSolidusOffset = token.value.indexOf('\\', numberEnd);
|
9896 | var unit = reverseSolidusOffset === -1 || !isPostfixIeHack(token.value, reverseSolidusOffset)
|
9897 | ? token.value.substr(numberEnd)
|
9898 | : token.value.substring(numberEnd, reverseSolidusOffset);
|
9899 |
|
9900 | if (type.hasOwnProperty(unit.toLowerCase()) === false) {
|
9901 | return 0;
|
9902 | }
|
9903 | }
|
9904 |
|
9905 |
|
9906 | if (outOfRange(opts, token.value, numberEnd)) {
|
9907 | return 0;
|
9908 | }
|
9909 |
|
9910 | return 1;
|
9911 | };
|
9912 | }
|
9913 |
|
9914 |
|
9915 |
|
9916 |
|
9917 |
|
9918 |
|
9919 |
|
9920 | function percentage(token, getNextToken, opts) {
|
9921 |
|
9922 | if (token === null || token.type !== TYPE$5.Percentage) {
|
9923 | return 0;
|
9924 | }
|
9925 |
|
9926 |
|
9927 | if (outOfRange(opts, token.value, token.value.length - 1)) {
|
9928 | return 0;
|
9929 | }
|
9930 |
|
9931 | return 1;
|
9932 | }
|
9933 |
|
9934 |
|
9935 |
|
9936 |
|
9937 |
|
9938 |
|
9939 |
|
9940 |
|
9941 |
|
9942 | function zero(next) {
|
9943 | if (typeof next !== 'function') {
|
9944 | next = function() {
|
9945 | return 0;
|
9946 | };
|
9947 | }
|
9948 |
|
9949 | return function(token, getNextToken, opts) {
|
9950 | if (token !== null && token.type === TYPE$5.Number) {
|
9951 | if (Number(token.value) === 0) {
|
9952 | return 1;
|
9953 | }
|
9954 | }
|
9955 |
|
9956 | return next(token, getNextToken, opts);
|
9957 | };
|
9958 | }
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 | function number(token, getNextToken, opts) {
|
9965 | if (token === null) {
|
9966 | return 0;
|
9967 | }
|
9968 |
|
9969 | var numberEnd = consumeNumber$2(token.value, 0);
|
9970 | var isNumber = numberEnd === token.value.length;
|
9971 | if (!isNumber && !isPostfixIeHack(token.value, numberEnd)) {
|
9972 | return 0;
|
9973 | }
|
9974 |
|
9975 |
|
9976 | if (outOfRange(opts, token.value, numberEnd)) {
|
9977 | return 0;
|
9978 | }
|
9979 |
|
9980 | return 1;
|
9981 | }
|
9982 |
|
9983 |
|
9984 |
|
9985 | function integer(token, getNextToken, opts) {
|
9986 |
|
9987 | if (token === null || token.type !== TYPE$5.Number) {
|
9988 | return 0;
|
9989 | }
|
9990 |
|
9991 |
|
9992 | var i = token.value.charCodeAt(0) === 0x002B ||
|
9993 | token.value.charCodeAt(0) === 0x002D ? 1 : 0;
|
9994 |
|
9995 |
|
9996 | for (; i < token.value.length; i++) {
|
9997 | if (!isDigit$3(token.value.charCodeAt(i))) {
|
9998 | return 0;
|
9999 | }
|
10000 | }
|
10001 |
|
10002 |
|
10003 | if (outOfRange(opts, token.value, i)) {
|
10004 | return 0;
|
10005 | }
|
10006 |
|
10007 | return 1;
|
10008 | }
|
10009 |
|
10010 | var generic = {
|
10011 |
|
10012 | 'ident-token': tokenType(TYPE$5.Ident),
|
10013 | 'function-token': tokenType(TYPE$5.Function),
|
10014 | 'at-keyword-token': tokenType(TYPE$5.AtKeyword),
|
10015 | 'hash-token': tokenType(TYPE$5.Hash),
|
10016 | 'string-token': tokenType(TYPE$5.String),
|
10017 | 'bad-string-token': tokenType(TYPE$5.BadString),
|
10018 | 'url-token': tokenType(TYPE$5.Url),
|
10019 | 'bad-url-token': tokenType(TYPE$5.BadUrl),
|
10020 | 'delim-token': tokenType(TYPE$5.Delim),
|
10021 | 'number-token': tokenType(TYPE$5.Number),
|
10022 | 'percentage-token': tokenType(TYPE$5.Percentage),
|
10023 | 'dimension-token': tokenType(TYPE$5.Dimension),
|
10024 | 'whitespace-token': tokenType(TYPE$5.WhiteSpace),
|
10025 | 'CDO-token': tokenType(TYPE$5.CDO),
|
10026 | 'CDC-token': tokenType(TYPE$5.CDC),
|
10027 | 'colon-token': tokenType(TYPE$5.Colon),
|
10028 | 'semicolon-token': tokenType(TYPE$5.Semicolon),
|
10029 | 'comma-token': tokenType(TYPE$5.Comma),
|
10030 | '[-token': tokenType(TYPE$5.LeftSquareBracket),
|
10031 | ']-token': tokenType(TYPE$5.RightSquareBracket),
|
10032 | '(-token': tokenType(TYPE$5.LeftParenthesis),
|
10033 | ')-token': tokenType(TYPE$5.RightParenthesis),
|
10034 | '{-token': tokenType(TYPE$5.LeftCurlyBracket),
|
10035 | '}-token': tokenType(TYPE$5.RightCurlyBracket),
|
10036 |
|
10037 |
|
10038 | 'string': tokenType(TYPE$5.String),
|
10039 | 'ident': tokenType(TYPE$5.Ident),
|
10040 |
|
10041 |
|
10042 | 'custom-ident': customIdent,
|
10043 | 'custom-property-name': customPropertyName,
|
10044 | 'hex-color': hexColor,
|
10045 | 'id-selector': idSelector,
|
10046 | 'an-plus-b': genericAnPlusB,
|
10047 | 'urange': genericUrange,
|
10048 | 'declaration-value': declarationValue,
|
10049 | 'any-value': anyValue,
|
10050 |
|
10051 |
|
10052 | 'dimension': calc(dimension(null)),
|
10053 | 'angle': calc(dimension(ANGLE)),
|
10054 | 'decibel': calc(dimension(DECIBEL)),
|
10055 | 'frequency': calc(dimension(FREQUENCY)),
|
10056 | 'flex': calc(dimension(FLEX)),
|
10057 | 'length': calc(zero(dimension(LENGTH))),
|
10058 | 'resolution': calc(dimension(RESOLUTION)),
|
10059 | 'semitones': calc(dimension(SEMITONES)),
|
10060 | 'time': calc(dimension(TIME)),
|
10061 |
|
10062 |
|
10063 | 'percentage': calc(percentage),
|
10064 |
|
10065 |
|
10066 | 'zero': zero(),
|
10067 | 'number': calc(number),
|
10068 | 'integer': calc(integer),
|
10069 |
|
10070 |
|
10071 | '-ms-legacy-expression': func('expression')
|
10072 | };
|
10073 |
|
10074 | var _SyntaxError$1 = function SyntaxError(message, input, offset) {
|
10075 | var error = createCustomError('SyntaxError', message);
|
10076 |
|
10077 | error.input = input;
|
10078 | error.offset = offset;
|
10079 | error.rawMessage = message;
|
10080 | error.message = error.rawMessage + '\n' +
|
10081 | ' ' + error.input + '\n' +
|
10082 | '--' + new Array((error.offset || error.input.length) + 1).join('-') + '^';
|
10083 |
|
10084 | return error;
|
10085 | };
|
10086 |
|
10087 | var TAB = 9;
|
10088 | var N$1 = 10;
|
10089 | var F = 12;
|
10090 | var R = 13;
|
10091 | var SPACE = 32;
|
10092 |
|
10093 | var Tokenizer = function(str) {
|
10094 | this.str = str;
|
10095 | this.pos = 0;
|
10096 | };
|
10097 |
|
10098 | Tokenizer.prototype = {
|
10099 | charCodeAt: function(pos) {
|
10100 | return pos < this.str.length ? this.str.charCodeAt(pos) : 0;
|
10101 | },
|
10102 | charCode: function() {
|
10103 | return this.charCodeAt(this.pos);
|
10104 | },
|
10105 | nextCharCode: function() {
|
10106 | return this.charCodeAt(this.pos + 1);
|
10107 | },
|
10108 | nextNonWsCode: function(pos) {
|
10109 | return this.charCodeAt(this.findWsEnd(pos));
|
10110 | },
|
10111 | findWsEnd: function(pos) {
|
10112 | for (; pos < this.str.length; pos++) {
|
10113 | var code = this.str.charCodeAt(pos);
|
10114 | if (code !== R && code !== N$1 && code !== F && code !== SPACE && code !== TAB) {
|
10115 | break;
|
10116 | }
|
10117 | }
|
10118 |
|
10119 | return pos;
|
10120 | },
|
10121 | substringToPos: function(end) {
|
10122 | return this.str.substring(this.pos, this.pos = end);
|
10123 | },
|
10124 | eat: function(code) {
|
10125 | if (this.charCode() !== code) {
|
10126 | this.error('Expect `' + String.fromCharCode(code) + '`');
|
10127 | }
|
10128 |
|
10129 | this.pos++;
|
10130 | },
|
10131 | peek: function() {
|
10132 | return this.pos < this.str.length ? this.str.charAt(this.pos++) : '';
|
10133 | },
|
10134 | error: function(message) {
|
10135 | throw new _SyntaxError$1(message, this.str, this.pos);
|
10136 | }
|
10137 | };
|
10138 |
|
10139 | var tokenizer$1 = Tokenizer;
|
10140 |
|
10141 | var TAB$1 = 9;
|
10142 | var N$2 = 10;
|
10143 | var F$1 = 12;
|
10144 | var R$1 = 13;
|
10145 | var SPACE$1 = 32;
|
10146 | var EXCLAMATIONMARK = 33;
|
10147 | var NUMBERSIGN = 35;
|
10148 | var AMPERSAND = 38;
|
10149 | var APOSTROPHE = 39;
|
10150 | var LEFTPARENTHESIS = 40;
|
10151 | var RIGHTPARENTHESIS = 41;
|
10152 | var ASTERISK = 42;
|
10153 | var PLUSSIGN$2 = 43;
|
10154 | var COMMA = 44;
|
10155 | var HYPERMINUS = 45;
|
10156 | var LESSTHANSIGN = 60;
|
10157 | var GREATERTHANSIGN = 62;
|
10158 | var QUESTIONMARK$1 = 63;
|
10159 | var COMMERCIALAT = 64;
|
10160 | var LEFTSQUAREBRACKET = 91;
|
10161 | var RIGHTSQUAREBRACKET = 93;
|
10162 | var LEFTCURLYBRACKET = 123;
|
10163 | var VERTICALLINE = 124;
|
10164 | var RIGHTCURLYBRACKET = 125;
|
10165 | var INFINITY = 8734;
|
10166 | var NAME_CHAR = createCharMap(function(ch) {
|
10167 | return /[a-zA-Z0-9\-]/.test(ch);
|
10168 | });
|
10169 | var COMBINATOR_PRECEDENCE = {
|
10170 | ' ': 1,
|
10171 | '&&': 2,
|
10172 | '||': 3,
|
10173 | '|': 4
|
10174 | };
|
10175 |
|
10176 | function createCharMap(fn) {
|
10177 | var array = typeof Uint32Array === 'function' ? new Uint32Array(128) : new Array(128);
|
10178 | for (var i = 0; i < 128; i++) {
|
10179 | array[i] = fn(String.fromCharCode(i)) ? 1 : 0;
|
10180 | }
|
10181 | return array;
|
10182 | }
|
10183 |
|
10184 | function scanSpaces(tokenizer) {
|
10185 | return tokenizer.substringToPos(
|
10186 | tokenizer.findWsEnd(tokenizer.pos)
|
10187 | );
|
10188 | }
|
10189 |
|
10190 | function scanWord(tokenizer) {
|
10191 | var end = tokenizer.pos;
|
10192 |
|
10193 | for (; end < tokenizer.str.length; end++) {
|
10194 | var code = tokenizer.str.charCodeAt(end);
|
10195 | if (code >= 128 || NAME_CHAR[code] === 0) {
|
10196 | break;
|
10197 | }
|
10198 | }
|
10199 |
|
10200 | if (tokenizer.pos === end) {
|
10201 | tokenizer.error('Expect a keyword');
|
10202 | }
|
10203 |
|
10204 | return tokenizer.substringToPos(end);
|
10205 | }
|
10206 |
|
10207 | function scanNumber(tokenizer) {
|
10208 | var end = tokenizer.pos;
|
10209 |
|
10210 | for (; end < tokenizer.str.length; end++) {
|
10211 | var code = tokenizer.str.charCodeAt(end);
|
10212 | if (code < 48 || code > 57) {
|
10213 | break;
|
10214 | }
|
10215 | }
|
10216 |
|
10217 | if (tokenizer.pos === end) {
|
10218 | tokenizer.error('Expect a number');
|
10219 | }
|
10220 |
|
10221 | return tokenizer.substringToPos(end);
|
10222 | }
|
10223 |
|
10224 | function scanString(tokenizer) {
|
10225 | var end = tokenizer.str.indexOf('\'', tokenizer.pos + 1);
|
10226 |
|
10227 | if (end === -1) {
|
10228 | tokenizer.pos = tokenizer.str.length;
|
10229 | tokenizer.error('Expect an apostrophe');
|
10230 | }
|
10231 |
|
10232 | return tokenizer.substringToPos(end + 1);
|
10233 | }
|
10234 |
|
10235 | function readMultiplierRange(tokenizer) {
|
10236 | var min = null;
|
10237 | var max = null;
|
10238 |
|
10239 | tokenizer.eat(LEFTCURLYBRACKET);
|
10240 |
|
10241 | min = scanNumber(tokenizer);
|
10242 |
|
10243 | if (tokenizer.charCode() === COMMA) {
|
10244 | tokenizer.pos++;
|
10245 | if (tokenizer.charCode() !== RIGHTCURLYBRACKET) {
|
10246 | max = scanNumber(tokenizer);
|
10247 | }
|
10248 | } else {
|
10249 | max = min;
|
10250 | }
|
10251 |
|
10252 | tokenizer.eat(RIGHTCURLYBRACKET);
|
10253 |
|
10254 | return {
|
10255 | min: Number(min),
|
10256 | max: max ? Number(max) : 0
|
10257 | };
|
10258 | }
|
10259 |
|
10260 | function readMultiplier(tokenizer) {
|
10261 | var range = null;
|
10262 | var comma = false;
|
10263 |
|
10264 | switch (tokenizer.charCode()) {
|
10265 | case ASTERISK:
|
10266 | tokenizer.pos++;
|
10267 |
|
10268 | range = {
|
10269 | min: 0,
|
10270 | max: 0
|
10271 | };
|
10272 |
|
10273 | break;
|
10274 |
|
10275 | case PLUSSIGN$2:
|
10276 | tokenizer.pos++;
|
10277 |
|
10278 | range = {
|
10279 | min: 1,
|
10280 | max: 0
|
10281 | };
|
10282 |
|
10283 | break;
|
10284 |
|
10285 | case QUESTIONMARK$1:
|
10286 | tokenizer.pos++;
|
10287 |
|
10288 | range = {
|
10289 | min: 0,
|
10290 | max: 1
|
10291 | };
|
10292 |
|
10293 | break;
|
10294 |
|
10295 | case NUMBERSIGN:
|
10296 | tokenizer.pos++;
|
10297 |
|
10298 | comma = true;
|
10299 |
|
10300 | if (tokenizer.charCode() === LEFTCURLYBRACKET) {
|
10301 | range = readMultiplierRange(tokenizer);
|
10302 | } else {
|
10303 | range = {
|
10304 | min: 1,
|
10305 | max: 0
|
10306 | };
|
10307 | }
|
10308 |
|
10309 | break;
|
10310 |
|
10311 | case LEFTCURLYBRACKET:
|
10312 | range = readMultiplierRange(tokenizer);
|
10313 | break;
|
10314 |
|
10315 | default:
|
10316 | return null;
|
10317 | }
|
10318 |
|
10319 | return {
|
10320 | type: 'Multiplier',
|
10321 | comma: comma,
|
10322 | min: range.min,
|
10323 | max: range.max,
|
10324 | term: null
|
10325 | };
|
10326 | }
|
10327 |
|
10328 | function maybeMultiplied(tokenizer, node) {
|
10329 | var multiplier = readMultiplier(tokenizer);
|
10330 |
|
10331 | if (multiplier !== null) {
|
10332 | multiplier.term = node;
|
10333 | return multiplier;
|
10334 | }
|
10335 |
|
10336 | return node;
|
10337 | }
|
10338 |
|
10339 | function maybeToken(tokenizer) {
|
10340 | var ch = tokenizer.peek();
|
10341 |
|
10342 | if (ch === '') {
|
10343 | return null;
|
10344 | }
|
10345 |
|
10346 | return {
|
10347 | type: 'Token',
|
10348 | value: ch
|
10349 | };
|
10350 | }
|
10351 |
|
10352 | function readProperty(tokenizer) {
|
10353 | var name;
|
10354 |
|
10355 | tokenizer.eat(LESSTHANSIGN);
|
10356 | tokenizer.eat(APOSTROPHE);
|
10357 |
|
10358 | name = scanWord(tokenizer);
|
10359 |
|
10360 | tokenizer.eat(APOSTROPHE);
|
10361 | tokenizer.eat(GREATERTHANSIGN);
|
10362 |
|
10363 | return maybeMultiplied(tokenizer, {
|
10364 | type: 'Property',
|
10365 | name: name
|
10366 | });
|
10367 | }
|
10368 |
|
10369 |
|
10370 |
|
10371 |
|
10372 |
|
10373 |
|
10374 |
|
10375 |
|
10376 | function readTypeRange(tokenizer) {
|
10377 |
|
10378 | var min = null;
|
10379 | var max = null;
|
10380 | var sign = 1;
|
10381 |
|
10382 | tokenizer.eat(LEFTSQUAREBRACKET);
|
10383 |
|
10384 | if (tokenizer.charCode() === HYPERMINUS) {
|
10385 | tokenizer.peek();
|
10386 | sign = -1;
|
10387 | }
|
10388 |
|
10389 | if (sign == -1 && tokenizer.charCode() === INFINITY) {
|
10390 | tokenizer.peek();
|
10391 | } else {
|
10392 | min = sign * Number(scanNumber(tokenizer));
|
10393 | }
|
10394 |
|
10395 | scanSpaces(tokenizer);
|
10396 | tokenizer.eat(COMMA);
|
10397 | scanSpaces(tokenizer);
|
10398 |
|
10399 | if (tokenizer.charCode() === INFINITY) {
|
10400 | tokenizer.peek();
|
10401 | } else {
|
10402 | sign = 1;
|
10403 |
|
10404 | if (tokenizer.charCode() === HYPERMINUS) {
|
10405 | tokenizer.peek();
|
10406 | sign = -1;
|
10407 | }
|
10408 |
|
10409 | max = sign * Number(scanNumber(tokenizer));
|
10410 | }
|
10411 |
|
10412 | tokenizer.eat(RIGHTSQUAREBRACKET);
|
10413 |
|
10414 |
|
10415 |
|
10416 | if (min === null && max === null) {
|
10417 | return null;
|
10418 | }
|
10419 |
|
10420 | return {
|
10421 | type: 'Range',
|
10422 | min: min,
|
10423 | max: max
|
10424 | };
|
10425 | }
|
10426 |
|
10427 | function readType(tokenizer) {
|
10428 | var name;
|
10429 | var opts = null;
|
10430 |
|
10431 | tokenizer.eat(LESSTHANSIGN);
|
10432 | name = scanWord(tokenizer);
|
10433 |
|
10434 | if (tokenizer.charCode() === LEFTPARENTHESIS &&
|
10435 | tokenizer.nextCharCode() === RIGHTPARENTHESIS) {
|
10436 | tokenizer.pos += 2;
|
10437 | name += '()';
|
10438 | }
|
10439 |
|
10440 | if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET) {
|
10441 | scanSpaces(tokenizer);
|
10442 | opts = readTypeRange(tokenizer);
|
10443 | }
|
10444 |
|
10445 | tokenizer.eat(GREATERTHANSIGN);
|
10446 |
|
10447 | return maybeMultiplied(tokenizer, {
|
10448 | type: 'Type',
|
10449 | name: name,
|
10450 | opts: opts
|
10451 | });
|
10452 | }
|
10453 |
|
10454 | function readKeywordOrFunction(tokenizer) {
|
10455 | var name;
|
10456 |
|
10457 | name = scanWord(tokenizer);
|
10458 |
|
10459 | if (tokenizer.charCode() === LEFTPARENTHESIS) {
|
10460 | tokenizer.pos++;
|
10461 |
|
10462 | return {
|
10463 | type: 'Function',
|
10464 | name: name
|
10465 | };
|
10466 | }
|
10467 |
|
10468 | return maybeMultiplied(tokenizer, {
|
10469 | type: 'Keyword',
|
10470 | name: name
|
10471 | });
|
10472 | }
|
10473 |
|
10474 | function regroupTerms(terms, combinators) {
|
10475 | function createGroup(terms, combinator) {
|
10476 | return {
|
10477 | type: 'Group',
|
10478 | terms: terms,
|
10479 | combinator: combinator,
|
10480 | disallowEmpty: false,
|
10481 | explicit: false
|
10482 | };
|
10483 | }
|
10484 |
|
10485 | combinators = Object.keys(combinators).sort(function(a, b) {
|
10486 | return COMBINATOR_PRECEDENCE[a] - COMBINATOR_PRECEDENCE[b];
|
10487 | });
|
10488 |
|
10489 | while (combinators.length > 0) {
|
10490 | var combinator = combinators.shift();
|
10491 | for (var i = 0, subgroupStart = 0; i < terms.length; i++) {
|
10492 | var term = terms[i];
|
10493 | if (term.type === 'Combinator') {
|
10494 | if (term.value === combinator) {
|
10495 | if (subgroupStart === -1) {
|
10496 | subgroupStart = i - 1;
|
10497 | }
|
10498 | terms.splice(i, 1);
|
10499 | i--;
|
10500 | } else {
|
10501 | if (subgroupStart !== -1 && i - subgroupStart > 1) {
|
10502 | terms.splice(
|
10503 | subgroupStart,
|
10504 | i - subgroupStart,
|
10505 | createGroup(terms.slice(subgroupStart, i), combinator)
|
10506 | );
|
10507 | i = subgroupStart + 1;
|
10508 | }
|
10509 | subgroupStart = -1;
|
10510 | }
|
10511 | }
|
10512 | }
|
10513 |
|
10514 | if (subgroupStart !== -1 && combinators.length) {
|
10515 | terms.splice(
|
10516 | subgroupStart,
|
10517 | i - subgroupStart,
|
10518 | createGroup(terms.slice(subgroupStart, i), combinator)
|
10519 | );
|
10520 | }
|
10521 | }
|
10522 |
|
10523 | return combinator;
|
10524 | }
|
10525 |
|
10526 | function readImplicitGroup(tokenizer) {
|
10527 | var terms = [];
|
10528 | var combinators = {};
|
10529 | var token;
|
10530 | var prevToken = null;
|
10531 | var prevTokenPos = tokenizer.pos;
|
10532 |
|
10533 | while (token = peek(tokenizer)) {
|
10534 | if (token.type !== 'Spaces') {
|
10535 | if (token.type === 'Combinator') {
|
10536 |
|
10537 | if (prevToken === null || prevToken.type === 'Combinator') {
|
10538 | tokenizer.pos = prevTokenPos;
|
10539 | tokenizer.error('Unexpected combinator');
|
10540 | }
|
10541 |
|
10542 | combinators[token.value] = true;
|
10543 | } else if (prevToken !== null && prevToken.type !== 'Combinator') {
|
10544 | combinators[' '] = true;
|
10545 | terms.push({
|
10546 | type: 'Combinator',
|
10547 | value: ' '
|
10548 | });
|
10549 | }
|
10550 |
|
10551 | terms.push(token);
|
10552 | prevToken = token;
|
10553 | prevTokenPos = tokenizer.pos;
|
10554 | }
|
10555 | }
|
10556 |
|
10557 |
|
10558 | if (prevToken !== null && prevToken.type === 'Combinator') {
|
10559 | tokenizer.pos -= prevTokenPos;
|
10560 | tokenizer.error('Unexpected combinator');
|
10561 | }
|
10562 |
|
10563 | return {
|
10564 | type: 'Group',
|
10565 | terms: terms,
|
10566 | combinator: regroupTerms(terms, combinators) || ' ',
|
10567 | disallowEmpty: false,
|
10568 | explicit: false
|
10569 | };
|
10570 | }
|
10571 |
|
10572 | function readGroup(tokenizer) {
|
10573 | var result;
|
10574 |
|
10575 | tokenizer.eat(LEFTSQUAREBRACKET);
|
10576 | result = readImplicitGroup(tokenizer);
|
10577 | tokenizer.eat(RIGHTSQUAREBRACKET);
|
10578 |
|
10579 | result.explicit = true;
|
10580 |
|
10581 | if (tokenizer.charCode() === EXCLAMATIONMARK) {
|
10582 | tokenizer.pos++;
|
10583 | result.disallowEmpty = true;
|
10584 | }
|
10585 |
|
10586 | return result;
|
10587 | }
|
10588 |
|
10589 | function peek(tokenizer) {
|
10590 | var code = tokenizer.charCode();
|
10591 |
|
10592 | if (code < 128 && NAME_CHAR[code] === 1) {
|
10593 | return readKeywordOrFunction(tokenizer);
|
10594 | }
|
10595 |
|
10596 | switch (code) {
|
10597 | case RIGHTSQUAREBRACKET:
|
10598 |
|
10599 | break;
|
10600 |
|
10601 | case LEFTSQUAREBRACKET:
|
10602 | return maybeMultiplied(tokenizer, readGroup(tokenizer));
|
10603 |
|
10604 | case LESSTHANSIGN:
|
10605 | return tokenizer.nextCharCode() === APOSTROPHE
|
10606 | ? readProperty(tokenizer)
|
10607 | : readType(tokenizer);
|
10608 |
|
10609 | case VERTICALLINE:
|
10610 | return {
|
10611 | type: 'Combinator',
|
10612 | value: tokenizer.substringToPos(
|
10613 | tokenizer.nextCharCode() === VERTICALLINE
|
10614 | ? tokenizer.pos + 2
|
10615 | : tokenizer.pos + 1
|
10616 | )
|
10617 | };
|
10618 |
|
10619 | case AMPERSAND:
|
10620 | tokenizer.pos++;
|
10621 | tokenizer.eat(AMPERSAND);
|
10622 |
|
10623 | return {
|
10624 | type: 'Combinator',
|
10625 | value: '&&'
|
10626 | };
|
10627 |
|
10628 | case COMMA:
|
10629 | tokenizer.pos++;
|
10630 | return {
|
10631 | type: 'Comma'
|
10632 | };
|
10633 |
|
10634 | case APOSTROPHE:
|
10635 | return maybeMultiplied(tokenizer, {
|
10636 | type: 'String',
|
10637 | value: scanString(tokenizer)
|
10638 | });
|
10639 |
|
10640 | case SPACE$1:
|
10641 | case TAB$1:
|
10642 | case N$2:
|
10643 | case R$1:
|
10644 | case F$1:
|
10645 | return {
|
10646 | type: 'Spaces',
|
10647 | value: scanSpaces(tokenizer)
|
10648 | };
|
10649 |
|
10650 | case COMMERCIALAT:
|
10651 | code = tokenizer.nextCharCode();
|
10652 |
|
10653 | if (code < 128 && NAME_CHAR[code] === 1) {
|
10654 | tokenizer.pos++;
|
10655 | return {
|
10656 | type: 'AtKeyword',
|
10657 | name: scanWord(tokenizer)
|
10658 | };
|
10659 | }
|
10660 |
|
10661 | return maybeToken(tokenizer);
|
10662 |
|
10663 | case ASTERISK:
|
10664 | case PLUSSIGN$2:
|
10665 | case QUESTIONMARK$1:
|
10666 | case NUMBERSIGN:
|
10667 | case EXCLAMATIONMARK:
|
10668 |
|
10669 | break;
|
10670 |
|
10671 | case LEFTCURLYBRACKET:
|
10672 |
|
10673 |
|
10674 | code = tokenizer.nextCharCode();
|
10675 |
|
10676 | if (code < 48 || code > 57) {
|
10677 | return maybeToken(tokenizer);
|
10678 | }
|
10679 |
|
10680 | break;
|
10681 |
|
10682 | default:
|
10683 | return maybeToken(tokenizer);
|
10684 | }
|
10685 | }
|
10686 |
|
10687 | function parse(source) {
|
10688 | var tokenizer = new tokenizer$1(source);
|
10689 | var result = readImplicitGroup(tokenizer);
|
10690 |
|
10691 | if (tokenizer.pos !== source.length) {
|
10692 | tokenizer.error('Unexpected input');
|
10693 | }
|
10694 |
|
10695 |
|
10696 | if (result.terms.length === 1 && result.terms[0].type === 'Group') {
|
10697 | result = result.terms[0];
|
10698 | }
|
10699 |
|
10700 | return result;
|
10701 | }
|
10702 |
|
10703 |
|
10704 |
|
10705 | parse('[a&&<b>#|<\'c\'>*||e() f{2} /,(% g#{1,2} h{2,})]!');
|
10706 |
|
10707 | var parse_1 = parse;
|
10708 |
|
10709 | var noop$1 = function() {};
|
10710 |
|
10711 | function ensureFunction(value) {
|
10712 | return typeof value === 'function' ? value : noop$1;
|
10713 | }
|
10714 |
|
10715 | var walk = function(node, options, context) {
|
10716 | function walk(node) {
|
10717 | enter.call(context, node);
|
10718 |
|
10719 | switch (node.type) {
|
10720 | case 'Group':
|
10721 | node.terms.forEach(walk);
|
10722 | break;
|
10723 |
|
10724 | case 'Multiplier':
|
10725 | walk(node.term);
|
10726 | break;
|
10727 |
|
10728 | case 'Type':
|
10729 | case 'Property':
|
10730 | case 'Keyword':
|
10731 | case 'AtKeyword':
|
10732 | case 'Function':
|
10733 | case 'String':
|
10734 | case 'Token':
|
10735 | case 'Comma':
|
10736 | break;
|
10737 |
|
10738 | default:
|
10739 | throw new Error('Unknown type: ' + node.type);
|
10740 | }
|
10741 |
|
10742 | leave.call(context, node);
|
10743 | }
|
10744 |
|
10745 | var enter = noop$1;
|
10746 | var leave = noop$1;
|
10747 |
|
10748 | if (typeof options === 'function') {
|
10749 | enter = options;
|
10750 | } else if (options) {
|
10751 | enter = ensureFunction(options.enter);
|
10752 | leave = ensureFunction(options.leave);
|
10753 | }
|
10754 |
|
10755 | if (enter === noop$1 && leave === noop$1) {
|
10756 | throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
|
10757 | }
|
10758 |
|
10759 | walk(node);
|
10760 | };
|
10761 |
|
10762 | var tokenStream = new TokenStream_1();
|
10763 | var astToTokens = {
|
10764 | decorator: function(handlers) {
|
10765 | var curNode = null;
|
10766 | var prev = { len: 0, node: null };
|
10767 | var nodes = [prev];
|
10768 | var buffer = '';
|
10769 |
|
10770 | return {
|
10771 | children: handlers.children,
|
10772 | node: function(node) {
|
10773 | var tmp = curNode;
|
10774 | curNode = node;
|
10775 | handlers.node.call(this, node);
|
10776 | curNode = tmp;
|
10777 | },
|
10778 | chunk: function(chunk) {
|
10779 | buffer += chunk;
|
10780 | if (prev.node !== curNode) {
|
10781 | nodes.push({
|
10782 | len: chunk.length,
|
10783 | node: curNode
|
10784 | });
|
10785 | } else {
|
10786 | prev.len += chunk.length;
|
10787 | }
|
10788 | },
|
10789 | result: function() {
|
10790 | return prepareTokens(buffer, nodes);
|
10791 | }
|
10792 | };
|
10793 | }
|
10794 | };
|
10795 |
|
10796 | function prepareTokens(str, nodes) {
|
10797 | var tokens = [];
|
10798 | var nodesOffset = 0;
|
10799 | var nodesIndex = 0;
|
10800 | var currentNode = nodes ? nodes[nodesIndex].node : null;
|
10801 |
|
10802 | tokenizer(str, tokenStream);
|
10803 |
|
10804 | while (!tokenStream.eof) {
|
10805 | if (nodes) {
|
10806 | while (nodesIndex < nodes.length && nodesOffset + nodes[nodesIndex].len <= tokenStream.tokenStart) {
|
10807 | nodesOffset += nodes[nodesIndex++].len;
|
10808 | currentNode = nodes[nodesIndex].node;
|
10809 | }
|
10810 | }
|
10811 |
|
10812 | tokens.push({
|
10813 | type: tokenStream.tokenType,
|
10814 | value: tokenStream.getTokenValue(),
|
10815 | index: tokenStream.tokenIndex,
|
10816 | balance: tokenStream.balance[tokenStream.tokenIndex],
|
10817 | node: currentNode
|
10818 | });
|
10819 | tokenStream.next();
|
10820 |
|
10821 | }
|
10822 |
|
10823 | return tokens;
|
10824 | }
|
10825 |
|
10826 | var prepareTokens_1 = function(value, syntax) {
|
10827 | if (typeof value === 'string') {
|
10828 | return prepareTokens(value, null);
|
10829 | }
|
10830 |
|
10831 | return syntax.generate(value, astToTokens);
|
10832 | };
|
10833 |
|
10834 | var MATCH = { type: 'Match' };
|
10835 | var MISMATCH = { type: 'Mismatch' };
|
10836 | var DISALLOW_EMPTY = { type: 'DisallowEmpty' };
|
10837 | var LEFTPARENTHESIS$1 = 40;
|
10838 | var RIGHTPARENTHESIS$1 = 41;
|
10839 |
|
10840 | function createCondition(match, thenBranch, elseBranch) {
|
10841 |
|
10842 | if (thenBranch === MATCH && elseBranch === MISMATCH) {
|
10843 | return match;
|
10844 | }
|
10845 |
|
10846 | if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH) {
|
10847 | return match;
|
10848 | }
|
10849 |
|
10850 | if (match.type === 'If' && match.else === MISMATCH && thenBranch === MATCH) {
|
10851 | thenBranch = match.then;
|
10852 | match = match.match;
|
10853 | }
|
10854 |
|
10855 | return {
|
10856 | type: 'If',
|
10857 | match: match,
|
10858 | then: thenBranch,
|
10859 | else: elseBranch
|
10860 | };
|
10861 | }
|
10862 |
|
10863 | function isFunctionType(name) {
|
10864 | return (
|
10865 | name.length > 2 &&
|
10866 | name.charCodeAt(name.length - 2) === LEFTPARENTHESIS$1 &&
|
10867 | name.charCodeAt(name.length - 1) === RIGHTPARENTHESIS$1
|
10868 | );
|
10869 | }
|
10870 |
|
10871 | function isEnumCapatible(term) {
|
10872 | return (
|
10873 | term.type === 'Keyword' ||
|
10874 | term.type === 'AtKeyword' ||
|
10875 | term.type === 'Function' ||
|
10876 | term.type === 'Type' && isFunctionType(term.name)
|
10877 | );
|
10878 | }
|
10879 |
|
10880 | function buildGroupMatchGraph(combinator, terms, atLeastOneTermMatched) {
|
10881 | switch (combinator) {
|
10882 | case ' ':
|
10883 |
|
10884 |
|
10885 |
|
10886 |
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 |
|
10892 |
|
10893 |
|
10894 | var result = MATCH;
|
10895 |
|
10896 | for (var i = terms.length - 1; i >= 0; i--) {
|
10897 | var term = terms[i];
|
10898 |
|
10899 | result = createCondition(
|
10900 | term,
|
10901 | result,
|
10902 | MISMATCH
|
10903 | );
|
10904 | }
|
10905 | return result;
|
10906 |
|
10907 | case '|':
|
10908 |
|
10909 |
|
10910 |
|
10911 |
|
10912 |
|
10913 |
|
10914 |
|
10915 |
|
10916 |
|
10917 |
|
10918 |
|
10919 |
|
10920 | var result = MISMATCH;
|
10921 | var map = null;
|
10922 |
|
10923 | for (var i = terms.length - 1; i >= 0; i--) {
|
10924 | var term = terms[i];
|
10925 |
|
10926 |
|
10927 | if (isEnumCapatible(term)) {
|
10928 | if (map === null && i > 0 && isEnumCapatible(terms[i - 1])) {
|
10929 | map = Object.create(null);
|
10930 | result = createCondition(
|
10931 | {
|
10932 | type: 'Enum',
|
10933 | map: map
|
10934 | },
|
10935 | MATCH,
|
10936 | result
|
10937 | );
|
10938 | }
|
10939 |
|
10940 | if (map !== null) {
|
10941 | var key = (isFunctionType(term.name) ? term.name.slice(0, -1) : term.name).toLowerCase();
|
10942 | if (key in map === false) {
|
10943 | map[key] = term;
|
10944 | continue;
|
10945 | }
|
10946 | }
|
10947 | }
|
10948 |
|
10949 | map = null;
|
10950 |
|
10951 |
|
10952 | result = createCondition(
|
10953 | term,
|
10954 | MATCH,
|
10955 | result
|
10956 | );
|
10957 | }
|
10958 | return result;
|
10959 |
|
10960 | case '&&':
|
10961 |
|
10962 |
|
10963 |
|
10964 |
|
10965 |
|
10966 | if (terms.length > 5) {
|
10967 | return {
|
10968 | type: 'MatchOnce',
|
10969 | terms: terms,
|
10970 | all: true
|
10971 | };
|
10972 | }
|
10973 |
|
10974 |
|
10975 |
|
10976 |
|
10977 |
|
10978 |
|
10979 |
|
10980 |
|
10981 |
|
10982 |
|
10983 |
|
10984 |
|
10985 |
|
10986 |
|
10987 |
|
10988 |
|
10989 |
|
10990 |
|
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 |
|
10996 |
|
10997 | var result = MISMATCH;
|
10998 |
|
10999 | for (var i = terms.length - 1; i >= 0; i--) {
|
11000 | var term = terms[i];
|
11001 | var thenClause;
|
11002 |
|
11003 | if (terms.length > 1) {
|
11004 | thenClause = buildGroupMatchGraph(
|
11005 | combinator,
|
11006 | terms.filter(function(newGroupTerm) {
|
11007 | return newGroupTerm !== term;
|
11008 | }),
|
11009 | false
|
11010 | );
|
11011 | } else {
|
11012 | thenClause = MATCH;
|
11013 | }
|
11014 |
|
11015 | result = createCondition(
|
11016 | term,
|
11017 | thenClause,
|
11018 | result
|
11019 | );
|
11020 | }
|
11021 | return result;
|
11022 |
|
11023 | case '||':
|
11024 |
|
11025 |
|
11026 |
|
11027 |
|
11028 |
|
11029 | if (terms.length > 5) {
|
11030 | return {
|
11031 | type: 'MatchOnce',
|
11032 | terms: terms,
|
11033 | all: false
|
11034 | };
|
11035 | }
|
11036 |
|
11037 |
|
11038 |
|
11039 |
|
11040 |
|
11041 |
|
11042 |
|
11043 |
|
11044 |
|
11045 |
|
11046 |
|
11047 |
|
11048 |
|
11049 |
|
11050 |
|
11051 |
|
11052 |
|
11053 |
|
11054 |
|
11055 |
|
11056 |
|
11057 |
|
11058 |
|
11059 |
|
11060 | var result = atLeastOneTermMatched ? MATCH : MISMATCH;
|
11061 |
|
11062 | for (var i = terms.length - 1; i >= 0; i--) {
|
11063 | var term = terms[i];
|
11064 | var thenClause;
|
11065 |
|
11066 | if (terms.length > 1) {
|
11067 | thenClause = buildGroupMatchGraph(
|
11068 | combinator,
|
11069 | terms.filter(function(newGroupTerm) {
|
11070 | return newGroupTerm !== term;
|
11071 | }),
|
11072 | true
|
11073 | );
|
11074 | } else {
|
11075 | thenClause = MATCH;
|
11076 | }
|
11077 |
|
11078 | result = createCondition(
|
11079 | term,
|
11080 | thenClause,
|
11081 | result
|
11082 | );
|
11083 | }
|
11084 | return result;
|
11085 | }
|
11086 | }
|
11087 |
|
11088 | function buildMultiplierMatchGraph(node) {
|
11089 | var result = MATCH;
|
11090 | var matchTerm = buildMatchGraph(node.term);
|
11091 |
|
11092 | if (node.max === 0) {
|
11093 |
|
11094 | matchTerm = createCondition(
|
11095 | matchTerm,
|
11096 | DISALLOW_EMPTY,
|
11097 | MISMATCH
|
11098 | );
|
11099 |
|
11100 |
|
11101 |
|
11102 | result = createCondition(
|
11103 | matchTerm,
|
11104 | null,
|
11105 | MISMATCH
|
11106 | );
|
11107 |
|
11108 | result.then = createCondition(
|
11109 | MATCH,
|
11110 | MATCH,
|
11111 | result
|
11112 | );
|
11113 |
|
11114 | if (node.comma) {
|
11115 | result.then.else = createCondition(
|
11116 | { type: 'Comma', syntax: node },
|
11117 | result,
|
11118 | MISMATCH
|
11119 | );
|
11120 | }
|
11121 | } else {
|
11122 |
|
11123 | for (var i = node.min || 1; i <= node.max; i++) {
|
11124 | if (node.comma && result !== MATCH) {
|
11125 | result = createCondition(
|
11126 | { type: 'Comma', syntax: node },
|
11127 | result,
|
11128 | MISMATCH
|
11129 | );
|
11130 | }
|
11131 |
|
11132 | result = createCondition(
|
11133 | matchTerm,
|
11134 | createCondition(
|
11135 | MATCH,
|
11136 | MATCH,
|
11137 | result
|
11138 | ),
|
11139 | MISMATCH
|
11140 | );
|
11141 | }
|
11142 | }
|
11143 |
|
11144 | if (node.min === 0) {
|
11145 |
|
11146 | result = createCondition(
|
11147 | MATCH,
|
11148 | MATCH,
|
11149 | result
|
11150 | );
|
11151 | } else {
|
11152 |
|
11153 | for (var i = 0; i < node.min - 1; i++) {
|
11154 | if (node.comma && result !== MATCH) {
|
11155 | result = createCondition(
|
11156 | { type: 'Comma', syntax: node },
|
11157 | result,
|
11158 | MISMATCH
|
11159 | );
|
11160 | }
|
11161 |
|
11162 | result = createCondition(
|
11163 | matchTerm,
|
11164 | result,
|
11165 | MISMATCH
|
11166 | );
|
11167 | }
|
11168 | }
|
11169 |
|
11170 | return result;
|
11171 | }
|
11172 |
|
11173 | function buildMatchGraph(node) {
|
11174 | if (typeof node === 'function') {
|
11175 | return {
|
11176 | type: 'Generic',
|
11177 | fn: node
|
11178 | };
|
11179 | }
|
11180 |
|
11181 | switch (node.type) {
|
11182 | case 'Group':
|
11183 | var result = buildGroupMatchGraph(
|
11184 | node.combinator,
|
11185 | node.terms.map(buildMatchGraph),
|
11186 | false
|
11187 | );
|
11188 |
|
11189 | if (node.disallowEmpty) {
|
11190 | result = createCondition(
|
11191 | result,
|
11192 | DISALLOW_EMPTY,
|
11193 | MISMATCH
|
11194 | );
|
11195 | }
|
11196 |
|
11197 | return result;
|
11198 |
|
11199 | case 'Multiplier':
|
11200 | return buildMultiplierMatchGraph(node);
|
11201 |
|
11202 | case 'Type':
|
11203 | case 'Property':
|
11204 | return {
|
11205 | type: node.type,
|
11206 | name: node.name,
|
11207 | syntax: node
|
11208 | };
|
11209 |
|
11210 | case 'Keyword':
|
11211 | return {
|
11212 | type: node.type,
|
11213 | name: node.name.toLowerCase(),
|
11214 | syntax: node
|
11215 | };
|
11216 |
|
11217 | case 'AtKeyword':
|
11218 | return {
|
11219 | type: node.type,
|
11220 | name: '@' + node.name.toLowerCase(),
|
11221 | syntax: node
|
11222 | };
|
11223 |
|
11224 | case 'Function':
|
11225 | return {
|
11226 | type: node.type,
|
11227 | name: node.name.toLowerCase() + '(',
|
11228 | syntax: node
|
11229 | };
|
11230 |
|
11231 | case 'String':
|
11232 |
|
11233 | if (node.value.length === 3) {
|
11234 | return {
|
11235 | type: 'Token',
|
11236 | value: node.value.charAt(1),
|
11237 | syntax: node
|
11238 | };
|
11239 | }
|
11240 |
|
11241 |
|
11242 | return {
|
11243 | type: node.type,
|
11244 | value: node.value.substr(1, node.value.length - 2).replace(/\\'/g, '\''),
|
11245 | syntax: node
|
11246 | };
|
11247 |
|
11248 | case 'Token':
|
11249 | return {
|
11250 | type: node.type,
|
11251 | value: node.value,
|
11252 | syntax: node
|
11253 | };
|
11254 |
|
11255 | case 'Comma':
|
11256 | return {
|
11257 | type: node.type,
|
11258 | syntax: node
|
11259 | };
|
11260 |
|
11261 | default:
|
11262 | throw new Error('Unknown node type:', node.type);
|
11263 | }
|
11264 | }
|
11265 |
|
11266 | var matchGraph = {
|
11267 | MATCH: MATCH,
|
11268 | MISMATCH: MISMATCH,
|
11269 | DISALLOW_EMPTY: DISALLOW_EMPTY,
|
11270 | buildMatchGraph: function(syntaxTree, ref) {
|
11271 | if (typeof syntaxTree === 'string') {
|
11272 | syntaxTree = parse_1(syntaxTree);
|
11273 | }
|
11274 |
|
11275 | return {
|
11276 | type: 'MatchGraph',
|
11277 | match: buildMatchGraph(syntaxTree),
|
11278 | syntax: ref || null,
|
11279 | source: syntaxTree
|
11280 | };
|
11281 | }
|
11282 | };
|
11283 |
|
11284 | var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
11285 |
|
11286 | var MATCH$1 = matchGraph.MATCH;
|
11287 | var MISMATCH$1 = matchGraph.MISMATCH;
|
11288 | var DISALLOW_EMPTY$1 = matchGraph.DISALLOW_EMPTY;
|
11289 | var TYPE$6 = _const.TYPE;
|
11290 |
|
11291 | var STUB = 0;
|
11292 | var TOKEN = 1;
|
11293 | var OPEN_SYNTAX = 2;
|
11294 | var CLOSE_SYNTAX = 3;
|
11295 |
|
11296 | var EXIT_REASON_MATCH = 'Match';
|
11297 | var EXIT_REASON_MISMATCH = 'Mismatch';
|
11298 | var EXIT_REASON_ITERATION_LIMIT = 'Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)';
|
11299 |
|
11300 | var ITERATION_LIMIT = 15000;
|
11301 | var totalIterationCount = 0;
|
11302 |
|
11303 | function reverseList(list) {
|
11304 | var prev = null;
|
11305 | var next = null;
|
11306 | var item = list;
|
11307 |
|
11308 | while (item !== null) {
|
11309 | next = item.prev;
|
11310 | item.prev = prev;
|
11311 | prev = item;
|
11312 | item = next;
|
11313 | }
|
11314 |
|
11315 | return prev;
|
11316 | }
|
11317 |
|
11318 | function areStringsEqualCaseInsensitive(testStr, referenceStr) {
|
11319 | if (testStr.length !== referenceStr.length) {
|
11320 | return false;
|
11321 | }
|
11322 |
|
11323 | for (var i = 0; i < testStr.length; i++) {
|
11324 | var testCode = testStr.charCodeAt(i);
|
11325 | var referenceCode = referenceStr.charCodeAt(i);
|
11326 |
|
11327 |
|
11328 | if (testCode >= 0x0041 && testCode <= 0x005A) {
|
11329 | testCode = testCode | 32;
|
11330 | }
|
11331 |
|
11332 | if (testCode !== referenceCode) {
|
11333 | return false;
|
11334 | }
|
11335 | }
|
11336 |
|
11337 | return true;
|
11338 | }
|
11339 |
|
11340 | function isContextEdgeDelim(token) {
|
11341 | if (token.type !== TYPE$6.Delim) {
|
11342 | return false;
|
11343 | }
|
11344 |
|
11345 |
|
11346 |
|
11347 | return token.value !== '?';
|
11348 | }
|
11349 |
|
11350 | function isCommaContextStart(token) {
|
11351 | if (token === null) {
|
11352 | return true;
|
11353 | }
|
11354 |
|
11355 | return (
|
11356 | token.type === TYPE$6.Comma ||
|
11357 | token.type === TYPE$6.Function ||
|
11358 | token.type === TYPE$6.LeftParenthesis ||
|
11359 | token.type === TYPE$6.LeftSquareBracket ||
|
11360 | token.type === TYPE$6.LeftCurlyBracket ||
|
11361 | isContextEdgeDelim(token)
|
11362 | );
|
11363 | }
|
11364 |
|
11365 | function isCommaContextEnd(token) {
|
11366 | if (token === null) {
|
11367 | return true;
|
11368 | }
|
11369 |
|
11370 | return (
|
11371 | token.type === TYPE$6.RightParenthesis ||
|
11372 | token.type === TYPE$6.RightSquareBracket ||
|
11373 | token.type === TYPE$6.RightCurlyBracket ||
|
11374 | token.type === TYPE$6.Delim
|
11375 | );
|
11376 | }
|
11377 |
|
11378 | function internalMatch(tokens, state, syntaxes) {
|
11379 | function moveToNextToken() {
|
11380 | do {
|
11381 | tokenIndex++;
|
11382 | token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
|
11383 | } while (token !== null && (token.type === TYPE$6.WhiteSpace || token.type === TYPE$6.Comment));
|
11384 | }
|
11385 |
|
11386 | function getNextToken(offset) {
|
11387 | var nextIndex = tokenIndex + offset;
|
11388 |
|
11389 | return nextIndex < tokens.length ? tokens[nextIndex] : null;
|
11390 | }
|
11391 |
|
11392 | function stateSnapshotFromSyntax(nextState, prev) {
|
11393 | return {
|
11394 | nextState: nextState,
|
11395 | matchStack: matchStack,
|
11396 | syntaxStack: syntaxStack,
|
11397 | thenStack: thenStack,
|
11398 | tokenIndex: tokenIndex,
|
11399 | prev: prev
|
11400 | };
|
11401 | }
|
11402 |
|
11403 | function pushThenStack(nextState) {
|
11404 | thenStack = {
|
11405 | nextState: nextState,
|
11406 | matchStack: matchStack,
|
11407 | syntaxStack: syntaxStack,
|
11408 | prev: thenStack
|
11409 | };
|
11410 | }
|
11411 |
|
11412 | function pushElseStack(nextState) {
|
11413 | elseStack = stateSnapshotFromSyntax(nextState, elseStack);
|
11414 | }
|
11415 |
|
11416 | function addTokenToMatch() {
|
11417 | matchStack = {
|
11418 | type: TOKEN,
|
11419 | syntax: state.syntax,
|
11420 | token: token,
|
11421 | prev: matchStack
|
11422 | };
|
11423 |
|
11424 | moveToNextToken();
|
11425 | syntaxStash = null;
|
11426 |
|
11427 | if (tokenIndex > longestMatch) {
|
11428 | longestMatch = tokenIndex;
|
11429 | }
|
11430 | }
|
11431 |
|
11432 | function openSyntax() {
|
11433 | syntaxStack = {
|
11434 | syntax: state.syntax,
|
11435 | opts: state.syntax.opts || (syntaxStack !== null && syntaxStack.opts) || null,
|
11436 | prev: syntaxStack
|
11437 | };
|
11438 |
|
11439 | matchStack = {
|
11440 | type: OPEN_SYNTAX,
|
11441 | syntax: state.syntax,
|
11442 | token: matchStack.token,
|
11443 | prev: matchStack
|
11444 | };
|
11445 | }
|
11446 |
|
11447 | function closeSyntax() {
|
11448 | if (matchStack.type === OPEN_SYNTAX) {
|
11449 | matchStack = matchStack.prev;
|
11450 | } else {
|
11451 | matchStack = {
|
11452 | type: CLOSE_SYNTAX,
|
11453 | syntax: syntaxStack.syntax,
|
11454 | token: matchStack.token,
|
11455 | prev: matchStack
|
11456 | };
|
11457 | }
|
11458 |
|
11459 | syntaxStack = syntaxStack.prev;
|
11460 | }
|
11461 |
|
11462 | var syntaxStack = null;
|
11463 | var thenStack = null;
|
11464 | var elseStack = null;
|
11465 |
|
11466 |
|
11467 |
|
11468 |
|
11469 | var syntaxStash = null;
|
11470 |
|
11471 | var iterationCount = 0;
|
11472 | var exitReason = null;
|
11473 |
|
11474 | var token = null;
|
11475 | var tokenIndex = -1;
|
11476 | var longestMatch = 0;
|
11477 | var matchStack = {
|
11478 | type: STUB,
|
11479 | syntax: null,
|
11480 | token: null,
|
11481 | prev: null
|
11482 | };
|
11483 |
|
11484 | moveToNextToken();
|
11485 |
|
11486 | while (exitReason === null && ++iterationCount < ITERATION_LIMIT) {
|
11487 |
|
11488 |
|
11489 |
|
11490 |
|
11491 |
|
11492 |
|
11493 |
|
11494 |
|
11495 |
|
11496 |
|
11497 |
|
11498 |
|
11499 |
|
11500 |
|
11501 |
|
11502 |
|
11503 |
|
11504 | switch (state.type) {
|
11505 | case 'Match':
|
11506 | if (thenStack === null) {
|
11507 |
|
11508 | if (token !== null) {
|
11509 |
|
11510 | if (tokenIndex !== tokens.length - 1 || (token.value !== '\\0' && token.value !== '\\9')) {
|
11511 | state = MISMATCH$1;
|
11512 | break;
|
11513 | }
|
11514 | }
|
11515 |
|
11516 |
|
11517 | exitReason = EXIT_REASON_MATCH;
|
11518 | break;
|
11519 | }
|
11520 |
|
11521 |
|
11522 | state = thenStack.nextState;
|
11523 |
|
11524 |
|
11525 | if (state === DISALLOW_EMPTY$1) {
|
11526 | if (thenStack.matchStack === matchStack) {
|
11527 | state = MISMATCH$1;
|
11528 | break;
|
11529 | } else {
|
11530 | state = MATCH$1;
|
11531 | }
|
11532 | }
|
11533 |
|
11534 |
|
11535 | while (thenStack.syntaxStack !== syntaxStack) {
|
11536 | closeSyntax();
|
11537 | }
|
11538 |
|
11539 |
|
11540 | thenStack = thenStack.prev;
|
11541 | break;
|
11542 |
|
11543 | case 'Mismatch':
|
11544 |
|
11545 | if (syntaxStash !== null && syntaxStash !== false) {
|
11546 |
|
11547 | if (elseStack === null || tokenIndex > elseStack.tokenIndex) {
|
11548 |
|
11549 | elseStack = syntaxStash;
|
11550 | syntaxStash = false;
|
11551 | }
|
11552 | } else if (elseStack === null) {
|
11553 |
|
11554 |
|
11555 | exitReason = EXIT_REASON_MISMATCH;
|
11556 | break;
|
11557 | }
|
11558 |
|
11559 |
|
11560 | state = elseStack.nextState;
|
11561 |
|
11562 |
|
11563 | thenStack = elseStack.thenStack;
|
11564 | syntaxStack = elseStack.syntaxStack;
|
11565 | matchStack = elseStack.matchStack;
|
11566 | tokenIndex = elseStack.tokenIndex;
|
11567 | token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
|
11568 |
|
11569 |
|
11570 | elseStack = elseStack.prev;
|
11571 | break;
|
11572 |
|
11573 | case 'MatchGraph':
|
11574 | state = state.match;
|
11575 | break;
|
11576 |
|
11577 | case 'If':
|
11578 |
|
11579 |
|
11580 | if (state.else !== MISMATCH$1) {
|
11581 | pushElseStack(state.else);
|
11582 | }
|
11583 |
|
11584 | if (state.then !== MATCH$1) {
|
11585 | pushThenStack(state.then);
|
11586 | }
|
11587 |
|
11588 | state = state.match;
|
11589 | break;
|
11590 |
|
11591 | case 'MatchOnce':
|
11592 | state = {
|
11593 | type: 'MatchOnceBuffer',
|
11594 | syntax: state,
|
11595 | index: 0,
|
11596 | mask: 0
|
11597 | };
|
11598 | break;
|
11599 |
|
11600 | case 'MatchOnceBuffer':
|
11601 | var terms = state.syntax.terms;
|
11602 |
|
11603 | if (state.index === terms.length) {
|
11604 |
|
11605 | if (state.mask === 0 || state.syntax.all) {
|
11606 | state = MISMATCH$1;
|
11607 | break;
|
11608 | }
|
11609 |
|
11610 |
|
11611 | state = MATCH$1;
|
11612 | break;
|
11613 | }
|
11614 |
|
11615 |
|
11616 | if (state.mask === (1 << terms.length) - 1) {
|
11617 | state = MATCH$1;
|
11618 | break;
|
11619 | }
|
11620 |
|
11621 | for (; state.index < terms.length; state.index++) {
|
11622 | var matchFlag = 1 << state.index;
|
11623 |
|
11624 | if ((state.mask & matchFlag) === 0) {
|
11625 |
|
11626 |
|
11627 | pushElseStack(state);
|
11628 | pushThenStack({
|
11629 | type: 'AddMatchOnce',
|
11630 | syntax: state.syntax,
|
11631 | mask: state.mask | matchFlag
|
11632 | });
|
11633 |
|
11634 |
|
11635 | state = terms[state.index++];
|
11636 | break;
|
11637 | }
|
11638 | }
|
11639 | break;
|
11640 |
|
11641 | case 'AddMatchOnce':
|
11642 | state = {
|
11643 | type: 'MatchOnceBuffer',
|
11644 | syntax: state.syntax,
|
11645 | index: 0,
|
11646 | mask: state.mask
|
11647 | };
|
11648 | break;
|
11649 |
|
11650 | case 'Enum':
|
11651 | if (token !== null) {
|
11652 | var name = token.value.toLowerCase();
|
11653 |
|
11654 |
|
11655 | if (name.indexOf('\\') !== -1) {
|
11656 | name = name.replace(/\\[09].*$/, '');
|
11657 | }
|
11658 |
|
11659 | if (hasOwnProperty$2.call(state.map, name)) {
|
11660 | state = state.map[name];
|
11661 | break;
|
11662 | }
|
11663 | }
|
11664 |
|
11665 | state = MISMATCH$1;
|
11666 | break;
|
11667 |
|
11668 | case 'Generic':
|
11669 | var opts = syntaxStack !== null ? syntaxStack.opts : null;
|
11670 | var lastTokenIndex = tokenIndex + Math.floor(state.fn(token, getNextToken, opts));
|
11671 |
|
11672 | if (!isNaN(lastTokenIndex) && lastTokenIndex > tokenIndex) {
|
11673 | while (tokenIndex < lastTokenIndex) {
|
11674 | addTokenToMatch();
|
11675 | }
|
11676 |
|
11677 | state = MATCH$1;
|
11678 | } else {
|
11679 | state = MISMATCH$1;
|
11680 | }
|
11681 |
|
11682 | break;
|
11683 |
|
11684 | case 'Type':
|
11685 | case 'Property':
|
11686 | var syntaxDict = state.type === 'Type' ? 'types' : 'properties';
|
11687 | var dictSyntax = hasOwnProperty$2.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null;
|
11688 |
|
11689 | if (!dictSyntax || !dictSyntax.match) {
|
11690 | throw new Error(
|
11691 | 'Bad syntax reference: ' +
|
11692 | (state.type === 'Type'
|
11693 | ? '<' + state.name + '>'
|
11694 | : '<\'' + state.name + '\'>')
|
11695 | );
|
11696 | }
|
11697 |
|
11698 |
|
11699 | if (syntaxStash !== false && token !== null && state.type === 'Type') {
|
11700 | var lowPriorityMatching =
|
11701 |
|
11702 |
|
11703 |
|
11704 | (state.name === 'custom-ident' && token.type === TYPE$6.Ident) ||
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 | (state.name === 'length' && token.value === '0');
|
11710 |
|
11711 | if (lowPriorityMatching) {
|
11712 | if (syntaxStash === null) {
|
11713 | syntaxStash = stateSnapshotFromSyntax(state, elseStack);
|
11714 | }
|
11715 |
|
11716 | state = MISMATCH$1;
|
11717 | break;
|
11718 | }
|
11719 | }
|
11720 |
|
11721 | openSyntax();
|
11722 | state = dictSyntax.match;
|
11723 | break;
|
11724 |
|
11725 | case 'Keyword':
|
11726 | var name = state.name;
|
11727 |
|
11728 | if (token !== null) {
|
11729 | var keywordName = token.value;
|
11730 |
|
11731 |
|
11732 | if (keywordName.indexOf('\\') !== -1) {
|
11733 | keywordName = keywordName.replace(/\\[09].*$/, '');
|
11734 | }
|
11735 |
|
11736 | if (areStringsEqualCaseInsensitive(keywordName, name)) {
|
11737 | addTokenToMatch();
|
11738 | state = MATCH$1;
|
11739 | break;
|
11740 | }
|
11741 | }
|
11742 |
|
11743 | state = MISMATCH$1;
|
11744 | break;
|
11745 |
|
11746 | case 'AtKeyword':
|
11747 | case 'Function':
|
11748 | if (token !== null && areStringsEqualCaseInsensitive(token.value, state.name)) {
|
11749 | addTokenToMatch();
|
11750 | state = MATCH$1;
|
11751 | break;
|
11752 | }
|
11753 |
|
11754 | state = MISMATCH$1;
|
11755 | break;
|
11756 |
|
11757 | case 'Token':
|
11758 | if (token !== null && token.value === state.value) {
|
11759 | addTokenToMatch();
|
11760 | state = MATCH$1;
|
11761 | break;
|
11762 | }
|
11763 |
|
11764 | state = MISMATCH$1;
|
11765 | break;
|
11766 |
|
11767 | case 'Comma':
|
11768 | if (token !== null && token.type === TYPE$6.Comma) {
|
11769 | if (isCommaContextStart(matchStack.token)) {
|
11770 | state = MISMATCH$1;
|
11771 | } else {
|
11772 | addTokenToMatch();
|
11773 | state = isCommaContextEnd(token) ? MISMATCH$1 : MATCH$1;
|
11774 | }
|
11775 | } else {
|
11776 | state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH$1 : MISMATCH$1;
|
11777 | }
|
11778 |
|
11779 | break;
|
11780 |
|
11781 | case 'String':
|
11782 | var string = '';
|
11783 |
|
11784 | for (var lastTokenIndex = tokenIndex; lastTokenIndex < tokens.length && string.length < state.value.length; lastTokenIndex++) {
|
11785 | string += tokens[lastTokenIndex].value;
|
11786 | }
|
11787 |
|
11788 | if (areStringsEqualCaseInsensitive(string, state.value)) {
|
11789 | while (tokenIndex < lastTokenIndex) {
|
11790 | addTokenToMatch();
|
11791 | }
|
11792 |
|
11793 | state = MATCH$1;
|
11794 | } else {
|
11795 | state = MISMATCH$1;
|
11796 | }
|
11797 |
|
11798 | break;
|
11799 |
|
11800 | default:
|
11801 | throw new Error('Unknown node type: ' + state.type);
|
11802 | }
|
11803 | }
|
11804 |
|
11805 | totalIterationCount += iterationCount;
|
11806 |
|
11807 | switch (exitReason) {
|
11808 | case null:
|
11809 | console.warn('[csstree-match] BREAK after ' + ITERATION_LIMIT + ' iterations');
|
11810 | exitReason = EXIT_REASON_ITERATION_LIMIT;
|
11811 | matchStack = null;
|
11812 | break;
|
11813 |
|
11814 | case EXIT_REASON_MATCH:
|
11815 | while (syntaxStack !== null) {
|
11816 | closeSyntax();
|
11817 | }
|
11818 | break;
|
11819 |
|
11820 | default:
|
11821 | matchStack = null;
|
11822 | }
|
11823 |
|
11824 | return {
|
11825 | tokens: tokens,
|
11826 | reason: exitReason,
|
11827 | iterations: iterationCount,
|
11828 | match: matchStack,
|
11829 | longestMatch: longestMatch
|
11830 | };
|
11831 | }
|
11832 |
|
11833 | function matchAsList(tokens, matchGraph, syntaxes) {
|
11834 | var matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
|
11835 |
|
11836 | if (matchResult.match !== null) {
|
11837 | var item = reverseList(matchResult.match).prev;
|
11838 |
|
11839 | matchResult.match = [];
|
11840 |
|
11841 | while (item !== null) {
|
11842 | switch (item.type) {
|
11843 | case STUB:
|
11844 | break;
|
11845 |
|
11846 | case OPEN_SYNTAX:
|
11847 | case CLOSE_SYNTAX:
|
11848 | matchResult.match.push({
|
11849 | type: item.type,
|
11850 | syntax: item.syntax
|
11851 | });
|
11852 | break;
|
11853 |
|
11854 | default:
|
11855 | matchResult.match.push({
|
11856 | token: item.token.value,
|
11857 | node: item.token.node
|
11858 | });
|
11859 | break;
|
11860 | }
|
11861 |
|
11862 | item = item.prev;
|
11863 | }
|
11864 | }
|
11865 |
|
11866 | return matchResult;
|
11867 | }
|
11868 |
|
11869 | function matchAsTree(tokens, matchGraph, syntaxes) {
|
11870 | var matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
|
11871 |
|
11872 | if (matchResult.match === null) {
|
11873 | return matchResult;
|
11874 | }
|
11875 |
|
11876 | var item = matchResult.match;
|
11877 | var host = matchResult.match = {
|
11878 | syntax: matchGraph.syntax || null,
|
11879 | match: []
|
11880 | };
|
11881 | var hostStack = [host];
|
11882 |
|
11883 |
|
11884 | item = reverseList(item).prev;
|
11885 |
|
11886 |
|
11887 | while (item !== null) {
|
11888 | switch (item.type) {
|
11889 | case OPEN_SYNTAX:
|
11890 | host.match.push(host = {
|
11891 | syntax: item.syntax,
|
11892 | match: []
|
11893 | });
|
11894 | hostStack.push(host);
|
11895 | break;
|
11896 |
|
11897 | case CLOSE_SYNTAX:
|
11898 | hostStack.pop();
|
11899 | host = hostStack[hostStack.length - 1];
|
11900 | break;
|
11901 |
|
11902 | default:
|
11903 | host.match.push({
|
11904 | syntax: item.syntax || null,
|
11905 | token: item.token.value,
|
11906 | node: item.token.node
|
11907 | });
|
11908 | }
|
11909 |
|
11910 | item = item.prev;
|
11911 | }
|
11912 |
|
11913 | return matchResult;
|
11914 | }
|
11915 |
|
11916 | var match = {
|
11917 | matchAsList: matchAsList,
|
11918 | matchAsTree: matchAsTree,
|
11919 | getTotalIterationCount: function() {
|
11920 | return totalIterationCount;
|
11921 | }
|
11922 | };
|
11923 |
|
11924 | function getTrace(node) {
|
11925 | function shouldPutToTrace(syntax) {
|
11926 | if (syntax === null) {
|
11927 | return false;
|
11928 | }
|
11929 |
|
11930 | return (
|
11931 | syntax.type === 'Type' ||
|
11932 | syntax.type === 'Property' ||
|
11933 | syntax.type === 'Keyword'
|
11934 | );
|
11935 | }
|
11936 |
|
11937 | function hasMatch(matchNode) {
|
11938 | if (Array.isArray(matchNode.match)) {
|
11939 |
|
11940 | for (var i = 0; i < matchNode.match.length; i++) {
|
11941 | if (hasMatch(matchNode.match[i])) {
|
11942 | if (shouldPutToTrace(matchNode.syntax)) {
|
11943 | result.unshift(matchNode.syntax);
|
11944 | }
|
11945 |
|
11946 | return true;
|
11947 | }
|
11948 | }
|
11949 | } else if (matchNode.node === node) {
|
11950 | result = shouldPutToTrace(matchNode.syntax)
|
11951 | ? [matchNode.syntax]
|
11952 | : [];
|
11953 |
|
11954 | return true;
|
11955 | }
|
11956 |
|
11957 | return false;
|
11958 | }
|
11959 |
|
11960 | var result = null;
|
11961 |
|
11962 | if (this.matched !== null) {
|
11963 | hasMatch(this.matched);
|
11964 | }
|
11965 |
|
11966 | return result;
|
11967 | }
|
11968 |
|
11969 | function testNode(match, node, fn) {
|
11970 | var trace = getTrace.call(match, node);
|
11971 |
|
11972 | if (trace === null) {
|
11973 | return false;
|
11974 | }
|
11975 |
|
11976 | return trace.some(fn);
|
11977 | }
|
11978 |
|
11979 | function isType(node, type) {
|
11980 | return testNode(this, node, function(matchNode) {
|
11981 | return matchNode.type === 'Type' && matchNode.name === type;
|
11982 | });
|
11983 | }
|
11984 |
|
11985 | function isProperty(node, property) {
|
11986 | return testNode(this, node, function(matchNode) {
|
11987 | return matchNode.type === 'Property' && matchNode.name === property;
|
11988 | });
|
11989 | }
|
11990 |
|
11991 | function isKeyword(node) {
|
11992 | return testNode(this, node, function(matchNode) {
|
11993 | return matchNode.type === 'Keyword';
|
11994 | });
|
11995 | }
|
11996 |
|
11997 | var trace = {
|
11998 | getTrace: getTrace,
|
11999 | isType: isType,
|
12000 | isProperty: isProperty,
|
12001 | isKeyword: isKeyword
|
12002 | };
|
12003 |
|
12004 | function getFirstMatchNode(matchNode) {
|
12005 | if ('node' in matchNode) {
|
12006 | return matchNode.node;
|
12007 | }
|
12008 |
|
12009 | return getFirstMatchNode(matchNode.match[0]);
|
12010 | }
|
12011 |
|
12012 | function getLastMatchNode(matchNode) {
|
12013 | if ('node' in matchNode) {
|
12014 | return matchNode.node;
|
12015 | }
|
12016 |
|
12017 | return getLastMatchNode(matchNode.match[matchNode.match.length - 1]);
|
12018 | }
|
12019 |
|
12020 | function matchFragments(lexer, ast, match, type, name) {
|
12021 | function findFragments(matchNode) {
|
12022 | if (matchNode.syntax !== null &&
|
12023 | matchNode.syntax.type === type &&
|
12024 | matchNode.syntax.name === name) {
|
12025 | var start = getFirstMatchNode(matchNode);
|
12026 | var end = getLastMatchNode(matchNode);
|
12027 |
|
12028 | lexer.syntax.walk(ast, function(node, item, list) {
|
12029 | if (node === start) {
|
12030 | var nodes = new List_1();
|
12031 |
|
12032 | do {
|
12033 | nodes.appendData(item.data);
|
12034 |
|
12035 | if (item.data === end) {
|
12036 | break;
|
12037 | }
|
12038 |
|
12039 | item = item.next;
|
12040 | } while (item !== null);
|
12041 |
|
12042 | fragments.push({
|
12043 | parent: list,
|
12044 | nodes: nodes
|
12045 | });
|
12046 | }
|
12047 | });
|
12048 | }
|
12049 |
|
12050 | if (Array.isArray(matchNode.match)) {
|
12051 | matchNode.match.forEach(findFragments);
|
12052 | }
|
12053 | }
|
12054 |
|
12055 | var fragments = [];
|
12056 |
|
12057 | if (match.matched !== null) {
|
12058 | findFragments(match.matched);
|
12059 | }
|
12060 |
|
12061 | return fragments;
|
12062 | }
|
12063 |
|
12064 | var search = {
|
12065 | matchFragments: matchFragments
|
12066 | };
|
12067 |
|
12068 | var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
|
12069 |
|
12070 | function isValidNumber(value) {
|
12071 |
|
12072 | return (
|
12073 | typeof value === 'number' &&
|
12074 | isFinite(value) &&
|
12075 | Math.floor(value) === value &&
|
12076 | value >= 0
|
12077 | );
|
12078 | }
|
12079 |
|
12080 | function isValidLocation(loc) {
|
12081 | return (
|
12082 | Boolean(loc) &&
|
12083 | isValidNumber(loc.offset) &&
|
12084 | isValidNumber(loc.line) &&
|
12085 | isValidNumber(loc.column)
|
12086 | );
|
12087 | }
|
12088 |
|
12089 | function createNodeStructureChecker(type, fields) {
|
12090 | return function checkNode(node, warn) {
|
12091 | if (!node || node.constructor !== Object) {
|
12092 | return warn(node, 'Type of node should be an Object');
|
12093 | }
|
12094 |
|
12095 | for (var key in node) {
|
12096 | var valid = true;
|
12097 |
|
12098 | if (hasOwnProperty$3.call(node, key) === false) {
|
12099 | continue;
|
12100 | }
|
12101 |
|
12102 | if (key === 'type') {
|
12103 | if (node.type !== type) {
|
12104 | warn(node, 'Wrong node type `' + node.type + '`, expected `' + type + '`');
|
12105 | }
|
12106 | } else if (key === 'loc') {
|
12107 | if (node.loc === null) {
|
12108 | continue;
|
12109 | } else if (node.loc && node.loc.constructor === Object) {
|
12110 | if (typeof node.loc.source !== 'string') {
|
12111 | key += '.source';
|
12112 | } else if (!isValidLocation(node.loc.start)) {
|
12113 | key += '.start';
|
12114 | } else if (!isValidLocation(node.loc.end)) {
|
12115 | key += '.end';
|
12116 | } else {
|
12117 | continue;
|
12118 | }
|
12119 | }
|
12120 |
|
12121 | valid = false;
|
12122 | } else if (fields.hasOwnProperty(key)) {
|
12123 | for (var i = 0, valid = false; !valid && i < fields[key].length; i++) {
|
12124 | var fieldType = fields[key][i];
|
12125 |
|
12126 | switch (fieldType) {
|
12127 | case String:
|
12128 | valid = typeof node[key] === 'string';
|
12129 | break;
|
12130 |
|
12131 | case Boolean:
|
12132 | valid = typeof node[key] === 'boolean';
|
12133 | break;
|
12134 |
|
12135 | case null:
|
12136 | valid = node[key] === null;
|
12137 | break;
|
12138 |
|
12139 | default:
|
12140 | if (typeof fieldType === 'string') {
|
12141 | valid = node[key] && node[key].type === fieldType;
|
12142 | } else if (Array.isArray(fieldType)) {
|
12143 | valid = node[key] instanceof List_1;
|
12144 | }
|
12145 | }
|
12146 | }
|
12147 | } else {
|
12148 | warn(node, 'Unknown field `' + key + '` for ' + type + ' node type');
|
12149 | }
|
12150 |
|
12151 | if (!valid) {
|
12152 | warn(node, 'Bad value for `' + type + '.' + key + '`');
|
12153 | }
|
12154 | }
|
12155 |
|
12156 | for (var key in fields) {
|
12157 | if (hasOwnProperty$3.call(fields, key) &&
|
12158 | hasOwnProperty$3.call(node, key) === false) {
|
12159 | warn(node, 'Field `' + type + '.' + key + '` is missed');
|
12160 | }
|
12161 | }
|
12162 | };
|
12163 | }
|
12164 |
|
12165 | function processStructure(name, nodeType) {
|
12166 | var structure = nodeType.structure;
|
12167 | var fields = {
|
12168 | type: String,
|
12169 | loc: true
|
12170 | };
|
12171 | var docs = {
|
12172 | type: '"' + name + '"'
|
12173 | };
|
12174 |
|
12175 | for (var key in structure) {
|
12176 | if (hasOwnProperty$3.call(structure, key) === false) {
|
12177 | continue;
|
12178 | }
|
12179 |
|
12180 | var docsTypes = [];
|
12181 | var fieldTypes = fields[key] = Array.isArray(structure[key])
|
12182 | ? structure[key].slice()
|
12183 | : [structure[key]];
|
12184 |
|
12185 | for (var i = 0; i < fieldTypes.length; i++) {
|
12186 | var fieldType = fieldTypes[i];
|
12187 | if (fieldType === String || fieldType === Boolean) {
|
12188 | docsTypes.push(fieldType.name);
|
12189 | } else if (fieldType === null) {
|
12190 | docsTypes.push('null');
|
12191 | } else if (typeof fieldType === 'string') {
|
12192 | docsTypes.push('<' + fieldType + '>');
|
12193 | } else if (Array.isArray(fieldType)) {
|
12194 | docsTypes.push('List');
|
12195 | } else {
|
12196 | throw new Error('Wrong value `' + fieldType + '` in `' + name + '.' + key + '` structure definition');
|
12197 | }
|
12198 | }
|
12199 |
|
12200 | docs[key] = docsTypes.join(' | ');
|
12201 | }
|
12202 |
|
12203 | return {
|
12204 | docs: docs,
|
12205 | check: createNodeStructureChecker(name, fields)
|
12206 | };
|
12207 | }
|
12208 |
|
12209 | var structure = {
|
12210 | getStructureFromConfig: function(config) {
|
12211 | var structure = {};
|
12212 |
|
12213 | if (config.node) {
|
12214 | for (var name in config.node) {
|
12215 | if (hasOwnProperty$3.call(config.node, name)) {
|
12216 | var nodeType = config.node[name];
|
12217 |
|
12218 | if (nodeType.structure) {
|
12219 | structure[name] = processStructure(name, nodeType);
|
12220 | } else {
|
12221 | throw new Error('Missed `structure` field in `' + name + '` node type definition');
|
12222 | }
|
12223 | }
|
12224 | }
|
12225 | }
|
12226 |
|
12227 | return structure;
|
12228 | }
|
12229 | };
|
12230 |
|
12231 | var SyntaxReferenceError$1 = error$1.SyntaxReferenceError;
|
12232 | var SyntaxMatchError$1 = error$1.SyntaxMatchError;
|
12233 |
|
12234 |
|
12235 |
|
12236 |
|
12237 |
|
12238 |
|
12239 | var buildMatchGraph$1 = matchGraph.buildMatchGraph;
|
12240 | var matchAsTree$1 = match.matchAsTree;
|
12241 |
|
12242 |
|
12243 | var getStructureFromConfig = structure.getStructureFromConfig;
|
12244 | var cssWideKeywords$1 = buildMatchGraph$1('inherit | initial | unset');
|
12245 | var cssWideKeywordsWithExpression = buildMatchGraph$1('inherit | initial | unset | <-ms-legacy-expression>');
|
12246 |
|
12247 | function dumpMapSyntax(map, compact, syntaxAsAst) {
|
12248 | var result = {};
|
12249 |
|
12250 | for (var name in map) {
|
12251 | if (map[name].syntax) {
|
12252 | result[name] = syntaxAsAst
|
12253 | ? map[name].syntax
|
12254 | : generate_1(map[name].syntax, { compact: compact });
|
12255 | }
|
12256 | }
|
12257 |
|
12258 | return result;
|
12259 | }
|
12260 |
|
12261 | function dumpAtruleMapSyntax(map, compact, syntaxAsAst) {
|
12262 | const result = {};
|
12263 |
|
12264 | for (const [name, atrule] of Object.entries(map)) {
|
12265 | result[name] = {
|
12266 | prelude: atrule.prelude && (
|
12267 | syntaxAsAst
|
12268 | ? atrule.prelude.syntax
|
12269 | : generate_1(atrule.prelude.syntax, { compact })
|
12270 | ),
|
12271 | descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst)
|
12272 | };
|
12273 | }
|
12274 |
|
12275 | return result;
|
12276 | }
|
12277 |
|
12278 | function valueHasVar(tokens) {
|
12279 | for (var i = 0; i < tokens.length; i++) {
|
12280 | if (tokens[i].value.toLowerCase() === 'var(') {
|
12281 | return true;
|
12282 | }
|
12283 | }
|
12284 |
|
12285 | return false;
|
12286 | }
|
12287 |
|
12288 | function buildMatchResult(match, error, iterations) {
|
12289 | return {
|
12290 | matched: match,
|
12291 | iterations: iterations,
|
12292 | error: error,
|
12293 | getTrace: trace.getTrace,
|
12294 | isType: trace.isType,
|
12295 | isProperty: trace.isProperty,
|
12296 | isKeyword: trace.isKeyword
|
12297 | };
|
12298 | }
|
12299 |
|
12300 | function matchSyntax(lexer, syntax, value, useCommon) {
|
12301 | var tokens = prepareTokens_1(value, lexer.syntax);
|
12302 | var result;
|
12303 |
|
12304 | if (valueHasVar(tokens)) {
|
12305 | return buildMatchResult(null, new Error('Matching for a tree with var() is not supported'));
|
12306 | }
|
12307 |
|
12308 | if (useCommon) {
|
12309 | result = matchAsTree$1(tokens, lexer.valueCommonSyntax, lexer);
|
12310 | }
|
12311 |
|
12312 | if (!useCommon || !result.match) {
|
12313 | result = matchAsTree$1(tokens, syntax.match, lexer);
|
12314 | if (!result.match) {
|
12315 | return buildMatchResult(
|
12316 | null,
|
12317 | new SyntaxMatchError$1(result.reason, syntax.syntax, value, result),
|
12318 | result.iterations
|
12319 | );
|
12320 | }
|
12321 | }
|
12322 |
|
12323 | return buildMatchResult(result.match, null, result.iterations);
|
12324 | }
|
12325 |
|
12326 | var Lexer = function(config, syntax, structure) {
|
12327 | this.valueCommonSyntax = cssWideKeywords$1;
|
12328 | this.syntax = syntax;
|
12329 | this.generic = false;
|
12330 | this.atrules = {};
|
12331 | this.properties = {};
|
12332 | this.types = {};
|
12333 | this.structure = structure || getStructureFromConfig(config);
|
12334 |
|
12335 | if (config) {
|
12336 | if (config.types) {
|
12337 | for (var name in config.types) {
|
12338 | this.addType_(name, config.types[name]);
|
12339 | }
|
12340 | }
|
12341 |
|
12342 | if (config.generic) {
|
12343 | this.generic = true;
|
12344 | for (var name in generic) {
|
12345 | this.addType_(name, generic[name]);
|
12346 | }
|
12347 | }
|
12348 |
|
12349 | if (config.atrules) {
|
12350 | for (var name in config.atrules) {
|
12351 | this.addAtrule_(name, config.atrules[name]);
|
12352 | }
|
12353 | }
|
12354 |
|
12355 | if (config.properties) {
|
12356 | for (var name in config.properties) {
|
12357 | this.addProperty_(name, config.properties[name]);
|
12358 | }
|
12359 | }
|
12360 | }
|
12361 | };
|
12362 |
|
12363 | Lexer.prototype = {
|
12364 | structure: {},
|
12365 | checkStructure: function(ast) {
|
12366 | function collectWarning(node, message) {
|
12367 | warns.push({
|
12368 | node: node,
|
12369 | message: message
|
12370 | });
|
12371 | }
|
12372 |
|
12373 | var structure = this.structure;
|
12374 | var warns = [];
|
12375 |
|
12376 | this.syntax.walk(ast, function(node) {
|
12377 | if (structure.hasOwnProperty(node.type)) {
|
12378 | structure[node.type].check(node, collectWarning);
|
12379 | } else {
|
12380 | collectWarning(node, 'Unknown node type `' + node.type + '`');
|
12381 | }
|
12382 | });
|
12383 |
|
12384 | return warns.length ? warns : false;
|
12385 | },
|
12386 |
|
12387 | createDescriptor: function(syntax, type, name, parent = null) {
|
12388 | var ref = {
|
12389 | type: type,
|
12390 | name: name
|
12391 | };
|
12392 | var descriptor = {
|
12393 | type: type,
|
12394 | name: name,
|
12395 | parent: parent,
|
12396 | syntax: null,
|
12397 | match: null
|
12398 | };
|
12399 |
|
12400 | if (typeof syntax === 'function') {
|
12401 | descriptor.match = buildMatchGraph$1(syntax, ref);
|
12402 | } else {
|
12403 | if (typeof syntax === 'string') {
|
12404 |
|
12405 | Object.defineProperty(descriptor, 'syntax', {
|
12406 | get: function() {
|
12407 | Object.defineProperty(descriptor, 'syntax', {
|
12408 | value: parse_1(syntax)
|
12409 | });
|
12410 |
|
12411 | return descriptor.syntax;
|
12412 | }
|
12413 | });
|
12414 | } else {
|
12415 | descriptor.syntax = syntax;
|
12416 | }
|
12417 |
|
12418 |
|
12419 | Object.defineProperty(descriptor, 'match', {
|
12420 | get: function() {
|
12421 | Object.defineProperty(descriptor, 'match', {
|
12422 | value: buildMatchGraph$1(descriptor.syntax, ref)
|
12423 | });
|
12424 |
|
12425 | return descriptor.match;
|
12426 | }
|
12427 | });
|
12428 | }
|
12429 |
|
12430 | return descriptor;
|
12431 | },
|
12432 | addAtrule_: function(name, syntax) {
|
12433 | if (!syntax) {
|
12434 | return;
|
12435 | }
|
12436 |
|
12437 | this.atrules[name] = {
|
12438 | type: 'Atrule',
|
12439 | name: name,
|
12440 | prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, 'AtrulePrelude', name) : null,
|
12441 | descriptors: syntax.descriptors
|
12442 | ? Object.keys(syntax.descriptors).reduce((res, descName) => {
|
12443 | res[descName] = this.createDescriptor(syntax.descriptors[descName], 'AtruleDescriptor', descName, name);
|
12444 | return res;
|
12445 | }, {})
|
12446 | : null
|
12447 | };
|
12448 | },
|
12449 | addProperty_: function(name, syntax) {
|
12450 | if (!syntax) {
|
12451 | return;
|
12452 | }
|
12453 |
|
12454 | this.properties[name] = this.createDescriptor(syntax, 'Property', name);
|
12455 | },
|
12456 | addType_: function(name, syntax) {
|
12457 | if (!syntax) {
|
12458 | return;
|
12459 | }
|
12460 |
|
12461 | this.types[name] = this.createDescriptor(syntax, 'Type', name);
|
12462 |
|
12463 | if (syntax === generic['-ms-legacy-expression']) {
|
12464 | this.valueCommonSyntax = cssWideKeywordsWithExpression;
|
12465 | }
|
12466 | },
|
12467 |
|
12468 | checkAtruleName: function(atruleName) {
|
12469 | if (!this.getAtrule(atruleName)) {
|
12470 | return new SyntaxReferenceError$1('Unknown at-rule', '@' + atruleName);
|
12471 | }
|
12472 | },
|
12473 | checkAtrulePrelude: function(atruleName, prelude) {
|
12474 | let error = this.checkAtruleName(atruleName);
|
12475 |
|
12476 | if (error) {
|
12477 | return error;
|
12478 | }
|
12479 |
|
12480 | var atrule = this.getAtrule(atruleName);
|
12481 |
|
12482 | if (!atrule.prelude && prelude) {
|
12483 | return new SyntaxError('At-rule `@' + atruleName + '` should not contain a prelude');
|
12484 | }
|
12485 |
|
12486 | if (atrule.prelude && !prelude) {
|
12487 | return new SyntaxError('At-rule `@' + atruleName + '` should contain a prelude');
|
12488 | }
|
12489 | },
|
12490 | checkAtruleDescriptorName: function(atruleName, descriptorName) {
|
12491 | let error = this.checkAtruleName(atruleName);
|
12492 |
|
12493 | if (error) {
|
12494 | return error;
|
12495 | }
|
12496 |
|
12497 | var atrule = this.getAtrule(atruleName);
|
12498 | var descriptor = names.keyword(descriptorName);
|
12499 |
|
12500 | if (!atrule.descriptors) {
|
12501 | return new SyntaxError('At-rule `@' + atruleName + '` has no known descriptors');
|
12502 | }
|
12503 |
|
12504 | if (!atrule.descriptors[descriptor.name] &&
|
12505 | !atrule.descriptors[descriptor.basename]) {
|
12506 | return new SyntaxReferenceError$1('Unknown at-rule descriptor', descriptorName);
|
12507 | }
|
12508 | },
|
12509 | checkPropertyName: function(propertyName) {
|
12510 | var property = names.property(propertyName);
|
12511 |
|
12512 |
|
12513 | if (property.custom) {
|
12514 | return new Error('Lexer matching doesn\'t applicable for custom properties');
|
12515 | }
|
12516 |
|
12517 | if (!this.getProperty(propertyName)) {
|
12518 | return new SyntaxReferenceError$1('Unknown property', propertyName);
|
12519 | }
|
12520 | },
|
12521 |
|
12522 | matchAtrulePrelude: function(atruleName, prelude) {
|
12523 | var error = this.checkAtrulePrelude(atruleName, prelude);
|
12524 |
|
12525 | if (error) {
|
12526 | return buildMatchResult(null, error);
|
12527 | }
|
12528 |
|
12529 | if (!prelude) {
|
12530 | return buildMatchResult(null, null);
|
12531 | }
|
12532 |
|
12533 | return matchSyntax(this, this.getAtrule(atruleName).prelude, prelude, true);
|
12534 | },
|
12535 | matchAtruleDescriptor: function(atruleName, descriptorName, value) {
|
12536 | var error = this.checkAtruleDescriptorName(atruleName, descriptorName);
|
12537 |
|
12538 | if (error) {
|
12539 | return buildMatchResult(null, error);
|
12540 | }
|
12541 |
|
12542 | var atrule = this.getAtrule(atruleName);
|
12543 | var descriptor = names.keyword(descriptorName);
|
12544 |
|
12545 | return matchSyntax(this, atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename], value, true);
|
12546 | },
|
12547 | matchDeclaration: function(node) {
|
12548 | if (node.type !== 'Declaration') {
|
12549 | return buildMatchResult(null, new Error('Not a Declaration node'));
|
12550 | }
|
12551 |
|
12552 | return this.matchProperty(node.property, node.value);
|
12553 | },
|
12554 | matchProperty: function(propertyName, value) {
|
12555 | var error = this.checkPropertyName(propertyName);
|
12556 |
|
12557 | if (error) {
|
12558 | return buildMatchResult(null, error);
|
12559 | }
|
12560 |
|
12561 | return matchSyntax(this, this.getProperty(propertyName), value, true);
|
12562 | },
|
12563 | matchType: function(typeName, value) {
|
12564 | var typeSyntax = this.getType(typeName);
|
12565 |
|
12566 | if (!typeSyntax) {
|
12567 | return buildMatchResult(null, new SyntaxReferenceError$1('Unknown type', typeName));
|
12568 | }
|
12569 |
|
12570 | return matchSyntax(this, typeSyntax, value, false);
|
12571 | },
|
12572 | match: function(syntax, value) {
|
12573 | if (typeof syntax !== 'string' && (!syntax || !syntax.type)) {
|
12574 | return buildMatchResult(null, new SyntaxReferenceError$1('Bad syntax'));
|
12575 | }
|
12576 |
|
12577 | if (typeof syntax === 'string' || !syntax.match) {
|
12578 | syntax = this.createDescriptor(syntax, 'Type', 'anonymous');
|
12579 | }
|
12580 |
|
12581 | return matchSyntax(this, syntax, value, false);
|
12582 | },
|
12583 |
|
12584 | findValueFragments: function(propertyName, value, type, name) {
|
12585 | return search.matchFragments(this, value, this.matchProperty(propertyName, value), type, name);
|
12586 | },
|
12587 | findDeclarationValueFragments: function(declaration, type, name) {
|
12588 | return search.matchFragments(this, declaration.value, this.matchDeclaration(declaration), type, name);
|
12589 | },
|
12590 | findAllFragments: function(ast, type, name) {
|
12591 | var result = [];
|
12592 |
|
12593 | this.syntax.walk(ast, {
|
12594 | visit: 'Declaration',
|
12595 | enter: function(declaration) {
|
12596 | result.push.apply(result, this.findDeclarationValueFragments(declaration, type, name));
|
12597 | }.bind(this)
|
12598 | });
|
12599 |
|
12600 | return result;
|
12601 | },
|
12602 |
|
12603 | getAtrule: function(atruleName, fallbackBasename = true) {
|
12604 | var atrule = names.keyword(atruleName);
|
12605 | var atruleEntry = atrule.vendor && fallbackBasename
|
12606 | ? this.atrules[atrule.name] || this.atrules[atrule.basename]
|
12607 | : this.atrules[atrule.name];
|
12608 |
|
12609 | return atruleEntry || null;
|
12610 | },
|
12611 | getAtrulePrelude: function(atruleName, fallbackBasename = true) {
|
12612 | const atrule = this.getAtrule(atruleName, fallbackBasename);
|
12613 |
|
12614 | return atrule && atrule.prelude || null;
|
12615 | },
|
12616 | getAtruleDescriptor: function(atruleName, name) {
|
12617 | return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators
|
12618 | ? this.atrules[atruleName].declarators[name] || null
|
12619 | : null;
|
12620 | },
|
12621 | getProperty: function(propertyName, fallbackBasename = true) {
|
12622 | var property = names.property(propertyName);
|
12623 | var propertyEntry = property.vendor && fallbackBasename
|
12624 | ? this.properties[property.name] || this.properties[property.basename]
|
12625 | : this.properties[property.name];
|
12626 |
|
12627 | return propertyEntry || null;
|
12628 | },
|
12629 | getType: function(name) {
|
12630 | return this.types.hasOwnProperty(name) ? this.types[name] : null;
|
12631 | },
|
12632 |
|
12633 | validate: function() {
|
12634 | function validate(syntax, name, broken, descriptor) {
|
12635 | if (broken.hasOwnProperty(name)) {
|
12636 | return broken[name];
|
12637 | }
|
12638 |
|
12639 | broken[name] = false;
|
12640 | if (descriptor.syntax !== null) {
|
12641 | walk(descriptor.syntax, function(node) {
|
12642 | if (node.type !== 'Type' && node.type !== 'Property') {
|
12643 | return;
|
12644 | }
|
12645 |
|
12646 | var map = node.type === 'Type' ? syntax.types : syntax.properties;
|
12647 | var brokenMap = node.type === 'Type' ? brokenTypes : brokenProperties;
|
12648 |
|
12649 | if (!map.hasOwnProperty(node.name) || validate(syntax, node.name, brokenMap, map[node.name])) {
|
12650 | broken[name] = true;
|
12651 | }
|
12652 | }, this);
|
12653 | }
|
12654 | }
|
12655 |
|
12656 | var brokenTypes = {};
|
12657 | var brokenProperties = {};
|
12658 |
|
12659 | for (var key in this.types) {
|
12660 | validate(this, key, brokenTypes, this.types[key]);
|
12661 | }
|
12662 |
|
12663 | for (var key in this.properties) {
|
12664 | validate(this, key, brokenProperties, this.properties[key]);
|
12665 | }
|
12666 |
|
12667 | brokenTypes = Object.keys(brokenTypes).filter(function(name) {
|
12668 | return brokenTypes[name];
|
12669 | });
|
12670 | brokenProperties = Object.keys(brokenProperties).filter(function(name) {
|
12671 | return brokenProperties[name];
|
12672 | });
|
12673 |
|
12674 | if (brokenTypes.length || brokenProperties.length) {
|
12675 | return {
|
12676 | types: brokenTypes,
|
12677 | properties: brokenProperties
|
12678 | };
|
12679 | }
|
12680 |
|
12681 | return null;
|
12682 | },
|
12683 | dump: function(syntaxAsAst, pretty) {
|
12684 | return {
|
12685 | generic: this.generic,
|
12686 | types: dumpMapSyntax(this.types, !pretty, syntaxAsAst),
|
12687 | properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst),
|
12688 | atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst)
|
12689 | };
|
12690 | },
|
12691 | toString: function() {
|
12692 | return JSON.stringify(this.dump());
|
12693 | }
|
12694 | };
|
12695 |
|
12696 | var Lexer_1 = Lexer;
|
12697 |
|
12698 | var definitionSyntax = {
|
12699 | SyntaxError: _SyntaxError$1,
|
12700 | parse: parse_1,
|
12701 | generate: generate_1,
|
12702 | walk: walk
|
12703 | };
|
12704 |
|
12705 | var isBOM$2 = tokenizer.isBOM;
|
12706 |
|
12707 | var N$3 = 10;
|
12708 | var F$2 = 12;
|
12709 | var R$2 = 13;
|
12710 |
|
12711 | function computeLinesAndColumns(host, source) {
|
12712 | var sourceLength = source.length;
|
12713 | var lines = adoptBuffer(host.lines, sourceLength);
|
12714 | var line = host.startLine;
|
12715 | var columns = adoptBuffer(host.columns, sourceLength);
|
12716 | var column = host.startColumn;
|
12717 | var startOffset = source.length > 0 ? isBOM$2(source.charCodeAt(0)) : 0;
|
12718 |
|
12719 | for (var i = startOffset; i < sourceLength; i++) {
|
12720 | var code = source.charCodeAt(i);
|
12721 |
|
12722 | lines[i] = line;
|
12723 | columns[i] = column++;
|
12724 |
|
12725 | if (code === N$3 || code === R$2 || code === F$2) {
|
12726 | if (code === R$2 && i + 1 < sourceLength && source.charCodeAt(i + 1) === N$3) {
|
12727 | i++;
|
12728 | lines[i] = line;
|
12729 | columns[i] = column;
|
12730 | }
|
12731 |
|
12732 | line++;
|
12733 | column = 1;
|
12734 | }
|
12735 | }
|
12736 |
|
12737 | lines[i] = line;
|
12738 | columns[i] = column;
|
12739 |
|
12740 | host.lines = lines;
|
12741 | host.columns = columns;
|
12742 | }
|
12743 |
|
12744 | var OffsetToLocation = function() {
|
12745 | this.lines = null;
|
12746 | this.columns = null;
|
12747 | this.linesAndColumnsComputed = false;
|
12748 | };
|
12749 |
|
12750 | OffsetToLocation.prototype = {
|
12751 | setSource: function(source, startOffset, startLine, startColumn) {
|
12752 | this.source = source;
|
12753 | this.startOffset = typeof startOffset === 'undefined' ? 0 : startOffset;
|
12754 | this.startLine = typeof startLine === 'undefined' ? 1 : startLine;
|
12755 | this.startColumn = typeof startColumn === 'undefined' ? 1 : startColumn;
|
12756 | this.linesAndColumnsComputed = false;
|
12757 | },
|
12758 |
|
12759 | ensureLinesAndColumnsComputed: function() {
|
12760 | if (!this.linesAndColumnsComputed) {
|
12761 | computeLinesAndColumns(this, this.source);
|
12762 | this.linesAndColumnsComputed = true;
|
12763 | }
|
12764 | },
|
12765 | getLocation: function(offset, filename) {
|
12766 | this.ensureLinesAndColumnsComputed();
|
12767 |
|
12768 | return {
|
12769 | source: filename,
|
12770 | offset: this.startOffset + offset,
|
12771 | line: this.lines[offset],
|
12772 | column: this.columns[offset]
|
12773 | };
|
12774 | },
|
12775 | getLocationRange: function(start, end, filename) {
|
12776 | this.ensureLinesAndColumnsComputed();
|
12777 |
|
12778 | return {
|
12779 | source: filename,
|
12780 | start: {
|
12781 | offset: this.startOffset + start,
|
12782 | line: this.lines[start],
|
12783 | column: this.columns[start]
|
12784 | },
|
12785 | end: {
|
12786 | offset: this.startOffset + end,
|
12787 | line: this.lines[end],
|
12788 | column: this.columns[end]
|
12789 | }
|
12790 | };
|
12791 | }
|
12792 | };
|
12793 |
|
12794 | var OffsetToLocation_1 = OffsetToLocation;
|
12795 |
|
12796 | var TYPE$7 = tokenizer.TYPE;
|
12797 | var WHITESPACE$2 = TYPE$7.WhiteSpace;
|
12798 | var COMMENT$2 = TYPE$7.Comment;
|
12799 |
|
12800 | var sequence = function readSequence(recognizer) {
|
12801 | var children = this.createList();
|
12802 | var child = null;
|
12803 | var context = {
|
12804 | recognizer: recognizer,
|
12805 | space: null,
|
12806 | ignoreWS: false,
|
12807 | ignoreWSAfter: false
|
12808 | };
|
12809 |
|
12810 | this.scanner.skipSC();
|
12811 |
|
12812 | while (!this.scanner.eof) {
|
12813 | switch (this.scanner.tokenType) {
|
12814 | case COMMENT$2:
|
12815 | this.scanner.next();
|
12816 | continue;
|
12817 |
|
12818 | case WHITESPACE$2:
|
12819 | if (context.ignoreWS) {
|
12820 | this.scanner.next();
|
12821 | } else {
|
12822 | context.space = this.WhiteSpace();
|
12823 | }
|
12824 | continue;
|
12825 | }
|
12826 |
|
12827 | child = recognizer.getNode.call(this, context);
|
12828 |
|
12829 | if (child === undefined) {
|
12830 | break;
|
12831 | }
|
12832 |
|
12833 | if (context.space !== null) {
|
12834 | children.push(context.space);
|
12835 | context.space = null;
|
12836 | }
|
12837 |
|
12838 | children.push(child);
|
12839 |
|
12840 | if (context.ignoreWSAfter) {
|
12841 | context.ignoreWSAfter = false;
|
12842 | context.ignoreWS = true;
|
12843 | } else {
|
12844 | context.ignoreWS = false;
|
12845 | }
|
12846 | }
|
12847 |
|
12848 | return children;
|
12849 | };
|
12850 |
|
12851 | var { findWhiteSpaceStart: findWhiteSpaceStart$1, cmpStr: cmpStr$4 } = utils;
|
12852 |
|
12853 | var noop$2 = function() {};
|
12854 |
|
12855 | var TYPE$8 = _const.TYPE;
|
12856 | var NAME$2 = _const.NAME;
|
12857 | var WHITESPACE$3 = TYPE$8.WhiteSpace;
|
12858 | var COMMENT$3 = TYPE$8.Comment;
|
12859 | var IDENT$2 = TYPE$8.Ident;
|
12860 | var FUNCTION = TYPE$8.Function;
|
12861 | var URL = TYPE$8.Url;
|
12862 | var HASH = TYPE$8.Hash;
|
12863 | var PERCENTAGE = TYPE$8.Percentage;
|
12864 | var NUMBER$2 = TYPE$8.Number;
|
12865 | var NUMBERSIGN$1 = 0x0023;
|
12866 | var NULL = 0;
|
12867 |
|
12868 | function createParseContext(name) {
|
12869 | return function() {
|
12870 | return this[name]();
|
12871 | };
|
12872 | }
|
12873 |
|
12874 | function processConfig(config) {
|
12875 | var parserConfig = {
|
12876 | context: {},
|
12877 | scope: {},
|
12878 | atrule: {},
|
12879 | pseudo: {}
|
12880 | };
|
12881 |
|
12882 | if (config.parseContext) {
|
12883 | for (var name in config.parseContext) {
|
12884 | switch (typeof config.parseContext[name]) {
|
12885 | case 'function':
|
12886 | parserConfig.context[name] = config.parseContext[name];
|
12887 | break;
|
12888 |
|
12889 | case 'string':
|
12890 | parserConfig.context[name] = createParseContext(config.parseContext[name]);
|
12891 | break;
|
12892 | }
|
12893 | }
|
12894 | }
|
12895 |
|
12896 | if (config.scope) {
|
12897 | for (var name in config.scope) {
|
12898 | parserConfig.scope[name] = config.scope[name];
|
12899 | }
|
12900 | }
|
12901 |
|
12902 | if (config.atrule) {
|
12903 | for (var name in config.atrule) {
|
12904 | var atrule = config.atrule[name];
|
12905 |
|
12906 | if (atrule.parse) {
|
12907 | parserConfig.atrule[name] = atrule.parse;
|
12908 | }
|
12909 | }
|
12910 | }
|
12911 |
|
12912 | if (config.pseudo) {
|
12913 | for (var name in config.pseudo) {
|
12914 | var pseudo = config.pseudo[name];
|
12915 |
|
12916 | if (pseudo.parse) {
|
12917 | parserConfig.pseudo[name] = pseudo.parse;
|
12918 | }
|
12919 | }
|
12920 | }
|
12921 |
|
12922 | if (config.node) {
|
12923 | for (var name in config.node) {
|
12924 | parserConfig[name] = config.node[name].parse;
|
12925 | }
|
12926 | }
|
12927 |
|
12928 | return parserConfig;
|
12929 | }
|
12930 |
|
12931 | var create = function createParser(config) {
|
12932 | var parser = {
|
12933 | scanner: new TokenStream_1(),
|
12934 | locationMap: new OffsetToLocation_1(),
|
12935 |
|
12936 | filename: '<unknown>',
|
12937 | needPositions: false,
|
12938 | onParseError: noop$2,
|
12939 | onParseErrorThrow: false,
|
12940 | parseAtrulePrelude: true,
|
12941 | parseRulePrelude: true,
|
12942 | parseValue: true,
|
12943 | parseCustomProperty: false,
|
12944 |
|
12945 | readSequence: sequence,
|
12946 |
|
12947 | createList: function() {
|
12948 | return new List_1();
|
12949 | },
|
12950 | createSingleNodeList: function(node) {
|
12951 | return new List_1().appendData(node);
|
12952 | },
|
12953 | getFirstListNode: function(list) {
|
12954 | return list && list.first();
|
12955 | },
|
12956 | getLastListNode: function(list) {
|
12957 | return list.last();
|
12958 | },
|
12959 |
|
12960 | parseWithFallback: function(consumer, fallback) {
|
12961 | var startToken = this.scanner.tokenIndex;
|
12962 |
|
12963 | try {
|
12964 | return consumer.call(this);
|
12965 | } catch (e) {
|
12966 | if (this.onParseErrorThrow) {
|
12967 | throw e;
|
12968 | }
|
12969 |
|
12970 | var fallbackNode = fallback.call(this, startToken);
|
12971 |
|
12972 | this.onParseErrorThrow = true;
|
12973 | this.onParseError(e, fallbackNode);
|
12974 | this.onParseErrorThrow = false;
|
12975 |
|
12976 | return fallbackNode;
|
12977 | }
|
12978 | },
|
12979 |
|
12980 | lookupNonWSType: function(offset) {
|
12981 | do {
|
12982 | var type = this.scanner.lookupType(offset++);
|
12983 | if (type !== WHITESPACE$3) {
|
12984 | return type;
|
12985 | }
|
12986 | } while (type !== NULL);
|
12987 |
|
12988 | return NULL;
|
12989 | },
|
12990 |
|
12991 | eat: function(tokenType) {
|
12992 | if (this.scanner.tokenType !== tokenType) {
|
12993 | var offset = this.scanner.tokenStart;
|
12994 | var message = NAME$2[tokenType] + ' is expected';
|
12995 |
|
12996 |
|
12997 | switch (tokenType) {
|
12998 | case IDENT$2:
|
12999 |
|
13000 | if (this.scanner.tokenType === FUNCTION || this.scanner.tokenType === URL) {
|
13001 | offset = this.scanner.tokenEnd - 1;
|
13002 | message = 'Identifier is expected but function found';
|
13003 | } else {
|
13004 | message = 'Identifier is expected';
|
13005 | }
|
13006 | break;
|
13007 |
|
13008 | case HASH:
|
13009 | if (this.scanner.isDelim(NUMBERSIGN$1)) {
|
13010 | this.scanner.next();
|
13011 | offset++;
|
13012 | message = 'Name is expected';
|
13013 | }
|
13014 | break;
|
13015 |
|
13016 | case PERCENTAGE:
|
13017 | if (this.scanner.tokenType === NUMBER$2) {
|
13018 | offset = this.scanner.tokenEnd;
|
13019 | message = 'Percent sign is expected';
|
13020 | }
|
13021 | break;
|
13022 |
|
13023 | default:
|
13024 |
|
13025 |
|
13026 | if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === tokenType) {
|
13027 | offset = offset + 1;
|
13028 | }
|
13029 | }
|
13030 |
|
13031 | this.error(message, offset);
|
13032 | }
|
13033 |
|
13034 | this.scanner.next();
|
13035 | },
|
13036 |
|
13037 | consume: function(tokenType) {
|
13038 | var value = this.scanner.getTokenValue();
|
13039 |
|
13040 | this.eat(tokenType);
|
13041 |
|
13042 | return value;
|
13043 | },
|
13044 | consumeFunctionName: function() {
|
13045 | var name = this.scanner.source.substring(this.scanner.tokenStart, this.scanner.tokenEnd - 1);
|
13046 |
|
13047 | this.eat(FUNCTION);
|
13048 |
|
13049 | return name;
|
13050 | },
|
13051 |
|
13052 | getLocation: function(start, end) {
|
13053 | if (this.needPositions) {
|
13054 | return this.locationMap.getLocationRange(
|
13055 | start,
|
13056 | end,
|
13057 | this.filename
|
13058 | );
|
13059 | }
|
13060 |
|
13061 | return null;
|
13062 | },
|
13063 | getLocationFromList: function(list) {
|
13064 | if (this.needPositions) {
|
13065 | var head = this.getFirstListNode(list);
|
13066 | var tail = this.getLastListNode(list);
|
13067 | return this.locationMap.getLocationRange(
|
13068 | head !== null ? head.loc.start.offset - this.locationMap.startOffset : this.scanner.tokenStart,
|
13069 | tail !== null ? tail.loc.end.offset - this.locationMap.startOffset : this.scanner.tokenStart,
|
13070 | this.filename
|
13071 | );
|
13072 | }
|
13073 |
|
13074 | return null;
|
13075 | },
|
13076 |
|
13077 | error: function(message, offset) {
|
13078 | var location = typeof offset !== 'undefined' && offset < this.scanner.source.length
|
13079 | ? this.locationMap.getLocation(offset)
|
13080 | : this.scanner.eof
|
13081 | ? this.locationMap.getLocation(findWhiteSpaceStart$1(this.scanner.source, this.scanner.source.length - 1))
|
13082 | : this.locationMap.getLocation(this.scanner.tokenStart);
|
13083 |
|
13084 | throw new _SyntaxError(
|
13085 | message || 'Unexpected input',
|
13086 | this.scanner.source,
|
13087 | location.offset,
|
13088 | location.line,
|
13089 | location.column
|
13090 | );
|
13091 | }
|
13092 | };
|
13093 |
|
13094 | config = processConfig(config || {});
|
13095 | for (var key in config) {
|
13096 | parser[key] = config[key];
|
13097 | }
|
13098 |
|
13099 | return function(source, options) {
|
13100 | options = options || {};
|
13101 |
|
13102 | var context = options.context || 'default';
|
13103 | var onComment = options.onComment;
|
13104 | var ast;
|
13105 |
|
13106 | tokenizer(source, parser.scanner);
|
13107 | parser.locationMap.setSource(
|
13108 | source,
|
13109 | options.offset,
|
13110 | options.line,
|
13111 | options.column
|
13112 | );
|
13113 |
|
13114 | parser.filename = options.filename || '<unknown>';
|
13115 | parser.needPositions = Boolean(options.positions);
|
13116 | parser.onParseError = typeof options.onParseError === 'function' ? options.onParseError : noop$2;
|
13117 | parser.onParseErrorThrow = false;
|
13118 | parser.parseAtrulePrelude = 'parseAtrulePrelude' in options ? Boolean(options.parseAtrulePrelude) : true;
|
13119 | parser.parseRulePrelude = 'parseRulePrelude' in options ? Boolean(options.parseRulePrelude) : true;
|
13120 | parser.parseValue = 'parseValue' in options ? Boolean(options.parseValue) : true;
|
13121 | parser.parseCustomProperty = 'parseCustomProperty' in options ? Boolean(options.parseCustomProperty) : false;
|
13122 |
|
13123 | if (!parser.context.hasOwnProperty(context)) {
|
13124 | throw new Error('Unknown context `' + context + '`');
|
13125 | }
|
13126 |
|
13127 | if (typeof onComment === 'function') {
|
13128 | parser.scanner.forEachToken((type, start, end) => {
|
13129 | if (type === COMMENT$3) {
|
13130 | const loc = parser.getLocation(start, end);
|
13131 | const value = cmpStr$4(source, end - 2, end, '*/')
|
13132 | ? source.slice(start + 2, end - 2)
|
13133 | : source.slice(start + 2, end);
|
13134 |
|
13135 | onComment(value, loc);
|
13136 | }
|
13137 | });
|
13138 | }
|
13139 |
|
13140 | ast = parser.context[context].call(parser, options);
|
13141 |
|
13142 | if (!parser.scanner.eof) {
|
13143 | parser.error();
|
13144 | }
|
13145 |
|
13146 | return ast;
|
13147 | };
|
13148 | };
|
13149 |
|
13150 |
|
13151 |
|
13152 |
|
13153 |
|
13154 |
|
13155 |
|
13156 |
|
13157 | var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
|
13158 |
|
13159 |
|
13160 |
|
13161 |
|
13162 | var encode = function (number) {
|
13163 | if (0 <= number && number < intToCharMap.length) {
|
13164 | return intToCharMap[number];
|
13165 | }
|
13166 | throw new TypeError("Must be between 0 and 63: " + number);
|
13167 | };
|
13168 |
|
13169 |
|
13170 |
|
13171 |
|
13172 |
|
13173 | var decode = function (charCode) {
|
13174 | var bigA = 65;
|
13175 | var bigZ = 90;
|
13176 |
|
13177 | var littleA = 97;
|
13178 | var littleZ = 122;
|
13179 |
|
13180 | var zero = 48;
|
13181 | var nine = 57;
|
13182 |
|
13183 | var plus = 43;
|
13184 | var slash = 47;
|
13185 |
|
13186 | var littleOffset = 26;
|
13187 | var numberOffset = 52;
|
13188 |
|
13189 |
|
13190 | if (bigA <= charCode && charCode <= bigZ) {
|
13191 | return (charCode - bigA);
|
13192 | }
|
13193 |
|
13194 |
|
13195 | if (littleA <= charCode && charCode <= littleZ) {
|
13196 | return (charCode - littleA + littleOffset);
|
13197 | }
|
13198 |
|
13199 |
|
13200 | if (zero <= charCode && charCode <= nine) {
|
13201 | return (charCode - zero + numberOffset);
|
13202 | }
|
13203 |
|
13204 |
|
13205 | if (charCode == plus) {
|
13206 | return 62;
|
13207 | }
|
13208 |
|
13209 |
|
13210 | if (charCode == slash) {
|
13211 | return 63;
|
13212 | }
|
13213 |
|
13214 |
|
13215 | return -1;
|
13216 | };
|
13217 |
|
13218 | var base64 = {
|
13219 | encode: encode,
|
13220 | decode: decode
|
13221 | };
|
13222 |
|
13223 |
|
13224 |
|
13225 |
|
13226 |
|
13227 |
|
13228 |
|
13229 |
|
13230 |
|
13231 |
|
13232 |
|
13233 |
|
13234 |
|
13235 |
|
13236 |
|
13237 |
|
13238 |
|
13239 |
|
13240 |
|
13241 |
|
13242 |
|
13243 |
|
13244 |
|
13245 |
|
13246 |
|
13247 |
|
13248 |
|
13249 |
|
13250 |
|
13251 |
|
13252 |
|
13253 |
|
13254 |
|
13255 |
|
13256 |
|
13257 |
|
13258 |
|
13259 |
|
13260 |
|
13261 |
|
13262 |
|
13263 |
|
13264 |
|
13265 |
|
13266 |
|
13267 |
|
13268 |
|
13269 |
|
13270 |
|
13271 |
|
13272 |
|
13273 |
|
13274 |
|
13275 | var VLQ_BASE_SHIFT = 5;
|
13276 |
|
13277 |
|
13278 | var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
|
13279 |
|
13280 |
|
13281 | var VLQ_BASE_MASK = VLQ_BASE - 1;
|
13282 |
|
13283 |
|
13284 | var VLQ_CONTINUATION_BIT = VLQ_BASE;
|
13285 |
|
13286 |
|
13287 |
|
13288 |
|
13289 |
|
13290 |
|
13291 |
|
13292 | function toVLQSigned(aValue) {
|
13293 | return aValue < 0
|
13294 | ? ((-aValue) << 1) + 1
|
13295 | : (aValue << 1) + 0;
|
13296 | }
|
13297 |
|
13298 |
|
13299 |
|
13300 |
|
13301 |
|
13302 |
|
13303 |
|
13304 | function fromVLQSigned(aValue) {
|
13305 | var isNegative = (aValue & 1) === 1;
|
13306 | var shifted = aValue >> 1;
|
13307 | return isNegative
|
13308 | ? -shifted
|
13309 | : shifted;
|
13310 | }
|
13311 |
|
13312 |
|
13313 |
|
13314 |
|
13315 | var encode$1 = function base64VLQ_encode(aValue) {
|
13316 | var encoded = "";
|
13317 | var digit;
|
13318 |
|
13319 | var vlq = toVLQSigned(aValue);
|
13320 |
|
13321 | do {
|
13322 | digit = vlq & VLQ_BASE_MASK;
|
13323 | vlq >>>= VLQ_BASE_SHIFT;
|
13324 | if (vlq > 0) {
|
13325 |
|
13326 |
|
13327 | digit |= VLQ_CONTINUATION_BIT;
|
13328 | }
|
13329 | encoded += base64.encode(digit);
|
13330 | } while (vlq > 0);
|
13331 |
|
13332 | return encoded;
|
13333 | };
|
13334 |
|
13335 |
|
13336 |
|
13337 |
|
13338 |
|
13339 | var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) {
|
13340 | var strLen = aStr.length;
|
13341 | var result = 0;
|
13342 | var shift = 0;
|
13343 | var continuation, digit;
|
13344 |
|
13345 | do {
|
13346 | if (aIndex >= strLen) {
|
13347 | throw new Error("Expected more digits in base 64 VLQ value.");
|
13348 | }
|
13349 |
|
13350 | digit = base64.decode(aStr.charCodeAt(aIndex++));
|
13351 | if (digit === -1) {
|
13352 | throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
|
13353 | }
|
13354 |
|
13355 | continuation = !!(digit & VLQ_CONTINUATION_BIT);
|
13356 | digit &= VLQ_BASE_MASK;
|
13357 | result = result + (digit << shift);
|
13358 | shift += VLQ_BASE_SHIFT;
|
13359 | } while (continuation);
|
13360 |
|
13361 | aOutParam.value = fromVLQSigned(result);
|
13362 | aOutParam.rest = aIndex;
|
13363 | };
|
13364 |
|
13365 | var base64Vlq = {
|
13366 | encode: encode$1,
|
13367 | decode: decode$1
|
13368 | };
|
13369 |
|
13370 |
|
13371 |
|
13372 | var util = createCommonjsModule(function (module, exports) {
|
13373 |
|
13374 |
|
13375 |
|
13376 |
|
13377 |
|
13378 |
|
13379 |
|
13380 |
|
13381 |
|
13382 |
|
13383 |
|
13384 |
|
13385 |
|
13386 |
|
13387 |
|
13388 |
|
13389 | function getArg(aArgs, aName, aDefaultValue) {
|
13390 | if (aName in aArgs) {
|
13391 | return aArgs[aName];
|
13392 | } else if (arguments.length === 3) {
|
13393 | return aDefaultValue;
|
13394 | } else {
|
13395 | throw new Error('"' + aName + '" is a required argument.');
|
13396 | }
|
13397 | }
|
13398 | exports.getArg = getArg;
|
13399 |
|
13400 | var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
|
13401 | var dataUrlRegexp = /^data:.+\,.+$/;
|
13402 |
|
13403 | function urlParse(aUrl) {
|
13404 | var match = aUrl.match(urlRegexp);
|
13405 | if (!match) {
|
13406 | return null;
|
13407 | }
|
13408 | return {
|
13409 | scheme: match[1],
|
13410 | auth: match[2],
|
13411 | host: match[3],
|
13412 | port: match[4],
|
13413 | path: match[5]
|
13414 | };
|
13415 | }
|
13416 | exports.urlParse = urlParse;
|
13417 |
|
13418 | function urlGenerate(aParsedUrl) {
|
13419 | var url = '';
|
13420 | if (aParsedUrl.scheme) {
|
13421 | url += aParsedUrl.scheme + ':';
|
13422 | }
|
13423 | url += '//';
|
13424 | if (aParsedUrl.auth) {
|
13425 | url += aParsedUrl.auth + '@';
|
13426 | }
|
13427 | if (aParsedUrl.host) {
|
13428 | url += aParsedUrl.host;
|
13429 | }
|
13430 | if (aParsedUrl.port) {
|
13431 | url += ":" + aParsedUrl.port;
|
13432 | }
|
13433 | if (aParsedUrl.path) {
|
13434 | url += aParsedUrl.path;
|
13435 | }
|
13436 | return url;
|
13437 | }
|
13438 | exports.urlGenerate = urlGenerate;
|
13439 |
|
13440 |
|
13441 |
|
13442 |
|
13443 |
|
13444 |
|
13445 |
|
13446 |
|
13447 |
|
13448 |
|
13449 |
|
13450 |
|
13451 | function normalize(aPath) {
|
13452 | var path = aPath;
|
13453 | var url = urlParse(aPath);
|
13454 | if (url) {
|
13455 | if (!url.path) {
|
13456 | return aPath;
|
13457 | }
|
13458 | path = url.path;
|
13459 | }
|
13460 | var isAbsolute = exports.isAbsolute(path);
|
13461 |
|
13462 | var parts = path.split(/\/+/);
|
13463 | for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
13464 | part = parts[i];
|
13465 | if (part === '.') {
|
13466 | parts.splice(i, 1);
|
13467 | } else if (part === '..') {
|
13468 | up++;
|
13469 | } else if (up > 0) {
|
13470 | if (part === '') {
|
13471 |
|
13472 |
|
13473 |
|
13474 | parts.splice(i + 1, up);
|
13475 | up = 0;
|
13476 | } else {
|
13477 | parts.splice(i, 2);
|
13478 | up--;
|
13479 | }
|
13480 | }
|
13481 | }
|
13482 | path = parts.join('/');
|
13483 |
|
13484 | if (path === '') {
|
13485 | path = isAbsolute ? '/' : '.';
|
13486 | }
|
13487 |
|
13488 | if (url) {
|
13489 | url.path = path;
|
13490 | return urlGenerate(url);
|
13491 | }
|
13492 | return path;
|
13493 | }
|
13494 | exports.normalize = normalize;
|
13495 |
|
13496 |
|
13497 |
|
13498 |
|
13499 |
|
13500 |
|
13501 |
|
13502 |
|
13503 |
|
13504 |
|
13505 |
|
13506 |
|
13507 |
|
13508 |
|
13509 |
|
13510 |
|
13511 |
|
13512 | function join(aRoot, aPath) {
|
13513 | if (aRoot === "") {
|
13514 | aRoot = ".";
|
13515 | }
|
13516 | if (aPath === "") {
|
13517 | aPath = ".";
|
13518 | }
|
13519 | var aPathUrl = urlParse(aPath);
|
13520 | var aRootUrl = urlParse(aRoot);
|
13521 | if (aRootUrl) {
|
13522 | aRoot = aRootUrl.path || '/';
|
13523 | }
|
13524 |
|
13525 |
|
13526 | if (aPathUrl && !aPathUrl.scheme) {
|
13527 | if (aRootUrl) {
|
13528 | aPathUrl.scheme = aRootUrl.scheme;
|
13529 | }
|
13530 | return urlGenerate(aPathUrl);
|
13531 | }
|
13532 |
|
13533 | if (aPathUrl || aPath.match(dataUrlRegexp)) {
|
13534 | return aPath;
|
13535 | }
|
13536 |
|
13537 |
|
13538 | if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
|
13539 | aRootUrl.host = aPath;
|
13540 | return urlGenerate(aRootUrl);
|
13541 | }
|
13542 |
|
13543 | var joined = aPath.charAt(0) === '/'
|
13544 | ? aPath
|
13545 | : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
|
13546 |
|
13547 | if (aRootUrl) {
|
13548 | aRootUrl.path = joined;
|
13549 | return urlGenerate(aRootUrl);
|
13550 | }
|
13551 | return joined;
|
13552 | }
|
13553 | exports.join = join;
|
13554 |
|
13555 | exports.isAbsolute = function (aPath) {
|
13556 | return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
|
13557 | };
|
13558 |
|
13559 |
|
13560 |
|
13561 |
|
13562 |
|
13563 |
|
13564 |
|
13565 | function relative(aRoot, aPath) {
|
13566 | if (aRoot === "") {
|
13567 | aRoot = ".";
|
13568 | }
|
13569 |
|
13570 | aRoot = aRoot.replace(/\/$/, '');
|
13571 |
|
13572 |
|
13573 |
|
13574 |
|
13575 |
|
13576 | var level = 0;
|
13577 | while (aPath.indexOf(aRoot + '/') !== 0) {
|
13578 | var index = aRoot.lastIndexOf("/");
|
13579 | if (index < 0) {
|
13580 | return aPath;
|
13581 | }
|
13582 |
|
13583 |
|
13584 |
|
13585 |
|
13586 | aRoot = aRoot.slice(0, index);
|
13587 | if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
|
13588 | return aPath;
|
13589 | }
|
13590 |
|
13591 | ++level;
|
13592 | }
|
13593 |
|
13594 |
|
13595 | return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
13596 | }
|
13597 | exports.relative = relative;
|
13598 |
|
13599 | var supportsNullProto = (function () {
|
13600 | var obj = Object.create(null);
|
13601 | return !('__proto__' in obj);
|
13602 | }());
|
13603 |
|
13604 | function identity (s) {
|
13605 | return s;
|
13606 | }
|
13607 |
|
13608 |
|
13609 |
|
13610 |
|
13611 |
|
13612 |
|
13613 |
|
13614 |
|
13615 |
|
13616 |
|
13617 | function toSetString(aStr) {
|
13618 | if (isProtoString(aStr)) {
|
13619 | return '$' + aStr;
|
13620 | }
|
13621 |
|
13622 | return aStr;
|
13623 | }
|
13624 | exports.toSetString = supportsNullProto ? identity : toSetString;
|
13625 |
|
13626 | function fromSetString(aStr) {
|
13627 | if (isProtoString(aStr)) {
|
13628 | return aStr.slice(1);
|
13629 | }
|
13630 |
|
13631 | return aStr;
|
13632 | }
|
13633 | exports.fromSetString = supportsNullProto ? identity : fromSetString;
|
13634 |
|
13635 | function isProtoString(s) {
|
13636 | if (!s) {
|
13637 | return false;
|
13638 | }
|
13639 |
|
13640 | var length = s.length;
|
13641 |
|
13642 | if (length < 9 ) {
|
13643 | return false;
|
13644 | }
|
13645 |
|
13646 | if (s.charCodeAt(length - 1) !== 95 ||
|
13647 | s.charCodeAt(length - 2) !== 95 ||
|
13648 | s.charCodeAt(length - 3) !== 111 ||
|
13649 | s.charCodeAt(length - 4) !== 116 ||
|
13650 | s.charCodeAt(length - 5) !== 111 ||
|
13651 | s.charCodeAt(length - 6) !== 114 ||
|
13652 | s.charCodeAt(length - 7) !== 112 ||
|
13653 | s.charCodeAt(length - 8) !== 95 ||
|
13654 | s.charCodeAt(length - 9) !== 95 ) {
|
13655 | return false;
|
13656 | }
|
13657 |
|
13658 | for (var i = length - 10; i >= 0; i--) {
|
13659 | if (s.charCodeAt(i) !== 36 ) {
|
13660 | return false;
|
13661 | }
|
13662 | }
|
13663 |
|
13664 | return true;
|
13665 | }
|
13666 |
|
13667 |
|
13668 |
|
13669 |
|
13670 |
|
13671 |
|
13672 |
|
13673 |
|
13674 |
|
13675 | function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
13676 | var cmp = strcmp(mappingA.source, mappingB.source);
|
13677 | if (cmp !== 0) {
|
13678 | return cmp;
|
13679 | }
|
13680 |
|
13681 | cmp = mappingA.originalLine - mappingB.originalLine;
|
13682 | if (cmp !== 0) {
|
13683 | return cmp;
|
13684 | }
|
13685 |
|
13686 | cmp = mappingA.originalColumn - mappingB.originalColumn;
|
13687 | if (cmp !== 0 || onlyCompareOriginal) {
|
13688 | return cmp;
|
13689 | }
|
13690 |
|
13691 | cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
13692 | if (cmp !== 0) {
|
13693 | return cmp;
|
13694 | }
|
13695 |
|
13696 | cmp = mappingA.generatedLine - mappingB.generatedLine;
|
13697 | if (cmp !== 0) {
|
13698 | return cmp;
|
13699 | }
|
13700 |
|
13701 | return strcmp(mappingA.name, mappingB.name);
|
13702 | }
|
13703 | exports.compareByOriginalPositions = compareByOriginalPositions;
|
13704 |
|
13705 |
|
13706 |
|
13707 |
|
13708 |
|
13709 |
|
13710 |
|
13711 |
|
13712 |
|
13713 |
|
13714 | function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
13715 | var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
13716 | if (cmp !== 0) {
|
13717 | return cmp;
|
13718 | }
|
13719 |
|
13720 | cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
13721 | if (cmp !== 0 || onlyCompareGenerated) {
|
13722 | return cmp;
|
13723 | }
|
13724 |
|
13725 | cmp = strcmp(mappingA.source, mappingB.source);
|
13726 | if (cmp !== 0) {
|
13727 | return cmp;
|
13728 | }
|
13729 |
|
13730 | cmp = mappingA.originalLine - mappingB.originalLine;
|
13731 | if (cmp !== 0) {
|
13732 | return cmp;
|
13733 | }
|
13734 |
|
13735 | cmp = mappingA.originalColumn - mappingB.originalColumn;
|
13736 | if (cmp !== 0) {
|
13737 | return cmp;
|
13738 | }
|
13739 |
|
13740 | return strcmp(mappingA.name, mappingB.name);
|
13741 | }
|
13742 | exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
13743 |
|
13744 | function strcmp(aStr1, aStr2) {
|
13745 | if (aStr1 === aStr2) {
|
13746 | return 0;
|
13747 | }
|
13748 |
|
13749 | if (aStr1 === null) {
|
13750 | return 1;
|
13751 | }
|
13752 |
|
13753 | if (aStr2 === null) {
|
13754 | return -1;
|
13755 | }
|
13756 |
|
13757 | if (aStr1 > aStr2) {
|
13758 | return 1;
|
13759 | }
|
13760 |
|
13761 | return -1;
|
13762 | }
|
13763 |
|
13764 |
|
13765 |
|
13766 |
|
13767 |
|
13768 | function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
13769 | var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
13770 | if (cmp !== 0) {
|
13771 | return cmp;
|
13772 | }
|
13773 |
|
13774 | cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
13775 | if (cmp !== 0) {
|
13776 | return cmp;
|
13777 | }
|
13778 |
|
13779 | cmp = strcmp(mappingA.source, mappingB.source);
|
13780 | if (cmp !== 0) {
|
13781 | return cmp;
|
13782 | }
|
13783 |
|
13784 | cmp = mappingA.originalLine - mappingB.originalLine;
|
13785 | if (cmp !== 0) {
|
13786 | return cmp;
|
13787 | }
|
13788 |
|
13789 | cmp = mappingA.originalColumn - mappingB.originalColumn;
|
13790 | if (cmp !== 0) {
|
13791 | return cmp;
|
13792 | }
|
13793 |
|
13794 | return strcmp(mappingA.name, mappingB.name);
|
13795 | }
|
13796 | exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
13797 |
|
13798 |
|
13799 |
|
13800 |
|
13801 |
|
13802 |
|
13803 | function parseSourceMapInput(str) {
|
13804 | return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
|
13805 | }
|
13806 | exports.parseSourceMapInput = parseSourceMapInput;
|
13807 |
|
13808 |
|
13809 |
|
13810 |
|
13811 |
|
13812 | function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
|
13813 | sourceURL = sourceURL || '';
|
13814 |
|
13815 | if (sourceRoot) {
|
13816 |
|
13817 | if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
|
13818 | sourceRoot += '/';
|
13819 | }
|
13820 |
|
13821 |
|
13822 |
|
13823 |
|
13824 |
|
13825 | sourceURL = sourceRoot + sourceURL;
|
13826 | }
|
13827 |
|
13828 |
|
13829 |
|
13830 |
|
13831 |
|
13832 |
|
13833 |
|
13834 |
|
13835 |
|
13836 |
|
13837 |
|
13838 |
|
13839 |
|
13840 |
|
13841 |
|
13842 | if (sourceMapURL) {
|
13843 | var parsed = urlParse(sourceMapURL);
|
13844 | if (!parsed) {
|
13845 | throw new Error("sourceMapURL could not be parsed");
|
13846 | }
|
13847 | if (parsed.path) {
|
13848 |
|
13849 | var index = parsed.path.lastIndexOf('/');
|
13850 | if (index >= 0) {
|
13851 | parsed.path = parsed.path.substring(0, index + 1);
|
13852 | }
|
13853 | }
|
13854 | sourceURL = join(urlGenerate(parsed), sourceURL);
|
13855 | }
|
13856 |
|
13857 | return normalize(sourceURL);
|
13858 | }
|
13859 | exports.computeSourceURL = computeSourceURL;
|
13860 | });
|
13861 |
|
13862 |
|
13863 |
|
13864 |
|
13865 |
|
13866 |
|
13867 |
|
13868 |
|
13869 |
|
13870 |
|
13871 | var has = Object.prototype.hasOwnProperty;
|
13872 | var hasNativeMap = typeof Map !== "undefined";
|
13873 |
|
13874 |
|
13875 |
|
13876 |
|
13877 |
|
13878 |
|
13879 |
|
13880 | function ArraySet() {
|
13881 | this._array = [];
|
13882 | this._set = hasNativeMap ? new Map() : Object.create(null);
|
13883 | }
|
13884 |
|
13885 |
|
13886 |
|
13887 |
|
13888 | ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
|
13889 | var set = new ArraySet();
|
13890 | for (var i = 0, len = aArray.length; i < len; i++) {
|
13891 | set.add(aArray[i], aAllowDuplicates);
|
13892 | }
|
13893 | return set;
|
13894 | };
|
13895 |
|
13896 | /**
|
13897 | * Return how many unique items are in this ArraySet. If duplicates have been
|
13898 | * added, than those do not count towards the size.
|
13899 | *
|
13900 | * @returns Number
|
13901 | */
|
13902 | ArraySet.prototype.size = function ArraySet_size() {
|
13903 | return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
|
13904 | };
|
13905 |
|
13906 |
|
13907 |
|
13908 |
|
13909 |
|
13910 |
|
13911 | ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
|
13912 | var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
|
13913 | var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
|
13914 | var idx = this._array.length;
|
13915 | if (!isDuplicate || aAllowDuplicates) {
|
13916 | this._array.push(aStr);
|
13917 | }
|
13918 | if (!isDuplicate) {
|
13919 | if (hasNativeMap) {
|
13920 | this._set.set(aStr, idx);
|
13921 | } else {
|
13922 | this._set[sStr] = idx;
|
13923 | }
|
13924 | }
|
13925 | };
|
13926 |
|
13927 |
|
13928 |
|
13929 |
|
13930 |
|
13931 |
|
13932 | ArraySet.prototype.has = function ArraySet_has(aStr) {
|
13933 | if (hasNativeMap) {
|
13934 | return this._set.has(aStr);
|
13935 | } else {
|
13936 | var sStr = util.toSetString(aStr);
|
13937 | return has.call(this._set, sStr);
|
13938 | }
|
13939 | };
|
13940 |
|
13941 |
|
13942 |
|
13943 |
|
13944 |
|
13945 |
|
13946 | ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
|
13947 | if (hasNativeMap) {
|
13948 | var idx = this._set.get(aStr);
|
13949 | if (idx >= 0) {
|
13950 | return idx;
|
13951 | }
|
13952 | } else {
|
13953 | var sStr = util.toSetString(aStr);
|
13954 | if (has.call(this._set, sStr)) {
|
13955 | return this._set[sStr];
|
13956 | }
|
13957 | }
|
13958 |
|
13959 | throw new Error('"' + aStr + '" is not in the set.');
|
13960 | };
|
13961 |
|
13962 |
|
13963 |
|
13964 |
|
13965 |
|
13966 |
|
13967 | ArraySet.prototype.at = function ArraySet_at(aIdx) {
|
13968 | if (aIdx >= 0 && aIdx < this._array.length) {
|
13969 | return this._array[aIdx];
|
13970 | }
|
13971 | throw new Error('No element indexed by ' + aIdx);
|
13972 | };
|
13973 |
|
13974 |
|
13975 |
|
13976 |
|
13977 |
|
13978 |
|
13979 | ArraySet.prototype.toArray = function ArraySet_toArray() {
|
13980 | return this._array.slice();
|
13981 | };
|
13982 |
|
13983 | var ArraySet_1 = ArraySet;
|
13984 |
|
13985 | var arraySet = {
|
13986 | ArraySet: ArraySet_1
|
13987 | };
|
13988 |
|
13989 |
|
13990 |
|
13991 |
|
13992 |
|
13993 |
|
13994 |
|
13995 |
|
13996 |
|
13997 |
|
13998 |
|
13999 |
|
14000 |
|
14001 |
|
14002 |
|
14003 | function generatedPositionAfter(mappingA, mappingB) {
|
14004 |
|
14005 | var lineA = mappingA.generatedLine;
|
14006 | var lineB = mappingB.generatedLine;
|
14007 | var columnA = mappingA.generatedColumn;
|
14008 | var columnB = mappingB.generatedColumn;
|
14009 | return lineB > lineA || lineB == lineA && columnB >= columnA ||
|
14010 | util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
14011 | }
|
14012 |
|
14013 |
|
14014 |
|
14015 |
|
14016 |
|
14017 |
|
14018 | function MappingList() {
|
14019 | this._array = [];
|
14020 | this._sorted = true;
|
14021 |
|
14022 | this._last = {generatedLine: -1, generatedColumn: 0};
|
14023 | }
|
14024 |
|
14025 |
|
14026 |
|
14027 |
|
14028 |
|
14029 |
|
14030 |
|
14031 | MappingList.prototype.unsortedForEach =
|
14032 | function MappingList_forEach(aCallback, aThisArg) {
|
14033 | this._array.forEach(aCallback, aThisArg);
|
14034 | };
|
14035 |
|
14036 |
|
14037 |
|
14038 |
|
14039 |
|
14040 |
|
14041 | MappingList.prototype.add = function MappingList_add(aMapping) {
|
14042 | if (generatedPositionAfter(this._last, aMapping)) {
|
14043 | this._last = aMapping;
|
14044 | this._array.push(aMapping);
|
14045 | } else {
|
14046 | this._sorted = false;
|
14047 | this._array.push(aMapping);
|
14048 | }
|
14049 | };
|
14050 |
|
14051 |
|
14052 |
|
14053 |
|
14054 |
|
14055 |
|
14056 |
|
14057 |
|
14058 |
|
14059 |
|
14060 | MappingList.prototype.toArray = function MappingList_toArray() {
|
14061 | if (!this._sorted) {
|
14062 | this._array.sort(util.compareByGeneratedPositionsInflated);
|
14063 | this._sorted = true;
|
14064 | }
|
14065 | return this._array;
|
14066 | };
|
14067 |
|
14068 | var MappingList_1 = MappingList;
|
14069 |
|
14070 | var mappingList = {
|
14071 | MappingList: MappingList_1
|
14072 | };
|
14073 |
|
14074 |
|
14075 |
|
14076 |
|
14077 |
|
14078 |
|
14079 |
|
14080 |
|
14081 |
|
14082 |
|
14083 |
|
14084 | var ArraySet$1 = arraySet.ArraySet;
|
14085 | var MappingList$1 = mappingList.MappingList;
|
14086 |
|
14087 |
|
14088 |
|
14089 |
|
14090 |
|
14091 |
|
14092 |
|
14093 |
|
14094 |
|
14095 | function SourceMapGenerator(aArgs) {
|
14096 | if (!aArgs) {
|
14097 | aArgs = {};
|
14098 | }
|
14099 | this._file = util.getArg(aArgs, 'file', null);
|
14100 | this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
|
14101 | this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
|
14102 | this._sources = new ArraySet$1();
|
14103 | this._names = new ArraySet$1();
|
14104 | this._mappings = new MappingList$1();
|
14105 | this._sourcesContents = null;
|
14106 | }
|
14107 |
|
14108 | SourceMapGenerator.prototype._version = 3;
|
14109 |
|
14110 |
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 | SourceMapGenerator.fromSourceMap =
|
14116 | function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
|
14117 | var sourceRoot = aSourceMapConsumer.sourceRoot;
|
14118 | var generator = new SourceMapGenerator({
|
14119 | file: aSourceMapConsumer.file,
|
14120 | sourceRoot: sourceRoot
|
14121 | });
|
14122 | aSourceMapConsumer.eachMapping(function (mapping) {
|
14123 | var newMapping = {
|
14124 | generated: {
|
14125 | line: mapping.generatedLine,
|
14126 | column: mapping.generatedColumn
|
14127 | }
|
14128 | };
|
14129 |
|
14130 | if (mapping.source != null) {
|
14131 | newMapping.source = mapping.source;
|
14132 | if (sourceRoot != null) {
|
14133 | newMapping.source = util.relative(sourceRoot, newMapping.source);
|
14134 | }
|
14135 |
|
14136 | newMapping.original = {
|
14137 | line: mapping.originalLine,
|
14138 | column: mapping.originalColumn
|
14139 | };
|
14140 |
|
14141 | if (mapping.name != null) {
|
14142 | newMapping.name = mapping.name;
|
14143 | }
|
14144 | }
|
14145 |
|
14146 | generator.addMapping(newMapping);
|
14147 | });
|
14148 | aSourceMapConsumer.sources.forEach(function (sourceFile) {
|
14149 | var sourceRelative = sourceFile;
|
14150 | if (sourceRoot !== null) {
|
14151 | sourceRelative = util.relative(sourceRoot, sourceFile);
|
14152 | }
|
14153 |
|
14154 | if (!generator._sources.has(sourceRelative)) {
|
14155 | generator._sources.add(sourceRelative);
|
14156 | }
|
14157 |
|
14158 | var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
14159 | if (content != null) {
|
14160 | generator.setSourceContent(sourceFile, content);
|
14161 | }
|
14162 | });
|
14163 | return generator;
|
14164 | };
|
14165 |
|
14166 |
|
14167 |
|
14168 |
|
14169 |
|
14170 |
|
14171 |
|
14172 |
|
14173 |
|
14174 |
|
14175 |
|
14176 | SourceMapGenerator.prototype.addMapping =
|
14177 | function SourceMapGenerator_addMapping(aArgs) {
|
14178 | var generated = util.getArg(aArgs, 'generated');
|
14179 | var original = util.getArg(aArgs, 'original', null);
|
14180 | var source = util.getArg(aArgs, 'source', null);
|
14181 | var name = util.getArg(aArgs, 'name', null);
|
14182 |
|
14183 | if (!this._skipValidation) {
|
14184 | this._validateMapping(generated, original, source, name);
|
14185 | }
|
14186 |
|
14187 | if (source != null) {
|
14188 | source = String(source);
|
14189 | if (!this._sources.has(source)) {
|
14190 | this._sources.add(source);
|
14191 | }
|
14192 | }
|
14193 |
|
14194 | if (name != null) {
|
14195 | name = String(name);
|
14196 | if (!this._names.has(name)) {
|
14197 | this._names.add(name);
|
14198 | }
|
14199 | }
|
14200 |
|
14201 | this._mappings.add({
|
14202 | generatedLine: generated.line,
|
14203 | generatedColumn: generated.column,
|
14204 | originalLine: original != null && original.line,
|
14205 | originalColumn: original != null && original.column,
|
14206 | source: source,
|
14207 | name: name
|
14208 | });
|
14209 | };
|
14210 |
|
14211 |
|
14212 |
|
14213 |
|
14214 | SourceMapGenerator.prototype.setSourceContent =
|
14215 | function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
|
14216 | var source = aSourceFile;
|
14217 | if (this._sourceRoot != null) {
|
14218 | source = util.relative(this._sourceRoot, source);
|
14219 | }
|
14220 |
|
14221 | if (aSourceContent != null) {
|
14222 |
|
14223 |
|
14224 | if (!this._sourcesContents) {
|
14225 | this._sourcesContents = Object.create(null);
|
14226 | }
|
14227 | this._sourcesContents[util.toSetString(source)] = aSourceContent;
|
14228 | } else if (this._sourcesContents) {
|
14229 |
|
14230 |
|
14231 | delete this._sourcesContents[util.toSetString(source)];
|
14232 | if (Object.keys(this._sourcesContents).length === 0) {
|
14233 | this._sourcesContents = null;
|
14234 | }
|
14235 | }
|
14236 | };
|
14237 |
|
14238 |
|
14239 |
|
14240 |
|
14241 |
|
14242 |
|
14243 |
|
14244 |
|
14245 |
|
14246 |
|
14247 |
|
14248 |
|
14249 |
|
14250 |
|
14251 |
|
14252 |
|
14253 |
|
14254 | SourceMapGenerator.prototype.applySourceMap =
|
14255 | function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
|
14256 | var sourceFile = aSourceFile;
|
14257 |
|
14258 | if (aSourceFile == null) {
|
14259 | if (aSourceMapConsumer.file == null) {
|
14260 | throw new Error(
|
14261 | 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
|
14262 | 'or the source map\'s "file" property. Both were omitted.'
|
14263 | );
|
14264 | }
|
14265 | sourceFile = aSourceMapConsumer.file;
|
14266 | }
|
14267 | var sourceRoot = this._sourceRoot;
|
14268 |
|
14269 | if (sourceRoot != null) {
|
14270 | sourceFile = util.relative(sourceRoot, sourceFile);
|
14271 | }
|
14272 |
|
14273 |
|
14274 | var newSources = new ArraySet$1();
|
14275 | var newNames = new ArraySet$1();
|
14276 |
|
14277 |
|
14278 | this._mappings.unsortedForEach(function (mapping) {
|
14279 | if (mapping.source === sourceFile && mapping.originalLine != null) {
|
14280 |
|
14281 | var original = aSourceMapConsumer.originalPositionFor({
|
14282 | line: mapping.originalLine,
|
14283 | column: mapping.originalColumn
|
14284 | });
|
14285 | if (original.source != null) {
|
14286 |
|
14287 | mapping.source = original.source;
|
14288 | if (aSourceMapPath != null) {
|
14289 | mapping.source = util.join(aSourceMapPath, mapping.source);
|
14290 | }
|
14291 | if (sourceRoot != null) {
|
14292 | mapping.source = util.relative(sourceRoot, mapping.source);
|
14293 | }
|
14294 | mapping.originalLine = original.line;
|
14295 | mapping.originalColumn = original.column;
|
14296 | if (original.name != null) {
|
14297 | mapping.name = original.name;
|
14298 | }
|
14299 | }
|
14300 | }
|
14301 |
|
14302 | var source = mapping.source;
|
14303 | if (source != null && !newSources.has(source)) {
|
14304 | newSources.add(source);
|
14305 | }
|
14306 |
|
14307 | var name = mapping.name;
|
14308 | if (name != null && !newNames.has(name)) {
|
14309 | newNames.add(name);
|
14310 | }
|
14311 |
|
14312 | }, this);
|
14313 | this._sources = newSources;
|
14314 | this._names = newNames;
|
14315 |
|
14316 |
|
14317 | aSourceMapConsumer.sources.forEach(function (sourceFile) {
|
14318 | var content = aSourceMapConsumer.sourceContentFor(sourceFile);
|
14319 | if (content != null) {
|
14320 | if (aSourceMapPath != null) {
|
14321 | sourceFile = util.join(aSourceMapPath, sourceFile);
|
14322 | }
|
14323 | if (sourceRoot != null) {
|
14324 | sourceFile = util.relative(sourceRoot, sourceFile);
|
14325 | }
|
14326 | this.setSourceContent(sourceFile, content);
|
14327 | }
|
14328 | }, this);
|
14329 | };
|
14330 |
|
14331 |
|
14332 |
|
14333 |
|
14334 |
|
14335 |
|
14336 |
|
14337 |
|
14338 |
|
14339 |
|
14340 |
|
14341 |
|
14342 | SourceMapGenerator.prototype._validateMapping =
|
14343 | function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
|
14344 | aName) {
|
14345 |
|
14346 |
|
14347 |
|
14348 |
|
14349 | if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
|
14350 | throw new Error(
|
14351 | 'original.line and original.column are not numbers -- you probably meant to omit ' +
|
14352 | 'the original mapping entirely and only map the generated position. If so, pass ' +
|
14353 | 'null for the original mapping instead of an object with empty or null values.'
|
14354 | );
|
14355 | }
|
14356 |
|
14357 | if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
|
14358 | && aGenerated.line > 0 && aGenerated.column >= 0
|
14359 | && !aOriginal && !aSource && !aName) {
|
14360 |
|
14361 | return;
|
14362 | }
|
14363 | else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
|
14364 | && aOriginal && 'line' in aOriginal && 'column' in aOriginal
|
14365 | && aGenerated.line > 0 && aGenerated.column >= 0
|
14366 | && aOriginal.line > 0 && aOriginal.column >= 0
|
14367 | && aSource) {
|
14368 |
|
14369 | return;
|
14370 | }
|
14371 | else {
|
14372 | throw new Error('Invalid mapping: ' + JSON.stringify({
|
14373 | generated: aGenerated,
|
14374 | source: aSource,
|
14375 | original: aOriginal,
|
14376 | name: aName
|
14377 | }));
|
14378 | }
|
14379 | };
|
14380 |
|
14381 |
|
14382 |
|
14383 |
|
14384 |
|
14385 | SourceMapGenerator.prototype._serializeMappings =
|
14386 | function SourceMapGenerator_serializeMappings() {
|
14387 | var previousGeneratedColumn = 0;
|
14388 | var previousGeneratedLine = 1;
|
14389 | var previousOriginalColumn = 0;
|
14390 | var previousOriginalLine = 0;
|
14391 | var previousName = 0;
|
14392 | var previousSource = 0;
|
14393 | var result = '';
|
14394 | var next;
|
14395 | var mapping;
|
14396 | var nameIdx;
|
14397 | var sourceIdx;
|
14398 |
|
14399 | var mappings = this._mappings.toArray();
|
14400 | for (var i = 0, len = mappings.length; i < len; i++) {
|
14401 | mapping = mappings[i];
|
14402 | next = '';
|
14403 |
|
14404 | if (mapping.generatedLine !== previousGeneratedLine) {
|
14405 | previousGeneratedColumn = 0;
|
14406 | while (mapping.generatedLine !== previousGeneratedLine) {
|
14407 | next += ';';
|
14408 | previousGeneratedLine++;
|
14409 | }
|
14410 | }
|
14411 | else {
|
14412 | if (i > 0) {
|
14413 | if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
14414 | continue;
|
14415 | }
|
14416 | next += ',';
|
14417 | }
|
14418 | }
|
14419 |
|
14420 | next += base64Vlq.encode(mapping.generatedColumn
|
14421 | - previousGeneratedColumn);
|
14422 | previousGeneratedColumn = mapping.generatedColumn;
|
14423 |
|
14424 | if (mapping.source != null) {
|
14425 | sourceIdx = this._sources.indexOf(mapping.source);
|
14426 | next += base64Vlq.encode(sourceIdx - previousSource);
|
14427 | previousSource = sourceIdx;
|
14428 |
|
14429 |
|
14430 | next += base64Vlq.encode(mapping.originalLine - 1
|
14431 | - previousOriginalLine);
|
14432 | previousOriginalLine = mapping.originalLine - 1;
|
14433 |
|
14434 | next += base64Vlq.encode(mapping.originalColumn
|
14435 | - previousOriginalColumn);
|
14436 | previousOriginalColumn = mapping.originalColumn;
|
14437 |
|
14438 | if (mapping.name != null) {
|
14439 | nameIdx = this._names.indexOf(mapping.name);
|
14440 | next += base64Vlq.encode(nameIdx - previousName);
|
14441 | previousName = nameIdx;
|
14442 | }
|
14443 | }
|
14444 |
|
14445 | result += next;
|
14446 | }
|
14447 |
|
14448 | return result;
|
14449 | };
|
14450 |
|
14451 | SourceMapGenerator.prototype._generateSourcesContent =
|
14452 | function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
|
14453 | return aSources.map(function (source) {
|
14454 | if (!this._sourcesContents) {
|
14455 | return null;
|
14456 | }
|
14457 | if (aSourceRoot != null) {
|
14458 | source = util.relative(aSourceRoot, source);
|
14459 | }
|
14460 | var key = util.toSetString(source);
|
14461 | return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
|
14462 | ? this._sourcesContents[key]
|
14463 | : null;
|
14464 | }, this);
|
14465 | };
|
14466 |
|
14467 |
|
14468 |
|
14469 |
|
14470 | SourceMapGenerator.prototype.toJSON =
|
14471 | function SourceMapGenerator_toJSON() {
|
14472 | var map = {
|
14473 | version: this._version,
|
14474 | sources: this._sources.toArray(),
|
14475 | names: this._names.toArray(),
|
14476 | mappings: this._serializeMappings()
|
14477 | };
|
14478 | if (this._file != null) {
|
14479 | map.file = this._file;
|
14480 | }
|
14481 | if (this._sourceRoot != null) {
|
14482 | map.sourceRoot = this._sourceRoot;
|
14483 | }
|
14484 | if (this._sourcesContents) {
|
14485 | map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
|
14486 | }
|
14487 |
|
14488 | return map;
|
14489 | };
|
14490 |
|
14491 |
|
14492 |
|
14493 |
|
14494 | SourceMapGenerator.prototype.toString =
|
14495 | function SourceMapGenerator_toString() {
|
14496 | return JSON.stringify(this.toJSON());
|
14497 | };
|
14498 |
|
14499 | var SourceMapGenerator_1 = SourceMapGenerator;
|
14500 |
|
14501 | var sourceMapGenerator = {
|
14502 | SourceMapGenerator: SourceMapGenerator_1
|
14503 | };
|
14504 |
|
14505 | var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;
|
14506 | var trackNodes = {
|
14507 | Atrule: true,
|
14508 | Selector: true,
|
14509 | Declaration: true
|
14510 | };
|
14511 |
|
14512 | var sourceMap = function generateSourceMap(handlers) {
|
14513 | var map = new SourceMapGenerator$1();
|
14514 | var line = 1;
|
14515 | var column = 0;
|
14516 | var generated = {
|
14517 | line: 1,
|
14518 | column: 0
|
14519 | };
|
14520 | var original = {
|
14521 | line: 0,
|
14522 | column: 0
|
14523 | };
|
14524 | var sourceMappingActive = false;
|
14525 | var activatedGenerated = {
|
14526 | line: 1,
|
14527 | column: 0
|
14528 | };
|
14529 | var activatedMapping = {
|
14530 | generated: activatedGenerated
|
14531 | };
|
14532 |
|
14533 | var handlersNode = handlers.node;
|
14534 | handlers.node = function(node) {
|
14535 | if (node.loc && node.loc.start && trackNodes.hasOwnProperty(node.type)) {
|
14536 | var nodeLine = node.loc.start.line;
|
14537 | var nodeColumn = node.loc.start.column - 1;
|
14538 |
|
14539 | if (original.line !== nodeLine ||
|
14540 | original.column !== nodeColumn) {
|
14541 | original.line = nodeLine;
|
14542 | original.column = nodeColumn;
|
14543 |
|
14544 | generated.line = line;
|
14545 | generated.column = column;
|
14546 |
|
14547 | if (sourceMappingActive) {
|
14548 | sourceMappingActive = false;
|
14549 | if (generated.line !== activatedGenerated.line ||
|
14550 | generated.column !== activatedGenerated.column) {
|
14551 | map.addMapping(activatedMapping);
|
14552 | }
|
14553 | }
|
14554 |
|
14555 | sourceMappingActive = true;
|
14556 | map.addMapping({
|
14557 | source: node.loc.source,
|
14558 | original: original,
|
14559 | generated: generated
|
14560 | });
|
14561 | }
|
14562 | }
|
14563 |
|
14564 | handlersNode.call(this, node);
|
14565 |
|
14566 | if (sourceMappingActive && trackNodes.hasOwnProperty(node.type)) {
|
14567 | activatedGenerated.line = line;
|
14568 | activatedGenerated.column = column;
|
14569 | }
|
14570 | };
|
14571 |
|
14572 | var handlersChunk = handlers.chunk;
|
14573 | handlers.chunk = function(chunk) {
|
14574 | for (var i = 0; i < chunk.length; i++) {
|
14575 | if (chunk.charCodeAt(i) === 10) {
|
14576 | line++;
|
14577 | column = 0;
|
14578 | } else {
|
14579 | column++;
|
14580 | }
|
14581 | }
|
14582 |
|
14583 | handlersChunk(chunk);
|
14584 | };
|
14585 |
|
14586 | var handlersResult = handlers.result;
|
14587 | handlers.result = function() {
|
14588 | if (sourceMappingActive) {
|
14589 | map.addMapping(activatedMapping);
|
14590 | }
|
14591 |
|
14592 | return {
|
14593 | css: handlersResult(),
|
14594 | map: map
|
14595 | };
|
14596 | };
|
14597 |
|
14598 | return handlers;
|
14599 | };
|
14600 |
|
14601 | var hasOwnProperty$4 = Object.prototype.hasOwnProperty;
|
14602 |
|
14603 | function processChildren(node, delimeter) {
|
14604 | var list = node.children;
|
14605 | var prev = null;
|
14606 |
|
14607 | if (typeof delimeter !== 'function') {
|
14608 | list.forEach(this.node, this);
|
14609 | } else {
|
14610 | list.forEach(function(node) {
|
14611 | if (prev !== null) {
|
14612 | delimeter.call(this, prev);
|
14613 | }
|
14614 |
|
14615 | this.node(node);
|
14616 | prev = node;
|
14617 | }, this);
|
14618 | }
|
14619 | }
|
14620 |
|
14621 | var create$1 = function createGenerator(config) {
|
14622 | function processNode(node) {
|
14623 | if (hasOwnProperty$4.call(types, node.type)) {
|
14624 | types[node.type].call(this, node);
|
14625 | } else {
|
14626 | throw new Error('Unknown node type: ' + node.type);
|
14627 | }
|
14628 | }
|
14629 |
|
14630 | var types = {};
|
14631 |
|
14632 | if (config.node) {
|
14633 | for (var name in config.node) {
|
14634 | types[name] = config.node[name].generate;
|
14635 | }
|
14636 | }
|
14637 |
|
14638 | return function(node, options) {
|
14639 | var buffer = '';
|
14640 | var handlers = {
|
14641 | children: processChildren,
|
14642 | node: processNode,
|
14643 | chunk: function(chunk) {
|
14644 | buffer += chunk;
|
14645 | },
|
14646 | result: function() {
|
14647 | return buffer;
|
14648 | }
|
14649 | };
|
14650 |
|
14651 | if (options) {
|
14652 | if (typeof options.decorator === 'function') {
|
14653 | handlers = options.decorator(handlers);
|
14654 | }
|
14655 |
|
14656 | if (options.sourceMap) {
|
14657 | handlers = sourceMap(handlers);
|
14658 | }
|
14659 | }
|
14660 |
|
14661 | handlers.node(node);
|
14662 |
|
14663 | return handlers.result();
|
14664 | };
|
14665 | };
|
14666 |
|
14667 | var create$2 = function createConvertors(walk) {
|
14668 | return {
|
14669 | fromPlainObject: function(ast) {
|
14670 | walk(ast, {
|
14671 | enter: function(node) {
|
14672 | if (node.children && node.children instanceof List_1 === false) {
|
14673 | node.children = new List_1().fromArray(node.children);
|
14674 | }
|
14675 | }
|
14676 | });
|
14677 |
|
14678 | return ast;
|
14679 | },
|
14680 | toPlainObject: function(ast) {
|
14681 | walk(ast, {
|
14682 | leave: function(node) {
|
14683 | if (node.children && node.children instanceof List_1) {
|
14684 | node.children = node.children.toArray();
|
14685 | }
|
14686 | }
|
14687 | });
|
14688 |
|
14689 | return ast;
|
14690 | }
|
14691 | };
|
14692 | };
|
14693 |
|
14694 | var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
|
14695 | var noop$3 = function() {};
|
14696 |
|
14697 | function ensureFunction$1(value) {
|
14698 | return typeof value === 'function' ? value : noop$3;
|
14699 | }
|
14700 |
|
14701 | function invokeForType(fn, type) {
|
14702 | return function(node, item, list) {
|
14703 | if (node.type === type) {
|
14704 | fn.call(this, node, item, list);
|
14705 | }
|
14706 | };
|
14707 | }
|
14708 |
|
14709 | function getWalkersFromStructure(name, nodeType) {
|
14710 | var structure = nodeType.structure;
|
14711 | var walkers = [];
|
14712 |
|
14713 | for (var key in structure) {
|
14714 | if (hasOwnProperty$5.call(structure, key) === false) {
|
14715 | continue;
|
14716 | }
|
14717 |
|
14718 | var fieldTypes = structure[key];
|
14719 | var walker = {
|
14720 | name: key,
|
14721 | type: false,
|
14722 | nullable: false
|
14723 | };
|
14724 |
|
14725 | if (!Array.isArray(structure[key])) {
|
14726 | fieldTypes = [structure[key]];
|
14727 | }
|
14728 |
|
14729 | for (var i = 0; i < fieldTypes.length; i++) {
|
14730 | var fieldType = fieldTypes[i];
|
14731 | if (fieldType === null) {
|
14732 | walker.nullable = true;
|
14733 | } else if (typeof fieldType === 'string') {
|
14734 | walker.type = 'node';
|
14735 | } else if (Array.isArray(fieldType)) {
|
14736 | walker.type = 'list';
|
14737 | }
|
14738 | }
|
14739 |
|
14740 | if (walker.type) {
|
14741 | walkers.push(walker);
|
14742 | }
|
14743 | }
|
14744 |
|
14745 | if (walkers.length) {
|
14746 | return {
|
14747 | context: nodeType.walkContext,
|
14748 | fields: walkers
|
14749 | };
|
14750 | }
|
14751 |
|
14752 | return null;
|
14753 | }
|
14754 |
|
14755 | function getTypesFromConfig(config) {
|
14756 | var types = {};
|
14757 |
|
14758 | for (var name in config.node) {
|
14759 | if (hasOwnProperty$5.call(config.node, name)) {
|
14760 | var nodeType = config.node[name];
|
14761 |
|
14762 | if (!nodeType.structure) {
|
14763 | throw new Error('Missed `structure` field in `' + name + '` node type definition');
|
14764 | }
|
14765 |
|
14766 | types[name] = getWalkersFromStructure(name, nodeType);
|
14767 | }
|
14768 | }
|
14769 |
|
14770 | return types;
|
14771 | }
|
14772 |
|
14773 | function createTypeIterator(config, reverse) {
|
14774 | var fields = config.fields.slice();
|
14775 | var contextName = config.context;
|
14776 | var useContext = typeof contextName === 'string';
|
14777 |
|
14778 | if (reverse) {
|
14779 | fields.reverse();
|
14780 | }
|
14781 |
|
14782 | return function(node, context, walk, walkReducer) {
|
14783 | var prevContextValue;
|
14784 |
|
14785 | if (useContext) {
|
14786 | prevContextValue = context[contextName];
|
14787 | context[contextName] = node;
|
14788 | }
|
14789 |
|
14790 | for (var i = 0; i < fields.length; i++) {
|
14791 | var field = fields[i];
|
14792 | var ref = node[field.name];
|
14793 |
|
14794 | if (!field.nullable || ref) {
|
14795 | if (field.type === 'list') {
|
14796 | var breakWalk = reverse
|
14797 | ? ref.reduceRight(walkReducer, false)
|
14798 | : ref.reduce(walkReducer, false);
|
14799 |
|
14800 | if (breakWalk) {
|
14801 | return true;
|
14802 | }
|
14803 | } else if (walk(ref)) {
|
14804 | return true;
|
14805 | }
|
14806 | }
|
14807 | }
|
14808 |
|
14809 | if (useContext) {
|
14810 | context[contextName] = prevContextValue;
|
14811 | }
|
14812 | };
|
14813 | }
|
14814 |
|
14815 | function createFastTraveralMap(iterators) {
|
14816 | return {
|
14817 | Atrule: {
|
14818 | StyleSheet: iterators.StyleSheet,
|
14819 | Atrule: iterators.Atrule,
|
14820 | Rule: iterators.Rule,
|
14821 | Block: iterators.Block
|
14822 | },
|
14823 | Rule: {
|
14824 | StyleSheet: iterators.StyleSheet,
|
14825 | Atrule: iterators.Atrule,
|
14826 | Rule: iterators.Rule,
|
14827 | Block: iterators.Block
|
14828 | },
|
14829 | Declaration: {
|
14830 | StyleSheet: iterators.StyleSheet,
|
14831 | Atrule: iterators.Atrule,
|
14832 | Rule: iterators.Rule,
|
14833 | Block: iterators.Block,
|
14834 | DeclarationList: iterators.DeclarationList
|
14835 | }
|
14836 | };
|
14837 | }
|
14838 |
|
14839 | var create$3 = function createWalker(config) {
|
14840 | var types = getTypesFromConfig(config);
|
14841 | var iteratorsNatural = {};
|
14842 | var iteratorsReverse = {};
|
14843 | var breakWalk = Symbol('break-walk');
|
14844 | var skipNode = Symbol('skip-node');
|
14845 |
|
14846 | for (var name in types) {
|
14847 | if (hasOwnProperty$5.call(types, name) && types[name] !== null) {
|
14848 | iteratorsNatural[name] = createTypeIterator(types[name], false);
|
14849 | iteratorsReverse[name] = createTypeIterator(types[name], true);
|
14850 | }
|
14851 | }
|
14852 |
|
14853 | var fastTraversalIteratorsNatural = createFastTraveralMap(iteratorsNatural);
|
14854 | var fastTraversalIteratorsReverse = createFastTraveralMap(iteratorsReverse);
|
14855 |
|
14856 | var walk = function(root, options) {
|
14857 | function walkNode(node, item, list) {
|
14858 | var enterRet = enter.call(context, node, item, list);
|
14859 |
|
14860 | if (enterRet === breakWalk) {
|
14861 | debugger;
|
14862 | return true;
|
14863 | }
|
14864 |
|
14865 | if (enterRet === skipNode) {
|
14866 | return false;
|
14867 | }
|
14868 |
|
14869 | if (iterators.hasOwnProperty(node.type)) {
|
14870 | if (iterators[node.type](node, context, walkNode, walkReducer)) {
|
14871 | return true;
|
14872 | }
|
14873 | }
|
14874 |
|
14875 | if (leave.call(context, node, item, list) === breakWalk) {
|
14876 | return true;
|
14877 | }
|
14878 |
|
14879 | return false;
|
14880 | }
|
14881 |
|
14882 | var walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list);
|
14883 | var enter = noop$3;
|
14884 | var leave = noop$3;
|
14885 | var iterators = iteratorsNatural;
|
14886 | var context = {
|
14887 | break: breakWalk,
|
14888 | skip: skipNode,
|
14889 |
|
14890 | root: root,
|
14891 | stylesheet: null,
|
14892 | atrule: null,
|
14893 | atrulePrelude: null,
|
14894 | rule: null,
|
14895 | selector: null,
|
14896 | block: null,
|
14897 | declaration: null,
|
14898 | function: null
|
14899 | };
|
14900 |
|
14901 | if (typeof options === 'function') {
|
14902 | enter = options;
|
14903 | } else if (options) {
|
14904 | enter = ensureFunction$1(options.enter);
|
14905 | leave = ensureFunction$1(options.leave);
|
14906 |
|
14907 | if (options.reverse) {
|
14908 | iterators = iteratorsReverse;
|
14909 | }
|
14910 |
|
14911 | if (options.visit) {
|
14912 | if (fastTraversalIteratorsNatural.hasOwnProperty(options.visit)) {
|
14913 | iterators = options.reverse
|
14914 | ? fastTraversalIteratorsReverse[options.visit]
|
14915 | : fastTraversalIteratorsNatural[options.visit];
|
14916 | } else if (!types.hasOwnProperty(options.visit)) {
|
14917 | throw new Error('Bad value `' + options.visit + '` for `visit` option (should be: ' + Object.keys(types).join(', ') + ')');
|
14918 | }
|
14919 |
|
14920 | enter = invokeForType(enter, options.visit);
|
14921 | leave = invokeForType(leave, options.visit);
|
14922 | }
|
14923 | }
|
14924 |
|
14925 | if (enter === noop$3 && leave === noop$3) {
|
14926 | throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
|
14927 | }
|
14928 |
|
14929 | walkNode(root);
|
14930 | };
|
14931 |
|
14932 | walk.break = breakWalk;
|
14933 | walk.skip = skipNode;
|
14934 |
|
14935 | walk.find = function(ast, fn) {
|
14936 | var found = null;
|
14937 |
|
14938 | walk(ast, function(node, item, list) {
|
14939 | if (fn.call(this, node, item, list)) {
|
14940 | found = node;
|
14941 | return breakWalk;
|
14942 | }
|
14943 | });
|
14944 |
|
14945 | return found;
|
14946 | };
|
14947 |
|
14948 | walk.findLast = function(ast, fn) {
|
14949 | var found = null;
|
14950 |
|
14951 | walk(ast, {
|
14952 | reverse: true,
|
14953 | enter: function(node, item, list) {
|
14954 | if (fn.call(this, node, item, list)) {
|
14955 | found = node;
|
14956 | return breakWalk;
|
14957 | }
|
14958 | }
|
14959 | });
|
14960 |
|
14961 | return found;
|
14962 | };
|
14963 |
|
14964 | walk.findAll = function(ast, fn) {
|
14965 | var found = [];
|
14966 |
|
14967 | walk(ast, function(node, item, list) {
|
14968 | if (fn.call(this, node, item, list)) {
|
14969 | found.push(node);
|
14970 | }
|
14971 | });
|
14972 |
|
14973 | return found;
|
14974 | };
|
14975 |
|
14976 | return walk;
|
14977 | };
|
14978 |
|
14979 | var clone = function clone(node) {
|
14980 | var result = {};
|
14981 |
|
14982 | for (var key in node) {
|
14983 | var value = node[key];
|
14984 |
|
14985 | if (value) {
|
14986 | if (Array.isArray(value) || value instanceof List_1) {
|
14987 | value = value.map(clone);
|
14988 | } else if (value.constructor === Object) {
|
14989 | value = clone(value);
|
14990 | }
|
14991 | }
|
14992 |
|
14993 | result[key] = value;
|
14994 | }
|
14995 |
|
14996 | return result;
|
14997 | };
|
14998 |
|
14999 | const hasOwnProperty$6 = Object.prototype.hasOwnProperty;
|
15000 | const shape = {
|
15001 | generic: true,
|
15002 | types: appendOrAssign,
|
15003 | atrules: {
|
15004 | prelude: appendOrAssignOrNull,
|
15005 | descriptors: appendOrAssignOrNull
|
15006 | },
|
15007 | properties: appendOrAssign,
|
15008 | parseContext: assign,
|
15009 | scope: deepAssign,
|
15010 | atrule: ['parse'],
|
15011 | pseudo: ['parse'],
|
15012 | node: ['name', 'structure', 'parse', 'generate', 'walkContext']
|
15013 | };
|
15014 |
|
15015 | function isObject(value) {
|
15016 | return value && value.constructor === Object;
|
15017 | }
|
15018 |
|
15019 | function copy(value) {
|
15020 | return isObject(value)
|
15021 | ? Object.assign({}, value)
|
15022 | : value;
|
15023 | }
|
15024 |
|
15025 | function assign(dest, src) {
|
15026 | return Object.assign(dest, src);
|
15027 | }
|
15028 |
|
15029 | function deepAssign(dest, src) {
|
15030 | for (const key in src) {
|
15031 | if (hasOwnProperty$6.call(src, key)) {
|
15032 | if (isObject(dest[key])) {
|
15033 | deepAssign(dest[key], copy(src[key]));
|
15034 | } else {
|
15035 | dest[key] = copy(src[key]);
|
15036 | }
|
15037 | }
|
15038 | }
|
15039 |
|
15040 | return dest;
|
15041 | }
|
15042 |
|
15043 | function append(a, b) {
|
15044 | if (typeof b === 'string' && /^\s*\|/.test(b)) {
|
15045 | return typeof a === 'string'
|
15046 | ? a + b
|
15047 | : b.replace(/^\s*\|\s*/, '');
|
15048 | }
|
15049 |
|
15050 | return b || null;
|
15051 | }
|
15052 |
|
15053 | function appendOrAssign(a, b) {
|
15054 | if (typeof b === 'string') {
|
15055 | return append(a, b);
|
15056 | }
|
15057 |
|
15058 | const result = Object.assign({}, a);
|
15059 | for (let key in b) {
|
15060 | if (hasOwnProperty$6.call(b, key)) {
|
15061 | result[key] = append(hasOwnProperty$6.call(a, key) ? a[key] : undefined, b[key]);
|
15062 | }
|
15063 | }
|
15064 |
|
15065 | return result;
|
15066 | }
|
15067 |
|
15068 | function appendOrAssignOrNull(a, b) {
|
15069 | const result = appendOrAssign(a, b);
|
15070 |
|
15071 | return !isObject(result) || Object.keys(result).length
|
15072 | ? result
|
15073 | : null;
|
15074 | }
|
15075 |
|
15076 | function mix(dest, src, shape) {
|
15077 | for (const key in shape) {
|
15078 | if (hasOwnProperty$6.call(shape, key) === false) {
|
15079 | continue;
|
15080 | }
|
15081 |
|
15082 | if (shape[key] === true) {
|
15083 | if (key in src) {
|
15084 | if (hasOwnProperty$6.call(src, key)) {
|
15085 | dest[key] = copy(src[key]);
|
15086 | }
|
15087 | }
|
15088 | } else if (shape[key]) {
|
15089 | if (typeof shape[key] === 'function') {
|
15090 | const fn = shape[key];
|
15091 | dest[key] = fn({}, dest[key]);
|
15092 | dest[key] = fn(dest[key] || {}, src[key]);
|
15093 | } else if (isObject(shape[key])) {
|
15094 | const result = {};
|
15095 |
|
15096 | for (let name in dest[key]) {
|
15097 | result[name] = mix({}, dest[key][name], shape[key]);
|
15098 | }
|
15099 |
|
15100 | for (let name in src[key]) {
|
15101 | result[name] = mix(result[name] || {}, src[key][name], shape[key]);
|
15102 | }
|
15103 |
|
15104 | dest[key] = result;
|
15105 | } else if (Array.isArray(shape[key])) {
|
15106 | const res = {};
|
15107 | const innerShape = shape[key].reduce(function(s, k) {
|
15108 | s[k] = true;
|
15109 | return s;
|
15110 | }, {});
|
15111 |
|
15112 | for (const [name, value] of Object.entries(dest[key] || {})) {
|
15113 | res[name] = {};
|
15114 | if (value) {
|
15115 | mix(res[name], value, innerShape);
|
15116 | }
|
15117 | }
|
15118 |
|
15119 | for (const name in src[key]) {
|
15120 | if (hasOwnProperty$6.call(src[key], name)) {
|
15121 | if (!res[name]) {
|
15122 | res[name] = {};
|
15123 | }
|
15124 |
|
15125 | if (src[key] && src[key][name]) {
|
15126 | mix(res[name], src[key][name], innerShape);
|
15127 | }
|
15128 | }
|
15129 | }
|
15130 |
|
15131 | dest[key] = res;
|
15132 | }
|
15133 | }
|
15134 | }
|
15135 | return dest;
|
15136 | }
|
15137 |
|
15138 | var mix_1 = (dest, src) => mix(dest, src, shape);
|
15139 |
|
15140 | function createSyntax(config) {
|
15141 | var parse = create(config);
|
15142 | var walk = create$3(config);
|
15143 | var generate = create$1(config);
|
15144 | var convert = create$2(walk);
|
15145 |
|
15146 | var syntax = {
|
15147 | List: List_1,
|
15148 | SyntaxError: _SyntaxError,
|
15149 | TokenStream: TokenStream_1,
|
15150 | Lexer: Lexer_1,
|
15151 |
|
15152 | vendorPrefix: names.vendorPrefix,
|
15153 | keyword: names.keyword,
|
15154 | property: names.property,
|
15155 | isCustomProperty: names.isCustomProperty,
|
15156 |
|
15157 | definitionSyntax: definitionSyntax,
|
15158 | lexer: null,
|
15159 | createLexer: function(config) {
|
15160 | return new Lexer_1(config, syntax, syntax.lexer.structure);
|
15161 | },
|
15162 |
|
15163 | tokenize: tokenizer,
|
15164 | parse: parse,
|
15165 | walk: walk,
|
15166 | generate: generate,
|
15167 |
|
15168 | find: walk.find,
|
15169 | findLast: walk.findLast,
|
15170 | findAll: walk.findAll,
|
15171 |
|
15172 | clone: clone,
|
15173 | fromPlainObject: convert.fromPlainObject,
|
15174 | toPlainObject: convert.toPlainObject,
|
15175 |
|
15176 | createSyntax: function(config) {
|
15177 | return createSyntax(mix_1({}, config));
|
15178 | },
|
15179 | fork: function(extension) {
|
15180 | var base = mix_1({}, config);
|
15181 | return createSyntax(
|
15182 | typeof extension === 'function'
|
15183 | ? extension(base, Object.assign)
|
15184 | : mix_1(base, extension)
|
15185 | );
|
15186 | }
|
15187 | };
|
15188 |
|
15189 | syntax.lexer = new Lexer_1({
|
15190 | generic: true,
|
15191 | types: config.types,
|
15192 | atrules: config.atrules,
|
15193 | properties: config.properties,
|
15194 | node: config.node
|
15195 | }, syntax);
|
15196 |
|
15197 | return syntax;
|
15198 | }
|
15199 | var create_1 = function(config) {
|
15200 | return createSyntax(mix_1({}, config));
|
15201 | };
|
15202 |
|
15203 | var create$4 = {
|
15204 | create: create_1
|
15205 | };
|
15206 |
|
15207 | var mdnAtrules = {
|
15208 | "@charset": {
|
15209 | syntax: "@charset \"<charset>\";",
|
15210 | groups: [
|
15211 | "CSS Charsets"
|
15212 | ],
|
15213 | status: "standard",
|
15214 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@charset"
|
15215 | },
|
15216 | "@counter-style": {
|
15217 | syntax: "@counter-style <counter-style-name> {\n [ system: <counter-system>; ] ||\n [ symbols: <counter-symbols>; ] ||\n [ additive-symbols: <additive-symbols>; ] ||\n [ negative: <negative-symbol>; ] ||\n [ prefix: <prefix>; ] ||\n [ suffix: <suffix>; ] ||\n [ range: <range>; ] ||\n [ pad: <padding>; ] ||\n [ speak-as: <speak-as>; ] ||\n [ fallback: <counter-style-name>; ]\n}",
|
15218 | interfaces: [
|
15219 | "CSSCounterStyleRule"
|
15220 | ],
|
15221 | groups: [
|
15222 | "CSS Counter Styles"
|
15223 | ],
|
15224 | descriptors: {
|
15225 | "additive-symbols": {
|
15226 | syntax: "[ <integer> && <symbol> ]#",
|
15227 | media: "all",
|
15228 | initial: "n/a (required)",
|
15229 | percentages: "no",
|
15230 | computed: "asSpecified",
|
15231 | order: "orderOfAppearance",
|
15232 | status: "standard"
|
15233 | },
|
15234 | fallback: {
|
15235 | syntax: "<counter-style-name>",
|
15236 | media: "all",
|
15237 | initial: "decimal",
|
15238 | percentages: "no",
|
15239 | computed: "asSpecified",
|
15240 | order: "uniqueOrder",
|
15241 | status: "standard"
|
15242 | },
|
15243 | negative: {
|
15244 | syntax: "<symbol> <symbol>?",
|
15245 | media: "all",
|
15246 | initial: "\"-\" hyphen-minus",
|
15247 | percentages: "no",
|
15248 | computed: "asSpecified",
|
15249 | order: "orderOfAppearance",
|
15250 | status: "standard"
|
15251 | },
|
15252 | pad: {
|
15253 | syntax: "<integer> && <symbol>",
|
15254 | media: "all",
|
15255 | initial: "0 \"\"",
|
15256 | percentages: "no",
|
15257 | computed: "asSpecified",
|
15258 | order: "uniqueOrder",
|
15259 | status: "standard"
|
15260 | },
|
15261 | prefix: {
|
15262 | syntax: "<symbol>",
|
15263 | media: "all",
|
15264 | initial: "\"\"",
|
15265 | percentages: "no",
|
15266 | computed: "asSpecified",
|
15267 | order: "uniqueOrder",
|
15268 | status: "standard"
|
15269 | },
|
15270 | range: {
|
15271 | syntax: "[ [ <integer> | infinite ]{2} ]# | auto",
|
15272 | media: "all",
|
15273 | initial: "auto",
|
15274 | percentages: "no",
|
15275 | computed: "asSpecified",
|
15276 | order: "orderOfAppearance",
|
15277 | status: "standard"
|
15278 | },
|
15279 | "speak-as": {
|
15280 | syntax: "auto | bullets | numbers | words | spell-out | <counter-style-name>",
|
15281 | media: "all",
|
15282 | initial: "auto",
|
15283 | percentages: "no",
|
15284 | computed: "asSpecified",
|
15285 | order: "uniqueOrder",
|
15286 | status: "standard"
|
15287 | },
|
15288 | suffix: {
|
15289 | syntax: "<symbol>",
|
15290 | media: "all",
|
15291 | initial: "\". \"",
|
15292 | percentages: "no",
|
15293 | computed: "asSpecified",
|
15294 | order: "uniqueOrder",
|
15295 | status: "standard"
|
15296 | },
|
15297 | symbols: {
|
15298 | syntax: "<symbol>+",
|
15299 | media: "all",
|
15300 | initial: "n/a (required)",
|
15301 | percentages: "no",
|
15302 | computed: "asSpecified",
|
15303 | order: "orderOfAppearance",
|
15304 | status: "standard"
|
15305 | },
|
15306 | system: {
|
15307 | syntax: "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
|
15308 | media: "all",
|
15309 | initial: "symbolic",
|
15310 | percentages: "no",
|
15311 | computed: "asSpecified",
|
15312 | order: "uniqueOrder",
|
15313 | status: "standard"
|
15314 | }
|
15315 | },
|
15316 | status: "standard",
|
15317 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
|
15318 | },
|
15319 | "@document": {
|
15320 | syntax: "@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {\n <group-rule-body>\n}",
|
15321 | interfaces: [
|
15322 | "CSSGroupingRule",
|
15323 | "CSSConditionRule"
|
15324 | ],
|
15325 | groups: [
|
15326 | "CSS Conditional Rules"
|
15327 | ],
|
15328 | status: "nonstandard",
|
15329 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@document"
|
15330 | },
|
15331 | "@font-face": {
|
15332 | syntax: "@font-face {\n [ font-family: <family-name>; ] ||\n [ src: <src>; ] ||\n [ unicode-range: <unicode-range>; ] ||\n [ font-variant: <font-variant>; ] ||\n [ font-feature-settings: <font-feature-settings>; ] ||\n [ font-variation-settings: <font-variation-settings>; ] ||\n [ font-stretch: <font-stretch>; ] ||\n [ font-weight: <font-weight>; ] ||\n [ font-style: <font-style>; ]\n}",
|
15333 | interfaces: [
|
15334 | "CSSFontFaceRule"
|
15335 | ],
|
15336 | groups: [
|
15337 | "CSS Fonts"
|
15338 | ],
|
15339 | descriptors: {
|
15340 | "font-display": {
|
15341 | syntax: "[ auto | block | swap | fallback | optional ]",
|
15342 | media: "visual",
|
15343 | percentages: "no",
|
15344 | initial: "auto",
|
15345 | computed: "asSpecified",
|
15346 | order: "uniqueOrder",
|
15347 | status: "experimental"
|
15348 | },
|
15349 | "font-family": {
|
15350 | syntax: "<family-name>",
|
15351 | media: "all",
|
15352 | initial: "n/a (required)",
|
15353 | percentages: "no",
|
15354 | computed: "asSpecified",
|
15355 | order: "uniqueOrder",
|
15356 | status: "standard"
|
15357 | },
|
15358 | "font-feature-settings": {
|
15359 | syntax: "normal | <feature-tag-value>#",
|
15360 | media: "all",
|
15361 | initial: "normal",
|
15362 | percentages: "no",
|
15363 | computed: "asSpecified",
|
15364 | order: "orderOfAppearance",
|
15365 | status: "standard"
|
15366 | },
|
15367 | "font-variation-settings": {
|
15368 | syntax: "normal | [ <string> <number> ]#",
|
15369 | media: "all",
|
15370 | initial: "normal",
|
15371 | percentages: "no",
|
15372 | computed: "asSpecified",
|
15373 | order: "orderOfAppearance",
|
15374 | status: "standard"
|
15375 | },
|
15376 | "font-stretch": {
|
15377 | syntax: "<font-stretch-absolute>{1,2}",
|
15378 | media: "all",
|
15379 | initial: "normal",
|
15380 | percentages: "no",
|
15381 | computed: "asSpecified",
|
15382 | order: "uniqueOrder",
|
15383 | status: "standard"
|
15384 | },
|
15385 | "font-style": {
|
15386 | syntax: "normal | italic | oblique <angle>{0,2}",
|
15387 | media: "all",
|
15388 | initial: "normal",
|
15389 | percentages: "no",
|
15390 | computed: "asSpecified",
|
15391 | order: "uniqueOrder",
|
15392 | status: "standard"
|
15393 | },
|
15394 | "font-weight": {
|
15395 | syntax: "<font-weight-absolute>{1,2}",
|
15396 | media: "all",
|
15397 | initial: "normal",
|
15398 | percentages: "no",
|
15399 | computed: "asSpecified",
|
15400 | order: "uniqueOrder",
|
15401 | status: "standard"
|
15402 | },
|
15403 | "font-variant": {
|
15404 | syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
|
15405 | media: "all",
|
15406 | initial: "normal",
|
15407 | percentages: "no",
|
15408 | computed: "asSpecified",
|
15409 | order: "orderOfAppearance",
|
15410 | status: "standard"
|
15411 | },
|
15412 | src: {
|
15413 | syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
|
15414 | media: "all",
|
15415 | initial: "n/a (required)",
|
15416 | percentages: "no",
|
15417 | computed: "asSpecified",
|
15418 | order: "orderOfAppearance",
|
15419 | status: "standard"
|
15420 | },
|
15421 | "unicode-range": {
|
15422 | syntax: "<unicode-range>#",
|
15423 | media: "all",
|
15424 | initial: "U+0-10FFFF",
|
15425 | percentages: "no",
|
15426 | computed: "asSpecified",
|
15427 | order: "orderOfAppearance",
|
15428 | status: "standard"
|
15429 | }
|
15430 | },
|
15431 | status: "standard",
|
15432 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-face"
|
15433 | },
|
15434 | "@font-feature-values": {
|
15435 | syntax: "@font-feature-values <family-name># {\n <feature-value-block-list>\n}",
|
15436 | interfaces: [
|
15437 | "CSSFontFeatureValuesRule"
|
15438 | ],
|
15439 | groups: [
|
15440 | "CSS Fonts"
|
15441 | ],
|
15442 | status: "standard",
|
15443 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
|
15444 | },
|
15445 | "@import": {
|
15446 | syntax: "@import [ <string> | <url> ] [ <media-query-list> ]?;",
|
15447 | groups: [
|
15448 | "Media Queries"
|
15449 | ],
|
15450 | status: "standard",
|
15451 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@import"
|
15452 | },
|
15453 | "@keyframes": {
|
15454 | syntax: "@keyframes <keyframes-name> {\n <keyframe-block-list>\n}",
|
15455 | interfaces: [
|
15456 | "CSSKeyframeRule",
|
15457 | "CSSKeyframesRule"
|
15458 | ],
|
15459 | groups: [
|
15460 | "CSS Animations"
|
15461 | ],
|
15462 | status: "standard",
|
15463 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
|
15464 | },
|
15465 | "@media": {
|
15466 | syntax: "@media <media-query-list> {\n <group-rule-body>\n}",
|
15467 | interfaces: [
|
15468 | "CSSGroupingRule",
|
15469 | "CSSConditionRule",
|
15470 | "CSSMediaRule",
|
15471 | "CSSCustomMediaRule"
|
15472 | ],
|
15473 | groups: [
|
15474 | "CSS Conditional Rules",
|
15475 | "Media Queries"
|
15476 | ],
|
15477 | status: "standard",
|
15478 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@media"
|
15479 | },
|
15480 | "@namespace": {
|
15481 | syntax: "@namespace <namespace-prefix>? [ <string> | <url> ];",
|
15482 | groups: [
|
15483 | "CSS Namespaces"
|
15484 | ],
|
15485 | status: "standard",
|
15486 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@namespace"
|
15487 | },
|
15488 | "@page": {
|
15489 | syntax: "@page <page-selector-list> {\n <page-body>\n}",
|
15490 | interfaces: [
|
15491 | "CSSPageRule"
|
15492 | ],
|
15493 | groups: [
|
15494 | "CSS Pages"
|
15495 | ],
|
15496 | descriptors: {
|
15497 | bleed: {
|
15498 | syntax: "auto | <length>",
|
15499 | media: [
|
15500 | "visual",
|
15501 | "paged"
|
15502 | ],
|
15503 | initial: "auto",
|
15504 | percentages: "no",
|
15505 | computed: "asSpecified",
|
15506 | order: "uniqueOrder",
|
15507 | status: "standard"
|
15508 | },
|
15509 | marks: {
|
15510 | syntax: "none | [ crop || cross ]",
|
15511 | media: [
|
15512 | "visual",
|
15513 | "paged"
|
15514 | ],
|
15515 | initial: "none",
|
15516 | percentages: "no",
|
15517 | computed: "asSpecified",
|
15518 | order: "orderOfAppearance",
|
15519 | status: "standard"
|
15520 | },
|
15521 | size: {
|
15522 | syntax: "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
|
15523 | media: [
|
15524 | "visual",
|
15525 | "paged"
|
15526 | ],
|
15527 | initial: "auto",
|
15528 | percentages: "no",
|
15529 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
15530 | order: "orderOfAppearance",
|
15531 | status: "standard"
|
15532 | }
|
15533 | },
|
15534 | status: "standard",
|
15535 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@page"
|
15536 | },
|
15537 | "@property": {
|
15538 | syntax: "@property <custom-property-name> {\n <declaration-list>\n}",
|
15539 | interfaces: [
|
15540 | "CSS",
|
15541 | "CSSPropertyRule"
|
15542 | ],
|
15543 | groups: [
|
15544 | "CSS Houdini"
|
15545 | ],
|
15546 | descriptors: {
|
15547 | syntax: {
|
15548 | syntax: "<string>",
|
15549 | media: "all",
|
15550 | percentages: "no",
|
15551 | initial: "n/a (required)",
|
15552 | computed: "asSpecified",
|
15553 | order: "uniqueOrder",
|
15554 | status: "experimental"
|
15555 | },
|
15556 | inherits: {
|
15557 | syntax: "true | false",
|
15558 | media: "all",
|
15559 | percentages: "no",
|
15560 | initial: "auto",
|
15561 | computed: "asSpecified",
|
15562 | order: "uniqueOrder",
|
15563 | status: "experimental"
|
15564 | },
|
15565 | "initial-value": {
|
15566 | syntax: "<string>",
|
15567 | media: "all",
|
15568 | initial: "n/a (required)",
|
15569 | percentages: "no",
|
15570 | computed: "asSpecified",
|
15571 | order: "uniqueOrder",
|
15572 | status: "experimental"
|
15573 | }
|
15574 | },
|
15575 | status: "experimental",
|
15576 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@property"
|
15577 | },
|
15578 | "@supports": {
|
15579 | syntax: "@supports <supports-condition> {\n <group-rule-body>\n}",
|
15580 | interfaces: [
|
15581 | "CSSGroupingRule",
|
15582 | "CSSConditionRule",
|
15583 | "CSSSupportsRule"
|
15584 | ],
|
15585 | groups: [
|
15586 | "CSS Conditional Rules"
|
15587 | ],
|
15588 | status: "standard",
|
15589 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@supports"
|
15590 | },
|
15591 | "@viewport": {
|
15592 | syntax: "@viewport {\n <group-rule-body>\n}",
|
15593 | interfaces: [
|
15594 | "CSSViewportRule"
|
15595 | ],
|
15596 | groups: [
|
15597 | "CSS Device Adaptation"
|
15598 | ],
|
15599 | descriptors: {
|
15600 | height: {
|
15601 | syntax: "<viewport-length>{1,2}",
|
15602 | media: [
|
15603 | "visual",
|
15604 | "continuous"
|
15605 | ],
|
15606 | initial: [
|
15607 | "min-height",
|
15608 | "max-height"
|
15609 | ],
|
15610 | percentages: [
|
15611 | "min-height",
|
15612 | "max-height"
|
15613 | ],
|
15614 | computed: [
|
15615 | "min-height",
|
15616 | "max-height"
|
15617 | ],
|
15618 | order: "orderOfAppearance",
|
15619 | status: "standard"
|
15620 | },
|
15621 | "max-height": {
|
15622 | syntax: "<viewport-length>",
|
15623 | media: [
|
15624 | "visual",
|
15625 | "continuous"
|
15626 | ],
|
15627 | initial: "auto",
|
15628 | percentages: "referToHeightOfInitialViewport",
|
15629 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
15630 | order: "uniqueOrder",
|
15631 | status: "standard"
|
15632 | },
|
15633 | "max-width": {
|
15634 | syntax: "<viewport-length>",
|
15635 | media: [
|
15636 | "visual",
|
15637 | "continuous"
|
15638 | ],
|
15639 | initial: "auto",
|
15640 | percentages: "referToWidthOfInitialViewport",
|
15641 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
15642 | order: "uniqueOrder",
|
15643 | status: "standard"
|
15644 | },
|
15645 | "max-zoom": {
|
15646 | syntax: "auto | <number> | <percentage>",
|
15647 | media: [
|
15648 | "visual",
|
15649 | "continuous"
|
15650 | ],
|
15651 | initial: "auto",
|
15652 | percentages: "the zoom factor itself",
|
15653 | computed: "autoNonNegativeOrPercentage",
|
15654 | order: "uniqueOrder",
|
15655 | status: "standard"
|
15656 | },
|
15657 | "min-height": {
|
15658 | syntax: "<viewport-length>",
|
15659 | media: [
|
15660 | "visual",
|
15661 | "continuous"
|
15662 | ],
|
15663 | initial: "auto",
|
15664 | percentages: "referToHeightOfInitialViewport",
|
15665 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
15666 | order: "uniqueOrder",
|
15667 | status: "standard"
|
15668 | },
|
15669 | "min-width": {
|
15670 | syntax: "<viewport-length>",
|
15671 | media: [
|
15672 | "visual",
|
15673 | "continuous"
|
15674 | ],
|
15675 | initial: "auto",
|
15676 | percentages: "referToWidthOfInitialViewport",
|
15677 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
15678 | order: "uniqueOrder",
|
15679 | status: "standard"
|
15680 | },
|
15681 | "min-zoom": {
|
15682 | syntax: "auto | <number> | <percentage>",
|
15683 | media: [
|
15684 | "visual",
|
15685 | "continuous"
|
15686 | ],
|
15687 | initial: "auto",
|
15688 | percentages: "the zoom factor itself",
|
15689 | computed: "autoNonNegativeOrPercentage",
|
15690 | order: "uniqueOrder",
|
15691 | status: "standard"
|
15692 | },
|
15693 | orientation: {
|
15694 | syntax: "auto | portrait | landscape",
|
15695 | media: [
|
15696 | "visual",
|
15697 | "continuous"
|
15698 | ],
|
15699 | initial: "auto",
|
15700 | percentages: "referToSizeOfBoundingBox",
|
15701 | computed: "asSpecified",
|
15702 | order: "uniqueOrder",
|
15703 | status: "standard"
|
15704 | },
|
15705 | "user-zoom": {
|
15706 | syntax: "zoom | fixed",
|
15707 | media: [
|
15708 | "visual",
|
15709 | "continuous"
|
15710 | ],
|
15711 | initial: "zoom",
|
15712 | percentages: "referToSizeOfBoundingBox",
|
15713 | computed: "asSpecified",
|
15714 | order: "uniqueOrder",
|
15715 | status: "standard"
|
15716 | },
|
15717 | "viewport-fit": {
|
15718 | syntax: "auto | contain | cover",
|
15719 | media: [
|
15720 | "visual",
|
15721 | "continuous"
|
15722 | ],
|
15723 | initial: "auto",
|
15724 | percentages: "no",
|
15725 | computed: "asSpecified",
|
15726 | order: "uniqueOrder",
|
15727 | status: "standard"
|
15728 | },
|
15729 | width: {
|
15730 | syntax: "<viewport-length>{1,2}",
|
15731 | media: [
|
15732 | "visual",
|
15733 | "continuous"
|
15734 | ],
|
15735 | initial: [
|
15736 | "min-width",
|
15737 | "max-width"
|
15738 | ],
|
15739 | percentages: [
|
15740 | "min-width",
|
15741 | "max-width"
|
15742 | ],
|
15743 | computed: [
|
15744 | "min-width",
|
15745 | "max-width"
|
15746 | ],
|
15747 | order: "orderOfAppearance",
|
15748 | status: "standard"
|
15749 | },
|
15750 | zoom: {
|
15751 | syntax: "auto | <number> | <percentage>",
|
15752 | media: [
|
15753 | "visual",
|
15754 | "continuous"
|
15755 | ],
|
15756 | initial: "auto",
|
15757 | percentages: "the zoom factor itself",
|
15758 | computed: "autoNonNegativeOrPercentage",
|
15759 | order: "uniqueOrder",
|
15760 | status: "standard"
|
15761 | }
|
15762 | },
|
15763 | status: "standard",
|
15764 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@viewport"
|
15765 | }
|
15766 | };
|
15767 |
|
15768 | var all = {
|
15769 | syntax: "initial | inherit | unset | revert",
|
15770 | media: "noPracticalMedia",
|
15771 | inherited: false,
|
15772 | animationType: "eachOfShorthandPropertiesExceptUnicodeBiDiAndDirection",
|
15773 | percentages: "no",
|
15774 | groups: [
|
15775 | "CSS Miscellaneous"
|
15776 | ],
|
15777 | initial: "noPracticalInitialValue",
|
15778 | appliesto: "allElements",
|
15779 | computed: "asSpecifiedAppliesToEachProperty",
|
15780 | order: "uniqueOrder",
|
15781 | status: "standard",
|
15782 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/all"
|
15783 | };
|
15784 | var animation = {
|
15785 | syntax: "<single-animation>#",
|
15786 | media: "visual",
|
15787 | inherited: false,
|
15788 | animationType: "discrete",
|
15789 | percentages: "no",
|
15790 | groups: [
|
15791 | "CSS Animations"
|
15792 | ],
|
15793 | initial: [
|
15794 | "animation-name",
|
15795 | "animation-duration",
|
15796 | "animation-timing-function",
|
15797 | "animation-delay",
|
15798 | "animation-iteration-count",
|
15799 | "animation-direction",
|
15800 | "animation-fill-mode",
|
15801 | "animation-play-state"
|
15802 | ],
|
15803 | appliesto: "allElementsAndPseudos",
|
15804 | computed: [
|
15805 | "animation-name",
|
15806 | "animation-duration",
|
15807 | "animation-timing-function",
|
15808 | "animation-delay",
|
15809 | "animation-direction",
|
15810 | "animation-iteration-count",
|
15811 | "animation-fill-mode",
|
15812 | "animation-play-state"
|
15813 | ],
|
15814 | order: "orderOfAppearance",
|
15815 | status: "standard",
|
15816 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation"
|
15817 | };
|
15818 | var appearance = {
|
15819 | syntax: "none | auto | textfield | menulist-button | <compat-auto>",
|
15820 | media: "all",
|
15821 | inherited: false,
|
15822 | animationType: "discrete",
|
15823 | percentages: "no",
|
15824 | groups: [
|
15825 | "CSS Basic User Interface"
|
15826 | ],
|
15827 | initial: "auto",
|
15828 | appliesto: "allElements",
|
15829 | computed: "asSpecified",
|
15830 | order: "perGrammar",
|
15831 | status: "experimental",
|
15832 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
|
15833 | };
|
15834 | var azimuth = {
|
15835 | syntax: "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
|
15836 | media: "aural",
|
15837 | inherited: true,
|
15838 | animationType: "discrete",
|
15839 | percentages: "no",
|
15840 | groups: [
|
15841 | "CSS Speech"
|
15842 | ],
|
15843 | initial: "center",
|
15844 | appliesto: "allElements",
|
15845 | computed: "normalizedAngle",
|
15846 | order: "orderOfAppearance",
|
15847 | status: "obsolete",
|
15848 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/azimuth"
|
15849 | };
|
15850 | var background = {
|
15851 | syntax: "[ <bg-layer> , ]* <final-bg-layer>",
|
15852 | media: "visual",
|
15853 | inherited: false,
|
15854 | animationType: [
|
15855 | "background-color",
|
15856 | "background-image",
|
15857 | "background-clip",
|
15858 | "background-position",
|
15859 | "background-size",
|
15860 | "background-repeat",
|
15861 | "background-attachment"
|
15862 | ],
|
15863 | percentages: [
|
15864 | "background-position",
|
15865 | "background-size"
|
15866 | ],
|
15867 | groups: [
|
15868 | "CSS Backgrounds and Borders"
|
15869 | ],
|
15870 | initial: [
|
15871 | "background-image",
|
15872 | "background-position",
|
15873 | "background-size",
|
15874 | "background-repeat",
|
15875 | "background-origin",
|
15876 | "background-clip",
|
15877 | "background-attachment",
|
15878 | "background-color"
|
15879 | ],
|
15880 | appliesto: "allElements",
|
15881 | computed: [
|
15882 | "background-image",
|
15883 | "background-position",
|
15884 | "background-size",
|
15885 | "background-repeat",
|
15886 | "background-origin",
|
15887 | "background-clip",
|
15888 | "background-attachment",
|
15889 | "background-color"
|
15890 | ],
|
15891 | order: "orderOfAppearance",
|
15892 | alsoAppliesTo: [
|
15893 | "::first-letter",
|
15894 | "::first-line",
|
15895 | "::placeholder"
|
15896 | ],
|
15897 | status: "standard",
|
15898 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background"
|
15899 | };
|
15900 | var border = {
|
15901 | syntax: "<line-width> || <line-style> || <color>",
|
15902 | media: "visual",
|
15903 | inherited: false,
|
15904 | animationType: [
|
15905 | "border-color",
|
15906 | "border-style",
|
15907 | "border-width"
|
15908 | ],
|
15909 | percentages: "no",
|
15910 | groups: [
|
15911 | "CSS Backgrounds and Borders"
|
15912 | ],
|
15913 | initial: [
|
15914 | "border-width",
|
15915 | "border-style",
|
15916 | "border-color"
|
15917 | ],
|
15918 | appliesto: "allElements",
|
15919 | computed: [
|
15920 | "border-width",
|
15921 | "border-style",
|
15922 | "border-color"
|
15923 | ],
|
15924 | order: "orderOfAppearance",
|
15925 | alsoAppliesTo: [
|
15926 | "::first-letter"
|
15927 | ],
|
15928 | status: "standard",
|
15929 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border"
|
15930 | };
|
15931 | var bottom = {
|
15932 | syntax: "<length> | <percentage> | auto",
|
15933 | media: "visual",
|
15934 | inherited: false,
|
15935 | animationType: "lpc",
|
15936 | percentages: "referToContainingBlockHeight",
|
15937 | groups: [
|
15938 | "CSS Positioning"
|
15939 | ],
|
15940 | initial: "auto",
|
15941 | appliesto: "positionedElements",
|
15942 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
15943 | order: "uniqueOrder",
|
15944 | status: "standard",
|
15945 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/bottom"
|
15946 | };
|
15947 | var clear = {
|
15948 | syntax: "none | left | right | both | inline-start | inline-end",
|
15949 | media: "visual",
|
15950 | inherited: false,
|
15951 | animationType: "discrete",
|
15952 | percentages: "no",
|
15953 | groups: [
|
15954 | "CSS Positioning"
|
15955 | ],
|
15956 | initial: "none",
|
15957 | appliesto: "blockLevelElements",
|
15958 | computed: "asSpecified",
|
15959 | order: "uniqueOrder",
|
15960 | status: "standard",
|
15961 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clear"
|
15962 | };
|
15963 | var clip = {
|
15964 | syntax: "<shape> | auto",
|
15965 | media: "visual",
|
15966 | inherited: false,
|
15967 | animationType: "rectangle",
|
15968 | percentages: "no",
|
15969 | groups: [
|
15970 | "CSS Masking"
|
15971 | ],
|
15972 | initial: "auto",
|
15973 | appliesto: "absolutelyPositionedElements",
|
15974 | computed: "autoOrRectangle",
|
15975 | order: "uniqueOrder",
|
15976 | status: "standard",
|
15977 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip"
|
15978 | };
|
15979 | var color = {
|
15980 | syntax: "<color>",
|
15981 | media: "visual",
|
15982 | inherited: true,
|
15983 | animationType: "color",
|
15984 | percentages: "no",
|
15985 | groups: [
|
15986 | "CSS Color"
|
15987 | ],
|
15988 | initial: "variesFromBrowserToBrowser",
|
15989 | appliesto: "allElements",
|
15990 | computed: "translucentValuesRGBAOtherwiseRGB",
|
15991 | order: "uniqueOrder",
|
15992 | alsoAppliesTo: [
|
15993 | "::first-letter",
|
15994 | "::first-line",
|
15995 | "::placeholder"
|
15996 | ],
|
15997 | status: "standard",
|
15998 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color"
|
15999 | };
|
16000 | var columns = {
|
16001 | syntax: "<'column-width'> || <'column-count'>",
|
16002 | media: "visual",
|
16003 | inherited: false,
|
16004 | animationType: [
|
16005 | "column-width",
|
16006 | "column-count"
|
16007 | ],
|
16008 | percentages: "no",
|
16009 | groups: [
|
16010 | "CSS Columns"
|
16011 | ],
|
16012 | initial: [
|
16013 | "column-width",
|
16014 | "column-count"
|
16015 | ],
|
16016 | appliesto: "blockContainersExceptTableWrappers",
|
16017 | computed: [
|
16018 | "column-width",
|
16019 | "column-count"
|
16020 | ],
|
16021 | order: "perGrammar",
|
16022 | status: "standard",
|
16023 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/columns"
|
16024 | };
|
16025 | var contain = {
|
16026 | syntax: "none | strict | content | [ size || layout || style || paint ]",
|
16027 | media: "all",
|
16028 | inherited: false,
|
16029 | animationType: "discrete",
|
16030 | percentages: "no",
|
16031 | groups: [
|
16032 | "CSS Containment"
|
16033 | ],
|
16034 | initial: "none",
|
16035 | appliesto: "allElements",
|
16036 | computed: "asSpecified",
|
16037 | order: "perGrammar",
|
16038 | status: "standard",
|
16039 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain"
|
16040 | };
|
16041 | var content = {
|
16042 | syntax: "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
|
16043 | media: "all",
|
16044 | inherited: false,
|
16045 | animationType: "discrete",
|
16046 | percentages: "no",
|
16047 | groups: [
|
16048 | "CSS Generated Content"
|
16049 | ],
|
16050 | initial: "normal",
|
16051 | appliesto: "beforeAndAfterPseudos",
|
16052 | computed: "normalOnElementsForPseudosNoneAbsoluteURIStringOrAsSpecified",
|
16053 | order: "uniqueOrder",
|
16054 | status: "standard",
|
16055 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/content"
|
16056 | };
|
16057 | var cursor = {
|
16058 | syntax: "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]",
|
16059 | media: [
|
16060 | "visual",
|
16061 | "interactive"
|
16062 | ],
|
16063 | inherited: true,
|
16064 | animationType: "discrete",
|
16065 | percentages: "no",
|
16066 | groups: [
|
16067 | "CSS Basic User Interface"
|
16068 | ],
|
16069 | initial: "auto",
|
16070 | appliesto: "allElements",
|
16071 | computed: "asSpecifiedURLsAbsolute",
|
16072 | order: "uniqueOrder",
|
16073 | status: "standard",
|
16074 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/cursor"
|
16075 | };
|
16076 | var direction = {
|
16077 | syntax: "ltr | rtl",
|
16078 | media: "visual",
|
16079 | inherited: true,
|
16080 | animationType: "discrete",
|
16081 | percentages: "no",
|
16082 | groups: [
|
16083 | "CSS Writing Modes"
|
16084 | ],
|
16085 | initial: "ltr",
|
16086 | appliesto: "allElements",
|
16087 | computed: "asSpecified",
|
16088 | order: "uniqueOrder",
|
16089 | status: "standard",
|
16090 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/direction"
|
16091 | };
|
16092 | var display = {
|
16093 | syntax: "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
|
16094 | media: "all",
|
16095 | inherited: false,
|
16096 | animationType: "discrete",
|
16097 | percentages: "no",
|
16098 | groups: [
|
16099 | "CSS Display"
|
16100 | ],
|
16101 | initial: "inline",
|
16102 | appliesto: "allElements",
|
16103 | computed: "asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent",
|
16104 | order: "uniqueOrder",
|
16105 | status: "standard",
|
16106 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/display"
|
16107 | };
|
16108 | var filter = {
|
16109 | syntax: "none | <filter-function-list>",
|
16110 | media: "visual",
|
16111 | inherited: false,
|
16112 | animationType: "filterList",
|
16113 | percentages: "no",
|
16114 | groups: [
|
16115 | "Filter Effects"
|
16116 | ],
|
16117 | initial: "none",
|
16118 | appliesto: "allElementsSVGContainerElements",
|
16119 | computed: "asSpecified",
|
16120 | order: "uniqueOrder",
|
16121 | status: "standard",
|
16122 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/filter"
|
16123 | };
|
16124 | var flex = {
|
16125 | syntax: "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
|
16126 | media: "visual",
|
16127 | inherited: false,
|
16128 | animationType: [
|
16129 | "flex-grow",
|
16130 | "flex-shrink",
|
16131 | "flex-basis"
|
16132 | ],
|
16133 | percentages: "no",
|
16134 | groups: [
|
16135 | "CSS Flexible Box Layout"
|
16136 | ],
|
16137 | initial: [
|
16138 | "flex-grow",
|
16139 | "flex-shrink",
|
16140 | "flex-basis"
|
16141 | ],
|
16142 | appliesto: "flexItemsAndInFlowPseudos",
|
16143 | computed: [
|
16144 | "flex-grow",
|
16145 | "flex-shrink",
|
16146 | "flex-basis"
|
16147 | ],
|
16148 | order: "orderOfAppearance",
|
16149 | status: "standard",
|
16150 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex"
|
16151 | };
|
16152 | var float = {
|
16153 | syntax: "left | right | none | inline-start | inline-end",
|
16154 | media: "visual",
|
16155 | inherited: false,
|
16156 | animationType: "discrete",
|
16157 | percentages: "no",
|
16158 | groups: [
|
16159 | "CSS Positioning"
|
16160 | ],
|
16161 | initial: "none",
|
16162 | appliesto: "allElementsNoEffectIfDisplayNone",
|
16163 | computed: "asSpecified",
|
16164 | order: "uniqueOrder",
|
16165 | status: "standard",
|
16166 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/float"
|
16167 | };
|
16168 | var font = {
|
16169 | syntax: "[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar",
|
16170 | media: "visual",
|
16171 | inherited: true,
|
16172 | animationType: [
|
16173 | "font-style",
|
16174 | "font-variant",
|
16175 | "font-weight",
|
16176 | "font-stretch",
|
16177 | "font-size",
|
16178 | "line-height",
|
16179 | "font-family"
|
16180 | ],
|
16181 | percentages: [
|
16182 | "font-size",
|
16183 | "line-height"
|
16184 | ],
|
16185 | groups: [
|
16186 | "CSS Fonts"
|
16187 | ],
|
16188 | initial: [
|
16189 | "font-style",
|
16190 | "font-variant",
|
16191 | "font-weight",
|
16192 | "font-stretch",
|
16193 | "font-size",
|
16194 | "line-height",
|
16195 | "font-family"
|
16196 | ],
|
16197 | appliesto: "allElements",
|
16198 | computed: [
|
16199 | "font-style",
|
16200 | "font-variant",
|
16201 | "font-weight",
|
16202 | "font-stretch",
|
16203 | "font-size",
|
16204 | "line-height",
|
16205 | "font-family"
|
16206 | ],
|
16207 | order: "orderOfAppearance",
|
16208 | alsoAppliesTo: [
|
16209 | "::first-letter",
|
16210 | "::first-line",
|
16211 | "::placeholder"
|
16212 | ],
|
16213 | status: "standard",
|
16214 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font"
|
16215 | };
|
16216 | var gap = {
|
16217 | syntax: "<'row-gap'> <'column-gap'>?",
|
16218 | media: "visual",
|
16219 | inherited: false,
|
16220 | animationType: [
|
16221 | "row-gap",
|
16222 | "column-gap"
|
16223 | ],
|
16224 | percentages: "no",
|
16225 | groups: [
|
16226 | "CSS Box Alignment"
|
16227 | ],
|
16228 | initial: [
|
16229 | "row-gap",
|
16230 | "column-gap"
|
16231 | ],
|
16232 | appliesto: "multiColumnElementsFlexContainersGridContainers",
|
16233 | computed: [
|
16234 | "row-gap",
|
16235 | "column-gap"
|
16236 | ],
|
16237 | order: "uniqueOrder",
|
16238 | status: "standard",
|
16239 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
|
16240 | };
|
16241 | var grid = {
|
16242 | syntax: "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
|
16243 | media: "visual",
|
16244 | inherited: false,
|
16245 | animationType: "discrete",
|
16246 | percentages: [
|
16247 | "grid-template-rows",
|
16248 | "grid-template-columns",
|
16249 | "grid-auto-rows",
|
16250 | "grid-auto-columns"
|
16251 | ],
|
16252 | groups: [
|
16253 | "CSS Grid Layout"
|
16254 | ],
|
16255 | initial: [
|
16256 | "grid-template-rows",
|
16257 | "grid-template-columns",
|
16258 | "grid-template-areas",
|
16259 | "grid-auto-rows",
|
16260 | "grid-auto-columns",
|
16261 | "grid-auto-flow",
|
16262 | "grid-column-gap",
|
16263 | "grid-row-gap",
|
16264 | "column-gap",
|
16265 | "row-gap"
|
16266 | ],
|
16267 | appliesto: "gridContainers",
|
16268 | computed: [
|
16269 | "grid-template-rows",
|
16270 | "grid-template-columns",
|
16271 | "grid-template-areas",
|
16272 | "grid-auto-rows",
|
16273 | "grid-auto-columns",
|
16274 | "grid-auto-flow",
|
16275 | "grid-column-gap",
|
16276 | "grid-row-gap",
|
16277 | "column-gap",
|
16278 | "row-gap"
|
16279 | ],
|
16280 | order: "uniqueOrder",
|
16281 | status: "standard",
|
16282 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid"
|
16283 | };
|
16284 | var height = {
|
16285 | syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
16286 | media: "visual",
|
16287 | inherited: false,
|
16288 | animationType: "lpc",
|
16289 | percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesRelativeToContainingBlock",
|
16290 | groups: [
|
16291 | "CSS Box Model"
|
16292 | ],
|
16293 | initial: "auto",
|
16294 | appliesto: "allElementsButNonReplacedAndTableColumns",
|
16295 | computed: "percentageAutoOrAbsoluteLength",
|
16296 | order: "uniqueOrder",
|
16297 | status: "standard",
|
16298 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/height"
|
16299 | };
|
16300 | var hyphens = {
|
16301 | syntax: "none | manual | auto",
|
16302 | media: "visual",
|
16303 | inherited: true,
|
16304 | animationType: "discrete",
|
16305 | percentages: "no",
|
16306 | groups: [
|
16307 | "CSS Text"
|
16308 | ],
|
16309 | initial: "manual",
|
16310 | appliesto: "allElements",
|
16311 | computed: "asSpecified",
|
16312 | order: "uniqueOrder",
|
16313 | status: "standard",
|
16314 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hyphens"
|
16315 | };
|
16316 | var inset = {
|
16317 | syntax: "<'top'>{1,4}",
|
16318 | media: "visual",
|
16319 | inherited: false,
|
16320 | animationType: "lpc",
|
16321 | percentages: "logicalHeightOfContainingBlock",
|
16322 | groups: [
|
16323 | "CSS Logical Properties"
|
16324 | ],
|
16325 | initial: "auto",
|
16326 | appliesto: "positionedElements",
|
16327 | computed: "sameAsBoxOffsets",
|
16328 | order: "uniqueOrder",
|
16329 | status: "standard",
|
16330 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset"
|
16331 | };
|
16332 | var isolation = {
|
16333 | syntax: "auto | isolate",
|
16334 | media: "visual",
|
16335 | inherited: false,
|
16336 | animationType: "discrete",
|
16337 | percentages: "no",
|
16338 | groups: [
|
16339 | "Compositing and Blending"
|
16340 | ],
|
16341 | initial: "auto",
|
16342 | appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
|
16343 | computed: "asSpecified",
|
16344 | order: "uniqueOrder",
|
16345 | status: "standard",
|
16346 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/isolation"
|
16347 | };
|
16348 | var left = {
|
16349 | syntax: "<length> | <percentage> | auto",
|
16350 | media: "visual",
|
16351 | inherited: false,
|
16352 | animationType: "lpc",
|
16353 | percentages: "referToWidthOfContainingBlock",
|
16354 | groups: [
|
16355 | "CSS Positioning"
|
16356 | ],
|
16357 | initial: "auto",
|
16358 | appliesto: "positionedElements",
|
16359 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
16360 | order: "uniqueOrder",
|
16361 | status: "standard",
|
16362 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/left"
|
16363 | };
|
16364 | var margin = {
|
16365 | syntax: "[ <length> | <percentage> | auto ]{1,4}",
|
16366 | media: "visual",
|
16367 | inherited: false,
|
16368 | animationType: "length",
|
16369 | percentages: "referToWidthOfContainingBlock",
|
16370 | groups: [
|
16371 | "CSS Box Model"
|
16372 | ],
|
16373 | initial: [
|
16374 | "margin-bottom",
|
16375 | "margin-left",
|
16376 | "margin-right",
|
16377 | "margin-top"
|
16378 | ],
|
16379 | appliesto: "allElementsExceptTableDisplayTypes",
|
16380 | computed: [
|
16381 | "margin-bottom",
|
16382 | "margin-left",
|
16383 | "margin-right",
|
16384 | "margin-top"
|
16385 | ],
|
16386 | order: "uniqueOrder",
|
16387 | alsoAppliesTo: [
|
16388 | "::first-letter",
|
16389 | "::first-line"
|
16390 | ],
|
16391 | status: "standard",
|
16392 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin"
|
16393 | };
|
16394 | var mask = {
|
16395 | syntax: "<mask-layer>#",
|
16396 | media: "visual",
|
16397 | inherited: false,
|
16398 | animationType: [
|
16399 | "mask-image",
|
16400 | "mask-mode",
|
16401 | "mask-repeat",
|
16402 | "mask-position",
|
16403 | "mask-clip",
|
16404 | "mask-origin",
|
16405 | "mask-size",
|
16406 | "mask-composite"
|
16407 | ],
|
16408 | percentages: [
|
16409 | "mask-position"
|
16410 | ],
|
16411 | groups: [
|
16412 | "CSS Masking"
|
16413 | ],
|
16414 | initial: [
|
16415 | "mask-image",
|
16416 | "mask-mode",
|
16417 | "mask-repeat",
|
16418 | "mask-position",
|
16419 | "mask-clip",
|
16420 | "mask-origin",
|
16421 | "mask-size",
|
16422 | "mask-composite"
|
16423 | ],
|
16424 | appliesto: "allElementsSVGContainerElements",
|
16425 | computed: [
|
16426 | "mask-image",
|
16427 | "mask-mode",
|
16428 | "mask-repeat",
|
16429 | "mask-position",
|
16430 | "mask-clip",
|
16431 | "mask-origin",
|
16432 | "mask-size",
|
16433 | "mask-composite"
|
16434 | ],
|
16435 | order: "perGrammar",
|
16436 | stacking: true,
|
16437 | status: "standard",
|
16438 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
|
16439 | };
|
16440 | var offset = {
|
16441 | syntax: "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
|
16442 | media: "visual",
|
16443 | inherited: false,
|
16444 | animationType: [
|
16445 | "offset-position",
|
16446 | "offset-path",
|
16447 | "offset-distance",
|
16448 | "offset-anchor",
|
16449 | "offset-rotate"
|
16450 | ],
|
16451 | percentages: [
|
16452 | "offset-position",
|
16453 | "offset-distance",
|
16454 | "offset-anchor"
|
16455 | ],
|
16456 | groups: [
|
16457 | "CSS Motion Path"
|
16458 | ],
|
16459 | initial: [
|
16460 | "offset-position",
|
16461 | "offset-path",
|
16462 | "offset-distance",
|
16463 | "offset-anchor",
|
16464 | "offset-rotate"
|
16465 | ],
|
16466 | appliesto: "transformableElements",
|
16467 | computed: [
|
16468 | "offset-position",
|
16469 | "offset-path",
|
16470 | "offset-distance",
|
16471 | "offset-anchor",
|
16472 | "offset-rotate"
|
16473 | ],
|
16474 | order: "perGrammar",
|
16475 | stacking: true,
|
16476 | status: "standard",
|
16477 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset"
|
16478 | };
|
16479 | var opacity = {
|
16480 | syntax: "<alpha-value>",
|
16481 | media: "visual",
|
16482 | inherited: false,
|
16483 | animationType: "number",
|
16484 | percentages: "no",
|
16485 | groups: [
|
16486 | "CSS Color"
|
16487 | ],
|
16488 | initial: "1.0",
|
16489 | appliesto: "allElements",
|
16490 | computed: "specifiedValueClipped0To1",
|
16491 | order: "uniqueOrder",
|
16492 | alsoAppliesTo: [
|
16493 | "::placeholder"
|
16494 | ],
|
16495 | status: "standard",
|
16496 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/opacity"
|
16497 | };
|
16498 | var order = {
|
16499 | syntax: "<integer>",
|
16500 | media: "visual",
|
16501 | inherited: false,
|
16502 | animationType: "integer",
|
16503 | percentages: "no",
|
16504 | groups: [
|
16505 | "CSS Flexible Box Layout"
|
16506 | ],
|
16507 | initial: "0",
|
16508 | appliesto: "flexItemsGridItemsAbsolutelyPositionedContainerChildren",
|
16509 | computed: "asSpecified",
|
16510 | order: "uniqueOrder",
|
16511 | status: "standard",
|
16512 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/order"
|
16513 | };
|
16514 | var orphans = {
|
16515 | syntax: "<integer>",
|
16516 | media: "visual",
|
16517 | inherited: true,
|
16518 | animationType: "discrete",
|
16519 | percentages: "no",
|
16520 | groups: [
|
16521 | "CSS Fragmentation"
|
16522 | ],
|
16523 | initial: "2",
|
16524 | appliesto: "blockContainerElements",
|
16525 | computed: "asSpecified",
|
16526 | order: "perGrammar",
|
16527 | status: "standard",
|
16528 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/orphans"
|
16529 | };
|
16530 | var outline = {
|
16531 | syntax: "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
|
16532 | media: [
|
16533 | "visual",
|
16534 | "interactive"
|
16535 | ],
|
16536 | inherited: false,
|
16537 | animationType: [
|
16538 | "outline-color",
|
16539 | "outline-width",
|
16540 | "outline-style"
|
16541 | ],
|
16542 | percentages: "no",
|
16543 | groups: [
|
16544 | "CSS Basic User Interface"
|
16545 | ],
|
16546 | initial: [
|
16547 | "outline-color",
|
16548 | "outline-style",
|
16549 | "outline-width"
|
16550 | ],
|
16551 | appliesto: "allElements",
|
16552 | computed: [
|
16553 | "outline-color",
|
16554 | "outline-width",
|
16555 | "outline-style"
|
16556 | ],
|
16557 | order: "orderOfAppearance",
|
16558 | status: "standard",
|
16559 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline"
|
16560 | };
|
16561 | var overflow = {
|
16562 | syntax: "[ visible | hidden | clip | scroll | auto ]{1,2}",
|
16563 | media: "visual",
|
16564 | inherited: false,
|
16565 | animationType: "discrete",
|
16566 | percentages: "no",
|
16567 | groups: [
|
16568 | "CSS Overflow"
|
16569 | ],
|
16570 | initial: "visible",
|
16571 | appliesto: "blockContainersFlexContainersGridContainers",
|
16572 | computed: [
|
16573 | "overflow-x",
|
16574 | "overflow-y"
|
16575 | ],
|
16576 | order: "uniqueOrder",
|
16577 | status: "standard",
|
16578 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow"
|
16579 | };
|
16580 | var padding = {
|
16581 | syntax: "[ <length> | <percentage> ]{1,4}",
|
16582 | media: "visual",
|
16583 | inherited: false,
|
16584 | animationType: "length",
|
16585 | percentages: "referToWidthOfContainingBlock",
|
16586 | groups: [
|
16587 | "CSS Box Model"
|
16588 | ],
|
16589 | initial: [
|
16590 | "padding-bottom",
|
16591 | "padding-left",
|
16592 | "padding-right",
|
16593 | "padding-top"
|
16594 | ],
|
16595 | appliesto: "allElementsExceptInternalTableDisplayTypes",
|
16596 | computed: [
|
16597 | "padding-bottom",
|
16598 | "padding-left",
|
16599 | "padding-right",
|
16600 | "padding-top"
|
16601 | ],
|
16602 | order: "uniqueOrder",
|
16603 | alsoAppliesTo: [
|
16604 | "::first-letter",
|
16605 | "::first-line"
|
16606 | ],
|
16607 | status: "standard",
|
16608 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding"
|
16609 | };
|
16610 | var perspective = {
|
16611 | syntax: "none | <length>",
|
16612 | media: "visual",
|
16613 | inherited: false,
|
16614 | animationType: "length",
|
16615 | percentages: "no",
|
16616 | groups: [
|
16617 | "CSS Transforms"
|
16618 | ],
|
16619 | initial: "none",
|
16620 | appliesto: "transformableElements",
|
16621 | computed: "absoluteLengthOrNone",
|
16622 | order: "uniqueOrder",
|
16623 | stacking: true,
|
16624 | status: "standard",
|
16625 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective"
|
16626 | };
|
16627 | var position = {
|
16628 | syntax: "static | relative | absolute | sticky | fixed",
|
16629 | media: "visual",
|
16630 | inherited: false,
|
16631 | animationType: "discrete",
|
16632 | percentages: "no",
|
16633 | groups: [
|
16634 | "CSS Positioning"
|
16635 | ],
|
16636 | initial: "static",
|
16637 | appliesto: "allElements",
|
16638 | computed: "asSpecified",
|
16639 | order: "uniqueOrder",
|
16640 | stacking: true,
|
16641 | status: "standard",
|
16642 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position"
|
16643 | };
|
16644 | var quotes = {
|
16645 | syntax: "none | auto | [ <string> <string> ]+",
|
16646 | media: "visual",
|
16647 | inherited: true,
|
16648 | animationType: "discrete",
|
16649 | percentages: "no",
|
16650 | groups: [
|
16651 | "CSS Generated Content"
|
16652 | ],
|
16653 | initial: "dependsOnUserAgent",
|
16654 | appliesto: "allElements",
|
16655 | computed: "asSpecified",
|
16656 | order: "uniqueOrder",
|
16657 | status: "standard",
|
16658 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/quotes"
|
16659 | };
|
16660 | var resize = {
|
16661 | syntax: "none | both | horizontal | vertical | block | inline",
|
16662 | media: "visual",
|
16663 | inherited: false,
|
16664 | animationType: "discrete",
|
16665 | percentages: "no",
|
16666 | groups: [
|
16667 | "CSS Basic User Interface"
|
16668 | ],
|
16669 | initial: "none",
|
16670 | appliesto: "elementsWithOverflowNotVisibleAndReplacedElements",
|
16671 | computed: "asSpecified",
|
16672 | order: "uniqueOrder",
|
16673 | status: "standard",
|
16674 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/resize"
|
16675 | };
|
16676 | var right = {
|
16677 | syntax: "<length> | <percentage> | auto",
|
16678 | media: "visual",
|
16679 | inherited: false,
|
16680 | animationType: "lpc",
|
16681 | percentages: "referToWidthOfContainingBlock",
|
16682 | groups: [
|
16683 | "CSS Positioning"
|
16684 | ],
|
16685 | initial: "auto",
|
16686 | appliesto: "positionedElements",
|
16687 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
16688 | order: "uniqueOrder",
|
16689 | status: "standard",
|
16690 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/right"
|
16691 | };
|
16692 | var rotate = {
|
16693 | syntax: "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
|
16694 | media: "visual",
|
16695 | inherited: false,
|
16696 | animationType: "transform",
|
16697 | percentages: "no",
|
16698 | groups: [
|
16699 | "CSS Transforms"
|
16700 | ],
|
16701 | initial: "none",
|
16702 | appliesto: "transformableElements",
|
16703 | computed: "asSpecified",
|
16704 | order: "perGrammar",
|
16705 | stacking: true,
|
16706 | status: "standard",
|
16707 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/rotate"
|
16708 | };
|
16709 | var scale = {
|
16710 | syntax: "none | <number>{1,3}",
|
16711 | media: "visual",
|
16712 | inherited: false,
|
16713 | animationType: "transform",
|
16714 | percentages: "no",
|
16715 | groups: [
|
16716 | "CSS Transforms"
|
16717 | ],
|
16718 | initial: "none",
|
16719 | appliesto: "transformableElements",
|
16720 | computed: "asSpecified",
|
16721 | order: "perGrammar",
|
16722 | stacking: true,
|
16723 | status: "standard",
|
16724 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scale"
|
16725 | };
|
16726 | var top = {
|
16727 | syntax: "<length> | <percentage> | auto",
|
16728 | media: "visual",
|
16729 | inherited: false,
|
16730 | animationType: "lpc",
|
16731 | percentages: "referToContainingBlockHeight",
|
16732 | groups: [
|
16733 | "CSS Positioning"
|
16734 | ],
|
16735 | initial: "auto",
|
16736 | appliesto: "positionedElements",
|
16737 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
16738 | order: "uniqueOrder",
|
16739 | status: "standard",
|
16740 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/top"
|
16741 | };
|
16742 | var transform = {
|
16743 | syntax: "none | <transform-list>",
|
16744 | media: "visual",
|
16745 | inherited: false,
|
16746 | animationType: "transform",
|
16747 | percentages: "referToSizeOfBoundingBox",
|
16748 | groups: [
|
16749 | "CSS Transforms"
|
16750 | ],
|
16751 | initial: "none",
|
16752 | appliesto: "transformableElements",
|
16753 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
16754 | order: "uniqueOrder",
|
16755 | stacking: true,
|
16756 | status: "standard",
|
16757 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform"
|
16758 | };
|
16759 | var transition = {
|
16760 | syntax: "<single-transition>#",
|
16761 | media: "interactive",
|
16762 | inherited: false,
|
16763 | animationType: "discrete",
|
16764 | percentages: "no",
|
16765 | groups: [
|
16766 | "CSS Transitions"
|
16767 | ],
|
16768 | initial: [
|
16769 | "transition-delay",
|
16770 | "transition-duration",
|
16771 | "transition-property",
|
16772 | "transition-timing-function"
|
16773 | ],
|
16774 | appliesto: "allElementsAndPseudos",
|
16775 | computed: [
|
16776 | "transition-delay",
|
16777 | "transition-duration",
|
16778 | "transition-property",
|
16779 | "transition-timing-function"
|
16780 | ],
|
16781 | order: "orderOfAppearance",
|
16782 | status: "standard",
|
16783 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition"
|
16784 | };
|
16785 | var translate = {
|
16786 | syntax: "none | <length-percentage> [ <length-percentage> <length>? ]?",
|
16787 | media: "visual",
|
16788 | inherited: false,
|
16789 | animationType: "transform",
|
16790 | percentages: "referToSizeOfBoundingBox",
|
16791 | groups: [
|
16792 | "CSS Transforms"
|
16793 | ],
|
16794 | initial: "none",
|
16795 | appliesto: "transformableElements",
|
16796 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
16797 | order: "perGrammar",
|
16798 | stacking: true,
|
16799 | status: "standard",
|
16800 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/translate"
|
16801 | };
|
16802 | var visibility = {
|
16803 | syntax: "visible | hidden | collapse",
|
16804 | media: "visual",
|
16805 | inherited: true,
|
16806 | animationType: "visibility",
|
16807 | percentages: "no",
|
16808 | groups: [
|
16809 | "CSS Box Model"
|
16810 | ],
|
16811 | initial: "visible",
|
16812 | appliesto: "allElements",
|
16813 | computed: "asSpecified",
|
16814 | order: "uniqueOrder",
|
16815 | status: "standard",
|
16816 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/visibility"
|
16817 | };
|
16818 | var widows = {
|
16819 | syntax: "<integer>",
|
16820 | media: "visual",
|
16821 | inherited: true,
|
16822 | animationType: "discrete",
|
16823 | percentages: "no",
|
16824 | groups: [
|
16825 | "CSS Fragmentation"
|
16826 | ],
|
16827 | initial: "2",
|
16828 | appliesto: "blockContainerElements",
|
16829 | computed: "asSpecified",
|
16830 | order: "perGrammar",
|
16831 | status: "standard",
|
16832 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/widows"
|
16833 | };
|
16834 | var width = {
|
16835 | syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
16836 | media: "visual",
|
16837 | inherited: false,
|
16838 | animationType: "lpc",
|
16839 | percentages: "referToWidthOfContainingBlock",
|
16840 | groups: [
|
16841 | "CSS Box Model"
|
16842 | ],
|
16843 | initial: "auto",
|
16844 | appliesto: "allElementsButNonReplacedAndTableRows",
|
16845 | computed: "percentageAutoOrAbsoluteLength",
|
16846 | order: "lengthOrPercentageBeforeKeywordIfBothPresent",
|
16847 | status: "standard",
|
16848 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/width"
|
16849 | };
|
16850 | var zoom = {
|
16851 | syntax: "normal | reset | <number> | <percentage>",
|
16852 | media: "visual",
|
16853 | inherited: false,
|
16854 | animationType: "integer",
|
16855 | percentages: "no",
|
16856 | groups: [
|
16857 | "Microsoft Extensions"
|
16858 | ],
|
16859 | initial: "normal",
|
16860 | appliesto: "allElements",
|
16861 | computed: "asSpecified",
|
16862 | order: "uniqueOrder",
|
16863 | status: "nonstandard",
|
16864 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/zoom"
|
16865 | };
|
16866 | var mdnProperties = {
|
16867 | "--*": {
|
16868 | syntax: "<declaration-value>",
|
16869 | media: "all",
|
16870 | inherited: true,
|
16871 | animationType: "discrete",
|
16872 | percentages: "no",
|
16873 | groups: [
|
16874 | "CSS Variables"
|
16875 | ],
|
16876 | initial: "seeProse",
|
16877 | appliesto: "allElements",
|
16878 | computed: "asSpecifiedWithVarsSubstituted",
|
16879 | order: "perGrammar",
|
16880 | status: "experimental",
|
16881 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/--*"
|
16882 | },
|
16883 | "-ms-accelerator": {
|
16884 | syntax: "false | true",
|
16885 | media: "visual",
|
16886 | inherited: false,
|
16887 | animationType: "discrete",
|
16888 | percentages: "no",
|
16889 | groups: [
|
16890 | "Microsoft Extensions"
|
16891 | ],
|
16892 | initial: "false",
|
16893 | appliesto: "allElements",
|
16894 | computed: "asSpecified",
|
16895 | order: "uniqueOrder",
|
16896 | status: "nonstandard",
|
16897 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-accelerator"
|
16898 | },
|
16899 | "-ms-block-progression": {
|
16900 | syntax: "tb | rl | bt | lr",
|
16901 | media: "visual",
|
16902 | inherited: false,
|
16903 | animationType: "discrete",
|
16904 | percentages: "no",
|
16905 | groups: [
|
16906 | "Microsoft Extensions"
|
16907 | ],
|
16908 | initial: "tb",
|
16909 | appliesto: "allElements",
|
16910 | computed: "asSpecified",
|
16911 | order: "uniqueOrder",
|
16912 | status: "nonstandard",
|
16913 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-block-progression"
|
16914 | },
|
16915 | "-ms-content-zoom-chaining": {
|
16916 | syntax: "none | chained",
|
16917 | media: "interactive",
|
16918 | inherited: false,
|
16919 | animationType: "discrete",
|
16920 | percentages: "no",
|
16921 | groups: [
|
16922 | "Microsoft Extensions"
|
16923 | ],
|
16924 | initial: "none",
|
16925 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
16926 | computed: "asSpecified",
|
16927 | order: "uniqueOrder",
|
16928 | status: "nonstandard",
|
16929 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-chaining"
|
16930 | },
|
16931 | "-ms-content-zooming": {
|
16932 | syntax: "none | zoom",
|
16933 | media: "interactive",
|
16934 | inherited: false,
|
16935 | animationType: "discrete",
|
16936 | percentages: "no",
|
16937 | groups: [
|
16938 | "Microsoft Extensions"
|
16939 | ],
|
16940 | initial: "zoomForTheTopLevelNoneForTheRest",
|
16941 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
16942 | computed: "asSpecified",
|
16943 | order: "uniqueOrder",
|
16944 | status: "nonstandard",
|
16945 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zooming"
|
16946 | },
|
16947 | "-ms-content-zoom-limit": {
|
16948 | syntax: "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
|
16949 | media: "interactive",
|
16950 | inherited: false,
|
16951 | animationType: "discrete",
|
16952 | percentages: [
|
16953 | "-ms-content-zoom-limit-max",
|
16954 | "-ms-content-zoom-limit-min"
|
16955 | ],
|
16956 | groups: [
|
16957 | "Microsoft Extensions"
|
16958 | ],
|
16959 | initial: [
|
16960 | "-ms-content-zoom-limit-max",
|
16961 | "-ms-content-zoom-limit-min"
|
16962 | ],
|
16963 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
16964 | computed: [
|
16965 | "-ms-content-zoom-limit-max",
|
16966 | "-ms-content-zoom-limit-min"
|
16967 | ],
|
16968 | order: "uniqueOrder",
|
16969 | status: "nonstandard",
|
16970 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit"
|
16971 | },
|
16972 | "-ms-content-zoom-limit-max": {
|
16973 | syntax: "<percentage>",
|
16974 | media: "interactive",
|
16975 | inherited: false,
|
16976 | animationType: "discrete",
|
16977 | percentages: "maxZoomFactor",
|
16978 | groups: [
|
16979 | "Microsoft Extensions"
|
16980 | ],
|
16981 | initial: "400%",
|
16982 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
16983 | computed: "asSpecified",
|
16984 | order: "uniqueOrder",
|
16985 | status: "nonstandard",
|
16986 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-max"
|
16987 | },
|
16988 | "-ms-content-zoom-limit-min": {
|
16989 | syntax: "<percentage>",
|
16990 | media: "interactive",
|
16991 | inherited: false,
|
16992 | animationType: "discrete",
|
16993 | percentages: "minZoomFactor",
|
16994 | groups: [
|
16995 | "Microsoft Extensions"
|
16996 | ],
|
16997 | initial: "100%",
|
16998 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
16999 | computed: "asSpecified",
|
17000 | order: "uniqueOrder",
|
17001 | status: "nonstandard",
|
17002 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-min"
|
17003 | },
|
17004 | "-ms-content-zoom-snap": {
|
17005 | syntax: "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
|
17006 | media: "interactive",
|
17007 | inherited: false,
|
17008 | animationType: "discrete",
|
17009 | percentages: "no",
|
17010 | groups: [
|
17011 | "Microsoft Extensions"
|
17012 | ],
|
17013 | initial: [
|
17014 | "-ms-content-zoom-snap-type",
|
17015 | "-ms-content-zoom-snap-points"
|
17016 | ],
|
17017 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17018 | computed: [
|
17019 | "-ms-content-zoom-snap-type",
|
17020 | "-ms-content-zoom-snap-points"
|
17021 | ],
|
17022 | order: "uniqueOrder",
|
17023 | status: "nonstandard",
|
17024 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap"
|
17025 | },
|
17026 | "-ms-content-zoom-snap-points": {
|
17027 | syntax: "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
|
17028 | media: "interactive",
|
17029 | inherited: false,
|
17030 | animationType: "discrete",
|
17031 | percentages: "no",
|
17032 | groups: [
|
17033 | "Microsoft Extensions"
|
17034 | ],
|
17035 | initial: "snapInterval(0%, 100%)",
|
17036 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17037 | computed: "asSpecified",
|
17038 | order: "uniqueOrder",
|
17039 | status: "nonstandard",
|
17040 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-points"
|
17041 | },
|
17042 | "-ms-content-zoom-snap-type": {
|
17043 | syntax: "none | proximity | mandatory",
|
17044 | media: "interactive",
|
17045 | inherited: false,
|
17046 | animationType: "discrete",
|
17047 | percentages: "no",
|
17048 | groups: [
|
17049 | "Microsoft Extensions"
|
17050 | ],
|
17051 | initial: "none",
|
17052 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17053 | computed: "asSpecified",
|
17054 | order: "uniqueOrder",
|
17055 | status: "nonstandard",
|
17056 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-type"
|
17057 | },
|
17058 | "-ms-filter": {
|
17059 | syntax: "<string>",
|
17060 | media: "visual",
|
17061 | inherited: false,
|
17062 | animationType: "discrete",
|
17063 | percentages: "no",
|
17064 | groups: [
|
17065 | "Microsoft Extensions"
|
17066 | ],
|
17067 | initial: "\"\"",
|
17068 | appliesto: "allElements",
|
17069 | computed: "asSpecified",
|
17070 | order: "uniqueOrder",
|
17071 | status: "nonstandard",
|
17072 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-filter"
|
17073 | },
|
17074 | "-ms-flow-from": {
|
17075 | syntax: "[ none | <custom-ident> ]#",
|
17076 | media: "visual",
|
17077 | inherited: false,
|
17078 | animationType: "discrete",
|
17079 | percentages: "no",
|
17080 | groups: [
|
17081 | "Microsoft Extensions"
|
17082 | ],
|
17083 | initial: "none",
|
17084 | appliesto: "nonReplacedElements",
|
17085 | computed: "asSpecified",
|
17086 | order: "uniqueOrder",
|
17087 | status: "nonstandard",
|
17088 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-from"
|
17089 | },
|
17090 | "-ms-flow-into": {
|
17091 | syntax: "[ none | <custom-ident> ]#",
|
17092 | media: "visual",
|
17093 | inherited: false,
|
17094 | animationType: "discrete",
|
17095 | percentages: "no",
|
17096 | groups: [
|
17097 | "Microsoft Extensions"
|
17098 | ],
|
17099 | initial: "none",
|
17100 | appliesto: "iframeElements",
|
17101 | computed: "asSpecified",
|
17102 | order: "uniqueOrder",
|
17103 | status: "nonstandard",
|
17104 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"
|
17105 | },
|
17106 | "-ms-grid-columns": {
|
17107 | syntax: "none | <track-list> | <auto-track-list>",
|
17108 | media: "visual",
|
17109 | inherited: false,
|
17110 | animationType: "simpleListOfLpcDifferenceLpc",
|
17111 | percentages: "referToDimensionOfContentArea",
|
17112 | groups: [
|
17113 | "CSS Grid Layout"
|
17114 | ],
|
17115 | initial: "none",
|
17116 | appliesto: "gridContainers",
|
17117 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
17118 | order: "uniqueOrder",
|
17119 | status: "nonstandard",
|
17120 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"
|
17121 | },
|
17122 | "-ms-grid-rows": {
|
17123 | syntax: "none | <track-list> | <auto-track-list>",
|
17124 | media: "visual",
|
17125 | inherited: false,
|
17126 | animationType: "simpleListOfLpcDifferenceLpc",
|
17127 | percentages: "referToDimensionOfContentArea",
|
17128 | groups: [
|
17129 | "CSS Grid Layout"
|
17130 | ],
|
17131 | initial: "none",
|
17132 | appliesto: "gridContainers",
|
17133 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
17134 | order: "uniqueOrder",
|
17135 | status: "nonstandard",
|
17136 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"
|
17137 | },
|
17138 | "-ms-high-contrast-adjust": {
|
17139 | syntax: "auto | none",
|
17140 | media: "visual",
|
17141 | inherited: true,
|
17142 | animationType: "discrete",
|
17143 | percentages: "no",
|
17144 | groups: [
|
17145 | "Microsoft Extensions"
|
17146 | ],
|
17147 | initial: "auto",
|
17148 | appliesto: "allElements",
|
17149 | computed: "asSpecified",
|
17150 | order: "uniqueOrder",
|
17151 | status: "nonstandard",
|
17152 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-high-contrast-adjust"
|
17153 | },
|
17154 | "-ms-hyphenate-limit-chars": {
|
17155 | syntax: "auto | <integer>{1,3}",
|
17156 | media: "visual",
|
17157 | inherited: true,
|
17158 | animationType: "discrete",
|
17159 | percentages: "no",
|
17160 | groups: [
|
17161 | "Microsoft Extensions"
|
17162 | ],
|
17163 | initial: "auto",
|
17164 | appliesto: "allElements",
|
17165 | computed: "asSpecified",
|
17166 | order: "uniqueOrder",
|
17167 | status: "nonstandard",
|
17168 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-chars"
|
17169 | },
|
17170 | "-ms-hyphenate-limit-lines": {
|
17171 | syntax: "no-limit | <integer>",
|
17172 | media: "visual",
|
17173 | inherited: true,
|
17174 | animationType: "discrete",
|
17175 | percentages: "no",
|
17176 | groups: [
|
17177 | "Microsoft Extensions"
|
17178 | ],
|
17179 | initial: "no-limit",
|
17180 | appliesto: "blockContainerElements",
|
17181 | computed: "asSpecified",
|
17182 | order: "uniqueOrder",
|
17183 | status: "nonstandard",
|
17184 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-lines"
|
17185 | },
|
17186 | "-ms-hyphenate-limit-zone": {
|
17187 | syntax: "<percentage> | <length>",
|
17188 | media: "visual",
|
17189 | inherited: true,
|
17190 | animationType: "discrete",
|
17191 | percentages: "referToLineBoxWidth",
|
17192 | groups: [
|
17193 | "Microsoft Extensions"
|
17194 | ],
|
17195 | initial: "0",
|
17196 | appliesto: "blockContainerElements",
|
17197 | computed: "asSpecified",
|
17198 | order: "uniqueOrder",
|
17199 | status: "nonstandard",
|
17200 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-zone"
|
17201 | },
|
17202 | "-ms-ime-align": {
|
17203 | syntax: "auto | after",
|
17204 | media: "visual",
|
17205 | inherited: false,
|
17206 | animationType: "discrete",
|
17207 | percentages: "no",
|
17208 | groups: [
|
17209 | "Microsoft Extensions"
|
17210 | ],
|
17211 | initial: "auto",
|
17212 | appliesto: "allElements",
|
17213 | computed: "asSpecified",
|
17214 | order: "uniqueOrder",
|
17215 | status: "nonstandard",
|
17216 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-ime-align"
|
17217 | },
|
17218 | "-ms-overflow-style": {
|
17219 | syntax: "auto | none | scrollbar | -ms-autohiding-scrollbar",
|
17220 | media: "interactive",
|
17221 | inherited: true,
|
17222 | animationType: "discrete",
|
17223 | percentages: "no",
|
17224 | groups: [
|
17225 | "Microsoft Extensions"
|
17226 | ],
|
17227 | initial: "auto",
|
17228 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17229 | computed: "asSpecified",
|
17230 | order: "uniqueOrder",
|
17231 | status: "nonstandard",
|
17232 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-overflow-style"
|
17233 | },
|
17234 | "-ms-scrollbar-3dlight-color": {
|
17235 | syntax: "<color>",
|
17236 | media: "visual",
|
17237 | inherited: true,
|
17238 | animationType: "discrete",
|
17239 | percentages: "no",
|
17240 | groups: [
|
17241 | "Microsoft Extensions"
|
17242 | ],
|
17243 | initial: "dependsOnUserAgent",
|
17244 | appliesto: "allElements",
|
17245 | computed: "asSpecified",
|
17246 | order: "uniqueOrder",
|
17247 | status: "nonstandard",
|
17248 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-3dlight-color"
|
17249 | },
|
17250 | "-ms-scrollbar-arrow-color": {
|
17251 | syntax: "<color>",
|
17252 | media: "visual",
|
17253 | inherited: true,
|
17254 | animationType: "discrete",
|
17255 | percentages: "no",
|
17256 | groups: [
|
17257 | "Microsoft Extensions"
|
17258 | ],
|
17259 | initial: "ButtonText",
|
17260 | appliesto: "allElements",
|
17261 | computed: "asSpecified",
|
17262 | order: "uniqueOrder",
|
17263 | status: "nonstandard",
|
17264 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-arrow-color"
|
17265 | },
|
17266 | "-ms-scrollbar-base-color": {
|
17267 | syntax: "<color>",
|
17268 | media: "visual",
|
17269 | inherited: true,
|
17270 | animationType: "discrete",
|
17271 | percentages: "no",
|
17272 | groups: [
|
17273 | "Microsoft Extensions"
|
17274 | ],
|
17275 | initial: "dependsOnUserAgent",
|
17276 | appliesto: "allElements",
|
17277 | computed: "asSpecified",
|
17278 | order: "uniqueOrder",
|
17279 | status: "nonstandard",
|
17280 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-base-color"
|
17281 | },
|
17282 | "-ms-scrollbar-darkshadow-color": {
|
17283 | syntax: "<color>",
|
17284 | media: "visual",
|
17285 | inherited: true,
|
17286 | animationType: "discrete",
|
17287 | percentages: "no",
|
17288 | groups: [
|
17289 | "Microsoft Extensions"
|
17290 | ],
|
17291 | initial: "ThreeDDarkShadow",
|
17292 | appliesto: "allElements",
|
17293 | computed: "asSpecified",
|
17294 | order: "uniqueOrder",
|
17295 | status: "nonstandard",
|
17296 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-darkshadow-color"
|
17297 | },
|
17298 | "-ms-scrollbar-face-color": {
|
17299 | syntax: "<color>",
|
17300 | media: "visual",
|
17301 | inherited: true,
|
17302 | animationType: "discrete",
|
17303 | percentages: "no",
|
17304 | groups: [
|
17305 | "Microsoft Extensions"
|
17306 | ],
|
17307 | initial: "ThreeDFace",
|
17308 | appliesto: "allElements",
|
17309 | computed: "asSpecified",
|
17310 | order: "uniqueOrder",
|
17311 | status: "nonstandard",
|
17312 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-face-color"
|
17313 | },
|
17314 | "-ms-scrollbar-highlight-color": {
|
17315 | syntax: "<color>",
|
17316 | media: "visual",
|
17317 | inherited: true,
|
17318 | animationType: "discrete",
|
17319 | percentages: "no",
|
17320 | groups: [
|
17321 | "Microsoft Extensions"
|
17322 | ],
|
17323 | initial: "ThreeDHighlight",
|
17324 | appliesto: "allElements",
|
17325 | computed: "asSpecified",
|
17326 | order: "uniqueOrder",
|
17327 | status: "nonstandard",
|
17328 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-highlight-color"
|
17329 | },
|
17330 | "-ms-scrollbar-shadow-color": {
|
17331 | syntax: "<color>",
|
17332 | media: "visual",
|
17333 | inherited: true,
|
17334 | animationType: "discrete",
|
17335 | percentages: "no",
|
17336 | groups: [
|
17337 | "Microsoft Extensions"
|
17338 | ],
|
17339 | initial: "ThreeDDarkShadow",
|
17340 | appliesto: "allElements",
|
17341 | computed: "asSpecified",
|
17342 | order: "uniqueOrder",
|
17343 | status: "nonstandard",
|
17344 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-shadow-color"
|
17345 | },
|
17346 | "-ms-scrollbar-track-color": {
|
17347 | syntax: "<color>",
|
17348 | media: "visual",
|
17349 | inherited: true,
|
17350 | animationType: "discrete",
|
17351 | percentages: "no",
|
17352 | groups: [
|
17353 | "Microsoft Extensions"
|
17354 | ],
|
17355 | initial: "Scrollbar",
|
17356 | appliesto: "allElements",
|
17357 | computed: "asSpecified",
|
17358 | order: "uniqueOrder",
|
17359 | status: "nonstandard",
|
17360 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
|
17361 | },
|
17362 | "-ms-scroll-chaining": {
|
17363 | syntax: "chained | none",
|
17364 | media: "interactive",
|
17365 | inherited: false,
|
17366 | animationType: "discrete",
|
17367 | percentages: "no",
|
17368 | groups: [
|
17369 | "Microsoft Extensions"
|
17370 | ],
|
17371 | initial: "chained",
|
17372 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17373 | computed: "asSpecified",
|
17374 | order: "uniqueOrder",
|
17375 | status: "nonstandard",
|
17376 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-chaining"
|
17377 | },
|
17378 | "-ms-scroll-limit": {
|
17379 | syntax: "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
|
17380 | media: "interactive",
|
17381 | inherited: false,
|
17382 | animationType: "discrete",
|
17383 | percentages: "no",
|
17384 | groups: [
|
17385 | "Microsoft Extensions"
|
17386 | ],
|
17387 | initial: [
|
17388 | "-ms-scroll-limit-x-min",
|
17389 | "-ms-scroll-limit-y-min",
|
17390 | "-ms-scroll-limit-x-max",
|
17391 | "-ms-scroll-limit-y-max"
|
17392 | ],
|
17393 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17394 | computed: [
|
17395 | "-ms-scroll-limit-x-min",
|
17396 | "-ms-scroll-limit-y-min",
|
17397 | "-ms-scroll-limit-x-max",
|
17398 | "-ms-scroll-limit-y-max"
|
17399 | ],
|
17400 | order: "uniqueOrder",
|
17401 | status: "nonstandard",
|
17402 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit"
|
17403 | },
|
17404 | "-ms-scroll-limit-x-max": {
|
17405 | syntax: "auto | <length>",
|
17406 | media: "interactive",
|
17407 | inherited: false,
|
17408 | animationType: "discrete",
|
17409 | percentages: "no",
|
17410 | groups: [
|
17411 | "Microsoft Extensions"
|
17412 | ],
|
17413 | initial: "auto",
|
17414 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17415 | computed: "asSpecified",
|
17416 | order: "uniqueOrder",
|
17417 | status: "nonstandard",
|
17418 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-max"
|
17419 | },
|
17420 | "-ms-scroll-limit-x-min": {
|
17421 | syntax: "<length>",
|
17422 | media: "interactive",
|
17423 | inherited: false,
|
17424 | animationType: "discrete",
|
17425 | percentages: "no",
|
17426 | groups: [
|
17427 | "Microsoft Extensions"
|
17428 | ],
|
17429 | initial: "0",
|
17430 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17431 | computed: "asSpecified",
|
17432 | order: "uniqueOrder",
|
17433 | status: "nonstandard",
|
17434 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-min"
|
17435 | },
|
17436 | "-ms-scroll-limit-y-max": {
|
17437 | syntax: "auto | <length>",
|
17438 | media: "interactive",
|
17439 | inherited: false,
|
17440 | animationType: "discrete",
|
17441 | percentages: "no",
|
17442 | groups: [
|
17443 | "Microsoft Extensions"
|
17444 | ],
|
17445 | initial: "auto",
|
17446 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17447 | computed: "asSpecified",
|
17448 | order: "uniqueOrder",
|
17449 | status: "nonstandard",
|
17450 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-max"
|
17451 | },
|
17452 | "-ms-scroll-limit-y-min": {
|
17453 | syntax: "<length>",
|
17454 | media: "interactive",
|
17455 | inherited: false,
|
17456 | animationType: "discrete",
|
17457 | percentages: "no",
|
17458 | groups: [
|
17459 | "Microsoft Extensions"
|
17460 | ],
|
17461 | initial: "0",
|
17462 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17463 | computed: "asSpecified",
|
17464 | order: "uniqueOrder",
|
17465 | status: "nonstandard",
|
17466 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-min"
|
17467 | },
|
17468 | "-ms-scroll-rails": {
|
17469 | syntax: "none | railed",
|
17470 | media: "interactive",
|
17471 | inherited: false,
|
17472 | animationType: "discrete",
|
17473 | percentages: "no",
|
17474 | groups: [
|
17475 | "Microsoft Extensions"
|
17476 | ],
|
17477 | initial: "railed",
|
17478 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17479 | computed: "asSpecified",
|
17480 | order: "uniqueOrder",
|
17481 | status: "nonstandard",
|
17482 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-rails"
|
17483 | },
|
17484 | "-ms-scroll-snap-points-x": {
|
17485 | syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
|
17486 | media: "interactive",
|
17487 | inherited: false,
|
17488 | animationType: "discrete",
|
17489 | percentages: "no",
|
17490 | groups: [
|
17491 | "Microsoft Extensions"
|
17492 | ],
|
17493 | initial: "snapInterval(0px, 100%)",
|
17494 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17495 | computed: "asSpecified",
|
17496 | order: "uniqueOrder",
|
17497 | status: "nonstandard",
|
17498 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-x"
|
17499 | },
|
17500 | "-ms-scroll-snap-points-y": {
|
17501 | syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
|
17502 | media: "interactive",
|
17503 | inherited: false,
|
17504 | animationType: "discrete",
|
17505 | percentages: "no",
|
17506 | groups: [
|
17507 | "Microsoft Extensions"
|
17508 | ],
|
17509 | initial: "snapInterval(0px, 100%)",
|
17510 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17511 | computed: "asSpecified",
|
17512 | order: "uniqueOrder",
|
17513 | status: "nonstandard",
|
17514 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-y"
|
17515 | },
|
17516 | "-ms-scroll-snap-type": {
|
17517 | syntax: "none | proximity | mandatory",
|
17518 | media: "interactive",
|
17519 | inherited: false,
|
17520 | animationType: "discrete",
|
17521 | percentages: "no",
|
17522 | groups: [
|
17523 | "Microsoft Extensions"
|
17524 | ],
|
17525 | initial: "none",
|
17526 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17527 | computed: "asSpecified",
|
17528 | order: "uniqueOrder",
|
17529 | status: "nonstandard",
|
17530 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-type"
|
17531 | },
|
17532 | "-ms-scroll-snap-x": {
|
17533 | syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
|
17534 | media: "interactive",
|
17535 | inherited: false,
|
17536 | animationType: "discrete",
|
17537 | percentages: "no",
|
17538 | groups: [
|
17539 | "Microsoft Extensions"
|
17540 | ],
|
17541 | initial: [
|
17542 | "-ms-scroll-snap-type",
|
17543 | "-ms-scroll-snap-points-x"
|
17544 | ],
|
17545 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17546 | computed: [
|
17547 | "-ms-scroll-snap-type",
|
17548 | "-ms-scroll-snap-points-x"
|
17549 | ],
|
17550 | order: "uniqueOrder",
|
17551 | status: "nonstandard",
|
17552 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-x"
|
17553 | },
|
17554 | "-ms-scroll-snap-y": {
|
17555 | syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
|
17556 | media: "interactive",
|
17557 | inherited: false,
|
17558 | animationType: "discrete",
|
17559 | percentages: "no",
|
17560 | groups: [
|
17561 | "Microsoft Extensions"
|
17562 | ],
|
17563 | initial: [
|
17564 | "-ms-scroll-snap-type",
|
17565 | "-ms-scroll-snap-points-y"
|
17566 | ],
|
17567 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
17568 | computed: [
|
17569 | "-ms-scroll-snap-type",
|
17570 | "-ms-scroll-snap-points-y"
|
17571 | ],
|
17572 | order: "uniqueOrder",
|
17573 | status: "nonstandard",
|
17574 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-y"
|
17575 | },
|
17576 | "-ms-scroll-translation": {
|
17577 | syntax: "none | vertical-to-horizontal",
|
17578 | media: "interactive",
|
17579 | inherited: true,
|
17580 | animationType: "discrete",
|
17581 | percentages: "no",
|
17582 | groups: [
|
17583 | "Microsoft Extensions"
|
17584 | ],
|
17585 | initial: "none",
|
17586 | appliesto: "allElements",
|
17587 | computed: "asSpecified",
|
17588 | order: "uniqueOrder",
|
17589 | status: "nonstandard",
|
17590 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-translation"
|
17591 | },
|
17592 | "-ms-text-autospace": {
|
17593 | syntax: "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
|
17594 | media: "visual",
|
17595 | inherited: false,
|
17596 | animationType: "discrete",
|
17597 | percentages: "no",
|
17598 | groups: [
|
17599 | "Microsoft Extensions"
|
17600 | ],
|
17601 | initial: "none",
|
17602 | appliesto: "allElements",
|
17603 | computed: "asSpecified",
|
17604 | order: "uniqueOrder",
|
17605 | status: "nonstandard",
|
17606 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-text-autospace"
|
17607 | },
|
17608 | "-ms-touch-select": {
|
17609 | syntax: "grippers | none",
|
17610 | media: "interactive",
|
17611 | inherited: true,
|
17612 | animationType: "discrete",
|
17613 | percentages: "no",
|
17614 | groups: [
|
17615 | "Microsoft Extensions"
|
17616 | ],
|
17617 | initial: "grippers",
|
17618 | appliesto: "allElements",
|
17619 | computed: "asSpecified",
|
17620 | order: "uniqueOrder",
|
17621 | status: "nonstandard",
|
17622 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-touch-select"
|
17623 | },
|
17624 | "-ms-user-select": {
|
17625 | syntax: "none | element | text",
|
17626 | media: "interactive",
|
17627 | inherited: false,
|
17628 | animationType: "discrete",
|
17629 | percentages: "no",
|
17630 | groups: [
|
17631 | "Microsoft Extensions"
|
17632 | ],
|
17633 | initial: "text",
|
17634 | appliesto: "nonReplacedElements",
|
17635 | computed: "asSpecified",
|
17636 | order: "uniqueOrder",
|
17637 | status: "nonstandard",
|
17638 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-user-select"
|
17639 | },
|
17640 | "-ms-wrap-flow": {
|
17641 | syntax: "auto | both | start | end | maximum | clear",
|
17642 | media: "visual",
|
17643 | inherited: false,
|
17644 | animationType: "discrete",
|
17645 | percentages: "no",
|
17646 | groups: [
|
17647 | "Microsoft Extensions"
|
17648 | ],
|
17649 | initial: "auto",
|
17650 | appliesto: "blockLevelElements",
|
17651 | computed: "asSpecified",
|
17652 | order: "uniqueOrder",
|
17653 | status: "nonstandard",
|
17654 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-flow"
|
17655 | },
|
17656 | "-ms-wrap-margin": {
|
17657 | syntax: "<length>",
|
17658 | media: "visual",
|
17659 | inherited: false,
|
17660 | animationType: "discrete",
|
17661 | percentages: "no",
|
17662 | groups: [
|
17663 | "Microsoft Extensions"
|
17664 | ],
|
17665 | initial: "0",
|
17666 | appliesto: "exclusionElements",
|
17667 | computed: "asSpecified",
|
17668 | order: "uniqueOrder",
|
17669 | status: "nonstandard",
|
17670 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-margin"
|
17671 | },
|
17672 | "-ms-wrap-through": {
|
17673 | syntax: "wrap | none",
|
17674 | media: "visual",
|
17675 | inherited: false,
|
17676 | animationType: "discrete",
|
17677 | percentages: "no",
|
17678 | groups: [
|
17679 | "Microsoft Extensions"
|
17680 | ],
|
17681 | initial: "wrap",
|
17682 | appliesto: "blockLevelElements",
|
17683 | computed: "asSpecified",
|
17684 | order: "uniqueOrder",
|
17685 | status: "nonstandard",
|
17686 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-through"
|
17687 | },
|
17688 | "-moz-appearance": {
|
17689 | syntax: "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
|
17690 | media: "visual",
|
17691 | inherited: false,
|
17692 | animationType: "discrete",
|
17693 | percentages: "no",
|
17694 | groups: [
|
17695 | "Mozilla Extensions",
|
17696 | "WebKit Extensions"
|
17697 | ],
|
17698 | initial: "noneButOverriddenInUserAgentCSS",
|
17699 | appliesto: "allElements",
|
17700 | computed: "asSpecified",
|
17701 | order: "uniqueOrder",
|
17702 | status: "nonstandard",
|
17703 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
|
17704 | },
|
17705 | "-moz-binding": {
|
17706 | syntax: "<url> | none",
|
17707 | media: "visual",
|
17708 | inherited: false,
|
17709 | animationType: "discrete",
|
17710 | percentages: "no",
|
17711 | groups: [
|
17712 | "Mozilla Extensions"
|
17713 | ],
|
17714 | initial: "none",
|
17715 | appliesto: "allElementsExceptGeneratedContentOrPseudoElements",
|
17716 | computed: "asSpecified",
|
17717 | order: "uniqueOrder",
|
17718 | status: "nonstandard",
|
17719 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
|
17720 | },
|
17721 | "-moz-border-bottom-colors": {
|
17722 | syntax: "<color>+ | none",
|
17723 | media: "visual",
|
17724 | inherited: false,
|
17725 | animationType: "discrete",
|
17726 | percentages: "no",
|
17727 | groups: [
|
17728 | "Mozilla Extensions"
|
17729 | ],
|
17730 | initial: "none",
|
17731 | appliesto: "allElements",
|
17732 | computed: "asSpecified",
|
17733 | order: "uniqueOrder",
|
17734 | status: "nonstandard",
|
17735 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"
|
17736 | },
|
17737 | "-moz-border-left-colors": {
|
17738 | syntax: "<color>+ | none",
|
17739 | media: "visual",
|
17740 | inherited: false,
|
17741 | animationType: "discrete",
|
17742 | percentages: "no",
|
17743 | groups: [
|
17744 | "Mozilla Extensions"
|
17745 | ],
|
17746 | initial: "none",
|
17747 | appliesto: "allElements",
|
17748 | computed: "asSpecified",
|
17749 | order: "uniqueOrder",
|
17750 | status: "nonstandard",
|
17751 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"
|
17752 | },
|
17753 | "-moz-border-right-colors": {
|
17754 | syntax: "<color>+ | none",
|
17755 | media: "visual",
|
17756 | inherited: false,
|
17757 | animationType: "discrete",
|
17758 | percentages: "no",
|
17759 | groups: [
|
17760 | "Mozilla Extensions"
|
17761 | ],
|
17762 | initial: "none",
|
17763 | appliesto: "allElements",
|
17764 | computed: "asSpecified",
|
17765 | order: "uniqueOrder",
|
17766 | status: "nonstandard",
|
17767 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"
|
17768 | },
|
17769 | "-moz-border-top-colors": {
|
17770 | syntax: "<color>+ | none",
|
17771 | media: "visual",
|
17772 | inherited: false,
|
17773 | animationType: "discrete",
|
17774 | percentages: "no",
|
17775 | groups: [
|
17776 | "Mozilla Extensions"
|
17777 | ],
|
17778 | initial: "none",
|
17779 | appliesto: "allElements",
|
17780 | computed: "asSpecified",
|
17781 | order: "uniqueOrder",
|
17782 | status: "nonstandard",
|
17783 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"
|
17784 | },
|
17785 | "-moz-context-properties": {
|
17786 | syntax: "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
|
17787 | media: "visual",
|
17788 | inherited: true,
|
17789 | animationType: "discrete",
|
17790 | percentages: "no",
|
17791 | groups: [
|
17792 | "Mozilla Extensions"
|
17793 | ],
|
17794 | initial: "none",
|
17795 | appliesto: "allElementsThatCanReferenceImages",
|
17796 | computed: "asSpecified",
|
17797 | order: "uniqueOrder",
|
17798 | status: "nonstandard",
|
17799 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
|
17800 | },
|
17801 | "-moz-float-edge": {
|
17802 | syntax: "border-box | content-box | margin-box | padding-box",
|
17803 | media: "visual",
|
17804 | inherited: false,
|
17805 | animationType: "discrete",
|
17806 | percentages: "no",
|
17807 | groups: [
|
17808 | "Mozilla Extensions"
|
17809 | ],
|
17810 | initial: "content-box",
|
17811 | appliesto: "allElements",
|
17812 | computed: "asSpecified",
|
17813 | order: "uniqueOrder",
|
17814 | status: "nonstandard",
|
17815 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
|
17816 | },
|
17817 | "-moz-force-broken-image-icon": {
|
17818 | syntax: "<integer [0,1]>",
|
17819 | media: "visual",
|
17820 | inherited: false,
|
17821 | animationType: "discrete",
|
17822 | percentages: "no",
|
17823 | groups: [
|
17824 | "Mozilla Extensions"
|
17825 | ],
|
17826 | initial: "0",
|
17827 | appliesto: "images",
|
17828 | computed: "asSpecified",
|
17829 | order: "uniqueOrder",
|
17830 | status: "nonstandard",
|
17831 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
|
17832 | },
|
17833 | "-moz-image-region": {
|
17834 | syntax: "<shape> | auto",
|
17835 | media: "visual",
|
17836 | inherited: true,
|
17837 | animationType: "discrete",
|
17838 | percentages: "no",
|
17839 | groups: [
|
17840 | "Mozilla Extensions"
|
17841 | ],
|
17842 | initial: "auto",
|
17843 | appliesto: "xulImageElements",
|
17844 | computed: "asSpecified",
|
17845 | order: "uniqueOrder",
|
17846 | status: "nonstandard",
|
17847 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
|
17848 | },
|
17849 | "-moz-orient": {
|
17850 | syntax: "inline | block | horizontal | vertical",
|
17851 | media: "visual",
|
17852 | inherited: false,
|
17853 | animationType: "discrete",
|
17854 | percentages: "no",
|
17855 | groups: [
|
17856 | "Mozilla Extensions"
|
17857 | ],
|
17858 | initial: "inline",
|
17859 | appliesto: "anyElementEffectOnProgressAndMeter",
|
17860 | computed: "asSpecified",
|
17861 | order: "uniqueOrder",
|
17862 | status: "nonstandard",
|
17863 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
|
17864 | },
|
17865 | "-moz-outline-radius": {
|
17866 | syntax: "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
|
17867 | media: "visual",
|
17868 | inherited: false,
|
17869 | animationType: [
|
17870 | "-moz-outline-radius-topleft",
|
17871 | "-moz-outline-radius-topright",
|
17872 | "-moz-outline-radius-bottomright",
|
17873 | "-moz-outline-radius-bottomleft"
|
17874 | ],
|
17875 | percentages: [
|
17876 | "-moz-outline-radius-topleft",
|
17877 | "-moz-outline-radius-topright",
|
17878 | "-moz-outline-radius-bottomright",
|
17879 | "-moz-outline-radius-bottomleft"
|
17880 | ],
|
17881 | groups: [
|
17882 | "Mozilla Extensions"
|
17883 | ],
|
17884 | initial: [
|
17885 | "-moz-outline-radius-topleft",
|
17886 | "-moz-outline-radius-topright",
|
17887 | "-moz-outline-radius-bottomright",
|
17888 | "-moz-outline-radius-bottomleft"
|
17889 | ],
|
17890 | appliesto: "allElements",
|
17891 | computed: [
|
17892 | "-moz-outline-radius-topleft",
|
17893 | "-moz-outline-radius-topright",
|
17894 | "-moz-outline-radius-bottomright",
|
17895 | "-moz-outline-radius-bottomleft"
|
17896 | ],
|
17897 | order: "uniqueOrder",
|
17898 | status: "nonstandard",
|
17899 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
|
17900 | },
|
17901 | "-moz-outline-radius-bottomleft": {
|
17902 | syntax: "<outline-radius>",
|
17903 | media: "visual",
|
17904 | inherited: false,
|
17905 | animationType: "lpc",
|
17906 | percentages: "referToDimensionOfBorderBox",
|
17907 | groups: [
|
17908 | "Mozilla Extensions"
|
17909 | ],
|
17910 | initial: "0",
|
17911 | appliesto: "allElements",
|
17912 | computed: "asSpecified",
|
17913 | order: "uniqueOrder",
|
17914 | status: "nonstandard",
|
17915 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"
|
17916 | },
|
17917 | "-moz-outline-radius-bottomright": {
|
17918 | syntax: "<outline-radius>",
|
17919 | media: "visual",
|
17920 | inherited: false,
|
17921 | animationType: "lpc",
|
17922 | percentages: "referToDimensionOfBorderBox",
|
17923 | groups: [
|
17924 | "Mozilla Extensions"
|
17925 | ],
|
17926 | initial: "0",
|
17927 | appliesto: "allElements",
|
17928 | computed: "asSpecified",
|
17929 | order: "uniqueOrder",
|
17930 | status: "nonstandard",
|
17931 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"
|
17932 | },
|
17933 | "-moz-outline-radius-topleft": {
|
17934 | syntax: "<outline-radius>",
|
17935 | media: "visual",
|
17936 | inherited: false,
|
17937 | animationType: "lpc",
|
17938 | percentages: "referToDimensionOfBorderBox",
|
17939 | groups: [
|
17940 | "Mozilla Extensions"
|
17941 | ],
|
17942 | initial: "0",
|
17943 | appliesto: "allElements",
|
17944 | computed: "asSpecified",
|
17945 | order: "uniqueOrder",
|
17946 | status: "nonstandard",
|
17947 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"
|
17948 | },
|
17949 | "-moz-outline-radius-topright": {
|
17950 | syntax: "<outline-radius>",
|
17951 | media: "visual",
|
17952 | inherited: false,
|
17953 | animationType: "lpc",
|
17954 | percentages: "referToDimensionOfBorderBox",
|
17955 | groups: [
|
17956 | "Mozilla Extensions"
|
17957 | ],
|
17958 | initial: "0",
|
17959 | appliesto: "allElements",
|
17960 | computed: "asSpecified",
|
17961 | order: "uniqueOrder",
|
17962 | status: "nonstandard",
|
17963 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"
|
17964 | },
|
17965 | "-moz-stack-sizing": {
|
17966 | syntax: "ignore | stretch-to-fit",
|
17967 | media: "visual",
|
17968 | inherited: true,
|
17969 | animationType: "discrete",
|
17970 | percentages: "no",
|
17971 | groups: [
|
17972 | "Mozilla Extensions"
|
17973 | ],
|
17974 | initial: "stretch-to-fit",
|
17975 | appliesto: "allElements",
|
17976 | computed: "asSpecified",
|
17977 | order: "uniqueOrder",
|
17978 | status: "nonstandard",
|
17979 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-stack-sizing"
|
17980 | },
|
17981 | "-moz-text-blink": {
|
17982 | syntax: "none | blink",
|
17983 | media: "visual",
|
17984 | inherited: false,
|
17985 | animationType: "discrete",
|
17986 | percentages: "no",
|
17987 | groups: [
|
17988 | "Mozilla Extensions"
|
17989 | ],
|
17990 | initial: "none",
|
17991 | appliesto: "allElements",
|
17992 | computed: "asSpecified",
|
17993 | order: "uniqueOrder",
|
17994 | status: "nonstandard",
|
17995 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"
|
17996 | },
|
17997 | "-moz-user-focus": {
|
17998 | syntax: "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
|
17999 | media: "interactive",
|
18000 | inherited: false,
|
18001 | animationType: "discrete",
|
18002 | percentages: "no",
|
18003 | groups: [
|
18004 | "Mozilla Extensions"
|
18005 | ],
|
18006 | initial: "none",
|
18007 | appliesto: "allElements",
|
18008 | computed: "asSpecified",
|
18009 | order: "uniqueOrder",
|
18010 | status: "nonstandard",
|
18011 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
|
18012 | },
|
18013 | "-moz-user-input": {
|
18014 | syntax: "auto | none | enabled | disabled",
|
18015 | media: "visual",
|
18016 | inherited: true,
|
18017 | animationType: "discrete",
|
18018 | percentages: "no",
|
18019 | groups: [
|
18020 | "Mozilla Extensions"
|
18021 | ],
|
18022 | initial: "auto",
|
18023 | appliesto: "allElements",
|
18024 | computed: "asSpecified",
|
18025 | order: "uniqueOrder",
|
18026 | status: "nonstandard",
|
18027 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
|
18028 | },
|
18029 | "-moz-user-modify": {
|
18030 | syntax: "read-only | read-write | write-only",
|
18031 | media: "interactive",
|
18032 | inherited: true,
|
18033 | animationType: "discrete",
|
18034 | percentages: "no",
|
18035 | groups: [
|
18036 | "Mozilla Extensions"
|
18037 | ],
|
18038 | initial: "read-only",
|
18039 | appliesto: "allElements",
|
18040 | computed: "asSpecified",
|
18041 | order: "uniqueOrder",
|
18042 | status: "nonstandard",
|
18043 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-modify"
|
18044 | },
|
18045 | "-moz-window-dragging": {
|
18046 | syntax: "drag | no-drag",
|
18047 | media: "visual",
|
18048 | inherited: false,
|
18049 | animationType: "discrete",
|
18050 | percentages: "no",
|
18051 | groups: [
|
18052 | "Mozilla Extensions"
|
18053 | ],
|
18054 | initial: "drag",
|
18055 | appliesto: "allElementsCreatingNativeWindows",
|
18056 | computed: "asSpecified",
|
18057 | order: "uniqueOrder",
|
18058 | status: "nonstandard",
|
18059 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-dragging"
|
18060 | },
|
18061 | "-moz-window-shadow": {
|
18062 | syntax: "default | menu | tooltip | sheet | none",
|
18063 | media: "visual",
|
18064 | inherited: false,
|
18065 | animationType: "discrete",
|
18066 | percentages: "no",
|
18067 | groups: [
|
18068 | "Mozilla Extensions"
|
18069 | ],
|
18070 | initial: "default",
|
18071 | appliesto: "allElementsCreatingNativeWindows",
|
18072 | computed: "asSpecified",
|
18073 | order: "uniqueOrder",
|
18074 | status: "nonstandard",
|
18075 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
|
18076 | },
|
18077 | "-webkit-appearance": {
|
18078 | syntax: "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button",
|
18079 | media: "visual",
|
18080 | inherited: false,
|
18081 | animationType: "discrete",
|
18082 | percentages: "no",
|
18083 | groups: [
|
18084 | "WebKit Extensions"
|
18085 | ],
|
18086 | initial: "noneButOverriddenInUserAgentCSS",
|
18087 | appliesto: "allElements",
|
18088 | computed: "asSpecified",
|
18089 | order: "uniqueOrder",
|
18090 | status: "nonstandard",
|
18091 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
|
18092 | },
|
18093 | "-webkit-border-before": {
|
18094 | syntax: "<'border-width'> || <'border-style'> || <'color'>",
|
18095 | media: "visual",
|
18096 | inherited: true,
|
18097 | animationType: "discrete",
|
18098 | percentages: [
|
18099 | "-webkit-border-before-width"
|
18100 | ],
|
18101 | groups: [
|
18102 | "WebKit Extensions"
|
18103 | ],
|
18104 | initial: [
|
18105 | "border-width",
|
18106 | "border-style",
|
18107 | "color"
|
18108 | ],
|
18109 | appliesto: "allElements",
|
18110 | computed: [
|
18111 | "border-width",
|
18112 | "border-style",
|
18113 | "color"
|
18114 | ],
|
18115 | order: "uniqueOrder",
|
18116 | status: "nonstandard",
|
18117 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
|
18118 | },
|
18119 | "-webkit-border-before-color": {
|
18120 | syntax: "<'color'>",
|
18121 | media: "visual",
|
18122 | inherited: true,
|
18123 | animationType: "discrete",
|
18124 | percentages: "no",
|
18125 | groups: [
|
18126 | "WebKit Extensions"
|
18127 | ],
|
18128 | initial: "currentcolor",
|
18129 | appliesto: "allElements",
|
18130 | computed: "computedColor",
|
18131 | order: "uniqueOrder",
|
18132 | status: "nonstandard"
|
18133 | },
|
18134 | "-webkit-border-before-style": {
|
18135 | syntax: "<'border-style'>",
|
18136 | media: "visual",
|
18137 | inherited: true,
|
18138 | animationType: "discrete",
|
18139 | percentages: "no",
|
18140 | groups: [
|
18141 | "WebKit Extensions"
|
18142 | ],
|
18143 | initial: "none",
|
18144 | appliesto: "allElements",
|
18145 | computed: "asSpecified",
|
18146 | order: "uniqueOrder",
|
18147 | status: "nonstandard"
|
18148 | },
|
18149 | "-webkit-border-before-width": {
|
18150 | syntax: "<'border-width'>",
|
18151 | media: "visual",
|
18152 | inherited: true,
|
18153 | animationType: "discrete",
|
18154 | percentages: "logicalWidthOfContainingBlock",
|
18155 | groups: [
|
18156 | "WebKit Extensions"
|
18157 | ],
|
18158 | initial: "medium",
|
18159 | appliesto: "allElements",
|
18160 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
18161 | order: "uniqueOrder",
|
18162 | status: "nonstandard"
|
18163 | },
|
18164 | "-webkit-box-reflect": {
|
18165 | syntax: "[ above | below | right | left ]? <length>? <image>?",
|
18166 | media: "visual",
|
18167 | inherited: false,
|
18168 | animationType: "discrete",
|
18169 | percentages: "no",
|
18170 | groups: [
|
18171 | "WebKit Extensions"
|
18172 | ],
|
18173 | initial: "none",
|
18174 | appliesto: "allElements",
|
18175 | computed: "asSpecified",
|
18176 | order: "uniqueOrder",
|
18177 | status: "nonstandard",
|
18178 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
|
18179 | },
|
18180 | "-webkit-line-clamp": {
|
18181 | syntax: "none | <integer>",
|
18182 | media: "visual",
|
18183 | inherited: false,
|
18184 | animationType: "byComputedValueType",
|
18185 | percentages: "no",
|
18186 | groups: [
|
18187 | "WebKit Extensions",
|
18188 | "CSS Overflow"
|
18189 | ],
|
18190 | initial: "none",
|
18191 | appliesto: "allElements",
|
18192 | computed: "asSpecified",
|
18193 | order: "uniqueOrder",
|
18194 | status: "standard",
|
18195 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
|
18196 | },
|
18197 | "-webkit-mask": {
|
18198 | syntax: "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
|
18199 | media: "visual",
|
18200 | inherited: false,
|
18201 | animationType: "discrete",
|
18202 | percentages: "no",
|
18203 | groups: [
|
18204 | "WebKit Extensions"
|
18205 | ],
|
18206 | initial: [
|
18207 | "-webkit-mask-image",
|
18208 | "-webkit-mask-repeat",
|
18209 | "-webkit-mask-attachment",
|
18210 | "-webkit-mask-position",
|
18211 | "-webkit-mask-origin",
|
18212 | "-webkit-mask-clip"
|
18213 | ],
|
18214 | appliesto: "allElements",
|
18215 | computed: [
|
18216 | "-webkit-mask-image",
|
18217 | "-webkit-mask-repeat",
|
18218 | "-webkit-mask-attachment",
|
18219 | "-webkit-mask-position",
|
18220 | "-webkit-mask-origin",
|
18221 | "-webkit-mask-clip"
|
18222 | ],
|
18223 | order: "uniqueOrder",
|
18224 | status: "nonstandard",
|
18225 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
|
18226 | },
|
18227 | "-webkit-mask-attachment": {
|
18228 | syntax: "<attachment>#",
|
18229 | media: "visual",
|
18230 | inherited: false,
|
18231 | animationType: "discrete",
|
18232 | percentages: "no",
|
18233 | groups: [
|
18234 | "WebKit Extensions"
|
18235 | ],
|
18236 | initial: "scroll",
|
18237 | appliesto: "allElements",
|
18238 | computed: "asSpecified",
|
18239 | order: "orderOfAppearance",
|
18240 | status: "nonstandard",
|
18241 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
|
18242 | },
|
18243 | "-webkit-mask-clip": {
|
18244 | syntax: "[ <box> | border | padding | content | text ]#",
|
18245 | media: "visual",
|
18246 | inherited: false,
|
18247 | animationType: "discrete",
|
18248 | percentages: "no",
|
18249 | groups: [
|
18250 | "WebKit Extensions"
|
18251 | ],
|
18252 | initial: "border",
|
18253 | appliesto: "allElements",
|
18254 | computed: "asSpecified",
|
18255 | order: "orderOfAppearance",
|
18256 | status: "nonstandard",
|
18257 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
|
18258 | },
|
18259 | "-webkit-mask-composite": {
|
18260 | syntax: "<composite-style>#",
|
18261 | media: "visual",
|
18262 | inherited: false,
|
18263 | animationType: "discrete",
|
18264 | percentages: "no",
|
18265 | groups: [
|
18266 | "WebKit Extensions"
|
18267 | ],
|
18268 | initial: "source-over",
|
18269 | appliesto: "allElements",
|
18270 | computed: "asSpecified",
|
18271 | order: "orderOfAppearance",
|
18272 | status: "nonstandard",
|
18273 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
|
18274 | },
|
18275 | "-webkit-mask-image": {
|
18276 | syntax: "<mask-reference>#",
|
18277 | media: "visual",
|
18278 | inherited: false,
|
18279 | animationType: "discrete",
|
18280 | percentages: "no",
|
18281 | groups: [
|
18282 | "WebKit Extensions"
|
18283 | ],
|
18284 | initial: "none",
|
18285 | appliesto: "allElements",
|
18286 | computed: "absoluteURIOrNone",
|
18287 | order: "orderOfAppearance",
|
18288 | status: "nonstandard",
|
18289 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
|
18290 | },
|
18291 | "-webkit-mask-origin": {
|
18292 | syntax: "[ <box> | border | padding | content ]#",
|
18293 | media: "visual",
|
18294 | inherited: false,
|
18295 | animationType: "discrete",
|
18296 | percentages: "no",
|
18297 | groups: [
|
18298 | "WebKit Extensions"
|
18299 | ],
|
18300 | initial: "padding",
|
18301 | appliesto: "allElements",
|
18302 | computed: "asSpecified",
|
18303 | order: "orderOfAppearance",
|
18304 | status: "nonstandard",
|
18305 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
|
18306 | },
|
18307 | "-webkit-mask-position": {
|
18308 | syntax: "<position>#",
|
18309 | media: "visual",
|
18310 | inherited: false,
|
18311 | animationType: "discrete",
|
18312 | percentages: "referToSizeOfElement",
|
18313 | groups: [
|
18314 | "WebKit Extensions"
|
18315 | ],
|
18316 | initial: "0% 0%",
|
18317 | appliesto: "allElements",
|
18318 | computed: "absoluteLengthOrPercentage",
|
18319 | order: "orderOfAppearance",
|
18320 | status: "nonstandard",
|
18321 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
|
18322 | },
|
18323 | "-webkit-mask-position-x": {
|
18324 | syntax: "[ <length-percentage> | left | center | right ]#",
|
18325 | media: "visual",
|
18326 | inherited: false,
|
18327 | animationType: "discrete",
|
18328 | percentages: "referToSizeOfElement",
|
18329 | groups: [
|
18330 | "WebKit Extensions"
|
18331 | ],
|
18332 | initial: "0%",
|
18333 | appliesto: "allElements",
|
18334 | computed: "absoluteLengthOrPercentage",
|
18335 | order: "orderOfAppearance",
|
18336 | status: "nonstandard",
|
18337 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
|
18338 | },
|
18339 | "-webkit-mask-position-y": {
|
18340 | syntax: "[ <length-percentage> | top | center | bottom ]#",
|
18341 | media: "visual",
|
18342 | inherited: false,
|
18343 | animationType: "discrete",
|
18344 | percentages: "referToSizeOfElement",
|
18345 | groups: [
|
18346 | "WebKit Extensions"
|
18347 | ],
|
18348 | initial: "0%",
|
18349 | appliesto: "allElements",
|
18350 | computed: "absoluteLengthOrPercentage",
|
18351 | order: "orderOfAppearance",
|
18352 | status: "nonstandard",
|
18353 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
|
18354 | },
|
18355 | "-webkit-mask-repeat": {
|
18356 | syntax: "<repeat-style>#",
|
18357 | media: "visual",
|
18358 | inherited: false,
|
18359 | animationType: "discrete",
|
18360 | percentages: "no",
|
18361 | groups: [
|
18362 | "WebKit Extensions"
|
18363 | ],
|
18364 | initial: "repeat",
|
18365 | appliesto: "allElements",
|
18366 | computed: "asSpecified",
|
18367 | order: "orderOfAppearance",
|
18368 | status: "nonstandard",
|
18369 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
|
18370 | },
|
18371 | "-webkit-mask-repeat-x": {
|
18372 | syntax: "repeat | no-repeat | space | round",
|
18373 | media: "visual",
|
18374 | inherited: false,
|
18375 | animationType: "discrete",
|
18376 | percentages: "no",
|
18377 | groups: [
|
18378 | "WebKit Extensions"
|
18379 | ],
|
18380 | initial: "repeat",
|
18381 | appliesto: "allElements",
|
18382 | computed: "asSpecified",
|
18383 | order: "orderOfAppearance",
|
18384 | status: "nonstandard",
|
18385 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
|
18386 | },
|
18387 | "-webkit-mask-repeat-y": {
|
18388 | syntax: "repeat | no-repeat | space | round",
|
18389 | media: "visual",
|
18390 | inherited: false,
|
18391 | animationType: "discrete",
|
18392 | percentages: "no",
|
18393 | groups: [
|
18394 | "WebKit Extensions"
|
18395 | ],
|
18396 | initial: "repeat",
|
18397 | appliesto: "allElements",
|
18398 | computed: "absoluteLengthOrPercentage",
|
18399 | order: "orderOfAppearance",
|
18400 | status: "nonstandard",
|
18401 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
|
18402 | },
|
18403 | "-webkit-mask-size": {
|
18404 | syntax: "<bg-size>#",
|
18405 | media: "visual",
|
18406 | inherited: false,
|
18407 | animationType: "discrete",
|
18408 | percentages: "relativeToBackgroundPositioningArea",
|
18409 | groups: [
|
18410 | "WebKit Extensions"
|
18411 | ],
|
18412 | initial: "auto auto",
|
18413 | appliesto: "allElements",
|
18414 | computed: "asSpecified",
|
18415 | order: "orderOfAppearance",
|
18416 | status: "nonstandard",
|
18417 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
|
18418 | },
|
18419 | "-webkit-overflow-scrolling": {
|
18420 | syntax: "auto | touch",
|
18421 | media: "visual",
|
18422 | inherited: true,
|
18423 | animationType: "discrete",
|
18424 | percentages: "no",
|
18425 | groups: [
|
18426 | "WebKit Extensions"
|
18427 | ],
|
18428 | initial: "auto",
|
18429 | appliesto: "scrollingBoxes",
|
18430 | computed: "asSpecified",
|
18431 | order: "orderOfAppearance",
|
18432 | status: "nonstandard",
|
18433 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
|
18434 | },
|
18435 | "-webkit-tap-highlight-color": {
|
18436 | syntax: "<color>",
|
18437 | media: "visual",
|
18438 | inherited: false,
|
18439 | animationType: "discrete",
|
18440 | percentages: "no",
|
18441 | groups: [
|
18442 | "WebKit Extensions"
|
18443 | ],
|
18444 | initial: "black",
|
18445 | appliesto: "allElements",
|
18446 | computed: "asSpecified",
|
18447 | order: "uniqueOrder",
|
18448 | status: "nonstandard",
|
18449 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
|
18450 | },
|
18451 | "-webkit-text-fill-color": {
|
18452 | syntax: "<color>",
|
18453 | media: "visual",
|
18454 | inherited: true,
|
18455 | animationType: "color",
|
18456 | percentages: "no",
|
18457 | groups: [
|
18458 | "WebKit Extensions"
|
18459 | ],
|
18460 | initial: "currentcolor",
|
18461 | appliesto: "allElements",
|
18462 | computed: "computedColor",
|
18463 | order: "uniqueOrder",
|
18464 | status: "nonstandard",
|
18465 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
|
18466 | },
|
18467 | "-webkit-text-stroke": {
|
18468 | syntax: "<length> || <color>",
|
18469 | media: "visual",
|
18470 | inherited: true,
|
18471 | animationType: [
|
18472 | "-webkit-text-stroke-width",
|
18473 | "-webkit-text-stroke-color"
|
18474 | ],
|
18475 | percentages: "no",
|
18476 | groups: [
|
18477 | "WebKit Extensions"
|
18478 | ],
|
18479 | initial: [
|
18480 | "-webkit-text-stroke-width",
|
18481 | "-webkit-text-stroke-color"
|
18482 | ],
|
18483 | appliesto: "allElements",
|
18484 | computed: [
|
18485 | "-webkit-text-stroke-width",
|
18486 | "-webkit-text-stroke-color"
|
18487 | ],
|
18488 | order: "canonicalOrder",
|
18489 | status: "nonstandard",
|
18490 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
|
18491 | },
|
18492 | "-webkit-text-stroke-color": {
|
18493 | syntax: "<color>",
|
18494 | media: "visual",
|
18495 | inherited: true,
|
18496 | animationType: "color",
|
18497 | percentages: "no",
|
18498 | groups: [
|
18499 | "WebKit Extensions"
|
18500 | ],
|
18501 | initial: "currentcolor",
|
18502 | appliesto: "allElements",
|
18503 | computed: "computedColor",
|
18504 | order: "uniqueOrder",
|
18505 | status: "nonstandard",
|
18506 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
|
18507 | },
|
18508 | "-webkit-text-stroke-width": {
|
18509 | syntax: "<length>",
|
18510 | media: "visual",
|
18511 | inherited: true,
|
18512 | animationType: "discrete",
|
18513 | percentages: "no",
|
18514 | groups: [
|
18515 | "WebKit Extensions"
|
18516 | ],
|
18517 | initial: "0",
|
18518 | appliesto: "allElements",
|
18519 | computed: "absoluteLength",
|
18520 | order: "uniqueOrder",
|
18521 | status: "nonstandard",
|
18522 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
|
18523 | },
|
18524 | "-webkit-touch-callout": {
|
18525 | syntax: "default | none",
|
18526 | media: "visual",
|
18527 | inherited: true,
|
18528 | animationType: "discrete",
|
18529 | percentages: "no",
|
18530 | groups: [
|
18531 | "WebKit Extensions"
|
18532 | ],
|
18533 | initial: "default",
|
18534 | appliesto: "allElements",
|
18535 | computed: "asSpecified",
|
18536 | order: "uniqueOrder",
|
18537 | status: "nonstandard",
|
18538 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
|
18539 | },
|
18540 | "-webkit-user-modify": {
|
18541 | syntax: "read-only | read-write | read-write-plaintext-only",
|
18542 | media: "interactive",
|
18543 | inherited: true,
|
18544 | animationType: "discrete",
|
18545 | percentages: "no",
|
18546 | groups: [
|
18547 | "WebKit Extensions"
|
18548 | ],
|
18549 | initial: "read-only",
|
18550 | appliesto: "allElements",
|
18551 | computed: "asSpecified",
|
18552 | order: "uniqueOrder",
|
18553 | status: "nonstandard"
|
18554 | },
|
18555 | "align-content": {
|
18556 | syntax: "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
|
18557 | media: "visual",
|
18558 | inherited: false,
|
18559 | animationType: "discrete",
|
18560 | percentages: "no",
|
18561 | groups: [
|
18562 | "CSS Box Alignment"
|
18563 | ],
|
18564 | initial: "normal",
|
18565 | appliesto: "multilineFlexContainers",
|
18566 | computed: "asSpecified",
|
18567 | order: "uniqueOrder",
|
18568 | status: "standard",
|
18569 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-content"
|
18570 | },
|
18571 | "align-items": {
|
18572 | syntax: "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
|
18573 | media: "visual",
|
18574 | inherited: false,
|
18575 | animationType: "discrete",
|
18576 | percentages: "no",
|
18577 | groups: [
|
18578 | "CSS Box Alignment"
|
18579 | ],
|
18580 | initial: "normal",
|
18581 | appliesto: "allElements",
|
18582 | computed: "asSpecified",
|
18583 | order: "uniqueOrder",
|
18584 | status: "standard",
|
18585 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-items"
|
18586 | },
|
18587 | "align-self": {
|
18588 | syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
|
18589 | media: "visual",
|
18590 | inherited: false,
|
18591 | animationType: "discrete",
|
18592 | percentages: "no",
|
18593 | groups: [
|
18594 | "CSS Box Alignment"
|
18595 | ],
|
18596 | initial: "auto",
|
18597 | appliesto: "flexItemsGridItemsAndAbsolutelyPositionedBoxes",
|
18598 | computed: "autoOnAbsolutelyPositionedElementsValueOfAlignItemsOnParent",
|
18599 | order: "uniqueOrder",
|
18600 | status: "standard",
|
18601 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-self"
|
18602 | },
|
18603 | "align-tracks": {
|
18604 | syntax: "[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#",
|
18605 | media: "visual",
|
18606 | inherited: false,
|
18607 | animationType: "discrete",
|
18608 | percentages: "no",
|
18609 | groups: [
|
18610 | "CSS Grid Layout"
|
18611 | ],
|
18612 | initial: "normal",
|
18613 | appliesto: "gridContainersWithMasonryLayoutInTheirBlockAxis",
|
18614 | computed: "asSpecified",
|
18615 | order: "uniqueOrder",
|
18616 | status: "experimental",
|
18617 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-tracks"
|
18618 | },
|
18619 | all: all,
|
18620 | animation: animation,
|
18621 | "animation-delay": {
|
18622 | syntax: "<time>#",
|
18623 | media: "visual",
|
18624 | inherited: false,
|
18625 | animationType: "discrete",
|
18626 | percentages: "no",
|
18627 | groups: [
|
18628 | "CSS Animations"
|
18629 | ],
|
18630 | initial: "0s",
|
18631 | appliesto: "allElementsAndPseudos",
|
18632 | computed: "asSpecified",
|
18633 | order: "uniqueOrder",
|
18634 | status: "standard",
|
18635 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
|
18636 | },
|
18637 | "animation-direction": {
|
18638 | syntax: "<single-animation-direction>#",
|
18639 | media: "visual",
|
18640 | inherited: false,
|
18641 | animationType: "discrete",
|
18642 | percentages: "no",
|
18643 | groups: [
|
18644 | "CSS Animations"
|
18645 | ],
|
18646 | initial: "normal",
|
18647 | appliesto: "allElementsAndPseudos",
|
18648 | computed: "asSpecified",
|
18649 | order: "uniqueOrder",
|
18650 | status: "standard",
|
18651 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
|
18652 | },
|
18653 | "animation-duration": {
|
18654 | syntax: "<time>#",
|
18655 | media: "visual",
|
18656 | inherited: false,
|
18657 | animationType: "discrete",
|
18658 | percentages: "no",
|
18659 | groups: [
|
18660 | "CSS Animations"
|
18661 | ],
|
18662 | initial: "0s",
|
18663 | appliesto: "allElementsAndPseudos",
|
18664 | computed: "asSpecified",
|
18665 | order: "uniqueOrder",
|
18666 | status: "standard",
|
18667 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
|
18668 | },
|
18669 | "animation-fill-mode": {
|
18670 | syntax: "<single-animation-fill-mode>#",
|
18671 | media: "visual",
|
18672 | inherited: false,
|
18673 | animationType: "discrete",
|
18674 | percentages: "no",
|
18675 | groups: [
|
18676 | "CSS Animations"
|
18677 | ],
|
18678 | initial: "none",
|
18679 | appliesto: "allElementsAndPseudos",
|
18680 | computed: "asSpecified",
|
18681 | order: "uniqueOrder",
|
18682 | status: "standard",
|
18683 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
|
18684 | },
|
18685 | "animation-iteration-count": {
|
18686 | syntax: "<single-animation-iteration-count>#",
|
18687 | media: "visual",
|
18688 | inherited: false,
|
18689 | animationType: "discrete",
|
18690 | percentages: "no",
|
18691 | groups: [
|
18692 | "CSS Animations"
|
18693 | ],
|
18694 | initial: "1",
|
18695 | appliesto: "allElementsAndPseudos",
|
18696 | computed: "asSpecified",
|
18697 | order: "uniqueOrder",
|
18698 | status: "standard",
|
18699 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
|
18700 | },
|
18701 | "animation-name": {
|
18702 | syntax: "[ none | <keyframes-name> ]#",
|
18703 | media: "visual",
|
18704 | inherited: false,
|
18705 | animationType: "discrete",
|
18706 | percentages: "no",
|
18707 | groups: [
|
18708 | "CSS Animations"
|
18709 | ],
|
18710 | initial: "none",
|
18711 | appliesto: "allElementsAndPseudos",
|
18712 | computed: "asSpecified",
|
18713 | order: "uniqueOrder",
|
18714 | status: "standard",
|
18715 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-name"
|
18716 | },
|
18717 | "animation-play-state": {
|
18718 | syntax: "<single-animation-play-state>#",
|
18719 | media: "visual",
|
18720 | inherited: false,
|
18721 | animationType: "discrete",
|
18722 | percentages: "no",
|
18723 | groups: [
|
18724 | "CSS Animations"
|
18725 | ],
|
18726 | initial: "running",
|
18727 | appliesto: "allElementsAndPseudos",
|
18728 | computed: "asSpecified",
|
18729 | order: "uniqueOrder",
|
18730 | status: "standard",
|
18731 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
|
18732 | },
|
18733 | "animation-timing-function": {
|
18734 | syntax: "<timing-function>#",
|
18735 | media: "visual",
|
18736 | inherited: false,
|
18737 | animationType: "discrete",
|
18738 | percentages: "no",
|
18739 | groups: [
|
18740 | "CSS Animations"
|
18741 | ],
|
18742 | initial: "ease",
|
18743 | appliesto: "allElementsAndPseudos",
|
18744 | computed: "asSpecified",
|
18745 | order: "uniqueOrder",
|
18746 | status: "standard",
|
18747 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
|
18748 | },
|
18749 | appearance: appearance,
|
18750 | "aspect-ratio": {
|
18751 | syntax: "auto | <ratio>",
|
18752 | media: "all",
|
18753 | inherited: false,
|
18754 | animationType: "discrete",
|
18755 | percentages: "no",
|
18756 | groups: [
|
18757 | "CSS Basic User Interface"
|
18758 | ],
|
18759 | initial: "auto",
|
18760 | appliesto: "allElementsExceptInlineBoxesAndInternalRubyOrTableBoxes",
|
18761 | computed: "asSpecified",
|
18762 | order: "perGrammar",
|
18763 | status: "experimental",
|
18764 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
|
18765 | },
|
18766 | azimuth: azimuth,
|
18767 | "backdrop-filter": {
|
18768 | syntax: "none | <filter-function-list>",
|
18769 | media: "visual",
|
18770 | inherited: false,
|
18771 | animationType: "filterList",
|
18772 | percentages: "no",
|
18773 | groups: [
|
18774 | "Filter Effects"
|
18775 | ],
|
18776 | initial: "none",
|
18777 | appliesto: "allElementsSVGContainerElements",
|
18778 | computed: "asSpecified",
|
18779 | order: "uniqueOrder",
|
18780 | status: "standard",
|
18781 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
|
18782 | },
|
18783 | "backface-visibility": {
|
18784 | syntax: "visible | hidden",
|
18785 | media: "visual",
|
18786 | inherited: false,
|
18787 | animationType: "discrete",
|
18788 | percentages: "no",
|
18789 | groups: [
|
18790 | "CSS Transforms"
|
18791 | ],
|
18792 | initial: "visible",
|
18793 | appliesto: "transformableElements",
|
18794 | computed: "asSpecified",
|
18795 | order: "uniqueOrder",
|
18796 | status: "standard",
|
18797 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
|
18798 | },
|
18799 | background: background,
|
18800 | "background-attachment": {
|
18801 | syntax: "<attachment>#",
|
18802 | media: "visual",
|
18803 | inherited: false,
|
18804 | animationType: "discrete",
|
18805 | percentages: "no",
|
18806 | groups: [
|
18807 | "CSS Backgrounds and Borders"
|
18808 | ],
|
18809 | initial: "scroll",
|
18810 | appliesto: "allElements",
|
18811 | computed: "asSpecified",
|
18812 | order: "uniqueOrder",
|
18813 | alsoAppliesTo: [
|
18814 | "::first-letter",
|
18815 | "::first-line",
|
18816 | "::placeholder"
|
18817 | ],
|
18818 | status: "standard",
|
18819 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
|
18820 | },
|
18821 | "background-blend-mode": {
|
18822 | syntax: "<blend-mode>#",
|
18823 | media: "none",
|
18824 | inherited: false,
|
18825 | animationType: "discrete",
|
18826 | percentages: "no",
|
18827 | groups: [
|
18828 | "Compositing and Blending"
|
18829 | ],
|
18830 | initial: "normal",
|
18831 | appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
|
18832 | computed: "asSpecified",
|
18833 | order: "uniqueOrder",
|
18834 | alsoAppliesTo: [
|
18835 | "::first-letter",
|
18836 | "::first-line",
|
18837 | "::placeholder"
|
18838 | ],
|
18839 | status: "standard",
|
18840 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
|
18841 | },
|
18842 | "background-clip": {
|
18843 | syntax: "<box>#",
|
18844 | media: "visual",
|
18845 | inherited: false,
|
18846 | animationType: "discrete",
|
18847 | percentages: "no",
|
18848 | groups: [
|
18849 | "CSS Backgrounds and Borders"
|
18850 | ],
|
18851 | initial: "border-box",
|
18852 | appliesto: "allElements",
|
18853 | computed: "asSpecified",
|
18854 | order: "uniqueOrder",
|
18855 | alsoAppliesTo: [
|
18856 | "::first-letter",
|
18857 | "::first-line",
|
18858 | "::placeholder"
|
18859 | ],
|
18860 | status: "standard",
|
18861 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-clip"
|
18862 | },
|
18863 | "background-color": {
|
18864 | syntax: "<color>",
|
18865 | media: "visual",
|
18866 | inherited: false,
|
18867 | animationType: "color",
|
18868 | percentages: "no",
|
18869 | groups: [
|
18870 | "CSS Backgrounds and Borders"
|
18871 | ],
|
18872 | initial: "transparent",
|
18873 | appliesto: "allElements",
|
18874 | computed: "computedColor",
|
18875 | order: "uniqueOrder",
|
18876 | alsoAppliesTo: [
|
18877 | "::first-letter",
|
18878 | "::first-line",
|
18879 | "::placeholder"
|
18880 | ],
|
18881 | status: "standard",
|
18882 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-color"
|
18883 | },
|
18884 | "background-image": {
|
18885 | syntax: "<bg-image>#",
|
18886 | media: "visual",
|
18887 | inherited: false,
|
18888 | animationType: "discrete",
|
18889 | percentages: "no",
|
18890 | groups: [
|
18891 | "CSS Backgrounds and Borders"
|
18892 | ],
|
18893 | initial: "none",
|
18894 | appliesto: "allElements",
|
18895 | computed: "asSpecifiedURLsAbsolute",
|
18896 | order: "uniqueOrder",
|
18897 | alsoAppliesTo: [
|
18898 | "::first-letter",
|
18899 | "::first-line",
|
18900 | "::placeholder"
|
18901 | ],
|
18902 | status: "standard",
|
18903 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-image"
|
18904 | },
|
18905 | "background-origin": {
|
18906 | syntax: "<box>#",
|
18907 | media: "visual",
|
18908 | inherited: false,
|
18909 | animationType: "discrete",
|
18910 | percentages: "no",
|
18911 | groups: [
|
18912 | "CSS Backgrounds and Borders"
|
18913 | ],
|
18914 | initial: "padding-box",
|
18915 | appliesto: "allElements",
|
18916 | computed: "asSpecified",
|
18917 | order: "uniqueOrder",
|
18918 | alsoAppliesTo: [
|
18919 | "::first-letter",
|
18920 | "::first-line",
|
18921 | "::placeholder"
|
18922 | ],
|
18923 | status: "standard",
|
18924 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-origin"
|
18925 | },
|
18926 | "background-position": {
|
18927 | syntax: "<bg-position>#",
|
18928 | media: "visual",
|
18929 | inherited: false,
|
18930 | animationType: "repeatableListOfSimpleListOfLpc",
|
18931 | percentages: "referToSizeOfBackgroundPositioningAreaMinusBackgroundImageSize",
|
18932 | groups: [
|
18933 | "CSS Backgrounds and Borders"
|
18934 | ],
|
18935 | initial: "0% 0%",
|
18936 | appliesto: "allElements",
|
18937 | computed: "listEachItemTwoKeywordsOriginOffsets",
|
18938 | order: "uniqueOrder",
|
18939 | alsoAppliesTo: [
|
18940 | "::first-letter",
|
18941 | "::first-line",
|
18942 | "::placeholder"
|
18943 | ],
|
18944 | status: "standard",
|
18945 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position"
|
18946 | },
|
18947 | "background-position-x": {
|
18948 | syntax: "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
|
18949 | media: "visual",
|
18950 | inherited: false,
|
18951 | animationType: "discrete",
|
18952 | percentages: "referToWidthOfBackgroundPositioningAreaMinusBackgroundImageHeight",
|
18953 | groups: [
|
18954 | "CSS Backgrounds and Borders"
|
18955 | ],
|
18956 | initial: "left",
|
18957 | appliesto: "allElements",
|
18958 | computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
|
18959 | order: "uniqueOrder",
|
18960 | status: "experimental",
|
18961 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
|
18962 | },
|
18963 | "background-position-y": {
|
18964 | syntax: "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
|
18965 | media: "visual",
|
18966 | inherited: false,
|
18967 | animationType: "discrete",
|
18968 | percentages: "referToHeightOfBackgroundPositioningAreaMinusBackgroundImageHeight",
|
18969 | groups: [
|
18970 | "CSS Backgrounds and Borders"
|
18971 | ],
|
18972 | initial: "top",
|
18973 | appliesto: "allElements",
|
18974 | computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
|
18975 | order: "uniqueOrder",
|
18976 | status: "experimental",
|
18977 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
|
18978 | },
|
18979 | "background-repeat": {
|
18980 | syntax: "<repeat-style>#",
|
18981 | media: "visual",
|
18982 | inherited: false,
|
18983 | animationType: "discrete",
|
18984 | percentages: "no",
|
18985 | groups: [
|
18986 | "CSS Backgrounds and Borders"
|
18987 | ],
|
18988 | initial: "repeat",
|
18989 | appliesto: "allElements",
|
18990 | computed: "listEachItemHasTwoKeywordsOnePerDimension",
|
18991 | order: "uniqueOrder",
|
18992 | alsoAppliesTo: [
|
18993 | "::first-letter",
|
18994 | "::first-line",
|
18995 | "::placeholder"
|
18996 | ],
|
18997 | status: "standard",
|
18998 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
|
18999 | },
|
19000 | "background-size": {
|
19001 | syntax: "<bg-size>#",
|
19002 | media: "visual",
|
19003 | inherited: false,
|
19004 | animationType: "repeatableListOfSimpleListOfLpc",
|
19005 | percentages: "relativeToBackgroundPositioningArea",
|
19006 | groups: [
|
19007 | "CSS Backgrounds and Borders"
|
19008 | ],
|
19009 | initial: "auto auto",
|
19010 | appliesto: "allElements",
|
19011 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
19012 | order: "uniqueOrder",
|
19013 | alsoAppliesTo: [
|
19014 | "::first-letter",
|
19015 | "::first-line",
|
19016 | "::placeholder"
|
19017 | ],
|
19018 | status: "standard",
|
19019 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-size"
|
19020 | },
|
19021 | "block-overflow": {
|
19022 | syntax: "clip | ellipsis | <string>",
|
19023 | media: "visual",
|
19024 | inherited: true,
|
19025 | animationType: "discrete",
|
19026 | percentages: "no",
|
19027 | groups: [
|
19028 | "CSS Overflow"
|
19029 | ],
|
19030 | initial: "clip",
|
19031 | appliesto: "blockContainers",
|
19032 | computed: "asSpecified",
|
19033 | order: "perGrammar",
|
19034 | status: "experimental"
|
19035 | },
|
19036 | "block-size": {
|
19037 | syntax: "<'width'>",
|
19038 | media: "visual",
|
19039 | inherited: false,
|
19040 | animationType: "lpc",
|
19041 | percentages: "blockSizeOfContainingBlock",
|
19042 | groups: [
|
19043 | "CSS Logical Properties"
|
19044 | ],
|
19045 | initial: "auto",
|
19046 | appliesto: "sameAsWidthAndHeight",
|
19047 | computed: "sameAsWidthAndHeight",
|
19048 | order: "uniqueOrder",
|
19049 | status: "standard",
|
19050 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/block-size"
|
19051 | },
|
19052 | border: border,
|
19053 | "border-block": {
|
19054 | syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
19055 | media: "visual",
|
19056 | inherited: false,
|
19057 | animationType: "discrete",
|
19058 | percentages: "no",
|
19059 | groups: [
|
19060 | "CSS Logical Properties"
|
19061 | ],
|
19062 | initial: [
|
19063 | "border-top-width",
|
19064 | "border-top-style",
|
19065 | "border-top-color"
|
19066 | ],
|
19067 | appliesto: "allElements",
|
19068 | computed: [
|
19069 | "border-top-width",
|
19070 | "border-top-style",
|
19071 | "border-top-color"
|
19072 | ],
|
19073 | order: "uniqueOrder",
|
19074 | status: "standard",
|
19075 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block"
|
19076 | },
|
19077 | "border-block-color": {
|
19078 | syntax: "<'border-top-color'>{1,2}",
|
19079 | media: "visual",
|
19080 | inherited: false,
|
19081 | animationType: "discrete",
|
19082 | percentages: "no",
|
19083 | groups: [
|
19084 | "CSS Logical Properties"
|
19085 | ],
|
19086 | initial: "currentcolor",
|
19087 | appliesto: "allElements",
|
19088 | computed: "computedColor",
|
19089 | order: "uniqueOrder",
|
19090 | status: "standard",
|
19091 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
|
19092 | },
|
19093 | "border-block-style": {
|
19094 | syntax: "<'border-top-style'>",
|
19095 | media: "visual",
|
19096 | inherited: false,
|
19097 | animationType: "discrete",
|
19098 | percentages: "no",
|
19099 | groups: [
|
19100 | "CSS Logical Properties"
|
19101 | ],
|
19102 | initial: "none",
|
19103 | appliesto: "allElements",
|
19104 | computed: "asSpecified",
|
19105 | order: "uniqueOrder",
|
19106 | status: "standard",
|
19107 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
|
19108 | },
|
19109 | "border-block-width": {
|
19110 | syntax: "<'border-top-width'>",
|
19111 | media: "visual",
|
19112 | inherited: false,
|
19113 | animationType: "discrete",
|
19114 | percentages: "logicalWidthOfContainingBlock",
|
19115 | groups: [
|
19116 | "CSS Logical Properties"
|
19117 | ],
|
19118 | initial: "medium",
|
19119 | appliesto: "allElements",
|
19120 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
19121 | order: "uniqueOrder",
|
19122 | status: "standard",
|
19123 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
|
19124 | },
|
19125 | "border-block-end": {
|
19126 | syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
19127 | media: "visual",
|
19128 | inherited: false,
|
19129 | animationType: [
|
19130 | "border-block-end-color",
|
19131 | "border-block-end-style",
|
19132 | "border-block-end-width"
|
19133 | ],
|
19134 | percentages: "no",
|
19135 | groups: [
|
19136 | "CSS Logical Properties"
|
19137 | ],
|
19138 | initial: [
|
19139 | "border-top-width",
|
19140 | "border-top-style",
|
19141 | "border-top-color"
|
19142 | ],
|
19143 | appliesto: "allElements",
|
19144 | computed: [
|
19145 | "border-top-width",
|
19146 | "border-top-style",
|
19147 | "border-top-color"
|
19148 | ],
|
19149 | order: "uniqueOrder",
|
19150 | status: "standard",
|
19151 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
|
19152 | },
|
19153 | "border-block-end-color": {
|
19154 | syntax: "<'border-top-color'>",
|
19155 | media: "visual",
|
19156 | inherited: false,
|
19157 | animationType: "color",
|
19158 | percentages: "no",
|
19159 | groups: [
|
19160 | "CSS Logical Properties"
|
19161 | ],
|
19162 | initial: "currentcolor",
|
19163 | appliesto: "allElements",
|
19164 | computed: "computedColor",
|
19165 | order: "uniqueOrder",
|
19166 | status: "standard",
|
19167 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
|
19168 | },
|
19169 | "border-block-end-style": {
|
19170 | syntax: "<'border-top-style'>",
|
19171 | media: "visual",
|
19172 | inherited: false,
|
19173 | animationType: "discrete",
|
19174 | percentages: "no",
|
19175 | groups: [
|
19176 | "CSS Logical Properties"
|
19177 | ],
|
19178 | initial: "none",
|
19179 | appliesto: "allElements",
|
19180 | computed: "asSpecified",
|
19181 | order: "uniqueOrder",
|
19182 | status: "standard",
|
19183 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
|
19184 | },
|
19185 | "border-block-end-width": {
|
19186 | syntax: "<'border-top-width'>",
|
19187 | media: "visual",
|
19188 | inherited: false,
|
19189 | animationType: "length",
|
19190 | percentages: "logicalWidthOfContainingBlock",
|
19191 | groups: [
|
19192 | "CSS Logical Properties"
|
19193 | ],
|
19194 | initial: "medium",
|
19195 | appliesto: "allElements",
|
19196 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
19197 | order: "uniqueOrder",
|
19198 | status: "standard",
|
19199 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
|
19200 | },
|
19201 | "border-block-start": {
|
19202 | syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
19203 | media: "visual",
|
19204 | inherited: false,
|
19205 | animationType: [
|
19206 | "border-block-start-color",
|
19207 | "border-block-start-style",
|
19208 | "border-block-start-width"
|
19209 | ],
|
19210 | percentages: "no",
|
19211 | groups: [
|
19212 | "CSS Logical Properties"
|
19213 | ],
|
19214 | initial: [
|
19215 | "border-width",
|
19216 | "border-style",
|
19217 | "color"
|
19218 | ],
|
19219 | appliesto: "allElements",
|
19220 | computed: [
|
19221 | "border-width",
|
19222 | "border-style",
|
19223 | "border-block-start-color"
|
19224 | ],
|
19225 | order: "uniqueOrder",
|
19226 | status: "standard",
|
19227 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
|
19228 | },
|
19229 | "border-block-start-color": {
|
19230 | syntax: "<'border-top-color'>",
|
19231 | media: "visual",
|
19232 | inherited: false,
|
19233 | animationType: "color",
|
19234 | percentages: "no",
|
19235 | groups: [
|
19236 | "CSS Logical Properties"
|
19237 | ],
|
19238 | initial: "currentcolor",
|
19239 | appliesto: "allElements",
|
19240 | computed: "computedColor",
|
19241 | order: "uniqueOrder",
|
19242 | status: "standard",
|
19243 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
|
19244 | },
|
19245 | "border-block-start-style": {
|
19246 | syntax: "<'border-top-style'>",
|
19247 | media: "visual",
|
19248 | inherited: false,
|
19249 | animationType: "discrete",
|
19250 | percentages: "no",
|
19251 | groups: [
|
19252 | "CSS Logical Properties"
|
19253 | ],
|
19254 | initial: "none",
|
19255 | appliesto: "allElements",
|
19256 | computed: "asSpecified",
|
19257 | order: "uniqueOrder",
|
19258 | status: "standard",
|
19259 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
|
19260 | },
|
19261 | "border-block-start-width": {
|
19262 | syntax: "<'border-top-width'>",
|
19263 | media: "visual",
|
19264 | inherited: false,
|
19265 | animationType: "length",
|
19266 | percentages: "logicalWidthOfContainingBlock",
|
19267 | groups: [
|
19268 | "CSS Logical Properties"
|
19269 | ],
|
19270 | initial: "medium",
|
19271 | appliesto: "allElements",
|
19272 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
19273 | order: "uniqueOrder",
|
19274 | status: "standard",
|
19275 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
|
19276 | },
|
19277 | "border-bottom": {
|
19278 | syntax: "<line-width> || <line-style> || <color>",
|
19279 | media: "visual",
|
19280 | inherited: false,
|
19281 | animationType: [
|
19282 | "border-bottom-color",
|
19283 | "border-bottom-style",
|
19284 | "border-bottom-width"
|
19285 | ],
|
19286 | percentages: "no",
|
19287 | groups: [
|
19288 | "CSS Backgrounds and Borders"
|
19289 | ],
|
19290 | initial: [
|
19291 | "border-bottom-width",
|
19292 | "border-bottom-style",
|
19293 | "border-bottom-color"
|
19294 | ],
|
19295 | appliesto: "allElements",
|
19296 | computed: [
|
19297 | "border-bottom-width",
|
19298 | "border-bottom-style",
|
19299 | "border-bottom-color"
|
19300 | ],
|
19301 | order: "orderOfAppearance",
|
19302 | alsoAppliesTo: [
|
19303 | "::first-letter"
|
19304 | ],
|
19305 | status: "standard",
|
19306 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
|
19307 | },
|
19308 | "border-bottom-color": {
|
19309 | syntax: "<'border-top-color'>",
|
19310 | media: "visual",
|
19311 | inherited: false,
|
19312 | animationType: "color",
|
19313 | percentages: "no",
|
19314 | groups: [
|
19315 | "CSS Backgrounds and Borders"
|
19316 | ],
|
19317 | initial: "currentcolor",
|
19318 | appliesto: "allElements",
|
19319 | computed: "computedColor",
|
19320 | order: "uniqueOrder",
|
19321 | alsoAppliesTo: [
|
19322 | "::first-letter"
|
19323 | ],
|
19324 | status: "standard",
|
19325 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
|
19326 | },
|
19327 | "border-bottom-left-radius": {
|
19328 | syntax: "<length-percentage>{1,2}",
|
19329 | media: "visual",
|
19330 | inherited: false,
|
19331 | animationType: "lpc",
|
19332 | percentages: "referToDimensionOfBorderBox",
|
19333 | groups: [
|
19334 | "CSS Backgrounds and Borders"
|
19335 | ],
|
19336 | initial: "0",
|
19337 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
19338 | computed: "twoAbsoluteLengthOrPercentages",
|
19339 | order: "uniqueOrder",
|
19340 | alsoAppliesTo: [
|
19341 | "::first-letter"
|
19342 | ],
|
19343 | status: "standard",
|
19344 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
|
19345 | },
|
19346 | "border-bottom-right-radius": {
|
19347 | syntax: "<length-percentage>{1,2}",
|
19348 | media: "visual",
|
19349 | inherited: false,
|
19350 | animationType: "lpc",
|
19351 | percentages: "referToDimensionOfBorderBox",
|
19352 | groups: [
|
19353 | "CSS Backgrounds and Borders"
|
19354 | ],
|
19355 | initial: "0",
|
19356 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
19357 | computed: "twoAbsoluteLengthOrPercentages",
|
19358 | order: "uniqueOrder",
|
19359 | alsoAppliesTo: [
|
19360 | "::first-letter"
|
19361 | ],
|
19362 | status: "standard",
|
19363 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
|
19364 | },
|
19365 | "border-bottom-style": {
|
19366 | syntax: "<line-style>",
|
19367 | media: "visual",
|
19368 | inherited: false,
|
19369 | animationType: "discrete",
|
19370 | percentages: "no",
|
19371 | groups: [
|
19372 | "CSS Backgrounds and Borders"
|
19373 | ],
|
19374 | initial: "none",
|
19375 | appliesto: "allElements",
|
19376 | computed: "asSpecified",
|
19377 | order: "uniqueOrder",
|
19378 | alsoAppliesTo: [
|
19379 | "::first-letter"
|
19380 | ],
|
19381 | status: "standard",
|
19382 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
|
19383 | },
|
19384 | "border-bottom-width": {
|
19385 | syntax: "<line-width>",
|
19386 | media: "visual",
|
19387 | inherited: false,
|
19388 | animationType: "length",
|
19389 | percentages: "no",
|
19390 | groups: [
|
19391 | "CSS Backgrounds and Borders"
|
19392 | ],
|
19393 | initial: "medium",
|
19394 | appliesto: "allElements",
|
19395 | computed: "absoluteLengthOr0IfBorderBottomStyleNoneOrHidden",
|
19396 | order: "uniqueOrder",
|
19397 | alsoAppliesTo: [
|
19398 | "::first-letter"
|
19399 | ],
|
19400 | status: "standard",
|
19401 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
|
19402 | },
|
19403 | "border-collapse": {
|
19404 | syntax: "collapse | separate",
|
19405 | media: "visual",
|
19406 | inherited: true,
|
19407 | animationType: "discrete",
|
19408 | percentages: "no",
|
19409 | groups: [
|
19410 | "CSS Table"
|
19411 | ],
|
19412 | initial: "separate",
|
19413 | appliesto: "tableElements",
|
19414 | computed: "asSpecified",
|
19415 | order: "uniqueOrder",
|
19416 | status: "standard",
|
19417 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
|
19418 | },
|
19419 | "border-color": {
|
19420 | syntax: "<color>{1,4}",
|
19421 | media: "visual",
|
19422 | inherited: false,
|
19423 | animationType: [
|
19424 | "border-bottom-color",
|
19425 | "border-left-color",
|
19426 | "border-right-color",
|
19427 | "border-top-color"
|
19428 | ],
|
19429 | percentages: "no",
|
19430 | groups: [
|
19431 | "CSS Backgrounds and Borders"
|
19432 | ],
|
19433 | initial: [
|
19434 | "border-top-color",
|
19435 | "border-right-color",
|
19436 | "border-bottom-color",
|
19437 | "border-left-color"
|
19438 | ],
|
19439 | appliesto: "allElements",
|
19440 | computed: [
|
19441 | "border-bottom-color",
|
19442 | "border-left-color",
|
19443 | "border-right-color",
|
19444 | "border-top-color"
|
19445 | ],
|
19446 | order: "uniqueOrder",
|
19447 | alsoAppliesTo: [
|
19448 | "::first-letter"
|
19449 | ],
|
19450 | status: "standard",
|
19451 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-color"
|
19452 | },
|
19453 | "border-end-end-radius": {
|
19454 | syntax: "<length-percentage>{1,2}",
|
19455 | media: "visual",
|
19456 | inherited: false,
|
19457 | animationType: "lpc",
|
19458 | percentages: "referToDimensionOfBorderBox",
|
19459 | groups: [
|
19460 | "CSS Logical Properties"
|
19461 | ],
|
19462 | initial: "0",
|
19463 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
19464 | computed: "twoAbsoluteLengthOrPercentages",
|
19465 | order: "uniqueOrder",
|
19466 | alsoAppliesTo: [
|
19467 | "::first-letter"
|
19468 | ],
|
19469 | status: "standard",
|
19470 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
|
19471 | },
|
19472 | "border-end-start-radius": {
|
19473 | syntax: "<length-percentage>{1,2}",
|
19474 | media: "visual",
|
19475 | inherited: false,
|
19476 | animationType: "lpc",
|
19477 | percentages: "referToDimensionOfBorderBox",
|
19478 | groups: [
|
19479 | "CSS Logical Properties"
|
19480 | ],
|
19481 | initial: "0",
|
19482 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
19483 | computed: "twoAbsoluteLengthOrPercentages",
|
19484 | order: "uniqueOrder",
|
19485 | alsoAppliesTo: [
|
19486 | "::first-letter"
|
19487 | ],
|
19488 | status: "standard",
|
19489 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
|
19490 | },
|
19491 | "border-image": {
|
19492 | syntax: "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
|
19493 | media: "visual",
|
19494 | inherited: false,
|
19495 | animationType: "discrete",
|
19496 | percentages: [
|
19497 | "border-image-slice",
|
19498 | "border-image-width"
|
19499 | ],
|
19500 | groups: [
|
19501 | "CSS Backgrounds and Borders"
|
19502 | ],
|
19503 | initial: [
|
19504 | "border-image-source",
|
19505 | "border-image-slice",
|
19506 | "border-image-width",
|
19507 | "border-image-outset",
|
19508 | "border-image-repeat"
|
19509 | ],
|
19510 | appliesto: "allElementsExceptTableElementsWhenCollapse",
|
19511 | computed: [
|
19512 | "border-image-outset",
|
19513 | "border-image-repeat",
|
19514 | "border-image-slice",
|
19515 | "border-image-source",
|
19516 | "border-image-width"
|
19517 | ],
|
19518 | order: "uniqueOrder",
|
19519 | alsoAppliesTo: [
|
19520 | "::first-letter"
|
19521 | ],
|
19522 | status: "standard",
|
19523 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image"
|
19524 | },
|
19525 | "border-image-outset": {
|
19526 | syntax: "[ <length> | <number> ]{1,4}",
|
19527 | media: "visual",
|
19528 | inherited: false,
|
19529 | animationType: "byComputedValueType",
|
19530 | percentages: "no",
|
19531 | groups: [
|
19532 | "CSS Backgrounds and Borders"
|
19533 | ],
|
19534 | initial: "0",
|
19535 | appliesto: "allElementsExceptTableElementsWhenCollapse",
|
19536 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
19537 | order: "uniqueOrder",
|
19538 | alsoAppliesTo: [
|
19539 | "::first-letter"
|
19540 | ],
|
19541 | status: "standard",
|
19542 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
|
19543 | },
|
19544 | "border-image-repeat": {
|
19545 | syntax: "[ stretch | repeat | round | space ]{1,2}",
|
19546 | media: "visual",
|
19547 | inherited: false,
|
19548 | animationType: "discrete",
|
19549 | percentages: "no",
|
19550 | groups: [
|
19551 | "CSS Backgrounds and Borders"
|
19552 | ],
|
19553 | initial: "stretch",
|
19554 | appliesto: "allElementsExceptTableElementsWhenCollapse",
|
19555 | computed: "asSpecified",
|
19556 | order: "uniqueOrder",
|
19557 | alsoAppliesTo: [
|
19558 | "::first-letter"
|
19559 | ],
|
19560 | status: "standard",
|
19561 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
|
19562 | },
|
19563 | "border-image-slice": {
|
19564 | syntax: "<number-percentage>{1,4} && fill?",
|
19565 | media: "visual",
|
19566 | inherited: false,
|
19567 | animationType: "byComputedValueType",
|
19568 | percentages: "referToSizeOfBorderImage",
|
19569 | groups: [
|
19570 | "CSS Backgrounds and Borders"
|
19571 | ],
|
19572 | initial: "100%",
|
19573 | appliesto: "allElementsExceptTableElementsWhenCollapse",
|
19574 | computed: "oneToFourPercentagesOrAbsoluteLengthsPlusFill",
|
19575 | order: "percentagesOrLengthsFollowedByFill",
|
19576 | alsoAppliesTo: [
|
19577 | "::first-letter"
|
19578 | ],
|
19579 | status: "standard",
|
19580 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
|
19581 | },
|
19582 | "border-image-source": {
|
19583 | syntax: "none | <image>",
|
19584 | media: "visual",
|
19585 | inherited: false,
|
19586 | animationType: "discrete",
|
19587 | percentages: "no",
|
19588 | groups: [
|
19589 | "CSS Backgrounds and Borders"
|
19590 | ],
|
19591 | initial: "none",
|
19592 | appliesto: "allElementsExceptTableElementsWhenCollapse",
|
19593 | computed: "noneOrImageWithAbsoluteURI",
|
19594 | order: "uniqueOrder",
|
19595 | alsoAppliesTo: [
|
19596 | "::first-letter"
|
19597 | ],
|
19598 | status: "standard",
|
19599 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
|
19600 | },
|
19601 | "border-image-width": {
|
19602 | syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
|
19603 | media: "visual",
|
19604 | inherited: false,
|
19605 | animationType: "byComputedValueType",
|
19606 | percentages: "referToWidthOrHeightOfBorderImageArea",
|
19607 | groups: [
|
19608 | "CSS Backgrounds and Borders"
|
19609 | ],
|
19610 | initial: "1",
|
19611 | appliesto: "allElementsExceptTableElementsWhenCollapse",
|
19612 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
19613 | order: "uniqueOrder",
|
19614 | alsoAppliesTo: [
|
19615 | "::first-letter"
|
19616 | ],
|
19617 | status: "standard",
|
19618 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
|
19619 | },
|
19620 | "border-inline": {
|
19621 | syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
19622 | media: "visual",
|
19623 | inherited: false,
|
19624 | animationType: "discrete",
|
19625 | percentages: "no",
|
19626 | groups: [
|
19627 | "CSS Logical Properties"
|
19628 | ],
|
19629 | initial: [
|
19630 | "border-top-width",
|
19631 | "border-top-style",
|
19632 | "border-top-color"
|
19633 | ],
|
19634 | appliesto: "allElements",
|
19635 | computed: [
|
19636 | "border-top-width",
|
19637 | "border-top-style",
|
19638 | "border-top-color"
|
19639 | ],
|
19640 | order: "uniqueOrder",
|
19641 | status: "standard",
|
19642 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline"
|
19643 | },
|
19644 | "border-inline-end": {
|
19645 | syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
19646 | media: "visual",
|
19647 | inherited: false,
|
19648 | animationType: [
|
19649 | "border-inline-end-color",
|
19650 | "border-inline-end-style",
|
19651 | "border-inline-end-width"
|
19652 | ],
|
19653 | percentages: "no",
|
19654 | groups: [
|
19655 | "CSS Logical Properties"
|
19656 | ],
|
19657 | initial: [
|
19658 | "border-width",
|
19659 | "border-style",
|
19660 | "color"
|
19661 | ],
|
19662 | appliesto: "allElements",
|
19663 | computed: [
|
19664 | "border-width",
|
19665 | "border-style",
|
19666 | "border-inline-end-color"
|
19667 | ],
|
19668 | order: "uniqueOrder",
|
19669 | status: "standard",
|
19670 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
|
19671 | },
|
19672 | "border-inline-color": {
|
19673 | syntax: "<'border-top-color'>{1,2}",
|
19674 | media: "visual",
|
19675 | inherited: false,
|
19676 | animationType: "discrete",
|
19677 | percentages: "no",
|
19678 | groups: [
|
19679 | "CSS Logical Properties"
|
19680 | ],
|
19681 | initial: "currentcolor",
|
19682 | appliesto: "allElements",
|
19683 | computed: "computedColor",
|
19684 | order: "uniqueOrder",
|
19685 | status: "standard",
|
19686 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
|
19687 | },
|
19688 | "border-inline-style": {
|
19689 | syntax: "<'border-top-style'>",
|
19690 | media: "visual",
|
19691 | inherited: false,
|
19692 | animationType: "discrete",
|
19693 | percentages: "no",
|
19694 | groups: [
|
19695 | "CSS Logical Properties"
|
19696 | ],
|
19697 | initial: "none",
|
19698 | appliesto: "allElements",
|
19699 | computed: "asSpecified",
|
19700 | order: "uniqueOrder",
|
19701 | status: "standard",
|
19702 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
|
19703 | },
|
19704 | "border-inline-width": {
|
19705 | syntax: "<'border-top-width'>",
|
19706 | media: "visual",
|
19707 | inherited: false,
|
19708 | animationType: "discrete",
|
19709 | percentages: "logicalWidthOfContainingBlock",
|
19710 | groups: [
|
19711 | "CSS Logical Properties"
|
19712 | ],
|
19713 | initial: "medium",
|
19714 | appliesto: "allElements",
|
19715 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
19716 | order: "uniqueOrder",
|
19717 | status: "standard",
|
19718 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
|
19719 | },
|
19720 | "border-inline-end-color": {
|
19721 | syntax: "<'border-top-color'>",
|
19722 | media: "visual",
|
19723 | inherited: false,
|
19724 | animationType: "color",
|
19725 | percentages: "no",
|
19726 | groups: [
|
19727 | "CSS Logical Properties"
|
19728 | ],
|
19729 | initial: "currentcolor",
|
19730 | appliesto: "allElements",
|
19731 | computed: "computedColor",
|
19732 | order: "uniqueOrder",
|
19733 | status: "standard",
|
19734 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
|
19735 | },
|
19736 | "border-inline-end-style": {
|
19737 | syntax: "<'border-top-style'>",
|
19738 | media: "visual",
|
19739 | inherited: false,
|
19740 | animationType: "discrete",
|
19741 | percentages: "no",
|
19742 | groups: [
|
19743 | "CSS Logical Properties"
|
19744 | ],
|
19745 | initial: "none",
|
19746 | appliesto: "allElements",
|
19747 | computed: "asSpecified",
|
19748 | order: "uniqueOrder",
|
19749 | status: "standard",
|
19750 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
|
19751 | },
|
19752 | "border-inline-end-width": {
|
19753 | syntax: "<'border-top-width'>",
|
19754 | media: "visual",
|
19755 | inherited: false,
|
19756 | animationType: "length",
|
19757 | percentages: "logicalWidthOfContainingBlock",
|
19758 | groups: [
|
19759 | "CSS Logical Properties"
|
19760 | ],
|
19761 | initial: "medium",
|
19762 | appliesto: "allElements",
|
19763 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
19764 | order: "uniqueOrder",
|
19765 | status: "standard",
|
19766 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
|
19767 | },
|
19768 | "border-inline-start": {
|
19769 | syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
19770 | media: "visual",
|
19771 | inherited: false,
|
19772 | animationType: [
|
19773 | "border-inline-start-color",
|
19774 | "border-inline-start-style",
|
19775 | "border-inline-start-width"
|
19776 | ],
|
19777 | percentages: "no",
|
19778 | groups: [
|
19779 | "CSS Logical Properties"
|
19780 | ],
|
19781 | initial: [
|
19782 | "border-width",
|
19783 | "border-style",
|
19784 | "color"
|
19785 | ],
|
19786 | appliesto: "allElements",
|
19787 | computed: [
|
19788 | "border-width",
|
19789 | "border-style",
|
19790 | "border-inline-start-color"
|
19791 | ],
|
19792 | order: "uniqueOrder",
|
19793 | status: "standard",
|
19794 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
|
19795 | },
|
19796 | "border-inline-start-color": {
|
19797 | syntax: "<'border-top-color'>",
|
19798 | media: "visual",
|
19799 | inherited: false,
|
19800 | animationType: "color",
|
19801 | percentages: "no",
|
19802 | groups: [
|
19803 | "CSS Logical Properties"
|
19804 | ],
|
19805 | initial: "currentcolor",
|
19806 | appliesto: "allElements",
|
19807 | computed: "computedColor",
|
19808 | order: "uniqueOrder",
|
19809 | status: "standard",
|
19810 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
|
19811 | },
|
19812 | "border-inline-start-style": {
|
19813 | syntax: "<'border-top-style'>",
|
19814 | media: "visual",
|
19815 | inherited: false,
|
19816 | animationType: "discrete",
|
19817 | percentages: "no",
|
19818 | groups: [
|
19819 | "CSS Logical Properties"
|
19820 | ],
|
19821 | initial: "none",
|
19822 | appliesto: "allElements",
|
19823 | computed: "asSpecified",
|
19824 | order: "uniqueOrder",
|
19825 | status: "standard",
|
19826 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
|
19827 | },
|
19828 | "border-inline-start-width": {
|
19829 | syntax: "<'border-top-width'>",
|
19830 | media: "visual",
|
19831 | inherited: false,
|
19832 | animationType: "length",
|
19833 | percentages: "logicalWidthOfContainingBlock",
|
19834 | groups: [
|
19835 | "CSS Logical Properties"
|
19836 | ],
|
19837 | initial: "medium",
|
19838 | appliesto: "allElements",
|
19839 | computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
|
19840 | order: "uniqueOrder",
|
19841 | status: "standard",
|
19842 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
|
19843 | },
|
19844 | "border-left": {
|
19845 | syntax: "<line-width> || <line-style> || <color>",
|
19846 | media: "visual",
|
19847 | inherited: false,
|
19848 | animationType: [
|
19849 | "border-left-color",
|
19850 | "border-left-style",
|
19851 | "border-left-width"
|
19852 | ],
|
19853 | percentages: "no",
|
19854 | groups: [
|
19855 | "CSS Backgrounds and Borders"
|
19856 | ],
|
19857 | initial: [
|
19858 | "border-left-width",
|
19859 | "border-left-style",
|
19860 | "border-left-color"
|
19861 | ],
|
19862 | appliesto: "allElements",
|
19863 | computed: [
|
19864 | "border-left-width",
|
19865 | "border-left-style",
|
19866 | "border-left-color"
|
19867 | ],
|
19868 | order: "orderOfAppearance",
|
19869 | alsoAppliesTo: [
|
19870 | "::first-letter"
|
19871 | ],
|
19872 | status: "standard",
|
19873 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left"
|
19874 | },
|
19875 | "border-left-color": {
|
19876 | syntax: "<color>",
|
19877 | media: "visual",
|
19878 | inherited: false,
|
19879 | animationType: "color",
|
19880 | percentages: "no",
|
19881 | groups: [
|
19882 | "CSS Backgrounds and Borders"
|
19883 | ],
|
19884 | initial: "currentcolor",
|
19885 | appliesto: "allElements",
|
19886 | computed: "computedColor",
|
19887 | order: "uniqueOrder",
|
19888 | alsoAppliesTo: [
|
19889 | "::first-letter"
|
19890 | ],
|
19891 | status: "standard",
|
19892 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
|
19893 | },
|
19894 | "border-left-style": {
|
19895 | syntax: "<line-style>",
|
19896 | media: "visual",
|
19897 | inherited: false,
|
19898 | animationType: "discrete",
|
19899 | percentages: "no",
|
19900 | groups: [
|
19901 | "CSS Backgrounds and Borders"
|
19902 | ],
|
19903 | initial: "none",
|
19904 | appliesto: "allElements",
|
19905 | computed: "asSpecified",
|
19906 | order: "uniqueOrder",
|
19907 | alsoAppliesTo: [
|
19908 | "::first-letter"
|
19909 | ],
|
19910 | status: "standard",
|
19911 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
|
19912 | },
|
19913 | "border-left-width": {
|
19914 | syntax: "<line-width>",
|
19915 | media: "visual",
|
19916 | inherited: false,
|
19917 | animationType: "length",
|
19918 | percentages: "no",
|
19919 | groups: [
|
19920 | "CSS Backgrounds and Borders"
|
19921 | ],
|
19922 | initial: "medium",
|
19923 | appliesto: "allElements",
|
19924 | computed: "absoluteLengthOr0IfBorderLeftStyleNoneOrHidden",
|
19925 | order: "uniqueOrder",
|
19926 | alsoAppliesTo: [
|
19927 | "::first-letter"
|
19928 | ],
|
19929 | status: "standard",
|
19930 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
|
19931 | },
|
19932 | "border-radius": {
|
19933 | syntax: "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
|
19934 | media: "visual",
|
19935 | inherited: false,
|
19936 | animationType: [
|
19937 | "border-top-left-radius",
|
19938 | "border-top-right-radius",
|
19939 | "border-bottom-right-radius",
|
19940 | "border-bottom-left-radius"
|
19941 | ],
|
19942 | percentages: "referToDimensionOfBorderBox",
|
19943 | groups: [
|
19944 | "CSS Backgrounds and Borders"
|
19945 | ],
|
19946 | initial: [
|
19947 | "border-top-left-radius",
|
19948 | "border-top-right-radius",
|
19949 | "border-bottom-right-radius",
|
19950 | "border-bottom-left-radius"
|
19951 | ],
|
19952 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
19953 | computed: [
|
19954 | "border-bottom-left-radius",
|
19955 | "border-bottom-right-radius",
|
19956 | "border-top-left-radius",
|
19957 | "border-top-right-radius"
|
19958 | ],
|
19959 | order: "uniqueOrder",
|
19960 | alsoAppliesTo: [
|
19961 | "::first-letter"
|
19962 | ],
|
19963 | status: "standard",
|
19964 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-radius"
|
19965 | },
|
19966 | "border-right": {
|
19967 | syntax: "<line-width> || <line-style> || <color>",
|
19968 | media: "visual",
|
19969 | inherited: false,
|
19970 | animationType: [
|
19971 | "border-right-color",
|
19972 | "border-right-style",
|
19973 | "border-right-width"
|
19974 | ],
|
19975 | percentages: "no",
|
19976 | groups: [
|
19977 | "CSS Backgrounds and Borders"
|
19978 | ],
|
19979 | initial: [
|
19980 | "border-right-width",
|
19981 | "border-right-style",
|
19982 | "border-right-color"
|
19983 | ],
|
19984 | appliesto: "allElements",
|
19985 | computed: [
|
19986 | "border-right-width",
|
19987 | "border-right-style",
|
19988 | "border-right-color"
|
19989 | ],
|
19990 | order: "orderOfAppearance",
|
19991 | alsoAppliesTo: [
|
19992 | "::first-letter"
|
19993 | ],
|
19994 | status: "standard",
|
19995 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right"
|
19996 | },
|
19997 | "border-right-color": {
|
19998 | syntax: "<color>",
|
19999 | media: "visual",
|
20000 | inherited: false,
|
20001 | animationType: "color",
|
20002 | percentages: "no",
|
20003 | groups: [
|
20004 | "CSS Backgrounds and Borders"
|
20005 | ],
|
20006 | initial: "currentcolor",
|
20007 | appliesto: "allElements",
|
20008 | computed: "computedColor",
|
20009 | order: "uniqueOrder",
|
20010 | alsoAppliesTo: [
|
20011 | "::first-letter"
|
20012 | ],
|
20013 | status: "standard",
|
20014 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
|
20015 | },
|
20016 | "border-right-style": {
|
20017 | syntax: "<line-style>",
|
20018 | media: "visual",
|
20019 | inherited: false,
|
20020 | animationType: "discrete",
|
20021 | percentages: "no",
|
20022 | groups: [
|
20023 | "CSS Backgrounds and Borders"
|
20024 | ],
|
20025 | initial: "none",
|
20026 | appliesto: "allElements",
|
20027 | computed: "asSpecified",
|
20028 | order: "uniqueOrder",
|
20029 | alsoAppliesTo: [
|
20030 | "::first-letter"
|
20031 | ],
|
20032 | status: "standard",
|
20033 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
|
20034 | },
|
20035 | "border-right-width": {
|
20036 | syntax: "<line-width>",
|
20037 | media: "visual",
|
20038 | inherited: false,
|
20039 | animationType: "length",
|
20040 | percentages: "no",
|
20041 | groups: [
|
20042 | "CSS Backgrounds and Borders"
|
20043 | ],
|
20044 | initial: "medium",
|
20045 | appliesto: "allElements",
|
20046 | computed: "absoluteLengthOr0IfBorderRightStyleNoneOrHidden",
|
20047 | order: "uniqueOrder",
|
20048 | alsoAppliesTo: [
|
20049 | "::first-letter"
|
20050 | ],
|
20051 | status: "standard",
|
20052 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
|
20053 | },
|
20054 | "border-spacing": {
|
20055 | syntax: "<length> <length>?",
|
20056 | media: "visual",
|
20057 | inherited: true,
|
20058 | animationType: "discrete",
|
20059 | percentages: "no",
|
20060 | groups: [
|
20061 | "CSS Table"
|
20062 | ],
|
20063 | initial: "0",
|
20064 | appliesto: "tableElements",
|
20065 | computed: "twoAbsoluteLengths",
|
20066 | order: "uniqueOrder",
|
20067 | status: "standard",
|
20068 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
|
20069 | },
|
20070 | "border-start-end-radius": {
|
20071 | syntax: "<length-percentage>{1,2}",
|
20072 | media: "visual",
|
20073 | inherited: false,
|
20074 | animationType: "lpc",
|
20075 | percentages: "referToDimensionOfBorderBox",
|
20076 | groups: [
|
20077 | "CSS Logical Properties"
|
20078 | ],
|
20079 | initial: "0",
|
20080 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
20081 | computed: "twoAbsoluteLengthOrPercentages",
|
20082 | order: "uniqueOrder",
|
20083 | alsoAppliesTo: [
|
20084 | "::first-letter"
|
20085 | ],
|
20086 | status: "standard",
|
20087 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
|
20088 | },
|
20089 | "border-start-start-radius": {
|
20090 | syntax: "<length-percentage>{1,2}",
|
20091 | media: "visual",
|
20092 | inherited: false,
|
20093 | animationType: "lpc",
|
20094 | percentages: "referToDimensionOfBorderBox",
|
20095 | groups: [
|
20096 | "CSS Logical Properties"
|
20097 | ],
|
20098 | initial: "0",
|
20099 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
20100 | computed: "twoAbsoluteLengthOrPercentages",
|
20101 | order: "uniqueOrder",
|
20102 | alsoAppliesTo: [
|
20103 | "::first-letter"
|
20104 | ],
|
20105 | status: "standard",
|
20106 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
|
20107 | },
|
20108 | "border-style": {
|
20109 | syntax: "<line-style>{1,4}",
|
20110 | media: "visual",
|
20111 | inherited: false,
|
20112 | animationType: "discrete",
|
20113 | percentages: "no",
|
20114 | groups: [
|
20115 | "CSS Backgrounds and Borders"
|
20116 | ],
|
20117 | initial: [
|
20118 | "border-top-style",
|
20119 | "border-right-style",
|
20120 | "border-bottom-style",
|
20121 | "border-left-style"
|
20122 | ],
|
20123 | appliesto: "allElements",
|
20124 | computed: [
|
20125 | "border-bottom-style",
|
20126 | "border-left-style",
|
20127 | "border-right-style",
|
20128 | "border-top-style"
|
20129 | ],
|
20130 | order: "uniqueOrder",
|
20131 | alsoAppliesTo: [
|
20132 | "::first-letter"
|
20133 | ],
|
20134 | status: "standard",
|
20135 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-style"
|
20136 | },
|
20137 | "border-top": {
|
20138 | syntax: "<line-width> || <line-style> || <color>",
|
20139 | media: "visual",
|
20140 | inherited: false,
|
20141 | animationType: [
|
20142 | "border-top-color",
|
20143 | "border-top-style",
|
20144 | "border-top-width"
|
20145 | ],
|
20146 | percentages: "no",
|
20147 | groups: [
|
20148 | "CSS Backgrounds and Borders"
|
20149 | ],
|
20150 | initial: [
|
20151 | "border-top-width",
|
20152 | "border-top-style",
|
20153 | "border-top-color"
|
20154 | ],
|
20155 | appliesto: "allElements",
|
20156 | computed: [
|
20157 | "border-top-width",
|
20158 | "border-top-style",
|
20159 | "border-top-color"
|
20160 | ],
|
20161 | order: "orderOfAppearance",
|
20162 | alsoAppliesTo: [
|
20163 | "::first-letter"
|
20164 | ],
|
20165 | status: "standard",
|
20166 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top"
|
20167 | },
|
20168 | "border-top-color": {
|
20169 | syntax: "<color>",
|
20170 | media: "visual",
|
20171 | inherited: false,
|
20172 | animationType: "color",
|
20173 | percentages: "no",
|
20174 | groups: [
|
20175 | "CSS Backgrounds and Borders"
|
20176 | ],
|
20177 | initial: "currentcolor",
|
20178 | appliesto: "allElements",
|
20179 | computed: "computedColor",
|
20180 | order: "uniqueOrder",
|
20181 | alsoAppliesTo: [
|
20182 | "::first-letter"
|
20183 | ],
|
20184 | status: "standard",
|
20185 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
|
20186 | },
|
20187 | "border-top-left-radius": {
|
20188 | syntax: "<length-percentage>{1,2}",
|
20189 | media: "visual",
|
20190 | inherited: false,
|
20191 | animationType: "lpc",
|
20192 | percentages: "referToDimensionOfBorderBox",
|
20193 | groups: [
|
20194 | "CSS Backgrounds and Borders"
|
20195 | ],
|
20196 | initial: "0",
|
20197 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
20198 | computed: "twoAbsoluteLengthOrPercentages",
|
20199 | order: "uniqueOrder",
|
20200 | alsoAppliesTo: [
|
20201 | "::first-letter"
|
20202 | ],
|
20203 | status: "standard",
|
20204 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
|
20205 | },
|
20206 | "border-top-right-radius": {
|
20207 | syntax: "<length-percentage>{1,2}",
|
20208 | media: "visual",
|
20209 | inherited: false,
|
20210 | animationType: "lpc",
|
20211 | percentages: "referToDimensionOfBorderBox",
|
20212 | groups: [
|
20213 | "CSS Backgrounds and Borders"
|
20214 | ],
|
20215 | initial: "0",
|
20216 | appliesto: "allElementsUAsNotRequiredWhenCollapse",
|
20217 | computed: "twoAbsoluteLengthOrPercentages",
|
20218 | order: "uniqueOrder",
|
20219 | alsoAppliesTo: [
|
20220 | "::first-letter"
|
20221 | ],
|
20222 | status: "standard",
|
20223 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
|
20224 | },
|
20225 | "border-top-style": {
|
20226 | syntax: "<line-style>",
|
20227 | media: "visual",
|
20228 | inherited: false,
|
20229 | animationType: "discrete",
|
20230 | percentages: "no",
|
20231 | groups: [
|
20232 | "CSS Backgrounds and Borders"
|
20233 | ],
|
20234 | initial: "none",
|
20235 | appliesto: "allElements",
|
20236 | computed: "asSpecified",
|
20237 | order: "uniqueOrder",
|
20238 | alsoAppliesTo: [
|
20239 | "::first-letter"
|
20240 | ],
|
20241 | status: "standard",
|
20242 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
|
20243 | },
|
20244 | "border-top-width": {
|
20245 | syntax: "<line-width>",
|
20246 | media: "visual",
|
20247 | inherited: false,
|
20248 | animationType: "length",
|
20249 | percentages: "no",
|
20250 | groups: [
|
20251 | "CSS Backgrounds and Borders"
|
20252 | ],
|
20253 | initial: "medium",
|
20254 | appliesto: "allElements",
|
20255 | computed: "absoluteLengthOr0IfBorderTopStyleNoneOrHidden",
|
20256 | order: "uniqueOrder",
|
20257 | alsoAppliesTo: [
|
20258 | "::first-letter"
|
20259 | ],
|
20260 | status: "standard",
|
20261 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
|
20262 | },
|
20263 | "border-width": {
|
20264 | syntax: "<line-width>{1,4}",
|
20265 | media: "visual",
|
20266 | inherited: false,
|
20267 | animationType: [
|
20268 | "border-bottom-width",
|
20269 | "border-left-width",
|
20270 | "border-right-width",
|
20271 | "border-top-width"
|
20272 | ],
|
20273 | percentages: "no",
|
20274 | groups: [
|
20275 | "CSS Backgrounds and Borders"
|
20276 | ],
|
20277 | initial: [
|
20278 | "border-top-width",
|
20279 | "border-right-width",
|
20280 | "border-bottom-width",
|
20281 | "border-left-width"
|
20282 | ],
|
20283 | appliesto: "allElements",
|
20284 | computed: [
|
20285 | "border-bottom-width",
|
20286 | "border-left-width",
|
20287 | "border-right-width",
|
20288 | "border-top-width"
|
20289 | ],
|
20290 | order: "uniqueOrder",
|
20291 | alsoAppliesTo: [
|
20292 | "::first-letter"
|
20293 | ],
|
20294 | status: "standard",
|
20295 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-width"
|
20296 | },
|
20297 | bottom: bottom,
|
20298 | "box-align": {
|
20299 | syntax: "start | center | end | baseline | stretch",
|
20300 | media: "visual",
|
20301 | inherited: false,
|
20302 | animationType: "discrete",
|
20303 | percentages: "no",
|
20304 | groups: [
|
20305 | "Mozilla Extensions",
|
20306 | "WebKit Extensions"
|
20307 | ],
|
20308 | initial: "stretch",
|
20309 | appliesto: "elementsWithDisplayBoxOrInlineBox",
|
20310 | computed: "asSpecified",
|
20311 | order: "uniqueOrder",
|
20312 | status: "nonstandard",
|
20313 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-align"
|
20314 | },
|
20315 | "box-decoration-break": {
|
20316 | syntax: "slice | clone",
|
20317 | media: "visual",
|
20318 | inherited: false,
|
20319 | animationType: "discrete",
|
20320 | percentages: "no",
|
20321 | groups: [
|
20322 | "CSS Fragmentation"
|
20323 | ],
|
20324 | initial: "slice",
|
20325 | appliesto: "allElements",
|
20326 | computed: "asSpecified",
|
20327 | order: "uniqueOrder",
|
20328 | status: "standard",
|
20329 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
|
20330 | },
|
20331 | "box-direction": {
|
20332 | syntax: "normal | reverse | inherit",
|
20333 | media: "visual",
|
20334 | inherited: false,
|
20335 | animationType: "discrete",
|
20336 | percentages: "no",
|
20337 | groups: [
|
20338 | "Mozilla Extensions",
|
20339 | "WebKit Extensions"
|
20340 | ],
|
20341 | initial: "normal",
|
20342 | appliesto: "elementsWithDisplayBoxOrInlineBox",
|
20343 | computed: "asSpecified",
|
20344 | order: "uniqueOrder",
|
20345 | status: "nonstandard",
|
20346 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-direction"
|
20347 | },
|
20348 | "box-flex": {
|
20349 | syntax: "<number>",
|
20350 | media: "visual",
|
20351 | inherited: false,
|
20352 | animationType: "discrete",
|
20353 | percentages: "no",
|
20354 | groups: [
|
20355 | "Mozilla Extensions",
|
20356 | "WebKit Extensions"
|
20357 | ],
|
20358 | initial: "0",
|
20359 | appliesto: "directChildrenOfElementsWithDisplayMozBoxMozInlineBox",
|
20360 | computed: "asSpecified",
|
20361 | order: "uniqueOrder",
|
20362 | status: "nonstandard",
|
20363 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex"
|
20364 | },
|
20365 | "box-flex-group": {
|
20366 | syntax: "<integer>",
|
20367 | media: "visual",
|
20368 | inherited: false,
|
20369 | animationType: "discrete",
|
20370 | percentages: "no",
|
20371 | groups: [
|
20372 | "Mozilla Extensions",
|
20373 | "WebKit Extensions"
|
20374 | ],
|
20375 | initial: "1",
|
20376 | appliesto: "inFlowChildrenOfBoxElements",
|
20377 | computed: "asSpecified",
|
20378 | order: "uniqueOrder",
|
20379 | status: "nonstandard",
|
20380 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
|
20381 | },
|
20382 | "box-lines": {
|
20383 | syntax: "single | multiple",
|
20384 | media: "visual",
|
20385 | inherited: false,
|
20386 | animationType: "discrete",
|
20387 | percentages: "no",
|
20388 | groups: [
|
20389 | "Mozilla Extensions",
|
20390 | "WebKit Extensions"
|
20391 | ],
|
20392 | initial: "single",
|
20393 | appliesto: "boxElements",
|
20394 | computed: "asSpecified",
|
20395 | order: "uniqueOrder",
|
20396 | status: "nonstandard",
|
20397 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-lines"
|
20398 | },
|
20399 | "box-ordinal-group": {
|
20400 | syntax: "<integer>",
|
20401 | media: "visual",
|
20402 | inherited: false,
|
20403 | animationType: "discrete",
|
20404 | percentages: "no",
|
20405 | groups: [
|
20406 | "Mozilla Extensions",
|
20407 | "WebKit Extensions"
|
20408 | ],
|
20409 | initial: "1",
|
20410 | appliesto: "childrenOfBoxElements",
|
20411 | computed: "asSpecified",
|
20412 | order: "uniqueOrder",
|
20413 | status: "nonstandard",
|
20414 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
|
20415 | },
|
20416 | "box-orient": {
|
20417 | syntax: "horizontal | vertical | inline-axis | block-axis | inherit",
|
20418 | media: "visual",
|
20419 | inherited: false,
|
20420 | animationType: "discrete",
|
20421 | percentages: "no",
|
20422 | groups: [
|
20423 | "Mozilla Extensions",
|
20424 | "WebKit Extensions"
|
20425 | ],
|
20426 | initial: "inlineAxisHorizontalInXUL",
|
20427 | appliesto: "elementsWithDisplayBoxOrInlineBox",
|
20428 | computed: "asSpecified",
|
20429 | order: "uniqueOrder",
|
20430 | status: "nonstandard",
|
20431 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-orient"
|
20432 | },
|
20433 | "box-pack": {
|
20434 | syntax: "start | center | end | justify",
|
20435 | media: "visual",
|
20436 | inherited: false,
|
20437 | animationType: "discrete",
|
20438 | percentages: "no",
|
20439 | groups: [
|
20440 | "Mozilla Extensions",
|
20441 | "WebKit Extensions"
|
20442 | ],
|
20443 | initial: "start",
|
20444 | appliesto: "elementsWithDisplayMozBoxMozInlineBox",
|
20445 | computed: "asSpecified",
|
20446 | order: "uniqueOrder",
|
20447 | status: "nonstandard",
|
20448 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-pack"
|
20449 | },
|
20450 | "box-shadow": {
|
20451 | syntax: "none | <shadow>#",
|
20452 | media: "visual",
|
20453 | inherited: false,
|
20454 | animationType: "shadowList",
|
20455 | percentages: "no",
|
20456 | groups: [
|
20457 | "CSS Backgrounds and Borders"
|
20458 | ],
|
20459 | initial: "none",
|
20460 | appliesto: "allElements",
|
20461 | computed: "absoluteLengthsSpecifiedColorAsSpecified",
|
20462 | order: "uniqueOrder",
|
20463 | alsoAppliesTo: [
|
20464 | "::first-letter"
|
20465 | ],
|
20466 | status: "standard",
|
20467 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
|
20468 | },
|
20469 | "box-sizing": {
|
20470 | syntax: "content-box | border-box",
|
20471 | media: "visual",
|
20472 | inherited: false,
|
20473 | animationType: "discrete",
|
20474 | percentages: "no",
|
20475 | groups: [
|
20476 | "CSS Basic User Interface"
|
20477 | ],
|
20478 | initial: "content-box",
|
20479 | appliesto: "allElementsAcceptingWidthOrHeight",
|
20480 | computed: "asSpecified",
|
20481 | order: "uniqueOrder",
|
20482 | status: "standard",
|
20483 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
|
20484 | },
|
20485 | "break-after": {
|
20486 | syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
|
20487 | media: "visual",
|
20488 | inherited: false,
|
20489 | animationType: "discrete",
|
20490 | percentages: "no",
|
20491 | groups: [
|
20492 | "CSS Fragmentation"
|
20493 | ],
|
20494 | initial: "auto",
|
20495 | appliesto: "blockLevelElements",
|
20496 | computed: "asSpecified",
|
20497 | order: "uniqueOrder",
|
20498 | status: "standard",
|
20499 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-after"
|
20500 | },
|
20501 | "break-before": {
|
20502 | syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
|
20503 | media: "visual",
|
20504 | inherited: false,
|
20505 | animationType: "discrete",
|
20506 | percentages: "no",
|
20507 | groups: [
|
20508 | "CSS Fragmentation"
|
20509 | ],
|
20510 | initial: "auto",
|
20511 | appliesto: "blockLevelElements",
|
20512 | computed: "asSpecified",
|
20513 | order: "uniqueOrder",
|
20514 | status: "standard",
|
20515 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-before"
|
20516 | },
|
20517 | "break-inside": {
|
20518 | syntax: "auto | avoid | avoid-page | avoid-column | avoid-region",
|
20519 | media: "visual",
|
20520 | inherited: false,
|
20521 | animationType: "discrete",
|
20522 | percentages: "no",
|
20523 | groups: [
|
20524 | "CSS Fragmentation"
|
20525 | ],
|
20526 | initial: "auto",
|
20527 | appliesto: "blockLevelElements",
|
20528 | computed: "asSpecified",
|
20529 | order: "uniqueOrder",
|
20530 | status: "standard",
|
20531 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-inside"
|
20532 | },
|
20533 | "caption-side": {
|
20534 | syntax: "top | bottom | block-start | block-end | inline-start | inline-end",
|
20535 | media: "visual",
|
20536 | inherited: true,
|
20537 | animationType: "discrete",
|
20538 | percentages: "no",
|
20539 | groups: [
|
20540 | "CSS Table"
|
20541 | ],
|
20542 | initial: "top",
|
20543 | appliesto: "tableCaptionElements",
|
20544 | computed: "asSpecified",
|
20545 | order: "uniqueOrder",
|
20546 | status: "standard",
|
20547 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caption-side"
|
20548 | },
|
20549 | "caret-color": {
|
20550 | syntax: "auto | <color>",
|
20551 | media: "interactive",
|
20552 | inherited: true,
|
20553 | animationType: "color",
|
20554 | percentages: "no",
|
20555 | groups: [
|
20556 | "CSS Basic User Interface"
|
20557 | ],
|
20558 | initial: "auto",
|
20559 | appliesto: "allElements",
|
20560 | computed: "asAutoOrColor",
|
20561 | order: "perGrammar",
|
20562 | status: "standard",
|
20563 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caret-color"
|
20564 | },
|
20565 | clear: clear,
|
20566 | clip: clip,
|
20567 | "clip-path": {
|
20568 | syntax: "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
|
20569 | media: "visual",
|
20570 | inherited: false,
|
20571 | animationType: "basicShapeOtherwiseNo",
|
20572 | percentages: "referToReferenceBoxWhenSpecifiedOtherwiseBorderBox",
|
20573 | groups: [
|
20574 | "CSS Masking"
|
20575 | ],
|
20576 | initial: "none",
|
20577 | appliesto: "allElementsSVGContainerElements",
|
20578 | computed: "asSpecifiedURLsAbsolute",
|
20579 | order: "uniqueOrder",
|
20580 | status: "standard",
|
20581 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-path"
|
20582 | },
|
20583 | color: color,
|
20584 | "color-adjust": {
|
20585 | syntax: "economy | exact",
|
20586 | media: "visual",
|
20587 | inherited: true,
|
20588 | animationType: "discrete",
|
20589 | percentages: "no",
|
20590 | groups: [
|
20591 | "CSS Color"
|
20592 | ],
|
20593 | initial: "economy",
|
20594 | appliesto: "allElements",
|
20595 | computed: "asSpecified",
|
20596 | order: "perGrammar",
|
20597 | status: "standard",
|
20598 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
|
20599 | },
|
20600 | "column-count": {
|
20601 | syntax: "<integer> | auto",
|
20602 | media: "visual",
|
20603 | inherited: false,
|
20604 | animationType: "integer",
|
20605 | percentages: "no",
|
20606 | groups: [
|
20607 | "CSS Columns"
|
20608 | ],
|
20609 | initial: "auto",
|
20610 | appliesto: "blockContainersExceptTableWrappers",
|
20611 | computed: "asSpecified",
|
20612 | order: "perGrammar",
|
20613 | status: "standard",
|
20614 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-count"
|
20615 | },
|
20616 | "column-fill": {
|
20617 | syntax: "auto | balance | balance-all",
|
20618 | media: "visualInContinuousMediaNoEffectInOverflowColumns",
|
20619 | inherited: false,
|
20620 | animationType: "discrete",
|
20621 | percentages: "no",
|
20622 | groups: [
|
20623 | "CSS Columns"
|
20624 | ],
|
20625 | initial: "balance",
|
20626 | appliesto: "multicolElements",
|
20627 | computed: "asSpecified",
|
20628 | order: "perGrammar",
|
20629 | status: "standard",
|
20630 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-fill"
|
20631 | },
|
20632 | "column-gap": {
|
20633 | syntax: "normal | <length-percentage>",
|
20634 | media: "visual",
|
20635 | inherited: false,
|
20636 | animationType: "lpc",
|
20637 | percentages: "referToDimensionOfContentArea",
|
20638 | groups: [
|
20639 | "CSS Box Alignment"
|
20640 | ],
|
20641 | initial: "normal",
|
20642 | appliesto: "multiColumnElementsFlexContainersGridContainers",
|
20643 | computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
|
20644 | order: "perGrammar",
|
20645 | status: "standard",
|
20646 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
|
20647 | },
|
20648 | "column-rule": {
|
20649 | syntax: "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
|
20650 | media: "visual",
|
20651 | inherited: false,
|
20652 | animationType: [
|
20653 | "column-rule-color",
|
20654 | "column-rule-style",
|
20655 | "column-rule-width"
|
20656 | ],
|
20657 | percentages: "no",
|
20658 | groups: [
|
20659 | "CSS Columns"
|
20660 | ],
|
20661 | initial: [
|
20662 | "column-rule-width",
|
20663 | "column-rule-style",
|
20664 | "column-rule-color"
|
20665 | ],
|
20666 | appliesto: "multicolElements",
|
20667 | computed: [
|
20668 | "column-rule-color",
|
20669 | "column-rule-style",
|
20670 | "column-rule-width"
|
20671 | ],
|
20672 | order: "perGrammar",
|
20673 | status: "standard",
|
20674 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule"
|
20675 | },
|
20676 | "column-rule-color": {
|
20677 | syntax: "<color>",
|
20678 | media: "visual",
|
20679 | inherited: false,
|
20680 | animationType: "color",
|
20681 | percentages: "no",
|
20682 | groups: [
|
20683 | "CSS Columns"
|
20684 | ],
|
20685 | initial: "currentcolor",
|
20686 | appliesto: "multicolElements",
|
20687 | computed: "computedColor",
|
20688 | order: "perGrammar",
|
20689 | status: "standard",
|
20690 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
|
20691 | },
|
20692 | "column-rule-style": {
|
20693 | syntax: "<'border-style'>",
|
20694 | media: "visual",
|
20695 | inherited: false,
|
20696 | animationType: "discrete",
|
20697 | percentages: "no",
|
20698 | groups: [
|
20699 | "CSS Columns"
|
20700 | ],
|
20701 | initial: "none",
|
20702 | appliesto: "multicolElements",
|
20703 | computed: "asSpecified",
|
20704 | order: "perGrammar",
|
20705 | status: "standard",
|
20706 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
|
20707 | },
|
20708 | "column-rule-width": {
|
20709 | syntax: "<'border-width'>",
|
20710 | media: "visual",
|
20711 | inherited: false,
|
20712 | animationType: "length",
|
20713 | percentages: "no",
|
20714 | groups: [
|
20715 | "CSS Columns"
|
20716 | ],
|
20717 | initial: "medium",
|
20718 | appliesto: "multicolElements",
|
20719 | computed: "absoluteLength0IfColumnRuleStyleNoneOrHidden",
|
20720 | order: "perGrammar",
|
20721 | status: "standard",
|
20722 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
|
20723 | },
|
20724 | "column-span": {
|
20725 | syntax: "none | all",
|
20726 | media: "visual",
|
20727 | inherited: false,
|
20728 | animationType: "discrete",
|
20729 | percentages: "no",
|
20730 | groups: [
|
20731 | "CSS Columns"
|
20732 | ],
|
20733 | initial: "none",
|
20734 | appliesto: "inFlowBlockLevelElements",
|
20735 | computed: "asSpecified",
|
20736 | order: "perGrammar",
|
20737 | status: "standard",
|
20738 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-span"
|
20739 | },
|
20740 | "column-width": {
|
20741 | syntax: "<length> | auto",
|
20742 | media: "visual",
|
20743 | inherited: false,
|
20744 | animationType: "length",
|
20745 | percentages: "no",
|
20746 | groups: [
|
20747 | "CSS Columns"
|
20748 | ],
|
20749 | initial: "auto",
|
20750 | appliesto: "blockContainersExceptTableWrappers",
|
20751 | computed: "absoluteLengthZeroOrLarger",
|
20752 | order: "perGrammar",
|
20753 | status: "standard",
|
20754 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-width"
|
20755 | },
|
20756 | columns: columns,
|
20757 | contain: contain,
|
20758 | content: content,
|
20759 | "counter-increment": {
|
20760 | syntax: "[ <custom-ident> <integer>? ]+ | none",
|
20761 | media: "all",
|
20762 | inherited: false,
|
20763 | animationType: "discrete",
|
20764 | percentages: "no",
|
20765 | groups: [
|
20766 | "CSS Counter Styles"
|
20767 | ],
|
20768 | initial: "none",
|
20769 | appliesto: "allElements",
|
20770 | computed: "asSpecified",
|
20771 | order: "uniqueOrder",
|
20772 | status: "standard",
|
20773 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
|
20774 | },
|
20775 | "counter-reset": {
|
20776 | syntax: "[ <custom-ident> <integer>? ]+ | none",
|
20777 | media: "all",
|
20778 | inherited: false,
|
20779 | animationType: "discrete",
|
20780 | percentages: "no",
|
20781 | groups: [
|
20782 | "CSS Counter Styles"
|
20783 | ],
|
20784 | initial: "none",
|
20785 | appliesto: "allElements",
|
20786 | computed: "asSpecified",
|
20787 | order: "uniqueOrder",
|
20788 | status: "standard",
|
20789 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
|
20790 | },
|
20791 | "counter-set": {
|
20792 | syntax: "[ <custom-ident> <integer>? ]+ | none",
|
20793 | media: "all",
|
20794 | inherited: false,
|
20795 | animationType: "discrete",
|
20796 | percentages: "no",
|
20797 | groups: [
|
20798 | "CSS Counter Styles"
|
20799 | ],
|
20800 | initial: "none",
|
20801 | appliesto: "allElements",
|
20802 | computed: "asSpecified",
|
20803 | order: "uniqueOrder",
|
20804 | status: "standard",
|
20805 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-set"
|
20806 | },
|
20807 | cursor: cursor,
|
20808 | direction: direction,
|
20809 | display: display,
|
20810 | "empty-cells": {
|
20811 | syntax: "show | hide",
|
20812 | media: "visual",
|
20813 | inherited: true,
|
20814 | animationType: "discrete",
|
20815 | percentages: "no",
|
20816 | groups: [
|
20817 | "CSS Table"
|
20818 | ],
|
20819 | initial: "show",
|
20820 | appliesto: "tableCellElements",
|
20821 | computed: "asSpecified",
|
20822 | order: "uniqueOrder",
|
20823 | status: "standard",
|
20824 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
|
20825 | },
|
20826 | filter: filter,
|
20827 | flex: flex,
|
20828 | "flex-basis": {
|
20829 | syntax: "content | <'width'>",
|
20830 | media: "visual",
|
20831 | inherited: false,
|
20832 | animationType: "lpc",
|
20833 | percentages: "referToFlexContainersInnerMainSize",
|
20834 | groups: [
|
20835 | "CSS Flexible Box Layout"
|
20836 | ],
|
20837 | initial: "auto",
|
20838 | appliesto: "flexItemsAndInFlowPseudos",
|
20839 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
20840 | order: "lengthOrPercentageBeforeKeywordIfBothPresent",
|
20841 | status: "standard",
|
20842 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
|
20843 | },
|
20844 | "flex-direction": {
|
20845 | syntax: "row | row-reverse | column | column-reverse",
|
20846 | media: "visual",
|
20847 | inherited: false,
|
20848 | animationType: "discrete",
|
20849 | percentages: "no",
|
20850 | groups: [
|
20851 | "CSS Flexible Box Layout"
|
20852 | ],
|
20853 | initial: "row",
|
20854 | appliesto: "flexContainers",
|
20855 | computed: "asSpecified",
|
20856 | order: "uniqueOrder",
|
20857 | status: "standard",
|
20858 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
|
20859 | },
|
20860 | "flex-flow": {
|
20861 | syntax: "<'flex-direction'> || <'flex-wrap'>",
|
20862 | media: "visual",
|
20863 | inherited: false,
|
20864 | animationType: "discrete",
|
20865 | percentages: "no",
|
20866 | groups: [
|
20867 | "CSS Flexible Box Layout"
|
20868 | ],
|
20869 | initial: [
|
20870 | "flex-direction",
|
20871 | "flex-wrap"
|
20872 | ],
|
20873 | appliesto: "flexContainers",
|
20874 | computed: [
|
20875 | "flex-direction",
|
20876 | "flex-wrap"
|
20877 | ],
|
20878 | order: "orderOfAppearance",
|
20879 | status: "standard",
|
20880 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
|
20881 | },
|
20882 | "flex-grow": {
|
20883 | syntax: "<number>",
|
20884 | media: "visual",
|
20885 | inherited: false,
|
20886 | animationType: "number",
|
20887 | percentages: "no",
|
20888 | groups: [
|
20889 | "CSS Flexible Box Layout"
|
20890 | ],
|
20891 | initial: "0",
|
20892 | appliesto: "flexItemsAndInFlowPseudos",
|
20893 | computed: "asSpecified",
|
20894 | order: "uniqueOrder",
|
20895 | status: "standard",
|
20896 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
|
20897 | },
|
20898 | "flex-shrink": {
|
20899 | syntax: "<number>",
|
20900 | media: "visual",
|
20901 | inherited: false,
|
20902 | animationType: "number",
|
20903 | percentages: "no",
|
20904 | groups: [
|
20905 | "CSS Flexible Box Layout"
|
20906 | ],
|
20907 | initial: "1",
|
20908 | appliesto: "flexItemsAndInFlowPseudos",
|
20909 | computed: "asSpecified",
|
20910 | order: "uniqueOrder",
|
20911 | status: "standard",
|
20912 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
|
20913 | },
|
20914 | "flex-wrap": {
|
20915 | syntax: "nowrap | wrap | wrap-reverse",
|
20916 | media: "visual",
|
20917 | inherited: false,
|
20918 | animationType: "discrete",
|
20919 | percentages: "no",
|
20920 | groups: [
|
20921 | "CSS Flexible Box Layout"
|
20922 | ],
|
20923 | initial: "nowrap",
|
20924 | appliesto: "flexContainers",
|
20925 | computed: "asSpecified",
|
20926 | order: "uniqueOrder",
|
20927 | status: "standard",
|
20928 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
|
20929 | },
|
20930 | float: float,
|
20931 | font: font,
|
20932 | "font-family": {
|
20933 | syntax: "[ <family-name> | <generic-family> ]#",
|
20934 | media: "visual",
|
20935 | inherited: true,
|
20936 | animationType: "discrete",
|
20937 | percentages: "no",
|
20938 | groups: [
|
20939 | "CSS Fonts"
|
20940 | ],
|
20941 | initial: "dependsOnUserAgent",
|
20942 | appliesto: "allElements",
|
20943 | computed: "asSpecified",
|
20944 | order: "uniqueOrder",
|
20945 | alsoAppliesTo: [
|
20946 | "::first-letter",
|
20947 | "::first-line",
|
20948 | "::placeholder"
|
20949 | ],
|
20950 | status: "standard",
|
20951 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-family"
|
20952 | },
|
20953 | "font-feature-settings": {
|
20954 | syntax: "normal | <feature-tag-value>#",
|
20955 | media: "visual",
|
20956 | inherited: true,
|
20957 | animationType: "discrete",
|
20958 | percentages: "no",
|
20959 | groups: [
|
20960 | "CSS Fonts"
|
20961 | ],
|
20962 | initial: "normal",
|
20963 | appliesto: "allElements",
|
20964 | computed: "asSpecified",
|
20965 | order: "uniqueOrder",
|
20966 | alsoAppliesTo: [
|
20967 | "::first-letter",
|
20968 | "::first-line",
|
20969 | "::placeholder"
|
20970 | ],
|
20971 | status: "standard",
|
20972 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
|
20973 | },
|
20974 | "font-kerning": {
|
20975 | syntax: "auto | normal | none",
|
20976 | media: "visual",
|
20977 | inherited: true,
|
20978 | animationType: "discrete",
|
20979 | percentages: "no",
|
20980 | groups: [
|
20981 | "CSS Fonts"
|
20982 | ],
|
20983 | initial: "auto",
|
20984 | appliesto: "allElements",
|
20985 | computed: "asSpecified",
|
20986 | order: "uniqueOrder",
|
20987 | alsoAppliesTo: [
|
20988 | "::first-letter",
|
20989 | "::first-line",
|
20990 | "::placeholder"
|
20991 | ],
|
20992 | status: "standard",
|
20993 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
|
20994 | },
|
20995 | "font-language-override": {
|
20996 | syntax: "normal | <string>",
|
20997 | media: "visual",
|
20998 | inherited: true,
|
20999 | animationType: "discrete",
|
21000 | percentages: "no",
|
21001 | groups: [
|
21002 | "CSS Fonts"
|
21003 | ],
|
21004 | initial: "normal",
|
21005 | appliesto: "allElements",
|
21006 | computed: "asSpecified",
|
21007 | order: "uniqueOrder",
|
21008 | alsoAppliesTo: [
|
21009 | "::first-letter",
|
21010 | "::first-line",
|
21011 | "::placeholder"
|
21012 | ],
|
21013 | status: "standard",
|
21014 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
|
21015 | },
|
21016 | "font-optical-sizing": {
|
21017 | syntax: "auto | none",
|
21018 | media: "visual",
|
21019 | inherited: true,
|
21020 | animationType: "discrete",
|
21021 | percentages: "no",
|
21022 | groups: [
|
21023 | "CSS Fonts"
|
21024 | ],
|
21025 | initial: "auto",
|
21026 | appliesto: "allElements",
|
21027 | computed: "asSpecified",
|
21028 | order: "perGrammar",
|
21029 | alsoAppliesTo: [
|
21030 | "::first-letter",
|
21031 | "::first-line",
|
21032 | "::placeholder"
|
21033 | ],
|
21034 | status: "standard",
|
21035 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
|
21036 | },
|
21037 | "font-variation-settings": {
|
21038 | syntax: "normal | [ <string> <number> ]#",
|
21039 | media: "visual",
|
21040 | inherited: true,
|
21041 | animationType: "transform",
|
21042 | percentages: "no",
|
21043 | groups: [
|
21044 | "CSS Fonts"
|
21045 | ],
|
21046 | initial: "normal",
|
21047 | appliesto: "allElements",
|
21048 | computed: "asSpecified",
|
21049 | order: "perGrammar",
|
21050 | alsoAppliesTo: [
|
21051 | "::first-letter",
|
21052 | "::first-line",
|
21053 | "::placeholder"
|
21054 | ],
|
21055 | status: "standard",
|
21056 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
|
21057 | },
|
21058 | "font-size": {
|
21059 | syntax: "<absolute-size> | <relative-size> | <length-percentage>",
|
21060 | media: "visual",
|
21061 | inherited: true,
|
21062 | animationType: "length",
|
21063 | percentages: "referToParentElementsFontSize",
|
21064 | groups: [
|
21065 | "CSS Fonts"
|
21066 | ],
|
21067 | initial: "medium",
|
21068 | appliesto: "allElements",
|
21069 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
21070 | order: "uniqueOrder",
|
21071 | alsoAppliesTo: [
|
21072 | "::first-letter",
|
21073 | "::first-line",
|
21074 | "::placeholder"
|
21075 | ],
|
21076 | status: "standard",
|
21077 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size"
|
21078 | },
|
21079 | "font-size-adjust": {
|
21080 | syntax: "none | <number>",
|
21081 | media: "visual",
|
21082 | inherited: true,
|
21083 | animationType: "number",
|
21084 | percentages: "no",
|
21085 | groups: [
|
21086 | "CSS Fonts"
|
21087 | ],
|
21088 | initial: "none",
|
21089 | appliesto: "allElements",
|
21090 | computed: "asSpecified",
|
21091 | order: "uniqueOrder",
|
21092 | alsoAppliesTo: [
|
21093 | "::first-letter",
|
21094 | "::first-line",
|
21095 | "::placeholder"
|
21096 | ],
|
21097 | status: "standard",
|
21098 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
|
21099 | },
|
21100 | "font-smooth": {
|
21101 | syntax: "auto | never | always | <absolute-size> | <length>",
|
21102 | media: "visual",
|
21103 | inherited: true,
|
21104 | animationType: "discrete",
|
21105 | percentages: "no",
|
21106 | groups: [
|
21107 | "CSS Fonts"
|
21108 | ],
|
21109 | initial: "auto",
|
21110 | appliesto: "allElements",
|
21111 | computed: "asSpecified",
|
21112 | order: "uniqueOrder",
|
21113 | status: "nonstandard",
|
21114 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
|
21115 | },
|
21116 | "font-stretch": {
|
21117 | syntax: "<font-stretch-absolute>",
|
21118 | media: "visual",
|
21119 | inherited: true,
|
21120 | animationType: "fontStretch",
|
21121 | percentages: "no",
|
21122 | groups: [
|
21123 | "CSS Fonts"
|
21124 | ],
|
21125 | initial: "normal",
|
21126 | appliesto: "allElements",
|
21127 | computed: "asSpecified",
|
21128 | order: "uniqueOrder",
|
21129 | alsoAppliesTo: [
|
21130 | "::first-letter",
|
21131 | "::first-line",
|
21132 | "::placeholder"
|
21133 | ],
|
21134 | status: "standard",
|
21135 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
|
21136 | },
|
21137 | "font-style": {
|
21138 | syntax: "normal | italic | oblique <angle>?",
|
21139 | media: "visual",
|
21140 | inherited: true,
|
21141 | animationType: "discrete",
|
21142 | percentages: "no",
|
21143 | groups: [
|
21144 | "CSS Fonts"
|
21145 | ],
|
21146 | initial: "normal",
|
21147 | appliesto: "allElements",
|
21148 | computed: "asSpecified",
|
21149 | order: "uniqueOrder",
|
21150 | alsoAppliesTo: [
|
21151 | "::first-letter",
|
21152 | "::first-line",
|
21153 | "::placeholder"
|
21154 | ],
|
21155 | status: "standard",
|
21156 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-style"
|
21157 | },
|
21158 | "font-synthesis": {
|
21159 | syntax: "none | [ weight || style ]",
|
21160 | media: "visual",
|
21161 | inherited: true,
|
21162 | animationType: "discrete",
|
21163 | percentages: "no",
|
21164 | groups: [
|
21165 | "CSS Fonts"
|
21166 | ],
|
21167 | initial: "weight style",
|
21168 | appliesto: "allElements",
|
21169 | computed: "asSpecified",
|
21170 | order: "orderOfAppearance",
|
21171 | alsoAppliesTo: [
|
21172 | "::first-letter",
|
21173 | "::first-line",
|
21174 | "::placeholder"
|
21175 | ],
|
21176 | status: "standard",
|
21177 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
|
21178 | },
|
21179 | "font-variant": {
|
21180 | syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
|
21181 | media: "visual",
|
21182 | inherited: true,
|
21183 | animationType: "discrete",
|
21184 | percentages: "no",
|
21185 | groups: [
|
21186 | "CSS Fonts"
|
21187 | ],
|
21188 | initial: "normal",
|
21189 | appliesto: "allElements",
|
21190 | computed: "asSpecified",
|
21191 | order: "uniqueOrder",
|
21192 | alsoAppliesTo: [
|
21193 | "::first-letter",
|
21194 | "::first-line",
|
21195 | "::placeholder"
|
21196 | ],
|
21197 | status: "standard",
|
21198 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant"
|
21199 | },
|
21200 | "font-variant-alternates": {
|
21201 | syntax: "normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]",
|
21202 | media: "visual",
|
21203 | inherited: true,
|
21204 | animationType: "discrete",
|
21205 | percentages: "no",
|
21206 | groups: [
|
21207 | "CSS Fonts"
|
21208 | ],
|
21209 | initial: "normal",
|
21210 | appliesto: "allElements",
|
21211 | computed: "asSpecified",
|
21212 | order: "orderOfAppearance",
|
21213 | alsoAppliesTo: [
|
21214 | "::first-letter",
|
21215 | "::first-line",
|
21216 | "::placeholder"
|
21217 | ],
|
21218 | status: "standard",
|
21219 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
|
21220 | },
|
21221 | "font-variant-caps": {
|
21222 | syntax: "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
|
21223 | media: "visual",
|
21224 | inherited: true,
|
21225 | animationType: "discrete",
|
21226 | percentages: "no",
|
21227 | groups: [
|
21228 | "CSS Fonts"
|
21229 | ],
|
21230 | initial: "normal",
|
21231 | appliesto: "allElements",
|
21232 | computed: "asSpecified",
|
21233 | order: "uniqueOrder",
|
21234 | alsoAppliesTo: [
|
21235 | "::first-letter",
|
21236 | "::first-line",
|
21237 | "::placeholder"
|
21238 | ],
|
21239 | status: "standard",
|
21240 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
|
21241 | },
|
21242 | "font-variant-east-asian": {
|
21243 | syntax: "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
|
21244 | media: "visual",
|
21245 | inherited: true,
|
21246 | animationType: "discrete",
|
21247 | percentages: "no",
|
21248 | groups: [
|
21249 | "CSS Fonts"
|
21250 | ],
|
21251 | initial: "normal",
|
21252 | appliesto: "allElements",
|
21253 | computed: "asSpecified",
|
21254 | order: "orderOfAppearance",
|
21255 | alsoAppliesTo: [
|
21256 | "::first-letter",
|
21257 | "::first-line",
|
21258 | "::placeholder"
|
21259 | ],
|
21260 | status: "standard",
|
21261 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
|
21262 | },
|
21263 | "font-variant-ligatures": {
|
21264 | syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
|
21265 | media: "visual",
|
21266 | inherited: true,
|
21267 | animationType: "discrete",
|
21268 | percentages: "no",
|
21269 | groups: [
|
21270 | "CSS Fonts"
|
21271 | ],
|
21272 | initial: "normal",
|
21273 | appliesto: "allElements",
|
21274 | computed: "asSpecified",
|
21275 | order: "orderOfAppearance",
|
21276 | alsoAppliesTo: [
|
21277 | "::first-letter",
|
21278 | "::first-line",
|
21279 | "::placeholder"
|
21280 | ],
|
21281 | status: "standard",
|
21282 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
|
21283 | },
|
21284 | "font-variant-numeric": {
|
21285 | syntax: "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
|
21286 | media: "visual",
|
21287 | inherited: true,
|
21288 | animationType: "discrete",
|
21289 | percentages: "no",
|
21290 | groups: [
|
21291 | "CSS Fonts"
|
21292 | ],
|
21293 | initial: "normal",
|
21294 | appliesto: "allElements",
|
21295 | computed: "asSpecified",
|
21296 | order: "orderOfAppearance",
|
21297 | alsoAppliesTo: [
|
21298 | "::first-letter",
|
21299 | "::first-line",
|
21300 | "::placeholder"
|
21301 | ],
|
21302 | status: "standard",
|
21303 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
|
21304 | },
|
21305 | "font-variant-position": {
|
21306 | syntax: "normal | sub | super",
|
21307 | media: "visual",
|
21308 | inherited: true,
|
21309 | animationType: "discrete",
|
21310 | percentages: "no",
|
21311 | groups: [
|
21312 | "CSS Fonts"
|
21313 | ],
|
21314 | initial: "normal",
|
21315 | appliesto: "allElements",
|
21316 | computed: "asSpecified",
|
21317 | order: "uniqueOrder",
|
21318 | alsoAppliesTo: [
|
21319 | "::first-letter",
|
21320 | "::first-line",
|
21321 | "::placeholder"
|
21322 | ],
|
21323 | status: "standard",
|
21324 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
|
21325 | },
|
21326 | "font-weight": {
|
21327 | syntax: "<font-weight-absolute> | bolder | lighter",
|
21328 | media: "visual",
|
21329 | inherited: true,
|
21330 | animationType: "fontWeight",
|
21331 | percentages: "no",
|
21332 | groups: [
|
21333 | "CSS Fonts"
|
21334 | ],
|
21335 | initial: "normal",
|
21336 | appliesto: "allElements",
|
21337 | computed: "keywordOrNumericalValueBolderLighterTransformedToRealValue",
|
21338 | order: "uniqueOrder",
|
21339 | alsoAppliesTo: [
|
21340 | "::first-letter",
|
21341 | "::first-line",
|
21342 | "::placeholder"
|
21343 | ],
|
21344 | status: "standard",
|
21345 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-weight"
|
21346 | },
|
21347 | gap: gap,
|
21348 | grid: grid,
|
21349 | "grid-area": {
|
21350 | syntax: "<grid-line> [ / <grid-line> ]{0,3}",
|
21351 | media: "visual",
|
21352 | inherited: false,
|
21353 | animationType: "discrete",
|
21354 | percentages: "no",
|
21355 | groups: [
|
21356 | "CSS Grid Layout"
|
21357 | ],
|
21358 | initial: [
|
21359 | "grid-row-start",
|
21360 | "grid-column-start",
|
21361 | "grid-row-end",
|
21362 | "grid-column-end"
|
21363 | ],
|
21364 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21365 | computed: [
|
21366 | "grid-row-start",
|
21367 | "grid-column-start",
|
21368 | "grid-row-end",
|
21369 | "grid-column-end"
|
21370 | ],
|
21371 | order: "uniqueOrder",
|
21372 | status: "standard",
|
21373 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-area"
|
21374 | },
|
21375 | "grid-auto-columns": {
|
21376 | syntax: "<track-size>+",
|
21377 | media: "visual",
|
21378 | inherited: false,
|
21379 | animationType: "discrete",
|
21380 | percentages: "referToDimensionOfContentArea",
|
21381 | groups: [
|
21382 | "CSS Grid Layout"
|
21383 | ],
|
21384 | initial: "auto",
|
21385 | appliesto: "gridContainers",
|
21386 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
21387 | order: "uniqueOrder",
|
21388 | status: "standard",
|
21389 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
|
21390 | },
|
21391 | "grid-auto-flow": {
|
21392 | syntax: "[ row | column ] || dense",
|
21393 | media: "visual",
|
21394 | inherited: false,
|
21395 | animationType: "discrete",
|
21396 | percentages: "no",
|
21397 | groups: [
|
21398 | "CSS Grid Layout"
|
21399 | ],
|
21400 | initial: "row",
|
21401 | appliesto: "gridContainers",
|
21402 | computed: "asSpecified",
|
21403 | order: "uniqueOrder",
|
21404 | status: "standard",
|
21405 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
|
21406 | },
|
21407 | "grid-auto-rows": {
|
21408 | syntax: "<track-size>+",
|
21409 | media: "visual",
|
21410 | inherited: false,
|
21411 | animationType: "discrete",
|
21412 | percentages: "referToDimensionOfContentArea",
|
21413 | groups: [
|
21414 | "CSS Grid Layout"
|
21415 | ],
|
21416 | initial: "auto",
|
21417 | appliesto: "gridContainers",
|
21418 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
21419 | order: "uniqueOrder",
|
21420 | status: "standard",
|
21421 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
|
21422 | },
|
21423 | "grid-column": {
|
21424 | syntax: "<grid-line> [ / <grid-line> ]?",
|
21425 | media: "visual",
|
21426 | inherited: false,
|
21427 | animationType: "discrete",
|
21428 | percentages: "no",
|
21429 | groups: [
|
21430 | "CSS Grid Layout"
|
21431 | ],
|
21432 | initial: [
|
21433 | "grid-column-start",
|
21434 | "grid-column-end"
|
21435 | ],
|
21436 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21437 | computed: [
|
21438 | "grid-column-start",
|
21439 | "grid-column-end"
|
21440 | ],
|
21441 | order: "uniqueOrder",
|
21442 | status: "standard",
|
21443 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column"
|
21444 | },
|
21445 | "grid-column-end": {
|
21446 | syntax: "<grid-line>",
|
21447 | media: "visual",
|
21448 | inherited: false,
|
21449 | animationType: "discrete",
|
21450 | percentages: "no",
|
21451 | groups: [
|
21452 | "CSS Grid Layout"
|
21453 | ],
|
21454 | initial: "auto",
|
21455 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21456 | computed: "asSpecified",
|
21457 | order: "uniqueOrder",
|
21458 | status: "standard",
|
21459 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
|
21460 | },
|
21461 | "grid-column-gap": {
|
21462 | syntax: "<length-percentage>",
|
21463 | media: "visual",
|
21464 | inherited: false,
|
21465 | animationType: "length",
|
21466 | percentages: "referToDimensionOfContentArea",
|
21467 | groups: [
|
21468 | "CSS Grid Layout"
|
21469 | ],
|
21470 | initial: "0",
|
21471 | appliesto: "gridContainers",
|
21472 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
21473 | order: "uniqueOrder",
|
21474 | status: "obsolete",
|
21475 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
|
21476 | },
|
21477 | "grid-column-start": {
|
21478 | syntax: "<grid-line>",
|
21479 | media: "visual",
|
21480 | inherited: false,
|
21481 | animationType: "discrete",
|
21482 | percentages: "no",
|
21483 | groups: [
|
21484 | "CSS Grid Layout"
|
21485 | ],
|
21486 | initial: "auto",
|
21487 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21488 | computed: "asSpecified",
|
21489 | order: "uniqueOrder",
|
21490 | status: "standard",
|
21491 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
|
21492 | },
|
21493 | "grid-gap": {
|
21494 | syntax: "<'grid-row-gap'> <'grid-column-gap'>?",
|
21495 | media: "visual",
|
21496 | inherited: false,
|
21497 | animationType: [
|
21498 | "grid-row-gap",
|
21499 | "grid-column-gap"
|
21500 | ],
|
21501 | percentages: "no",
|
21502 | groups: [
|
21503 | "CSS Grid Layout"
|
21504 | ],
|
21505 | initial: [
|
21506 | "grid-row-gap",
|
21507 | "grid-column-gap"
|
21508 | ],
|
21509 | appliesto: "gridContainers",
|
21510 | computed: [
|
21511 | "grid-row-gap",
|
21512 | "grid-column-gap"
|
21513 | ],
|
21514 | order: "uniqueOrder",
|
21515 | status: "obsolete",
|
21516 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
|
21517 | },
|
21518 | "grid-row": {
|
21519 | syntax: "<grid-line> [ / <grid-line> ]?",
|
21520 | media: "visual",
|
21521 | inherited: false,
|
21522 | animationType: "discrete",
|
21523 | percentages: "no",
|
21524 | groups: [
|
21525 | "CSS Grid Layout"
|
21526 | ],
|
21527 | initial: [
|
21528 | "grid-row-start",
|
21529 | "grid-row-end"
|
21530 | ],
|
21531 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21532 | computed: [
|
21533 | "grid-row-start",
|
21534 | "grid-row-end"
|
21535 | ],
|
21536 | order: "uniqueOrder",
|
21537 | status: "standard",
|
21538 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row"
|
21539 | },
|
21540 | "grid-row-end": {
|
21541 | syntax: "<grid-line>",
|
21542 | media: "visual",
|
21543 | inherited: false,
|
21544 | animationType: "discrete",
|
21545 | percentages: "no",
|
21546 | groups: [
|
21547 | "CSS Grid Layout"
|
21548 | ],
|
21549 | initial: "auto",
|
21550 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21551 | computed: "asSpecified",
|
21552 | order: "uniqueOrder",
|
21553 | status: "standard",
|
21554 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
|
21555 | },
|
21556 | "grid-row-gap": {
|
21557 | syntax: "<length-percentage>",
|
21558 | media: "visual",
|
21559 | inherited: false,
|
21560 | animationType: "length",
|
21561 | percentages: "referToDimensionOfContentArea",
|
21562 | groups: [
|
21563 | "CSS Grid Layout"
|
21564 | ],
|
21565 | initial: "0",
|
21566 | appliesto: "gridContainers",
|
21567 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
21568 | order: "uniqueOrder",
|
21569 | status: "obsolete",
|
21570 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
|
21571 | },
|
21572 | "grid-row-start": {
|
21573 | syntax: "<grid-line>",
|
21574 | media: "visual",
|
21575 | inherited: false,
|
21576 | animationType: "discrete",
|
21577 | percentages: "no",
|
21578 | groups: [
|
21579 | "CSS Grid Layout"
|
21580 | ],
|
21581 | initial: "auto",
|
21582 | appliesto: "gridItemsAndBoxesWithinGridContainer",
|
21583 | computed: "asSpecified",
|
21584 | order: "uniqueOrder",
|
21585 | status: "standard",
|
21586 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
|
21587 | },
|
21588 | "grid-template": {
|
21589 | syntax: "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
|
21590 | media: "visual",
|
21591 | inherited: false,
|
21592 | animationType: "discrete",
|
21593 | percentages: [
|
21594 | "grid-template-columns",
|
21595 | "grid-template-rows"
|
21596 | ],
|
21597 | groups: [
|
21598 | "CSS Grid Layout"
|
21599 | ],
|
21600 | initial: [
|
21601 | "grid-template-columns",
|
21602 | "grid-template-rows",
|
21603 | "grid-template-areas"
|
21604 | ],
|
21605 | appliesto: "gridContainers",
|
21606 | computed: [
|
21607 | "grid-template-columns",
|
21608 | "grid-template-rows",
|
21609 | "grid-template-areas"
|
21610 | ],
|
21611 | order: "uniqueOrder",
|
21612 | status: "standard",
|
21613 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template"
|
21614 | },
|
21615 | "grid-template-areas": {
|
21616 | syntax: "none | <string>+",
|
21617 | media: "visual",
|
21618 | inherited: false,
|
21619 | animationType: "discrete",
|
21620 | percentages: "no",
|
21621 | groups: [
|
21622 | "CSS Grid Layout"
|
21623 | ],
|
21624 | initial: "none",
|
21625 | appliesto: "gridContainers",
|
21626 | computed: "asSpecified",
|
21627 | order: "uniqueOrder",
|
21628 | status: "standard",
|
21629 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
|
21630 | },
|
21631 | "grid-template-columns": {
|
21632 | syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
|
21633 | media: "visual",
|
21634 | inherited: false,
|
21635 | animationType: "simpleListOfLpcDifferenceLpc",
|
21636 | percentages: "referToDimensionOfContentArea",
|
21637 | groups: [
|
21638 | "CSS Grid Layout"
|
21639 | ],
|
21640 | initial: "none",
|
21641 | appliesto: "gridContainers",
|
21642 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
21643 | order: "uniqueOrder",
|
21644 | status: "standard",
|
21645 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
|
21646 | },
|
21647 | "grid-template-rows": {
|
21648 | syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
|
21649 | media: "visual",
|
21650 | inherited: false,
|
21651 | animationType: "simpleListOfLpcDifferenceLpc",
|
21652 | percentages: "referToDimensionOfContentArea",
|
21653 | groups: [
|
21654 | "CSS Grid Layout"
|
21655 | ],
|
21656 | initial: "none",
|
21657 | appliesto: "gridContainers",
|
21658 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
21659 | order: "uniqueOrder",
|
21660 | status: "standard",
|
21661 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
|
21662 | },
|
21663 | "hanging-punctuation": {
|
21664 | syntax: "none | [ first || [ force-end | allow-end ] || last ]",
|
21665 | media: "visual",
|
21666 | inherited: true,
|
21667 | animationType: "discrete",
|
21668 | percentages: "no",
|
21669 | groups: [
|
21670 | "CSS Text"
|
21671 | ],
|
21672 | initial: "none",
|
21673 | appliesto: "allElements",
|
21674 | computed: "asSpecified",
|
21675 | order: "uniqueOrder",
|
21676 | status: "standard",
|
21677 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
|
21678 | },
|
21679 | height: height,
|
21680 | hyphens: hyphens,
|
21681 | "image-orientation": {
|
21682 | syntax: "from-image | <angle> | [ <angle>? flip ]",
|
21683 | media: "visual",
|
21684 | inherited: true,
|
21685 | animationType: "discrete",
|
21686 | percentages: "no",
|
21687 | groups: [
|
21688 | "CSS Images"
|
21689 | ],
|
21690 | initial: "from-image",
|
21691 | appliesto: "allElements",
|
21692 | computed: "angleRoundedToNextQuarter",
|
21693 | order: "uniqueOrder",
|
21694 | status: "standard",
|
21695 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
|
21696 | },
|
21697 | "image-rendering": {
|
21698 | syntax: "auto | crisp-edges | pixelated",
|
21699 | media: "visual",
|
21700 | inherited: true,
|
21701 | animationType: "discrete",
|
21702 | percentages: "no",
|
21703 | groups: [
|
21704 | "CSS Images"
|
21705 | ],
|
21706 | initial: "auto",
|
21707 | appliesto: "allElements",
|
21708 | computed: "asSpecified",
|
21709 | order: "uniqueOrder",
|
21710 | status: "standard",
|
21711 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
|
21712 | },
|
21713 | "image-resolution": {
|
21714 | syntax: "[ from-image || <resolution> ] && snap?",
|
21715 | media: "visual",
|
21716 | inherited: true,
|
21717 | animationType: "discrete",
|
21718 | percentages: "no",
|
21719 | groups: [
|
21720 | "CSS Images"
|
21721 | ],
|
21722 | initial: "1dppx",
|
21723 | appliesto: "allElements",
|
21724 | computed: "asSpecifiedWithExceptionOfResolution",
|
21725 | order: "uniqueOrder",
|
21726 | status: "experimental"
|
21727 | },
|
21728 | "ime-mode": {
|
21729 | syntax: "auto | normal | active | inactive | disabled",
|
21730 | media: "interactive",
|
21731 | inherited: false,
|
21732 | animationType: "discrete",
|
21733 | percentages: "no",
|
21734 | groups: [
|
21735 | "CSS Basic User Interface"
|
21736 | ],
|
21737 | initial: "auto",
|
21738 | appliesto: "textFields",
|
21739 | computed: "asSpecified",
|
21740 | order: "uniqueOrder",
|
21741 | status: "obsolete",
|
21742 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
|
21743 | },
|
21744 | "initial-letter": {
|
21745 | syntax: "normal | [ <number> <integer>? ]",
|
21746 | media: "visual",
|
21747 | inherited: false,
|
21748 | animationType: "discrete",
|
21749 | percentages: "no",
|
21750 | groups: [
|
21751 | "CSS Inline"
|
21752 | ],
|
21753 | initial: "normal",
|
21754 | appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
|
21755 | computed: "asSpecified",
|
21756 | order: "uniqueOrder",
|
21757 | status: "experimental",
|
21758 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
|
21759 | },
|
21760 | "initial-letter-align": {
|
21761 | syntax: "[ auto | alphabetic | hanging | ideographic ]",
|
21762 | media: "visual",
|
21763 | inherited: false,
|
21764 | animationType: "discrete",
|
21765 | percentages: "no",
|
21766 | groups: [
|
21767 | "CSS Inline"
|
21768 | ],
|
21769 | initial: "auto",
|
21770 | appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
|
21771 | computed: "asSpecified",
|
21772 | order: "uniqueOrder",
|
21773 | status: "experimental",
|
21774 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
|
21775 | },
|
21776 | "inline-size": {
|
21777 | syntax: "<'width'>",
|
21778 | media: "visual",
|
21779 | inherited: false,
|
21780 | animationType: "lpc",
|
21781 | percentages: "inlineSizeOfContainingBlock",
|
21782 | groups: [
|
21783 | "CSS Logical Properties"
|
21784 | ],
|
21785 | initial: "auto",
|
21786 | appliesto: "sameAsWidthAndHeight",
|
21787 | computed: "sameAsWidthAndHeight",
|
21788 | order: "uniqueOrder",
|
21789 | status: "standard",
|
21790 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inline-size"
|
21791 | },
|
21792 | inset: inset,
|
21793 | "inset-block": {
|
21794 | syntax: "<'top'>{1,2}",
|
21795 | media: "visual",
|
21796 | inherited: false,
|
21797 | animationType: "lpc",
|
21798 | percentages: "logicalHeightOfContainingBlock",
|
21799 | groups: [
|
21800 | "CSS Logical Properties"
|
21801 | ],
|
21802 | initial: "auto",
|
21803 | appliesto: "positionedElements",
|
21804 | computed: "sameAsBoxOffsets",
|
21805 | order: "uniqueOrder",
|
21806 | status: "standard",
|
21807 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block"
|
21808 | },
|
21809 | "inset-block-end": {
|
21810 | syntax: "<'top'>",
|
21811 | media: "visual",
|
21812 | inherited: false,
|
21813 | animationType: "lpc",
|
21814 | percentages: "logicalHeightOfContainingBlock",
|
21815 | groups: [
|
21816 | "CSS Logical Properties"
|
21817 | ],
|
21818 | initial: "auto",
|
21819 | appliesto: "positionedElements",
|
21820 | computed: "sameAsBoxOffsets",
|
21821 | order: "uniqueOrder",
|
21822 | status: "standard",
|
21823 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
|
21824 | },
|
21825 | "inset-block-start": {
|
21826 | syntax: "<'top'>",
|
21827 | media: "visual",
|
21828 | inherited: false,
|
21829 | animationType: "lpc",
|
21830 | percentages: "logicalHeightOfContainingBlock",
|
21831 | groups: [
|
21832 | "CSS Logical Properties"
|
21833 | ],
|
21834 | initial: "auto",
|
21835 | appliesto: "positionedElements",
|
21836 | computed: "sameAsBoxOffsets",
|
21837 | order: "uniqueOrder",
|
21838 | status: "standard",
|
21839 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
|
21840 | },
|
21841 | "inset-inline": {
|
21842 | syntax: "<'top'>{1,2}",
|
21843 | media: "visual",
|
21844 | inherited: false,
|
21845 | animationType: "lpc",
|
21846 | percentages: "logicalWidthOfContainingBlock",
|
21847 | groups: [
|
21848 | "CSS Logical Properties"
|
21849 | ],
|
21850 | initial: "auto",
|
21851 | appliesto: "positionedElements",
|
21852 | computed: "sameAsBoxOffsets",
|
21853 | order: "uniqueOrder",
|
21854 | status: "standard",
|
21855 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
|
21856 | },
|
21857 | "inset-inline-end": {
|
21858 | syntax: "<'top'>",
|
21859 | media: "visual",
|
21860 | inherited: false,
|
21861 | animationType: "lpc",
|
21862 | percentages: "logicalWidthOfContainingBlock",
|
21863 | groups: [
|
21864 | "CSS Logical Properties"
|
21865 | ],
|
21866 | initial: "auto",
|
21867 | appliesto: "positionedElements",
|
21868 | computed: "sameAsBoxOffsets",
|
21869 | order: "uniqueOrder",
|
21870 | status: "standard",
|
21871 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
|
21872 | },
|
21873 | "inset-inline-start": {
|
21874 | syntax: "<'top'>",
|
21875 | media: "visual",
|
21876 | inherited: false,
|
21877 | animationType: "lpc",
|
21878 | percentages: "logicalWidthOfContainingBlock",
|
21879 | groups: [
|
21880 | "CSS Logical Properties"
|
21881 | ],
|
21882 | initial: "auto",
|
21883 | appliesto: "positionedElements",
|
21884 | computed: "sameAsBoxOffsets",
|
21885 | order: "uniqueOrder",
|
21886 | status: "standard",
|
21887 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
|
21888 | },
|
21889 | isolation: isolation,
|
21890 | "justify-content": {
|
21891 | syntax: "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
|
21892 | media: "visual",
|
21893 | inherited: false,
|
21894 | animationType: "discrete",
|
21895 | percentages: "no",
|
21896 | groups: [
|
21897 | "CSS Box Alignment"
|
21898 | ],
|
21899 | initial: "normal",
|
21900 | appliesto: "flexContainers",
|
21901 | computed: "asSpecified",
|
21902 | order: "uniqueOrder",
|
21903 | status: "standard",
|
21904 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-content"
|
21905 | },
|
21906 | "justify-items": {
|
21907 | syntax: "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
|
21908 | media: "visual",
|
21909 | inherited: false,
|
21910 | animationType: "discrete",
|
21911 | percentages: "no",
|
21912 | groups: [
|
21913 | "CSS Box Alignment"
|
21914 | ],
|
21915 | initial: "legacy",
|
21916 | appliesto: "allElements",
|
21917 | computed: "asSpecified",
|
21918 | order: "perGrammar",
|
21919 | status: "standard",
|
21920 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-items"
|
21921 | },
|
21922 | "justify-self": {
|
21923 | syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
|
21924 | media: "visual",
|
21925 | inherited: false,
|
21926 | animationType: "discrete",
|
21927 | percentages: "no",
|
21928 | groups: [
|
21929 | "CSS Box Alignment"
|
21930 | ],
|
21931 | initial: "auto",
|
21932 | appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
|
21933 | computed: "asSpecified",
|
21934 | order: "uniqueOrder",
|
21935 | status: "standard",
|
21936 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-self"
|
21937 | },
|
21938 | "justify-tracks": {
|
21939 | syntax: "[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#",
|
21940 | media: "visual",
|
21941 | inherited: false,
|
21942 | animationType: "discrete",
|
21943 | percentages: "no",
|
21944 | groups: [
|
21945 | "CSS Grid Layout"
|
21946 | ],
|
21947 | initial: "normal",
|
21948 | appliesto: "gridContainersWithMasonryLayoutInTheirInlineAxis",
|
21949 | computed: "asSpecified",
|
21950 | order: "uniqueOrder",
|
21951 | status: "experimental",
|
21952 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-tracks"
|
21953 | },
|
21954 | left: left,
|
21955 | "letter-spacing": {
|
21956 | syntax: "normal | <length>",
|
21957 | media: "visual",
|
21958 | inherited: true,
|
21959 | animationType: "length",
|
21960 | percentages: "no",
|
21961 | groups: [
|
21962 | "CSS Text"
|
21963 | ],
|
21964 | initial: "normal",
|
21965 | appliesto: "allElements",
|
21966 | computed: "optimumValueOfAbsoluteLengthOrNormal",
|
21967 | order: "uniqueOrder",
|
21968 | alsoAppliesTo: [
|
21969 | "::first-letter",
|
21970 | "::first-line"
|
21971 | ],
|
21972 | status: "standard",
|
21973 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
|
21974 | },
|
21975 | "line-break": {
|
21976 | syntax: "auto | loose | normal | strict | anywhere",
|
21977 | media: "visual",
|
21978 | inherited: true,
|
21979 | animationType: "discrete",
|
21980 | percentages: "no",
|
21981 | groups: [
|
21982 | "CSS Text"
|
21983 | ],
|
21984 | initial: "auto",
|
21985 | appliesto: "allElements",
|
21986 | computed: "asSpecified",
|
21987 | order: "uniqueOrder",
|
21988 | status: "standard",
|
21989 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-break"
|
21990 | },
|
21991 | "line-clamp": {
|
21992 | syntax: "none | <integer>",
|
21993 | media: "visual",
|
21994 | inherited: false,
|
21995 | animationType: "integer",
|
21996 | percentages: "no",
|
21997 | groups: [
|
21998 | "CSS Overflow"
|
21999 | ],
|
22000 | initial: "none",
|
22001 | appliesto: "blockContainersExceptMultiColumnContainers",
|
22002 | computed: "asSpecified",
|
22003 | order: "perGrammar",
|
22004 | status: "experimental"
|
22005 | },
|
22006 | "line-height": {
|
22007 | syntax: "normal | <number> | <length> | <percentage>",
|
22008 | media: "visual",
|
22009 | inherited: true,
|
22010 | animationType: "numberOrLength",
|
22011 | percentages: "referToElementFontSize",
|
22012 | groups: [
|
22013 | "CSS Fonts"
|
22014 | ],
|
22015 | initial: "normal",
|
22016 | appliesto: "allElements",
|
22017 | computed: "absoluteLengthOrAsSpecified",
|
22018 | order: "uniqueOrder",
|
22019 | alsoAppliesTo: [
|
22020 | "::first-letter",
|
22021 | "::first-line",
|
22022 | "::placeholder"
|
22023 | ],
|
22024 | status: "standard",
|
22025 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height"
|
22026 | },
|
22027 | "line-height-step": {
|
22028 | syntax: "<length>",
|
22029 | media: "visual",
|
22030 | inherited: true,
|
22031 | animationType: "discrete",
|
22032 | percentages: "no",
|
22033 | groups: [
|
22034 | "CSS Fonts"
|
22035 | ],
|
22036 | initial: "0",
|
22037 | appliesto: "blockContainers",
|
22038 | computed: "absoluteLength",
|
22039 | order: "perGrammar",
|
22040 | status: "experimental",
|
22041 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
|
22042 | },
|
22043 | "list-style": {
|
22044 | syntax: "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
|
22045 | media: "visual",
|
22046 | inherited: true,
|
22047 | animationType: "discrete",
|
22048 | percentages: "no",
|
22049 | groups: [
|
22050 | "CSS Lists and Counters"
|
22051 | ],
|
22052 | initial: [
|
22053 | "list-style-type",
|
22054 | "list-style-position",
|
22055 | "list-style-image"
|
22056 | ],
|
22057 | appliesto: "listItems",
|
22058 | computed: [
|
22059 | "list-style-image",
|
22060 | "list-style-position",
|
22061 | "list-style-type"
|
22062 | ],
|
22063 | order: "orderOfAppearance",
|
22064 | status: "standard",
|
22065 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style"
|
22066 | },
|
22067 | "list-style-image": {
|
22068 | syntax: "<url> | none",
|
22069 | media: "visual",
|
22070 | inherited: true,
|
22071 | animationType: "discrete",
|
22072 | percentages: "no",
|
22073 | groups: [
|
22074 | "CSS Lists and Counters"
|
22075 | ],
|
22076 | initial: "none",
|
22077 | appliesto: "listItems",
|
22078 | computed: "noneOrImageWithAbsoluteURI",
|
22079 | order: "uniqueOrder",
|
22080 | status: "standard",
|
22081 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
|
22082 | },
|
22083 | "list-style-position": {
|
22084 | syntax: "inside | outside",
|
22085 | media: "visual",
|
22086 | inherited: true,
|
22087 | animationType: "discrete",
|
22088 | percentages: "no",
|
22089 | groups: [
|
22090 | "CSS Lists and Counters"
|
22091 | ],
|
22092 | initial: "outside",
|
22093 | appliesto: "listItems",
|
22094 | computed: "asSpecified",
|
22095 | order: "uniqueOrder",
|
22096 | status: "standard",
|
22097 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
|
22098 | },
|
22099 | "list-style-type": {
|
22100 | syntax: "<counter-style> | <string> | none",
|
22101 | media: "visual",
|
22102 | inherited: true,
|
22103 | animationType: "discrete",
|
22104 | percentages: "no",
|
22105 | groups: [
|
22106 | "CSS Lists and Counters"
|
22107 | ],
|
22108 | initial: "disc",
|
22109 | appliesto: "listItems",
|
22110 | computed: "asSpecified",
|
22111 | order: "uniqueOrder",
|
22112 | status: "standard",
|
22113 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
|
22114 | },
|
22115 | margin: margin,
|
22116 | "margin-block": {
|
22117 | syntax: "<'margin-left'>{1,2}",
|
22118 | media: "visual",
|
22119 | inherited: false,
|
22120 | animationType: "discrete",
|
22121 | percentages: "dependsOnLayoutModel",
|
22122 | groups: [
|
22123 | "CSS Logical Properties"
|
22124 | ],
|
22125 | initial: "0",
|
22126 | appliesto: "sameAsMargin",
|
22127 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
22128 | order: "uniqueOrder",
|
22129 | status: "standard",
|
22130 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block"
|
22131 | },
|
22132 | "margin-block-end": {
|
22133 | syntax: "<'margin-left'>",
|
22134 | media: "visual",
|
22135 | inherited: false,
|
22136 | animationType: "length",
|
22137 | percentages: "dependsOnLayoutModel",
|
22138 | groups: [
|
22139 | "CSS Logical Properties"
|
22140 | ],
|
22141 | initial: "0",
|
22142 | appliesto: "sameAsMargin",
|
22143 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
22144 | order: "uniqueOrder",
|
22145 | status: "standard",
|
22146 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
|
22147 | },
|
22148 | "margin-block-start": {
|
22149 | syntax: "<'margin-left'>",
|
22150 | media: "visual",
|
22151 | inherited: false,
|
22152 | animationType: "length",
|
22153 | percentages: "dependsOnLayoutModel",
|
22154 | groups: [
|
22155 | "CSS Logical Properties"
|
22156 | ],
|
22157 | initial: "0",
|
22158 | appliesto: "sameAsMargin",
|
22159 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
22160 | order: "uniqueOrder",
|
22161 | status: "standard",
|
22162 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
|
22163 | },
|
22164 | "margin-bottom": {
|
22165 | syntax: "<length> | <percentage> | auto",
|
22166 | media: "visual",
|
22167 | inherited: false,
|
22168 | animationType: "length",
|
22169 | percentages: "referToWidthOfContainingBlock",
|
22170 | groups: [
|
22171 | "CSS Box Model"
|
22172 | ],
|
22173 | initial: "0",
|
22174 | appliesto: "allElementsExceptTableDisplayTypes",
|
22175 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
22176 | order: "uniqueOrder",
|
22177 | alsoAppliesTo: [
|
22178 | "::first-letter",
|
22179 | "::first-line"
|
22180 | ],
|
22181 | status: "standard",
|
22182 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
|
22183 | },
|
22184 | "margin-inline": {
|
22185 | syntax: "<'margin-left'>{1,2}",
|
22186 | media: "visual",
|
22187 | inherited: false,
|
22188 | animationType: "discrete",
|
22189 | percentages: "dependsOnLayoutModel",
|
22190 | groups: [
|
22191 | "CSS Logical Properties"
|
22192 | ],
|
22193 | initial: "0",
|
22194 | appliesto: "sameAsMargin",
|
22195 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
22196 | order: "uniqueOrder",
|
22197 | status: "standard",
|
22198 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
|
22199 | },
|
22200 | "margin-inline-end": {
|
22201 | syntax: "<'margin-left'>",
|
22202 | media: "visual",
|
22203 | inherited: false,
|
22204 | animationType: "length",
|
22205 | percentages: "dependsOnLayoutModel",
|
22206 | groups: [
|
22207 | "CSS Logical Properties"
|
22208 | ],
|
22209 | initial: "0",
|
22210 | appliesto: "sameAsMargin",
|
22211 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
22212 | order: "uniqueOrder",
|
22213 | status: "standard",
|
22214 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
|
22215 | },
|
22216 | "margin-inline-start": {
|
22217 | syntax: "<'margin-left'>",
|
22218 | media: "visual",
|
22219 | inherited: false,
|
22220 | animationType: "length",
|
22221 | percentages: "dependsOnLayoutModel",
|
22222 | groups: [
|
22223 | "CSS Logical Properties"
|
22224 | ],
|
22225 | initial: "0",
|
22226 | appliesto: "sameAsMargin",
|
22227 | computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
|
22228 | order: "uniqueOrder",
|
22229 | status: "standard",
|
22230 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
|
22231 | },
|
22232 | "margin-left": {
|
22233 | syntax: "<length> | <percentage> | auto",
|
22234 | media: "visual",
|
22235 | inherited: false,
|
22236 | animationType: "length",
|
22237 | percentages: "referToWidthOfContainingBlock",
|
22238 | groups: [
|
22239 | "CSS Box Model"
|
22240 | ],
|
22241 | initial: "0",
|
22242 | appliesto: "allElementsExceptTableDisplayTypes",
|
22243 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
22244 | order: "uniqueOrder",
|
22245 | alsoAppliesTo: [
|
22246 | "::first-letter",
|
22247 | "::first-line"
|
22248 | ],
|
22249 | status: "standard",
|
22250 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-left"
|
22251 | },
|
22252 | "margin-right": {
|
22253 | syntax: "<length> | <percentage> | auto",
|
22254 | media: "visual",
|
22255 | inherited: false,
|
22256 | animationType: "length",
|
22257 | percentages: "referToWidthOfContainingBlock",
|
22258 | groups: [
|
22259 | "CSS Box Model"
|
22260 | ],
|
22261 | initial: "0",
|
22262 | appliesto: "allElementsExceptTableDisplayTypes",
|
22263 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
22264 | order: "uniqueOrder",
|
22265 | alsoAppliesTo: [
|
22266 | "::first-letter",
|
22267 | "::first-line"
|
22268 | ],
|
22269 | status: "standard",
|
22270 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-right"
|
22271 | },
|
22272 | "margin-top": {
|
22273 | syntax: "<length> | <percentage> | auto",
|
22274 | media: "visual",
|
22275 | inherited: false,
|
22276 | animationType: "length",
|
22277 | percentages: "referToWidthOfContainingBlock",
|
22278 | groups: [
|
22279 | "CSS Box Model"
|
22280 | ],
|
22281 | initial: "0",
|
22282 | appliesto: "allElementsExceptTableDisplayTypes",
|
22283 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
22284 | order: "uniqueOrder",
|
22285 | alsoAppliesTo: [
|
22286 | "::first-letter",
|
22287 | "::first-line"
|
22288 | ],
|
22289 | status: "standard",
|
22290 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-top"
|
22291 | },
|
22292 | "margin-trim": {
|
22293 | syntax: "none | in-flow | all",
|
22294 | media: "visual",
|
22295 | inherited: false,
|
22296 | animationType: "discrete",
|
22297 | percentages: "no",
|
22298 | groups: [
|
22299 | "CSS Box Model"
|
22300 | ],
|
22301 | initial: "none",
|
22302 | appliesto: "blockContainersAndMultiColumnContainers",
|
22303 | computed: "asSpecified",
|
22304 | order: "perGrammar",
|
22305 | alsoAppliesTo: [
|
22306 | "::first-letter",
|
22307 | "::first-line"
|
22308 | ],
|
22309 | status: "experimental",
|
22310 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
|
22311 | },
|
22312 | mask: mask,
|
22313 | "mask-border": {
|
22314 | syntax: "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
|
22315 | media: "visual",
|
22316 | inherited: false,
|
22317 | animationType: [
|
22318 | "mask-border-mode",
|
22319 | "mask-border-outset",
|
22320 | "mask-border-repeat",
|
22321 | "mask-border-slice",
|
22322 | "mask-border-source",
|
22323 | "mask-border-width"
|
22324 | ],
|
22325 | percentages: [
|
22326 | "mask-border-slice",
|
22327 | "mask-border-width"
|
22328 | ],
|
22329 | groups: [
|
22330 | "CSS Masking"
|
22331 | ],
|
22332 | initial: [
|
22333 | "mask-border-mode",
|
22334 | "mask-border-outset",
|
22335 | "mask-border-repeat",
|
22336 | "mask-border-slice",
|
22337 | "mask-border-source",
|
22338 | "mask-border-width"
|
22339 | ],
|
22340 | appliesto: "allElementsSVGContainerElements",
|
22341 | computed: [
|
22342 | "mask-border-mode",
|
22343 | "mask-border-outset",
|
22344 | "mask-border-repeat",
|
22345 | "mask-border-slice",
|
22346 | "mask-border-source",
|
22347 | "mask-border-width"
|
22348 | ],
|
22349 | order: "perGrammar",
|
22350 | stacking: true,
|
22351 | status: "standard",
|
22352 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border"
|
22353 | },
|
22354 | "mask-border-mode": {
|
22355 | syntax: "luminance | alpha",
|
22356 | media: "visual",
|
22357 | inherited: false,
|
22358 | animationType: "discrete",
|
22359 | percentages: "no",
|
22360 | groups: [
|
22361 | "CSS Masking"
|
22362 | ],
|
22363 | initial: "alpha",
|
22364 | appliesto: "allElementsSVGContainerElements",
|
22365 | computed: "asSpecified",
|
22366 | order: "perGrammar",
|
22367 | status: "standard",
|
22368 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-mode"
|
22369 | },
|
22370 | "mask-border-outset": {
|
22371 | syntax: "[ <length> | <number> ]{1,4}",
|
22372 | media: "visual",
|
22373 | inherited: false,
|
22374 | animationType: "discrete",
|
22375 | percentages: "no",
|
22376 | groups: [
|
22377 | "CSS Masking"
|
22378 | ],
|
22379 | initial: "0",
|
22380 | appliesto: "allElementsSVGContainerElements",
|
22381 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
22382 | order: "perGrammar",
|
22383 | status: "standard",
|
22384 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"
|
22385 | },
|
22386 | "mask-border-repeat": {
|
22387 | syntax: "[ stretch | repeat | round | space ]{1,2}",
|
22388 | media: "visual",
|
22389 | inherited: false,
|
22390 | animationType: "discrete",
|
22391 | percentages: "no",
|
22392 | groups: [
|
22393 | "CSS Masking"
|
22394 | ],
|
22395 | initial: "stretch",
|
22396 | appliesto: "allElementsSVGContainerElements",
|
22397 | computed: "asSpecified",
|
22398 | order: "perGrammar",
|
22399 | status: "standard",
|
22400 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"
|
22401 | },
|
22402 | "mask-border-slice": {
|
22403 | syntax: "<number-percentage>{1,4} fill?",
|
22404 | media: "visual",
|
22405 | inherited: false,
|
22406 | animationType: "discrete",
|
22407 | percentages: "referToSizeOfMaskBorderImage",
|
22408 | groups: [
|
22409 | "CSS Masking"
|
22410 | ],
|
22411 | initial: "0",
|
22412 | appliesto: "allElementsSVGContainerElements",
|
22413 | computed: "asSpecified",
|
22414 | order: "perGrammar",
|
22415 | status: "standard",
|
22416 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"
|
22417 | },
|
22418 | "mask-border-source": {
|
22419 | syntax: "none | <image>",
|
22420 | media: "visual",
|
22421 | inherited: false,
|
22422 | animationType: "discrete",
|
22423 | percentages: "no",
|
22424 | groups: [
|
22425 | "CSS Masking"
|
22426 | ],
|
22427 | initial: "none",
|
22428 | appliesto: "allElementsSVGContainerElements",
|
22429 | computed: "asSpecifiedURLsAbsolute",
|
22430 | order: "perGrammar",
|
22431 | status: "standard",
|
22432 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-source"
|
22433 | },
|
22434 | "mask-border-width": {
|
22435 | syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
|
22436 | media: "visual",
|
22437 | inherited: false,
|
22438 | animationType: "discrete",
|
22439 | percentages: "relativeToMaskBorderImageArea",
|
22440 | groups: [
|
22441 | "CSS Masking"
|
22442 | ],
|
22443 | initial: "auto",
|
22444 | appliesto: "allElementsSVGContainerElements",
|
22445 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
22446 | order: "perGrammar",
|
22447 | status: "standard",
|
22448 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-width"
|
22449 | },
|
22450 | "mask-clip": {
|
22451 | syntax: "[ <geometry-box> | no-clip ]#",
|
22452 | media: "visual",
|
22453 | inherited: false,
|
22454 | animationType: "discrete",
|
22455 | percentages: "no",
|
22456 | groups: [
|
22457 | "CSS Masking"
|
22458 | ],
|
22459 | initial: "border-box",
|
22460 | appliesto: "allElementsSVGContainerElements",
|
22461 | computed: "asSpecified",
|
22462 | order: "perGrammar",
|
22463 | status: "standard",
|
22464 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
|
22465 | },
|
22466 | "mask-composite": {
|
22467 | syntax: "<compositing-operator>#",
|
22468 | media: "visual",
|
22469 | inherited: false,
|
22470 | animationType: "discrete",
|
22471 | percentages: "no",
|
22472 | groups: [
|
22473 | "CSS Masking"
|
22474 | ],
|
22475 | initial: "add",
|
22476 | appliesto: "allElementsSVGContainerElements",
|
22477 | computed: "asSpecified",
|
22478 | order: "perGrammar",
|
22479 | status: "standard",
|
22480 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
|
22481 | },
|
22482 | "mask-image": {
|
22483 | syntax: "<mask-reference>#",
|
22484 | media: "visual",
|
22485 | inherited: false,
|
22486 | animationType: "discrete",
|
22487 | percentages: "no",
|
22488 | groups: [
|
22489 | "CSS Masking"
|
22490 | ],
|
22491 | initial: "none",
|
22492 | appliesto: "allElementsSVGContainerElements",
|
22493 | computed: "asSpecifiedURLsAbsolute",
|
22494 | order: "perGrammar",
|
22495 | status: "standard",
|
22496 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
|
22497 | },
|
22498 | "mask-mode": {
|
22499 | syntax: "<masking-mode>#",
|
22500 | media: "visual",
|
22501 | inherited: false,
|
22502 | animationType: "discrete",
|
22503 | percentages: "no",
|
22504 | groups: [
|
22505 | "CSS Masking"
|
22506 | ],
|
22507 | initial: "match-source",
|
22508 | appliesto: "allElementsSVGContainerElements",
|
22509 | computed: "asSpecified",
|
22510 | order: "perGrammar",
|
22511 | status: "standard",
|
22512 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
|
22513 | },
|
22514 | "mask-origin": {
|
22515 | syntax: "<geometry-box>#",
|
22516 | media: "visual",
|
22517 | inherited: false,
|
22518 | animationType: "discrete",
|
22519 | percentages: "no",
|
22520 | groups: [
|
22521 | "CSS Masking"
|
22522 | ],
|
22523 | initial: "border-box",
|
22524 | appliesto: "allElementsSVGContainerElements",
|
22525 | computed: "asSpecified",
|
22526 | order: "perGrammar",
|
22527 | status: "standard",
|
22528 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
|
22529 | },
|
22530 | "mask-position": {
|
22531 | syntax: "<position>#",
|
22532 | media: "visual",
|
22533 | inherited: false,
|
22534 | animationType: "repeatableListOfSimpleListOfLpc",
|
22535 | percentages: "referToSizeOfMaskPaintingArea",
|
22536 | groups: [
|
22537 | "CSS Masking"
|
22538 | ],
|
22539 | initial: "center",
|
22540 | appliesto: "allElementsSVGContainerElements",
|
22541 | computed: "consistsOfTwoKeywordsForOriginAndOffsets",
|
22542 | order: "perGrammar",
|
22543 | status: "standard",
|
22544 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
|
22545 | },
|
22546 | "mask-repeat": {
|
22547 | syntax: "<repeat-style>#",
|
22548 | media: "visual",
|
22549 | inherited: false,
|
22550 | animationType: "discrete",
|
22551 | percentages: "no",
|
22552 | groups: [
|
22553 | "CSS Masking"
|
22554 | ],
|
22555 | initial: "no-repeat",
|
22556 | appliesto: "allElementsSVGContainerElements",
|
22557 | computed: "consistsOfTwoDimensionKeywords",
|
22558 | order: "perGrammar",
|
22559 | status: "standard",
|
22560 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
|
22561 | },
|
22562 | "mask-size": {
|
22563 | syntax: "<bg-size>#",
|
22564 | media: "visual",
|
22565 | inherited: false,
|
22566 | animationType: "repeatableListOfSimpleListOfLpc",
|
22567 | percentages: "no",
|
22568 | groups: [
|
22569 | "CSS Masking"
|
22570 | ],
|
22571 | initial: "auto",
|
22572 | appliesto: "allElementsSVGContainerElements",
|
22573 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
22574 | order: "perGrammar",
|
22575 | status: "standard",
|
22576 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
|
22577 | },
|
22578 | "mask-type": {
|
22579 | syntax: "luminance | alpha",
|
22580 | media: "visual",
|
22581 | inherited: false,
|
22582 | animationType: "discrete",
|
22583 | percentages: "no",
|
22584 | groups: [
|
22585 | "CSS Masking"
|
22586 | ],
|
22587 | initial: "luminance",
|
22588 | appliesto: "maskElements",
|
22589 | computed: "asSpecified",
|
22590 | order: "perGrammar",
|
22591 | status: "standard",
|
22592 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-type"
|
22593 | },
|
22594 | "masonry-auto-flow": {
|
22595 | syntax: "[ pack | next ] || [ definite-first | ordered ]",
|
22596 | media: "visual",
|
22597 | inherited: false,
|
22598 | animationType: "discrete",
|
22599 | percentages: "no",
|
22600 | groups: [
|
22601 | "CSS Grid Layout"
|
22602 | ],
|
22603 | initial: "pack",
|
22604 | appliesto: "gridContainersWithMasonryLayout",
|
22605 | computed: "asSpecified",
|
22606 | order: "uniqueOrder",
|
22607 | status: "experimental",
|
22608 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow"
|
22609 | },
|
22610 | "math-style": {
|
22611 | syntax: "normal | compact",
|
22612 | media: "visual",
|
22613 | inherited: true,
|
22614 | animationType: "notAnimatable",
|
22615 | percentages: "no",
|
22616 | groups: [
|
22617 | "MathML"
|
22618 | ],
|
22619 | initial: "normal",
|
22620 | appliesto: "allElements",
|
22621 | computed: "asSpecified",
|
22622 | order: "perGrammar",
|
22623 | status: "standard",
|
22624 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/math-style"
|
22625 | },
|
22626 | "max-block-size": {
|
22627 | syntax: "<'max-width'>",
|
22628 | media: "visual",
|
22629 | inherited: false,
|
22630 | animationType: "lpc",
|
22631 | percentages: "blockSizeOfContainingBlock",
|
22632 | groups: [
|
22633 | "CSS Logical Properties"
|
22634 | ],
|
22635 | initial: "0",
|
22636 | appliesto: "sameAsWidthAndHeight",
|
22637 | computed: "sameAsMaxWidthAndMaxHeight",
|
22638 | order: "uniqueOrder",
|
22639 | status: "standard",
|
22640 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
|
22641 | },
|
22642 | "max-height": {
|
22643 | syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
22644 | media: "visual",
|
22645 | inherited: false,
|
22646 | animationType: "lpc",
|
22647 | percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesNone",
|
22648 | groups: [
|
22649 | "CSS Box Model"
|
22650 | ],
|
22651 | initial: "none",
|
22652 | appliesto: "allElementsButNonReplacedAndTableColumns",
|
22653 | computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
|
22654 | order: "uniqueOrder",
|
22655 | status: "standard",
|
22656 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-height"
|
22657 | },
|
22658 | "max-inline-size": {
|
22659 | syntax: "<'max-width'>",
|
22660 | media: "visual",
|
22661 | inherited: false,
|
22662 | animationType: "lpc",
|
22663 | percentages: "inlineSizeOfContainingBlock",
|
22664 | groups: [
|
22665 | "CSS Logical Properties"
|
22666 | ],
|
22667 | initial: "0",
|
22668 | appliesto: "sameAsWidthAndHeight",
|
22669 | computed: "sameAsMaxWidthAndMaxHeight",
|
22670 | order: "uniqueOrder",
|
22671 | status: "standard",
|
22672 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
|
22673 | },
|
22674 | "max-lines": {
|
22675 | syntax: "none | <integer>",
|
22676 | media: "visual",
|
22677 | inherited: false,
|
22678 | animationType: "integer",
|
22679 | percentages: "no",
|
22680 | groups: [
|
22681 | "CSS Overflow"
|
22682 | ],
|
22683 | initial: "none",
|
22684 | appliesto: "blockContainersExceptMultiColumnContainers",
|
22685 | computed: "asSpecified",
|
22686 | order: "perGrammar",
|
22687 | status: "experimental"
|
22688 | },
|
22689 | "max-width": {
|
22690 | syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
22691 | media: "visual",
|
22692 | inherited: false,
|
22693 | animationType: "lpc",
|
22694 | percentages: "referToWidthOfContainingBlock",
|
22695 | groups: [
|
22696 | "CSS Box Model"
|
22697 | ],
|
22698 | initial: "none",
|
22699 | appliesto: "allElementsButNonReplacedAndTableRows",
|
22700 | computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
|
22701 | order: "uniqueOrder",
|
22702 | status: "standard",
|
22703 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-width"
|
22704 | },
|
22705 | "min-block-size": {
|
22706 | syntax: "<'min-width'>",
|
22707 | media: "visual",
|
22708 | inherited: false,
|
22709 | animationType: "lpc",
|
22710 | percentages: "blockSizeOfContainingBlock",
|
22711 | groups: [
|
22712 | "CSS Logical Properties"
|
22713 | ],
|
22714 | initial: "0",
|
22715 | appliesto: "sameAsWidthAndHeight",
|
22716 | computed: "sameAsMinWidthAndMinHeight",
|
22717 | order: "uniqueOrder",
|
22718 | status: "standard",
|
22719 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
|
22720 | },
|
22721 | "min-height": {
|
22722 | syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
22723 | media: "visual",
|
22724 | inherited: false,
|
22725 | animationType: "lpc",
|
22726 | percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentages0",
|
22727 | groups: [
|
22728 | "CSS Box Model"
|
22729 | ],
|
22730 | initial: "auto",
|
22731 | appliesto: "allElementsButNonReplacedAndTableColumns",
|
22732 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
22733 | order: "uniqueOrder",
|
22734 | status: "standard",
|
22735 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-height"
|
22736 | },
|
22737 | "min-inline-size": {
|
22738 | syntax: "<'min-width'>",
|
22739 | media: "visual",
|
22740 | inherited: false,
|
22741 | animationType: "lpc",
|
22742 | percentages: "inlineSizeOfContainingBlock",
|
22743 | groups: [
|
22744 | "CSS Logical Properties"
|
22745 | ],
|
22746 | initial: "0",
|
22747 | appliesto: "sameAsWidthAndHeight",
|
22748 | computed: "sameAsMinWidthAndMinHeight",
|
22749 | order: "uniqueOrder",
|
22750 | status: "standard",
|
22751 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
|
22752 | },
|
22753 | "min-width": {
|
22754 | syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
22755 | media: "visual",
|
22756 | inherited: false,
|
22757 | animationType: "lpc",
|
22758 | percentages: "referToWidthOfContainingBlock",
|
22759 | groups: [
|
22760 | "CSS Box Model"
|
22761 | ],
|
22762 | initial: "auto",
|
22763 | appliesto: "allElementsButNonReplacedAndTableRows",
|
22764 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
22765 | order: "uniqueOrder",
|
22766 | status: "standard",
|
22767 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-width"
|
22768 | },
|
22769 | "mix-blend-mode": {
|
22770 | syntax: "<blend-mode>",
|
22771 | media: "visual",
|
22772 | inherited: false,
|
22773 | animationType: "discrete",
|
22774 | percentages: "no",
|
22775 | groups: [
|
22776 | "Compositing and Blending"
|
22777 | ],
|
22778 | initial: "normal",
|
22779 | appliesto: "allElements",
|
22780 | computed: "asSpecified",
|
22781 | order: "uniqueOrder",
|
22782 | stacking: true,
|
22783 | status: "standard",
|
22784 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
|
22785 | },
|
22786 | "object-fit": {
|
22787 | syntax: "fill | contain | cover | none | scale-down",
|
22788 | media: "visual",
|
22789 | inherited: false,
|
22790 | animationType: "discrete",
|
22791 | percentages: "no",
|
22792 | groups: [
|
22793 | "CSS Images"
|
22794 | ],
|
22795 | initial: "fill",
|
22796 | appliesto: "replacedElements",
|
22797 | computed: "asSpecified",
|
22798 | order: "uniqueOrder",
|
22799 | status: "standard",
|
22800 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-fit"
|
22801 | },
|
22802 | "object-position": {
|
22803 | syntax: "<position>",
|
22804 | media: "visual",
|
22805 | inherited: true,
|
22806 | animationType: "repeatableListOfSimpleListOfLpc",
|
22807 | percentages: "referToWidthAndHeightOfElement",
|
22808 | groups: [
|
22809 | "CSS Images"
|
22810 | ],
|
22811 | initial: "50% 50%",
|
22812 | appliesto: "replacedElements",
|
22813 | computed: "asSpecified",
|
22814 | order: "uniqueOrder",
|
22815 | status: "standard",
|
22816 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-position"
|
22817 | },
|
22818 | offset: offset,
|
22819 | "offset-anchor": {
|
22820 | syntax: "auto | <position>",
|
22821 | media: "visual",
|
22822 | inherited: false,
|
22823 | animationType: "position",
|
22824 | percentages: "relativeToWidthAndHeight",
|
22825 | groups: [
|
22826 | "CSS Motion Path"
|
22827 | ],
|
22828 | initial: "auto",
|
22829 | appliesto: "transformableElements",
|
22830 | computed: "forLengthAbsoluteValueOtherwisePercentage",
|
22831 | order: "perGrammar",
|
22832 | status: "standard"
|
22833 | },
|
22834 | "offset-distance": {
|
22835 | syntax: "<length-percentage>",
|
22836 | media: "visual",
|
22837 | inherited: false,
|
22838 | animationType: "lpc",
|
22839 | percentages: "referToTotalPathLength",
|
22840 | groups: [
|
22841 | "CSS Motion Path"
|
22842 | ],
|
22843 | initial: "0",
|
22844 | appliesto: "transformableElements",
|
22845 | computed: "forLengthAbsoluteValueOtherwisePercentage",
|
22846 | order: "perGrammar",
|
22847 | status: "standard",
|
22848 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
|
22849 | },
|
22850 | "offset-path": {
|
22851 | syntax: "none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
|
22852 | media: "visual",
|
22853 | inherited: false,
|
22854 | animationType: "angleOrBasicShapeOrPath",
|
22855 | percentages: "no",
|
22856 | groups: [
|
22857 | "CSS Motion Path"
|
22858 | ],
|
22859 | initial: "none",
|
22860 | appliesto: "transformableElements",
|
22861 | computed: "asSpecified",
|
22862 | order: "perGrammar",
|
22863 | stacking: true,
|
22864 | status: "standard",
|
22865 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-path"
|
22866 | },
|
22867 | "offset-position": {
|
22868 | syntax: "auto | <position>",
|
22869 | media: "visual",
|
22870 | inherited: false,
|
22871 | animationType: "position",
|
22872 | percentages: "referToSizeOfContainingBlock",
|
22873 | groups: [
|
22874 | "CSS Motion Path"
|
22875 | ],
|
22876 | initial: "auto",
|
22877 | appliesto: "transformableElements",
|
22878 | computed: "forLengthAbsoluteValueOtherwisePercentage",
|
22879 | order: "perGrammar",
|
22880 | status: "experimental"
|
22881 | },
|
22882 | "offset-rotate": {
|
22883 | syntax: "[ auto | reverse ] || <angle>",
|
22884 | media: "visual",
|
22885 | inherited: false,
|
22886 | animationType: "angleOrBasicShapeOrPath",
|
22887 | percentages: "no",
|
22888 | groups: [
|
22889 | "CSS Motion Path"
|
22890 | ],
|
22891 | initial: "auto",
|
22892 | appliesto: "transformableElements",
|
22893 | computed: "asSpecified",
|
22894 | order: "perGrammar",
|
22895 | status: "standard",
|
22896 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
|
22897 | },
|
22898 | opacity: opacity,
|
22899 | order: order,
|
22900 | orphans: orphans,
|
22901 | outline: outline,
|
22902 | "outline-color": {
|
22903 | syntax: "<color> | invert",
|
22904 | media: [
|
22905 | "visual",
|
22906 | "interactive"
|
22907 | ],
|
22908 | inherited: false,
|
22909 | animationType: "color",
|
22910 | percentages: "no",
|
22911 | groups: [
|
22912 | "CSS Basic User Interface"
|
22913 | ],
|
22914 | initial: "invertOrCurrentColor",
|
22915 | appliesto: "allElements",
|
22916 | computed: "invertForTranslucentColorRGBAOtherwiseRGB",
|
22917 | order: "uniqueOrder",
|
22918 | status: "standard",
|
22919 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-color"
|
22920 | },
|
22921 | "outline-offset": {
|
22922 | syntax: "<length>",
|
22923 | media: [
|
22924 | "visual",
|
22925 | "interactive"
|
22926 | ],
|
22927 | inherited: false,
|
22928 | animationType: "length",
|
22929 | percentages: "no",
|
22930 | groups: [
|
22931 | "CSS Basic User Interface"
|
22932 | ],
|
22933 | initial: "0",
|
22934 | appliesto: "allElements",
|
22935 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
22936 | order: "uniqueOrder",
|
22937 | status: "standard",
|
22938 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
|
22939 | },
|
22940 | "outline-style": {
|
22941 | syntax: "auto | <'border-style'>",
|
22942 | media: [
|
22943 | "visual",
|
22944 | "interactive"
|
22945 | ],
|
22946 | inherited: false,
|
22947 | animationType: "discrete",
|
22948 | percentages: "no",
|
22949 | groups: [
|
22950 | "CSS Basic User Interface"
|
22951 | ],
|
22952 | initial: "none",
|
22953 | appliesto: "allElements",
|
22954 | computed: "asSpecified",
|
22955 | order: "uniqueOrder",
|
22956 | status: "standard",
|
22957 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-style"
|
22958 | },
|
22959 | "outline-width": {
|
22960 | syntax: "<line-width>",
|
22961 | media: [
|
22962 | "visual",
|
22963 | "interactive"
|
22964 | ],
|
22965 | inherited: false,
|
22966 | animationType: "length",
|
22967 | percentages: "no",
|
22968 | groups: [
|
22969 | "CSS Basic User Interface"
|
22970 | ],
|
22971 | initial: "medium",
|
22972 | appliesto: "allElements",
|
22973 | computed: "absoluteLength0ForNone",
|
22974 | order: "uniqueOrder",
|
22975 | status: "standard",
|
22976 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-width"
|
22977 | },
|
22978 | overflow: overflow,
|
22979 | "overflow-anchor": {
|
22980 | syntax: "auto | none",
|
22981 | media: "visual",
|
22982 | inherited: false,
|
22983 | animationType: "discrete",
|
22984 | percentages: "no",
|
22985 | groups: [
|
22986 | "CSS Scroll Anchoring"
|
22987 | ],
|
22988 | initial: "auto",
|
22989 | appliesto: "allElements",
|
22990 | computed: "asSpecified",
|
22991 | order: "perGrammar",
|
22992 | status: "standard"
|
22993 | },
|
22994 | "overflow-block": {
|
22995 | syntax: "visible | hidden | clip | scroll | auto",
|
22996 | media: "visual",
|
22997 | inherited: false,
|
22998 | animationType: "discrete",
|
22999 | percentages: "no",
|
23000 | groups: [
|
23001 | "CSS Overflow"
|
23002 | ],
|
23003 | initial: "auto",
|
23004 | appliesto: "blockContainersFlexContainersGridContainers",
|
23005 | computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
23006 | order: "perGrammar",
|
23007 | status: "standard"
|
23008 | },
|
23009 | "overflow-clip-box": {
|
23010 | syntax: "padding-box | content-box",
|
23011 | media: "visual",
|
23012 | inherited: false,
|
23013 | animationType: "discrete",
|
23014 | percentages: "no",
|
23015 | groups: [
|
23016 | "Mozilla Extensions"
|
23017 | ],
|
23018 | initial: "padding-box",
|
23019 | appliesto: "allElements",
|
23020 | computed: "asSpecified",
|
23021 | order: "uniqueOrder",
|
23022 | status: "nonstandard",
|
23023 | mdn_url: "https://developer.mozilla.org/docs/Mozilla/CSS/overflow-clip-box"
|
23024 | },
|
23025 | "overflow-inline": {
|
23026 | syntax: "visible | hidden | clip | scroll | auto",
|
23027 | media: "visual",
|
23028 | inherited: false,
|
23029 | animationType: "discrete",
|
23030 | percentages: "no",
|
23031 | groups: [
|
23032 | "CSS Overflow"
|
23033 | ],
|
23034 | initial: "auto",
|
23035 | appliesto: "blockContainersFlexContainersGridContainers",
|
23036 | computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
23037 | order: "perGrammar",
|
23038 | status: "standard"
|
23039 | },
|
23040 | "overflow-wrap": {
|
23041 | syntax: "normal | break-word | anywhere",
|
23042 | media: "visual",
|
23043 | inherited: true,
|
23044 | animationType: "discrete",
|
23045 | percentages: "no",
|
23046 | groups: [
|
23047 | "CSS Text"
|
23048 | ],
|
23049 | initial: "normal",
|
23050 | appliesto: "nonReplacedInlineElements",
|
23051 | computed: "asSpecified",
|
23052 | order: "uniqueOrder",
|
23053 | status: "standard",
|
23054 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
|
23055 | },
|
23056 | "overflow-x": {
|
23057 | syntax: "visible | hidden | clip | scroll | auto",
|
23058 | media: "visual",
|
23059 | inherited: false,
|
23060 | animationType: "discrete",
|
23061 | percentages: "no",
|
23062 | groups: [
|
23063 | "CSS Overflow"
|
23064 | ],
|
23065 | initial: "visible",
|
23066 | appliesto: "blockContainersFlexContainersGridContainers",
|
23067 | computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
23068 | order: "uniqueOrder",
|
23069 | status: "standard",
|
23070 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
|
23071 | },
|
23072 | "overflow-y": {
|
23073 | syntax: "visible | hidden | clip | scroll | auto",
|
23074 | media: "visual",
|
23075 | inherited: false,
|
23076 | animationType: "discrete",
|
23077 | percentages: "no",
|
23078 | groups: [
|
23079 | "CSS Overflow"
|
23080 | ],
|
23081 | initial: "visible",
|
23082 | appliesto: "blockContainersFlexContainersGridContainers",
|
23083 | computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
23084 | order: "uniqueOrder",
|
23085 | status: "standard",
|
23086 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
|
23087 | },
|
23088 | "overscroll-behavior": {
|
23089 | syntax: "[ contain | none | auto ]{1,2}",
|
23090 | media: "visual",
|
23091 | inherited: false,
|
23092 | animationType: "discrete",
|
23093 | percentages: "no",
|
23094 | groups: [
|
23095 | "CSS Box Model"
|
23096 | ],
|
23097 | initial: "auto",
|
23098 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
23099 | computed: "asSpecified",
|
23100 | order: "uniqueOrder",
|
23101 | status: "standard",
|
23102 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
|
23103 | },
|
23104 | "overscroll-behavior-block": {
|
23105 | syntax: "contain | none | auto",
|
23106 | media: "visual",
|
23107 | inherited: false,
|
23108 | animationType: "discrete",
|
23109 | percentages: "no",
|
23110 | groups: [
|
23111 | "CSS Box Model"
|
23112 | ],
|
23113 | initial: "auto",
|
23114 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
23115 | computed: "asSpecified",
|
23116 | order: "uniqueOrder",
|
23117 | status: "standard",
|
23118 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
|
23119 | },
|
23120 | "overscroll-behavior-inline": {
|
23121 | syntax: "contain | none | auto",
|
23122 | media: "visual",
|
23123 | inherited: false,
|
23124 | animationType: "discrete",
|
23125 | percentages: "no",
|
23126 | groups: [
|
23127 | "CSS Box Model"
|
23128 | ],
|
23129 | initial: "auto",
|
23130 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
23131 | computed: "asSpecified",
|
23132 | order: "uniqueOrder",
|
23133 | status: "standard",
|
23134 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
|
23135 | },
|
23136 | "overscroll-behavior-x": {
|
23137 | syntax: "contain | none | auto",
|
23138 | media: "visual",
|
23139 | inherited: false,
|
23140 | animationType: "discrete",
|
23141 | percentages: "no",
|
23142 | groups: [
|
23143 | "CSS Box Model"
|
23144 | ],
|
23145 | initial: "auto",
|
23146 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
23147 | computed: "asSpecified",
|
23148 | order: "uniqueOrder",
|
23149 | status: "standard",
|
23150 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
|
23151 | },
|
23152 | "overscroll-behavior-y": {
|
23153 | syntax: "contain | none | auto",
|
23154 | media: "visual",
|
23155 | inherited: false,
|
23156 | animationType: "discrete",
|
23157 | percentages: "no",
|
23158 | groups: [
|
23159 | "CSS Box Model"
|
23160 | ],
|
23161 | initial: "auto",
|
23162 | appliesto: "nonReplacedBlockAndInlineBlockElements",
|
23163 | computed: "asSpecified",
|
23164 | order: "uniqueOrder",
|
23165 | status: "standard",
|
23166 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
|
23167 | },
|
23168 | padding: padding,
|
23169 | "padding-block": {
|
23170 | syntax: "<'padding-left'>{1,2}",
|
23171 | media: "visual",
|
23172 | inherited: false,
|
23173 | animationType: "discrete",
|
23174 | percentages: "logicalWidthOfContainingBlock",
|
23175 | groups: [
|
23176 | "CSS Logical Properties"
|
23177 | ],
|
23178 | initial: "0",
|
23179 | appliesto: "allElements",
|
23180 | computed: "asLength",
|
23181 | order: "uniqueOrder",
|
23182 | status: "standard",
|
23183 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block"
|
23184 | },
|
23185 | "padding-block-end": {
|
23186 | syntax: "<'padding-left'>",
|
23187 | media: "visual",
|
23188 | inherited: false,
|
23189 | animationType: "length",
|
23190 | percentages: "logicalWidthOfContainingBlock",
|
23191 | groups: [
|
23192 | "CSS Logical Properties"
|
23193 | ],
|
23194 | initial: "0",
|
23195 | appliesto: "allElements",
|
23196 | computed: "asLength",
|
23197 | order: "uniqueOrder",
|
23198 | status: "standard",
|
23199 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
|
23200 | },
|
23201 | "padding-block-start": {
|
23202 | syntax: "<'padding-left'>",
|
23203 | media: "visual",
|
23204 | inherited: false,
|
23205 | animationType: "length",
|
23206 | percentages: "logicalWidthOfContainingBlock",
|
23207 | groups: [
|
23208 | "CSS Logical Properties"
|
23209 | ],
|
23210 | initial: "0",
|
23211 | appliesto: "allElements",
|
23212 | computed: "asLength",
|
23213 | order: "uniqueOrder",
|
23214 | status: "standard",
|
23215 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
|
23216 | },
|
23217 | "padding-bottom": {
|
23218 | syntax: "<length> | <percentage>",
|
23219 | media: "visual",
|
23220 | inherited: false,
|
23221 | animationType: "length",
|
23222 | percentages: "referToWidthOfContainingBlock",
|
23223 | groups: [
|
23224 | "CSS Box Model"
|
23225 | ],
|
23226 | initial: "0",
|
23227 | appliesto: "allElementsExceptInternalTableDisplayTypes",
|
23228 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
23229 | order: "uniqueOrder",
|
23230 | alsoAppliesTo: [
|
23231 | "::first-letter",
|
23232 | "::first-line"
|
23233 | ],
|
23234 | status: "standard",
|
23235 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
|
23236 | },
|
23237 | "padding-inline": {
|
23238 | syntax: "<'padding-left'>{1,2}",
|
23239 | media: "visual",
|
23240 | inherited: false,
|
23241 | animationType: "discrete",
|
23242 | percentages: "logicalWidthOfContainingBlock",
|
23243 | groups: [
|
23244 | "CSS Logical Properties"
|
23245 | ],
|
23246 | initial: "0",
|
23247 | appliesto: "allElements",
|
23248 | computed: "asLength",
|
23249 | order: "uniqueOrder",
|
23250 | status: "standard",
|
23251 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
|
23252 | },
|
23253 | "padding-inline-end": {
|
23254 | syntax: "<'padding-left'>",
|
23255 | media: "visual",
|
23256 | inherited: false,
|
23257 | animationType: "length",
|
23258 | percentages: "logicalWidthOfContainingBlock",
|
23259 | groups: [
|
23260 | "CSS Logical Properties"
|
23261 | ],
|
23262 | initial: "0",
|
23263 | appliesto: "allElements",
|
23264 | computed: "asLength",
|
23265 | order: "uniqueOrder",
|
23266 | status: "standard",
|
23267 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
|
23268 | },
|
23269 | "padding-inline-start": {
|
23270 | syntax: "<'padding-left'>",
|
23271 | media: "visual",
|
23272 | inherited: false,
|
23273 | animationType: "length",
|
23274 | percentages: "logicalWidthOfContainingBlock",
|
23275 | groups: [
|
23276 | "CSS Logical Properties"
|
23277 | ],
|
23278 | initial: "0",
|
23279 | appliesto: "allElements",
|
23280 | computed: "asLength",
|
23281 | order: "uniqueOrder",
|
23282 | status: "standard",
|
23283 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
|
23284 | },
|
23285 | "padding-left": {
|
23286 | syntax: "<length> | <percentage>",
|
23287 | media: "visual",
|
23288 | inherited: false,
|
23289 | animationType: "length",
|
23290 | percentages: "referToWidthOfContainingBlock",
|
23291 | groups: [
|
23292 | "CSS Box Model"
|
23293 | ],
|
23294 | initial: "0",
|
23295 | appliesto: "allElementsExceptInternalTableDisplayTypes",
|
23296 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
23297 | order: "uniqueOrder",
|
23298 | alsoAppliesTo: [
|
23299 | "::first-letter",
|
23300 | "::first-line"
|
23301 | ],
|
23302 | status: "standard",
|
23303 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-left"
|
23304 | },
|
23305 | "padding-right": {
|
23306 | syntax: "<length> | <percentage>",
|
23307 | media: "visual",
|
23308 | inherited: false,
|
23309 | animationType: "length",
|
23310 | percentages: "referToWidthOfContainingBlock",
|
23311 | groups: [
|
23312 | "CSS Box Model"
|
23313 | ],
|
23314 | initial: "0",
|
23315 | appliesto: "allElementsExceptInternalTableDisplayTypes",
|
23316 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
23317 | order: "uniqueOrder",
|
23318 | alsoAppliesTo: [
|
23319 | "::first-letter",
|
23320 | "::first-line"
|
23321 | ],
|
23322 | status: "standard",
|
23323 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-right"
|
23324 | },
|
23325 | "padding-top": {
|
23326 | syntax: "<length> | <percentage>",
|
23327 | media: "visual",
|
23328 | inherited: false,
|
23329 | animationType: "length",
|
23330 | percentages: "referToWidthOfContainingBlock",
|
23331 | groups: [
|
23332 | "CSS Box Model"
|
23333 | ],
|
23334 | initial: "0",
|
23335 | appliesto: "allElementsExceptInternalTableDisplayTypes",
|
23336 | computed: "percentageAsSpecifiedOrAbsoluteLength",
|
23337 | order: "uniqueOrder",
|
23338 | alsoAppliesTo: [
|
23339 | "::first-letter",
|
23340 | "::first-line"
|
23341 | ],
|
23342 | status: "standard",
|
23343 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-top"
|
23344 | },
|
23345 | "page-break-after": {
|
23346 | syntax: "auto | always | avoid | left | right | recto | verso",
|
23347 | media: [
|
23348 | "visual",
|
23349 | "paged"
|
23350 | ],
|
23351 | inherited: false,
|
23352 | animationType: "discrete",
|
23353 | percentages: "no",
|
23354 | groups: [
|
23355 | "CSS Pages"
|
23356 | ],
|
23357 | initial: "auto",
|
23358 | appliesto: "blockElementsInNormalFlow",
|
23359 | computed: "asSpecified",
|
23360 | order: "uniqueOrder",
|
23361 | status: "standard",
|
23362 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
|
23363 | },
|
23364 | "page-break-before": {
|
23365 | syntax: "auto | always | avoid | left | right | recto | verso",
|
23366 | media: [
|
23367 | "visual",
|
23368 | "paged"
|
23369 | ],
|
23370 | inherited: false,
|
23371 | animationType: "discrete",
|
23372 | percentages: "no",
|
23373 | groups: [
|
23374 | "CSS Pages"
|
23375 | ],
|
23376 | initial: "auto",
|
23377 | appliesto: "blockElementsInNormalFlow",
|
23378 | computed: "asSpecified",
|
23379 | order: "uniqueOrder",
|
23380 | status: "standard",
|
23381 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
|
23382 | },
|
23383 | "page-break-inside": {
|
23384 | syntax: "auto | avoid",
|
23385 | media: [
|
23386 | "visual",
|
23387 | "paged"
|
23388 | ],
|
23389 | inherited: false,
|
23390 | animationType: "discrete",
|
23391 | percentages: "no",
|
23392 | groups: [
|
23393 | "CSS Pages"
|
23394 | ],
|
23395 | initial: "auto",
|
23396 | appliesto: "blockElementsInNormalFlow",
|
23397 | computed: "asSpecified",
|
23398 | order: "uniqueOrder",
|
23399 | status: "standard",
|
23400 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
|
23401 | },
|
23402 | "paint-order": {
|
23403 | syntax: "normal | [ fill || stroke || markers ]",
|
23404 | media: "visual",
|
23405 | inherited: true,
|
23406 | animationType: "discrete",
|
23407 | percentages: "no",
|
23408 | groups: [
|
23409 | "CSS Text"
|
23410 | ],
|
23411 | initial: "normal",
|
23412 | appliesto: "textElements",
|
23413 | computed: "asSpecified",
|
23414 | order: "uniqueOrder",
|
23415 | status: "standard",
|
23416 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/paint-order"
|
23417 | },
|
23418 | perspective: perspective,
|
23419 | "perspective-origin": {
|
23420 | syntax: "<position>",
|
23421 | media: "visual",
|
23422 | inherited: false,
|
23423 | animationType: "simpleListOfLpc",
|
23424 | percentages: "referToSizeOfBoundingBox",
|
23425 | groups: [
|
23426 | "CSS Transforms"
|
23427 | ],
|
23428 | initial: "50% 50%",
|
23429 | appliesto: "transformableElements",
|
23430 | computed: "forLengthAbsoluteValueOtherwisePercentage",
|
23431 | order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
|
23432 | status: "standard",
|
23433 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
|
23434 | },
|
23435 | "place-content": {
|
23436 | syntax: "<'align-content'> <'justify-content'>?",
|
23437 | media: "visual",
|
23438 | inherited: false,
|
23439 | animationType: "discrete",
|
23440 | percentages: "no",
|
23441 | groups: [
|
23442 | "CSS Box Alignment"
|
23443 | ],
|
23444 | initial: "normal",
|
23445 | appliesto: "multilineFlexContainers",
|
23446 | computed: "asSpecified",
|
23447 | order: "uniqueOrder",
|
23448 | status: "standard",
|
23449 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-content"
|
23450 | },
|
23451 | "place-items": {
|
23452 | syntax: "<'align-items'> <'justify-items'>?",
|
23453 | media: "visual",
|
23454 | inherited: false,
|
23455 | animationType: "discrete",
|
23456 | percentages: "no",
|
23457 | groups: [
|
23458 | "CSS Box Alignment"
|
23459 | ],
|
23460 | initial: [
|
23461 | "align-items",
|
23462 | "justify-items"
|
23463 | ],
|
23464 | appliesto: "allElements",
|
23465 | computed: [
|
23466 | "align-items",
|
23467 | "justify-items"
|
23468 | ],
|
23469 | order: "uniqueOrder",
|
23470 | status: "standard",
|
23471 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-items"
|
23472 | },
|
23473 | "place-self": {
|
23474 | syntax: "<'align-self'> <'justify-self'>?",
|
23475 | media: "visual",
|
23476 | inherited: false,
|
23477 | animationType: "discrete",
|
23478 | percentages: "no",
|
23479 | groups: [
|
23480 | "CSS Box Alignment"
|
23481 | ],
|
23482 | initial: [
|
23483 | "align-self",
|
23484 | "justify-self"
|
23485 | ],
|
23486 | appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
|
23487 | computed: [
|
23488 | "align-self",
|
23489 | "justify-self"
|
23490 | ],
|
23491 | order: "uniqueOrder",
|
23492 | status: "standard",
|
23493 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-self"
|
23494 | },
|
23495 | "pointer-events": {
|
23496 | syntax: "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
|
23497 | media: "visual",
|
23498 | inherited: true,
|
23499 | animationType: "discrete",
|
23500 | percentages: "no",
|
23501 | groups: [
|
23502 | "Pointer Events"
|
23503 | ],
|
23504 | initial: "auto",
|
23505 | appliesto: "allElements",
|
23506 | computed: "asSpecified",
|
23507 | order: "uniqueOrder",
|
23508 | status: "standard",
|
23509 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
|
23510 | },
|
23511 | position: position,
|
23512 | quotes: quotes,
|
23513 | resize: resize,
|
23514 | right: right,
|
23515 | rotate: rotate,
|
23516 | "row-gap": {
|
23517 | syntax: "normal | <length-percentage>",
|
23518 | media: "visual",
|
23519 | inherited: false,
|
23520 | animationType: "lpc",
|
23521 | percentages: "referToDimensionOfContentArea",
|
23522 | groups: [
|
23523 | "CSS Box Alignment"
|
23524 | ],
|
23525 | initial: "normal",
|
23526 | appliesto: "multiColumnElementsFlexContainersGridContainers",
|
23527 | computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
|
23528 | order: "perGrammar",
|
23529 | status: "standard",
|
23530 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
|
23531 | },
|
23532 | "ruby-align": {
|
23533 | syntax: "start | center | space-between | space-around",
|
23534 | media: "visual",
|
23535 | inherited: true,
|
23536 | animationType: "discrete",
|
23537 | percentages: "no",
|
23538 | groups: [
|
23539 | "CSS Ruby"
|
23540 | ],
|
23541 | initial: "space-around",
|
23542 | appliesto: "rubyBasesAnnotationsBaseAnnotationContainers",
|
23543 | computed: "asSpecified",
|
23544 | order: "uniqueOrder",
|
23545 | status: "experimental",
|
23546 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
|
23547 | },
|
23548 | "ruby-merge": {
|
23549 | syntax: "separate | collapse | auto",
|
23550 | media: "visual",
|
23551 | inherited: true,
|
23552 | animationType: "discrete",
|
23553 | percentages: "no",
|
23554 | groups: [
|
23555 | "CSS Ruby"
|
23556 | ],
|
23557 | initial: "separate",
|
23558 | appliesto: "rubyAnnotationsContainers",
|
23559 | computed: "asSpecified",
|
23560 | order: "uniqueOrder",
|
23561 | status: "experimental"
|
23562 | },
|
23563 | "ruby-position": {
|
23564 | syntax: "over | under | inter-character",
|
23565 | media: "visual",
|
23566 | inherited: true,
|
23567 | animationType: "discrete",
|
23568 | percentages: "no",
|
23569 | groups: [
|
23570 | "CSS Ruby"
|
23571 | ],
|
23572 | initial: "over",
|
23573 | appliesto: "rubyAnnotationsContainers",
|
23574 | computed: "asSpecified",
|
23575 | order: "uniqueOrder",
|
23576 | status: "experimental",
|
23577 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
|
23578 | },
|
23579 | scale: scale,
|
23580 | "scrollbar-color": {
|
23581 | syntax: "auto | dark | light | <color>{2}",
|
23582 | media: "visual",
|
23583 | inherited: true,
|
23584 | animationType: "color",
|
23585 | percentages: "no",
|
23586 | groups: [
|
23587 | "CSS Scrollbars"
|
23588 | ],
|
23589 | initial: "auto",
|
23590 | appliesto: "scrollingBoxes",
|
23591 | computed: "asSpecified",
|
23592 | order: "perGrammar",
|
23593 | status: "standard",
|
23594 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
|
23595 | },
|
23596 | "scrollbar-gutter": {
|
23597 | syntax: "auto | [ stable | always ] && both? && force?",
|
23598 | media: "visual",
|
23599 | inherited: false,
|
23600 | animationType: "discrete",
|
23601 | percentages: "no",
|
23602 | groups: [
|
23603 | "CSS Overflow"
|
23604 | ],
|
23605 | initial: "auto",
|
23606 | appliesto: "allElements",
|
23607 | computed: "asSpecified",
|
23608 | order: "perGrammar",
|
23609 | status: "standard",
|
23610 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter"
|
23611 | },
|
23612 | "scrollbar-width": {
|
23613 | syntax: "auto | thin | none",
|
23614 | media: "visual",
|
23615 | inherited: false,
|
23616 | animationType: "discrete",
|
23617 | percentages: "no",
|
23618 | groups: [
|
23619 | "CSS Scrollbars"
|
23620 | ],
|
23621 | initial: "auto",
|
23622 | appliesto: "scrollingBoxes",
|
23623 | computed: "asSpecified",
|
23624 | order: "perGrammar",
|
23625 | status: "standard",
|
23626 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
|
23627 | },
|
23628 | "scroll-behavior": {
|
23629 | syntax: "auto | smooth",
|
23630 | media: "visual",
|
23631 | inherited: false,
|
23632 | animationType: "discrete",
|
23633 | percentages: "no",
|
23634 | groups: [
|
23635 | "CSSOM View"
|
23636 | ],
|
23637 | initial: "auto",
|
23638 | appliesto: "scrollingBoxes",
|
23639 | computed: "asSpecified",
|
23640 | order: "uniqueOrder",
|
23641 | status: "standard",
|
23642 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
|
23643 | },
|
23644 | "scroll-margin": {
|
23645 | syntax: "<length>{1,4}",
|
23646 | media: "visual",
|
23647 | inherited: false,
|
23648 | animationType: "byComputedValueType",
|
23649 | percentages: "no",
|
23650 | groups: [
|
23651 | "CSS Scroll Snap"
|
23652 | ],
|
23653 | initial: "0",
|
23654 | appliesto: "allElements",
|
23655 | computed: "asSpecified",
|
23656 | order: "perGrammar",
|
23657 | status: "standard",
|
23658 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
|
23659 | },
|
23660 | "scroll-margin-block": {
|
23661 | syntax: "<length>{1,2}",
|
23662 | media: "visual",
|
23663 | inherited: false,
|
23664 | animationType: "byComputedValueType",
|
23665 | percentages: "no",
|
23666 | groups: [
|
23667 | "CSS Scroll Snap"
|
23668 | ],
|
23669 | initial: "0",
|
23670 | appliesto: "allElements",
|
23671 | computed: "asSpecified",
|
23672 | order: "perGrammar",
|
23673 | status: "standard",
|
23674 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
|
23675 | },
|
23676 | "scroll-margin-block-start": {
|
23677 | syntax: "<length>",
|
23678 | media: "visual",
|
23679 | inherited: false,
|
23680 | animationType: "byComputedValueType",
|
23681 | percentages: "no",
|
23682 | groups: [
|
23683 | "CSS Scroll Snap"
|
23684 | ],
|
23685 | initial: "0",
|
23686 | appliesto: "allElements",
|
23687 | computed: "asSpecified",
|
23688 | order: "perGrammar",
|
23689 | status: "standard",
|
23690 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
|
23691 | },
|
23692 | "scroll-margin-block-end": {
|
23693 | syntax: "<length>",
|
23694 | media: "visual",
|
23695 | inherited: false,
|
23696 | animationType: "byComputedValueType",
|
23697 | percentages: "no",
|
23698 | groups: [
|
23699 | "CSS Scroll Snap"
|
23700 | ],
|
23701 | initial: "0",
|
23702 | appliesto: "allElements",
|
23703 | computed: "asSpecified",
|
23704 | order: "perGrammar",
|
23705 | status: "standard",
|
23706 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
|
23707 | },
|
23708 | "scroll-margin-bottom": {
|
23709 | syntax: "<length>",
|
23710 | media: "visual",
|
23711 | inherited: false,
|
23712 | animationType: "byComputedValueType",
|
23713 | percentages: "no",
|
23714 | groups: [
|
23715 | "CSS Scroll Snap"
|
23716 | ],
|
23717 | initial: "0",
|
23718 | appliesto: "allElements",
|
23719 | computed: "asSpecified",
|
23720 | order: "perGrammar",
|
23721 | status: "standard",
|
23722 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
|
23723 | },
|
23724 | "scroll-margin-inline": {
|
23725 | syntax: "<length>{1,2}",
|
23726 | media: "visual",
|
23727 | inherited: false,
|
23728 | animationType: "byComputedValueType",
|
23729 | percentages: "no",
|
23730 | groups: [
|
23731 | "CSS Scroll Snap"
|
23732 | ],
|
23733 | initial: "0",
|
23734 | appliesto: "allElements",
|
23735 | computed: "asSpecified",
|
23736 | order: "perGrammar",
|
23737 | status: "standard",
|
23738 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
|
23739 | },
|
23740 | "scroll-margin-inline-start": {
|
23741 | syntax: "<length>",
|
23742 | media: "visual",
|
23743 | inherited: false,
|
23744 | animationType: "byComputedValueType",
|
23745 | percentages: "no",
|
23746 | groups: [
|
23747 | "CSS Scroll Snap"
|
23748 | ],
|
23749 | initial: "0",
|
23750 | appliesto: "allElements",
|
23751 | computed: "asSpecified",
|
23752 | order: "perGrammar",
|
23753 | status: "standard",
|
23754 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
|
23755 | },
|
23756 | "scroll-margin-inline-end": {
|
23757 | syntax: "<length>",
|
23758 | media: "visual",
|
23759 | inherited: false,
|
23760 | animationType: "byComputedValueType",
|
23761 | percentages: "no",
|
23762 | groups: [
|
23763 | "CSS Scroll Snap"
|
23764 | ],
|
23765 | initial: "0",
|
23766 | appliesto: "allElements",
|
23767 | computed: "asSpecified",
|
23768 | order: "perGrammar",
|
23769 | status: "standard",
|
23770 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
|
23771 | },
|
23772 | "scroll-margin-left": {
|
23773 | syntax: "<length>",
|
23774 | media: "visual",
|
23775 | inherited: false,
|
23776 | animationType: "byComputedValueType",
|
23777 | percentages: "no",
|
23778 | groups: [
|
23779 | "CSS Scroll Snap"
|
23780 | ],
|
23781 | initial: "0",
|
23782 | appliesto: "allElements",
|
23783 | computed: "asSpecified",
|
23784 | order: "perGrammar",
|
23785 | status: "standard",
|
23786 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
|
23787 | },
|
23788 | "scroll-margin-right": {
|
23789 | syntax: "<length>",
|
23790 | media: "visual",
|
23791 | inherited: false,
|
23792 | animationType: "byComputedValueType",
|
23793 | percentages: "no",
|
23794 | groups: [
|
23795 | "CSS Scroll Snap"
|
23796 | ],
|
23797 | initial: "0",
|
23798 | appliesto: "allElements",
|
23799 | computed: "asSpecified",
|
23800 | order: "perGrammar",
|
23801 | status: "standard",
|
23802 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
|
23803 | },
|
23804 | "scroll-margin-top": {
|
23805 | syntax: "<length>",
|
23806 | media: "visual",
|
23807 | inherited: false,
|
23808 | animationType: "byComputedValueType",
|
23809 | percentages: "no",
|
23810 | groups: [
|
23811 | "CSS Scroll Snap"
|
23812 | ],
|
23813 | initial: "0",
|
23814 | appliesto: "allElements",
|
23815 | computed: "asSpecified",
|
23816 | order: "perGrammar",
|
23817 | status: "standard",
|
23818 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
|
23819 | },
|
23820 | "scroll-padding": {
|
23821 | syntax: "[ auto | <length-percentage> ]{1,4}",
|
23822 | media: "visual",
|
23823 | inherited: false,
|
23824 | animationType: "byComputedValueType",
|
23825 | percentages: "relativeToTheScrollContainersScrollport",
|
23826 | groups: [
|
23827 | "CSS Scroll Snap"
|
23828 | ],
|
23829 | initial: "auto",
|
23830 | appliesto: "scrollContainers",
|
23831 | computed: "asSpecified",
|
23832 | order: "perGrammar",
|
23833 | status: "standard",
|
23834 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
|
23835 | },
|
23836 | "scroll-padding-block": {
|
23837 | syntax: "[ auto | <length-percentage> ]{1,2}",
|
23838 | media: "visual",
|
23839 | inherited: false,
|
23840 | animationType: "byComputedValueType",
|
23841 | percentages: "relativeToTheScrollContainersScrollport",
|
23842 | groups: [
|
23843 | "CSS Scroll Snap"
|
23844 | ],
|
23845 | initial: "auto",
|
23846 | appliesto: "scrollContainers",
|
23847 | computed: "asSpecified",
|
23848 | order: "perGrammar",
|
23849 | status: "standard",
|
23850 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
|
23851 | },
|
23852 | "scroll-padding-block-start": {
|
23853 | syntax: "auto | <length-percentage>",
|
23854 | media: "visual",
|
23855 | inherited: false,
|
23856 | animationType: "byComputedValueType",
|
23857 | percentages: "relativeToTheScrollContainersScrollport",
|
23858 | groups: [
|
23859 | "CSS Scroll Snap"
|
23860 | ],
|
23861 | initial: "auto",
|
23862 | appliesto: "scrollContainers",
|
23863 | computed: "asSpecified",
|
23864 | order: "perGrammar",
|
23865 | status: "standard",
|
23866 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
|
23867 | },
|
23868 | "scroll-padding-block-end": {
|
23869 | syntax: "auto | <length-percentage>",
|
23870 | media: "visual",
|
23871 | inherited: false,
|
23872 | animationType: "byComputedValueType",
|
23873 | percentages: "relativeToTheScrollContainersScrollport",
|
23874 | groups: [
|
23875 | "CSS Scroll Snap"
|
23876 | ],
|
23877 | initial: "auto",
|
23878 | appliesto: "scrollContainers",
|
23879 | computed: "asSpecified",
|
23880 | order: "perGrammar",
|
23881 | status: "standard",
|
23882 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
|
23883 | },
|
23884 | "scroll-padding-bottom": {
|
23885 | syntax: "auto | <length-percentage>",
|
23886 | media: "visual",
|
23887 | inherited: false,
|
23888 | animationType: "byComputedValueType",
|
23889 | percentages: "relativeToTheScrollContainersScrollport",
|
23890 | groups: [
|
23891 | "CSS Scroll Snap"
|
23892 | ],
|
23893 | initial: "auto",
|
23894 | appliesto: "scrollContainers",
|
23895 | computed: "asSpecified",
|
23896 | order: "perGrammar",
|
23897 | status: "standard",
|
23898 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
|
23899 | },
|
23900 | "scroll-padding-inline": {
|
23901 | syntax: "[ auto | <length-percentage> ]{1,2}",
|
23902 | media: "visual",
|
23903 | inherited: false,
|
23904 | animationType: "byComputedValueType",
|
23905 | percentages: "relativeToTheScrollContainersScrollport",
|
23906 | groups: [
|
23907 | "CSS Scroll Snap"
|
23908 | ],
|
23909 | initial: "auto",
|
23910 | appliesto: "scrollContainers",
|
23911 | computed: "asSpecified",
|
23912 | order: "perGrammar",
|
23913 | status: "standard",
|
23914 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
|
23915 | },
|
23916 | "scroll-padding-inline-start": {
|
23917 | syntax: "auto | <length-percentage>",
|
23918 | media: "visual",
|
23919 | inherited: false,
|
23920 | animationType: "byComputedValueType",
|
23921 | percentages: "relativeToTheScrollContainersScrollport",
|
23922 | groups: [
|
23923 | "CSS Scroll Snap"
|
23924 | ],
|
23925 | initial: "auto",
|
23926 | appliesto: "scrollContainers",
|
23927 | computed: "asSpecified",
|
23928 | order: "perGrammar",
|
23929 | status: "standard",
|
23930 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
|
23931 | },
|
23932 | "scroll-padding-inline-end": {
|
23933 | syntax: "auto | <length-percentage>",
|
23934 | media: "visual",
|
23935 | inherited: false,
|
23936 | animationType: "byComputedValueType",
|
23937 | percentages: "relativeToTheScrollContainersScrollport",
|
23938 | groups: [
|
23939 | "CSS Scroll Snap"
|
23940 | ],
|
23941 | initial: "auto",
|
23942 | appliesto: "scrollContainers",
|
23943 | computed: "asSpecified",
|
23944 | order: "perGrammar",
|
23945 | status: "standard",
|
23946 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
|
23947 | },
|
23948 | "scroll-padding-left": {
|
23949 | syntax: "auto | <length-percentage>",
|
23950 | media: "visual",
|
23951 | inherited: false,
|
23952 | animationType: "byComputedValueType",
|
23953 | percentages: "relativeToTheScrollContainersScrollport",
|
23954 | groups: [
|
23955 | "CSS Scroll Snap"
|
23956 | ],
|
23957 | initial: "auto",
|
23958 | appliesto: "scrollContainers",
|
23959 | computed: "asSpecified",
|
23960 | order: "perGrammar",
|
23961 | status: "standard",
|
23962 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
|
23963 | },
|
23964 | "scroll-padding-right": {
|
23965 | syntax: "auto | <length-percentage>",
|
23966 | media: "visual",
|
23967 | inherited: false,
|
23968 | animationType: "byComputedValueType",
|
23969 | percentages: "relativeToTheScrollContainersScrollport",
|
23970 | groups: [
|
23971 | "CSS Scroll Snap"
|
23972 | ],
|
23973 | initial: "auto",
|
23974 | appliesto: "scrollContainers",
|
23975 | computed: "asSpecified",
|
23976 | order: "perGrammar",
|
23977 | status: "standard",
|
23978 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
|
23979 | },
|
23980 | "scroll-padding-top": {
|
23981 | syntax: "auto | <length-percentage>",
|
23982 | media: "visual",
|
23983 | inherited: false,
|
23984 | animationType: "byComputedValueType",
|
23985 | percentages: "relativeToTheScrollContainersScrollport",
|
23986 | groups: [
|
23987 | "CSS Scroll Snap"
|
23988 | ],
|
23989 | initial: "auto",
|
23990 | appliesto: "scrollContainers",
|
23991 | computed: "asSpecified",
|
23992 | order: "perGrammar",
|
23993 | status: "standard",
|
23994 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
|
23995 | },
|
23996 | "scroll-snap-align": {
|
23997 | syntax: "[ none | start | end | center ]{1,2}",
|
23998 | media: "visual",
|
23999 | inherited: false,
|
24000 | animationType: "discrete",
|
24001 | percentages: "no",
|
24002 | groups: [
|
24003 | "CSS Scroll Snap"
|
24004 | ],
|
24005 | initial: "none",
|
24006 | appliesto: "allElements",
|
24007 | computed: "asSpecified",
|
24008 | order: "perGrammar",
|
24009 | status: "standard",
|
24010 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
|
24011 | },
|
24012 | "scroll-snap-coordinate": {
|
24013 | syntax: "none | <position>#",
|
24014 | media: "interactive",
|
24015 | inherited: false,
|
24016 | animationType: "position",
|
24017 | percentages: "referToBorderBox",
|
24018 | groups: [
|
24019 | "CSS Scroll Snap"
|
24020 | ],
|
24021 | initial: "none",
|
24022 | appliesto: "allElements",
|
24023 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
24024 | order: "uniqueOrder",
|
24025 | status: "obsolete",
|
24026 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
|
24027 | },
|
24028 | "scroll-snap-destination": {
|
24029 | syntax: "<position>",
|
24030 | media: "interactive",
|
24031 | inherited: false,
|
24032 | animationType: "position",
|
24033 | percentages: "relativeToScrollContainerPaddingBoxAxis",
|
24034 | groups: [
|
24035 | "CSS Scroll Snap"
|
24036 | ],
|
24037 | initial: "0px 0px",
|
24038 | appliesto: "scrollContainers",
|
24039 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
24040 | order: "uniqueOrder",
|
24041 | status: "obsolete",
|
24042 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
|
24043 | },
|
24044 | "scroll-snap-points-x": {
|
24045 | syntax: "none | repeat( <length-percentage> )",
|
24046 | media: "interactive",
|
24047 | inherited: false,
|
24048 | animationType: "discrete",
|
24049 | percentages: "relativeToScrollContainerPaddingBoxAxis",
|
24050 | groups: [
|
24051 | "CSS Scroll Snap"
|
24052 | ],
|
24053 | initial: "none",
|
24054 | appliesto: "scrollContainers",
|
24055 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
24056 | order: "uniqueOrder",
|
24057 | status: "obsolete",
|
24058 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
|
24059 | },
|
24060 | "scroll-snap-points-y": {
|
24061 | syntax: "none | repeat( <length-percentage> )",
|
24062 | media: "interactive",
|
24063 | inherited: false,
|
24064 | animationType: "discrete",
|
24065 | percentages: "relativeToScrollContainerPaddingBoxAxis",
|
24066 | groups: [
|
24067 | "CSS Scroll Snap"
|
24068 | ],
|
24069 | initial: "none",
|
24070 | appliesto: "scrollContainers",
|
24071 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
24072 | order: "uniqueOrder",
|
24073 | status: "obsolete",
|
24074 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
|
24075 | },
|
24076 | "scroll-snap-stop": {
|
24077 | syntax: "normal | always",
|
24078 | media: "visual",
|
24079 | inherited: false,
|
24080 | animationType: "discrete",
|
24081 | percentages: "no",
|
24082 | groups: [
|
24083 | "CSS Scroll Snap"
|
24084 | ],
|
24085 | initial: "normal",
|
24086 | appliesto: "allElements",
|
24087 | computed: "asSpecified",
|
24088 | order: "perGrammar",
|
24089 | status: "standard",
|
24090 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
|
24091 | },
|
24092 | "scroll-snap-type": {
|
24093 | syntax: "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
|
24094 | media: "interactive",
|
24095 | inherited: false,
|
24096 | animationType: "discrete",
|
24097 | percentages: "no",
|
24098 | groups: [
|
24099 | "CSS Scroll Snap"
|
24100 | ],
|
24101 | initial: "none",
|
24102 | appliesto: "allElements",
|
24103 | computed: "asSpecified",
|
24104 | order: "uniqueOrder",
|
24105 | status: "standard",
|
24106 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
|
24107 | },
|
24108 | "scroll-snap-type-x": {
|
24109 | syntax: "none | mandatory | proximity",
|
24110 | media: "interactive",
|
24111 | inherited: false,
|
24112 | animationType: "discrete",
|
24113 | percentages: "no",
|
24114 | groups: [
|
24115 | "CSS Scroll Snap"
|
24116 | ],
|
24117 | initial: "none",
|
24118 | appliesto: "scrollContainers",
|
24119 | computed: "asSpecified",
|
24120 | order: "uniqueOrder",
|
24121 | status: "obsolete",
|
24122 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
|
24123 | },
|
24124 | "scroll-snap-type-y": {
|
24125 | syntax: "none | mandatory | proximity",
|
24126 | media: "interactive",
|
24127 | inherited: false,
|
24128 | animationType: "discrete",
|
24129 | percentages: "no",
|
24130 | groups: [
|
24131 | "CSS Scroll Snap"
|
24132 | ],
|
24133 | initial: "none",
|
24134 | appliesto: "scrollContainers",
|
24135 | computed: "asSpecified",
|
24136 | order: "uniqueOrder",
|
24137 | status: "obsolete",
|
24138 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
|
24139 | },
|
24140 | "shape-image-threshold": {
|
24141 | syntax: "<alpha-value>",
|
24142 | media: "visual",
|
24143 | inherited: false,
|
24144 | animationType: "number",
|
24145 | percentages: "no",
|
24146 | groups: [
|
24147 | "CSS Shapes"
|
24148 | ],
|
24149 | initial: "0.0",
|
24150 | appliesto: "floats",
|
24151 | computed: "specifiedValueNumberClipped0To1",
|
24152 | order: "uniqueOrder",
|
24153 | status: "standard",
|
24154 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
|
24155 | },
|
24156 | "shape-margin": {
|
24157 | syntax: "<length-percentage>",
|
24158 | media: "visual",
|
24159 | inherited: false,
|
24160 | animationType: "lpc",
|
24161 | percentages: "referToWidthOfContainingBlock",
|
24162 | groups: [
|
24163 | "CSS Shapes"
|
24164 | ],
|
24165 | initial: "0",
|
24166 | appliesto: "floats",
|
24167 | computed: "asSpecifiedRelativeToAbsoluteLengths",
|
24168 | order: "uniqueOrder",
|
24169 | status: "standard",
|
24170 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
|
24171 | },
|
24172 | "shape-outside": {
|
24173 | syntax: "none | <shape-box> || <basic-shape> | <image>",
|
24174 | media: "visual",
|
24175 | inherited: false,
|
24176 | animationType: "basicShapeOtherwiseNo",
|
24177 | percentages: "no",
|
24178 | groups: [
|
24179 | "CSS Shapes"
|
24180 | ],
|
24181 | initial: "none",
|
24182 | appliesto: "floats",
|
24183 | computed: "asDefinedForBasicShapeWithAbsoluteURIOtherwiseAsSpecified",
|
24184 | order: "uniqueOrder",
|
24185 | status: "standard",
|
24186 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
|
24187 | },
|
24188 | "tab-size": {
|
24189 | syntax: "<integer> | <length>",
|
24190 | media: "visual",
|
24191 | inherited: true,
|
24192 | animationType: "length",
|
24193 | percentages: "no",
|
24194 | groups: [
|
24195 | "CSS Text"
|
24196 | ],
|
24197 | initial: "8",
|
24198 | appliesto: "blockContainers",
|
24199 | computed: "specifiedIntegerOrAbsoluteLength",
|
24200 | order: "uniqueOrder",
|
24201 | status: "standard",
|
24202 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/tab-size"
|
24203 | },
|
24204 | "table-layout": {
|
24205 | syntax: "auto | fixed",
|
24206 | media: "visual",
|
24207 | inherited: false,
|
24208 | animationType: "discrete",
|
24209 | percentages: "no",
|
24210 | groups: [
|
24211 | "CSS Table"
|
24212 | ],
|
24213 | initial: "auto",
|
24214 | appliesto: "tableElements",
|
24215 | computed: "asSpecified",
|
24216 | order: "uniqueOrder",
|
24217 | status: "standard",
|
24218 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/table-layout"
|
24219 | },
|
24220 | "text-align": {
|
24221 | syntax: "start | end | left | right | center | justify | match-parent",
|
24222 | media: "visual",
|
24223 | inherited: true,
|
24224 | animationType: "discrete",
|
24225 | percentages: "no",
|
24226 | groups: [
|
24227 | "CSS Text"
|
24228 | ],
|
24229 | initial: "startOrNamelessValueIfLTRRightIfRTL",
|
24230 | appliesto: "blockContainers",
|
24231 | computed: "asSpecifiedExceptMatchParent",
|
24232 | order: "orderOfAppearance",
|
24233 | alsoAppliesTo: [
|
24234 | "::placeholder"
|
24235 | ],
|
24236 | status: "standard",
|
24237 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align"
|
24238 | },
|
24239 | "text-align-last": {
|
24240 | syntax: "auto | start | end | left | right | center | justify",
|
24241 | media: "visual",
|
24242 | inherited: true,
|
24243 | animationType: "discrete",
|
24244 | percentages: "no",
|
24245 | groups: [
|
24246 | "CSS Text"
|
24247 | ],
|
24248 | initial: "auto",
|
24249 | appliesto: "blockContainers",
|
24250 | computed: "asSpecified",
|
24251 | order: "uniqueOrder",
|
24252 | status: "standard",
|
24253 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
|
24254 | },
|
24255 | "text-combine-upright": {
|
24256 | syntax: "none | all | [ digits <integer>? ]",
|
24257 | media: "visual",
|
24258 | inherited: true,
|
24259 | animationType: "notAnimatable",
|
24260 | percentages: "no",
|
24261 | groups: [
|
24262 | "CSS Writing Modes"
|
24263 | ],
|
24264 | initial: "none",
|
24265 | appliesto: "nonReplacedInlineElements",
|
24266 | computed: "keywordPlusIntegerIfDigits",
|
24267 | order: "uniqueOrder",
|
24268 | status: "standard",
|
24269 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
|
24270 | },
|
24271 | "text-decoration": {
|
24272 | syntax: "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
|
24273 | media: "visual",
|
24274 | inherited: false,
|
24275 | animationType: [
|
24276 | "text-decoration-color",
|
24277 | "text-decoration-style",
|
24278 | "text-decoration-line",
|
24279 | "text-decoration-thickness"
|
24280 | ],
|
24281 | percentages: "no",
|
24282 | groups: [
|
24283 | "CSS Text Decoration"
|
24284 | ],
|
24285 | initial: [
|
24286 | "text-decoration-color",
|
24287 | "text-decoration-style",
|
24288 | "text-decoration-line"
|
24289 | ],
|
24290 | appliesto: "allElements",
|
24291 | computed: [
|
24292 | "text-decoration-line",
|
24293 | "text-decoration-style",
|
24294 | "text-decoration-color",
|
24295 | "text-decoration-thickness"
|
24296 | ],
|
24297 | order: "orderOfAppearance",
|
24298 | alsoAppliesTo: [
|
24299 | "::first-letter",
|
24300 | "::first-line",
|
24301 | "::placeholder"
|
24302 | ],
|
24303 | status: "standard",
|
24304 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
|
24305 | },
|
24306 | "text-decoration-color": {
|
24307 | syntax: "<color>",
|
24308 | media: "visual",
|
24309 | inherited: false,
|
24310 | animationType: "color",
|
24311 | percentages: "no",
|
24312 | groups: [
|
24313 | "CSS Text Decoration"
|
24314 | ],
|
24315 | initial: "currentcolor",
|
24316 | appliesto: "allElements",
|
24317 | computed: "computedColor",
|
24318 | order: "uniqueOrder",
|
24319 | alsoAppliesTo: [
|
24320 | "::first-letter",
|
24321 | "::first-line",
|
24322 | "::placeholder"
|
24323 | ],
|
24324 | status: "standard",
|
24325 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
|
24326 | },
|
24327 | "text-decoration-line": {
|
24328 | syntax: "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
|
24329 | media: "visual",
|
24330 | inherited: false,
|
24331 | animationType: "discrete",
|
24332 | percentages: "no",
|
24333 | groups: [
|
24334 | "CSS Text Decoration"
|
24335 | ],
|
24336 | initial: "none",
|
24337 | appliesto: "allElements",
|
24338 | computed: "asSpecified",
|
24339 | order: "orderOfAppearance",
|
24340 | alsoAppliesTo: [
|
24341 | "::first-letter",
|
24342 | "::first-line",
|
24343 | "::placeholder"
|
24344 | ],
|
24345 | status: "standard",
|
24346 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
|
24347 | },
|
24348 | "text-decoration-skip": {
|
24349 | syntax: "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
|
24350 | media: "visual",
|
24351 | inherited: true,
|
24352 | animationType: "discrete",
|
24353 | percentages: "no",
|
24354 | groups: [
|
24355 | "CSS Text Decoration"
|
24356 | ],
|
24357 | initial: "objects",
|
24358 | appliesto: "allElements",
|
24359 | computed: "asSpecified",
|
24360 | order: "orderOfAppearance",
|
24361 | status: "experimental",
|
24362 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
|
24363 | },
|
24364 | "text-decoration-skip-ink": {
|
24365 | syntax: "auto | all | none",
|
24366 | media: "visual",
|
24367 | inherited: true,
|
24368 | animationType: "discrete",
|
24369 | percentages: "no",
|
24370 | groups: [
|
24371 | "CSS Text Decoration"
|
24372 | ],
|
24373 | initial: "auto",
|
24374 | appliesto: "allElements",
|
24375 | computed: "asSpecified",
|
24376 | order: "orderOfAppearance",
|
24377 | status: "standard",
|
24378 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
|
24379 | },
|
24380 | "text-decoration-style": {
|
24381 | syntax: "solid | double | dotted | dashed | wavy",
|
24382 | media: "visual",
|
24383 | inherited: false,
|
24384 | animationType: "discrete",
|
24385 | percentages: "no",
|
24386 | groups: [
|
24387 | "CSS Text Decoration"
|
24388 | ],
|
24389 | initial: "solid",
|
24390 | appliesto: "allElements",
|
24391 | computed: "asSpecified",
|
24392 | order: "uniqueOrder",
|
24393 | alsoAppliesTo: [
|
24394 | "::first-letter",
|
24395 | "::first-line",
|
24396 | "::placeholder"
|
24397 | ],
|
24398 | status: "standard",
|
24399 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
|
24400 | },
|
24401 | "text-decoration-thickness": {
|
24402 | syntax: "auto | from-font | <length> | <percentage> ",
|
24403 | media: "visual",
|
24404 | inherited: false,
|
24405 | animationType: "byComputedValueType",
|
24406 | percentages: "referToElementFontSize",
|
24407 | groups: [
|
24408 | "CSS Text Decoration"
|
24409 | ],
|
24410 | initial: "auto",
|
24411 | appliesto: "allElements",
|
24412 | computed: "asSpecified",
|
24413 | order: "uniqueOrder",
|
24414 | alsoAppliesTo: [
|
24415 | "::first-letter",
|
24416 | "::first-line",
|
24417 | "::placeholder"
|
24418 | ],
|
24419 | status: "standard",
|
24420 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
|
24421 | },
|
24422 | "text-emphasis": {
|
24423 | syntax: "<'text-emphasis-style'> || <'text-emphasis-color'>",
|
24424 | media: "visual",
|
24425 | inherited: false,
|
24426 | animationType: [
|
24427 | "text-emphasis-color",
|
24428 | "text-emphasis-style"
|
24429 | ],
|
24430 | percentages: "no",
|
24431 | groups: [
|
24432 | "CSS Text Decoration"
|
24433 | ],
|
24434 | initial: [
|
24435 | "text-emphasis-style",
|
24436 | "text-emphasis-color"
|
24437 | ],
|
24438 | appliesto: "allElements",
|
24439 | computed: [
|
24440 | "text-emphasis-style",
|
24441 | "text-emphasis-color"
|
24442 | ],
|
24443 | order: "orderOfAppearance",
|
24444 | status: "standard",
|
24445 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
|
24446 | },
|
24447 | "text-emphasis-color": {
|
24448 | syntax: "<color>",
|
24449 | media: "visual",
|
24450 | inherited: false,
|
24451 | animationType: "color",
|
24452 | percentages: "no",
|
24453 | groups: [
|
24454 | "CSS Text Decoration"
|
24455 | ],
|
24456 | initial: "currentcolor",
|
24457 | appliesto: "allElements",
|
24458 | computed: "computedColor",
|
24459 | order: "uniqueOrder",
|
24460 | status: "standard",
|
24461 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
|
24462 | },
|
24463 | "text-emphasis-position": {
|
24464 | syntax: "[ over | under ] && [ right | left ]",
|
24465 | media: "visual",
|
24466 | inherited: false,
|
24467 | animationType: "discrete",
|
24468 | percentages: "no",
|
24469 | groups: [
|
24470 | "CSS Text Decoration"
|
24471 | ],
|
24472 | initial: "over right",
|
24473 | appliesto: "allElements",
|
24474 | computed: "asSpecified",
|
24475 | order: "uniqueOrder",
|
24476 | status: "standard",
|
24477 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
|
24478 | },
|
24479 | "text-emphasis-style": {
|
24480 | syntax: "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
|
24481 | media: "visual",
|
24482 | inherited: false,
|
24483 | animationType: "discrete",
|
24484 | percentages: "no",
|
24485 | groups: [
|
24486 | "CSS Text Decoration"
|
24487 | ],
|
24488 | initial: "none",
|
24489 | appliesto: "allElements",
|
24490 | computed: "asSpecified",
|
24491 | order: "uniqueOrder",
|
24492 | status: "standard",
|
24493 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
|
24494 | },
|
24495 | "text-indent": {
|
24496 | syntax: "<length-percentage> && hanging? && each-line?",
|
24497 | media: "visual",
|
24498 | inherited: true,
|
24499 | animationType: "lpc",
|
24500 | percentages: "referToWidthOfContainingBlock",
|
24501 | groups: [
|
24502 | "CSS Text"
|
24503 | ],
|
24504 | initial: "0",
|
24505 | appliesto: "blockContainers",
|
24506 | computed: "percentageOrAbsoluteLengthPlusKeywords",
|
24507 | order: "lengthOrPercentageBeforeKeywords",
|
24508 | status: "standard",
|
24509 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-indent"
|
24510 | },
|
24511 | "text-justify": {
|
24512 | syntax: "auto | inter-character | inter-word | none",
|
24513 | media: "visual",
|
24514 | inherited: true,
|
24515 | animationType: "discrete",
|
24516 | percentages: "no",
|
24517 | groups: [
|
24518 | "CSS Text"
|
24519 | ],
|
24520 | initial: "auto",
|
24521 | appliesto: "inlineLevelAndTableCellElements",
|
24522 | computed: "asSpecified",
|
24523 | order: "uniqueOrder",
|
24524 | status: "standard",
|
24525 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-justify"
|
24526 | },
|
24527 | "text-orientation": {
|
24528 | syntax: "mixed | upright | sideways",
|
24529 | media: "visual",
|
24530 | inherited: true,
|
24531 | animationType: "discrete",
|
24532 | percentages: "no",
|
24533 | groups: [
|
24534 | "CSS Writing Modes"
|
24535 | ],
|
24536 | initial: "mixed",
|
24537 | appliesto: "allElementsExceptTableRowGroupsRowsColumnGroupsAndColumns",
|
24538 | computed: "asSpecified",
|
24539 | order: "uniqueOrder",
|
24540 | status: "standard",
|
24541 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
|
24542 | },
|
24543 | "text-overflow": {
|
24544 | syntax: "[ clip | ellipsis | <string> ]{1,2}",
|
24545 | media: "visual",
|
24546 | inherited: false,
|
24547 | animationType: "discrete",
|
24548 | percentages: "no",
|
24549 | groups: [
|
24550 | "CSS Basic User Interface"
|
24551 | ],
|
24552 | initial: "clip",
|
24553 | appliesto: "blockContainerElements",
|
24554 | computed: "asSpecified",
|
24555 | order: "uniqueOrder",
|
24556 | alsoAppliesTo: [
|
24557 | "::placeholder"
|
24558 | ],
|
24559 | status: "standard",
|
24560 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
|
24561 | },
|
24562 | "text-rendering": {
|
24563 | syntax: "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
|
24564 | media: "visual",
|
24565 | inherited: true,
|
24566 | animationType: "discrete",
|
24567 | percentages: "no",
|
24568 | groups: [
|
24569 | "CSS Miscellaneous"
|
24570 | ],
|
24571 | initial: "auto",
|
24572 | appliesto: "textElements",
|
24573 | computed: "asSpecified",
|
24574 | order: "uniqueOrder",
|
24575 | status: "standard",
|
24576 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
|
24577 | },
|
24578 | "text-shadow": {
|
24579 | syntax: "none | <shadow-t>#",
|
24580 | media: "visual",
|
24581 | inherited: true,
|
24582 | animationType: "shadowList",
|
24583 | percentages: "no",
|
24584 | groups: [
|
24585 | "CSS Text Decoration"
|
24586 | ],
|
24587 | initial: "none",
|
24588 | appliesto: "allElements",
|
24589 | computed: "colorPlusThreeAbsoluteLengths",
|
24590 | order: "uniqueOrder",
|
24591 | alsoAppliesTo: [
|
24592 | "::first-letter",
|
24593 | "::first-line",
|
24594 | "::placeholder"
|
24595 | ],
|
24596 | status: "standard",
|
24597 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
|
24598 | },
|
24599 | "text-size-adjust": {
|
24600 | syntax: "none | auto | <percentage>",
|
24601 | media: "visual",
|
24602 | inherited: true,
|
24603 | animationType: "discrete",
|
24604 | percentages: "referToSizeOfFont",
|
24605 | groups: [
|
24606 | "CSS Text"
|
24607 | ],
|
24608 | initial: "autoForSmartphoneBrowsersSupportingInflation",
|
24609 | appliesto: "allElements",
|
24610 | computed: "asSpecified",
|
24611 | order: "uniqueOrder",
|
24612 | status: "experimental",
|
24613 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
|
24614 | },
|
24615 | "text-transform": {
|
24616 | syntax: "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
|
24617 | media: "visual",
|
24618 | inherited: true,
|
24619 | animationType: "discrete",
|
24620 | percentages: "no",
|
24621 | groups: [
|
24622 | "CSS Text"
|
24623 | ],
|
24624 | initial: "none",
|
24625 | appliesto: "allElements",
|
24626 | computed: "asSpecified",
|
24627 | order: "uniqueOrder",
|
24628 | alsoAppliesTo: [
|
24629 | "::first-letter",
|
24630 | "::first-line",
|
24631 | "::placeholder"
|
24632 | ],
|
24633 | status: "standard",
|
24634 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-transform"
|
24635 | },
|
24636 | "text-underline-offset": {
|
24637 | syntax: "auto | <length> | <percentage> ",
|
24638 | media: "visual",
|
24639 | inherited: true,
|
24640 | animationType: "byComputedValueType",
|
24641 | percentages: "referToElementFontSize",
|
24642 | groups: [
|
24643 | "CSS Text Decoration"
|
24644 | ],
|
24645 | initial: "auto",
|
24646 | appliesto: "allElements",
|
24647 | computed: "asSpecified",
|
24648 | order: "uniqueOrder",
|
24649 | alsoAppliesTo: [
|
24650 | "::first-letter",
|
24651 | "::first-line",
|
24652 | "::placeholder"
|
24653 | ],
|
24654 | status: "standard",
|
24655 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
|
24656 | },
|
24657 | "text-underline-position": {
|
24658 | syntax: "auto | from-font | [ under || [ left | right ] ]",
|
24659 | media: "visual",
|
24660 | inherited: true,
|
24661 | animationType: "discrete",
|
24662 | percentages: "no",
|
24663 | groups: [
|
24664 | "CSS Text Decoration"
|
24665 | ],
|
24666 | initial: "auto",
|
24667 | appliesto: "allElements",
|
24668 | computed: "asSpecified",
|
24669 | order: "orderOfAppearance",
|
24670 | status: "standard",
|
24671 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
|
24672 | },
|
24673 | top: top,
|
24674 | "touch-action": {
|
24675 | syntax: "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
|
24676 | media: "visual",
|
24677 | inherited: false,
|
24678 | animationType: "discrete",
|
24679 | percentages: "no",
|
24680 | groups: [
|
24681 | "Pointer Events"
|
24682 | ],
|
24683 | initial: "auto",
|
24684 | appliesto: "allElementsExceptNonReplacedInlineElementsTableRowsColumnsRowColumnGroups",
|
24685 | computed: "asSpecified",
|
24686 | order: "uniqueOrder",
|
24687 | status: "standard",
|
24688 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/touch-action"
|
24689 | },
|
24690 | transform: transform,
|
24691 | "transform-box": {
|
24692 | syntax: "content-box | border-box | fill-box | stroke-box | view-box",
|
24693 | media: "visual",
|
24694 | inherited: false,
|
24695 | animationType: "discrete",
|
24696 | percentages: "no",
|
24697 | groups: [
|
24698 | "CSS Transforms"
|
24699 | ],
|
24700 | initial: "view-box",
|
24701 | appliesto: "transformableElements",
|
24702 | computed: "asSpecified",
|
24703 | order: "perGrammar",
|
24704 | status: "standard",
|
24705 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-box"
|
24706 | },
|
24707 | "transform-origin": {
|
24708 | syntax: "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
|
24709 | media: "visual",
|
24710 | inherited: false,
|
24711 | animationType: "simpleListOfLpc",
|
24712 | percentages: "referToSizeOfBoundingBox",
|
24713 | groups: [
|
24714 | "CSS Transforms"
|
24715 | ],
|
24716 | initial: "50% 50% 0",
|
24717 | appliesto: "transformableElements",
|
24718 | computed: "forLengthAbsoluteValueOtherwisePercentage",
|
24719 | order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
|
24720 | status: "standard",
|
24721 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
|
24722 | },
|
24723 | "transform-style": {
|
24724 | syntax: "flat | preserve-3d",
|
24725 | media: "visual",
|
24726 | inherited: false,
|
24727 | animationType: "discrete",
|
24728 | percentages: "no",
|
24729 | groups: [
|
24730 | "CSS Transforms"
|
24731 | ],
|
24732 | initial: "flat",
|
24733 | appliesto: "transformableElements",
|
24734 | computed: "asSpecified",
|
24735 | order: "uniqueOrder",
|
24736 | stacking: true,
|
24737 | status: "standard",
|
24738 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-style"
|
24739 | },
|
24740 | transition: transition,
|
24741 | "transition-delay": {
|
24742 | syntax: "<time>#",
|
24743 | media: "interactive",
|
24744 | inherited: false,
|
24745 | animationType: "discrete",
|
24746 | percentages: "no",
|
24747 | groups: [
|
24748 | "CSS Transitions"
|
24749 | ],
|
24750 | initial: "0s",
|
24751 | appliesto: "allElementsAndPseudos",
|
24752 | computed: "asSpecified",
|
24753 | order: "uniqueOrder",
|
24754 | status: "standard",
|
24755 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
|
24756 | },
|
24757 | "transition-duration": {
|
24758 | syntax: "<time>#",
|
24759 | media: "interactive",
|
24760 | inherited: false,
|
24761 | animationType: "discrete",
|
24762 | percentages: "no",
|
24763 | groups: [
|
24764 | "CSS Transitions"
|
24765 | ],
|
24766 | initial: "0s",
|
24767 | appliesto: "allElementsAndPseudos",
|
24768 | computed: "asSpecified",
|
24769 | order: "uniqueOrder",
|
24770 | status: "standard",
|
24771 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
|
24772 | },
|
24773 | "transition-property": {
|
24774 | syntax: "none | <single-transition-property>#",
|
24775 | media: "visual",
|
24776 | inherited: false,
|
24777 | animationType: "discrete",
|
24778 | percentages: "no",
|
24779 | groups: [
|
24780 | "CSS Transitions"
|
24781 | ],
|
24782 | initial: "all",
|
24783 | appliesto: "allElementsAndPseudos",
|
24784 | computed: "asSpecified",
|
24785 | order: "uniqueOrder",
|
24786 | status: "standard",
|
24787 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-property"
|
24788 | },
|
24789 | "transition-timing-function": {
|
24790 | syntax: "<timing-function>#",
|
24791 | media: "interactive",
|
24792 | inherited: false,
|
24793 | animationType: "discrete",
|
24794 | percentages: "no",
|
24795 | groups: [
|
24796 | "CSS Transitions"
|
24797 | ],
|
24798 | initial: "ease",
|
24799 | appliesto: "allElementsAndPseudos",
|
24800 | computed: "asSpecified",
|
24801 | order: "uniqueOrder",
|
24802 | status: "standard",
|
24803 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
|
24804 | },
|
24805 | translate: translate,
|
24806 | "unicode-bidi": {
|
24807 | syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext",
|
24808 | media: "visual",
|
24809 | inherited: false,
|
24810 | animationType: "discrete",
|
24811 | percentages: "no",
|
24812 | groups: [
|
24813 | "CSS Writing Modes"
|
24814 | ],
|
24815 | initial: "normal",
|
24816 | appliesto: "allElementsSomeValuesNoEffectOnNonInlineElements",
|
24817 | computed: "asSpecified",
|
24818 | order: "uniqueOrder",
|
24819 | status: "standard",
|
24820 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
|
24821 | },
|
24822 | "user-select": {
|
24823 | syntax: "auto | text | none | contain | all",
|
24824 | media: "visual",
|
24825 | inherited: false,
|
24826 | animationType: "discrete",
|
24827 | percentages: "no",
|
24828 | groups: [
|
24829 | "CSS Basic User Interface"
|
24830 | ],
|
24831 | initial: "auto",
|
24832 | appliesto: "allElements",
|
24833 | computed: "asSpecified",
|
24834 | order: "uniqueOrder",
|
24835 | status: "nonstandard",
|
24836 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/user-select"
|
24837 | },
|
24838 | "vertical-align": {
|
24839 | syntax: "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
|
24840 | media: "visual",
|
24841 | inherited: false,
|
24842 | animationType: "length",
|
24843 | percentages: "referToLineHeight",
|
24844 | groups: [
|
24845 | "CSS Table"
|
24846 | ],
|
24847 | initial: "baseline",
|
24848 | appliesto: "inlineLevelAndTableCellElements",
|
24849 | computed: "absoluteLengthOrKeyword",
|
24850 | order: "uniqueOrder",
|
24851 | alsoAppliesTo: [
|
24852 | "::first-letter",
|
24853 | "::first-line",
|
24854 | "::placeholder"
|
24855 | ],
|
24856 | status: "standard",
|
24857 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
|
24858 | },
|
24859 | visibility: visibility,
|
24860 | "white-space": {
|
24861 | syntax: "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
|
24862 | media: "visual",
|
24863 | inherited: true,
|
24864 | animationType: "discrete",
|
24865 | percentages: "no",
|
24866 | groups: [
|
24867 | "CSS Text"
|
24868 | ],
|
24869 | initial: "normal",
|
24870 | appliesto: "allElements",
|
24871 | computed: "asSpecified",
|
24872 | order: "uniqueOrder",
|
24873 | status: "standard",
|
24874 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/white-space"
|
24875 | },
|
24876 | widows: widows,
|
24877 | width: width,
|
24878 | "will-change": {
|
24879 | syntax: "auto | <animateable-feature>#",
|
24880 | media: "all",
|
24881 | inherited: false,
|
24882 | animationType: "discrete",
|
24883 | percentages: "no",
|
24884 | groups: [
|
24885 | "CSS Will Change"
|
24886 | ],
|
24887 | initial: "auto",
|
24888 | appliesto: "allElements",
|
24889 | computed: "asSpecified",
|
24890 | order: "uniqueOrder",
|
24891 | status: "standard",
|
24892 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/will-change"
|
24893 | },
|
24894 | "word-break": {
|
24895 | syntax: "normal | break-all | keep-all | break-word",
|
24896 | media: "visual",
|
24897 | inherited: true,
|
24898 | animationType: "discrete",
|
24899 | percentages: "no",
|
24900 | groups: [
|
24901 | "CSS Text"
|
24902 | ],
|
24903 | initial: "normal",
|
24904 | appliesto: "allElements",
|
24905 | computed: "asSpecified",
|
24906 | order: "uniqueOrder",
|
24907 | status: "standard",
|
24908 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-break"
|
24909 | },
|
24910 | "word-spacing": {
|
24911 | syntax: "normal | <length-percentage>",
|
24912 | media: "visual",
|
24913 | inherited: true,
|
24914 | animationType: "length",
|
24915 | percentages: "referToWidthOfAffectedGlyph",
|
24916 | groups: [
|
24917 | "CSS Text"
|
24918 | ],
|
24919 | initial: "normal",
|
24920 | appliesto: "allElements",
|
24921 | computed: "optimumMinAndMaxValueOfAbsoluteLengthPercentageOrNormal",
|
24922 | order: "uniqueOrder",
|
24923 | alsoAppliesTo: [
|
24924 | "::first-letter",
|
24925 | "::first-line",
|
24926 | "::placeholder"
|
24927 | ],
|
24928 | status: "standard",
|
24929 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
|
24930 | },
|
24931 | "word-wrap": {
|
24932 | syntax: "normal | break-word",
|
24933 | media: "visual",
|
24934 | inherited: true,
|
24935 | animationType: "discrete",
|
24936 | percentages: "no",
|
24937 | groups: [
|
24938 | "CSS Text"
|
24939 | ],
|
24940 | initial: "normal",
|
24941 | appliesto: "nonReplacedInlineElements",
|
24942 | computed: "asSpecified",
|
24943 | order: "uniqueOrder",
|
24944 | status: "standard",
|
24945 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
|
24946 | },
|
24947 | "writing-mode": {
|
24948 | syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
|
24949 | media: "visual",
|
24950 | inherited: true,
|
24951 | animationType: "discrete",
|
24952 | percentages: "no",
|
24953 | groups: [
|
24954 | "CSS Writing Modes"
|
24955 | ],
|
24956 | initial: "horizontal-tb",
|
24957 | appliesto: "allElementsExceptTableRowColumnGroupsTableRowsColumns",
|
24958 | computed: "asSpecified",
|
24959 | order: "uniqueOrder",
|
24960 | status: "standard",
|
24961 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
|
24962 | },
|
24963 | "z-index": {
|
24964 | syntax: "auto | <integer>",
|
24965 | media: "visual",
|
24966 | inherited: false,
|
24967 | animationType: "integer",
|
24968 | percentages: "no",
|
24969 | groups: [
|
24970 | "CSS Positioning"
|
24971 | ],
|
24972 | initial: "auto",
|
24973 | appliesto: "positionedElements",
|
24974 | computed: "asSpecified",
|
24975 | order: "uniqueOrder",
|
24976 | stacking: true,
|
24977 | status: "standard",
|
24978 | mdn_url: "https://developer.mozilla.org/docs/Web/CSS/z-index"
|
24979 | },
|
24980 | zoom: zoom
|
24981 | };
|
24982 |
|
24983 | var attachment = {
|
24984 | syntax: "scroll | fixed | local"
|
24985 | };
|
24986 | var box = {
|
24987 | syntax: "border-box | padding-box | content-box"
|
24988 | };
|
24989 | var color$1 = {
|
24990 | syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>"
|
24991 | };
|
24992 | var combinator = {
|
24993 | syntax: "'>' | '+' | '~' | [ '||' ]"
|
24994 | };
|
24995 | var gradient = {
|
24996 | syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>"
|
24997 | };
|
24998 | var hue = {
|
24999 | syntax: "<number> | <angle>"
|
25000 | };
|
25001 | var image = {
|
25002 | syntax: "<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>"
|
25003 | };
|
25004 | var nth = {
|
25005 | syntax: "<an-plus-b> | even | odd"
|
25006 | };
|
25007 | var position$1 = {
|
25008 | syntax: "[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]"
|
25009 | };
|
25010 | var quote = {
|
25011 | syntax: "open-quote | close-quote | no-open-quote | no-close-quote"
|
25012 | };
|
25013 | var shadow = {
|
25014 | syntax: "inset? && <length>{2,4} && <color>?"
|
25015 | };
|
25016 | var shape$1 = {
|
25017 | syntax: "rect(<top>, <right>, <bottom>, <left>)"
|
25018 | };
|
25019 | var size = {
|
25020 | syntax: "closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}"
|
25021 | };
|
25022 | var symbol = {
|
25023 | syntax: "<string> | <image> | <custom-ident>"
|
25024 | };
|
25025 | var target = {
|
25026 | syntax: "<target-counter()> | <target-counters()> | <target-text()>"
|
25027 | };
|
25028 | var mdnSyntaxes = {
|
25029 | "absolute-size": {
|
25030 | syntax: "xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large"
|
25031 | },
|
25032 | "alpha-value": {
|
25033 | syntax: "<number> | <percentage>"
|
25034 | },
|
25035 | "angle-percentage": {
|
25036 | syntax: "<angle> | <percentage>"
|
25037 | },
|
25038 | "angular-color-hint": {
|
25039 | syntax: "<angle-percentage>"
|
25040 | },
|
25041 | "angular-color-stop": {
|
25042 | syntax: "<color> && <color-stop-angle>?"
|
25043 | },
|
25044 | "angular-color-stop-list": {
|
25045 | syntax: "[ <angular-color-stop> [, <angular-color-hint>]? ]# , <angular-color-stop>"
|
25046 | },
|
25047 | "animateable-feature": {
|
25048 | syntax: "scroll-position | contents | <custom-ident>"
|
25049 | },
|
25050 | attachment: attachment,
|
25051 | "attr()": {
|
25052 | syntax: "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )"
|
25053 | },
|
25054 | "attr-matcher": {
|
25055 | syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='"
|
25056 | },
|
25057 | "attr-modifier": {
|
25058 | syntax: "i | s"
|
25059 | },
|
25060 | "attribute-selector": {
|
25061 | syntax: "'[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'"
|
25062 | },
|
25063 | "auto-repeat": {
|
25064 | syntax: "repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"
|
25065 | },
|
25066 | "auto-track-list": {
|
25067 | syntax: "[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>? <auto-repeat>\n[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?"
|
25068 | },
|
25069 | "baseline-position": {
|
25070 | syntax: "[ first | last ]? baseline"
|
25071 | },
|
25072 | "basic-shape": {
|
25073 | syntax: "<inset()> | <circle()> | <ellipse()> | <polygon()> | <path()>"
|
25074 | },
|
25075 | "bg-image": {
|
25076 | syntax: "none | <image>"
|
25077 | },
|
25078 | "bg-layer": {
|
25079 | syntax: "<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"
|
25080 | },
|
25081 | "bg-position": {
|
25082 | syntax: "[ [ left | center | right | top | bottom | <length-percentage> ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ] | [ center | [ left | right ] <length-percentage>? ] && [ center | [ top | bottom ] <length-percentage>? ] ]"
|
25083 | },
|
25084 | "bg-size": {
|
25085 | syntax: "[ <length-percentage> | auto ]{1,2} | cover | contain"
|
25086 | },
|
25087 | "blur()": {
|
25088 | syntax: "blur( <length> )"
|
25089 | },
|
25090 | "blend-mode": {
|
25091 | syntax: "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"
|
25092 | },
|
25093 | box: box,
|
25094 | "brightness()": {
|
25095 | syntax: "brightness( <number-percentage> )"
|
25096 | },
|
25097 | "calc()": {
|
25098 | syntax: "calc( <calc-sum> )"
|
25099 | },
|
25100 | "calc-sum": {
|
25101 | syntax: "<calc-product> [ [ '+' | '-' ] <calc-product> ]*"
|
25102 | },
|
25103 | "calc-product": {
|
25104 | syntax: "<calc-value> [ '*' <calc-value> | '/' <number> ]*"
|
25105 | },
|
25106 | "calc-value": {
|
25107 | syntax: "<number> | <dimension> | <percentage> | ( <calc-sum> )"
|
25108 | },
|
25109 | "cf-final-image": {
|
25110 | syntax: "<image> | <color>"
|
25111 | },
|
25112 | "cf-mixing-image": {
|
25113 | syntax: "<percentage>? && <image>"
|
25114 | },
|
25115 | "circle()": {
|
25116 | syntax: "circle( [ <shape-radius> ]? [ at <position> ]? )"
|
25117 | },
|
25118 | "clamp()": {
|
25119 | syntax: "clamp( <calc-sum>#{3} )"
|
25120 | },
|
25121 | "class-selector": {
|
25122 | syntax: "'.' <ident-token>"
|
25123 | },
|
25124 | "clip-source": {
|
25125 | syntax: "<url>"
|
25126 | },
|
25127 | color: color$1,
|
25128 | "color-stop": {
|
25129 | syntax: "<color-stop-length> | <color-stop-angle>"
|
25130 | },
|
25131 | "color-stop-angle": {
|
25132 | syntax: "<angle-percentage>{1,2}"
|
25133 | },
|
25134 | "color-stop-length": {
|
25135 | syntax: "<length-percentage>{1,2}"
|
25136 | },
|
25137 | "color-stop-list": {
|
25138 | syntax: "[ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>"
|
25139 | },
|
25140 | combinator: combinator,
|
25141 | "common-lig-values": {
|
25142 | syntax: "[ common-ligatures | no-common-ligatures ]"
|
25143 | },
|
25144 | "compat-auto": {
|
25145 | syntax: "searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button"
|
25146 | },
|
25147 | "composite-style": {
|
25148 | syntax: "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor"
|
25149 | },
|
25150 | "compositing-operator": {
|
25151 | syntax: "add | subtract | intersect | exclude"
|
25152 | },
|
25153 | "compound-selector": {
|
25154 | syntax: "[ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!"
|
25155 | },
|
25156 | "compound-selector-list": {
|
25157 | syntax: "<compound-selector>#"
|
25158 | },
|
25159 | "complex-selector": {
|
25160 | syntax: "<compound-selector> [ <combinator>? <compound-selector> ]*"
|
25161 | },
|
25162 | "complex-selector-list": {
|
25163 | syntax: "<complex-selector>#"
|
25164 | },
|
25165 | "conic-gradient()": {
|
25166 | syntax: "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )"
|
25167 | },
|
25168 | "contextual-alt-values": {
|
25169 | syntax: "[ contextual | no-contextual ]"
|
25170 | },
|
25171 | "content-distribution": {
|
25172 | syntax: "space-between | space-around | space-evenly | stretch"
|
25173 | },
|
25174 | "content-list": {
|
25175 | syntax: "[ <string> | contents | <image> | <quote> | <target> | <leader()> ]+"
|
25176 | },
|
25177 | "content-position": {
|
25178 | syntax: "center | start | end | flex-start | flex-end"
|
25179 | },
|
25180 | "content-replacement": {
|
25181 | syntax: "<image>"
|
25182 | },
|
25183 | "contrast()": {
|
25184 | syntax: "contrast( [ <number-percentage> ] )"
|
25185 | },
|
25186 | "counter()": {
|
25187 | syntax: "counter( <custom-ident>, <counter-style>? )"
|
25188 | },
|
25189 | "counter-style": {
|
25190 | syntax: "<counter-style-name> | symbols()"
|
25191 | },
|
25192 | "counter-style-name": {
|
25193 | syntax: "<custom-ident>"
|
25194 | },
|
25195 | "counters()": {
|
25196 | syntax: "counters( <custom-ident>, <string>, <counter-style>? )"
|
25197 | },
|
25198 | "cross-fade()": {
|
25199 | syntax: "cross-fade( <cf-mixing-image> , <cf-final-image>? )"
|
25200 | },
|
25201 | "cubic-bezier-timing-function": {
|
25202 | syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"
|
25203 | },
|
25204 | "deprecated-system-color": {
|
25205 | syntax: "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"
|
25206 | },
|
25207 | "discretionary-lig-values": {
|
25208 | syntax: "[ discretionary-ligatures | no-discretionary-ligatures ]"
|
25209 | },
|
25210 | "display-box": {
|
25211 | syntax: "contents | none"
|
25212 | },
|
25213 | "display-inside": {
|
25214 | syntax: "flow | flow-root | table | flex | grid | ruby"
|
25215 | },
|
25216 | "display-internal": {
|
25217 | syntax: "table-row-group | table-header-group | table-footer-group | table-row | table-cell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container"
|
25218 | },
|
25219 | "display-legacy": {
|
25220 | syntax: "inline-block | inline-list-item | inline-table | inline-flex | inline-grid"
|
25221 | },
|
25222 | "display-listitem": {
|
25223 | syntax: "<display-outside>? && [ flow | flow-root ]? && list-item"
|
25224 | },
|
25225 | "display-outside": {
|
25226 | syntax: "block | inline | run-in"
|
25227 | },
|
25228 | "drop-shadow()": {
|
25229 | syntax: "drop-shadow( <length>{2,3} <color>? )"
|
25230 | },
|
25231 | "east-asian-variant-values": {
|
25232 | syntax: "[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]"
|
25233 | },
|
25234 | "east-asian-width-values": {
|
25235 | syntax: "[ full-width | proportional-width ]"
|
25236 | },
|
25237 | "element()": {
|
25238 | syntax: "element( <id-selector> )"
|
25239 | },
|
25240 | "ellipse()": {
|
25241 | syntax: "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )"
|
25242 | },
|
25243 | "ending-shape": {
|
25244 | syntax: "circle | ellipse"
|
25245 | },
|
25246 | "env()": {
|
25247 | syntax: "env( <custom-ident> , <declaration-value>? )"
|
25248 | },
|
25249 | "explicit-track-list": {
|
25250 | syntax: "[ <line-names>? <track-size> ]+ <line-names>?"
|
25251 | },
|
25252 | "family-name": {
|
25253 | syntax: "<string> | <custom-ident>+"
|
25254 | },
|
25255 | "feature-tag-value": {
|
25256 | syntax: "<string> [ <integer> | on | off ]?"
|
25257 | },
|
25258 | "feature-type": {
|
25259 | syntax: "@stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation"
|
25260 | },
|
25261 | "feature-value-block": {
|
25262 | syntax: "<feature-type> '{' <feature-value-declaration-list> '}'"
|
25263 | },
|
25264 | "feature-value-block-list": {
|
25265 | syntax: "<feature-value-block>+"
|
25266 | },
|
25267 | "feature-value-declaration": {
|
25268 | syntax: "<custom-ident>: <integer>+;"
|
25269 | },
|
25270 | "feature-value-declaration-list": {
|
25271 | syntax: "<feature-value-declaration>"
|
25272 | },
|
25273 | "feature-value-name": {
|
25274 | syntax: "<custom-ident>"
|
25275 | },
|
25276 | "fill-rule": {
|
25277 | syntax: "nonzero | evenodd"
|
25278 | },
|
25279 | "filter-function": {
|
25280 | syntax: "<blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>"
|
25281 | },
|
25282 | "filter-function-list": {
|
25283 | syntax: "[ <filter-function> | <url> ]+"
|
25284 | },
|
25285 | "final-bg-layer": {
|
25286 | syntax: "<'background-color'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"
|
25287 | },
|
25288 | "fit-content()": {
|
25289 | syntax: "fit-content( [ <length> | <percentage> ] )"
|
25290 | },
|
25291 | "fixed-breadth": {
|
25292 | syntax: "<length-percentage>"
|
25293 | },
|
25294 | "fixed-repeat": {
|
25295 | syntax: "repeat( [ <positive-integer> ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"
|
25296 | },
|
25297 | "fixed-size": {
|
25298 | syntax: "<fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )"
|
25299 | },
|
25300 | "font-stretch-absolute": {
|
25301 | syntax: "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage>"
|
25302 | },
|
25303 | "font-variant-css21": {
|
25304 | syntax: "[ normal | small-caps ]"
|
25305 | },
|
25306 | "font-weight-absolute": {
|
25307 | syntax: "normal | bold | <number [1,1000]>"
|
25308 | },
|
25309 | "frequency-percentage": {
|
25310 | syntax: "<frequency> | <percentage>"
|
25311 | },
|
25312 | "general-enclosed": {
|
25313 | syntax: "[ <function-token> <any-value> ) ] | ( <ident> <any-value> )"
|
25314 | },
|
25315 | "generic-family": {
|
25316 | syntax: "serif | sans-serif | cursive | fantasy | monospace"
|
25317 | },
|
25318 | "generic-name": {
|
25319 | syntax: "serif | sans-serif | cursive | fantasy | monospace"
|
25320 | },
|
25321 | "geometry-box": {
|
25322 | syntax: "<shape-box> | fill-box | stroke-box | view-box"
|
25323 | },
|
25324 | gradient: gradient,
|
25325 | "grayscale()": {
|
25326 | syntax: "grayscale( <number-percentage> )"
|
25327 | },
|
25328 | "grid-line": {
|
25329 | syntax: "auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]"
|
25330 | },
|
25331 | "historical-lig-values": {
|
25332 | syntax: "[ historical-ligatures | no-historical-ligatures ]"
|
25333 | },
|
25334 | "hsl()": {
|
25335 | syntax: "hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )"
|
25336 | },
|
25337 | "hsla()": {
|
25338 | syntax: "hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )"
|
25339 | },
|
25340 | hue: hue,
|
25341 | "hue-rotate()": {
|
25342 | syntax: "hue-rotate( <angle> )"
|
25343 | },
|
25344 | "id-selector": {
|
25345 | syntax: "<hash-token>"
|
25346 | },
|
25347 | image: image,
|
25348 | "image()": {
|
25349 | syntax: "image( <image-tags>? [ <image-src>? , <color>? ]! )"
|
25350 | },
|
25351 | "image-set()": {
|
25352 | syntax: "image-set( <image-set-option># )"
|
25353 | },
|
25354 | "image-set-option": {
|
25355 | syntax: "[ <image> | <string> ] <resolution>"
|
25356 | },
|
25357 | "image-src": {
|
25358 | syntax: "<url> | <string>"
|
25359 | },
|
25360 | "image-tags": {
|
25361 | syntax: "ltr | rtl"
|
25362 | },
|
25363 | "inflexible-breadth": {
|
25364 | syntax: "<length> | <percentage> | min-content | max-content | auto"
|
25365 | },
|
25366 | "inset()": {
|
25367 | syntax: "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )"
|
25368 | },
|
25369 | "invert()": {
|
25370 | syntax: "invert( <number-percentage> )"
|
25371 | },
|
25372 | "keyframes-name": {
|
25373 | syntax: "<custom-ident> | <string>"
|
25374 | },
|
25375 | "keyframe-block": {
|
25376 | syntax: "<keyframe-selector># {\n <declaration-list>\n}"
|
25377 | },
|
25378 | "keyframe-block-list": {
|
25379 | syntax: "<keyframe-block>+"
|
25380 | },
|
25381 | "keyframe-selector": {
|
25382 | syntax: "from | to | <percentage>"
|
25383 | },
|
25384 | "leader()": {
|
25385 | syntax: "leader( <leader-type> )"
|
25386 | },
|
25387 | "leader-type": {
|
25388 | syntax: "dotted | solid | space | <string>"
|
25389 | },
|
25390 | "length-percentage": {
|
25391 | syntax: "<length> | <percentage>"
|
25392 | },
|
25393 | "line-names": {
|
25394 | syntax: "'[' <custom-ident>* ']'"
|
25395 | },
|
25396 | "line-name-list": {
|
25397 | syntax: "[ <line-names> | <name-repeat> ]+"
|
25398 | },
|
25399 | "line-style": {
|
25400 | syntax: "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset"
|
25401 | },
|
25402 | "line-width": {
|
25403 | syntax: "<length> | thin | medium | thick"
|
25404 | },
|
25405 | "linear-color-hint": {
|
25406 | syntax: "<length-percentage>"
|
25407 | },
|
25408 | "linear-color-stop": {
|
25409 | syntax: "<color> <color-stop-length>?"
|
25410 | },
|
25411 | "linear-gradient()": {
|
25412 | syntax: "linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"
|
25413 | },
|
25414 | "mask-layer": {
|
25415 | syntax: "<mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator> || <masking-mode>"
|
25416 | },
|
25417 | "mask-position": {
|
25418 | syntax: "[ <length-percentage> | left | center | right ] [ <length-percentage> | top | center | bottom ]?"
|
25419 | },
|
25420 | "mask-reference": {
|
25421 | syntax: "none | <image> | <mask-source>"
|
25422 | },
|
25423 | "mask-source": {
|
25424 | syntax: "<url>"
|
25425 | },
|
25426 | "masking-mode": {
|
25427 | syntax: "alpha | luminance | match-source"
|
25428 | },
|
25429 | "matrix()": {
|
25430 | syntax: "matrix( <number>#{6} )"
|
25431 | },
|
25432 | "matrix3d()": {
|
25433 | syntax: "matrix3d( <number>#{16} )"
|
25434 | },
|
25435 | "max()": {
|
25436 | syntax: "max( <calc-sum># )"
|
25437 | },
|
25438 | "media-and": {
|
25439 | syntax: "<media-in-parens> [ and <media-in-parens> ]+"
|
25440 | },
|
25441 | "media-condition": {
|
25442 | syntax: "<media-not> | <media-and> | <media-or> | <media-in-parens>"
|
25443 | },
|
25444 | "media-condition-without-or": {
|
25445 | syntax: "<media-not> | <media-and> | <media-in-parens>"
|
25446 | },
|
25447 | "media-feature": {
|
25448 | syntax: "( [ <mf-plain> | <mf-boolean> | <mf-range> ] )"
|
25449 | },
|
25450 | "media-in-parens": {
|
25451 | syntax: "( <media-condition> ) | <media-feature> | <general-enclosed>"
|
25452 | },
|
25453 | "media-not": {
|
25454 | syntax: "not <media-in-parens>"
|
25455 | },
|
25456 | "media-or": {
|
25457 | syntax: "<media-in-parens> [ or <media-in-parens> ]+"
|
25458 | },
|
25459 | "media-query": {
|
25460 | syntax: "<media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]?"
|
25461 | },
|
25462 | "media-query-list": {
|
25463 | syntax: "<media-query>#"
|
25464 | },
|
25465 | "media-type": {
|
25466 | syntax: "<ident>"
|
25467 | },
|
25468 | "mf-boolean": {
|
25469 | syntax: "<mf-name>"
|
25470 | },
|
25471 | "mf-name": {
|
25472 | syntax: "<ident>"
|
25473 | },
|
25474 | "mf-plain": {
|
25475 | syntax: "<mf-name> : <mf-value>"
|
25476 | },
|
25477 | "mf-range": {
|
25478 | syntax: "<mf-name> [ '<' | '>' ]? '='? <mf-value>\n| <mf-value> [ '<' | '>' ]? '='? <mf-name>\n| <mf-value> '<' '='? <mf-name> '<' '='? <mf-value>\n| <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>"
|
25479 | },
|
25480 | "mf-value": {
|
25481 | syntax: "<number> | <dimension> | <ident> | <ratio>"
|
25482 | },
|
25483 | "min()": {
|
25484 | syntax: "min( <calc-sum># )"
|
25485 | },
|
25486 | "minmax()": {
|
25487 | syntax: "minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"
|
25488 | },
|
25489 | "named-color": {
|
25490 | syntax: "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"
|
25491 | },
|
25492 | "namespace-prefix": {
|
25493 | syntax: "<ident>"
|
25494 | },
|
25495 | "ns-prefix": {
|
25496 | syntax: "[ <ident-token> | '*' ]? '|'"
|
25497 | },
|
25498 | "number-percentage": {
|
25499 | syntax: "<number> | <percentage>"
|
25500 | },
|
25501 | "numeric-figure-values": {
|
25502 | syntax: "[ lining-nums | oldstyle-nums ]"
|
25503 | },
|
25504 | "numeric-fraction-values": {
|
25505 | syntax: "[ diagonal-fractions | stacked-fractions ]"
|
25506 | },
|
25507 | "numeric-spacing-values": {
|
25508 | syntax: "[ proportional-nums | tabular-nums ]"
|
25509 | },
|
25510 | nth: nth,
|
25511 | "opacity()": {
|
25512 | syntax: "opacity( [ <number-percentage> ] )"
|
25513 | },
|
25514 | "overflow-position": {
|
25515 | syntax: "unsafe | safe"
|
25516 | },
|
25517 | "outline-radius": {
|
25518 | syntax: "<length> | <percentage>"
|
25519 | },
|
25520 | "page-body": {
|
25521 | syntax: "<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>"
|
25522 | },
|
25523 | "page-margin-box": {
|
25524 | syntax: "<page-margin-box-type> '{' <declaration-list> '}'"
|
25525 | },
|
25526 | "page-margin-box-type": {
|
25527 | syntax: "@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom"
|
25528 | },
|
25529 | "page-selector-list": {
|
25530 | syntax: "[ <page-selector># ]?"
|
25531 | },
|
25532 | "page-selector": {
|
25533 | syntax: "<pseudo-page>+ | <ident> <pseudo-page>*"
|
25534 | },
|
25535 | "path()": {
|
25536 | syntax: "path( [ <fill-rule>, ]? <string> )"
|
25537 | },
|
25538 | "paint()": {
|
25539 | syntax: "paint( <ident>, <declaration-value>? )"
|
25540 | },
|
25541 | "perspective()": {
|
25542 | syntax: "perspective( <length> )"
|
25543 | },
|
25544 | "polygon()": {
|
25545 | syntax: "polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"
|
25546 | },
|
25547 | position: position$1,
|
25548 | "pseudo-class-selector": {
|
25549 | syntax: "':' <ident-token> | ':' <function-token> <any-value> ')'"
|
25550 | },
|
25551 | "pseudo-element-selector": {
|
25552 | syntax: "':' <pseudo-class-selector>"
|
25553 | },
|
25554 | "pseudo-page": {
|
25555 | syntax: ": [ left | right | first | blank ]"
|
25556 | },
|
25557 | quote: quote,
|
25558 | "radial-gradient()": {
|
25559 | syntax: "radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
|
25560 | },
|
25561 | "relative-selector": {
|
25562 | syntax: "<combinator>? <complex-selector>"
|
25563 | },
|
25564 | "relative-selector-list": {
|
25565 | syntax: "<relative-selector>#"
|
25566 | },
|
25567 | "relative-size": {
|
25568 | syntax: "larger | smaller"
|
25569 | },
|
25570 | "repeat-style": {
|
25571 | syntax: "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}"
|
25572 | },
|
25573 | "repeating-linear-gradient()": {
|
25574 | syntax: "repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"
|
25575 | },
|
25576 | "repeating-radial-gradient()": {
|
25577 | syntax: "repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
|
25578 | },
|
25579 | "rgb()": {
|
25580 | syntax: "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"
|
25581 | },
|
25582 | "rgba()": {
|
25583 | syntax: "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"
|
25584 | },
|
25585 | "rotate()": {
|
25586 | syntax: "rotate( [ <angle> | <zero> ] )"
|
25587 | },
|
25588 | "rotate3d()": {
|
25589 | syntax: "rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )"
|
25590 | },
|
25591 | "rotateX()": {
|
25592 | syntax: "rotateX( [ <angle> | <zero> ] )"
|
25593 | },
|
25594 | "rotateY()": {
|
25595 | syntax: "rotateY( [ <angle> | <zero> ] )"
|
25596 | },
|
25597 | "rotateZ()": {
|
25598 | syntax: "rotateZ( [ <angle> | <zero> ] )"
|
25599 | },
|
25600 | "saturate()": {
|
25601 | syntax: "saturate( <number-percentage> )"
|
25602 | },
|
25603 | "scale()": {
|
25604 | syntax: "scale( <number> , <number>? )"
|
25605 | },
|
25606 | "scale3d()": {
|
25607 | syntax: "scale3d( <number> , <number> , <number> )"
|
25608 | },
|
25609 | "scaleX()": {
|
25610 | syntax: "scaleX( <number> )"
|
25611 | },
|
25612 | "scaleY()": {
|
25613 | syntax: "scaleY( <number> )"
|
25614 | },
|
25615 | "scaleZ()": {
|
25616 | syntax: "scaleZ( <number> )"
|
25617 | },
|
25618 | "self-position": {
|
25619 | syntax: "center | start | end | self-start | self-end | flex-start | flex-end"
|
25620 | },
|
25621 | "shape-radius": {
|
25622 | syntax: "<length-percentage> | closest-side | farthest-side"
|
25623 | },
|
25624 | "skew()": {
|
25625 | syntax: "skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )"
|
25626 | },
|
25627 | "skewX()": {
|
25628 | syntax: "skewX( [ <angle> | <zero> ] )"
|
25629 | },
|
25630 | "skewY()": {
|
25631 | syntax: "skewY( [ <angle> | <zero> ] )"
|
25632 | },
|
25633 | "sepia()": {
|
25634 | syntax: "sepia( <number-percentage> )"
|
25635 | },
|
25636 | shadow: shadow,
|
25637 | "shadow-t": {
|
25638 | syntax: "[ <length>{2,3} && <color>? ]"
|
25639 | },
|
25640 | shape: shape$1,
|
25641 | "shape-box": {
|
25642 | syntax: "<box> | margin-box"
|
25643 | },
|
25644 | "side-or-corner": {
|
25645 | syntax: "[ left | right ] || [ top | bottom ]"
|
25646 | },
|
25647 | "single-animation": {
|
25648 | syntax: "<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]"
|
25649 | },
|
25650 | "single-animation-direction": {
|
25651 | syntax: "normal | reverse | alternate | alternate-reverse"
|
25652 | },
|
25653 | "single-animation-fill-mode": {
|
25654 | syntax: "none | forwards | backwards | both"
|
25655 | },
|
25656 | "single-animation-iteration-count": {
|
25657 | syntax: "infinite | <number>"
|
25658 | },
|
25659 | "single-animation-play-state": {
|
25660 | syntax: "running | paused"
|
25661 | },
|
25662 | "single-transition": {
|
25663 | syntax: "[ none | <single-transition-property> ] || <time> || <timing-function> || <time>"
|
25664 | },
|
25665 | "single-transition-property": {
|
25666 | syntax: "all | <custom-ident>"
|
25667 | },
|
25668 | size: size,
|
25669 | "step-position": {
|
25670 | syntax: "jump-start | jump-end | jump-none | jump-both | start | end"
|
25671 | },
|
25672 | "step-timing-function": {
|
25673 | syntax: "step-start | step-end | steps(<integer>[, <step-position>]?)"
|
25674 | },
|
25675 | "subclass-selector": {
|
25676 | syntax: "<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>"
|
25677 | },
|
25678 | "supports-condition": {
|
25679 | syntax: "not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*"
|
25680 | },
|
25681 | "supports-in-parens": {
|
25682 | syntax: "( <supports-condition> ) | <supports-feature> | <general-enclosed>"
|
25683 | },
|
25684 | "supports-feature": {
|
25685 | syntax: "<supports-decl> | <supports-selector-fn>"
|
25686 | },
|
25687 | "supports-decl": {
|
25688 | syntax: "( <declaration> )"
|
25689 | },
|
25690 | "supports-selector-fn": {
|
25691 | syntax: "selector( <complex-selector> )"
|
25692 | },
|
25693 | symbol: symbol,
|
25694 | target: target,
|
25695 | "target-counter()": {
|
25696 | syntax: "target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )"
|
25697 | },
|
25698 | "target-counters()": {
|
25699 | syntax: "target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )"
|
25700 | },
|
25701 | "target-text()": {
|
25702 | syntax: "target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )"
|
25703 | },
|
25704 | "time-percentage": {
|
25705 | syntax: "<time> | <percentage>"
|
25706 | },
|
25707 | "timing-function": {
|
25708 | syntax: "linear | <cubic-bezier-timing-function> | <step-timing-function>"
|
25709 | },
|
25710 | "track-breadth": {
|
25711 | syntax: "<length-percentage> | <flex> | min-content | max-content | auto"
|
25712 | },
|
25713 | "track-list": {
|
25714 | syntax: "[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?"
|
25715 | },
|
25716 | "track-repeat": {
|
25717 | syntax: "repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )"
|
25718 | },
|
25719 | "track-size": {
|
25720 | syntax: "<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )"
|
25721 | },
|
25722 | "transform-function": {
|
25723 | syntax: "<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>"
|
25724 | },
|
25725 | "transform-list": {
|
25726 | syntax: "<transform-function>+"
|
25727 | },
|
25728 | "translate()": {
|
25729 | syntax: "translate( <length-percentage> , <length-percentage>? )"
|
25730 | },
|
25731 | "translate3d()": {
|
25732 | syntax: "translate3d( <length-percentage> , <length-percentage> , <length> )"
|
25733 | },
|
25734 | "translateX()": {
|
25735 | syntax: "translateX( <length-percentage> )"
|
25736 | },
|
25737 | "translateY()": {
|
25738 | syntax: "translateY( <length-percentage> )"
|
25739 | },
|
25740 | "translateZ()": {
|
25741 | syntax: "translateZ( <length> )"
|
25742 | },
|
25743 | "type-or-unit": {
|
25744 | syntax: "string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | Q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | Hz | kHz | %"
|
25745 | },
|
25746 | "type-selector": {
|
25747 | syntax: "<wq-name> | <ns-prefix>? '*'"
|
25748 | },
|
25749 | "var()": {
|
25750 | syntax: "var( <custom-property-name> , <declaration-value>? )"
|
25751 | },
|
25752 | "viewport-length": {
|
25753 | syntax: "auto | <length-percentage>"
|
25754 | },
|
25755 | "wq-name": {
|
25756 | syntax: "<ns-prefix>? <ident-token>"
|
25757 | }
|
25758 | };
|
25759 |
|
25760 | var atrules = {
|
25761 | charset: {
|
25762 | prelude: "<string>"
|
25763 | },
|
25764 | "font-face": {
|
25765 | descriptors: {
|
25766 | "unicode-range": {
|
25767 | comment: "replaces <unicode-range>, an old production name",
|
25768 | syntax: "<urange>#"
|
25769 | }
|
25770 | }
|
25771 | }
|
25772 | };
|
25773 | var properties$1 = {
|
25774 | "-moz-background-clip": {
|
25775 | comment: "deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
|
25776 | syntax: "padding | border"
|
25777 | },
|
25778 | "-moz-border-radius-bottomleft": {
|
25779 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius",
|
25780 | syntax: "<'border-bottom-left-radius'>"
|
25781 | },
|
25782 | "-moz-border-radius-bottomright": {
|
25783 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
|
25784 | syntax: "<'border-bottom-right-radius'>"
|
25785 | },
|
25786 | "-moz-border-radius-topleft": {
|
25787 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius",
|
25788 | syntax: "<'border-top-left-radius'>"
|
25789 | },
|
25790 | "-moz-border-radius-topright": {
|
25791 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
|
25792 | syntax: "<'border-bottom-right-radius'>"
|
25793 | },
|
25794 | "-moz-control-character-visibility": {
|
25795 | comment: "firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588",
|
25796 | syntax: "visible | hidden"
|
25797 | },
|
25798 | "-moz-osx-font-smoothing": {
|
25799 | comment: "misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
|
25800 | syntax: "auto | grayscale"
|
25801 | },
|
25802 | "-moz-user-select": {
|
25803 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
|
25804 | syntax: "none | text | all | -moz-none"
|
25805 | },
|
25806 | "-ms-flex-align": {
|
25807 | comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
|
25808 | syntax: "start | end | center | baseline | stretch"
|
25809 | },
|
25810 | "-ms-flex-item-align": {
|
25811 | comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
|
25812 | syntax: "auto | start | end | center | baseline | stretch"
|
25813 | },
|
25814 | "-ms-flex-line-pack": {
|
25815 | comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack",
|
25816 | syntax: "start | end | center | justify | distribute | stretch"
|
25817 | },
|
25818 | "-ms-flex-negative": {
|
25819 | comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
|
25820 | syntax: "<'flex-shrink'>"
|
25821 | },
|
25822 | "-ms-flex-pack": {
|
25823 | comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack",
|
25824 | syntax: "start | end | center | justify | distribute"
|
25825 | },
|
25826 | "-ms-flex-order": {
|
25827 | comment: "misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx",
|
25828 | syntax: "<integer>"
|
25829 | },
|
25830 | "-ms-flex-positive": {
|
25831 | comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
|
25832 | syntax: "<'flex-grow'>"
|
25833 | },
|
25834 | "-ms-flex-preferred-size": {
|
25835 | comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
|
25836 | syntax: "<'flex-basis'>"
|
25837 | },
|
25838 | "-ms-interpolation-mode": {
|
25839 | comment: "https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx",
|
25840 | syntax: "nearest-neighbor | bicubic"
|
25841 | },
|
25842 | "-ms-grid-column-align": {
|
25843 | comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx",
|
25844 | syntax: "start | end | center | stretch"
|
25845 | },
|
25846 | "-ms-grid-row-align": {
|
25847 | comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx",
|
25848 | syntax: "start | end | center | stretch"
|
25849 | },
|
25850 | "-ms-hyphenate-limit-last": {
|
25851 | comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits",
|
25852 | syntax: "none | always | column | page | spread"
|
25853 | },
|
25854 | "-webkit-appearance": {
|
25855 | comment: "webkit specific keywords",
|
25856 | references: [
|
25857 | "http://css-infos.net/property/-webkit-appearance"
|
25858 | ],
|
25859 | syntax: "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"
|
25860 | },
|
25861 | "-webkit-background-clip": {
|
25862 | comment: "https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
|
25863 | syntax: "[ <box> | border | padding | content | text ]#"
|
25864 | },
|
25865 | "-webkit-column-break-after": {
|
25866 | comment: "added, http://help.dottoro.com/lcrthhhv.php",
|
25867 | syntax: "always | auto | avoid"
|
25868 | },
|
25869 | "-webkit-column-break-before": {
|
25870 | comment: "added, http://help.dottoro.com/lcxquvkf.php",
|
25871 | syntax: "always | auto | avoid"
|
25872 | },
|
25873 | "-webkit-column-break-inside": {
|
25874 | comment: "added, http://help.dottoro.com/lclhnthl.php",
|
25875 | syntax: "always | auto | avoid"
|
25876 | },
|
25877 | "-webkit-font-smoothing": {
|
25878 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
|
25879 | syntax: "auto | none | antialiased | subpixel-antialiased"
|
25880 | },
|
25881 | "-webkit-mask-box-image": {
|
25882 | comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
|
25883 | syntax: "[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"
|
25884 | },
|
25885 | "-webkit-print-color-adjust": {
|
25886 | comment: "missed",
|
25887 | references: [
|
25888 | "https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"
|
25889 | ],
|
25890 | syntax: "economy | exact"
|
25891 | },
|
25892 | "-webkit-text-security": {
|
25893 | comment: "missed; http://help.dottoro.com/lcbkewgt.php",
|
25894 | syntax: "none | circle | disc | square"
|
25895 | },
|
25896 | "-webkit-user-drag": {
|
25897 | comment: "missed; http://help.dottoro.com/lcbixvwm.php",
|
25898 | syntax: "none | element | auto"
|
25899 | },
|
25900 | "-webkit-user-select": {
|
25901 | comment: "auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
|
25902 | syntax: "auto | none | text | all"
|
25903 | },
|
25904 | "alignment-baseline": {
|
25905 | comment: "added SVG property",
|
25906 | references: [
|
25907 | "https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"
|
25908 | ],
|
25909 | syntax: "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"
|
25910 | },
|
25911 | "baseline-shift": {
|
25912 | comment: "added SVG property",
|
25913 | references: [
|
25914 | "https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"
|
25915 | ],
|
25916 | syntax: "baseline | sub | super | <svg-length>"
|
25917 | },
|
25918 | behavior: {
|
25919 | comment: "added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx",
|
25920 | syntax: "<url>+"
|
25921 | },
|
25922 | "clip-rule": {
|
25923 | comment: "added SVG property",
|
25924 | references: [
|
25925 | "https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty"
|
25926 | ],
|
25927 | syntax: "nonzero | evenodd"
|
25928 | },
|
25929 | cue: {
|
25930 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
25931 | syntax: "<'cue-before'> <'cue-after'>?"
|
25932 | },
|
25933 | "cue-after": {
|
25934 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
25935 | syntax: "<url> <decibel>? | none"
|
25936 | },
|
25937 | "cue-before": {
|
25938 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
25939 | syntax: "<url> <decibel>? | none"
|
25940 | },
|
25941 | cursor: {
|
25942 | comment: "added legacy keywords: hand, -webkit-grab. -webkit-grabbing, -webkit-zoom-in, -webkit-zoom-out, -moz-grab, -moz-grabbing, -moz-zoom-in, -moz-zoom-out",
|
25943 | references: [
|
25944 | "https://www.sitepoint.com/css3-cursor-styles/"
|
25945 | ],
|
25946 | syntax: "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]"
|
25947 | },
|
25948 | display: {
|
25949 | comment: "extended with -ms-flexbox",
|
25950 | syntax: "| <-non-standard-display>"
|
25951 | },
|
25952 | position: {
|
25953 | comment: "extended with -webkit-sticky",
|
25954 | syntax: "| -webkit-sticky"
|
25955 | },
|
25956 | "dominant-baseline": {
|
25957 | comment: "added SVG property",
|
25958 | references: [
|
25959 | "https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"
|
25960 | ],
|
25961 | syntax: "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"
|
25962 | },
|
25963 | "image-rendering": {
|
25964 | comment: "extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality",
|
25965 | references: [
|
25966 | "https://developer.mozilla.org/en/docs/Web/CSS/image-rendering",
|
25967 | "https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"
|
25968 | ],
|
25969 | syntax: "| optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"
|
25970 | },
|
25971 | fill: {
|
25972 | comment: "added SVG property",
|
25973 | references: [
|
25974 | "https://www.w3.org/TR/SVG/painting.html#FillProperty"
|
25975 | ],
|
25976 | syntax: "<paint>"
|
25977 | },
|
25978 | "fill-opacity": {
|
25979 | comment: "added SVG property",
|
25980 | references: [
|
25981 | "https://www.w3.org/TR/SVG/painting.html#FillProperty"
|
25982 | ],
|
25983 | syntax: "<number-zero-one>"
|
25984 | },
|
25985 | "fill-rule": {
|
25986 | comment: "added SVG property",
|
25987 | references: [
|
25988 | "https://www.w3.org/TR/SVG/painting.html#FillProperty"
|
25989 | ],
|
25990 | syntax: "nonzero | evenodd"
|
25991 | },
|
25992 | filter: {
|
25993 | comment: "extend with IE legacy syntaxes",
|
25994 | syntax: "| <-ms-filter-function-list>"
|
25995 | },
|
25996 | "glyph-orientation-horizontal": {
|
25997 | comment: "added SVG property",
|
25998 | references: [
|
25999 | "https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"
|
26000 | ],
|
26001 | syntax: "<angle>"
|
26002 | },
|
26003 | "glyph-orientation-vertical": {
|
26004 | comment: "added SVG property",
|
26005 | references: [
|
26006 | "https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"
|
26007 | ],
|
26008 | syntax: "<angle>"
|
26009 | },
|
26010 | kerning: {
|
26011 | comment: "added SVG property",
|
26012 | references: [
|
26013 | "https://www.w3.org/TR/SVG/text.html#KerningProperty"
|
26014 | ],
|
26015 | syntax: "auto | <svg-length>"
|
26016 | },
|
26017 | "letter-spacing": {
|
26018 | comment: "fix syntax <length> -> <length-percentage>",
|
26019 | references: [
|
26020 | "https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"
|
26021 | ],
|
26022 | syntax: "normal | <length-percentage>"
|
26023 | },
|
26024 | marker: {
|
26025 | comment: "added SVG property",
|
26026 | references: [
|
26027 | "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
|
26028 | ],
|
26029 | syntax: "none | <url>"
|
26030 | },
|
26031 | "marker-end": {
|
26032 | comment: "added SVG property",
|
26033 | references: [
|
26034 | "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
|
26035 | ],
|
26036 | syntax: "none | <url>"
|
26037 | },
|
26038 | "marker-mid": {
|
26039 | comment: "added SVG property",
|
26040 | references: [
|
26041 | "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
|
26042 | ],
|
26043 | syntax: "none | <url>"
|
26044 | },
|
26045 | "marker-start": {
|
26046 | comment: "added SVG property",
|
26047 | references: [
|
26048 | "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
|
26049 | ],
|
26050 | syntax: "none | <url>"
|
26051 | },
|
26052 | "max-width": {
|
26053 | comment: "fix auto -> none (https://github.com/mdn/data/pull/431); extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width",
|
26054 | syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"
|
26055 | },
|
26056 | "min-width": {
|
26057 | comment: "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
|
26058 | syntax: "auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"
|
26059 | },
|
26060 | overflow: {
|
26061 | comment: "extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
|
26062 | syntax: "| <-non-standard-overflow>"
|
26063 | },
|
26064 | pause: {
|
26065 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26066 | syntax: "<'pause-before'> <'pause-after'>?"
|
26067 | },
|
26068 | "pause-after": {
|
26069 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26070 | syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
|
26071 | },
|
26072 | "pause-before": {
|
26073 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26074 | syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
|
26075 | },
|
26076 | rest: {
|
26077 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26078 | syntax: "<'rest-before'> <'rest-after'>?"
|
26079 | },
|
26080 | "rest-after": {
|
26081 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26082 | syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
|
26083 | },
|
26084 | "rest-before": {
|
26085 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26086 | syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
|
26087 | },
|
26088 | "shape-rendering": {
|
26089 | comment: "added SVG property",
|
26090 | references: [
|
26091 | "https://www.w3.org/TR/SVG/painting.html#ShapeRenderingPropert"
|
26092 | ],
|
26093 | syntax: "auto | optimizeSpeed | crispEdges | geometricPrecision"
|
26094 | },
|
26095 | src: {
|
26096 | comment: "added @font-face's src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src",
|
26097 | syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"
|
26098 | },
|
26099 | speak: {
|
26100 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26101 | syntax: "auto | none | normal"
|
26102 | },
|
26103 | "speak-as": {
|
26104 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26105 | syntax: "normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"
|
26106 | },
|
26107 | stroke: {
|
26108 | comment: "added SVG property",
|
26109 | references: [
|
26110 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26111 | ],
|
26112 | syntax: "<paint>"
|
26113 | },
|
26114 | "stroke-dasharray": {
|
26115 | comment: "added SVG property; a list of comma and/or white space separated <length>s and <percentage>s",
|
26116 | references: [
|
26117 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26118 | ],
|
26119 | syntax: "none | [ <svg-length>+ ]#"
|
26120 | },
|
26121 | "stroke-dashoffset": {
|
26122 | comment: "added SVG property",
|
26123 | references: [
|
26124 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26125 | ],
|
26126 | syntax: "<svg-length>"
|
26127 | },
|
26128 | "stroke-linecap": {
|
26129 | comment: "added SVG property",
|
26130 | references: [
|
26131 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26132 | ],
|
26133 | syntax: "butt | round | square"
|
26134 | },
|
26135 | "stroke-linejoin": {
|
26136 | comment: "added SVG property",
|
26137 | references: [
|
26138 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26139 | ],
|
26140 | syntax: "miter | round | bevel"
|
26141 | },
|
26142 | "stroke-miterlimit": {
|
26143 | comment: "added SVG property (<miterlimit> = <number-one-or-greater>) ",
|
26144 | references: [
|
26145 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26146 | ],
|
26147 | syntax: "<number-one-or-greater>"
|
26148 | },
|
26149 | "stroke-opacity": {
|
26150 | comment: "added SVG property",
|
26151 | references: [
|
26152 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26153 | ],
|
26154 | syntax: "<number-zero-one>"
|
26155 | },
|
26156 | "stroke-width": {
|
26157 | comment: "added SVG property",
|
26158 | references: [
|
26159 | "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
|
26160 | ],
|
26161 | syntax: "<svg-length>"
|
26162 | },
|
26163 | "text-anchor": {
|
26164 | comment: "added SVG property",
|
26165 | references: [
|
26166 | "https://www.w3.org/TR/SVG/text.html#TextAlignmentProperties"
|
26167 | ],
|
26168 | syntax: "start | middle | end"
|
26169 | },
|
26170 | "unicode-bidi": {
|
26171 | comment: "added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi",
|
26172 | syntax: "| -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate | -webkit-isolate-override | -webkit-plaintext"
|
26173 | },
|
26174 | "unicode-range": {
|
26175 | comment: "added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range",
|
26176 | syntax: "<urange>#"
|
26177 | },
|
26178 | "voice-balance": {
|
26179 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26180 | syntax: "<number> | left | center | right | leftwards | rightwards"
|
26181 | },
|
26182 | "voice-duration": {
|
26183 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26184 | syntax: "auto | <time>"
|
26185 | },
|
26186 | "voice-family": {
|
26187 | comment: "<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index",
|
26188 | syntax: "[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"
|
26189 | },
|
26190 | "voice-pitch": {
|
26191 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26192 | syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
|
26193 | },
|
26194 | "voice-range": {
|
26195 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26196 | syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
|
26197 | },
|
26198 | "voice-rate": {
|
26199 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26200 | syntax: "[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"
|
26201 | },
|
26202 | "voice-stress": {
|
26203 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26204 | syntax: "normal | strong | moderate | none | reduced"
|
26205 | },
|
26206 | "voice-volume": {
|
26207 | comment: "https://www.w3.org/TR/css3-speech/#property-index",
|
26208 | syntax: "silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"
|
26209 | },
|
26210 | "writing-mode": {
|
26211 | comment: "extend with SVG keywords",
|
26212 | syntax: "| <svg-writing-mode>"
|
26213 | }
|
26214 | };
|
26215 | var syntaxes = {
|
26216 | "-legacy-gradient": {
|
26217 | comment: "added collection of legacy gradient syntaxes",
|
26218 | syntax: "<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"
|
26219 | },
|
26220 | "-legacy-linear-gradient": {
|
26221 | comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
|
26222 | syntax: "-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"
|
26223 | },
|
26224 | "-legacy-repeating-linear-gradient": {
|
26225 | comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
|
26226 | syntax: "-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )"
|
26227 | },
|
26228 | "-legacy-linear-gradient-arguments": {
|
26229 | comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
|
26230 | syntax: "[ <angle> | <side-or-corner> ]? , <color-stop-list>"
|
26231 | },
|
26232 | "-legacy-radial-gradient": {
|
26233 | comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
|
26234 | syntax: "-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"
|
26235 | },
|
26236 | "-legacy-repeating-radial-gradient": {
|
26237 | comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
|
26238 | syntax: "-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )"
|
26239 | },
|
26240 | "-legacy-radial-gradient-arguments": {
|
26241 | comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
|
26242 | syntax: "[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"
|
26243 | },
|
26244 | "-legacy-radial-gradient-size": {
|
26245 | comment: "before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize",
|
26246 | syntax: "closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"
|
26247 | },
|
26248 | "-legacy-radial-gradient-shape": {
|
26249 | comment: "define to double sure it doesn't extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape",
|
26250 | syntax: "circle | ellipse"
|
26251 | },
|
26252 | "-non-standard-font": {
|
26253 | comment: "non standard fonts",
|
26254 | references: [
|
26255 | "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
|
26256 | ],
|
26257 | syntax: "-apple-system-body | -apple-system-headline | -apple-system-subheadline | -apple-system-caption1 | -apple-system-caption2 | -apple-system-footnote | -apple-system-short-body | -apple-system-short-headline | -apple-system-short-subheadline | -apple-system-short-caption1 | -apple-system-short-footnote | -apple-system-tall-body"
|
26258 | },
|
26259 | "-non-standard-color": {
|
26260 | comment: "non standard colors",
|
26261 | references: [
|
26262 | "http://cssdot.ru/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_CSS/color-i305.html",
|
26263 | "https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"
|
26264 | ],
|
26265 | syntax: "-moz-ButtonDefault | -moz-ButtonHoverFace | -moz-ButtonHoverText | -moz-CellHighlight | -moz-CellHighlightText | -moz-Combobox | -moz-ComboboxText | -moz-Dialog | -moz-DialogText | -moz-dragtargetzone | -moz-EvenTreeRow | -moz-Field | -moz-FieldText | -moz-html-CellHighlight | -moz-html-CellHighlightText | -moz-mac-accentdarkestshadow | -moz-mac-accentdarkshadow | -moz-mac-accentface | -moz-mac-accentlightesthighlight | -moz-mac-accentlightshadow | -moz-mac-accentregularhighlight | -moz-mac-accentregularshadow | -moz-mac-chrome-active | -moz-mac-chrome-inactive | -moz-mac-focusring | -moz-mac-menuselect | -moz-mac-menushadow | -moz-mac-menutextselect | -moz-MenuHover | -moz-MenuHoverText | -moz-MenuBarText | -moz-MenuBarHoverText | -moz-nativehyperlinktext | -moz-OddTreeRow | -moz-win-communicationstext | -moz-win-mediatext | -moz-activehyperlinktext | -moz-default-background-color | -moz-default-color | -moz-hyperlinktext | -moz-visitedhyperlinktext | -webkit-activelink | -webkit-focus-ring-color | -webkit-link | -webkit-text"
|
26266 | },
|
26267 | "-non-standard-image-rendering": {
|
26268 | comment: "non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html",
|
26269 | syntax: "optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"
|
26270 | },
|
26271 | "-non-standard-overflow": {
|
26272 | comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
|
26273 | syntax: "-moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"
|
26274 | },
|
26275 | "-non-standard-width": {
|
26276 | comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
|
26277 | syntax: "fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content"
|
26278 | },
|
26279 | "-webkit-gradient()": {
|
26280 | comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )",
|
26281 | syntax: "-webkit-gradient( <-webkit-gradient-type>, <-webkit-gradient-point> [, <-webkit-gradient-point> | , <-webkit-gradient-radius>, <-webkit-gradient-point> ] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )"
|
26282 | },
|
26283 | "-webkit-gradient-color-stop": {
|
26284 | comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
|
26285 | syntax: "from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"
|
26286 | },
|
26287 | "-webkit-gradient-point": {
|
26288 | comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
|
26289 | syntax: "[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"
|
26290 | },
|
26291 | "-webkit-gradient-radius": {
|
26292 | comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
|
26293 | syntax: "<length> | <percentage>"
|
26294 | },
|
26295 | "-webkit-gradient-type": {
|
26296 | comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
|
26297 | syntax: "linear | radial"
|
26298 | },
|
26299 | "-webkit-mask-box-repeat": {
|
26300 | comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
|
26301 | syntax: "repeat | stretch | round"
|
26302 | },
|
26303 | "-webkit-mask-clip-style": {
|
26304 | comment: "missed; there is no enough information about `-webkit-mask-clip` property, but looks like all those keywords are working",
|
26305 | syntax: "border | border-box | padding | padding-box | content | content-box | text"
|
26306 | },
|
26307 | "-ms-filter-function-list": {
|
26308 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
|
26309 | syntax: "<-ms-filter-function>+"
|
26310 | },
|
26311 | "-ms-filter-function": {
|
26312 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
|
26313 | syntax: "<-ms-filter-function-progid> | <-ms-filter-function-legacy>"
|
26314 | },
|
26315 | "-ms-filter-function-progid": {
|
26316 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
|
26317 | syntax: "'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value>? ) ]"
|
26318 | },
|
26319 | "-ms-filter-function-legacy": {
|
26320 | comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
|
26321 | syntax: "<ident-token> | <function-token> <any-value>? )"
|
26322 | },
|
26323 | "-ms-filter": {
|
26324 | syntax: "<string>"
|
26325 | },
|
26326 | age: {
|
26327 | comment: "https://www.w3.org/TR/css3-speech/#voice-family",
|
26328 | syntax: "child | young | old"
|
26329 | },
|
26330 | "attr-name": {
|
26331 | syntax: "<wq-name>"
|
26332 | },
|
26333 | "attr-fallback": {
|
26334 | syntax: "<any-value>"
|
26335 | },
|
26336 | "border-radius": {
|
26337 | comment: "missed, https://drafts.csswg.org/css-backgrounds-3/#the-border-radius",
|
26338 | syntax: "<length-percentage>{1,2}"
|
26339 | },
|
26340 | bottom: {
|
26341 | comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
|
26342 | syntax: "<length> | auto"
|
26343 | },
|
26344 | "content-list": {
|
26345 | comment: "missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, <target> and leader() is omitted util stabilization)",
|
26346 | syntax: "[ <string> | contents | <image> | <quote> | <target> | <leader()> | <attr()> | counter( <ident>, <'list-style-type'>? ) ]+"
|
26347 | },
|
26348 | "element()": {
|
26349 | comment: "https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation",
|
26350 | syntax: "element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"
|
26351 | },
|
26352 | "generic-voice": {
|
26353 | comment: "https://www.w3.org/TR/css3-speech/#voice-family",
|
26354 | syntax: "[ <age>? <gender> <integer>? ]"
|
26355 | },
|
26356 | gender: {
|
26357 | comment: "https://www.w3.org/TR/css3-speech/#voice-family",
|
26358 | syntax: "male | female | neutral"
|
26359 | },
|
26360 | "generic-family": {
|
26361 | comment: "added -apple-system",
|
26362 | references: [
|
26363 | "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
|
26364 | ],
|
26365 | syntax: "| -apple-system"
|
26366 | },
|
26367 | gradient: {
|
26368 | comment: "added legacy syntaxes support",
|
26369 | syntax: "| <-legacy-gradient>"
|
26370 | },
|
26371 | left: {
|
26372 | comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
|
26373 | syntax: "<length> | auto"
|
26374 | },
|
26375 | "mask-image": {
|
26376 | comment: "missed; https://drafts.fxtf.org/css-masking-1/#the-mask-image",
|
26377 | syntax: "<mask-reference>#"
|
26378 | },
|
26379 | "name-repeat": {
|
26380 | comment: "missed, and looks like obsolete, keep it as is since other property syntaxes should be changed too; https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-name-repeat",
|
26381 | syntax: "repeat( [ <positive-integer> | auto-fill ], <line-names>+)"
|
26382 | },
|
26383 | "named-color": {
|
26384 | comment: "added non standard color names",
|
26385 | syntax: "| <-non-standard-color>"
|
26386 | },
|
26387 | paint: {
|
26388 | comment: "used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint",
|
26389 | syntax: "none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"
|
26390 | },
|
26391 | "page-size": {
|
26392 | comment: "https://www.w3.org/TR/css-page-3/#typedef-page-size-page-size",
|
26393 | syntax: "A5 | A4 | A3 | B5 | B4 | JIS-B5 | JIS-B4 | letter | legal | ledger"
|
26394 | },
|
26395 | ratio: {
|
26396 | comment: "missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio",
|
26397 | syntax: "<integer> / <integer>"
|
26398 | },
|
26399 | right: {
|
26400 | comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
|
26401 | syntax: "<length> | auto"
|
26402 | },
|
26403 | shape: {
|
26404 | comment: "missed spaces in function body and add backwards compatible syntax",
|
26405 | syntax: "rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"
|
26406 | },
|
26407 | "svg-length": {
|
26408 | comment: "All coordinates and lengths in SVG can be specified with or without a unit identifier",
|
26409 | references: [
|
26410 | "https://www.w3.org/TR/SVG11/coords.html#Units"
|
26411 | ],
|
26412 | syntax: "<percentage> | <length> | <number>"
|
26413 | },
|
26414 | "svg-writing-mode": {
|
26415 | comment: "SVG specific keywords (deprecated for CSS)",
|
26416 | references: [
|
26417 | "https://developer.mozilla.org/en/docs/Web/CSS/writing-mode",
|
26418 | "https://www.w3.org/TR/SVG/text.html#WritingModeProperty"
|
26419 | ],
|
26420 | syntax: "lr-tb | rl-tb | tb-rl | lr | rl | tb"
|
26421 | },
|
26422 | top: {
|
26423 | comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
|
26424 | syntax: "<length> | auto"
|
26425 | },
|
26426 | "track-group": {
|
26427 | comment: "used by old grid-columns and grid-rows syntax v0",
|
26428 | syntax: "'(' [ <string>* <track-minmax> <string>* ]+ ')' [ '[' <positive-integer> ']' ]? | <track-minmax>"
|
26429 | },
|
26430 | "track-list-v0": {
|
26431 | comment: "used by old grid-columns and grid-rows syntax v0",
|
26432 | syntax: "[ <string>* <track-group> <string>* ]+ | none"
|
26433 | },
|
26434 | "track-minmax": {
|
26435 | comment: "used by old grid-columns and grid-rows syntax v0",
|
26436 | syntax: "minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> | fit-content"
|
26437 | },
|
26438 | x: {
|
26439 | comment: "missed; not sure we should add it, but no others except `cursor` is using it so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",
|
26440 | syntax: "<number>"
|
26441 | },
|
26442 | y: {
|
26443 | comment: "missed; not sure we should add it, but no others except `cursor` is using so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",
|
26444 | syntax: "<number>"
|
26445 | },
|
26446 | declaration: {
|
26447 | comment: "missed, restored by https://drafts.csswg.org/css-syntax",
|
26448 | syntax: "<ident-token> : <declaration-value>? [ '!' important ]?"
|
26449 | },
|
26450 | "declaration-list": {
|
26451 | comment: "missed, restored by https://drafts.csswg.org/css-syntax",
|
26452 | syntax: "[ <declaration>? ';' ]* <declaration>?"
|
26453 | },
|
26454 | url: {
|
26455 | comment: "https://drafts.csswg.org/css-values-4/#urls",
|
26456 | syntax: "url( <string> <url-modifier>* ) | <url-token>"
|
26457 | },
|
26458 | "url-modifier": {
|
26459 | comment: "https://drafts.csswg.org/css-values-4/#typedef-url-modifier",
|
26460 | syntax: "<ident> | <function-token> <any-value> )"
|
26461 | },
|
26462 | "number-zero-one": {
|
26463 | syntax: "<number [0,1]>"
|
26464 | },
|
26465 | "number-one-or-greater": {
|
26466 | syntax: "<number [1,∞]>"
|
26467 | },
|
26468 | "positive-integer": {
|
26469 | syntax: "<integer [0,∞]>"
|
26470 | },
|
26471 | "-non-standard-display": {
|
26472 | syntax: "-ms-inline-flexbox | -ms-grid | -ms-inline-grid | -webkit-flex | -webkit-inline-flex | -webkit-box | -webkit-inline-box | -moz-inline-stack | -moz-box | -moz-inline-box"
|
26473 | }
|
26474 | };
|
26475 | var patch = {
|
26476 | atrules: atrules,
|
26477 | properties: properties$1,
|
26478 | syntaxes: syntaxes
|
26479 | };
|
26480 |
|
26481 | const extendSyntax = /^\s*\|\s*/;
|
26482 |
|
26483 | function preprocessAtrules(dict) {
|
26484 | const result = Object.create(null);
|
26485 |
|
26486 | for (const atruleName in dict) {
|
26487 | const atrule = dict[atruleName];
|
26488 | let descriptors = null;
|
26489 |
|
26490 | if (atrule.descriptors) {
|
26491 | descriptors = Object.create(null);
|
26492 |
|
26493 | for (const descriptor in atrule.descriptors) {
|
26494 | descriptors[descriptor] = atrule.descriptors[descriptor].syntax;
|
26495 | }
|
26496 | }
|
26497 |
|
26498 | result[atruleName.substr(1)] = {
|
26499 | prelude: atrule.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim() || null,
|
26500 | descriptors
|
26501 | };
|
26502 | }
|
26503 |
|
26504 | return result;
|
26505 | }
|
26506 |
|
26507 | function patchDictionary(dict, patchDict) {
|
26508 | const result = {};
|
26509 |
|
26510 |
|
26511 | for (const key in dict) {
|
26512 | result[key] = dict[key].syntax || dict[key];
|
26513 | }
|
26514 |
|
26515 |
|
26516 | for (const key in patchDict) {
|
26517 | if (key in dict) {
|
26518 | if (patchDict[key].syntax) {
|
26519 | result[key] = extendSyntax.test(patchDict[key].syntax)
|
26520 | ? result[key] + ' ' + patchDict[key].syntax.trim()
|
26521 | : patchDict[key].syntax;
|
26522 | } else {
|
26523 | delete result[key];
|
26524 | }
|
26525 | } else {
|
26526 | if (patchDict[key].syntax) {
|
26527 | result[key] = patchDict[key].syntax.replace(extendSyntax, '');
|
26528 | }
|
26529 | }
|
26530 | }
|
26531 |
|
26532 | return result;
|
26533 | }
|
26534 |
|
26535 | function unpackSyntaxes(dict) {
|
26536 | const result = {};
|
26537 |
|
26538 | for (const key in dict) {
|
26539 | result[key] = dict[key].syntax;
|
26540 | }
|
26541 |
|
26542 | return result;
|
26543 | }
|
26544 |
|
26545 | function patchAtrules(dict, patchDict) {
|
26546 | const result = {};
|
26547 |
|
26548 |
|
26549 | for (const key in dict) {
|
26550 | const patchDescriptors = (patchDict[key] && patchDict[key].descriptors) || null;
|
26551 |
|
26552 | result[key] = {
|
26553 | prelude: key in patchDict && 'prelude' in patchDict[key]
|
26554 | ? patchDict[key].prelude
|
26555 | : dict[key].prelude || null,
|
26556 | descriptors: dict[key].descriptors
|
26557 | ? patchDictionary(dict[key].descriptors, patchDescriptors || {})
|
26558 | : patchDescriptors && unpackSyntaxes(patchDescriptors)
|
26559 | };
|
26560 | }
|
26561 |
|
26562 |
|
26563 | for (const key in patchDict) {
|
26564 | if (!hasOwnProperty.call(dict, key)) {
|
26565 | result[key] = {
|
26566 | prelude: patchDict[key].prelude || null,
|
26567 | descriptors: patchDict[key].descriptors && unpackSyntaxes(patchDict[key].descriptors)
|
26568 | };
|
26569 | }
|
26570 | }
|
26571 |
|
26572 | return result;
|
26573 | }
|
26574 |
|
26575 | var data = {
|
26576 | types: patchDictionary(mdnSyntaxes, patch.syntaxes),
|
26577 | atrules: patchAtrules(preprocessAtrules(mdnAtrules), patch.atrules),
|
26578 | properties: patchDictionary(mdnProperties, patch.properties)
|
26579 | };
|
26580 |
|
26581 | var cmpChar$3 = tokenizer.cmpChar;
|
26582 | var isDigit$4 = tokenizer.isDigit;
|
26583 | var TYPE$9 = tokenizer.TYPE;
|
26584 |
|
26585 | var WHITESPACE$4 = TYPE$9.WhiteSpace;
|
26586 | var COMMENT$4 = TYPE$9.Comment;
|
26587 | var IDENT$3 = TYPE$9.Ident;
|
26588 | var NUMBER$3 = TYPE$9.Number;
|
26589 | var DIMENSION$2 = TYPE$9.Dimension;
|
26590 | var PLUSSIGN$3 = 0x002B;
|
26591 | var HYPHENMINUS$3 = 0x002D;
|
26592 | var N$4 = 0x006E;
|
26593 | var DISALLOW_SIGN$1 = true;
|
26594 | var ALLOW_SIGN$1 = false;
|
26595 |
|
26596 | function checkInteger$1(offset, disallowSign) {
|
26597 | var pos = this.scanner.tokenStart + offset;
|
26598 | var code = this.scanner.source.charCodeAt(pos);
|
26599 |
|
26600 | if (code === PLUSSIGN$3 || code === HYPHENMINUS$3) {
|
26601 | if (disallowSign) {
|
26602 | this.error('Number sign is not allowed');
|
26603 | }
|
26604 | pos++;
|
26605 | }
|
26606 |
|
26607 | for (; pos < this.scanner.tokenEnd; pos++) {
|
26608 | if (!isDigit$4(this.scanner.source.charCodeAt(pos))) {
|
26609 | this.error('Integer is expected', pos);
|
26610 | }
|
26611 | }
|
26612 | }
|
26613 |
|
26614 | function checkTokenIsInteger(disallowSign) {
|
26615 | return checkInteger$1.call(this, 0, disallowSign);
|
26616 | }
|
26617 |
|
26618 | function expectCharCode(offset, code) {
|
26619 | if (!cmpChar$3(this.scanner.source, this.scanner.tokenStart + offset, code)) {
|
26620 | var msg = '';
|
26621 |
|
26622 | switch (code) {
|
26623 | case N$4:
|
26624 | msg = 'N is expected';
|
26625 | break;
|
26626 | case HYPHENMINUS$3:
|
26627 | msg = 'HyphenMinus is expected';
|
26628 | break;
|
26629 | }
|
26630 |
|
26631 | this.error(msg, this.scanner.tokenStart + offset);
|
26632 | }
|
26633 | }
|
26634 |
|
26635 |
|
26636 |
|
26637 | function consumeB$1() {
|
26638 | var offset = 0;
|
26639 | var sign = 0;
|
26640 | var type = this.scanner.tokenType;
|
26641 |
|
26642 | while (type === WHITESPACE$4 || type === COMMENT$4) {
|
26643 | type = this.scanner.lookupType(++offset);
|
26644 | }
|
26645 |
|
26646 | if (type !== NUMBER$3) {
|
26647 | if (this.scanner.isDelim(PLUSSIGN$3, offset) ||
|
26648 | this.scanner.isDelim(HYPHENMINUS$3, offset)) {
|
26649 | sign = this.scanner.isDelim(PLUSSIGN$3, offset) ? PLUSSIGN$3 : HYPHENMINUS$3;
|
26650 |
|
26651 | do {
|
26652 | type = this.scanner.lookupType(++offset);
|
26653 | } while (type === WHITESPACE$4 || type === COMMENT$4);
|
26654 |
|
26655 | if (type !== NUMBER$3) {
|
26656 | this.scanner.skip(offset);
|
26657 | checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
|
26658 | }
|
26659 | } else {
|
26660 | return null;
|
26661 | }
|
26662 | }
|
26663 |
|
26664 | if (offset > 0) {
|
26665 | this.scanner.skip(offset);
|
26666 | }
|
26667 |
|
26668 | if (sign === 0) {
|
26669 | type = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
26670 | if (type !== PLUSSIGN$3 && type !== HYPHENMINUS$3) {
|
26671 | this.error('Number sign is expected');
|
26672 | }
|
26673 | }
|
26674 |
|
26675 | checkTokenIsInteger.call(this, sign !== 0);
|
26676 | return sign === HYPHENMINUS$3 ? '-' + this.consume(NUMBER$3) : this.consume(NUMBER$3);
|
26677 | }
|
26678 |
|
26679 |
|
26680 | var AnPlusB = {
|
26681 | name: 'AnPlusB',
|
26682 | structure: {
|
26683 | a: [String, null],
|
26684 | b: [String, null]
|
26685 | },
|
26686 | parse: function() {
|
26687 |
|
26688 | var start = this.scanner.tokenStart;
|
26689 | var a = null;
|
26690 | var b = null;
|
26691 |
|
26692 |
|
26693 | if (this.scanner.tokenType === NUMBER$3) {
|
26694 | checkTokenIsInteger.call(this, ALLOW_SIGN$1);
|
26695 | b = this.consume(NUMBER$3);
|
26696 | }
|
26697 |
|
26698 |
|
26699 |
|
26700 |
|
26701 |
|
26702 |
|
26703 | else if (this.scanner.tokenType === IDENT$3 && cmpChar$3(this.scanner.source, this.scanner.tokenStart, HYPHENMINUS$3)) {
|
26704 | a = '-1';
|
26705 |
|
26706 | expectCharCode.call(this, 1, N$4);
|
26707 |
|
26708 | switch (this.scanner.getTokenLength()) {
|
26709 |
|
26710 |
|
26711 |
|
26712 | case 2:
|
26713 | this.scanner.next();
|
26714 | b = consumeB$1.call(this);
|
26715 | break;
|
26716 |
|
26717 |
|
26718 | case 3:
|
26719 | expectCharCode.call(this, 2, HYPHENMINUS$3);
|
26720 |
|
26721 | this.scanner.next();
|
26722 | this.scanner.skipSC();
|
26723 |
|
26724 | checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
|
26725 |
|
26726 | b = '-' + this.consume(NUMBER$3);
|
26727 | break;
|
26728 |
|
26729 |
|
26730 | default:
|
26731 | expectCharCode.call(this, 2, HYPHENMINUS$3);
|
26732 | checkInteger$1.call(this, 3, DISALLOW_SIGN$1);
|
26733 | this.scanner.next();
|
26734 |
|
26735 | b = this.scanner.substrToCursor(start + 2);
|
26736 | }
|
26737 | }
|
26738 |
|
26739 |
|
26740 |
|
26741 |
|
26742 |
|
26743 |
|
26744 | else if (this.scanner.tokenType === IDENT$3 || (this.scanner.isDelim(PLUSSIGN$3) && this.scanner.lookupType(1) === IDENT$3)) {
|
26745 | var sign = 0;
|
26746 | a = '1';
|
26747 |
|
26748 |
|
26749 | if (this.scanner.isDelim(PLUSSIGN$3)) {
|
26750 | sign = 1;
|
26751 | this.scanner.next();
|
26752 | }
|
26753 |
|
26754 | expectCharCode.call(this, 0, N$4);
|
26755 |
|
26756 | switch (this.scanner.getTokenLength()) {
|
26757 |
|
26758 |
|
26759 |
|
26760 | case 1:
|
26761 | this.scanner.next();
|
26762 | b = consumeB$1.call(this);
|
26763 | break;
|
26764 |
|
26765 |
|
26766 | case 2:
|
26767 | expectCharCode.call(this, 1, HYPHENMINUS$3);
|
26768 |
|
26769 | this.scanner.next();
|
26770 | this.scanner.skipSC();
|
26771 |
|
26772 | checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
|
26773 |
|
26774 | b = '-' + this.consume(NUMBER$3);
|
26775 | break;
|
26776 |
|
26777 |
|
26778 | default:
|
26779 | expectCharCode.call(this, 1, HYPHENMINUS$3);
|
26780 | checkInteger$1.call(this, 2, DISALLOW_SIGN$1);
|
26781 | this.scanner.next();
|
26782 |
|
26783 | b = this.scanner.substrToCursor(start + sign + 1);
|
26784 | }
|
26785 | }
|
26786 |
|
26787 |
|
26788 |
|
26789 |
|
26790 |
|
26791 |
|
26792 | else if (this.scanner.tokenType === DIMENSION$2) {
|
26793 | var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
26794 | var sign = code === PLUSSIGN$3 || code === HYPHENMINUS$3;
|
26795 |
|
26796 | for (var i = this.scanner.tokenStart + sign; i < this.scanner.tokenEnd; i++) {
|
26797 | if (!isDigit$4(this.scanner.source.charCodeAt(i))) {
|
26798 | break;
|
26799 | }
|
26800 | }
|
26801 |
|
26802 | if (i === this.scanner.tokenStart + sign) {
|
26803 | this.error('Integer is expected', this.scanner.tokenStart + sign);
|
26804 | }
|
26805 |
|
26806 | expectCharCode.call(this, i - this.scanner.tokenStart, N$4);
|
26807 | a = this.scanner.source.substring(start, i);
|
26808 |
|
26809 |
|
26810 |
|
26811 |
|
26812 | if (i + 1 === this.scanner.tokenEnd) {
|
26813 | this.scanner.next();
|
26814 | b = consumeB$1.call(this);
|
26815 | } else {
|
26816 | expectCharCode.call(this, i - this.scanner.tokenStart + 1, HYPHENMINUS$3);
|
26817 |
|
26818 |
|
26819 | if (i + 2 === this.scanner.tokenEnd) {
|
26820 | this.scanner.next();
|
26821 | this.scanner.skipSC();
|
26822 | checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
|
26823 | b = '-' + this.consume(NUMBER$3);
|
26824 | }
|
26825 |
|
26826 | else {
|
26827 | checkInteger$1.call(this, i - this.scanner.tokenStart + 2, DISALLOW_SIGN$1);
|
26828 | this.scanner.next();
|
26829 | b = this.scanner.substrToCursor(i + 1);
|
26830 | }
|
26831 | }
|
26832 | } else {
|
26833 | this.error();
|
26834 | }
|
26835 |
|
26836 | if (a !== null && a.charCodeAt(0) === PLUSSIGN$3) {
|
26837 | a = a.substr(1);
|
26838 | }
|
26839 |
|
26840 | if (b !== null && b.charCodeAt(0) === PLUSSIGN$3) {
|
26841 | b = b.substr(1);
|
26842 | }
|
26843 |
|
26844 | return {
|
26845 | type: 'AnPlusB',
|
26846 | loc: this.getLocation(start, this.scanner.tokenStart),
|
26847 | a: a,
|
26848 | b: b
|
26849 | };
|
26850 | },
|
26851 | generate: function(node) {
|
26852 | var a = node.a !== null && node.a !== undefined;
|
26853 | var b = node.b !== null && node.b !== undefined;
|
26854 |
|
26855 | if (a) {
|
26856 | this.chunk(
|
26857 | node.a === '+1' ? '+n' :
|
26858 | node.a === '1' ? 'n' :
|
26859 | node.a === '-1' ? '-n' :
|
26860 | node.a + 'n'
|
26861 | );
|
26862 |
|
26863 | if (b) {
|
26864 | b = String(node.b);
|
26865 | if (b.charAt(0) === '-' || b.charAt(0) === '+') {
|
26866 | this.chunk(b.charAt(0));
|
26867 | this.chunk(b.substr(1));
|
26868 | } else {
|
26869 | this.chunk('+');
|
26870 | this.chunk(b);
|
26871 | }
|
26872 | }
|
26873 | } else {
|
26874 | this.chunk(String(node.b));
|
26875 | }
|
26876 | }
|
26877 | };
|
26878 |
|
26879 | var TYPE$a = tokenizer.TYPE;
|
26880 |
|
26881 | var WhiteSpace = TYPE$a.WhiteSpace;
|
26882 | var Semicolon = TYPE$a.Semicolon;
|
26883 | var LeftCurlyBracket = TYPE$a.LeftCurlyBracket;
|
26884 | var Delim = TYPE$a.Delim;
|
26885 | var EXCLAMATIONMARK$1 = 0x0021;
|
26886 |
|
26887 | function getOffsetExcludeWS() {
|
26888 | if (this.scanner.tokenIndex > 0) {
|
26889 | if (this.scanner.lookupType(-1) === WhiteSpace) {
|
26890 | return this.scanner.tokenIndex > 1
|
26891 | ? this.scanner.getTokenStart(this.scanner.tokenIndex - 1)
|
26892 | : this.scanner.firstCharOffset;
|
26893 | }
|
26894 | }
|
26895 |
|
26896 | return this.scanner.tokenStart;
|
26897 | }
|
26898 |
|
26899 |
|
26900 | function balanceEnd() {
|
26901 | return 0;
|
26902 | }
|
26903 |
|
26904 |
|
26905 | function leftCurlyBracket(tokenType) {
|
26906 | return tokenType === LeftCurlyBracket ? 1 : 0;
|
26907 | }
|
26908 |
|
26909 |
|
26910 | function leftCurlyBracketOrSemicolon(tokenType) {
|
26911 | return tokenType === LeftCurlyBracket || tokenType === Semicolon ? 1 : 0;
|
26912 | }
|
26913 |
|
26914 |
|
26915 | function exclamationMarkOrSemicolon(tokenType, source, offset) {
|
26916 | if (tokenType === Delim && source.charCodeAt(offset) === EXCLAMATIONMARK$1) {
|
26917 | return 1;
|
26918 | }
|
26919 |
|
26920 | return tokenType === Semicolon ? 1 : 0;
|
26921 | }
|
26922 |
|
26923 |
|
26924 | function semicolonIncluded(tokenType) {
|
26925 | return tokenType === Semicolon ? 2 : 0;
|
26926 | }
|
26927 |
|
26928 | var Raw = {
|
26929 | name: 'Raw',
|
26930 | structure: {
|
26931 | value: String
|
26932 | },
|
26933 | parse: function(startToken, mode, excludeWhiteSpace) {
|
26934 | var startOffset = this.scanner.getTokenStart(startToken);
|
26935 | var endOffset;
|
26936 |
|
26937 | this.scanner.skip(
|
26938 | this.scanner.getRawLength(startToken, mode || balanceEnd)
|
26939 | );
|
26940 |
|
26941 | if (excludeWhiteSpace && this.scanner.tokenStart > startOffset) {
|
26942 | endOffset = getOffsetExcludeWS.call(this);
|
26943 | } else {
|
26944 | endOffset = this.scanner.tokenStart;
|
26945 | }
|
26946 |
|
26947 | return {
|
26948 | type: 'Raw',
|
26949 | loc: this.getLocation(startOffset, endOffset),
|
26950 | value: this.scanner.source.substring(startOffset, endOffset)
|
26951 | };
|
26952 | },
|
26953 | generate: function(node) {
|
26954 | this.chunk(node.value);
|
26955 | },
|
26956 |
|
26957 | mode: {
|
26958 | default: balanceEnd,
|
26959 | leftCurlyBracket: leftCurlyBracket,
|
26960 | leftCurlyBracketOrSemicolon: leftCurlyBracketOrSemicolon,
|
26961 | exclamationMarkOrSemicolon: exclamationMarkOrSemicolon,
|
26962 | semicolonIncluded: semicolonIncluded
|
26963 | }
|
26964 | };
|
26965 |
|
26966 | var TYPE$b = tokenizer.TYPE;
|
26967 | var rawMode = Raw.mode;
|
26968 |
|
26969 | var ATKEYWORD = TYPE$b.AtKeyword;
|
26970 | var SEMICOLON = TYPE$b.Semicolon;
|
26971 | var LEFTCURLYBRACKET$1 = TYPE$b.LeftCurlyBracket;
|
26972 | var RIGHTCURLYBRACKET$1 = TYPE$b.RightCurlyBracket;
|
26973 |
|
26974 | function consumeRaw(startToken) {
|
26975 | return this.Raw(startToken, rawMode.leftCurlyBracketOrSemicolon, true);
|
26976 | }
|
26977 |
|
26978 | function isDeclarationBlockAtrule() {
|
26979 | for (var offset = 1, type; type = this.scanner.lookupType(offset); offset++) {
|
26980 | if (type === RIGHTCURLYBRACKET$1) {
|
26981 | return true;
|
26982 | }
|
26983 |
|
26984 | if (type === LEFTCURLYBRACKET$1 ||
|
26985 | type === ATKEYWORD) {
|
26986 | return false;
|
26987 | }
|
26988 | }
|
26989 |
|
26990 | return false;
|
26991 | }
|
26992 |
|
26993 | var Atrule = {
|
26994 | name: 'Atrule',
|
26995 | structure: {
|
26996 | name: String,
|
26997 | prelude: ['AtrulePrelude', 'Raw', null],
|
26998 | block: ['Block', null]
|
26999 | },
|
27000 | parse: function() {
|
27001 | var start = this.scanner.tokenStart;
|
27002 | var name;
|
27003 | var nameLowerCase;
|
27004 | var prelude = null;
|
27005 | var block = null;
|
27006 |
|
27007 | this.eat(ATKEYWORD);
|
27008 |
|
27009 | name = this.scanner.substrToCursor(start + 1);
|
27010 | nameLowerCase = name.toLowerCase();
|
27011 | this.scanner.skipSC();
|
27012 |
|
27013 |
|
27014 | if (this.scanner.eof === false &&
|
27015 | this.scanner.tokenType !== LEFTCURLYBRACKET$1 &&
|
27016 | this.scanner.tokenType !== SEMICOLON) {
|
27017 | if (this.parseAtrulePrelude) {
|
27018 | prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw);
|
27019 |
|
27020 |
|
27021 | if (prelude.type === 'AtrulePrelude' && prelude.children.head === null) {
|
27022 | prelude = null;
|
27023 | }
|
27024 | } else {
|
27025 | prelude = consumeRaw.call(this, this.scanner.tokenIndex);
|
27026 | }
|
27027 |
|
27028 | this.scanner.skipSC();
|
27029 | }
|
27030 |
|
27031 | switch (this.scanner.tokenType) {
|
27032 | case SEMICOLON:
|
27033 | this.scanner.next();
|
27034 | break;
|
27035 |
|
27036 | case LEFTCURLYBRACKET$1:
|
27037 | if (this.atrule.hasOwnProperty(nameLowerCase) &&
|
27038 | typeof this.atrule[nameLowerCase].block === 'function') {
|
27039 | block = this.atrule[nameLowerCase].block.call(this);
|
27040 | } else {
|
27041 |
|
27042 | block = this.Block(isDeclarationBlockAtrule.call(this));
|
27043 | }
|
27044 |
|
27045 | break;
|
27046 | }
|
27047 |
|
27048 | return {
|
27049 | type: 'Atrule',
|
27050 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27051 | name: name,
|
27052 | prelude: prelude,
|
27053 | block: block
|
27054 | };
|
27055 | },
|
27056 | generate: function(node) {
|
27057 | this.chunk('@');
|
27058 | this.chunk(node.name);
|
27059 |
|
27060 | if (node.prelude !== null) {
|
27061 | this.chunk(' ');
|
27062 | this.node(node.prelude);
|
27063 | }
|
27064 |
|
27065 | if (node.block) {
|
27066 | this.node(node.block);
|
27067 | } else {
|
27068 | this.chunk(';');
|
27069 | }
|
27070 | },
|
27071 | walkContext: 'atrule'
|
27072 | };
|
27073 |
|
27074 | var TYPE$c = tokenizer.TYPE;
|
27075 |
|
27076 | var SEMICOLON$1 = TYPE$c.Semicolon;
|
27077 | var LEFTCURLYBRACKET$2 = TYPE$c.LeftCurlyBracket;
|
27078 |
|
27079 | var AtrulePrelude = {
|
27080 | name: 'AtrulePrelude',
|
27081 | structure: {
|
27082 | children: [[]]
|
27083 | },
|
27084 | parse: function(name) {
|
27085 | var children = null;
|
27086 |
|
27087 | if (name !== null) {
|
27088 | name = name.toLowerCase();
|
27089 | }
|
27090 |
|
27091 | this.scanner.skipSC();
|
27092 |
|
27093 | if (this.atrule.hasOwnProperty(name) &&
|
27094 | typeof this.atrule[name].prelude === 'function') {
|
27095 |
|
27096 | children = this.atrule[name].prelude.call(this);
|
27097 | } else {
|
27098 |
|
27099 | children = this.readSequence(this.scope.AtrulePrelude);
|
27100 | }
|
27101 |
|
27102 | this.scanner.skipSC();
|
27103 |
|
27104 | if (this.scanner.eof !== true &&
|
27105 | this.scanner.tokenType !== LEFTCURLYBRACKET$2 &&
|
27106 | this.scanner.tokenType !== SEMICOLON$1) {
|
27107 | this.error('Semicolon or block is expected');
|
27108 | }
|
27109 |
|
27110 | if (children === null) {
|
27111 | children = this.createList();
|
27112 | }
|
27113 |
|
27114 | return {
|
27115 | type: 'AtrulePrelude',
|
27116 | loc: this.getLocationFromList(children),
|
27117 | children: children
|
27118 | };
|
27119 | },
|
27120 | generate: function(node) {
|
27121 | this.children(node);
|
27122 | },
|
27123 | walkContext: 'atrulePrelude'
|
27124 | };
|
27125 |
|
27126 | var TYPE$d = tokenizer.TYPE;
|
27127 |
|
27128 | var IDENT$4 = TYPE$d.Ident;
|
27129 | var STRING = TYPE$d.String;
|
27130 | var COLON = TYPE$d.Colon;
|
27131 | var LEFTSQUAREBRACKET$1 = TYPE$d.LeftSquareBracket;
|
27132 | var RIGHTSQUAREBRACKET$1 = TYPE$d.RightSquareBracket;
|
27133 | var DOLLARSIGN = 0x0024;
|
27134 | var ASTERISK$1 = 0x002A;
|
27135 | var EQUALSSIGN = 0x003D;
|
27136 | var CIRCUMFLEXACCENT = 0x005E;
|
27137 | var VERTICALLINE$1 = 0x007C;
|
27138 | var TILDE = 0x007E;
|
27139 |
|
27140 | function getAttributeName() {
|
27141 | if (this.scanner.eof) {
|
27142 | this.error('Unexpected end of input');
|
27143 | }
|
27144 |
|
27145 | var start = this.scanner.tokenStart;
|
27146 | var expectIdent = false;
|
27147 | var checkColon = true;
|
27148 |
|
27149 | if (this.scanner.isDelim(ASTERISK$1)) {
|
27150 | expectIdent = true;
|
27151 | checkColon = false;
|
27152 | this.scanner.next();
|
27153 | } else if (!this.scanner.isDelim(VERTICALLINE$1)) {
|
27154 | this.eat(IDENT$4);
|
27155 | }
|
27156 |
|
27157 | if (this.scanner.isDelim(VERTICALLINE$1)) {
|
27158 | if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 1) !== EQUALSSIGN) {
|
27159 | this.scanner.next();
|
27160 | this.eat(IDENT$4);
|
27161 | } else if (expectIdent) {
|
27162 | this.error('Identifier is expected', this.scanner.tokenEnd);
|
27163 | }
|
27164 | } else if (expectIdent) {
|
27165 | this.error('Vertical line is expected');
|
27166 | }
|
27167 |
|
27168 | if (checkColon && this.scanner.tokenType === COLON) {
|
27169 | this.scanner.next();
|
27170 | this.eat(IDENT$4);
|
27171 | }
|
27172 |
|
27173 | return {
|
27174 | type: 'Identifier',
|
27175 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27176 | name: this.scanner.substrToCursor(start)
|
27177 | };
|
27178 | }
|
27179 |
|
27180 | function getOperator() {
|
27181 | var start = this.scanner.tokenStart;
|
27182 | var code = this.scanner.source.charCodeAt(start);
|
27183 |
|
27184 | if (code !== EQUALSSIGN &&
|
27185 | code !== TILDE &&
|
27186 | code !== CIRCUMFLEXACCENT &&
|
27187 | code !== DOLLARSIGN &&
|
27188 | code !== ASTERISK$1 &&
|
27189 | code !== VERTICALLINE$1
|
27190 | ) {
|
27191 | this.error('Attribute selector (=, ~=, ^=, $=, *=, |=) is expected');
|
27192 | }
|
27193 |
|
27194 | this.scanner.next();
|
27195 |
|
27196 | if (code !== EQUALSSIGN) {
|
27197 | if (!this.scanner.isDelim(EQUALSSIGN)) {
|
27198 | this.error('Equal sign is expected');
|
27199 | }
|
27200 |
|
27201 | this.scanner.next();
|
27202 | }
|
27203 |
|
27204 | return this.scanner.substrToCursor(start);
|
27205 | }
|
27206 |
|
27207 |
|
27208 |
|
27209 | var AttributeSelector = {
|
27210 | name: 'AttributeSelector',
|
27211 | structure: {
|
27212 | name: 'Identifier',
|
27213 | matcher: [String, null],
|
27214 | value: ['String', 'Identifier', null],
|
27215 | flags: [String, null]
|
27216 | },
|
27217 | parse: function() {
|
27218 | var start = this.scanner.tokenStart;
|
27219 | var name;
|
27220 | var matcher = null;
|
27221 | var value = null;
|
27222 | var flags = null;
|
27223 |
|
27224 | this.eat(LEFTSQUAREBRACKET$1);
|
27225 | this.scanner.skipSC();
|
27226 |
|
27227 | name = getAttributeName.call(this);
|
27228 | this.scanner.skipSC();
|
27229 |
|
27230 | if (this.scanner.tokenType !== RIGHTSQUAREBRACKET$1) {
|
27231 |
|
27232 | if (this.scanner.tokenType !== IDENT$4) {
|
27233 | matcher = getOperator.call(this);
|
27234 |
|
27235 | this.scanner.skipSC();
|
27236 |
|
27237 | value = this.scanner.tokenType === STRING
|
27238 | ? this.String()
|
27239 | : this.Identifier();
|
27240 |
|
27241 | this.scanner.skipSC();
|
27242 | }
|
27243 |
|
27244 |
|
27245 | if (this.scanner.tokenType === IDENT$4) {
|
27246 | flags = this.scanner.getTokenValue();
|
27247 | this.scanner.next();
|
27248 |
|
27249 | this.scanner.skipSC();
|
27250 | }
|
27251 | }
|
27252 |
|
27253 | this.eat(RIGHTSQUAREBRACKET$1);
|
27254 |
|
27255 | return {
|
27256 | type: 'AttributeSelector',
|
27257 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27258 | name: name,
|
27259 | matcher: matcher,
|
27260 | value: value,
|
27261 | flags: flags
|
27262 | };
|
27263 | },
|
27264 | generate: function(node) {
|
27265 | var flagsPrefix = ' ';
|
27266 |
|
27267 | this.chunk('[');
|
27268 | this.node(node.name);
|
27269 |
|
27270 | if (node.matcher !== null) {
|
27271 | this.chunk(node.matcher);
|
27272 |
|
27273 | if (node.value !== null) {
|
27274 | this.node(node.value);
|
27275 |
|
27276 |
|
27277 | if (node.value.type === 'String') {
|
27278 | flagsPrefix = '';
|
27279 | }
|
27280 | }
|
27281 | }
|
27282 |
|
27283 | if (node.flags !== null) {
|
27284 | this.chunk(flagsPrefix);
|
27285 | this.chunk(node.flags);
|
27286 | }
|
27287 |
|
27288 | this.chunk(']');
|
27289 | }
|
27290 | };
|
27291 |
|
27292 | var TYPE$e = tokenizer.TYPE;
|
27293 | var rawMode$1 = Raw.mode;
|
27294 |
|
27295 | var WHITESPACE$5 = TYPE$e.WhiteSpace;
|
27296 | var COMMENT$5 = TYPE$e.Comment;
|
27297 | var SEMICOLON$2 = TYPE$e.Semicolon;
|
27298 | var ATKEYWORD$1 = TYPE$e.AtKeyword;
|
27299 | var LEFTCURLYBRACKET$3 = TYPE$e.LeftCurlyBracket;
|
27300 | var RIGHTCURLYBRACKET$2 = TYPE$e.RightCurlyBracket;
|
27301 |
|
27302 | function consumeRaw$1(startToken) {
|
27303 | return this.Raw(startToken, null, true);
|
27304 | }
|
27305 | function consumeRule() {
|
27306 | return this.parseWithFallback(this.Rule, consumeRaw$1);
|
27307 | }
|
27308 | function consumeRawDeclaration(startToken) {
|
27309 | return this.Raw(startToken, rawMode$1.semicolonIncluded, true);
|
27310 | }
|
27311 | function consumeDeclaration() {
|
27312 | if (this.scanner.tokenType === SEMICOLON$2) {
|
27313 | return consumeRawDeclaration.call(this, this.scanner.tokenIndex);
|
27314 | }
|
27315 |
|
27316 | var node = this.parseWithFallback(this.Declaration, consumeRawDeclaration);
|
27317 |
|
27318 | if (this.scanner.tokenType === SEMICOLON$2) {
|
27319 | this.scanner.next();
|
27320 | }
|
27321 |
|
27322 | return node;
|
27323 | }
|
27324 |
|
27325 | var Block = {
|
27326 | name: 'Block',
|
27327 | structure: {
|
27328 | children: [[
|
27329 | 'Atrule',
|
27330 | 'Rule',
|
27331 | 'Declaration'
|
27332 | ]]
|
27333 | },
|
27334 | parse: function(isDeclaration) {
|
27335 | var consumer = isDeclaration ? consumeDeclaration : consumeRule;
|
27336 |
|
27337 | var start = this.scanner.tokenStart;
|
27338 | var children = this.createList();
|
27339 |
|
27340 | this.eat(LEFTCURLYBRACKET$3);
|
27341 |
|
27342 | scan:
|
27343 | while (!this.scanner.eof) {
|
27344 | switch (this.scanner.tokenType) {
|
27345 | case RIGHTCURLYBRACKET$2:
|
27346 | break scan;
|
27347 |
|
27348 | case WHITESPACE$5:
|
27349 | case COMMENT$5:
|
27350 | this.scanner.next();
|
27351 | break;
|
27352 |
|
27353 | case ATKEYWORD$1:
|
27354 | children.push(this.parseWithFallback(this.Atrule, consumeRaw$1));
|
27355 | break;
|
27356 |
|
27357 | default:
|
27358 | children.push(consumer.call(this));
|
27359 | }
|
27360 | }
|
27361 |
|
27362 | if (!this.scanner.eof) {
|
27363 | this.eat(RIGHTCURLYBRACKET$2);
|
27364 | }
|
27365 |
|
27366 | return {
|
27367 | type: 'Block',
|
27368 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27369 | children: children
|
27370 | };
|
27371 | },
|
27372 | generate: function(node) {
|
27373 | this.chunk('{');
|
27374 | this.children(node, function(prev) {
|
27375 | if (prev.type === 'Declaration') {
|
27376 | this.chunk(';');
|
27377 | }
|
27378 | });
|
27379 | this.chunk('}');
|
27380 | },
|
27381 | walkContext: 'block'
|
27382 | };
|
27383 |
|
27384 | var TYPE$f = tokenizer.TYPE;
|
27385 |
|
27386 | var LEFTSQUAREBRACKET$2 = TYPE$f.LeftSquareBracket;
|
27387 | var RIGHTSQUAREBRACKET$2 = TYPE$f.RightSquareBracket;
|
27388 |
|
27389 | var Brackets = {
|
27390 | name: 'Brackets',
|
27391 | structure: {
|
27392 | children: [[]]
|
27393 | },
|
27394 | parse: function(readSequence, recognizer) {
|
27395 | var start = this.scanner.tokenStart;
|
27396 | var children = null;
|
27397 |
|
27398 | this.eat(LEFTSQUAREBRACKET$2);
|
27399 |
|
27400 | children = readSequence.call(this, recognizer);
|
27401 |
|
27402 | if (!this.scanner.eof) {
|
27403 | this.eat(RIGHTSQUAREBRACKET$2);
|
27404 | }
|
27405 |
|
27406 | return {
|
27407 | type: 'Brackets',
|
27408 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27409 | children: children
|
27410 | };
|
27411 | },
|
27412 | generate: function(node) {
|
27413 | this.chunk('[');
|
27414 | this.children(node);
|
27415 | this.chunk(']');
|
27416 | }
|
27417 | };
|
27418 |
|
27419 | var CDC = tokenizer.TYPE.CDC;
|
27420 |
|
27421 | var CDC_1 = {
|
27422 | name: 'CDC',
|
27423 | structure: [],
|
27424 | parse: function() {
|
27425 | var start = this.scanner.tokenStart;
|
27426 |
|
27427 | this.eat(CDC);
|
27428 |
|
27429 | return {
|
27430 | type: 'CDC',
|
27431 | loc: this.getLocation(start, this.scanner.tokenStart)
|
27432 | };
|
27433 | },
|
27434 | generate: function() {
|
27435 | this.chunk('-->');
|
27436 | }
|
27437 | };
|
27438 |
|
27439 | var CDO = tokenizer.TYPE.CDO;
|
27440 |
|
27441 | var CDO_1 = {
|
27442 | name: 'CDO',
|
27443 | structure: [],
|
27444 | parse: function() {
|
27445 | var start = this.scanner.tokenStart;
|
27446 |
|
27447 | this.eat(CDO);
|
27448 |
|
27449 | return {
|
27450 | type: 'CDO',
|
27451 | loc: this.getLocation(start, this.scanner.tokenStart)
|
27452 | };
|
27453 | },
|
27454 | generate: function() {
|
27455 | this.chunk('<!--');
|
27456 | }
|
27457 | };
|
27458 |
|
27459 | var TYPE$g = tokenizer.TYPE;
|
27460 |
|
27461 | var IDENT$5 = TYPE$g.Ident;
|
27462 | var FULLSTOP = 0x002E;
|
27463 |
|
27464 |
|
27465 | var ClassSelector = {
|
27466 | name: 'ClassSelector',
|
27467 | structure: {
|
27468 | name: String
|
27469 | },
|
27470 | parse: function() {
|
27471 | if (!this.scanner.isDelim(FULLSTOP)) {
|
27472 | this.error('Full stop is expected');
|
27473 | }
|
27474 |
|
27475 | this.scanner.next();
|
27476 |
|
27477 | return {
|
27478 | type: 'ClassSelector',
|
27479 | loc: this.getLocation(this.scanner.tokenStart - 1, this.scanner.tokenEnd),
|
27480 | name: this.consume(IDENT$5)
|
27481 | };
|
27482 | },
|
27483 | generate: function(node) {
|
27484 | this.chunk('.');
|
27485 | this.chunk(node.name);
|
27486 | }
|
27487 | };
|
27488 |
|
27489 | var TYPE$h = tokenizer.TYPE;
|
27490 |
|
27491 | var IDENT$6 = TYPE$h.Ident;
|
27492 | var PLUSSIGN$4 = 0x002B;
|
27493 | var SOLIDUS = 0x002F;
|
27494 | var GREATERTHANSIGN$1 = 0x003E;
|
27495 | var TILDE$1 = 0x007E;
|
27496 |
|
27497 |
|
27498 | var Combinator = {
|
27499 | name: 'Combinator',
|
27500 | structure: {
|
27501 | name: String
|
27502 | },
|
27503 | parse: function() {
|
27504 | var start = this.scanner.tokenStart;
|
27505 | var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
27506 |
|
27507 | switch (code) {
|
27508 | case GREATERTHANSIGN$1:
|
27509 | case PLUSSIGN$4:
|
27510 | case TILDE$1:
|
27511 | this.scanner.next();
|
27512 | break;
|
27513 |
|
27514 | case SOLIDUS:
|
27515 | this.scanner.next();
|
27516 |
|
27517 | if (this.scanner.tokenType !== IDENT$6 || this.scanner.lookupValue(0, 'deep') === false) {
|
27518 | this.error('Identifier `deep` is expected');
|
27519 | }
|
27520 |
|
27521 | this.scanner.next();
|
27522 |
|
27523 | if (!this.scanner.isDelim(SOLIDUS)) {
|
27524 | this.error('Solidus is expected');
|
27525 | }
|
27526 |
|
27527 | this.scanner.next();
|
27528 | break;
|
27529 |
|
27530 | default:
|
27531 | this.error('Combinator is expected');
|
27532 | }
|
27533 |
|
27534 | return {
|
27535 | type: 'Combinator',
|
27536 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27537 | name: this.scanner.substrToCursor(start)
|
27538 | };
|
27539 | },
|
27540 | generate: function(node) {
|
27541 | this.chunk(node.name);
|
27542 | }
|
27543 | };
|
27544 |
|
27545 | var TYPE$i = tokenizer.TYPE;
|
27546 |
|
27547 | var COMMENT$6 = TYPE$i.Comment;
|
27548 | var ASTERISK$2 = 0x002A;
|
27549 | var SOLIDUS$1 = 0x002F;
|
27550 |
|
27551 |
|
27552 | var Comment = {
|
27553 | name: 'Comment',
|
27554 | structure: {
|
27555 | value: String
|
27556 | },
|
27557 | parse: function() {
|
27558 | var start = this.scanner.tokenStart;
|
27559 | var end = this.scanner.tokenEnd;
|
27560 |
|
27561 | this.eat(COMMENT$6);
|
27562 |
|
27563 | if ((end - start + 2) >= 2 &&
|
27564 | this.scanner.source.charCodeAt(end - 2) === ASTERISK$2 &&
|
27565 | this.scanner.source.charCodeAt(end - 1) === SOLIDUS$1) {
|
27566 | end -= 2;
|
27567 | }
|
27568 |
|
27569 | return {
|
27570 | type: 'Comment',
|
27571 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27572 | value: this.scanner.source.substring(start + 2, end)
|
27573 | };
|
27574 | },
|
27575 | generate: function(node) {
|
27576 | this.chunk('/*');
|
27577 | this.chunk(node.value);
|
27578 | this.chunk('*/');
|
27579 | }
|
27580 | };
|
27581 |
|
27582 | var isCustomProperty$1 = names.isCustomProperty;
|
27583 | var TYPE$j = tokenizer.TYPE;
|
27584 | var rawMode$2 = Raw.mode;
|
27585 |
|
27586 | var IDENT$7 = TYPE$j.Ident;
|
27587 | var HASH$1 = TYPE$j.Hash;
|
27588 | var COLON$1 = TYPE$j.Colon;
|
27589 | var SEMICOLON$3 = TYPE$j.Semicolon;
|
27590 | var DELIM$2 = TYPE$j.Delim;
|
27591 | var WHITESPACE$6 = TYPE$j.WhiteSpace;
|
27592 | var EXCLAMATIONMARK$2 = 0x0021;
|
27593 | var NUMBERSIGN$2 = 0x0023;
|
27594 | var DOLLARSIGN$1 = 0x0024;
|
27595 | var AMPERSAND$1 = 0x0026;
|
27596 | var ASTERISK$3 = 0x002A;
|
27597 | var PLUSSIGN$5 = 0x002B;
|
27598 | var SOLIDUS$2 = 0x002F;
|
27599 |
|
27600 | function consumeValueRaw(startToken) {
|
27601 | return this.Raw(startToken, rawMode$2.exclamationMarkOrSemicolon, true);
|
27602 | }
|
27603 |
|
27604 | function consumeCustomPropertyRaw(startToken) {
|
27605 | return this.Raw(startToken, rawMode$2.exclamationMarkOrSemicolon, false);
|
27606 | }
|
27607 |
|
27608 | function consumeValue() {
|
27609 | var startValueToken = this.scanner.tokenIndex;
|
27610 | var value = this.Value();
|
27611 |
|
27612 | if (value.type !== 'Raw' &&
|
27613 | this.scanner.eof === false &&
|
27614 | this.scanner.tokenType !== SEMICOLON$3 &&
|
27615 | this.scanner.isDelim(EXCLAMATIONMARK$2) === false &&
|
27616 | this.scanner.isBalanceEdge(startValueToken) === false) {
|
27617 | this.error();
|
27618 | }
|
27619 |
|
27620 | return value;
|
27621 | }
|
27622 |
|
27623 | var Declaration = {
|
27624 | name: 'Declaration',
|
27625 | structure: {
|
27626 | important: [Boolean, String],
|
27627 | property: String,
|
27628 | value: ['Value', 'Raw']
|
27629 | },
|
27630 | parse: function() {
|
27631 | var start = this.scanner.tokenStart;
|
27632 | var startToken = this.scanner.tokenIndex;
|
27633 | var property = readProperty$1.call(this);
|
27634 | var customProperty = isCustomProperty$1(property);
|
27635 | var parseValue = customProperty ? this.parseCustomProperty : this.parseValue;
|
27636 | var consumeRaw = customProperty ? consumeCustomPropertyRaw : consumeValueRaw;
|
27637 | var important = false;
|
27638 | var value;
|
27639 |
|
27640 | this.scanner.skipSC();
|
27641 | this.eat(COLON$1);
|
27642 |
|
27643 | const valueStart = this.scanner.tokenIndex;
|
27644 |
|
27645 | if (!customProperty) {
|
27646 | this.scanner.skipSC();
|
27647 | }
|
27648 |
|
27649 | if (parseValue) {
|
27650 | value = this.parseWithFallback(consumeValue, consumeRaw);
|
27651 | } else {
|
27652 | value = consumeRaw.call(this, this.scanner.tokenIndex);
|
27653 | }
|
27654 |
|
27655 | if (customProperty && value.type === 'Value' && value.children.isEmpty()) {
|
27656 | for (let offset = valueStart - this.scanner.tokenIndex; offset <= 0; offset++) {
|
27657 | if (this.scanner.lookupType(offset) === WHITESPACE$6) {
|
27658 | value.children.appendData({
|
27659 | type: 'WhiteSpace',
|
27660 | loc: null,
|
27661 | value: ' '
|
27662 | });
|
27663 | break;
|
27664 | }
|
27665 | }
|
27666 | }
|
27667 |
|
27668 | if (this.scanner.isDelim(EXCLAMATIONMARK$2)) {
|
27669 | important = getImportant.call(this);
|
27670 | this.scanner.skipSC();
|
27671 | }
|
27672 |
|
27673 |
|
27674 |
|
27675 |
|
27676 | if (this.scanner.eof === false &&
|
27677 | this.scanner.tokenType !== SEMICOLON$3 &&
|
27678 | this.scanner.isBalanceEdge(startToken) === false) {
|
27679 | this.error();
|
27680 | }
|
27681 |
|
27682 | return {
|
27683 | type: 'Declaration',
|
27684 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27685 | important: important,
|
27686 | property: property,
|
27687 | value: value
|
27688 | };
|
27689 | },
|
27690 | generate: function(node) {
|
27691 | this.chunk(node.property);
|
27692 | this.chunk(':');
|
27693 | this.node(node.value);
|
27694 |
|
27695 | if (node.important) {
|
27696 | this.chunk(node.important === true ? '!important' : '!' + node.important);
|
27697 | }
|
27698 | },
|
27699 | walkContext: 'declaration'
|
27700 | };
|
27701 |
|
27702 | function readProperty$1() {
|
27703 | var start = this.scanner.tokenStart;
|
27704 |
|
27705 |
|
27706 | if (this.scanner.tokenType === DELIM$2) {
|
27707 | switch (this.scanner.source.charCodeAt(this.scanner.tokenStart)) {
|
27708 | case ASTERISK$3:
|
27709 | case DOLLARSIGN$1:
|
27710 | case PLUSSIGN$5:
|
27711 | case NUMBERSIGN$2:
|
27712 | case AMPERSAND$1:
|
27713 | this.scanner.next();
|
27714 | break;
|
27715 |
|
27716 |
|
27717 | case SOLIDUS$2:
|
27718 | this.scanner.next();
|
27719 | if (this.scanner.isDelim(SOLIDUS$2)) {
|
27720 | this.scanner.next();
|
27721 | }
|
27722 | break;
|
27723 | }
|
27724 | }
|
27725 |
|
27726 | if (this.scanner.tokenType === HASH$1) {
|
27727 | this.eat(HASH$1);
|
27728 | } else {
|
27729 | this.eat(IDENT$7);
|
27730 | }
|
27731 |
|
27732 | return this.scanner.substrToCursor(start);
|
27733 | }
|
27734 |
|
27735 |
|
27736 | function getImportant() {
|
27737 | this.eat(DELIM$2);
|
27738 | this.scanner.skipSC();
|
27739 |
|
27740 | var important = this.consume(IDENT$7);
|
27741 |
|
27742 |
|
27743 |
|
27744 | return important === 'important' ? true : important;
|
27745 | }
|
27746 |
|
27747 | var TYPE$k = tokenizer.TYPE;
|
27748 | var rawMode$3 = Raw.mode;
|
27749 |
|
27750 | var WHITESPACE$7 = TYPE$k.WhiteSpace;
|
27751 | var COMMENT$7 = TYPE$k.Comment;
|
27752 | var SEMICOLON$4 = TYPE$k.Semicolon;
|
27753 |
|
27754 | function consumeRaw$2(startToken) {
|
27755 | return this.Raw(startToken, rawMode$3.semicolonIncluded, true);
|
27756 | }
|
27757 |
|
27758 | var DeclarationList = {
|
27759 | name: 'DeclarationList',
|
27760 | structure: {
|
27761 | children: [[
|
27762 | 'Declaration'
|
27763 | ]]
|
27764 | },
|
27765 | parse: function() {
|
27766 | var children = this.createList();
|
27767 |
|
27768 | while (!this.scanner.eof) {
|
27769 | switch (this.scanner.tokenType) {
|
27770 | case WHITESPACE$7:
|
27771 | case COMMENT$7:
|
27772 | case SEMICOLON$4:
|
27773 | this.scanner.next();
|
27774 | break;
|
27775 |
|
27776 | default:
|
27777 | children.push(this.parseWithFallback(this.Declaration, consumeRaw$2));
|
27778 | }
|
27779 | }
|
27780 |
|
27781 | return {
|
27782 | type: 'DeclarationList',
|
27783 | loc: this.getLocationFromList(children),
|
27784 | children: children
|
27785 | };
|
27786 | },
|
27787 | generate: function(node) {
|
27788 | this.children(node, function(prev) {
|
27789 | if (prev.type === 'Declaration') {
|
27790 | this.chunk(';');
|
27791 | }
|
27792 | });
|
27793 | }
|
27794 | };
|
27795 |
|
27796 | var consumeNumber$3 = utils.consumeNumber;
|
27797 | var TYPE$l = tokenizer.TYPE;
|
27798 |
|
27799 | var DIMENSION$3 = TYPE$l.Dimension;
|
27800 |
|
27801 | var Dimension = {
|
27802 | name: 'Dimension',
|
27803 | structure: {
|
27804 | value: String,
|
27805 | unit: String
|
27806 | },
|
27807 | parse: function() {
|
27808 | var start = this.scanner.tokenStart;
|
27809 | var numberEnd = consumeNumber$3(this.scanner.source, start);
|
27810 |
|
27811 | this.eat(DIMENSION$3);
|
27812 |
|
27813 | return {
|
27814 | type: 'Dimension',
|
27815 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27816 | value: this.scanner.source.substring(start, numberEnd),
|
27817 | unit: this.scanner.source.substring(numberEnd, this.scanner.tokenStart)
|
27818 | };
|
27819 | },
|
27820 | generate: function(node) {
|
27821 | this.chunk(node.value);
|
27822 | this.chunk(node.unit);
|
27823 | }
|
27824 | };
|
27825 |
|
27826 | var TYPE$m = tokenizer.TYPE;
|
27827 |
|
27828 | var RIGHTPARENTHESIS$2 = TYPE$m.RightParenthesis;
|
27829 |
|
27830 |
|
27831 | var _Function = {
|
27832 | name: 'Function',
|
27833 | structure: {
|
27834 | name: String,
|
27835 | children: [[]]
|
27836 | },
|
27837 | parse: function(readSequence, recognizer) {
|
27838 | var start = this.scanner.tokenStart;
|
27839 | var name = this.consumeFunctionName();
|
27840 | var nameLowerCase = name.toLowerCase();
|
27841 | var children;
|
27842 |
|
27843 | children = recognizer.hasOwnProperty(nameLowerCase)
|
27844 | ? recognizer[nameLowerCase].call(this, recognizer)
|
27845 | : readSequence.call(this, recognizer);
|
27846 |
|
27847 | if (!this.scanner.eof) {
|
27848 | this.eat(RIGHTPARENTHESIS$2);
|
27849 | }
|
27850 |
|
27851 | return {
|
27852 | type: 'Function',
|
27853 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27854 | name: name,
|
27855 | children: children
|
27856 | };
|
27857 | },
|
27858 | generate: function(node) {
|
27859 | this.chunk(node.name);
|
27860 | this.chunk('(');
|
27861 | this.children(node);
|
27862 | this.chunk(')');
|
27863 | },
|
27864 | walkContext: 'function'
|
27865 | };
|
27866 |
|
27867 | var TYPE$n = tokenizer.TYPE;
|
27868 |
|
27869 | var HASH$2 = TYPE$n.Hash;
|
27870 |
|
27871 |
|
27872 | var Hash = {
|
27873 | name: 'Hash',
|
27874 | structure: {
|
27875 | value: String
|
27876 | },
|
27877 | parse: function() {
|
27878 | var start = this.scanner.tokenStart;
|
27879 |
|
27880 | this.eat(HASH$2);
|
27881 |
|
27882 | return {
|
27883 | type: 'Hash',
|
27884 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27885 | value: this.scanner.substrToCursor(start + 1)
|
27886 | };
|
27887 | },
|
27888 | generate: function(node) {
|
27889 | this.chunk('#');
|
27890 | this.chunk(node.value);
|
27891 | }
|
27892 | };
|
27893 |
|
27894 | var TYPE$o = tokenizer.TYPE;
|
27895 |
|
27896 | var IDENT$8 = TYPE$o.Ident;
|
27897 |
|
27898 | var Identifier = {
|
27899 | name: 'Identifier',
|
27900 | structure: {
|
27901 | name: String
|
27902 | },
|
27903 | parse: function() {
|
27904 | return {
|
27905 | type: 'Identifier',
|
27906 | loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
|
27907 | name: this.consume(IDENT$8)
|
27908 | };
|
27909 | },
|
27910 | generate: function(node) {
|
27911 | this.chunk(node.name);
|
27912 | }
|
27913 | };
|
27914 |
|
27915 | var TYPE$p = tokenizer.TYPE;
|
27916 |
|
27917 | var HASH$3 = TYPE$p.Hash;
|
27918 |
|
27919 |
|
27920 | var IdSelector = {
|
27921 | name: 'IdSelector',
|
27922 | structure: {
|
27923 | name: String
|
27924 | },
|
27925 | parse: function() {
|
27926 | var start = this.scanner.tokenStart;
|
27927 |
|
27928 |
|
27929 | this.eat(HASH$3);
|
27930 |
|
27931 | return {
|
27932 | type: 'IdSelector',
|
27933 | loc: this.getLocation(start, this.scanner.tokenStart),
|
27934 | name: this.scanner.substrToCursor(start + 1)
|
27935 | };
|
27936 | },
|
27937 | generate: function(node) {
|
27938 | this.chunk('#');
|
27939 | this.chunk(node.name);
|
27940 | }
|
27941 | };
|
27942 |
|
27943 | var TYPE$q = tokenizer.TYPE;
|
27944 |
|
27945 | var IDENT$9 = TYPE$q.Ident;
|
27946 | var NUMBER$4 = TYPE$q.Number;
|
27947 | var DIMENSION$4 = TYPE$q.Dimension;
|
27948 | var LEFTPARENTHESIS$2 = TYPE$q.LeftParenthesis;
|
27949 | var RIGHTPARENTHESIS$3 = TYPE$q.RightParenthesis;
|
27950 | var COLON$2 = TYPE$q.Colon;
|
27951 | var DELIM$3 = TYPE$q.Delim;
|
27952 |
|
27953 | var MediaFeature = {
|
27954 | name: 'MediaFeature',
|
27955 | structure: {
|
27956 | name: String,
|
27957 | value: ['Identifier', 'Number', 'Dimension', 'Ratio', null]
|
27958 | },
|
27959 | parse: function() {
|
27960 | var start = this.scanner.tokenStart;
|
27961 | var name;
|
27962 | var value = null;
|
27963 |
|
27964 | this.eat(LEFTPARENTHESIS$2);
|
27965 | this.scanner.skipSC();
|
27966 |
|
27967 | name = this.consume(IDENT$9);
|
27968 | this.scanner.skipSC();
|
27969 |
|
27970 | if (this.scanner.tokenType !== RIGHTPARENTHESIS$3) {
|
27971 | this.eat(COLON$2);
|
27972 | this.scanner.skipSC();
|
27973 |
|
27974 | switch (this.scanner.tokenType) {
|
27975 | case NUMBER$4:
|
27976 | if (this.lookupNonWSType(1) === DELIM$3) {
|
27977 | value = this.Ratio();
|
27978 | } else {
|
27979 | value = this.Number();
|
27980 | }
|
27981 |
|
27982 | break;
|
27983 |
|
27984 | case DIMENSION$4:
|
27985 | value = this.Dimension();
|
27986 | break;
|
27987 |
|
27988 | case IDENT$9:
|
27989 | value = this.Identifier();
|
27990 |
|
27991 | break;
|
27992 |
|
27993 | default:
|
27994 | this.error('Number, dimension, ratio or identifier is expected');
|
27995 | }
|
27996 |
|
27997 | this.scanner.skipSC();
|
27998 | }
|
27999 |
|
28000 | this.eat(RIGHTPARENTHESIS$3);
|
28001 |
|
28002 | return {
|
28003 | type: 'MediaFeature',
|
28004 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28005 | name: name,
|
28006 | value: value
|
28007 | };
|
28008 | },
|
28009 | generate: function(node) {
|
28010 | this.chunk('(');
|
28011 | this.chunk(node.name);
|
28012 | if (node.value !== null) {
|
28013 | this.chunk(':');
|
28014 | this.node(node.value);
|
28015 | }
|
28016 | this.chunk(')');
|
28017 | }
|
28018 | };
|
28019 |
|
28020 | var TYPE$r = tokenizer.TYPE;
|
28021 |
|
28022 | var WHITESPACE$8 = TYPE$r.WhiteSpace;
|
28023 | var COMMENT$8 = TYPE$r.Comment;
|
28024 | var IDENT$a = TYPE$r.Ident;
|
28025 | var LEFTPARENTHESIS$3 = TYPE$r.LeftParenthesis;
|
28026 |
|
28027 | var MediaQuery = {
|
28028 | name: 'MediaQuery',
|
28029 | structure: {
|
28030 | children: [[
|
28031 | 'Identifier',
|
28032 | 'MediaFeature',
|
28033 | 'WhiteSpace'
|
28034 | ]]
|
28035 | },
|
28036 | parse: function() {
|
28037 | this.scanner.skipSC();
|
28038 |
|
28039 | var children = this.createList();
|
28040 | var child = null;
|
28041 | var space = null;
|
28042 |
|
28043 | scan:
|
28044 | while (!this.scanner.eof) {
|
28045 | switch (this.scanner.tokenType) {
|
28046 | case COMMENT$8:
|
28047 | this.scanner.next();
|
28048 | continue;
|
28049 |
|
28050 | case WHITESPACE$8:
|
28051 | space = this.WhiteSpace();
|
28052 | continue;
|
28053 |
|
28054 | case IDENT$a:
|
28055 | child = this.Identifier();
|
28056 | break;
|
28057 |
|
28058 | case LEFTPARENTHESIS$3:
|
28059 | child = this.MediaFeature();
|
28060 | break;
|
28061 |
|
28062 | default:
|
28063 | break scan;
|
28064 | }
|
28065 |
|
28066 | if (space !== null) {
|
28067 | children.push(space);
|
28068 | space = null;
|
28069 | }
|
28070 |
|
28071 | children.push(child);
|
28072 | }
|
28073 |
|
28074 | if (child === null) {
|
28075 | this.error('Identifier or parenthesis is expected');
|
28076 | }
|
28077 |
|
28078 | return {
|
28079 | type: 'MediaQuery',
|
28080 | loc: this.getLocationFromList(children),
|
28081 | children: children
|
28082 | };
|
28083 | },
|
28084 | generate: function(node) {
|
28085 | this.children(node);
|
28086 | }
|
28087 | };
|
28088 |
|
28089 | var COMMA$1 = tokenizer.TYPE.Comma;
|
28090 |
|
28091 | var MediaQueryList = {
|
28092 | name: 'MediaQueryList',
|
28093 | structure: {
|
28094 | children: [[
|
28095 | 'MediaQuery'
|
28096 | ]]
|
28097 | },
|
28098 | parse: function(relative) {
|
28099 | var children = this.createList();
|
28100 |
|
28101 | this.scanner.skipSC();
|
28102 |
|
28103 | while (!this.scanner.eof) {
|
28104 | children.push(this.MediaQuery(relative));
|
28105 |
|
28106 | if (this.scanner.tokenType !== COMMA$1) {
|
28107 | break;
|
28108 | }
|
28109 |
|
28110 | this.scanner.next();
|
28111 | }
|
28112 |
|
28113 | return {
|
28114 | type: 'MediaQueryList',
|
28115 | loc: this.getLocationFromList(children),
|
28116 | children: children
|
28117 | };
|
28118 | },
|
28119 | generate: function(node) {
|
28120 | this.children(node, function() {
|
28121 | this.chunk(',');
|
28122 | });
|
28123 | }
|
28124 | };
|
28125 |
|
28126 | var Nth = {
|
28127 | name: 'Nth',
|
28128 | structure: {
|
28129 | nth: ['AnPlusB', 'Identifier'],
|
28130 | selector: ['SelectorList', null]
|
28131 | },
|
28132 | parse: function(allowOfClause) {
|
28133 | this.scanner.skipSC();
|
28134 |
|
28135 | var start = this.scanner.tokenStart;
|
28136 | var end = start;
|
28137 | var selector = null;
|
28138 | var query;
|
28139 |
|
28140 | if (this.scanner.lookupValue(0, 'odd') || this.scanner.lookupValue(0, 'even')) {
|
28141 | query = this.Identifier();
|
28142 | } else {
|
28143 | query = this.AnPlusB();
|
28144 | }
|
28145 |
|
28146 | this.scanner.skipSC();
|
28147 |
|
28148 | if (allowOfClause && this.scanner.lookupValue(0, 'of')) {
|
28149 | this.scanner.next();
|
28150 |
|
28151 | selector = this.SelectorList();
|
28152 |
|
28153 | if (this.needPositions) {
|
28154 | end = this.getLastListNode(selector.children).loc.end.offset;
|
28155 | }
|
28156 | } else {
|
28157 | if (this.needPositions) {
|
28158 | end = query.loc.end.offset;
|
28159 | }
|
28160 | }
|
28161 |
|
28162 | return {
|
28163 | type: 'Nth',
|
28164 | loc: this.getLocation(start, end),
|
28165 | nth: query,
|
28166 | selector: selector
|
28167 | };
|
28168 | },
|
28169 | generate: function(node) {
|
28170 | this.node(node.nth);
|
28171 | if (node.selector !== null) {
|
28172 | this.chunk(' of ');
|
28173 | this.node(node.selector);
|
28174 | }
|
28175 | }
|
28176 | };
|
28177 |
|
28178 | var NUMBER$5 = tokenizer.TYPE.Number;
|
28179 |
|
28180 | var _Number = {
|
28181 | name: 'Number',
|
28182 | structure: {
|
28183 | value: String
|
28184 | },
|
28185 | parse: function() {
|
28186 | return {
|
28187 | type: 'Number',
|
28188 | loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
|
28189 | value: this.consume(NUMBER$5)
|
28190 | };
|
28191 | },
|
28192 | generate: function(node) {
|
28193 | this.chunk(node.value);
|
28194 | }
|
28195 | };
|
28196 |
|
28197 |
|
28198 | var Operator = {
|
28199 | name: 'Operator',
|
28200 | structure: {
|
28201 | value: String
|
28202 | },
|
28203 | parse: function() {
|
28204 | var start = this.scanner.tokenStart;
|
28205 |
|
28206 | this.scanner.next();
|
28207 |
|
28208 | return {
|
28209 | type: 'Operator',
|
28210 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28211 | value: this.scanner.substrToCursor(start)
|
28212 | };
|
28213 | },
|
28214 | generate: function(node) {
|
28215 | this.chunk(node.value);
|
28216 | }
|
28217 | };
|
28218 |
|
28219 | var TYPE$s = tokenizer.TYPE;
|
28220 |
|
28221 | var LEFTPARENTHESIS$4 = TYPE$s.LeftParenthesis;
|
28222 | var RIGHTPARENTHESIS$4 = TYPE$s.RightParenthesis;
|
28223 |
|
28224 | var Parentheses = {
|
28225 | name: 'Parentheses',
|
28226 | structure: {
|
28227 | children: [[]]
|
28228 | },
|
28229 | parse: function(readSequence, recognizer) {
|
28230 | var start = this.scanner.tokenStart;
|
28231 | var children = null;
|
28232 |
|
28233 | this.eat(LEFTPARENTHESIS$4);
|
28234 |
|
28235 | children = readSequence.call(this, recognizer);
|
28236 |
|
28237 | if (!this.scanner.eof) {
|
28238 | this.eat(RIGHTPARENTHESIS$4);
|
28239 | }
|
28240 |
|
28241 | return {
|
28242 | type: 'Parentheses',
|
28243 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28244 | children: children
|
28245 | };
|
28246 | },
|
28247 | generate: function(node) {
|
28248 | this.chunk('(');
|
28249 | this.children(node);
|
28250 | this.chunk(')');
|
28251 | }
|
28252 | };
|
28253 |
|
28254 | var consumeNumber$4 = utils.consumeNumber;
|
28255 | var TYPE$t = tokenizer.TYPE;
|
28256 |
|
28257 | var PERCENTAGE$1 = TYPE$t.Percentage;
|
28258 |
|
28259 | var Percentage = {
|
28260 | name: 'Percentage',
|
28261 | structure: {
|
28262 | value: String
|
28263 | },
|
28264 | parse: function() {
|
28265 | var start = this.scanner.tokenStart;
|
28266 | var numberEnd = consumeNumber$4(this.scanner.source, start);
|
28267 |
|
28268 | this.eat(PERCENTAGE$1);
|
28269 |
|
28270 | return {
|
28271 | type: 'Percentage',
|
28272 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28273 | value: this.scanner.source.substring(start, numberEnd)
|
28274 | };
|
28275 | },
|
28276 | generate: function(node) {
|
28277 | this.chunk(node.value);
|
28278 | this.chunk('%');
|
28279 | }
|
28280 | };
|
28281 |
|
28282 | var TYPE$u = tokenizer.TYPE;
|
28283 |
|
28284 | var IDENT$b = TYPE$u.Ident;
|
28285 | var FUNCTION$1 = TYPE$u.Function;
|
28286 | var COLON$3 = TYPE$u.Colon;
|
28287 | var RIGHTPARENTHESIS$5 = TYPE$u.RightParenthesis;
|
28288 |
|
28289 |
|
28290 | var PseudoClassSelector = {
|
28291 | name: 'PseudoClassSelector',
|
28292 | structure: {
|
28293 | name: String,
|
28294 | children: [['Raw'], null]
|
28295 | },
|
28296 | parse: function() {
|
28297 | var start = this.scanner.tokenStart;
|
28298 | var children = null;
|
28299 | var name;
|
28300 | var nameLowerCase;
|
28301 |
|
28302 | this.eat(COLON$3);
|
28303 |
|
28304 | if (this.scanner.tokenType === FUNCTION$1) {
|
28305 | name = this.consumeFunctionName();
|
28306 | nameLowerCase = name.toLowerCase();
|
28307 |
|
28308 | if (this.pseudo.hasOwnProperty(nameLowerCase)) {
|
28309 | this.scanner.skipSC();
|
28310 | children = this.pseudo[nameLowerCase].call(this);
|
28311 | this.scanner.skipSC();
|
28312 | } else {
|
28313 | children = this.createList();
|
28314 | children.push(
|
28315 | this.Raw(this.scanner.tokenIndex, null, false)
|
28316 | );
|
28317 | }
|
28318 |
|
28319 | this.eat(RIGHTPARENTHESIS$5);
|
28320 | } else {
|
28321 | name = this.consume(IDENT$b);
|
28322 | }
|
28323 |
|
28324 | return {
|
28325 | type: 'PseudoClassSelector',
|
28326 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28327 | name: name,
|
28328 | children: children
|
28329 | };
|
28330 | },
|
28331 | generate: function(node) {
|
28332 | this.chunk(':');
|
28333 | this.chunk(node.name);
|
28334 |
|
28335 | if (node.children !== null) {
|
28336 | this.chunk('(');
|
28337 | this.children(node);
|
28338 | this.chunk(')');
|
28339 | }
|
28340 | },
|
28341 | walkContext: 'function'
|
28342 | };
|
28343 |
|
28344 | var TYPE$v = tokenizer.TYPE;
|
28345 |
|
28346 | var IDENT$c = TYPE$v.Ident;
|
28347 | var FUNCTION$2 = TYPE$v.Function;
|
28348 | var COLON$4 = TYPE$v.Colon;
|
28349 | var RIGHTPARENTHESIS$6 = TYPE$v.RightParenthesis;
|
28350 |
|
28351 |
|
28352 | var PseudoElementSelector = {
|
28353 | name: 'PseudoElementSelector',
|
28354 | structure: {
|
28355 | name: String,
|
28356 | children: [['Raw'], null]
|
28357 | },
|
28358 | parse: function() {
|
28359 | var start = this.scanner.tokenStart;
|
28360 | var children = null;
|
28361 | var name;
|
28362 | var nameLowerCase;
|
28363 |
|
28364 | this.eat(COLON$4);
|
28365 | this.eat(COLON$4);
|
28366 |
|
28367 | if (this.scanner.tokenType === FUNCTION$2) {
|
28368 | name = this.consumeFunctionName();
|
28369 | nameLowerCase = name.toLowerCase();
|
28370 |
|
28371 | if (this.pseudo.hasOwnProperty(nameLowerCase)) {
|
28372 | this.scanner.skipSC();
|
28373 | children = this.pseudo[nameLowerCase].call(this);
|
28374 | this.scanner.skipSC();
|
28375 | } else {
|
28376 | children = this.createList();
|
28377 | children.push(
|
28378 | this.Raw(this.scanner.tokenIndex, null, false)
|
28379 | );
|
28380 | }
|
28381 |
|
28382 | this.eat(RIGHTPARENTHESIS$6);
|
28383 | } else {
|
28384 | name = this.consume(IDENT$c);
|
28385 | }
|
28386 |
|
28387 | return {
|
28388 | type: 'PseudoElementSelector',
|
28389 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28390 | name: name,
|
28391 | children: children
|
28392 | };
|
28393 | },
|
28394 | generate: function(node) {
|
28395 | this.chunk('::');
|
28396 | this.chunk(node.name);
|
28397 |
|
28398 | if (node.children !== null) {
|
28399 | this.chunk('(');
|
28400 | this.children(node);
|
28401 | this.chunk(')');
|
28402 | }
|
28403 | },
|
28404 | walkContext: 'function'
|
28405 | };
|
28406 |
|
28407 | var isDigit$5 = tokenizer.isDigit;
|
28408 | var TYPE$w = tokenizer.TYPE;
|
28409 |
|
28410 | var NUMBER$6 = TYPE$w.Number;
|
28411 | var DELIM$4 = TYPE$w.Delim;
|
28412 | var SOLIDUS$3 = 0x002F;
|
28413 | var FULLSTOP$1 = 0x002E;
|
28414 |
|
28415 |
|
28416 |
|
28417 |
|
28418 |
|
28419 |
|
28420 |
|
28421 | function consumeNumber$5() {
|
28422 | this.scanner.skipWS();
|
28423 |
|
28424 | var value = this.consume(NUMBER$6);
|
28425 |
|
28426 | for (var i = 0; i < value.length; i++) {
|
28427 | var code = value.charCodeAt(i);
|
28428 | if (!isDigit$5(code) && code !== FULLSTOP$1) {
|
28429 | this.error('Unsigned number is expected', this.scanner.tokenStart - value.length + i);
|
28430 | }
|
28431 | }
|
28432 |
|
28433 | if (Number(value) === 0) {
|
28434 | this.error('Zero number is not allowed', this.scanner.tokenStart - value.length);
|
28435 | }
|
28436 |
|
28437 | return value;
|
28438 | }
|
28439 |
|
28440 |
|
28441 | var Ratio = {
|
28442 | name: 'Ratio',
|
28443 | structure: {
|
28444 | left: String,
|
28445 | right: String
|
28446 | },
|
28447 | parse: function() {
|
28448 | var start = this.scanner.tokenStart;
|
28449 | var left = consumeNumber$5.call(this);
|
28450 | var right;
|
28451 |
|
28452 | this.scanner.skipWS();
|
28453 |
|
28454 | if (!this.scanner.isDelim(SOLIDUS$3)) {
|
28455 | this.error('Solidus is expected');
|
28456 | }
|
28457 | this.eat(DELIM$4);
|
28458 | right = consumeNumber$5.call(this);
|
28459 |
|
28460 | return {
|
28461 | type: 'Ratio',
|
28462 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28463 | left: left,
|
28464 | right: right
|
28465 | };
|
28466 | },
|
28467 | generate: function(node) {
|
28468 | this.chunk(node.left);
|
28469 | this.chunk('/');
|
28470 | this.chunk(node.right);
|
28471 | }
|
28472 | };
|
28473 |
|
28474 | var TYPE$x = tokenizer.TYPE;
|
28475 | var rawMode$4 = Raw.mode;
|
28476 |
|
28477 | var LEFTCURLYBRACKET$4 = TYPE$x.LeftCurlyBracket;
|
28478 |
|
28479 | function consumeRaw$3(startToken) {
|
28480 | return this.Raw(startToken, rawMode$4.leftCurlyBracket, true);
|
28481 | }
|
28482 |
|
28483 | function consumePrelude() {
|
28484 | var prelude = this.SelectorList();
|
28485 |
|
28486 | if (prelude.type !== 'Raw' &&
|
28487 | this.scanner.eof === false &&
|
28488 | this.scanner.tokenType !== LEFTCURLYBRACKET$4) {
|
28489 | this.error();
|
28490 | }
|
28491 |
|
28492 | return prelude;
|
28493 | }
|
28494 |
|
28495 | var Rule = {
|
28496 | name: 'Rule',
|
28497 | structure: {
|
28498 | prelude: ['SelectorList', 'Raw'],
|
28499 | block: ['Block']
|
28500 | },
|
28501 | parse: function() {
|
28502 | var startToken = this.scanner.tokenIndex;
|
28503 | var startOffset = this.scanner.tokenStart;
|
28504 | var prelude;
|
28505 | var block;
|
28506 |
|
28507 | if (this.parseRulePrelude) {
|
28508 | prelude = this.parseWithFallback(consumePrelude, consumeRaw$3);
|
28509 | } else {
|
28510 | prelude = consumeRaw$3.call(this, startToken);
|
28511 | }
|
28512 |
|
28513 | block = this.Block(true);
|
28514 |
|
28515 | return {
|
28516 | type: 'Rule',
|
28517 | loc: this.getLocation(startOffset, this.scanner.tokenStart),
|
28518 | prelude: prelude,
|
28519 | block: block
|
28520 | };
|
28521 | },
|
28522 | generate: function(node) {
|
28523 | this.node(node.prelude);
|
28524 | this.node(node.block);
|
28525 | },
|
28526 | walkContext: 'rule'
|
28527 | };
|
28528 |
|
28529 | var Selector = {
|
28530 | name: 'Selector',
|
28531 | structure: {
|
28532 | children: [[
|
28533 | 'TypeSelector',
|
28534 | 'IdSelector',
|
28535 | 'ClassSelector',
|
28536 | 'AttributeSelector',
|
28537 | 'PseudoClassSelector',
|
28538 | 'PseudoElementSelector',
|
28539 | 'Combinator',
|
28540 | 'WhiteSpace'
|
28541 | ]]
|
28542 | },
|
28543 | parse: function() {
|
28544 | var children = this.readSequence(this.scope.Selector);
|
28545 |
|
28546 |
|
28547 | if (this.getFirstListNode(children) === null) {
|
28548 | this.error('Selector is expected');
|
28549 | }
|
28550 |
|
28551 | return {
|
28552 | type: 'Selector',
|
28553 | loc: this.getLocationFromList(children),
|
28554 | children: children
|
28555 | };
|
28556 | },
|
28557 | generate: function(node) {
|
28558 | this.children(node);
|
28559 | }
|
28560 | };
|
28561 |
|
28562 | var TYPE$y = tokenizer.TYPE;
|
28563 |
|
28564 | var COMMA$2 = TYPE$y.Comma;
|
28565 |
|
28566 | var SelectorList = {
|
28567 | name: 'SelectorList',
|
28568 | structure: {
|
28569 | children: [[
|
28570 | 'Selector',
|
28571 | 'Raw'
|
28572 | ]]
|
28573 | },
|
28574 | parse: function() {
|
28575 | var children = this.createList();
|
28576 |
|
28577 | while (!this.scanner.eof) {
|
28578 | children.push(this.Selector());
|
28579 |
|
28580 | if (this.scanner.tokenType === COMMA$2) {
|
28581 | this.scanner.next();
|
28582 | continue;
|
28583 | }
|
28584 |
|
28585 | break;
|
28586 | }
|
28587 |
|
28588 | return {
|
28589 | type: 'SelectorList',
|
28590 | loc: this.getLocationFromList(children),
|
28591 | children: children
|
28592 | };
|
28593 | },
|
28594 | generate: function(node) {
|
28595 | this.children(node, function() {
|
28596 | this.chunk(',');
|
28597 | });
|
28598 | },
|
28599 | walkContext: 'selector'
|
28600 | };
|
28601 |
|
28602 | var STRING$1 = tokenizer.TYPE.String;
|
28603 |
|
28604 | var _String = {
|
28605 | name: 'String',
|
28606 | structure: {
|
28607 | value: String
|
28608 | },
|
28609 | parse: function() {
|
28610 | return {
|
28611 | type: 'String',
|
28612 | loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
|
28613 | value: this.consume(STRING$1)
|
28614 | };
|
28615 | },
|
28616 | generate: function(node) {
|
28617 | this.chunk(node.value);
|
28618 | }
|
28619 | };
|
28620 |
|
28621 | var TYPE$z = tokenizer.TYPE;
|
28622 |
|
28623 | var WHITESPACE$9 = TYPE$z.WhiteSpace;
|
28624 | var COMMENT$9 = TYPE$z.Comment;
|
28625 | var ATKEYWORD$2 = TYPE$z.AtKeyword;
|
28626 | var CDO$1 = TYPE$z.CDO;
|
28627 | var CDC$1 = TYPE$z.CDC;
|
28628 | var EXCLAMATIONMARK$3 = 0x0021;
|
28629 |
|
28630 | function consumeRaw$4(startToken) {
|
28631 | return this.Raw(startToken, null, false);
|
28632 | }
|
28633 |
|
28634 | var StyleSheet = {
|
28635 | name: 'StyleSheet',
|
28636 | structure: {
|
28637 | children: [[
|
28638 | 'Comment',
|
28639 | 'CDO',
|
28640 | 'CDC',
|
28641 | 'Atrule',
|
28642 | 'Rule',
|
28643 | 'Raw'
|
28644 | ]]
|
28645 | },
|
28646 | parse: function() {
|
28647 | var start = this.scanner.tokenStart;
|
28648 | var children = this.createList();
|
28649 | var child;
|
28650 |
|
28651 | while (!this.scanner.eof) {
|
28652 | switch (this.scanner.tokenType) {
|
28653 | case WHITESPACE$9:
|
28654 | this.scanner.next();
|
28655 | continue;
|
28656 |
|
28657 | case COMMENT$9:
|
28658 |
|
28659 | if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 2) !== EXCLAMATIONMARK$3) {
|
28660 | this.scanner.next();
|
28661 | continue;
|
28662 | }
|
28663 |
|
28664 | child = this.Comment();
|
28665 | break;
|
28666 |
|
28667 | case CDO$1:
|
28668 | child = this.CDO();
|
28669 | break;
|
28670 |
|
28671 | case CDC$1:
|
28672 | child = this.CDC();
|
28673 | break;
|
28674 |
|
28675 |
|
28676 |
|
28677 |
|
28678 | case ATKEYWORD$2:
|
28679 | child = this.parseWithFallback(this.Atrule, consumeRaw$4);
|
28680 | break;
|
28681 |
|
28682 |
|
28683 | default:
|
28684 | child = this.parseWithFallback(this.Rule, consumeRaw$4);
|
28685 | }
|
28686 |
|
28687 | children.push(child);
|
28688 | }
|
28689 |
|
28690 | return {
|
28691 | type: 'StyleSheet',
|
28692 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28693 | children: children
|
28694 | };
|
28695 | },
|
28696 | generate: function(node) {
|
28697 | this.children(node);
|
28698 | },
|
28699 | walkContext: 'stylesheet'
|
28700 | };
|
28701 |
|
28702 | var TYPE$A = tokenizer.TYPE;
|
28703 |
|
28704 | var IDENT$d = TYPE$A.Ident;
|
28705 | var ASTERISK$4 = 0x002A;
|
28706 | var VERTICALLINE$2 = 0x007C;
|
28707 |
|
28708 | function eatIdentifierOrAsterisk() {
|
28709 | if (this.scanner.tokenType !== IDENT$d &&
|
28710 | this.scanner.isDelim(ASTERISK$4) === false) {
|
28711 | this.error('Identifier or asterisk is expected');
|
28712 | }
|
28713 |
|
28714 | this.scanner.next();
|
28715 | }
|
28716 |
|
28717 |
|
28718 |
|
28719 |
|
28720 |
|
28721 |
|
28722 |
|
28723 |
|
28724 |
|
28725 | var TypeSelector = {
|
28726 | name: 'TypeSelector',
|
28727 | structure: {
|
28728 | name: String
|
28729 | },
|
28730 | parse: function() {
|
28731 | var start = this.scanner.tokenStart;
|
28732 |
|
28733 | if (this.scanner.isDelim(VERTICALLINE$2)) {
|
28734 | this.scanner.next();
|
28735 | eatIdentifierOrAsterisk.call(this);
|
28736 | } else {
|
28737 | eatIdentifierOrAsterisk.call(this);
|
28738 |
|
28739 | if (this.scanner.isDelim(VERTICALLINE$2)) {
|
28740 | this.scanner.next();
|
28741 | eatIdentifierOrAsterisk.call(this);
|
28742 | }
|
28743 | }
|
28744 |
|
28745 | return {
|
28746 | type: 'TypeSelector',
|
28747 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28748 | name: this.scanner.substrToCursor(start)
|
28749 | };
|
28750 | },
|
28751 | generate: function(node) {
|
28752 | this.chunk(node.name);
|
28753 | }
|
28754 | };
|
28755 |
|
28756 | var isHexDigit$4 = tokenizer.isHexDigit;
|
28757 | var cmpChar$4 = tokenizer.cmpChar;
|
28758 | var TYPE$B = tokenizer.TYPE;
|
28759 | var NAME$3 = tokenizer.NAME;
|
28760 |
|
28761 | var IDENT$e = TYPE$B.Ident;
|
28762 | var NUMBER$7 = TYPE$B.Number;
|
28763 | var DIMENSION$5 = TYPE$B.Dimension;
|
28764 | var PLUSSIGN$6 = 0x002B;
|
28765 | var HYPHENMINUS$4 = 0x002D;
|
28766 | var QUESTIONMARK$2 = 0x003F;
|
28767 | var U$1 = 0x0075;
|
28768 |
|
28769 | function eatHexSequence(offset, allowDash) {
|
28770 | for (var pos = this.scanner.tokenStart + offset, len = 0; pos < this.scanner.tokenEnd; pos++) {
|
28771 | var code = this.scanner.source.charCodeAt(pos);
|
28772 |
|
28773 | if (code === HYPHENMINUS$4 && allowDash && len !== 0) {
|
28774 | if (eatHexSequence.call(this, offset + len + 1, false) === 0) {
|
28775 | this.error();
|
28776 | }
|
28777 |
|
28778 | return -1;
|
28779 | }
|
28780 |
|
28781 | if (!isHexDigit$4(code)) {
|
28782 | this.error(
|
28783 | allowDash && len !== 0
|
28784 | ? 'HyphenMinus' + (len < 6 ? ' or hex digit' : '') + ' is expected'
|
28785 | : (len < 6 ? 'Hex digit is expected' : 'Unexpected input'),
|
28786 | pos
|
28787 | );
|
28788 | }
|
28789 |
|
28790 | if (++len > 6) {
|
28791 | this.error('Too many hex digits', pos);
|
28792 | } }
|
28793 |
|
28794 | this.scanner.next();
|
28795 | return len;
|
28796 | }
|
28797 |
|
28798 | function eatQuestionMarkSequence(max) {
|
28799 | var count = 0;
|
28800 |
|
28801 | while (this.scanner.isDelim(QUESTIONMARK$2)) {
|
28802 | if (++count > max) {
|
28803 | this.error('Too many question marks');
|
28804 | }
|
28805 |
|
28806 | this.scanner.next();
|
28807 | }
|
28808 | }
|
28809 |
|
28810 | function startsWith$1(code) {
|
28811 | if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== code) {
|
28812 | this.error(NAME$3[code] + ' is expected');
|
28813 | }
|
28814 | }
|
28815 |
|
28816 |
|
28817 |
|
28818 |
|
28819 |
|
28820 |
|
28821 |
|
28822 |
|
28823 |
|
28824 |
|
28825 |
|
28826 |
|
28827 |
|
28828 |
|
28829 |
|
28830 |
|
28831 |
|
28832 |
|
28833 |
|
28834 |
|
28835 | function scanUnicodeRange() {
|
28836 | var hexLength = 0;
|
28837 |
|
28838 |
|
28839 |
|
28840 | if (this.scanner.isDelim(PLUSSIGN$6)) {
|
28841 | this.scanner.next();
|
28842 |
|
28843 | if (this.scanner.tokenType === IDENT$e) {
|
28844 | hexLength = eatHexSequence.call(this, 0, true);
|
28845 | if (hexLength > 0) {
|
28846 | eatQuestionMarkSequence.call(this, 6 - hexLength);
|
28847 | }
|
28848 | return;
|
28849 | }
|
28850 |
|
28851 | if (this.scanner.isDelim(QUESTIONMARK$2)) {
|
28852 | this.scanner.next();
|
28853 | eatQuestionMarkSequence.call(this, 5);
|
28854 | return;
|
28855 | }
|
28856 |
|
28857 | this.error('Hex digit or question mark is expected');
|
28858 | return;
|
28859 | }
|
28860 |
|
28861 |
|
28862 |
|
28863 |
|
28864 | if (this.scanner.tokenType === NUMBER$7) {
|
28865 | startsWith$1.call(this, PLUSSIGN$6);
|
28866 | hexLength = eatHexSequence.call(this, 1, true);
|
28867 |
|
28868 | if (this.scanner.isDelim(QUESTIONMARK$2)) {
|
28869 | eatQuestionMarkSequence.call(this, 6 - hexLength);
|
28870 | return;
|
28871 | }
|
28872 |
|
28873 | if (this.scanner.tokenType === DIMENSION$5 ||
|
28874 | this.scanner.tokenType === NUMBER$7) {
|
28875 | startsWith$1.call(this, HYPHENMINUS$4);
|
28876 | eatHexSequence.call(this, 1, false);
|
28877 | return;
|
28878 | }
|
28879 |
|
28880 | return;
|
28881 | }
|
28882 |
|
28883 |
|
28884 | if (this.scanner.tokenType === DIMENSION$5) {
|
28885 | startsWith$1.call(this, PLUSSIGN$6);
|
28886 | hexLength = eatHexSequence.call(this, 1, true);
|
28887 |
|
28888 | if (hexLength > 0) {
|
28889 | eatQuestionMarkSequence.call(this, 6 - hexLength);
|
28890 | }
|
28891 |
|
28892 | return;
|
28893 | }
|
28894 |
|
28895 | this.error();
|
28896 | }
|
28897 |
|
28898 | var UnicodeRange = {
|
28899 | name: 'UnicodeRange',
|
28900 | structure: {
|
28901 | value: String
|
28902 | },
|
28903 | parse: function() {
|
28904 | var start = this.scanner.tokenStart;
|
28905 |
|
28906 |
|
28907 | if (!cmpChar$4(this.scanner.source, start, U$1)) {
|
28908 | this.error('U is expected');
|
28909 | }
|
28910 |
|
28911 | if (!cmpChar$4(this.scanner.source, start + 1, PLUSSIGN$6)) {
|
28912 | this.error('Plus sign is expected');
|
28913 | }
|
28914 |
|
28915 | this.scanner.next();
|
28916 | scanUnicodeRange.call(this);
|
28917 |
|
28918 | return {
|
28919 | type: 'UnicodeRange',
|
28920 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28921 | value: this.scanner.substrToCursor(start)
|
28922 | };
|
28923 | },
|
28924 | generate: function(node) {
|
28925 | this.chunk(node.value);
|
28926 | }
|
28927 | };
|
28928 |
|
28929 | var isWhiteSpace$2 = tokenizer.isWhiteSpace;
|
28930 | var cmpStr$5 = tokenizer.cmpStr;
|
28931 | var TYPE$C = tokenizer.TYPE;
|
28932 |
|
28933 | var FUNCTION$3 = TYPE$C.Function;
|
28934 | var URL$1 = TYPE$C.Url;
|
28935 | var RIGHTPARENTHESIS$7 = TYPE$C.RightParenthesis;
|
28936 |
|
28937 |
|
28938 | var Url = {
|
28939 | name: 'Url',
|
28940 | structure: {
|
28941 | value: ['String', 'Raw']
|
28942 | },
|
28943 | parse: function() {
|
28944 | var start = this.scanner.tokenStart;
|
28945 | var value;
|
28946 |
|
28947 | switch (this.scanner.tokenType) {
|
28948 | case URL$1:
|
28949 | var rawStart = start + 4;
|
28950 | var rawEnd = this.scanner.tokenEnd - 1;
|
28951 |
|
28952 | while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawStart))) {
|
28953 | rawStart++;
|
28954 | }
|
28955 |
|
28956 | while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawEnd - 1))) {
|
28957 | rawEnd--;
|
28958 | }
|
28959 |
|
28960 | value = {
|
28961 | type: 'Raw',
|
28962 | loc: this.getLocation(rawStart, rawEnd),
|
28963 | value: this.scanner.source.substring(rawStart, rawEnd)
|
28964 | };
|
28965 |
|
28966 | this.eat(URL$1);
|
28967 | break;
|
28968 |
|
28969 | case FUNCTION$3:
|
28970 | if (!cmpStr$5(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')) {
|
28971 | this.error('Function name must be `url`');
|
28972 | }
|
28973 |
|
28974 | this.eat(FUNCTION$3);
|
28975 | this.scanner.skipSC();
|
28976 | value = this.String();
|
28977 | this.scanner.skipSC();
|
28978 | this.eat(RIGHTPARENTHESIS$7);
|
28979 | break;
|
28980 |
|
28981 | default:
|
28982 | this.error('Url or Function is expected');
|
28983 | }
|
28984 |
|
28985 | return {
|
28986 | type: 'Url',
|
28987 | loc: this.getLocation(start, this.scanner.tokenStart),
|
28988 | value: value
|
28989 | };
|
28990 | },
|
28991 | generate: function(node) {
|
28992 | this.chunk('url');
|
28993 | this.chunk('(');
|
28994 | this.node(node.value);
|
28995 | this.chunk(')');
|
28996 | }
|
28997 | };
|
28998 |
|
28999 | var Value = {
|
29000 | name: 'Value',
|
29001 | structure: {
|
29002 | children: [[]]
|
29003 | },
|
29004 | parse: function() {
|
29005 | var start = this.scanner.tokenStart;
|
29006 | var children = this.readSequence(this.scope.Value);
|
29007 |
|
29008 | return {
|
29009 | type: 'Value',
|
29010 | loc: this.getLocation(start, this.scanner.tokenStart),
|
29011 | children: children
|
29012 | };
|
29013 | },
|
29014 | generate: function(node) {
|
29015 | this.children(node);
|
29016 | }
|
29017 | };
|
29018 |
|
29019 | var WHITESPACE$a = tokenizer.TYPE.WhiteSpace;
|
29020 | var SPACE$2 = Object.freeze({
|
29021 | type: 'WhiteSpace',
|
29022 | loc: null,
|
29023 | value: ' '
|
29024 | });
|
29025 |
|
29026 | var WhiteSpace$1 = {
|
29027 | name: 'WhiteSpace',
|
29028 | structure: {
|
29029 | value: String
|
29030 | },
|
29031 | parse: function() {
|
29032 | this.eat(WHITESPACE$a);
|
29033 | return SPACE$2;
|
29034 |
|
29035 |
|
29036 |
|
29037 |
|
29038 |
|
29039 |
|
29040 | },
|
29041 | generate: function(node) {
|
29042 | this.chunk(node.value);
|
29043 | }
|
29044 | };
|
29045 |
|
29046 | var node = {
|
29047 | AnPlusB: AnPlusB,
|
29048 | Atrule: Atrule,
|
29049 | AtrulePrelude: AtrulePrelude,
|
29050 | AttributeSelector: AttributeSelector,
|
29051 | Block: Block,
|
29052 | Brackets: Brackets,
|
29053 | CDC: CDC_1,
|
29054 | CDO: CDO_1,
|
29055 | ClassSelector: ClassSelector,
|
29056 | Combinator: Combinator,
|
29057 | Comment: Comment,
|
29058 | Declaration: Declaration,
|
29059 | DeclarationList: DeclarationList,
|
29060 | Dimension: Dimension,
|
29061 | Function: _Function,
|
29062 | Hash: Hash,
|
29063 | Identifier: Identifier,
|
29064 | IdSelector: IdSelector,
|
29065 | MediaFeature: MediaFeature,
|
29066 | MediaQuery: MediaQuery,
|
29067 | MediaQueryList: MediaQueryList,
|
29068 | Nth: Nth,
|
29069 | Number: _Number,
|
29070 | Operator: Operator,
|
29071 | Parentheses: Parentheses,
|
29072 | Percentage: Percentage,
|
29073 | PseudoClassSelector: PseudoClassSelector,
|
29074 | PseudoElementSelector: PseudoElementSelector,
|
29075 | Ratio: Ratio,
|
29076 | Raw: Raw,
|
29077 | Rule: Rule,
|
29078 | Selector: Selector,
|
29079 | SelectorList: SelectorList,
|
29080 | String: _String,
|
29081 | StyleSheet: StyleSheet,
|
29082 | TypeSelector: TypeSelector,
|
29083 | UnicodeRange: UnicodeRange,
|
29084 | Url: Url,
|
29085 | Value: Value,
|
29086 | WhiteSpace: WhiteSpace$1
|
29087 | };
|
29088 |
|
29089 | var lexer = {
|
29090 | generic: true,
|
29091 | types: data.types,
|
29092 | atrules: data.atrules,
|
29093 | properties: data.properties,
|
29094 | node: node
|
29095 | };
|
29096 |
|
29097 | var cmpChar$5 = tokenizer.cmpChar;
|
29098 | var cmpStr$6 = tokenizer.cmpStr;
|
29099 | var TYPE$D = tokenizer.TYPE;
|
29100 |
|
29101 | var IDENT$f = TYPE$D.Ident;
|
29102 | var STRING$2 = TYPE$D.String;
|
29103 | var NUMBER$8 = TYPE$D.Number;
|
29104 | var FUNCTION$4 = TYPE$D.Function;
|
29105 | var URL$2 = TYPE$D.Url;
|
29106 | var HASH$4 = TYPE$D.Hash;
|
29107 | var DIMENSION$6 = TYPE$D.Dimension;
|
29108 | var PERCENTAGE$2 = TYPE$D.Percentage;
|
29109 | var LEFTPARENTHESIS$5 = TYPE$D.LeftParenthesis;
|
29110 | var LEFTSQUAREBRACKET$3 = TYPE$D.LeftSquareBracket;
|
29111 | var COMMA$3 = TYPE$D.Comma;
|
29112 | var DELIM$5 = TYPE$D.Delim;
|
29113 | var NUMBERSIGN$3 = 0x0023;
|
29114 | var ASTERISK$5 = 0x002A;
|
29115 | var PLUSSIGN$7 = 0x002B;
|
29116 | var HYPHENMINUS$5 = 0x002D;
|
29117 | var SOLIDUS$4 = 0x002F;
|
29118 | var U$2 = 0x0075;
|
29119 |
|
29120 | var _default = function defaultRecognizer(context) {
|
29121 | switch (this.scanner.tokenType) {
|
29122 | case HASH$4:
|
29123 | return this.Hash();
|
29124 |
|
29125 | case COMMA$3:
|
29126 | context.space = null;
|
29127 | context.ignoreWSAfter = true;
|
29128 | return this.Operator();
|
29129 |
|
29130 | case LEFTPARENTHESIS$5:
|
29131 | return this.Parentheses(this.readSequence, context.recognizer);
|
29132 |
|
29133 | case LEFTSQUAREBRACKET$3:
|
29134 | return this.Brackets(this.readSequence, context.recognizer);
|
29135 |
|
29136 | case STRING$2:
|
29137 | return this.String();
|
29138 |
|
29139 | case DIMENSION$6:
|
29140 | return this.Dimension();
|
29141 |
|
29142 | case PERCENTAGE$2:
|
29143 | return this.Percentage();
|
29144 |
|
29145 | case NUMBER$8:
|
29146 | return this.Number();
|
29147 |
|
29148 | case FUNCTION$4:
|
29149 | return cmpStr$6(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')
|
29150 | ? this.Url()
|
29151 | : this.Function(this.readSequence, context.recognizer);
|
29152 |
|
29153 | case URL$2:
|
29154 | return this.Url();
|
29155 |
|
29156 | case IDENT$f:
|
29157 |
|
29158 | if (cmpChar$5(this.scanner.source, this.scanner.tokenStart, U$2) &&
|
29159 | cmpChar$5(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN$7)) {
|
29160 | return this.UnicodeRange();
|
29161 | } else {
|
29162 | return this.Identifier();
|
29163 | }
|
29164 |
|
29165 | case DELIM$5:
|
29166 | var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
29167 |
|
29168 | if (code === SOLIDUS$4 ||
|
29169 | code === ASTERISK$5 ||
|
29170 | code === PLUSSIGN$7 ||
|
29171 | code === HYPHENMINUS$5) {
|
29172 | return this.Operator();
|
29173 | }
|
29174 |
|
29175 |
|
29176 |
|
29177 | if (code === NUMBERSIGN$3) {
|
29178 | this.error('Hex or identifier is expected', this.scanner.tokenStart + 1);
|
29179 | }
|
29180 |
|
29181 | break;
|
29182 | }
|
29183 | };
|
29184 |
|
29185 | var atrulePrelude = {
|
29186 | getNode: _default
|
29187 | };
|
29188 |
|
29189 | var TYPE$E = tokenizer.TYPE;
|
29190 |
|
29191 | var DELIM$6 = TYPE$E.Delim;
|
29192 | var IDENT$g = TYPE$E.Ident;
|
29193 | var DIMENSION$7 = TYPE$E.Dimension;
|
29194 | var PERCENTAGE$3 = TYPE$E.Percentage;
|
29195 | var NUMBER$9 = TYPE$E.Number;
|
29196 | var HASH$5 = TYPE$E.Hash;
|
29197 | var COLON$5 = TYPE$E.Colon;
|
29198 | var LEFTSQUAREBRACKET$4 = TYPE$E.LeftSquareBracket;
|
29199 | var NUMBERSIGN$4 = 0x0023;
|
29200 | var ASTERISK$6 = 0x002A;
|
29201 | var PLUSSIGN$8 = 0x002B;
|
29202 | var SOLIDUS$5 = 0x002F;
|
29203 | var FULLSTOP$2 = 0x002E;
|
29204 | var GREATERTHANSIGN$2 = 0x003E;
|
29205 | var VERTICALLINE$3 = 0x007C;
|
29206 | var TILDE$2 = 0x007E;
|
29207 |
|
29208 | function getNode(context) {
|
29209 | switch (this.scanner.tokenType) {
|
29210 | case LEFTSQUAREBRACKET$4:
|
29211 | return this.AttributeSelector();
|
29212 |
|
29213 | case HASH$5:
|
29214 | return this.IdSelector();
|
29215 |
|
29216 | case COLON$5:
|
29217 | if (this.scanner.lookupType(1) === COLON$5) {
|
29218 | return this.PseudoElementSelector();
|
29219 | } else {
|
29220 | return this.PseudoClassSelector();
|
29221 | }
|
29222 |
|
29223 | case IDENT$g:
|
29224 | return this.TypeSelector();
|
29225 |
|
29226 | case NUMBER$9:
|
29227 | case PERCENTAGE$3:
|
29228 | return this.Percentage();
|
29229 |
|
29230 | case DIMENSION$7:
|
29231 |
|
29232 | if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP$2) {
|
29233 | this.error('Identifier is expected', this.scanner.tokenStart + 1);
|
29234 | }
|
29235 | break;
|
29236 |
|
29237 | case DELIM$6:
|
29238 | var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
|
29239 |
|
29240 | switch (code) {
|
29241 | case PLUSSIGN$8:
|
29242 | case GREATERTHANSIGN$2:
|
29243 | case TILDE$2:
|
29244 | context.space = null;
|
29245 | context.ignoreWSAfter = true;
|
29246 | return this.Combinator();
|
29247 |
|
29248 | case SOLIDUS$5:
|
29249 | return this.Combinator();
|
29250 |
|
29251 | case FULLSTOP$2:
|
29252 | return this.ClassSelector();
|
29253 |
|
29254 | case ASTERISK$6:
|
29255 | case VERTICALLINE$3:
|
29256 | return this.TypeSelector();
|
29257 |
|
29258 | case NUMBERSIGN$4:
|
29259 | return this.IdSelector();
|
29260 | }
|
29261 |
|
29262 | break;
|
29263 | }
|
29264 | }
|
29265 | var selector = {
|
29266 | getNode: getNode
|
29267 | };
|
29268 |
|
29269 |
|
29270 |
|
29271 | var expression = function() {
|
29272 | return this.createSingleNodeList(
|
29273 | this.Raw(this.scanner.tokenIndex, null, false)
|
29274 | );
|
29275 | };
|
29276 |
|
29277 | var TYPE$F = tokenizer.TYPE;
|
29278 | var rawMode$5 = Raw.mode;
|
29279 |
|
29280 | var COMMA$4 = TYPE$F.Comma;
|
29281 | var WHITESPACE$b = TYPE$F.WhiteSpace;
|
29282 |
|
29283 |
|
29284 | var _var = function() {
|
29285 | var children = this.createList();
|
29286 |
|
29287 | this.scanner.skipSC();
|
29288 |
|
29289 |
|
29290 | children.push(this.Identifier());
|
29291 |
|
29292 | this.scanner.skipSC();
|
29293 |
|
29294 | if (this.scanner.tokenType === COMMA$4) {
|
29295 | children.push(this.Operator());
|
29296 |
|
29297 | const startIndex = this.scanner.tokenIndex;
|
29298 | const value = this.parseCustomProperty
|
29299 | ? this.Value(null)
|
29300 | : this.Raw(this.scanner.tokenIndex, rawMode$5.exclamationMarkOrSemicolon, false);
|
29301 |
|
29302 | if (value.type === 'Value' && value.children.isEmpty()) {
|
29303 | for (let offset = startIndex - this.scanner.tokenIndex; offset <= 0; offset++) {
|
29304 | if (this.scanner.lookupType(offset) === WHITESPACE$b) {
|
29305 | value.children.appendData({
|
29306 | type: 'WhiteSpace',
|
29307 | loc: null,
|
29308 | value: ' '
|
29309 | });
|
29310 | break;
|
29311 | }
|
29312 | }
|
29313 | }
|
29314 |
|
29315 | children.push(value);
|
29316 | }
|
29317 |
|
29318 | return children;
|
29319 | };
|
29320 |
|
29321 | var value = {
|
29322 | getNode: _default,
|
29323 | 'expression': expression,
|
29324 | 'var': _var
|
29325 | };
|
29326 |
|
29327 | var scope = {
|
29328 | AtrulePrelude: atrulePrelude,
|
29329 | Selector: selector,
|
29330 | Value: value
|
29331 | };
|
29332 |
|
29333 | var fontFace = {
|
29334 | parse: {
|
29335 | prelude: null,
|
29336 | block: function() {
|
29337 | return this.Block(true);
|
29338 | }
|
29339 | }
|
29340 | };
|
29341 |
|
29342 | var TYPE$G = tokenizer.TYPE;
|
29343 |
|
29344 | var STRING$3 = TYPE$G.String;
|
29345 | var IDENT$h = TYPE$G.Ident;
|
29346 | var URL$3 = TYPE$G.Url;
|
29347 | var FUNCTION$5 = TYPE$G.Function;
|
29348 | var LEFTPARENTHESIS$6 = TYPE$G.LeftParenthesis;
|
29349 |
|
29350 | var _import = {
|
29351 | parse: {
|
29352 | prelude: function() {
|
29353 | var children = this.createList();
|
29354 |
|
29355 | this.scanner.skipSC();
|
29356 |
|
29357 | switch (this.scanner.tokenType) {
|
29358 | case STRING$3:
|
29359 | children.push(this.String());
|
29360 | break;
|
29361 |
|
29362 | case URL$3:
|
29363 | case FUNCTION$5:
|
29364 | children.push(this.Url());
|
29365 | break;
|
29366 |
|
29367 | default:
|
29368 | this.error('String or url() is expected');
|
29369 | }
|
29370 |
|
29371 | if (this.lookupNonWSType(0) === IDENT$h ||
|
29372 | this.lookupNonWSType(0) === LEFTPARENTHESIS$6) {
|
29373 | children.push(this.WhiteSpace());
|
29374 | children.push(this.MediaQueryList());
|
29375 | }
|
29376 |
|
29377 | return children;
|
29378 | },
|
29379 | block: null
|
29380 | }
|
29381 | };
|
29382 |
|
29383 | var media = {
|
29384 | parse: {
|
29385 | prelude: function() {
|
29386 | return this.createSingleNodeList(
|
29387 | this.MediaQueryList()
|
29388 | );
|
29389 | },
|
29390 | block: function() {
|
29391 | return this.Block(false);
|
29392 | }
|
29393 | }
|
29394 | };
|
29395 |
|
29396 | var page = {
|
29397 | parse: {
|
29398 | prelude: function() {
|
29399 | return this.createSingleNodeList(
|
29400 | this.SelectorList()
|
29401 | );
|
29402 | },
|
29403 | block: function() {
|
29404 | return this.Block(true);
|
29405 | }
|
29406 | }
|
29407 | };
|
29408 |
|
29409 | var TYPE$H = tokenizer.TYPE;
|
29410 |
|
29411 | var WHITESPACE$c = TYPE$H.WhiteSpace;
|
29412 | var COMMENT$a = TYPE$H.Comment;
|
29413 | var IDENT$i = TYPE$H.Ident;
|
29414 | var FUNCTION$6 = TYPE$H.Function;
|
29415 | var COLON$6 = TYPE$H.Colon;
|
29416 | var LEFTPARENTHESIS$7 = TYPE$H.LeftParenthesis;
|
29417 |
|
29418 | function consumeRaw$5() {
|
29419 | return this.createSingleNodeList(
|
29420 | this.Raw(this.scanner.tokenIndex, null, false)
|
29421 | );
|
29422 | }
|
29423 |
|
29424 | function parentheses() {
|
29425 | this.scanner.skipSC();
|
29426 |
|
29427 | if (this.scanner.tokenType === IDENT$i &&
|
29428 | this.lookupNonWSType(1) === COLON$6) {
|
29429 | return this.createSingleNodeList(
|
29430 | this.Declaration()
|
29431 | );
|
29432 | }
|
29433 |
|
29434 | return readSequence.call(this);
|
29435 | }
|
29436 |
|
29437 | function readSequence() {
|
29438 | var children = this.createList();
|
29439 | var space = null;
|
29440 | var child;
|
29441 |
|
29442 | this.scanner.skipSC();
|
29443 |
|
29444 | scan:
|
29445 | while (!this.scanner.eof) {
|
29446 | switch (this.scanner.tokenType) {
|
29447 | case WHITESPACE$c:
|
29448 | space = this.WhiteSpace();
|
29449 | continue;
|
29450 |
|
29451 | case COMMENT$a:
|
29452 | this.scanner.next();
|
29453 | continue;
|
29454 |
|
29455 | case FUNCTION$6:
|
29456 | child = this.Function(consumeRaw$5, this.scope.AtrulePrelude);
|
29457 | break;
|
29458 |
|
29459 | case IDENT$i:
|
29460 | child = this.Identifier();
|
29461 | break;
|
29462 |
|
29463 | case LEFTPARENTHESIS$7:
|
29464 | child = this.Parentheses(parentheses, this.scope.AtrulePrelude);
|
29465 | break;
|
29466 |
|
29467 | default:
|
29468 | break scan;
|
29469 | }
|
29470 |
|
29471 | if (space !== null) {
|
29472 | children.push(space);
|
29473 | space = null;
|
29474 | }
|
29475 |
|
29476 | children.push(child);
|
29477 | }
|
29478 |
|
29479 | return children;
|
29480 | }
|
29481 |
|
29482 | var supports = {
|
29483 | parse: {
|
29484 | prelude: function() {
|
29485 | var children = readSequence.call(this);
|
29486 |
|
29487 | if (this.getFirstListNode(children) === null) {
|
29488 | this.error('Condition is expected');
|
29489 | }
|
29490 |
|
29491 | return children;
|
29492 | },
|
29493 | block: function() {
|
29494 | return this.Block(false);
|
29495 | }
|
29496 | }
|
29497 | };
|
29498 |
|
29499 | var atrule = {
|
29500 | 'font-face': fontFace,
|
29501 | 'import': _import,
|
29502 | 'media': media,
|
29503 | 'page': page,
|
29504 | 'supports': supports
|
29505 | };
|
29506 |
|
29507 | var dir = {
|
29508 | parse: function() {
|
29509 | return this.createSingleNodeList(
|
29510 | this.Identifier()
|
29511 | );
|
29512 | }
|
29513 | };
|
29514 |
|
29515 | var has$1 = {
|
29516 | parse: function() {
|
29517 | return this.createSingleNodeList(
|
29518 | this.SelectorList()
|
29519 | );
|
29520 | }
|
29521 | };
|
29522 |
|
29523 | var lang = {
|
29524 | parse: function() {
|
29525 | return this.createSingleNodeList(
|
29526 | this.Identifier()
|
29527 | );
|
29528 | }
|
29529 | };
|
29530 |
|
29531 | var selectorList = {
|
29532 | parse: function selectorList() {
|
29533 | return this.createSingleNodeList(
|
29534 | this.SelectorList()
|
29535 | );
|
29536 | }
|
29537 | };
|
29538 |
|
29539 | var matches = selectorList;
|
29540 |
|
29541 | var not = selectorList;
|
29542 |
|
29543 | var ALLOW_OF_CLAUSE = true;
|
29544 |
|
29545 | var nthWithOfClause = {
|
29546 | parse: function nthWithOfClause() {
|
29547 | return this.createSingleNodeList(
|
29548 | this.Nth(ALLOW_OF_CLAUSE)
|
29549 | );
|
29550 | }
|
29551 | };
|
29552 |
|
29553 | var nthChild = nthWithOfClause;
|
29554 |
|
29555 | var nthLastChild = nthWithOfClause;
|
29556 |
|
29557 | var DISALLOW_OF_CLAUSE = false;
|
29558 |
|
29559 | var nth$1 = {
|
29560 | parse: function nth() {
|
29561 | return this.createSingleNodeList(
|
29562 | this.Nth(DISALLOW_OF_CLAUSE)
|
29563 | );
|
29564 | }
|
29565 | };
|
29566 |
|
29567 | var nthLastOfType = nth$1;
|
29568 |
|
29569 | var nthOfType = nth$1;
|
29570 |
|
29571 | var slotted = {
|
29572 | parse: function compoundSelector() {
|
29573 | return this.createSingleNodeList(
|
29574 | this.Selector()
|
29575 | );
|
29576 | }
|
29577 | };
|
29578 |
|
29579 | var pseudo = {
|
29580 | 'dir': dir,
|
29581 | 'has': has$1,
|
29582 | 'lang': lang,
|
29583 | 'matches': matches,
|
29584 | 'not': not,
|
29585 | 'nth-child': nthChild,
|
29586 | 'nth-last-child': nthLastChild,
|
29587 | 'nth-last-of-type': nthLastOfType,
|
29588 | 'nth-of-type': nthOfType,
|
29589 | 'slotted': slotted
|
29590 | };
|
29591 |
|
29592 | var parser = {
|
29593 | parseContext: {
|
29594 | default: 'StyleSheet',
|
29595 | stylesheet: 'StyleSheet',
|
29596 | atrule: 'Atrule',
|
29597 | atrulePrelude: function(options) {
|
29598 | return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);
|
29599 | },
|
29600 | mediaQueryList: 'MediaQueryList',
|
29601 | mediaQuery: 'MediaQuery',
|
29602 | rule: 'Rule',
|
29603 | selectorList: 'SelectorList',
|
29604 | selector: 'Selector',
|
29605 | block: function() {
|
29606 | return this.Block(true);
|
29607 | },
|
29608 | declarationList: 'DeclarationList',
|
29609 | declaration: 'Declaration',
|
29610 | value: 'Value'
|
29611 | },
|
29612 | scope: scope,
|
29613 | atrule: atrule,
|
29614 | pseudo: pseudo,
|
29615 | node: node
|
29616 | };
|
29617 |
|
29618 | var walker = {
|
29619 | node: node
|
29620 | };
|
29621 |
|
29622 | var _args = [
|
29623 | [
|
29624 | "css-tree@1.1.2",
|
29625 | "/Users/bogdancadkin/host/svgo"
|
29626 | ]
|
29627 | ];
|
29628 | var _from = "css-tree@1.1.2";
|
29629 | var _id = "css-tree@1.1.2";
|
29630 | var _inBundle = false;
|
29631 | var _integrity = "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==";
|
29632 | var _location = "/css-tree";
|
29633 | var _phantomChildren = {
|
29634 | };
|
29635 | var _requested = {
|
29636 | type: "version",
|
29637 | registry: true,
|
29638 | raw: "css-tree@1.1.2",
|
29639 | name: "css-tree",
|
29640 | escapedName: "css-tree",
|
29641 | rawSpec: "1.1.2",
|
29642 | saveSpec: null,
|
29643 | fetchSpec: "1.1.2"
|
29644 | };
|
29645 | var _requiredBy = [
|
29646 | "/",
|
29647 | "/csso"
|
29648 | ];
|
29649 | var _resolved = "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz";
|
29650 | var _spec = "1.1.2";
|
29651 | var _where = "/Users/bogdancadkin/host/svgo";
|
29652 | var author = {
|
29653 | name: "Roman Dvornov",
|
29654 | email: "rdvornov@gmail.com",
|
29655 | url: "https://github.com/lahmatiy"
|
29656 | };
|
29657 | var bugs = {
|
29658 | url: "https://github.com/csstree/csstree/issues"
|
29659 | };
|
29660 | var dependencies = {
|
29661 | "mdn-data": "2.0.14",
|
29662 | "source-map": "^0.6.1"
|
29663 | };
|
29664 | var description$e = "A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations";
|
29665 | var devDependencies = {
|
29666 | "@rollup/plugin-commonjs": "^11.0.2",
|
29667 | "@rollup/plugin-json": "^4.0.2",
|
29668 | "@rollup/plugin-node-resolve": "^7.1.1",
|
29669 | coveralls: "^3.0.9",
|
29670 | eslint: "^6.8.0",
|
29671 | "json-to-ast": "^2.1.0",
|
29672 | mocha: "^6.2.3",
|
29673 | nyc: "^14.1.1",
|
29674 | rollup: "^1.32.1",
|
29675 | "rollup-plugin-terser": "^5.3.0"
|
29676 | };
|
29677 | var engines = {
|
29678 | node: ">=8.0.0"
|
29679 | };
|
29680 | var files = [
|
29681 | "data",
|
29682 | "dist",
|
29683 | "lib"
|
29684 | ];
|
29685 | var homepage = "https://github.com/csstree/csstree#readme";
|
29686 | var jsdelivr = "dist/csstree.min.js";
|
29687 | var keywords$1 = [
|
29688 | "css",
|
29689 | "ast",
|
29690 | "tokenizer",
|
29691 | "parser",
|
29692 | "walker",
|
29693 | "lexer",
|
29694 | "generator",
|
29695 | "utils",
|
29696 | "syntax",
|
29697 | "validation"
|
29698 | ];
|
29699 | var license = "MIT";
|
29700 | var main = "lib/index.js";
|
29701 | var name = "css-tree";
|
29702 | var repository = {
|
29703 | type: "git",
|
29704 | url: "git+https://github.com/csstree/csstree.git"
|
29705 | };
|
29706 | var scripts = {
|
29707 | build: "rollup --config",
|
29708 | coverage: "nyc npm test",
|
29709 | coveralls: "nyc report --reporter=text-lcov | coveralls",
|
29710 | hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null",
|
29711 | lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
|
29712 | "lint-and-test": "npm run lint && npm test",
|
29713 | prepublishOnly: "npm run build",
|
29714 | "review:syntax-patch": "node scripts/review-syntax-patch",
|
29715 | test: "mocha --reporter progress",
|
29716 | travis: "nyc npm run lint-and-test && npm run coveralls",
|
29717 | "update:docs": "node scripts/update-docs"
|
29718 | };
|
29719 | var unpkg = "dist/csstree.min.js";
|
29720 | var version = "1.1.2";
|
29721 | var require$$4 = {
|
29722 | _args: _args,
|
29723 | _from: _from,
|
29724 | _id: _id,
|
29725 | _inBundle: _inBundle,
|
29726 | _integrity: _integrity,
|
29727 | _location: _location,
|
29728 | _phantomChildren: _phantomChildren,
|
29729 | _requested: _requested,
|
29730 | _requiredBy: _requiredBy,
|
29731 | _resolved: _resolved,
|
29732 | _spec: _spec,
|
29733 | _where: _where,
|
29734 | author: author,
|
29735 | bugs: bugs,
|
29736 | dependencies: dependencies,
|
29737 | description: description$e,
|
29738 | devDependencies: devDependencies,
|
29739 | engines: engines,
|
29740 | files: files,
|
29741 | homepage: homepage,
|
29742 | jsdelivr: jsdelivr,
|
29743 | keywords: keywords$1,
|
29744 | license: license,
|
29745 | main: main,
|
29746 | name: name,
|
29747 | repository: repository,
|
29748 | scripts: scripts,
|
29749 | unpkg: unpkg,
|
29750 | version: version
|
29751 | };
|
29752 |
|
29753 | function merge() {
|
29754 | var dest = {};
|
29755 |
|
29756 | for (var i = 0; i < arguments.length; i++) {
|
29757 | var src = arguments[i];
|
29758 | for (var key in src) {
|
29759 | dest[key] = src[key];
|
29760 | }
|
29761 | }
|
29762 |
|
29763 | return dest;
|
29764 | }
|
29765 |
|
29766 | var syntax = create$4.create(
|
29767 | merge(
|
29768 | lexer,
|
29769 | parser,
|
29770 | walker
|
29771 | )
|
29772 | );
|
29773 | var version$1 = require$$4.version;
|
29774 | syntax.version = version$1;
|
29775 |
|
29776 | var lib = syntax;
|
29777 |
|
29778 | var stable = createCommonjsModule(function (module, exports) {
|
29779 |
|
29780 |
|
29781 |
|
29782 | (function (global, factory) {
|
29783 | module.exports = factory() ;
|
29784 | }(commonjsGlobal, (function () {
|
29785 |
|
29786 |
|
29787 |
|
29788 | var stable = function (arr, comp) {
|
29789 | return exec(arr.slice(), comp)
|
29790 | };
|
29791 |
|
29792 | stable.inplace = function (arr, comp) {
|
29793 | var result = exec(arr, comp);
|
29794 |
|
29795 |
|
29796 |
|
29797 | if (result !== arr) {
|
29798 | pass(result, null, arr.length, arr);
|
29799 | }
|
29800 |
|
29801 | return arr
|
29802 | };
|
29803 |
|
29804 |
|
29805 |
|
29806 | function exec(arr, comp) {
|
29807 | if (typeof(comp) !== 'function') {
|
29808 | comp = function (a, b) {
|
29809 | return String(a).localeCompare(b)
|
29810 | };
|
29811 | }
|
29812 |
|
29813 |
|
29814 | var len = arr.length;
|
29815 | if (len <= 1) {
|
29816 | return arr
|
29817 | }
|
29818 |
|
29819 |
|
29820 |
|
29821 |
|
29822 | var buffer = new Array(len);
|
29823 | for (var chk = 1; chk < len; chk *= 2) {
|
29824 | pass(arr, comp, chk, buffer);
|
29825 |
|
29826 | var tmp = arr;
|
29827 | arr = buffer;
|
29828 | buffer = tmp;
|
29829 | }
|
29830 |
|
29831 | return arr
|
29832 | }
|
29833 |
|
29834 |
|
29835 | var pass = function (arr, comp, chk, result) {
|
29836 | var len = arr.length;
|
29837 | var i = 0;
|
29838 |
|
29839 | var dbl = chk * 2;
|
29840 |
|
29841 | var l, r, e;
|
29842 |
|
29843 | var li, ri;
|
29844 |
|
29845 |
|
29846 | for (l = 0; l < len; l += dbl) {
|
29847 | r = l + chk;
|
29848 | e = r + chk;
|
29849 | if (r > len) r = len;
|
29850 | if (e > len) e = len;
|
29851 |
|
29852 |
|
29853 | li = l;
|
29854 | ri = r;
|
29855 | while (true) {
|
29856 |
|
29857 | if (li < r && ri < e) {
|
29858 |
|
29859 |
|
29860 | if (comp(arr[li], arr[ri]) <= 0) {
|
29861 | result[i++] = arr[li++];
|
29862 | }
|
29863 | else {
|
29864 | result[i++] = arr[ri++];
|
29865 | }
|
29866 | }
|
29867 |
|
29868 | else if (li < r) {
|
29869 | result[i++] = arr[li++];
|
29870 | }
|
29871 | else if (ri < e) {
|
29872 | result[i++] = arr[ri++];
|
29873 | }
|
29874 |
|
29875 | else {
|
29876 | break
|
29877 | }
|
29878 | }
|
29879 | }
|
29880 | };
|
29881 |
|
29882 | return stable;
|
29883 |
|
29884 | })));
|
29885 | });
|
29886 |
|
29887 | var specificity = function specificity(simpleSelector) {
|
29888 | var A = 0;
|
29889 | var B = 0;
|
29890 | var C = 0;
|
29891 |
|
29892 | simpleSelector.children.each(function walk(node) {
|
29893 | switch (node.type) {
|
29894 | case 'SelectorList':
|
29895 | case 'Selector':
|
29896 | node.children.each(walk);
|
29897 | break;
|
29898 |
|
29899 | case 'IdSelector':
|
29900 | A++;
|
29901 | break;
|
29902 |
|
29903 | case 'ClassSelector':
|
29904 | case 'AttributeSelector':
|
29905 | B++;
|
29906 | break;
|
29907 |
|
29908 | case 'PseudoClassSelector':
|
29909 | switch (node.name.toLowerCase()) {
|
29910 | case 'not':
|
29911 | node.children.each(walk);
|
29912 | break;
|
29913 |
|
29914 | case 'before':
|
29915 | case 'after':
|
29916 | case 'first-line':
|
29917 | case 'first-letter':
|
29918 | C++;
|
29919 | break;
|
29920 |
|
29921 |
|
29922 | default:
|
29923 | B++;
|
29924 | }
|
29925 | break;
|
29926 |
|
29927 | case 'PseudoElementSelector':
|
29928 | C++;
|
29929 | break;
|
29930 |
|
29931 | case 'TypeSelector':
|
29932 |
|
29933 | if (node.name.charAt(node.name.length - 1) !== '*') {
|
29934 | C++;
|
29935 | }
|
29936 | break;
|
29937 |
|
29938 | }
|
29939 | });
|
29940 |
|
29941 | return [A, B, C];
|
29942 | };
|
29943 |
|
29944 | var List$1 = lib.List;
|
29945 |
|
29946 |
|
29947 |
|
29948 |
|
29949 |
|
29950 |
|
29951 |
|
29952 |
|
29953 | function flattenToSelectors(cssAst) {
|
29954 | var selectors = [];
|
29955 |
|
29956 | lib.walk(cssAst, {visit: 'Rule', enter: function(node) {
|
29957 | if (node.type !== 'Rule') {
|
29958 | return;
|
29959 | }
|
29960 |
|
29961 | var atrule = this.atrule;
|
29962 | var rule = node;
|
29963 |
|
29964 | node.prelude.children.each(function(selectorNode, selectorItem) {
|
29965 | var selector = {
|
29966 | item: selectorItem,
|
29967 | atrule: atrule,
|
29968 | rule: rule,
|
29969 | pseudos: []
|
29970 | };
|
29971 |
|
29972 | selectorNode.children.each(function(selectorChildNode, selectorChildItem, selectorChildList) {
|
29973 | if (selectorChildNode.type === 'PseudoClassSelector' ||
|
29974 | selectorChildNode.type === 'PseudoElementSelector') {
|
29975 | selector.pseudos.push({
|
29976 | item: selectorChildItem,
|
29977 | list: selectorChildList
|
29978 | });
|
29979 | }
|
29980 | });
|
29981 |
|
29982 | selectors.push(selector);
|
29983 | });
|
29984 | }});
|
29985 |
|
29986 | return selectors;
|
29987 | }
|
29988 |
|
29989 |
|
29990 |
|
29991 |
|
29992 |
|
29993 |
|
29994 |
|
29995 |
|
29996 | function filterByMqs(selectors, useMqs) {
|
29997 | return selectors.filter(function(selector) {
|
29998 | if (selector.atrule === null) {
|
29999 | return ~useMqs.indexOf('');
|
30000 | }
|
30001 |
|
30002 | var mqName = selector.atrule.name;
|
30003 | var mqStr = mqName;
|
30004 | if (selector.atrule.expression &&
|
30005 | selector.atrule.expression.children.first().type === 'MediaQueryList') {
|
30006 | var mqExpr = lib.generate(selector.atrule.expression);
|
30007 | mqStr = [mqName, mqExpr].join(' ');
|
30008 | }
|
30009 |
|
30010 | return ~useMqs.indexOf(mqStr);
|
30011 | });
|
30012 | }
|
30013 |
|
30014 |
|
30015 |
|
30016 |
|
30017 |
|
30018 |
|
30019 |
|
30020 |
|
30021 | function filterByPseudos(selectors, usePseudos) {
|
30022 | return selectors.filter(function(selector) {
|
30023 | var pseudoSelectorsStr = lib.generate({
|
30024 | type: 'Selector',
|
30025 | children: new List$1().fromArray(selector.pseudos.map(function(pseudo) {
|
30026 | return pseudo.item.data;
|
30027 | }))
|
30028 | });
|
30029 | return ~usePseudos.indexOf(pseudoSelectorsStr);
|
30030 | });
|
30031 | }
|
30032 |
|
30033 |
|
30034 |
|
30035 |
|
30036 |
|
30037 |
|
30038 |
|
30039 | function cleanPseudos(selectors) {
|
30040 | selectors.forEach(function(selector) {
|
30041 | selector.pseudos.forEach(function(pseudo) {
|
30042 | pseudo.list.remove(pseudo.item);
|
30043 | });
|
30044 | });
|
30045 | }
|
30046 |
|
30047 |
|
30048 |
|
30049 |
|
30050 |
|
30051 |
|
30052 |
|
30053 |
|
30054 |
|
30055 |
|
30056 | function compareSpecificity(aSpecificity, bSpecificity) {
|
30057 | for (var i = 0; i < 4; i += 1) {
|
30058 | if (aSpecificity[i] < bSpecificity[i]) {
|
30059 | return -1;
|
30060 | } else if (aSpecificity[i] > bSpecificity[i]) {
|
30061 | return 1;
|
30062 | }
|
30063 | }
|
30064 |
|
30065 | return 0;
|
30066 | }
|
30067 |
|
30068 |
|
30069 |
|
30070 |
|
30071 |
|
30072 |
|
30073 |
|
30074 |
|
30075 |
|
30076 | function compareSimpleSelectorNode(aSimpleSelectorNode, bSimpleSelectorNode) {
|
30077 | var aSpecificity = specificity(aSimpleSelectorNode),
|
30078 | bSpecificity = specificity(bSimpleSelectorNode);
|
30079 | return compareSpecificity(aSpecificity, bSpecificity);
|
30080 | }
|
30081 |
|
30082 | function _bySelectorSpecificity(selectorA, selectorB) {
|
30083 | return compareSimpleSelectorNode(selectorA.item.data, selectorB.item.data);
|
30084 | }
|
30085 |
|
30086 |
|
30087 |
|
30088 |
|
30089 |
|
30090 |
|
30091 |
|
30092 |
|
30093 | function sortSelectors(selectors) {
|
30094 | return stable(selectors, _bySelectorSpecificity);
|
30095 | }
|
30096 |
|
30097 |
|
30098 |
|
30099 |
|
30100 |
|
30101 |
|
30102 |
|
30103 |
|
30104 | function csstreeToStyleDeclaration(declaration) {
|
30105 | var propertyName = declaration.property,
|
30106 | propertyValue = lib.generate(declaration.value),
|
30107 | propertyPriority = (declaration.important ? 'important' : '');
|
30108 | return {
|
30109 | name: propertyName,
|
30110 | value: propertyValue,
|
30111 | priority: propertyPriority
|
30112 | };
|
30113 | }
|
30114 |
|
30115 |
|
30116 |
|
30117 |
|
30118 |
|
30119 |
|
30120 |
|
30121 |
|
30122 | function getCssStr(elem) {
|
30123 | return elem.content[0].text || elem.content[0].cdata || [];
|
30124 | }
|
30125 |
|
30126 |
|
30127 |
|
30128 |
|
30129 |
|
30130 |
|
30131 |
|
30132 |
|
30133 | function setCssStr(elem, css) {
|
30134 |
|
30135 | if(elem.content[0].cdata) {
|
30136 | elem.content[0].cdata = css;
|
30137 | return elem.content[0].cdata;
|
30138 | }
|
30139 |
|
30140 |
|
30141 | elem.content[0].text = css;
|
30142 | return elem.content[0].text;
|
30143 | }
|
30144 |
|
30145 |
|
30146 | var flattenToSelectors_1 = flattenToSelectors;
|
30147 |
|
30148 | var filterByMqs_1 = filterByMqs;
|
30149 | var filterByPseudos_1 = filterByPseudos;
|
30150 | var cleanPseudos_1 = cleanPseudos;
|
30151 |
|
30152 | var compareSpecificity_1 = compareSpecificity;
|
30153 | var compareSimpleSelectorNode_1 = compareSimpleSelectorNode;
|
30154 |
|
30155 | var sortSelectors_1 = sortSelectors;
|
30156 |
|
30157 | var csstreeToStyleDeclaration_1 = csstreeToStyleDeclaration;
|
30158 |
|
30159 | var getCssStr_1 = getCssStr;
|
30160 | var setCssStr_1 = setCssStr;
|
30161 |
|
30162 | var cssTools = {
|
30163 | flattenToSelectors: flattenToSelectors_1,
|
30164 | filterByMqs: filterByMqs_1,
|
30165 | filterByPseudos: filterByPseudos_1,
|
30166 | cleanPseudos: cleanPseudos_1,
|
30167 | compareSpecificity: compareSpecificity_1,
|
30168 | compareSimpleSelectorNode: compareSimpleSelectorNode_1,
|
30169 | sortSelectors: sortSelectors_1,
|
30170 | csstreeToStyleDeclaration: csstreeToStyleDeclaration_1,
|
30171 | getCssStr: getCssStr_1,
|
30172 | setCssStr: setCssStr_1
|
30173 | };
|
30174 |
|
30175 | var type$e = 'full';
|
30176 |
|
30177 | var active$e = true;
|
30178 |
|
30179 | var params$9 = {
|
30180 | onlyMatchedOnce: true,
|
30181 | removeMatchedSelectors: true,
|
30182 | useMqs: ['', 'screen'],
|
30183 | usePseudos: ['']
|
30184 | };
|
30185 |
|
30186 | var description$f = 'inline styles (additional options)';
|
30187 |
|
30188 |
|
30189 |
|
30190 |
|
30191 |
|
30192 |
|
30193 |
|
30194 |
|
30195 |
|
30196 |
|
30197 |
|
30198 |
|
30199 |
|
30200 |
|
30201 |
|
30202 |
|
30203 |
|
30204 |
|
30205 |
|
30206 |
|
30207 |
|
30208 |
|
30209 |
|
30210 |
|
30211 |
|
30212 |
|
30213 |
|
30214 |
|
30215 | var fn$e = function(document, opts) {
|
30216 |
|
30217 |
|
30218 | var styleEls = document.querySelectorAll('style');
|
30219 |
|
30220 |
|
30221 | if (styleEls === null) {
|
30222 | return document;
|
30223 | }
|
30224 |
|
30225 | var styles = [],
|
30226 | selectors = [];
|
30227 |
|
30228 | for (var styleEl of styleEls) {
|
30229 | if (styleEl.isEmpty() || styleEl.closestElem('foreignObject')) {
|
30230 |
|
30231 | continue;
|
30232 | }
|
30233 |
|
30234 | var cssStr = cssTools.getCssStr(styleEl);
|
30235 |
|
30236 |
|
30237 | var cssAst = {};
|
30238 | try {
|
30239 | cssAst = lib.parse(cssStr, {
|
30240 | parseValue: false,
|
30241 | parseCustomProperty: false
|
30242 | });
|
30243 | } catch (parseError) {
|
30244 |
|
30245 | continue;
|
30246 | }
|
30247 |
|
30248 | styles.push({
|
30249 | styleEl: styleEl,
|
30250 | cssAst: cssAst
|
30251 | });
|
30252 |
|
30253 | selectors = selectors.concat(cssTools.flattenToSelectors(cssAst));
|
30254 | }
|
30255 |
|
30256 |
|
30257 |
|
30258 | var selectorsMq = cssTools.filterByMqs(selectors, opts.useMqs);
|
30259 |
|
30260 |
|
30261 |
|
30262 | var selectorsPseudo = cssTools.filterByPseudos(selectorsMq, opts.usePseudos);
|
30263 |
|
30264 |
|
30265 | cssTools.cleanPseudos(selectorsPseudo);
|
30266 |
|
30267 |
|
30268 |
|
30269 | var sortedSelectors = cssTools.sortSelectors(selectorsPseudo).reverse();
|
30270 |
|
30271 |
|
30272 | var selector,
|
30273 | selectedEl;
|
30274 |
|
30275 |
|
30276 | for (selector of sortedSelectors) {
|
30277 | var selectorStr = lib.generate(selector.item.data),
|
30278 | selectedEls = null;
|
30279 |
|
30280 | try {
|
30281 | selectedEls = document.querySelectorAll(selectorStr);
|
30282 | } catch (selectError) {
|
30283 |
|
30284 | continue;
|
30285 | }
|
30286 |
|
30287 | if (selectedEls === null) {
|
30288 |
|
30289 | continue;
|
30290 | }
|
30291 |
|
30292 | selector.selectedEls = selectedEls;
|
30293 | }
|
30294 |
|
30295 |
|
30296 |
|
30297 | for (selector of sortedSelectors) {
|
30298 | if(!selector.selectedEls) {
|
30299 | continue;
|
30300 | }
|
30301 |
|
30302 | if (opts.onlyMatchedOnce && selector.selectedEls !== null && selector.selectedEls.length > 1) {
|
30303 |
|
30304 | continue;
|
30305 | }
|
30306 |
|
30307 |
|
30308 | for (selectedEl of selector.selectedEls) {
|
30309 | if (selector.rule === null) {
|
30310 | continue;
|
30311 | }
|
30312 |
|
30313 |
|
30314 | lib.walk(selector.rule, {visit: 'Declaration', enter: function(styleCsstreeDeclaration) {
|
30315 |
|
30316 |
|
30317 |
|
30318 |
|
30319 |
|
30320 | var styleDeclaration = cssTools.csstreeToStyleDeclaration(styleCsstreeDeclaration);
|
30321 | if (selectedEl.style.getPropertyValue(styleDeclaration.name) !== null &&
|
30322 | selectedEl.style.getPropertyPriority(styleDeclaration.name) >= styleDeclaration.priority) {
|
30323 | return;
|
30324 | }
|
30325 | selectedEl.style.setProperty(styleDeclaration.name, styleDeclaration.value, styleDeclaration.priority);
|
30326 | }});
|
30327 | }
|
30328 |
|
30329 | if (opts.removeMatchedSelectors && selector.selectedEls !== null && selector.selectedEls.length > 0) {
|
30330 |
|
30331 | selector.rule.prelude.children.remove(selector.item);
|
30332 | }
|
30333 | }
|
30334 |
|
30335 |
|
30336 | if (!opts.removeMatchedSelectors) {
|
30337 | return document;
|
30338 | }
|
30339 |
|
30340 |
|
30341 |
|
30342 | for (selector of sortedSelectors) {
|
30343 | if(!selector.selectedEls) {
|
30344 | continue;
|
30345 | }
|
30346 |
|
30347 | if (opts.onlyMatchedOnce && selector.selectedEls !== null && selector.selectedEls.length > 1) {
|
30348 |
|
30349 | continue;
|
30350 | }
|
30351 |
|
30352 | for (selectedEl of selector.selectedEls) {
|
30353 |
|
30354 | var firstSubSelector = selector.item.data.children.first();
|
30355 | if(firstSubSelector.type === 'ClassSelector') {
|
30356 | selectedEl.class.remove(firstSubSelector.name);
|
30357 | }
|
30358 |
|
30359 | if(typeof selectedEl.class.item(0) === 'undefined') {
|
30360 | selectedEl.removeAttr('class');
|
30361 | }
|
30362 |
|
30363 |
|
30364 | if(firstSubSelector.type === 'IdSelector') {
|
30365 | selectedEl.removeAttr('id', firstSubSelector.name);
|
30366 | }
|
30367 | }
|
30368 | }
|
30369 |
|
30370 |
|
30371 |
|
30372 | for (var style of styles) {
|
30373 | lib.walk(style.cssAst, {visit: 'Rule', enter: function(node, item, list) {
|
30374 |
|
30375 | if (node.type === 'Atrule' &&
|
30376 |
|
30377 | node.block !== null &&
|
30378 | node.block.children.isEmpty()) {
|
30379 | list.remove(item);
|
30380 | return;
|
30381 | }
|
30382 |
|
30383 |
|
30384 | if (node.type === 'Rule' &&
|
30385 | node.prelude.children.isEmpty()) {
|
30386 | list.remove(item);
|
30387 | }
|
30388 | }});
|
30389 |
|
30390 |
|
30391 | if (style.cssAst.children.isEmpty()) {
|
30392 |
|
30393 | var styleParentEl = style.styleEl.parentNode;
|
30394 | styleParentEl.spliceContent(styleParentEl.content.indexOf(style.styleEl), 1);
|
30395 |
|
30396 | if (styleParentEl.elem === 'defs' &&
|
30397 | styleParentEl.content.length === 0) {
|
30398 |
|
30399 | var defsParentEl = styleParentEl.parentNode;
|
30400 | defsParentEl.spliceContent(defsParentEl.content.indexOf(styleParentEl), 1);
|
30401 | }
|
30402 |
|
30403 | continue;
|
30404 | }
|
30405 |
|
30406 |
|
30407 |
|
30408 | cssTools.setCssStr(style.styleEl, lib.generate(style.cssAst));
|
30409 | }
|
30410 |
|
30411 |
|
30412 | return document;
|
30413 | };
|
30414 |
|
30415 | var inlineStyles = {
|
30416 | type: type$e,
|
30417 | active: active$e,
|
30418 | params: params$9,
|
30419 | description: description$f,
|
30420 | fn: fn$e
|
30421 | };
|
30422 |
|
30423 | var type$f = 'perItem';
|
30424 |
|
30425 | var active$f = true;
|
30426 |
|
30427 | var description$g = 'merges multiple paths in one if possible';
|
30428 |
|
30429 | var params$a = {
|
30430 | collapseRepeated: true,
|
30431 | force: false,
|
30432 | leadingZero: true,
|
30433 | negativeExtraSpace: true,
|
30434 | noSpaceAfterFlags: true
|
30435 | };
|
30436 |
|
30437 | var path2js$1 = _path.path2js,
|
30438 | js2path$1 = _path.js2path,
|
30439 | intersects = _path.intersects;
|
30440 |
|
30441 |
|
30442 |
|
30443 |
|
30444 |
|
30445 |
|
30446 |
|
30447 |
|
30448 |
|
30449 | var fn$f = function(item, params) {
|
30450 |
|
30451 | if (!item.isElem() || item.isEmpty()) return;
|
30452 |
|
30453 | var prevContentItem = null,
|
30454 | prevContentItemKeys = null;
|
30455 |
|
30456 | item.content = item.content.filter(function(contentItem) {
|
30457 |
|
30458 | if (prevContentItem &&
|
30459 | prevContentItem.isElem('path') &&
|
30460 | prevContentItem.isEmpty() &&
|
30461 | prevContentItem.hasAttr('d') &&
|
30462 | contentItem.isElem('path') &&
|
30463 | contentItem.isEmpty() &&
|
30464 | contentItem.hasAttr('d')
|
30465 | ) {
|
30466 |
|
30467 | if (!prevContentItemKeys) {
|
30468 | prevContentItemKeys = Object.keys(prevContentItem.attrs);
|
30469 | }
|
30470 |
|
30471 | var contentItemAttrs = Object.keys(contentItem.attrs),
|
30472 | equalData = prevContentItemKeys.length == contentItemAttrs.length &&
|
30473 | contentItemAttrs.every(function(key) {
|
30474 | return key == 'd' ||
|
30475 | prevContentItem.hasAttr(key) &&
|
30476 | prevContentItem.attr(key).value == contentItem.attr(key).value;
|
30477 | }),
|
30478 | prevPathJS = path2js$1(prevContentItem),
|
30479 | curPathJS = path2js$1(contentItem);
|
30480 |
|
30481 | if (equalData && (params.force || !intersects(prevPathJS, curPathJS))) {
|
30482 | js2path$1(prevContentItem, prevPathJS.concat(curPathJS), params);
|
30483 | return false;
|
30484 | }
|
30485 | }
|
30486 |
|
30487 | prevContentItem = contentItem;
|
30488 | prevContentItemKeys = null;
|
30489 | return true;
|
30490 |
|
30491 | });
|
30492 |
|
30493 | };
|
30494 |
|
30495 | var mergePaths = {
|
30496 | type: type$f,
|
30497 | active: active$f,
|
30498 | description: description$g,
|
30499 | params: params$a,
|
30500 | fn: fn$f
|
30501 | };
|
30502 |
|
30503 | var csstree_min = createCommonjsModule(function (module, exports) {
|
30504 | !function(e,t){module.exports=t();}(commonjsGlobal,(function(){function e(e){return {prev:null,next:null,data:e}}function t(e,t,n){var i;return null!==r?(i=r,r=r.cursor,i.prev=t,i.next=n,i.cursor=e.cursor):i={prev:t,next:n,cursor:e.cursor},e.cursor=i,i}function n(e){var t=e.cursor;e.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=r,r=t;}var r=null,i=function(){this.cursor=null,this.head=null,this.tail=null;};i.createItem=e,i.prototype.createItem=e,i.prototype.updateCursors=function(e,t,n,r){for(var i=this.cursor;null!==i;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor;},i.prototype.getSize=function(){for(var e=0,t=this.head;t;)e++,t=t.next;return e},i.prototype.fromArray=function(t){var n=null;this.head=null;for(var r=0;r<t.length;r++){var i=e(t[r]);null!==n?n.next=i:this.head=i,i.prev=n,n=i;}return this.tail=n,this},i.prototype.toArray=function(){for(var e=this.head,t=[];e;)t.push(e.data),e=e.next;return t},i.prototype.toJSON=i.prototype.toArray,i.prototype.isEmpty=function(){return null===this.head},i.prototype.first=function(){return this.head&&this.head.data},i.prototype.last=function(){return this.tail&&this.tail.data},i.prototype.each=function(e,r){var i;void 0===r&&(r=this);for(var a=t(this,null,this.head);null!==a.next;)i=a.next,a.next=i.next,e.call(r,i.data,i,this);n(this);},i.prototype.forEach=i.prototype.each,i.prototype.eachRight=function(e,r){var i;void 0===r&&(r=this);for(var a=t(this,this.tail,null);null!==a.prev;)i=a.prev,a.prev=i.prev,e.call(r,i.data,i,this);n(this);},i.prototype.forEachRight=i.prototype.eachRight,i.prototype.reduce=function(e,r,i){var a;void 0===i&&(i=this);for(var o=t(this,null,this.head),s=r;null!==o.next;)a=o.next,o.next=a.next,s=e.call(i,s,a.data,a,this);return n(this),s},i.prototype.reduceRight=function(e,r,i){var a;void 0===i&&(i=this);for(var o=t(this,this.tail,null),s=r;null!==o.prev;)a=o.prev,o.prev=a.prev,s=e.call(i,s,a.data,a,this);return n(this),s},i.prototype.nextUntil=function(e,r,i){if(null!==e){var a;void 0===i&&(i=this);for(var o=t(this,null,e);null!==o.next&&(a=o.next,o.next=a.next,!r.call(i,a.data,a,this)););n(this);}},i.prototype.prevUntil=function(e,r,i){if(null!==e){var a;void 0===i&&(i=this);for(var o=t(this,e,null);null!==o.prev&&(a=o.prev,o.prev=a.prev,!r.call(i,a.data,a,this)););n(this);}},i.prototype.some=function(e,t){var n=this.head;for(void 0===t&&(t=this);null!==n;){if(e.call(t,n.data,n,this))return !0;n=n.next;}return !1},i.prototype.map=function(e,t){var n=new i,r=this.head;for(void 0===t&&(t=this);null!==r;)n.appendData(e.call(t,r.data,r,this)),r=r.next;return n},i.prototype.filter=function(e,t){var n=new i,r=this.head;for(void 0===t&&(t=this);null!==r;)e.call(t,r.data,r,this)&&n.appendData(r.data),r=r.next;return n},i.prototype.clear=function(){this.head=null,this.tail=null;},i.prototype.copy=function(){for(var t=new i,n=this.head;null!==n;)t.insert(e(n.data)),n=n.next;return t},i.prototype.prepend=function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this},i.prototype.prependData=function(t){return this.prepend(e(t))},i.prototype.append=function(e){return this.insert(e)},i.prototype.appendData=function(t){return this.insert(e(t))},i.prototype.insert=function(e,t){if(null!=t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e);}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this},i.prototype.insertData=function(t,n){return this.insert(e(t),n)},i.prototype.remove=function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else {if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next;}if(null!==e.next)e.next.prev=e.prev;else {if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev;}return e.prev=null,e.next=null,e},i.prototype.push=function(t){this.insert(e(t));},i.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},i.prototype.unshift=function(t){this.prepend(e(t));},i.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},i.prototype.prependList=function(e){return this.insertList(e,this.head)},i.prototype.appendList=function(e){return this.insertList(e)},i.prototype.insertList=function(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this},i.prototype.replace=function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e);};var a=i,o=function(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return n.name=e,n.message=t,Object.defineProperty(n,"stack",{get:function(){return (r.stack||"").replace(/^(.+\n){1,3}/,e+": "+t+"\n")}}),n};function s(e,t){function n(e,t){return r.slice(e,t).map((function(t,n){for(var r=String(e+n+1);r.length<l;)r=" "+r;return r+" |"+t})).join("\n")}var r=e.source.split(/\r\n?|\n|\f/),i=e.line,a=e.column,o=Math.max(1,i-t)-1,s=Math.min(i+t,r.length+1),l=Math.max(4,String(s).length)+1,c=0;(a+=(" ".length-1)*(r[i-1].substr(0,a-1).match(/\t/g)||[]).length)>100&&(c=a-60+3,a=58);for(var u=o;u<=s;u++)u>=0&&u<r.length&&(r[u]=r[u].replace(/\t/g," "),r[u]=(c>0&&r[u].length>c?"…":"")+r[u].substr(c,98)+(r[u].length>c+100-1?"…":""));return [n(o,i),new Array(a+l+2).join("-")+"^",n(i,s)].filter(Boolean).join("\n")}var l=function(e,t,n,r,i){var a=o("SyntaxError",e);return a.source=t,a.offset=n,a.line=r,a.column=i,a.sourceFragment=function(e){return s(a,isNaN(e)?0:e)},Object.defineProperty(a,"formattedMessage",{get:function(){return "Parse error: "+a.message+"\n"+s(a,2)}}),a.parseError={offset:n,line:r,column:i},a},c={EOF:0,Ident:1,Function:2,AtKeyword:3,Hash:4,String:5,BadString:6,Url:7,BadUrl:8,Delim:9,Number:10,Percentage:11,Dimension:12,WhiteSpace:13,CDO:14,CDC:15,Colon:16,Semicolon:17,Comma:18,LeftSquareBracket:19,RightSquareBracket:20,LeftParenthesis:21,RightParenthesis:22,LeftCurlyBracket:23,RightCurlyBracket:24,Comment:25},u=Object.keys(c).reduce((function(e,t){return e[c[t]]=t,e}),{}),h={TYPE:c,NAME:u};function p(e){return e>=48&&e<=57}function d(e){return e>=65&&e<=90}function m(e){return e>=97&&e<=122}function g(e){return d(e)||m(e)}function f(e){return e>=128}function b(e){return g(e)||f(e)||95===e}function y(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function k(e){return 10===e||13===e||12===e}function v(e){return k(e)||32===e||9===e}function x(e,t){return 92===e&&(!k(t)&&0!==t)}var w=new Array(128);C.Eof=128,C.WhiteSpace=130,C.Digit=131,C.NameStart=132,C.NonPrintable=133;for(var S=0;S<w.length;S++)switch(!0){case v(S):w[S]=C.WhiteSpace;break;case p(S):w[S]=C.Digit;break;case b(S):w[S]=C.NameStart;break;case y(S):w[S]=C.NonPrintable;break;default:w[S]=S||C.Eof;}function C(e){return e<128?w[e]:C.NameStart}var z={isDigit:p,isHexDigit:function(e){return p(e)||e>=65&&e<=70||e>=97&&e<=102},isUppercaseLetter:d,isLowercaseLetter:m,isLetter:g,isNonAscii:f,isNameStart:b,isName:function(e){return b(e)||p(e)||45===e},isNonPrintable:y,isNewline:k,isWhiteSpace:v,isValidEscape:x,isIdentifierStart:function(e,t,n){return 45===e?b(t)||45===t||x(t,n):!!b(e)||92===e&&x(e,t)},isNumberStart:function(e,t,n){return 43===e||45===e?p(t)?2:46===t&&p(n)?3:0:46===e?p(t)?2:0:p(e)?1:0},isBOM:function(e){return 65279===e||65534===e?1:0},charCodeCategory:C},A=z.isDigit,P=z.isHexDigit,T=z.isUppercaseLetter,L=z.isName,E=z.isWhiteSpace,D=z.isValidEscape;function O(e,t){return t<e.length?e.charCodeAt(t):0}function B(e,t,n){return 13===n&&10===O(e,t+1)?2:1}function I(e,t,n){var r=e.charCodeAt(t);return T(r)&&(r|=32),r===n}function N(e,t){for(;t<e.length&&A(e.charCodeAt(t));t++);return t}function R(e,t){if(P(O(e,(t+=2)-1))){for(var n=Math.min(e.length,t+5);t<n&&P(O(e,t));t++);var r=O(e,t);E(r)&&(t+=B(e,t,r));}return t}var M={consumeEscaped:R,consumeName:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(!L(n)){if(!D(n,O(e,t+1)))break;t=R(e,t)-1;}}return t},consumeNumber:function(e,t){var n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),A(n)&&(t=N(e,t+1),n=e.charCodeAt(t)),46===n&&A(e.charCodeAt(t+1))&&(n=e.charCodeAt(t+=2),t=N(e,t)),I(e,t,101)){var r=0;45!==(n=e.charCodeAt(t+1))&&43!==n||(r=1,n=e.charCodeAt(t+2)),A(n)&&(t=N(e,t+1+r+1));}return t},consumeBadUrlRemnants:function(e,t){for(;t<e.length;t++){var n=e.charCodeAt(t);if(41===n){t++;break}D(n,O(e,t+1))&&(t=R(e,t));}return t},cmpChar:I,cmpStr:function(e,t,n,r){if(n-t!==r.length)return !1;if(t<0||n>e.length)return !1;for(var i=t;i<n;i++){var a=e.charCodeAt(i),o=r.charCodeAt(i-t);if(T(a)&&(a|=32),a!==o)return !1}return !0},getNewlineLength:B,findWhiteSpaceStart:function(e,t){for(;t>=0&&E(e.charCodeAt(t));t--);return t+1},findWhiteSpaceEnd:function(e,t){for(;t<e.length&&E(e.charCodeAt(t));t++);return t}},j=h.TYPE,_=h.NAME,F=M.cmpStr,W=j.EOF,q=j.WhiteSpace,Y=j.Comment,U=function(){this.offsetAndType=null,this.balance=null,this.reset();};U.prototype={reset:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset;},lookupType:function(e){return (e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>24:W},lookupOffset:function(e){return (e+=this.tokenIndex)<this.tokenCount?16777215&this.offsetAndType[e-1]:this.source.length},lookupValue:function(e,t){return (e+=this.tokenIndex)<this.tokenCount&&F(this.source,16777215&this.offsetAndType[e-1],16777215&this.offsetAndType[e],t)},getTokenStart:function(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?16777215&this.offsetAndType[e-1]:16777215&this.offsetAndType[this.tokenCount]:this.firstCharOffset},getRawLength:function(e,t){var n,r=e,i=16777215&this.offsetAndType[Math.max(r-1,0)];e:for(;r<this.tokenCount&&!((n=this.balance[r])<e);r++)switch(t(this.offsetAndType[r]>>24,this.source,i)){case 1:break e;case 2:r++;break e;default:i=16777215&this.offsetAndType[r],this.balance[n]===r&&(r=n);}return r-this.tokenIndex},isBalanceEdge:function(e){return this.balance[this.tokenIndex]<e},isDelim:function(e,t){return t?this.lookupType(t)===j.Delim&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===j.Delim&&this.source.charCodeAt(this.tokenStart)===e},getTokenValue:function(){return this.source.substring(this.tokenStart,this.tokenEnd)},getTokenLength:function(){return this.tokenEnd-this.tokenStart},substrToCursor:function(e){return this.source.substring(e,this.tokenStart)},skipWS:function(){for(var e=this.tokenIndex,t=0;e<this.tokenCount&&this.offsetAndType[e]>>24===q;e++,t++);t>0&&this.skip(t);},skipSC:function(){for(;this.tokenType===q||this.tokenType===Y;)this.next();},skip:function(e){var t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=16777215&this.offsetAndType[t-1],t=this.offsetAndType[t],this.tokenType=t>>24,this.tokenEnd=16777215&t):(this.tokenIndex=this.tokenCount,this.next());},next:function(){var e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>24,this.tokenEnd=16777215&e):(this.tokenIndex=this.tokenCount,this.eof=!0,this.tokenType=W,this.tokenStart=this.tokenEnd=this.source.length);},forEachToken(e){for(var t=0,n=this.firstCharOffset;t<this.tokenCount;t++){var r=n,i=this.offsetAndType[t],a=16777215&i;n=a,e(i>>24,r,a,t);}},dump(){var e=new Array(this.tokenCount);return this.forEachToken((t,n,r,i)=>{e[i]={idx:i,type:_[t],chunk:this.source.substring(n,r),balance:this.balance[i]};}),e}};var H=U;function V(e){return e}function K(e,t,n,r){var i,a;switch(e.type){case"Group":i=function(e,t,n,r){var i=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",a=e.terms.map((function(e){return K(e,t,n,r)})).join(i);return (e.explicit||n)&&(a=(r||","===a[0]?"[":"[ ")+a+(r?"]":" ]")),a}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return K(e.term,t,n,r)+t(0===(a=e).min&&0===a.max?"*":0===a.min&&1===a.max?"?":1===a.min&&0===a.max?a.comma?"#":"+":1===a.min&&1===a.max?"":(a.comma?"#":"")+(a.min===a.max?"{"+a.min+"}":"{"+a.min+","+(0!==a.max?a.max:"")+"}"),e);case"Type":i="<"+e.name+(e.opts?t(function(e){switch(e.type){case"Range":return " ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(i,e)}var G=function(e,t){var n=V,r=!1,i=!1;return "function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),i=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),K(e,n,r,i)};const Q={offset:0,line:1,column:1};function X(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?Z(n):n:null}function Z({offset:e,line:t,column:n},r){const i={offset:e,line:t,column:n};if(r){const e=r.split(/\n|\r\n?|\f/);i.offset+=r.length,i.line+=e.length-1,i.column=1===e.length?i.column+r.length:e.pop().length+1;}return i}var $=function(e,t){const n=o("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},J=function(e,t,n,r){const i=o("SyntaxMatchError",e),{css:a,mismatchOffset:s,mismatchLength:l,start:c,end:u}=function(e,t){const n=e.tokens,r=e.longestMatch,i=r<n.length&&n[r].node||null,a=i!==t?i:null;let o,s,l=0,c=0,u=0,h="";for(let e=0;e<n.length;e++){const t=n[e].value;e===r&&(c=t.length,l=h.length),null!==a&&n[e].node===a&&(e<=r?u++:u=0),h+=t;}return r===n.length||u>1?(o=X(a||t,"end")||Z(Q,h),s=Z(o)):(o=X(a,"start")||Z(X(t,"start")||Q,h.slice(0,l)),s=X(a,"end")||Z(o,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:o,end:s}}(r,n);return i.rawMessage=e,i.syntax=t?G(t):"<generic>",i.css=a,i.mismatchOffset=s,i.mismatchLength=l,i.message=e+"\n syntax: "+i.syntax+"\n value: "+(a||"<empty string>")+"\n --------"+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,c),i.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:c,end:u},i},ee=Object.prototype.hasOwnProperty,te=Object.create(null),ne=Object.create(null);function re(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function ie(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return ""}var ae={keyword:function(e){if(ee.call(te,e))return te[e];var t=e.toLowerCase();if(ee.call(te,t))return te[e]=te[t];var n=re(t,0),r=n?"":ie(t,0);return te[e]=Object.freeze({basename:t.substr(r.length),name:t,vendor:r,prefix:r,custom:n})},property:function(e){if(ee.call(ne,e))return ne[e];var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=re(t,n.length);if(!r&&(t=t.toLowerCase(),ee.call(ne,t)))return ne[e]=ne[t];var i=r?"":ie(t,n.length),a=t.substr(0,n.length+i.length);return ne[e]=Object.freeze({basename:t.substr(a.length),name:t.substr(n.length),hack:n,vendor:i,prefix:a,custom:r})},isCustomProperty:re,vendorPrefix:ie},oe="undefined"!=typeof Uint32Array?Uint32Array:Array,se=function(e,t){return null===e||e.length<t?new oe(Math.max(t+1024,16384)):e},le=h.TYPE,ce=z.isNewline,ue=z.isName,he=z.isValidEscape,pe=z.isNumberStart,de=z.isIdentifierStart,me=z.charCodeCategory,ge=z.isBOM,fe=M.cmpStr,be=M.getNewlineLength,ye=M.findWhiteSpaceEnd,ke=M.consumeEscaped,ve=M.consumeName,xe=M.consumeNumber,we=M.consumeBadUrlRemnants;function Se(e,t){function n(t){return t<o?e.charCodeAt(t):0}function r(){return h=xe(e,h),de(n(h),n(h+1),n(h+2))?(f=le.Dimension,void(h=ve(e,h))):37===n(h)?(f=le.Percentage,void h++):void(f=le.Number)}function i(){const t=h;return h=ve(e,h),fe(e,t,h,"url")&&40===n(h)?34===n(h=ye(e,h+1))||39===n(h)?(f=le.Function,void(h=t+4)):void function(){for(f=le.Url,h=ye(e,h);h<e.length;h++){var t=e.charCodeAt(h);switch(me(t)){case 41:return void h++;case me.Eof:return;case me.WhiteSpace:return 41===n(h=ye(e,h))||h>=e.length?void(h<e.length&&h++):(h=we(e,h),void(f=le.BadUrl));case 34:case 39:case 40:case me.NonPrintable:return h=we(e,h),void(f=le.BadUrl);case 92:if(he(t,n(h+1))){h=ke(e,h)-1;break}return h=we(e,h),void(f=le.BadUrl)}}}():40===n(h)?(f=le.Function,void h++):void(f=le.Ident)}function a(t){for(t||(t=n(h++)),f=le.String;h<e.length;h++){var r=e.charCodeAt(h);switch(me(r)){case t:return void h++;case me.Eof:return;case me.WhiteSpace:if(ce(r))return h+=be(e,h,r),void(f=le.BadString);break;case 92:if(h===e.length-1)break;var i=n(h+1);ce(i)?h+=be(e,h+1,i):he(r,i)&&(h=ke(e,h)-1);}}}t||(t=new H);for(var o=(e=String(e||"")).length,s=se(t.offsetAndType,o+1),l=se(t.balance,o+1),c=0,u=ge(n(0)),h=u,p=0,d=0,m=0;h<o;){var g=e.charCodeAt(h),f=0;switch(l[c]=o,me(g)){case me.WhiteSpace:f=le.WhiteSpace,h=ye(e,h+1);break;case 34:a();break;case 35:ue(n(h+1))||he(n(h+1),n(h+2))?(f=le.Hash,h=ve(e,h+1)):(f=le.Delim,h++);break;case 39:a();break;case 40:f=le.LeftParenthesis,h++;break;case 41:f=le.RightParenthesis,h++;break;case 43:pe(g,n(h+1),n(h+2))?r():(f=le.Delim,h++);break;case 44:f=le.Comma,h++;break;case 45:pe(g,n(h+1),n(h+2))?r():45===n(h+1)&&62===n(h+2)?(f=le.CDC,h+=3):de(g,n(h+1),n(h+2))?i():(f=le.Delim,h++);break;case 46:pe(g,n(h+1),n(h+2))?r():(f=le.Delim,h++);break;case 47:42===n(h+1)?(f=le.Comment,1===(h=e.indexOf("*/",h+2)+2)&&(h=e.length)):(f=le.Delim,h++);break;case 58:f=le.Colon,h++;break;case 59:f=le.Semicolon,h++;break;case 60:33===n(h+1)&&45===n(h+2)&&45===n(h+3)?(f=le.CDO,h+=4):(f=le.Delim,h++);break;case 64:de(n(h+1),n(h+2),n(h+3))?(f=le.AtKeyword,h=ve(e,h+1)):(f=le.Delim,h++);break;case 91:f=le.LeftSquareBracket,h++;break;case 92:he(g,n(h+1))?i():(f=le.Delim,h++);break;case 93:f=le.RightSquareBracket,h++;break;case 123:f=le.LeftCurlyBracket,h++;break;case 125:f=le.RightCurlyBracket,h++;break;case me.Digit:r();break;case me.NameStart:i();break;case me.Eof:break;default:f=le.Delim,h++;}switch(f){case p:for(p=(d=l[m=16777215&d])>>24,l[c]=m,l[m++]=c;m<c;m++)l[m]===o&&(l[m]=c);break;case le.LeftParenthesis:case le.Function:l[c]=d,d=(p=le.RightParenthesis)<<24|c;break;case le.LeftSquareBracket:l[c]=d,d=(p=le.RightSquareBracket)<<24|c;break;case le.LeftCurlyBracket:l[c]=d,d=(p=le.RightCurlyBracket)<<24|c;}s[c++]=f<<24|h;}for(s[c]=le.EOF<<24|h,l[c]=o,l[o]=o;0!==d;)d=l[m=16777215&d],l[m]=o;return t.source=e,t.firstCharOffset=u,t.offsetAndType=s,t.tokenCount=c,t.balance=l,t.reset(),t.next(),t}Object.keys(h).forEach((function(e){Se[e]=h[e];})),Object.keys(z).forEach((function(e){Se[e]=z[e];})),Object.keys(M).forEach((function(e){Se[e]=M[e];}));var Ce=Se,ze=Ce.isDigit,Ae=Ce.cmpChar,Pe=Ce.TYPE,Te=Pe.Delim,Le=Pe.WhiteSpace,Ee=Pe.Comment,De=Pe.Ident,Oe=Pe.Number,Be=Pe.Dimension;function Ie(e,t){return null!==e&&e.type===Te&&e.value.charCodeAt(0)===t}function Ne(e,t,n){for(;null!==e&&(e.type===Le||e.type===Ee);)e=n(++t);return t}function Re(e,t,n,r){if(!e)return 0;var i=e.value.charCodeAt(t);if(43===i||45===i){if(n)return 0;t++;}for(;t<e.value.length;t++)if(!ze(e.value.charCodeAt(t)))return 0;return r+1}function Me(e,t,n){var r=!1,i=Ne(e,t,n);if(null===(e=n(i)))return t;if(e.type!==Oe){if(!Ie(e,43)&&!Ie(e,45))return t;if(r=!0,i=Ne(n(++i),i,n),null===(e=n(i))&&e.type!==Oe)return 0}if(!r){var a=e.value.charCodeAt(0);if(43!==a&&45!==a)return 0}return Re(e,r?0:1,r,i)}var je=Ce.isHexDigit,_e=Ce.cmpChar,Fe=Ce.TYPE,We=Fe.Ident,qe=Fe.Delim,Ye=Fe.Number,Ue=Fe.Dimension;function He(e,t){return null!==e&&e.type===qe&&e.value.charCodeAt(0)===t}function Ve(e,t){return e.value.charCodeAt(0)===t}function Ke(e,t,n){for(var r=t,i=0;r<e.value.length;r++){var a=e.value.charCodeAt(r);if(45===a&&n&&0!==i)return Ke(e,t+i+1,!1)>0?6:0;if(!je(a))return 0;if(++i>6)return 0}return i}function Ge(e,t,n){if(!e)return 0;for(;He(n(t),63);){if(++e>6)return 0;t++;}return t}var Qe=Ce.isIdentifierStart,Xe=Ce.isHexDigit,Ze=Ce.isDigit,$e=Ce.cmpStr,Je=Ce.consumeNumber,et=Ce.TYPE,tt=["unset","initial","inherit"],nt=["calc(","-moz-calc(","-webkit-calc("];function rt(e,t){return t<e.length?e.charCodeAt(t):0}function it(e,t){return $e(e,0,e.length,t)}function at(e,t){for(var n=0;n<t.length;n++)if(it(e,t[n]))return !0;return !1}function ot(e,t){return t===e.length-2&&(92===e.charCodeAt(t)&&Ze(e.charCodeAt(t+1)))}function st(e,t,n){if(e&&"Range"===e.type){var r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r))return !0;if(null!==e.min&&r<e.min)return !0;if(null!==e.max&&r>e.max)return !0}return !1}function lt(e,t){var n=e.index,r=0;do{if(r++,e.balance<=n)break}while(e=t(r));return r}function ct(e){return function(t,n,r){return null===t?0:t.type===et.Function&&at(t.value,nt)?lt(t,n):e(t,n,r)}}function ut(e){return function(t){return null===t||t.type!==e?0:1}}function ht(e){return function(t,n,r){if(null===t||t.type!==et.Dimension)return 0;var i=Je(t.value,0);if(null!==e){var a=t.value.indexOf("\\",i),o=-1!==a&&ot(t.value,a)?t.value.substring(i,a):t.value.substr(i);if(!1===e.hasOwnProperty(o.toLowerCase()))return 0}return st(r,t.value,i)?0:1}}function pt(e){return "function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===et.Number&&0===Number(t.value)?1:e(t,n,r)}}var dt,mt={"ident-token":ut(et.Ident),"function-token":ut(et.Function),"at-keyword-token":ut(et.AtKeyword),"hash-token":ut(et.Hash),"string-token":ut(et.String),"bad-string-token":ut(et.BadString),"url-token":ut(et.Url),"bad-url-token":ut(et.BadUrl),"delim-token":ut(et.Delim),"number-token":ut(et.Number),"percentage-token":ut(et.Percentage),"dimension-token":ut(et.Dimension),"whitespace-token":ut(et.WhiteSpace),"CDO-token":ut(et.CDO),"CDC-token":ut(et.CDC),"colon-token":ut(et.Colon),"semicolon-token":ut(et.Semicolon),"comma-token":ut(et.Comma),"[-token":ut(et.LeftSquareBracket),"]-token":ut(et.RightSquareBracket),"(-token":ut(et.LeftParenthesis),")-token":ut(et.RightParenthesis),"{-token":ut(et.LeftCurlyBracket),"}-token":ut(et.RightCurlyBracket),string:ut(et.String),ident:ut(et.Ident),"custom-ident":function(e){if(null===e||e.type!==et.Ident)return 0;var t=e.value.toLowerCase();return at(t,tt)||it(t,"default")?0:1},"custom-property-name":function(e){return null===e||e.type!==et.Ident||45!==rt(e.value,0)||45!==rt(e.value,1)?0:1},"hex-color":function(e){if(null===e||e.type!==et.Hash)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n<t;n++)if(!Xe(e.value.charCodeAt(n)))return 0;return 1},"id-selector":function(e){return null===e||e.type!==et.Hash?0:Qe(rt(e.value,1),rt(e.value,2),rt(e.value,3))?1:0},"an-plus-b":function(e,t){var n=0;if(!e)return 0;if(e.type===Oe)return Re(e,0,!1,n);if(e.type===De&&45===e.value.charCodeAt(0)){if(!Ae(e.value,1,110))return 0;switch(e.value.length){case 2:return Me(t(++n),n,t);case 3:return 45!==e.value.charCodeAt(2)?0:(n=Ne(t(++n),n,t),Re(e=t(n),0,!0,n));default:return 45!==e.value.charCodeAt(2)?0:Re(e,3,!0,n)}}else if(e.type===De||Ie(e,43)&&t(n+1).type===De){if(e.type!==De&&(e=t(++n)),null===e||!Ae(e.value,0,110))return 0;switch(e.value.length){case 1:return Me(t(++n),n,t);case 2:return 45!==e.value.charCodeAt(1)?0:(n=Ne(t(++n),n,t),Re(e=t(n),0,!0,n));default:return 45!==e.value.charCodeAt(1)?0:Re(e,2,!0,n)}}else if(e.type===Be){for(var r=e.value.charCodeAt(0),i=43===r||45===r?1:0,a=i;a<e.value.length&&ze(e.value.charCodeAt(a));a++);return a===i?0:Ae(e.value,a,110)?a+1===e.value.length?Me(t(++n),n,t):45!==e.value.charCodeAt(a+1)?0:a+2===e.value.length?(n=Ne(t(++n),n,t),Re(e=t(n),0,!0,n)):Re(e,a+2,!0,n):0}return 0},urange:function(e,t){var n=0;if(null===e||e.type!==We||!_e(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(He(e,43))return null===(e=t(++n))?0:e.type===We?Ge(Ke(e,0,!0),++n,t):He(e,63)?Ge(1,++n,t):0;if(e.type===Ye){if(!Ve(e,43))return 0;var r=Ke(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===Ue||e.type===Ye?Ve(e,45)&&Ke(e,1,!1)?n+1:0:Ge(r,n,t)}return e.type===Ue&&Ve(e,43)?Ge(Ke(e,1,!0),++n,t):0},"declaration-value":function(e,t){if(!e)return 0;var n=0,r=0,i=e.index;e:do{switch(e.type){case et.BadString:case et.BadUrl:break e;case et.RightCurlyBracket:case et.RightParenthesis:case et.RightSquareBracket:if(e.balance>e.index||e.balance<i)break e;r--;break;case et.Semicolon:if(0===r)break e;break;case et.Delim:if("!"===e.value&&0===r)break e;break;case et.Function:case et.LeftParenthesis:case et.LeftSquareBracket:case et.LeftCurlyBracket:r++;}if(n++,e.balance<=i)break}while(e=t(n));return n},"any-value":function(e,t){if(!e)return 0;var n=e.index,r=0;e:do{switch(e.type){case et.BadString:case et.BadUrl:break e;case et.RightCurlyBracket:case et.RightParenthesis:case et.RightSquareBracket:if(e.balance>e.index||e.balance<n)break e}if(r++,e.balance<=n)break}while(e=t(r));return r},dimension:ct(ht(null)),angle:ct(ht({deg:!0,grad:!0,rad:!0,turn:!0})),decibel:ct(ht({db:!0})),frequency:ct(ht({hz:!0,khz:!0})),flex:ct(ht({fr:!0})),length:ct(pt(ht({px:!0,mm:!0,cm:!0,in:!0,pt:!0,pc:!0,q:!0,em:!0,ex:!0,ch:!0,rem:!0,vh:!0,vw:!0,vmin:!0,vmax:!0,vm:!0}))),resolution:ct(ht({dpi:!0,dpcm:!0,dppx:!0,x:!0})),semitones:ct(ht({st:!0})),time:ct(ht({s:!0,ms:!0})),percentage:ct((function(e,t,n){return null===e||e.type!==et.Percentage||st(n,e.value,e.value.length-1)?0:1})),zero:pt(),number:ct((function(e,t,n){if(null===e)return 0;var r=Je(e.value,0);return r===e.value.length||ot(e.value,r)?st(n,e.value,r)?0:1:0})),integer:ct((function(e,t,n){if(null===e||e.type!==et.Number)return 0;for(var r=43===e.value.charCodeAt(0)||45===e.value.charCodeAt(0)?1:0;r<e.value.length;r++)if(!Ze(e.value.charCodeAt(r)))return 0;return st(n,e.value,r)?0:1})),"-ms-legacy-expression":(dt="expression",dt+="(",function(e,t){return null!==e&&it(e.value,dt)?lt(e,t):0})},gt=function(e,t,n){var r=o("SyntaxError",e);return r.input=t,r.offset=n,r.rawMessage=e,r.message=r.rawMessage+"\n "+r.input+"\n--"+new Array((r.offset||r.input.length)+1).join("-")+"^",r},ft=function(e){this.str=e,this.pos=0;};ft.prototype={charCodeAt:function(e){return e<this.str.length?this.str.charCodeAt(e):0},charCode:function(){return this.charCodeAt(this.pos)},nextCharCode:function(){return this.charCodeAt(this.pos+1)},nextNonWsCode:function(e){return this.charCodeAt(this.findWsEnd(e))},findWsEnd:function(e){for(;e<this.str.length;e++){var t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e},substringToPos:function(e){return this.str.substring(this.pos,this.pos=e)},eat:function(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++;},peek:function(){return this.pos<this.str.length?this.str.charAt(this.pos++):""},error:function(e){throw new gt(e,this.str,this.pos)}};var bt=ft,yt=function(e){for(var t="function"==typeof Uint32Array?new Uint32Array(128):new Array(128),n=0;n<128;n++)t[n]=e(String.fromCharCode(n))?1:0;return t}((function(e){return /[a-zA-Z0-9\-]/.test(e)})),kt={" ":1,"&&":2,"||":3,"|":4};function vt(e){return e.substringToPos(e.findWsEnd(e.pos))}function xt(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n>=128||0===yt[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function wt(e){for(var t=e.pos;t<e.str.length;t++){var n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function St(e){var t=e.str.indexOf("'",e.pos+1);return -1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Ct(e){var t,n=null;return e.eat(123),t=wt(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=wt(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function zt(e,t){var n=function(e){var t=null,n=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,n=!0,t=123===e.charCode()?Ct(e):{min:1,max:0};break;case 123:t=Ct(e);break;default:return null}return {type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,n):t}function At(e){var t=e.peek();return ""===t?null:{type:"Token",value:t}}function Pt(e){var t,n=null;return e.eat(60),t=xt(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(vt(e),n=function(e){var t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():t=r*Number(wt(e)),vt(e),e.eat(44),vt(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(wt(e))),e.eat(93),null===t&&null===n?null:{type:"Range",min:t,max:n}}(e)),e.eat(62),zt(e,{type:"Type",name:t,opts:n})}function Tt(e,t){function n(e,t){return {type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}for(t=Object.keys(t).sort((function(e,t){return kt[e]-kt[t]}));t.length>0;){for(var r=t.shift(),i=0,a=0;i<e.length;i++){var o=e[i];"Combinator"===o.type&&(o.value===r?(-1===a&&(a=i-1),e.splice(i,1),i--):(-1!==a&&i-a>1&&(e.splice(a,i-a,n(e.slice(a,i),r)),i=a+1),a=-1));}-1!==a&&t.length&&e.splice(a,i-a,n(e.slice(a,i),r));}return r}function Lt(e){for(var t,n=[],r={},i=null,a=e.pos;t=Et(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==i&&"Combinator"!==i.type||(e.pos=a,e.error("Unexpected combinator")),r[t.value]=!0):null!==i&&"Combinator"!==i.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),i=t,a=e.pos);return null!==i&&"Combinator"===i.type&&(e.pos-=a,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:Tt(n,r)||" ",disallowEmpty:!1,explicit:!1}}function Et(e){var t=e.charCode();if(t<128&&1===yt[t])return function(e){var t;return t=xt(e),40===e.charCode()?(e.pos++,{type:"Function",name:t}):zt(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return zt(e,function(e){var t;return e.eat(91),t=Lt(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){var t;return e.eat(60),e.eat(39),t=xt(e),e.eat(39),e.eat(62),zt(e,{type:"Property",name:t})}(e):Pt(e);case 124:return {type:"Combinator",value:e.substringToPos(124===e.nextCharCode()?e.pos+2:e.pos+1)};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return zt(e,{type:"String",value:St(e)});case 32:case 9:case 10:case 13:case 12:return {type:"Spaces",value:vt(e)};case 64:return (t=e.nextCharCode())<128&&1===yt[t]?(e.pos++,{type:"AtKeyword",name:xt(e)}):At(e);case 42:case 43:case 63:case 35:case 33:break;case 123:if((t=e.nextCharCode())<48||t>57)return At(e);break;default:return At(e)}}function Dt(e){var t=new bt(e),n=Lt(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type&&(n=n.terms[0]),n}Dt("[a&&<b>#|<'c'>*||e() f{2} /,(% g#{1,2} h{2,})]!");var Ot=Dt,Bt=function(){};function It(e){return "function"==typeof e?e:Bt}var Nt=function(e,t,n){var r=Bt,i=Bt;if("function"==typeof t?r=t:t&&(r=It(t.enter),i=It(t.leave)),r===Bt&&i===Bt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}i.call(n,t);}(e);},Rt=new H,Mt={decorator:function(e){var t=null,n={len:0,node:null},r=[n],i="";return {children:e.children,node:function(n){var r=t;t=n,e.node.call(this,n),t=r;},chunk:function(e){i+=e,n.node!==t?r.push({len:e.length,node:t}):n.len+=e.length;},result:function(){return jt(i,r)}}}};function jt(e,t){var n=[],r=0,i=0,a=t?t[i].node:null;for(Ce(e,Rt);!Rt.eof;){if(t)for(;i<t.length&&r+t[i].len<=Rt.tokenStart;)r+=t[i++].len,a=t[i].node;n.push({type:Rt.tokenType,value:Rt.getTokenValue(),index:Rt.tokenIndex,balance:Rt.balance[Rt.tokenIndex],node:a}),Rt.next();}return n}var _t={type:"Match"},Ft={type:"Mismatch"},Wt={type:"DisallowEmpty"};function qt(e,t,n){return t===_t&&n===Ft||e===_t&&t===_t&&n===_t?e:("If"===e.type&&e.else===Ft&&t===_t&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Yt(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function Ut(e){return "Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&Yt(e.name)}function Ht(e){if("function"==typeof e)return {type:"Generic",fn:e};switch(e.type){case"Group":var t=function e(t,n,r){switch(t){case" ":for(var i=_t,a=n.length-1;a>=0;a--){i=qt(l=n[a],i,Ft);}return i;case"|":i=Ft;var o=null;for(a=n.length-1;a>=0;a--){if(Ut(l=n[a])&&(null===o&&a>0&&Ut(n[a-1])&&(i=qt({type:"Enum",map:o=Object.create(null)},_t,i)),null!==o)){var s=(Yt(l.name)?l.name.slice(0,-1):l.name).toLowerCase();if(s in o==!1){o[s]=l;continue}}o=null,i=qt(l,_t,i);}return i;case"&&":if(n.length>5)return {type:"MatchOnce",terms:n,all:!0};for(i=Ft,a=n.length-1;a>=0;a--){var l=n[a];c=n.length>1?e(t,n.filter((function(e){return e!==l})),!1):_t,i=qt(l,c,i);}return i;case"||":if(n.length>5)return {type:"MatchOnce",terms:n,all:!1};for(i=r?_t:Ft,a=n.length-1;a>=0;a--){var c;l=n[a];c=n.length>1?e(t,n.filter((function(e){return e!==l})),!0):_t,i=qt(l,c,i);}return i}}(e.combinator,e.terms.map(Ht),!1);return e.disallowEmpty&&(t=qt(t,Wt,Ft)),t;case"Multiplier":return function(e){var t=_t,n=Ht(e.term);if(0===e.max)n=qt(n,Wt,Ft),(t=qt(n,null,Ft)).then=qt(_t,_t,t),e.comma&&(t.then.else=qt({type:"Comma",syntax:e},t,Ft));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==_t&&(t=qt({type:"Comma",syntax:e},t,Ft)),t=qt(n,qt(_t,_t,t),Ft);if(0===e.min)t=qt(_t,_t,t);else for(r=0;r<e.min-1;r++)e.comma&&t!==_t&&(t=qt({type:"Comma",syntax:e},t,Ft)),t=qt(n,t,Ft);return t}(e);case"Type":case"Property":return {type:e.type,name:e.name,syntax:e};case"Keyword":return {type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return {type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return {type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return {type:e.type,value:e.value,syntax:e};case"Comma":return {type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}var Vt=_t,Kt=Ft,Gt=Wt,Qt=function(e,t){return "string"==typeof e&&(e=Ot(e)),{type:"MatchGraph",match:Ht(e),syntax:t||null,source:e}},Xt=Object.prototype.hasOwnProperty,Zt=Vt,$t=Kt,Jt=Gt,en=h.TYPE;function tn(e){for(var t=null,n=null,r=e;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}function nn(e,t){if(e.length!==t.length)return !1;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=65&&r<=90&&(r|=32),r!==t.charCodeAt(n))return !1}return !0}function rn(e){return null===e||(e.type===en.Comma||e.type===en.Function||e.type===en.LeftParenthesis||e.type===en.LeftSquareBracket||e.type===en.LeftCurlyBracket||function(e){return e.type===en.Delim&&"?"!==e.value}(e))}function an(e){return null===e||(e.type===en.RightParenthesis||e.type===en.RightSquareBracket||e.type===en.RightCurlyBracket||e.type===en.Delim)}function on(e,t,n){function r(){do{b++,f=b<e.length?e[b]:null;}while(null!==f&&(f.type===en.WhiteSpace||f.type===en.Comment))}function i(t){var n=b+t;return n<e.length?e[n]:null}function a(e,t){return {nextState:e,matchStack:k,syntaxStack:u,thenStack:h,tokenIndex:b,prev:t}}function o(e){h={nextState:e,matchStack:k,syntaxStack:u,prev:h};}function s(e){p=a(e,p);}function l(){k={type:1,syntax:t.syntax,token:f,prev:k},r(),d=null,b>y&&(y=b);}function c(){k=2===k.type?k.prev:{type:3,syntax:u.syntax,token:k.token,prev:k},u=u.prev;}var u=null,h=null,p=null,d=null,m=0,g=null,f=null,b=-1,y=0,k={type:0,syntax:null,token:null,prev:null};for(r();null===g&&++m<15e3;)switch(t.type){case"Match":if(null===h){if(null!==f&&(b!==e.length-1||"\\0"!==f.value&&"\\9"!==f.value)){t=$t;break}g="Match";break}if((t=h.nextState)===Jt){if(h.matchStack===k){t=$t;break}t=Zt;}for(;h.syntaxStack!==u;)c();h=h.prev;break;case"Mismatch":if(null!==d&&!1!==d)(null===p||b>p.tokenIndex)&&(p=d,d=!1);else if(null===p){g="Mismatch";break}t=p.nextState,h=p.thenStack,u=p.syntaxStack,k=p.matchStack,b=p.tokenIndex,f=b<e.length?e[b]:null,p=p.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==$t&&s(t.else),t.then!==Zt&&o(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":var v=t.syntax.terms;if(t.index===v.length){if(0===t.mask||t.syntax.all){t=$t;break}t=Zt;break}if(t.mask===(1<<v.length)-1){t=Zt;break}for(;t.index<v.length;t.index++){var x=1<<t.index;if(0==(t.mask&x)){s(t),o({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|x}),t=v[t.index++];break}}break;case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==f)if(-1!==(A=f.value.toLowerCase()).indexOf("\\")&&(A=A.replace(/\\[09].*$/,"")),Xt.call(t.map,A)){t=t.map[A];break}t=$t;break;case"Generic":var w=null!==u?u.opts:null,S=b+Math.floor(t.fn(f,i,w));if(!isNaN(S)&&S>b){for(;b<S;)l();t=Zt;}else t=$t;break;case"Type":case"Property":var C="Type"===t.type?"types":"properties",z=Xt.call(n,C)?n[C][t.name]:null;if(!z||!z.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==d&&null!==f&&"Type"===t.type)if("custom-ident"===t.name&&f.type===en.Ident||"length"===t.name&&"0"===f.value){null===d&&(d=a(t,p)),t=$t;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:2,syntax:t.syntax,token:k.token,prev:k},t=z.match;break;case"Keyword":var A=t.name;if(null!==f){var P=f.value;if(-1!==P.indexOf("\\")&&(P=P.replace(/\\[09].*$/,"")),nn(P,A)){l(),t=Zt;break}}t=$t;break;case"AtKeyword":case"Function":if(null!==f&&nn(f.value,t.name)){l(),t=Zt;break}t=$t;break;case"Token":if(null!==f&&f.value===t.value){l(),t=Zt;break}t=$t;break;case"Comma":null!==f&&f.type===en.Comma?rn(k.token)?t=$t:(l(),t=an(f)?$t:Zt):t=rn(k.token)||an(f)?Zt:$t;break;case"String":var T="";for(S=b;S<e.length&&T.length<t.value.length;S++)T+=e[S].value;if(nn(T,t.value)){for(;b<S;)l();t=Zt;}else t=$t;break;default:throw new Error("Unknown node type: "+t.type)}switch(g){case null:console.warn("[csstree-match] BREAK after 15000 iterations"),g="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",k=null;break;case"Match":for(;null!==u;)c();break;default:k=null;}return {tokens:e,reason:g,iterations:m,match:k,longestMatch:y}}var sn=function(e,t,n){var r=on(e,t,n||{});if(null===r.match)return r;var i=r.match,a=r.match={syntax:t.syntax||null,match:[]},o=[a];for(i=tn(i).prev;null!==i;){switch(i.type){case 2:a.match.push(a={syntax:i.syntax,match:[]}),o.push(a);break;case 3:o.pop(),a=o[o.length-1];break;default:a.match.push({syntax:i.syntax||null,token:i.token.value,node:i.token.node});}i=i.prev;}return r};function ln(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}var n=null;return null!==this.matched&&function r(i){if(Array.isArray(i.match)){for(var a=0;a<i.match.length;a++)if(r(i.match[a]))return t(i.syntax)&&n.unshift(i.syntax),!0}else if(i.node===e)return n=t(i.syntax)?[i.syntax]:[],!0;return !1}(this.matched),n}function cn(e,t,n){var r=ln.call(e,t);return null!==r&&r.some(n)}var un={getTrace:ln,isType:function(e,t){return cn(this,e,(function(e){return "Type"===e.type&&e.name===t}))},isProperty:function(e,t){return cn(this,e,(function(e){return "Property"===e.type&&e.name===t}))},isKeyword:function(e){return cn(this,e,(function(e){return "Keyword"===e.type}))}};var hn={matchFragments:function(e,t,n,r,i){var o=[];return null!==n.matched&&function n(s){if(null!==s.syntax&&s.syntax.type===r&&s.syntax.name===i){var l=function e(t){return "node"in t?t.node:e(t.match[0])}(s),c=function e(t){return "node"in t?t.node:e(t.match[t.match.length-1])}(s);e.syntax.walk(t,(function(e,t,n){if(e===l){var r=new a;do{if(r.appendData(t.data),t.data===c)break;t=t.next;}while(null!==t);o.push({parent:n,nodes:r});}}));}Array.isArray(s.match)&&s.match.forEach(n);}(n.matched),o}},pn=Object.prototype.hasOwnProperty;function dn(e){return "number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function mn(e){return Boolean(e)&&dn(e.offset)&&dn(e.line)&&dn(e.column)}function gn(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(var i in n){var o=!0;if(!1!==pn.call(n,i)){if("type"===i)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===i){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)i+=".source";else if(mn(n.loc.start)){if(mn(n.loc.end))continue;i+=".end";}else i+=".start";o=!1;}else if(t.hasOwnProperty(i)){var s=0;for(o=!1;!o&&s<t[i].length;s++){var l=t[i][s];switch(l){case String:o="string"==typeof n[i];break;case Boolean:o="boolean"==typeof n[i];break;case null:o=null===n[i];break;default:"string"==typeof l?o=n[i]&&n[i].type===l:Array.isArray(l)&&(o=n[i]instanceof a);}}}else r(n,"Unknown field `"+i+"` for "+e+" node type");o||r(n,"Bad value for `"+e+"."+i+"`");}}for(var i in t)pn.call(t,i)&&!1===pn.call(n,i)&&r(n,"Field `"+e+"."+i+"` is missed");}}function fn(e,t){var n=t.structure,r={type:String,loc:!0},i={type:'"'+e+'"'};for(var a in n)if(!1!==pn.call(n,a)){for(var o=[],s=r[a]=Array.isArray(n[a])?n[a].slice():[n[a]],l=0;l<s.length;l++){var c=s[l];if(c===String||c===Boolean)o.push(c.name);else if(null===c)o.push("null");else if("string"==typeof c)o.push("<"+c+">");else {if(!Array.isArray(c))throw new Error("Wrong value `"+c+"` in `"+e+"."+a+"` structure definition");o.push("List");}}i[a]=o.join(" | ");}return {docs:i,check:gn(e,r)}}var bn=$,yn=J,kn=Qt,vn=sn,xn=function(e){var t={};if(e.node)for(var n in e.node)if(pn.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=fn(n,r);}return t},wn=kn("inherit | initial | unset"),Sn=kn("inherit | initial | unset | <-ms-legacy-expression>");function Cn(e,t,n){var r={};for(var i in e)e[i].syntax&&(r[i]=n?e[i].syntax:G(e[i].syntax,{compact:t}));return r}function zn(e,t,n){const r={};for(const[i,a]of Object.entries(e))r[i]={prelude:a.prelude&&(n?a.prelude.syntax:G(a.prelude.syntax,{compact:t})),descriptors:a.descriptors&&Cn(a.descriptors,t,n)};return r}function An(e,t,n){return {matched:e,iterations:n,error:t,getTrace:un.getTrace,isType:un.isType,isProperty:un.isProperty,isKeyword:un.isKeyword}}function Pn(e,t,n,r){var i,a=function(e,t){return "string"==typeof e?jt(e,null):t.generate(e,Mt)}(n,e.syntax);return function(e){for(var t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return !0;return !1}(a)?An(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=vn(a,e.valueCommonSyntax,e)),r&&i.match||(i=vn(a,t.match,e)).match?An(i.match,null,i.iterations):An(null,new yn(i.reason,t.syntax,n,i),i.iterations))}var Tn=function(e,t,n){if(this.valueCommonSyntax=wn,this.syntax=t,this.generic=!1,this.atrules={},this.properties={},this.types={},this.structure=n||xn(e),e){if(e.types)for(var r in e.types)this.addType_(r,e.types[r]);if(e.generic)for(var r in this.generic=!0,mt)this.addType_(r,mt[r]);if(e.atrules)for(var r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(var r in e.properties)this.addProperty_(r,e.properties[r]);}};Tn.prototype={structure:{},checkStructure:function(e){function t(e,t){r.push({node:e,message:t});}var n=this.structure,r=[];return this.syntax.walk(e,(function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`");})),!!r.length&&r},createDescriptor:function(e,t,n,r=null){var i={type:t,name:n},a={type:t,name:n,parent:r,syntax:null,match:null};return "function"==typeof e?a.match=kn(e,i):("string"==typeof e?Object.defineProperty(a,"syntax",{get:function(){return Object.defineProperty(a,"syntax",{value:Ot(e)}),a.syntax}}):a.syntax=e,Object.defineProperty(a,"match",{get:function(){return Object.defineProperty(a,"match",{value:kn(a.syntax,i)}),a.match}})),a},addAtrule_:function(e,t){t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),{}):null});},addProperty_:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e));},addType_:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e),t===mt["-ms-legacy-expression"]&&(this.valueCommonSyntax=Sn));},checkAtruleName:function(e){if(!this.getAtrule(e))return new bn("Unknown at-rule","@"+e)},checkAtrulePrelude:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return !r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):r.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0},checkAtruleDescriptorName:function(e,t){let n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e),i=ae.keyword(t);return r.descriptors?r.descriptors[i.name]||r.descriptors[i.basename]?void 0:new bn("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")},checkPropertyName:function(e){return ae.property(e).custom?new Error("Lexer matching doesn't applicable for custom properties"):this.getProperty(e)?void 0:new bn("Unknown property",e)},matchAtrulePrelude:function(e,t){var n=this.checkAtrulePrelude(e,t);return n?An(null,n):t?Pn(this,this.getAtrule(e).prelude,t,!0):An(null,null)},matchAtruleDescriptor:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return An(null,r);var i=this.getAtrule(e),a=ae.keyword(t);return Pn(this,i.descriptors[a.name]||i.descriptors[a.basename],n,!0)},matchDeclaration:function(e){return "Declaration"!==e.type?An(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)},matchProperty:function(e,t){var n=this.checkPropertyName(e);return n?An(null,n):Pn(this,this.getProperty(e),t,!0)},matchType:function(e,t){var n=this.getType(e);return n?Pn(this,n,t,!1):An(null,new bn("Unknown type",e))},match:function(e,t){return "string"==typeof e||e&&e.type?("string"!=typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),Pn(this,e,t,!1)):An(null,new bn("Bad syntax"))},findValueFragments:function(e,t,n,r){return hn.matchFragments(this,t,this.matchProperty(e,t),n,r)},findDeclarationValueFragments:function(e,t,n){return hn.matchFragments(this,e.value,this.matchDeclaration(e),t,n)},findAllFragments:function(e,t,n){var r=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){r.push.apply(r,this.findDeclarationValueFragments(e,t,n));}.bind(this)}),r},getAtrule:function(e,t=!0){var n=ae.keyword(e);return (n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null},getAtrulePrelude:function(e,t=!0){const n=this.getAtrule(e,t);return n&&n.prelude||null},getAtruleDescriptor:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null},getProperty:function(e,t=!0){var n=ae.property(e);return (n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null},getType:function(e){return this.types.hasOwnProperty(e)?this.types[e]:null},validate:function(){function e(r,i,a,o){if(a.hasOwnProperty(i))return a[i];a[i]=!1,null!==o.syntax&&Nt(o.syntax,(function(o){if("Type"===o.type||"Property"===o.type){var s="Type"===o.type?r.types:r.properties,l="Type"===o.type?t:n;s.hasOwnProperty(o.name)&&!e(r,o.name,l,s[o.name])||(a[i]=!0);}}),this);}var t={},n={};for(var r in this.types)e(this,r,t,this.types[r]);for(var r in this.properties)e(this,r,n,this.properties[r]);return t=Object.keys(t).filter((function(e){return t[e]})),n=Object.keys(n).filter((function(e){return n[e]})),t.length||n.length?{types:t,properties:n}:null},dump:function(e,t){return {generic:this.generic,types:Cn(this.types,!t,e),properties:Cn(this.properties,!t,e),atrules:zn(this.atrules,!t,e)}},toString:function(){return JSON.stringify(this.dump())}};var Ln=Tn,En={SyntaxError:gt,parse:Ot,generate:G,walk:Nt},Dn=Ce.isBOM;var On=function(){this.lines=null,this.columns=null,this.linesAndColumnsComputed=!1;};On.prototype={setSource:function(e,t,n,r){this.source=e,this.startOffset=void 0===t?0:t,this.startLine=void 0===n?1:n,this.startColumn=void 0===r?1:r,this.linesAndColumnsComputed=!1;},ensureLinesAndColumnsComputed:function(){this.linesAndColumnsComputed||(!function(e,t){for(var n=t.length,r=se(e.lines,n),i=e.startLine,a=se(e.columns,n),o=e.startColumn,s=t.length>0?Dn(t.charCodeAt(0)):0;s<n;s++){var l=t.charCodeAt(s);r[s]=i,a[s]=o++,10!==l&&13!==l&&12!==l||(13===l&&s+1<n&&10===t.charCodeAt(s+1)&&(r[++s]=i,a[s]=o),i++,o=1);}r[s]=i,a[s]=o,e.lines=r,e.columns=a;}(this,this.source),this.linesAndColumnsComputed=!0);},getLocation:function(e,t){return this.ensureLinesAndColumnsComputed(),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}},getLocationRange:function(e,t,n){return this.ensureLinesAndColumnsComputed(),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}};var Bn=On,In=Ce.TYPE,Nn=In.WhiteSpace,Rn=In.Comment,Mn=function(e){var t=this.createList(),n=null,r={recognizer:e,space:null,ignoreWS:!1,ignoreWSAfter:!1};for(this.scanner.skipSC();!this.scanner.eof;){switch(this.scanner.tokenType){case Rn:this.scanner.next();continue;case Nn:r.ignoreWS?this.scanner.next():r.space=this.WhiteSpace();continue}if(void 0===(n=e.getNode.call(this,r)))break;null!==r.space&&(t.push(r.space),r.space=null),t.push(n),r.ignoreWSAfter?(r.ignoreWSAfter=!1,r.ignoreWS=!0):r.ignoreWS=!1;}return t},{findWhiteSpaceStart:jn,cmpStr:_n}=M,Fn=function(){},Wn=h.TYPE,qn=h.NAME,Yn=Wn.WhiteSpace,Un=Wn.Comment,Hn=Wn.Ident,Vn=Wn.Function,Kn=Wn.Url,Gn=Wn.Hash,Qn=Wn.Percentage,Xn=Wn.Number;function Zn(e){return function(){return this[e]()}}var $n=function(e){var t={scanner:new H,locationMap:new Bn,filename:"<unknown>",needPositions:!1,onParseError:Fn,onParseErrorThrow:!1,parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Mn,createList:function(){return new a},createSingleNodeList:function(e){return (new a).appendData(e)},getFirstListNode:function(e){return e&&e.first()},getLastListNode:function(e){return e.last()},parseWithFallback:function(e,t){var n=this.scanner.tokenIndex;try{return e.call(this)}catch(e){if(this.onParseErrorThrow)throw e;var r=t.call(this,n);return this.onParseErrorThrow=!0,this.onParseError(e,r),this.onParseErrorThrow=!1,r}},lookupNonWSType:function(e){do{var t=this.scanner.lookupType(e++);if(t!==Yn)return t}while(0!==t);return 0},eat:function(e){if(this.scanner.tokenType!==e){var t=this.scanner.tokenStart,n=qn[e]+" is expected";switch(e){case Hn:this.scanner.tokenType===Vn||this.scanner.tokenType===Kn?(t=this.scanner.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case Gn:this.scanner.isDelim(35)&&(this.scanner.next(),t++,n="Name is expected");break;case Qn:this.scanner.tokenType===Xn&&(t=this.scanner.tokenEnd,n="Percent sign is expected");break;default:this.scanner.source.charCodeAt(this.scanner.tokenStart)===e&&(t+=1);}this.error(n,t);}this.scanner.next();},consume:function(e){var t=this.scanner.getTokenValue();return this.eat(e),t},consumeFunctionName:function(){var e=this.scanner.source.substring(this.scanner.tokenStart,this.scanner.tokenEnd-1);return this.eat(Vn),e},getLocation:function(e,t){return this.needPositions?this.locationMap.getLocationRange(e,t,this.filename):null},getLocationFromList:function(e){if(this.needPositions){var t=this.getFirstListNode(e),n=this.getLastListNode(e);return this.locationMap.getLocationRange(null!==t?t.loc.start.offset-this.locationMap.startOffset:this.scanner.tokenStart,null!==n?n.loc.end.offset-this.locationMap.startOffset:this.scanner.tokenStart,this.filename)}return null},error:function(e,t){var n=void 0!==t&&t<this.scanner.source.length?this.locationMap.getLocation(t):this.scanner.eof?this.locationMap.getLocation(jn(this.scanner.source,this.scanner.source.length-1)):this.locationMap.getLocation(this.scanner.tokenStart);throw new l(e||"Unexpected input",this.scanner.source,n.offset,n.line,n.column)}};for(var n in e=function(e){var t={context:{},scope:{},atrule:{},pseudo:{}};if(e.parseContext)for(var n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Zn(e.parseContext[n]);}if(e.scope)for(var n in e.scope)t.scope[n]=e.scope[n];if(e.atrule)for(var n in e.atrule){var r=e.atrule[n];r.parse&&(t.atrule[n]=r.parse);}if(e.pseudo)for(var n in e.pseudo){var i=e.pseudo[n];i.parse&&(t.pseudo[n]=i.parse);}if(e.node)for(var n in e.node)t[n]=e.node[n].parse;return t}(e||{}))t[n]=e[n];return function(e,n){var r,i=(n=n||{}).context||"default",a=n.onComment;if(Ce(e,t.scanner),t.locationMap.setSource(e,n.offset,n.line,n.column),t.filename=n.filename||"<unknown>",t.needPositions=Boolean(n.positions),t.onParseError="function"==typeof n.onParseError?n.onParseError:Fn,t.onParseErrorThrow=!1,t.parseAtrulePrelude=!("parseAtrulePrelude"in n)||Boolean(n.parseAtrulePrelude),t.parseRulePrelude=!("parseRulePrelude"in n)||Boolean(n.parseRulePrelude),t.parseValue=!("parseValue"in n)||Boolean(n.parseValue),t.parseCustomProperty="parseCustomProperty"in n&&Boolean(n.parseCustomProperty),!t.context.hasOwnProperty(i))throw new Error("Unknown context `"+i+"`");return "function"==typeof a&&t.scanner.forEachToken((n,r,i)=>{if(n===Un){const n=t.getLocation(r,i),o=_n(e,i-2,i,"*/")?e.slice(r+2,i-2):e.slice(r+2,i);a(o,n);}}),r=t.context[i].call(t,n),t.scanner.eof||t.error(),r}},Jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),er=function(e){if(0<=e&&e<Jn.length)return Jn[e];throw new TypeError("Must be between 0 and 63: "+e)};var tr=function(e){var t,n="",r=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&r,(r>>>=5)>0&&(t|=32),n+=er(t);}while(r>0);return n};var nr=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var n=e,r=i(e);if(r){if(!r.path)return e;n=r.path;}for(var o,s=t.isAbsolute(n),l=n.split(/\/+/),c=0,u=l.length-1;u>=0;u--)"."===(o=l[u])?l.splice(u,1):".."===o?c++:c>0&&(""===o?(l.splice(u+1,c),c=0):(l.splice(u,2),c--));return ""===(n=l.join("/"))&&(n=s?"/":"."),r?(r.path=n,a(r)):n}function s(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),s=i(e);if(s&&(e=s.path||"/"),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var l="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=l,a(s)):l}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return "/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n;}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function c(e){return e}function u(e){if(!e)return !1;var t=e.length;if(t<9)return !1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return !1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return !1;return !0}function h(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?c:function(e){return u(e)?"$"+e:e},t.fromSetString=l?c:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=h(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=h(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=h(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:h(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=i(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var l=r.path.lastIndexOf("/");l>=0&&(r.path=r.path.substring(0,l+1));}t=s(a(r),t);}return o(t)};})),rr=(nr.getArg,nr.urlParse,nr.urlGenerate,nr.normalize,nr.join,nr.isAbsolute,nr.relative,nr.toSetString,nr.fromSetString,nr.compareByOriginalPositions,nr.compareByGeneratedPositionsDeflated,nr.compareByGeneratedPositionsInflated,nr.parseSourceMapInput,nr.computeSourceURL,Object.prototype.hasOwnProperty),ir="undefined"!=typeof Map;function ar(){this._array=[],this._set=ir?new Map:Object.create(null);}ar.fromArray=function(e,t){for(var n=new ar,r=0,i=e.length;r<i;r++)n.add(e[r],t);return n},ar.prototype.size=function(){return ir?this._set.size:Object.getOwnPropertyNames(this._set).length},ar.prototype.add=function(e,t){var n=ir?e:nr.toSetString(e),r=ir?this.has(e):rr.call(this._set,n),i=this._array.length;r&&!t||this._array.push(e),r||(ir?this._set.set(e,i):this._set[n]=i);},ar.prototype.has=function(e){if(ir)return this._set.has(e);var t=nr.toSetString(e);return rr.call(this._set,t)},ar.prototype.indexOf=function(e){if(ir){var t=this._set.get(e);if(t>=0)return t}else {var n=nr.toSetString(e);if(rr.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},ar.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},ar.prototype.toArray=function(){return this._array.slice()};var or={ArraySet:ar};function sr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0};}sr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t);},sr.prototype.add=function(e){var t,n,r,i,a,o;t=this._last,n=e,r=t.generatedLine,i=n.generatedLine,a=t.generatedColumn,o=n.generatedColumn,i>r||i==r&&o>=a||nr.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e));},sr.prototype.toArray=function(){return this._sorted||(this._array.sort(nr.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var lr=or.ArraySet,cr={MappingList:sr}.MappingList;function ur(e){e||(e={}),this._file=nr.getArg(e,"file",null),this._sourceRoot=nr.getArg(e,"sourceRoot",null),this._skipValidation=nr.getArg(e,"skipValidation",!1),this._sources=new lr,this._names=new lr,this._mappings=new cr,this._sourcesContents=null;}ur.prototype._version=3,ur.fromSourceMap=function(e){var t=e.sourceRoot,n=new ur({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=nr.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r);})),e.sources.forEach((function(r){var i=r;null!==t&&(i=nr.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);null!=a&&n.setSourceContent(r,a);})),n},ur.prototype.addMapping=function(e){var t=nr.getArg(e,"generated"),n=nr.getArg(e,"original",null),r=nr.getArg(e,"source",null),i=nr.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i});},ur.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=nr.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[nr.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[nr.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null));},ur.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file;}var i=this._sourceRoot;null!=i&&(r=nr.relative(i,r));var a=new lr,o=new lr;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=n&&(t.source=nr.join(n,t.source)),null!=i&&(t.source=nr.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name));}var l=t.source;null==l||a.has(l)||a.add(l);var c=t.name;null==c||o.has(c)||o.add(c);}),this),this._sources=a,this._names=o,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=nr.join(n,t)),null!=i&&(t=nr.relative(i,t)),this.setSourceContent(t,r));}),this);},ur.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},ur.prototype._serializeMappings=function(){for(var e,t,n,r,i=0,a=1,o=0,s=0,l=0,c=0,u="",h=this._mappings.toArray(),p=0,d=h.length;p<d;p++){if(e="",(t=h[p]).generatedLine!==a)for(i=0;t.generatedLine!==a;)e+=";",a++;else if(p>0){if(!nr.compareByGeneratedPositionsInflated(t,h[p-1]))continue;e+=",";}e+=tr(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=tr(r-c),c=r,e+=tr(t.originalLine-1-s),s=t.originalLine-1,e+=tr(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=tr(n-l),l=n)),u+=e;}return u},ur.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=nr.relative(t,e));var n=nr.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},ur.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},ur.prototype.toString=function(){return JSON.stringify(this.toJSON())};var hr={SourceMapGenerator:ur}.SourceMapGenerator,pr={Atrule:!0,Selector:!0,Declaration:!0},dr=Object.prototype.hasOwnProperty;function mr(e,t){var n=e.children,r=null;"function"!=typeof t?n.forEach(this.node,this):n.forEach((function(e){null!==r&&t.call(this,r),this.node(e),r=e;}),this);}var gr=function(e){function t(e){if(!dr.call(n,e.type))throw new Error("Unknown node type: "+e.type);n[e.type].call(this,e);}var n={};if(e.node)for(var r in e.node)n[r]=e.node[r].generate;return function(e,n){var r="",i={children:mr,node:t,chunk:function(e){r+=e;},result:function(){return r}};return n&&("function"==typeof n.decorator&&(i=n.decorator(i)),n.sourceMap&&(i=function(e){var t=new hr,n=1,r=0,i={line:1,column:0},a={line:0,column:0},o=!1,s={line:1,column:0},l={generated:s},c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&pr.hasOwnProperty(e.type)){var u=e.loc.start.line,h=e.loc.start.column-1;a.line===u&&a.column===h||(a.line=u,a.column=h,i.line=n,i.column=r,o&&(o=!1,i.line===s.line&&i.column===s.column||t.addMapping(l)),o=!0,t.addMapping({source:e.loc.source,original:a,generated:i}));}c.call(this,e),o&&pr.hasOwnProperty(e.type)&&(s.line=n,s.column=r);};var u=e.chunk;e.chunk=function(e){for(var t=0;t<e.length;t++)10===e.charCodeAt(t)?(n++,r=0):r++;u(e);};var h=e.result;return e.result=function(){return o&&t.addMapping(l),{css:h(),map:t}},e}(i))),i.node(e),i.result()}},fr=Object.prototype.hasOwnProperty,br=function(){};function yr(e){return "function"==typeof e?e:br}function kr(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i);}}function vr(e,t){var n=t.structure,r=[];for(var i in n)if(!1!==fr.call(n,i)){var a=n[i],o={name:i,type:!1,nullable:!1};Array.isArray(n[i])||(a=[n[i]]);for(var s=0;s<a.length;s++){var l=a[s];null===l?o.nullable=!0:"string"==typeof l?o.type="node":Array.isArray(l)&&(o.type="list");}o.type&&r.push(o);}return r.length?{context:t.walkContext,fields:r}:null}function xr(e,t){var n=e.fields.slice(),r=e.context,i="string"==typeof r;return t&&n.reverse(),function(e,a,o,s){var l;i&&(l=a[r],a[r]=e);for(var c=0;c<n.length;c++){var u=n[c],h=e[u.name];if(!u.nullable||h)if("list"===u.type){if(t?h.reduceRight(s,!1):h.reduce(s,!1))return !0}else if(o(h))return !0}i&&(a[r]=l);}}function wr(e){return {Atrule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Rule:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block},Declaration:{StyleSheet:e.StyleSheet,Atrule:e.Atrule,Rule:e.Rule,Block:e.Block,DeclarationList:e.DeclarationList}}}var Sr=function(e){var t=function(e){var t={};for(var n in e.node)if(fr.call(e.node,n)){var r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=vr(0,r);}return t}(e),n={},r={},i=Symbol("break-walk"),a=Symbol("skip-node");for(var o in t)fr.call(t,o)&&null!==t[o]&&(n[o]=xr(t[o],!1),r[o]=xr(t[o],!0));var s=wr(n),l=wr(r),c=function(e,o){function c(e,t,n){var r=h.call(m,e,t,n);return r===i||r!==a&&(!(!d.hasOwnProperty(e.type)||!d[e.type](e,m,c,u))||p.call(m,e,t,n)===i)}var u=(e,t,n,r)=>e||c(t,n,r),h=br,p=br,d=n,m={break:i,skip:a,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof o)h=o;else if(o&&(h=yr(o.enter),p=yr(o.leave),o.reverse&&(d=r),o.visit)){if(s.hasOwnProperty(o.visit))d=o.reverse?l[o.visit]:s[o.visit];else if(!t.hasOwnProperty(o.visit))throw new Error("Bad value `"+o.visit+"` for `visit` option (should be: "+Object.keys(t).join(", ")+")");h=kr(h,o.visit),p=kr(p,o.visit);}if(h===br&&p===br)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e);};return c.break=i,c.skip=a,c.find=function(e,t){var n=null;return c(e,(function(e,r,a){if(t.call(this,e,r,a))return n=e,i})),n},c.findLast=function(e,t){var n=null;return c(e,{reverse:!0,enter:function(e,r,a){if(t.call(this,e,r,a))return n=e,i}}),n},c.findAll=function(e,t){var n=[];return c(e,(function(e,r,i){t.call(this,e,r,i)&&n.push(e);})),n},c},Cr=function e(t){var n={};for(var r in t){var i=t[r];i&&(Array.isArray(i)||i instanceof a?i=i.map(e):i.constructor===Object&&(i=e(i))),n[r]=i;}return n};const zr=Object.prototype.hasOwnProperty,Ar={generic:!0,types:Er,atrules:{prelude:Dr,descriptors:Dr},properties:Er,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,n){for(const r in n)zr.call(n,r)&&(Pr(t[r])?e(t[r],Tr(n[r])):t[r]=Tr(n[r]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function Pr(e){return e&&e.constructor===Object}function Tr(e){return Pr(e)?Object.assign({},e):e}function Lr(e,t){return "string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Er(e,t){if("string"==typeof t)return Lr(e,t);const n=Object.assign({},e);for(let r in t)zr.call(t,r)&&(n[r]=Lr(zr.call(e,r)?e[r]:void 0,t[r]));return n}function Dr(e,t){const n=Er(e,t);return !Pr(n)||Object.keys(n).length?n:null}var Or=(e,t)=>function e(t,n,r){for(const i in r)if(!1!==zr.call(r,i))if(!0===r[i])i in n&&zr.call(n,i)&&(t[i]=Tr(n[i]));else if(r[i])if("function"==typeof r[i]){const e=r[i];t[i]=e({},t[i]),t[i]=e(t[i]||{},n[i]);}else if(Pr(r[i])){const a={};for(let n in t[i])a[n]=e({},t[i][n],r[i]);for(let t in n[i])a[t]=e(a[t]||{},n[i][t],r[i]);t[i]=a;}else if(Array.isArray(r[i])){const a={},o=r[i].reduce((function(e,t){return e[t]=!0,e}),{});for(const[n,r]of Object.entries(t[i]||{}))a[n]={},r&&e(a[n],r,o);for(const t in n[i])zr.call(n[i],t)&&(a[t]||(a[t]={}),n[i]&&n[i][t]&&e(a[t],n[i][t],o));t[i]=a;}return t}(e,t,Ar);function Br(e){var t=$n(e),n=Sr(e),r=gr(e),i=function(e){return {fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&e.children instanceof a==!1&&(e.children=(new a).fromArray(e.children));}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof a&&(e.children=e.children.toArray());}}),t}}}(n),o={List:a,SyntaxError:l,TokenStream:H,Lexer:Ln,vendorPrefix:ae.vendorPrefix,keyword:ae.keyword,property:ae.property,isCustomProperty:ae.isCustomProperty,definitionSyntax:En,lexer:null,createLexer:function(e){return new Ln(e,o,o.lexer.structure)},tokenize:Ce,parse:t,walk:n,generate:r,find:n.find,findLast:n.findLast,findAll:n.findAll,clone:Cr,fromPlainObject:i.fromPlainObject,toPlainObject:i.toPlainObject,createSyntax:function(e){return Br(Or({},e))},fork:function(t){var n=Or({},e);return Br("function"==typeof t?t(n,Object.assign):Or(n,t))}};return o.lexer=new Ln({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},o),o}var Ir=function(e){return Br(Or({},e))},Nr={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<quote>|<target>|<leader()>|<attr()>|counter( <ident> , <'list-style-type'>? )]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","counter()":"counter( <custom-ident> , <counter-style>? )","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <custom-ident> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fit-content()":"fit-content( [<length>|<percentage>] )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<positive-integer>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] <resolution>","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length>|<percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length>|<percentage>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( <length> )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","saturate()":"saturate( <number-percentage> )","scale()":"scale( <number> , <number>? )","scale3d()":"scale3d( <number> , <number> , <number> )","scaleX()":"scaleX( <number> )","scaleY()":"scaleY( <number> )","scaleZ()":"scaleZ( <number> )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"<time>||<timing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-transition":"[none|<single-transition-property>]||<time>||<timing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<positive-integer>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","border-radius":"<length-percentage>{1,2}",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#","name-repeat":"repeat( [<positive-integer>|auto-fill] , <line-names>+ )",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger",ratio:"<integer> / <integer>",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto","track-group":"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>","track-list-v0":"[<string>* <track-group> <string>*]+|none","track-minmax":"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","positive-integer":"<integer [0,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"<integer [0,1]>","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<'color'>","-webkit-border-before-color":"<'color'>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert",animation:"<single-animation>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<timing-function>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<box>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<'color'>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end","caret-color":"auto|<color>",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","color-adjust":"economy|exact","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[size||layout||style||paint]",content:"normal|none|[<content-replacement>|<content-list>] [/ <string>]?","counter-increment":"[<custom-ident> <integer>?]+|none","counter-reset":"[<custom-ident> <integer>?]+|none","counter-set":"[<custom-ident> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|<number>","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<url>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length-percentage>|min-content|max-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"over|under|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|dark|light|<color>{2}","scrollbar-gutter":"auto|[stable|always]&&both?&&force?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|<shape-box>||<basic-shape>|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<timing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content( <length-percentage> )","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length-percentage>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [<media-query-list>]?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}}}},Rr=Ce.cmpChar,Mr=Ce.isDigit,jr=Ce.TYPE,_r=jr.WhiteSpace,Fr=jr.Comment,Wr=jr.Ident,qr=jr.Number,Yr=jr.Dimension;function Ur(e,t){var n=this.scanner.tokenStart+e,r=this.scanner.source.charCodeAt(n);for(43!==r&&45!==r||(t&&this.error("Number sign is not allowed"),n++);n<this.scanner.tokenEnd;n++)Mr(this.scanner.source.charCodeAt(n))||this.error("Integer is expected",n);}function Hr(e){return Ur.call(this,0,e)}function Vr(e,t){if(!Rr(this.scanner.source,this.scanner.tokenStart+e,t)){var n="";switch(t){case 110:n="N is expected";break;case 45:n="HyphenMinus is expected";}this.error(n,this.scanner.tokenStart+e);}}function Kr(){for(var e=0,t=0,n=this.scanner.tokenType;n===_r||n===Fr;)n=this.scanner.lookupType(++e);if(n!==qr){if(!this.scanner.isDelim(43,e)&&!this.scanner.isDelim(45,e))return null;t=this.scanner.isDelim(43,e)?43:45;do{n=this.scanner.lookupType(++e);}while(n===_r||n===Fr);n!==qr&&(this.scanner.skip(e),Hr.call(this,!0));}return e>0&&this.scanner.skip(e),0===t&&43!==(n=this.scanner.source.charCodeAt(this.scanner.tokenStart))&&45!==n&&this.error("Number sign is expected"),Hr.call(this,0!==t),45===t?"-"+this.consume(qr):this.consume(qr)}var Gr={name:"AnPlusB",structure:{a:[String,null],b:[String,null]},parse:function(){var e=this.scanner.tokenStart,t=null,n=null;if(this.scanner.tokenType===qr)Hr.call(this,!1),n=this.consume(qr);else if(this.scanner.tokenType===Wr&&Rr(this.scanner.source,this.scanner.tokenStart,45))switch(t="-1",Vr.call(this,1,110),this.scanner.getTokenLength()){case 2:this.scanner.next(),n=Kr.call(this);break;case 3:Vr.call(this,2,45),this.scanner.next(),this.scanner.skipSC(),Hr.call(this,!0),n="-"+this.consume(qr);break;default:Vr.call(this,2,45),Ur.call(this,3,!0),this.scanner.next(),n=this.scanner.substrToCursor(e+2);}else if(this.scanner.tokenType===Wr||this.scanner.isDelim(43)&&this.scanner.lookupType(1)===Wr){var r=0;switch(t="1",this.scanner.isDelim(43)&&(r=1,this.scanner.next()),Vr.call(this,0,110),this.scanner.getTokenLength()){case 1:this.scanner.next(),n=Kr.call(this);break;case 2:Vr.call(this,1,45),this.scanner.next(),this.scanner.skipSC(),Hr.call(this,!0),n="-"+this.consume(qr);break;default:Vr.call(this,1,45),Ur.call(this,2,!0),this.scanner.next(),n=this.scanner.substrToCursor(e+r+1);}}else if(this.scanner.tokenType===Yr){for(var i=this.scanner.source.charCodeAt(this.scanner.tokenStart),a=(r=43===i||45===i,this.scanner.tokenStart+r);a<this.scanner.tokenEnd&&Mr(this.scanner.source.charCodeAt(a));a++);a===this.scanner.tokenStart+r&&this.error("Integer is expected",this.scanner.tokenStart+r),Vr.call(this,a-this.scanner.tokenStart,110),t=this.scanner.source.substring(e,a),a+1===this.scanner.tokenEnd?(this.scanner.next(),n=Kr.call(this)):(Vr.call(this,a-this.scanner.tokenStart+1,45),a+2===this.scanner.tokenEnd?(this.scanner.next(),this.scanner.skipSC(),Hr.call(this,!0),n="-"+this.consume(qr)):(Ur.call(this,a-this.scanner.tokenStart+2,!0),this.scanner.next(),n=this.scanner.substrToCursor(a+1)));}else this.error();return null!==t&&43===t.charCodeAt(0)&&(t=t.substr(1)),null!==n&&43===n.charCodeAt(0)&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.scanner.tokenStart),a:t,b:n}},generate:function(e){var t=null!==e.a&&void 0!==e.a,n=null!==e.b&&void 0!==e.b;t?(this.chunk("+1"===e.a?"+n":"1"===e.a?"n":"-1"===e.a?"-n":e.a+"n"),n&&("-"===(n=String(e.b)).charAt(0)||"+"===n.charAt(0)?(this.chunk(n.charAt(0)),this.chunk(n.substr(1))):(this.chunk("+"),this.chunk(n)))):this.chunk(String(e.b));}},Qr=Ce.TYPE,Xr=Qr.WhiteSpace,Zr=Qr.Semicolon,$r=Qr.LeftCurlyBracket,Jr=Qr.Delim;function ei(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===Xr?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function ti(){return 0}var ni={name:"Raw",structure:{value:String},parse:function(e,t,n){var r,i=this.scanner.getTokenStart(e);return this.scanner.skip(this.scanner.getRawLength(e,t||ti)),r=n&&this.scanner.tokenStart>i?ei.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(i,r),value:this.scanner.source.substring(i,r)}},generate:function(e){this.chunk(e.value);},mode:{default:ti,leftCurlyBracket:function(e){return e===$r?1:0},leftCurlyBracketOrSemicolon:function(e){return e===$r||e===Zr?1:0},exclamationMarkOrSemicolon:function(e,t,n){return e===Jr&&33===t.charCodeAt(n)||e===Zr?1:0},semicolonIncluded:function(e){return e===Zr?2:0}}},ri=Ce.TYPE,ii=ni.mode,ai=ri.AtKeyword,oi=ri.Semicolon,si=ri.LeftCurlyBracket,li=ri.RightCurlyBracket;function ci(e){return this.Raw(e,ii.leftCurlyBracketOrSemicolon,!0)}function ui(){for(var e,t=1;e=this.scanner.lookupType(t);t++){if(e===li)return !0;if(e===si||e===ai)return !1}return !1}var hi={name:"Atrule",structure:{name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null,i=null;switch(this.eat(ai),t=(e=this.scanner.substrToCursor(n+1)).toLowerCase(),this.scanner.skipSC(),!1===this.scanner.eof&&this.scanner.tokenType!==si&&this.scanner.tokenType!==oi&&(this.parseAtrulePrelude?"AtrulePrelude"===(r=this.parseWithFallback(this.AtrulePrelude.bind(this,e),ci)).type&&null===r.children.head&&(r=null):r=ci.call(this,this.scanner.tokenIndex),this.scanner.skipSC()),this.scanner.tokenType){case oi:this.scanner.next();break;case si:i=this.atrule.hasOwnProperty(t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(ui.call(this));}return {type:"Atrule",loc:this.getLocation(n,this.scanner.tokenStart),name:e,prelude:r,block:i}},generate:function(e){this.chunk("@"),this.chunk(e.name),null!==e.prelude&&(this.chunk(" "),this.node(e.prelude)),e.block?this.node(e.block):this.chunk(";");},walkContext:"atrule"},pi=Ce.TYPE,di=pi.Semicolon,mi=pi.LeftCurlyBracket,gi={name:"AtrulePrelude",structure:{children:[[]]},parse:function(e){var t=null;return null!==e&&(e=e.toLowerCase()),this.scanner.skipSC(),t=this.atrule.hasOwnProperty(e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.scanner.skipSC(),!0!==this.scanner.eof&&this.scanner.tokenType!==mi&&this.scanner.tokenType!==di&&this.error("Semicolon or block is expected"),null===t&&(t=this.createList()),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e);},walkContext:"atrulePrelude"},fi=Ce.TYPE,bi=fi.Ident,yi=fi.String,ki=fi.Colon,vi=fi.LeftSquareBracket,xi=fi.RightSquareBracket;function wi(){this.scanner.eof&&this.error("Unexpected end of input");var e=this.scanner.tokenStart,t=!1,n=!0;return this.scanner.isDelim(42)?(t=!0,n=!1,this.scanner.next()):this.scanner.isDelim(124)||this.eat(bi),this.scanner.isDelim(124)?61!==this.scanner.source.charCodeAt(this.scanner.tokenStart+1)?(this.scanner.next(),this.eat(bi)):t&&this.error("Identifier is expected",this.scanner.tokenEnd):t&&this.error("Vertical line is expected"),n&&this.scanner.tokenType===ki&&(this.scanner.next(),this.eat(bi)),{type:"Identifier",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}}function Si(){var e=this.scanner.tokenStart,t=this.scanner.source.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.scanner.next(),61!==t&&(this.scanner.isDelim(61)||this.error("Equal sign is expected"),this.scanner.next()),this.scanner.substrToCursor(e)}var Ci={name:"AttributeSelector",structure:{name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]},parse:function(){var e,t=this.scanner.tokenStart,n=null,r=null,i=null;return this.eat(vi),this.scanner.skipSC(),e=wi.call(this),this.scanner.skipSC(),this.scanner.tokenType!==xi&&(this.scanner.tokenType!==bi&&(n=Si.call(this),this.scanner.skipSC(),r=this.scanner.tokenType===yi?this.String():this.Identifier(),this.scanner.skipSC()),this.scanner.tokenType===bi&&(i=this.scanner.getTokenValue(),this.scanner.next(),this.scanner.skipSC())),this.eat(xi),{type:"AttributeSelector",loc:this.getLocation(t,this.scanner.tokenStart),name:e,matcher:n,value:r,flags:i}},generate:function(e){var t=" ";this.chunk("["),this.node(e.name),null!==e.matcher&&(this.chunk(e.matcher),null!==e.value&&(this.node(e.value),"String"===e.value.type&&(t=""))),null!==e.flags&&(this.chunk(t),this.chunk(e.flags)),this.chunk("]");}},zi=Ce.TYPE,Ai=ni.mode,Pi=zi.WhiteSpace,Ti=zi.Comment,Li=zi.Semicolon,Ei=zi.AtKeyword,Di=zi.LeftCurlyBracket,Oi=zi.RightCurlyBracket;function Bi(e){return this.Raw(e,null,!0)}function Ii(){return this.parseWithFallback(this.Rule,Bi)}function Ni(e){return this.Raw(e,Ai.semicolonIncluded,!0)}function Ri(){if(this.scanner.tokenType===Li)return Ni.call(this,this.scanner.tokenIndex);var e=this.parseWithFallback(this.Declaration,Ni);return this.scanner.tokenType===Li&&this.scanner.next(),e}var Mi={name:"Block",structure:{children:[["Atrule","Rule","Declaration"]]},parse:function(e){var t=e?Ri:Ii,n=this.scanner.tokenStart,r=this.createList();this.eat(Di);e:for(;!this.scanner.eof;)switch(this.scanner.tokenType){case Oi:break e;case Pi:case Ti:this.scanner.next();break;case Ei:r.push(this.parseWithFallback(this.Atrule,Bi));break;default:r.push(t.call(this));}return this.scanner.eof||this.eat(Oi),{type:"Block",loc:this.getLocation(n,this.scanner.tokenStart),children:r}},generate:function(e){this.chunk("{"),this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";");})),this.chunk("}");},walkContext:"block"},ji=Ce.TYPE,_i=ji.LeftSquareBracket,Fi=ji.RightSquareBracket,Wi={name:"Brackets",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat(_i),n=e.call(this,t),this.scanner.eof||this.eat(Fi),{type:"Brackets",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("["),this.children(e),this.chunk("]");}},qi=Ce.TYPE.CDC,Yi={name:"CDC",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(qi),{type:"CDC",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("--\x3e");}},Ui=Ce.TYPE.CDO,Hi={name:"CDO",structure:[],parse:function(){var e=this.scanner.tokenStart;return this.eat(Ui),{type:"CDO",loc:this.getLocation(e,this.scanner.tokenStart)}},generate:function(){this.chunk("\x3c!--");}},Vi=Ce.TYPE.Ident,Ki={name:"ClassSelector",structure:{name:String},parse:function(){return this.scanner.isDelim(46)||this.error("Full stop is expected"),this.scanner.next(),{type:"ClassSelector",loc:this.getLocation(this.scanner.tokenStart-1,this.scanner.tokenEnd),name:this.consume(Vi)}},generate:function(e){this.chunk("."),this.chunk(e.name);}},Gi=Ce.TYPE.Ident,Qi={name:"Combinator",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 62:case 43:case 126:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.tokenType===Gi&&!1!==this.scanner.lookupValue(0,"deep")||this.error("Identifier `deep` is expected"),this.scanner.next(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.scanner.next();break;default:this.error("Combinator is expected");}return {type:"Combinator",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name);}},Xi=Ce.TYPE.Comment,Zi={name:"Comment",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=this.scanner.tokenEnd;return this.eat(Xi),t-e+2>=2&&42===this.scanner.source.charCodeAt(t-2)&&47===this.scanner.source.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e+2,t)}},generate:function(e){this.chunk("/*"),this.chunk(e.value),this.chunk("*/");}},$i=ae.isCustomProperty,Ji=Ce.TYPE,ea=ni.mode,ta=Ji.Ident,na=Ji.Hash,ra=Ji.Colon,ia=Ji.Semicolon,aa=Ji.Delim,oa=Ji.WhiteSpace;function sa(e){return this.Raw(e,ea.exclamationMarkOrSemicolon,!0)}function la(e){return this.Raw(e,ea.exclamationMarkOrSemicolon,!1)}function ca(){var e=this.scanner.tokenIndex,t=this.Value();return "Raw"!==t.type&&!1===this.scanner.eof&&this.scanner.tokenType!==ia&&!1===this.scanner.isDelim(33)&&!1===this.scanner.isBalanceEdge(e)&&this.error(),t}var ua={name:"Declaration",structure:{important:[Boolean,String],property:String,value:["Value","Raw"]},parse:function(){var e,t=this.scanner.tokenStart,n=this.scanner.tokenIndex,r=ha.call(this),i=$i(r),a=i?this.parseCustomProperty:this.parseValue,o=i?la:sa,s=!1;this.scanner.skipSC(),this.eat(ra);const l=this.scanner.tokenIndex;if(i||this.scanner.skipSC(),e=a?this.parseWithFallback(ca,o):o.call(this,this.scanner.tokenIndex),i&&"Value"===e.type&&e.children.isEmpty())for(let t=l-this.scanner.tokenIndex;t<=0;t++)if(this.scanner.lookupType(t)===oa){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.scanner.isDelim(33)&&(s=pa.call(this),this.scanner.skipSC()),!1===this.scanner.eof&&this.scanner.tokenType!==ia&&!1===this.scanner.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.scanner.tokenStart),important:s,property:r,value:e}},generate:function(e){this.chunk(e.property),this.chunk(":"),this.node(e.value),e.important&&this.chunk(!0===e.important?"!important":"!"+e.important);},walkContext:"declaration"};function ha(){var e=this.scanner.tokenStart;if(this.scanner.tokenType===aa)switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.scanner.next();break;case 47:this.scanner.next(),this.scanner.isDelim(47)&&this.scanner.next();}return this.scanner.tokenType===na?this.eat(na):this.eat(ta),this.scanner.substrToCursor(e)}function pa(){this.eat(aa),this.scanner.skipSC();var e=this.consume(ta);return "important"===e||e}var da=Ce.TYPE,ma=ni.mode,ga=da.WhiteSpace,fa=da.Comment,ba=da.Semicolon;function ya(e){return this.Raw(e,ma.semicolonIncluded,!0)}var ka={name:"DeclarationList",structure:{children:[["Declaration"]]},parse:function(){for(var e=this.createList();!this.scanner.eof;)switch(this.scanner.tokenType){case ga:case fa:case ba:this.scanner.next();break;default:e.push(this.parseWithFallback(this.Declaration,ya));}return {type:"DeclarationList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(e){"Declaration"===e.type&&this.chunk(";");}));}},va=M.consumeNumber,xa=Ce.TYPE.Dimension,wa={name:"Dimension",structure:{value:String,unit:String},parse:function(){var e=this.scanner.tokenStart,t=va(this.scanner.source,e);return this.eat(xa),{type:"Dimension",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t),unit:this.scanner.source.substring(t,this.scanner.tokenStart)}},generate:function(e){this.chunk(e.value),this.chunk(e.unit);}},Sa=Ce.TYPE.RightParenthesis,Ca={name:"Function",structure:{name:String,children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart,i=this.consumeFunctionName(),a=i.toLowerCase();return n=t.hasOwnProperty(a)?t[a].call(this,t):e.call(this,t),this.scanner.eof||this.eat(Sa),{type:"Function",loc:this.getLocation(r,this.scanner.tokenStart),name:i,children:n}},generate:function(e){this.chunk(e.name),this.chunk("("),this.children(e),this.chunk(")");},walkContext:"function"},za=Ce.TYPE.Hash,Aa={name:"Hash",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(za),{type:"Hash",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.value);}},Pa=Ce.TYPE.Ident,Ta={name:"Identifier",structure:{name:String},parse:function(){return {type:"Identifier",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),name:this.consume(Pa)}},generate:function(e){this.chunk(e.name);}},La=Ce.TYPE.Hash,Ea={name:"IdSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.eat(La),{type:"IdSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e+1)}},generate:function(e){this.chunk("#"),this.chunk(e.name);}},Da=Ce.TYPE,Oa=Da.Ident,Ba=Da.Number,Ia=Da.Dimension,Na=Da.LeftParenthesis,Ra=Da.RightParenthesis,Ma=Da.Colon,ja=Da.Delim,_a={name:"MediaFeature",structure:{name:String,value:["Identifier","Number","Dimension","Ratio",null]},parse:function(){var e,t=this.scanner.tokenStart,n=null;if(this.eat(Na),this.scanner.skipSC(),e=this.consume(Oa),this.scanner.skipSC(),this.scanner.tokenType!==Ra){switch(this.eat(Ma),this.scanner.skipSC(),this.scanner.tokenType){case Ba:n=this.lookupNonWSType(1)===ja?this.Ratio():this.Number();break;case Ia:n=this.Dimension();break;case Oa:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected");}this.scanner.skipSC();}return this.eat(Ra),{type:"MediaFeature",loc:this.getLocation(t,this.scanner.tokenStart),name:e,value:n}},generate:function(e){this.chunk("("),this.chunk(e.name),null!==e.value&&(this.chunk(":"),this.node(e.value)),this.chunk(")");}},Fa=Ce.TYPE,Wa=Fa.WhiteSpace,qa=Fa.Comment,Ya=Fa.Ident,Ua=Fa.LeftParenthesis,Ha={name:"MediaQuery",structure:{children:[["Identifier","MediaFeature","WhiteSpace"]]},parse:function(){this.scanner.skipSC();var e=this.createList(),t=null,n=null;e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case qa:this.scanner.next();continue;case Wa:n=this.WhiteSpace();continue;case Ya:t=this.Identifier();break;case Ua:t=this.MediaFeature();break;default:break e}null!==n&&(e.push(n),n=null),e.push(t);}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e);}},Va=Ce.TYPE.Comma,Ka={name:"MediaQueryList",structure:{children:[["MediaQuery"]]},parse:function(e){var t=this.createList();for(this.scanner.skipSC();!this.scanner.eof&&(t.push(this.MediaQuery(e)),this.scanner.tokenType===Va);)this.scanner.next();return {type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}},generate:function(e){this.children(e,(function(){this.chunk(",");}));}},Ga=Ce.TYPE.Number,Qa={name:"Number",structure:{value:String},parse:function(){return {type:"Number",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Ga)}},generate:function(e){this.chunk(e.value);}},Xa={name:"Operator",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.next(),{type:"Operator",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value);}},Za=Ce.TYPE,$a=Za.LeftParenthesis,Ja=Za.RightParenthesis,eo={name:"Parentheses",structure:{children:[[]]},parse:function(e,t){var n,r=this.scanner.tokenStart;return this.eat($a),n=e.call(this,t),this.scanner.eof||this.eat(Ja),{type:"Parentheses",loc:this.getLocation(r,this.scanner.tokenStart),children:n}},generate:function(e){this.chunk("("),this.children(e),this.chunk(")");}},to=M.consumeNumber,no=Ce.TYPE.Percentage,ro={name:"Percentage",structure:{value:String},parse:function(){var e=this.scanner.tokenStart,t=to(this.scanner.source,e);return this.eat(no),{type:"Percentage",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.source.substring(e,t)}},generate:function(e){this.chunk(e.value),this.chunk("%");}},io=Ce.TYPE,ao=io.Ident,oo=io.Function,so=io.Colon,lo=io.RightParenthesis,co={name:"PseudoClassSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(so),this.scanner.tokenType===oo?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(lo)):e=this.consume(ao),{type:"PseudoClassSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk(":"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"));},walkContext:"function"},uo=Ce.TYPE,ho=uo.Ident,po=uo.Function,mo=uo.Colon,go=uo.RightParenthesis,fo={name:"PseudoElementSelector",structure:{name:String,children:[["Raw"],null]},parse:function(){var e,t,n=this.scanner.tokenStart,r=null;return this.eat(mo),this.eat(mo),this.scanner.tokenType===po?(t=(e=this.consumeFunctionName()).toLowerCase(),this.pseudo.hasOwnProperty(t)?(this.scanner.skipSC(),r=this.pseudo[t].call(this),this.scanner.skipSC()):(r=this.createList()).push(this.Raw(this.scanner.tokenIndex,null,!1)),this.eat(go)):e=this.consume(ho),{type:"PseudoElementSelector",loc:this.getLocation(n,this.scanner.tokenStart),name:e,children:r}},generate:function(e){this.chunk("::"),this.chunk(e.name),null!==e.children&&(this.chunk("("),this.children(e),this.chunk(")"));},walkContext:"function"},bo=Ce.isDigit,yo=Ce.TYPE,ko=yo.Number,vo=yo.Delim;function xo(){this.scanner.skipWS();for(var e=this.consume(ko),t=0;t<e.length;t++){var n=e.charCodeAt(t);bo(n)||46===n||this.error("Unsigned number is expected",this.scanner.tokenStart-e.length+t);}return 0===Number(e)&&this.error("Zero number is not allowed",this.scanner.tokenStart-e.length),e}var wo={name:"Ratio",structure:{left:String,right:String},parse:function(){var e,t=this.scanner.tokenStart,n=xo.call(this);return this.scanner.skipWS(),this.scanner.isDelim(47)||this.error("Solidus is expected"),this.eat(vo),e=xo.call(this),{type:"Ratio",loc:this.getLocation(t,this.scanner.tokenStart),left:n,right:e}},generate:function(e){this.chunk(e.left),this.chunk("/"),this.chunk(e.right);}},So=Ce.TYPE,Co=ni.mode,zo=So.LeftCurlyBracket;function Ao(e){return this.Raw(e,Co.leftCurlyBracket,!0)}function Po(){var e=this.SelectorList();return "Raw"!==e.type&&!1===this.scanner.eof&&this.scanner.tokenType!==zo&&this.error(),e}var To={name:"Rule",structure:{prelude:["SelectorList","Raw"],block:["Block"]},parse:function(){var e,t,n=this.scanner.tokenIndex,r=this.scanner.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Po,Ao):Ao.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.scanner.tokenStart),prelude:e,block:t}},generate:function(e){this.node(e.prelude),this.node(e.block);},walkContext:"rule"},Lo=Ce.TYPE.Comma,Eo={name:"SelectorList",structure:{children:[["Selector","Raw"]]},parse:function(){for(var e=this.createList();!this.scanner.eof&&(e.push(this.Selector()),this.scanner.tokenType===Lo);)this.scanner.next();return {type:"SelectorList",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e,(function(){this.chunk(",");}));},walkContext:"selector"},Do=Ce.TYPE.String,Oo={name:"String",structure:{value:String},parse:function(){return {type:"String",loc:this.getLocation(this.scanner.tokenStart,this.scanner.tokenEnd),value:this.consume(Do)}},generate:function(e){this.chunk(e.value);}},Bo=Ce.TYPE,Io=Bo.WhiteSpace,No=Bo.Comment,Ro=Bo.AtKeyword,Mo=Bo.CDO,jo=Bo.CDC;function _o(e){return this.Raw(e,null,!1)}var Fo={name:"StyleSheet",structure:{children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]},parse:function(){for(var e,t=this.scanner.tokenStart,n=this.createList();!this.scanner.eof;){switch(this.scanner.tokenType){case Io:this.scanner.next();continue;case No:if(33!==this.scanner.source.charCodeAt(this.scanner.tokenStart+2)){this.scanner.next();continue}e=this.Comment();break;case Mo:e=this.CDO();break;case jo:e=this.CDC();break;case Ro:e=this.parseWithFallback(this.Atrule,_o);break;default:e=this.parseWithFallback(this.Rule,_o);}n.push(e);}return {type:"StyleSheet",loc:this.getLocation(t,this.scanner.tokenStart),children:n}},generate:function(e){this.children(e);},walkContext:"stylesheet"},Wo=Ce.TYPE.Ident;function qo(){this.scanner.tokenType!==Wo&&!1===this.scanner.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.scanner.next();}var Yo={name:"TypeSelector",structure:{name:String},parse:function(){var e=this.scanner.tokenStart;return this.scanner.isDelim(124)?(this.scanner.next(),qo.call(this)):(qo.call(this),this.scanner.isDelim(124)&&(this.scanner.next(),qo.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.scanner.tokenStart),name:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.name);}},Uo=Ce.isHexDigit,Ho=Ce.cmpChar,Vo=Ce.TYPE,Ko=Ce.NAME,Go=Vo.Ident,Qo=Vo.Number,Xo=Vo.Dimension;function Zo(e,t){for(var n=this.scanner.tokenStart+e,r=0;n<this.scanner.tokenEnd;n++){var i=this.scanner.source.charCodeAt(n);if(45===i&&t&&0!==r)return 0===Zo.call(this,e+r+1,!1)&&this.error(),-1;Uo(i)||this.error(t&&0!==r?"HyphenMinus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n);}return this.scanner.next(),r}function $o(e){for(var t=0;this.scanner.isDelim(63);)++t>e&&this.error("Too many question marks"),this.scanner.next();}function Jo(e){this.scanner.source.charCodeAt(this.scanner.tokenStart)!==e&&this.error(Ko[e]+" is expected");}function es(){var e=0;return this.scanner.isDelim(43)?(this.scanner.next(),this.scanner.tokenType===Go?void((e=Zo.call(this,0,!0))>0&&$o.call(this,6-e)):this.scanner.isDelim(63)?(this.scanner.next(),void $o.call(this,5)):void this.error("Hex digit or question mark is expected")):this.scanner.tokenType===Qo?(Jo.call(this,43),e=Zo.call(this,1,!0),this.scanner.isDelim(63)?void $o.call(this,6-e):this.scanner.tokenType===Xo||this.scanner.tokenType===Qo?(Jo.call(this,45),void Zo.call(this,1,!1)):void 0):this.scanner.tokenType===Xo?(Jo.call(this,43),void((e=Zo.call(this,1,!0))>0&&$o.call(this,6-e))):void this.error()}var ts={name:"UnicodeRange",structure:{value:String},parse:function(){var e=this.scanner.tokenStart;return Ho(this.scanner.source,e,117)||this.error("U is expected"),Ho(this.scanner.source,e+1,43)||this.error("Plus sign is expected"),this.scanner.next(),es.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.scanner.tokenStart),value:this.scanner.substrToCursor(e)}},generate:function(e){this.chunk(e.value);}},ns=Ce.isWhiteSpace,rs=Ce.cmpStr,is=Ce.TYPE,as=is.Function,os=is.Url,ss=is.RightParenthesis,ls={name:"Url",structure:{value:["String","Raw"]},parse:function(){var e,t=this.scanner.tokenStart;switch(this.scanner.tokenType){case os:for(var n=t+4,r=this.scanner.tokenEnd-1;n<r&&ns(this.scanner.source.charCodeAt(n));)n++;for(;n<r&&ns(this.scanner.source.charCodeAt(r-1));)r--;e={type:"Raw",loc:this.getLocation(n,r),value:this.scanner.source.substring(n,r)},this.eat(os);break;case as:rs(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(as),this.scanner.skipSC(),e=this.String(),this.scanner.skipSC(),this.eat(ss);break;default:this.error("Url or Function is expected");}return {type:"Url",loc:this.getLocation(t,this.scanner.tokenStart),value:e}},generate:function(e){this.chunk("url"),this.chunk("("),this.node(e.value),this.chunk(")");}},cs=Ce.TYPE.WhiteSpace,us=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),hs={AnPlusB:Gr,Atrule:hi,AtrulePrelude:gi,AttributeSelector:Ci,Block:Mi,Brackets:Wi,CDC:Yi,CDO:Hi,ClassSelector:Ki,Combinator:Qi,Comment:Zi,Declaration:ua,DeclarationList:ka,Dimension:wa,Function:Ca,Hash:Aa,Identifier:Ta,IdSelector:Ea,MediaFeature:_a,MediaQuery:Ha,MediaQueryList:Ka,Nth:{name:"Nth",structure:{nth:["AnPlusB","Identifier"],selector:["SelectorList",null]},parse:function(e){this.scanner.skipSC();var t,n=this.scanner.tokenStart,r=n,i=null;return t=this.scanner.lookupValue(0,"odd")||this.scanner.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),this.scanner.skipSC(),e&&this.scanner.lookupValue(0,"of")?(this.scanner.next(),i=this.SelectorList(),this.needPositions&&(r=this.getLastListNode(i.children).loc.end.offset)):this.needPositions&&(r=t.loc.end.offset),{type:"Nth",loc:this.getLocation(n,r),nth:t,selector:i}},generate:function(e){this.node(e.nth),null!==e.selector&&(this.chunk(" of "),this.node(e.selector));}},Number:Qa,Operator:Xa,Parentheses:eo,Percentage:ro,PseudoClassSelector:co,PseudoElementSelector:fo,Ratio:wo,Raw:ni,Rule:To,Selector:{name:"Selector",structure:{children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]},parse:function(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}},generate:function(e){this.children(e);}},SelectorList:Eo,String:Oo,StyleSheet:Fo,TypeSelector:Yo,UnicodeRange:ts,Url:ls,Value:{name:"Value",structure:{children:[[]]},parse:function(){var e=this.scanner.tokenStart,t=this.readSequence(this.scope.Value);return {type:"Value",loc:this.getLocation(e,this.scanner.tokenStart),children:t}},generate:function(e){this.children(e);}},WhiteSpace:{name:"WhiteSpace",structure:{value:String},parse:function(){return this.eat(cs),us},generate:function(e){this.chunk(e.value);}}},ps={generic:!0,types:Nr.types,atrules:Nr.atrules,properties:Nr.properties,node:hs},ds=Ce.cmpChar,ms=Ce.cmpStr,gs=Ce.TYPE,fs=gs.Ident,bs=gs.String,ys=gs.Number,ks=gs.Function,vs=gs.Url,xs=gs.Hash,ws=gs.Dimension,Ss=gs.Percentage,Cs=gs.LeftParenthesis,zs=gs.LeftSquareBracket,As=gs.Comma,Ps=gs.Delim,Ts=function(e){switch(this.scanner.tokenType){case xs:return this.Hash();case As:return e.space=null,e.ignoreWSAfter=!0,this.Operator();case Cs:return this.Parentheses(this.readSequence,e.recognizer);case zs:return this.Brackets(this.readSequence,e.recognizer);case bs:return this.String();case ws:return this.Dimension();case Ss:return this.Percentage();case ys:return this.Number();case ks:return ms(this.scanner.source,this.scanner.tokenStart,this.scanner.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case vs:return this.Url();case fs:return ds(this.scanner.source,this.scanner.tokenStart,117)&&ds(this.scanner.source,this.scanner.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case Ps:var t=this.scanner.source.charCodeAt(this.scanner.tokenStart);if(47===t||42===t||43===t||45===t)return this.Operator();35===t&&this.error("Hex or identifier is expected",this.scanner.tokenStart+1);}},Ls={getNode:Ts},Es=Ce.TYPE,Ds=Es.Delim,Os=Es.Ident,Bs=Es.Dimension,Is=Es.Percentage,Ns=Es.Number,Rs=Es.Hash,Ms=Es.Colon,js=Es.LeftSquareBracket;var _s={getNode:function(e){switch(this.scanner.tokenType){case js:return this.AttributeSelector();case Rs:return this.IdSelector();case Ms:return this.scanner.lookupType(1)===Ms?this.PseudoElementSelector():this.PseudoClassSelector();case Os:return this.TypeSelector();case Ns:case Is:return this.Percentage();case Bs:46===this.scanner.source.charCodeAt(this.scanner.tokenStart)&&this.error("Identifier is expected",this.scanner.tokenStart+1);break;case Ds:switch(this.scanner.source.charCodeAt(this.scanner.tokenStart)){case 43:case 62:case 126:return e.space=null,e.ignoreWSAfter=!0,this.Combinator();case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}},Fs=Ce.TYPE,Ws=ni.mode,qs=Fs.Comma,Ys=Fs.WhiteSpace,Us={AtrulePrelude:Ls,Selector:_s,Value:{getNode:Ts,expression:function(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))},var:function(){var e=this.createList();if(this.scanner.skipSC(),e.push(this.Identifier()),this.scanner.skipSC(),this.scanner.tokenType===qs){e.push(this.Operator());const t=this.scanner.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.scanner.tokenIndex,Ws.exclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty())for(let e=t-this.scanner.tokenIndex;e<=0;e++)if(this.scanner.lookupType(e)===Ys){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n);}return e}}},Hs=Ce.TYPE,Vs=Hs.String,Ks=Hs.Ident,Gs=Hs.Url,Qs=Hs.Function,Xs=Hs.LeftParenthesis,Zs={parse:{prelude:function(){var e=this.createList();switch(this.scanner.skipSC(),this.scanner.tokenType){case Vs:e.push(this.String());break;case Gs:case Qs:e.push(this.Url());break;default:this.error("String or url() is expected");}return this.lookupNonWSType(0)!==Ks&&this.lookupNonWSType(0)!==Xs||(e.push(this.WhiteSpace()),e.push(this.MediaQueryList())),e},block:null}},$s=Ce.TYPE,Js=$s.WhiteSpace,el=$s.Comment,tl=$s.Ident,nl=$s.Function,rl=$s.Colon,il=$s.LeftParenthesis;function al(){return this.createSingleNodeList(this.Raw(this.scanner.tokenIndex,null,!1))}function ol(){return this.scanner.skipSC(),this.scanner.tokenType===tl&&this.lookupNonWSType(1)===rl?this.createSingleNodeList(this.Declaration()):sl.call(this)}function sl(){var e,t=this.createList(),n=null;this.scanner.skipSC();e:for(;!this.scanner.eof;){switch(this.scanner.tokenType){case Js:n=this.WhiteSpace();continue;case el:this.scanner.next();continue;case nl:e=this.Function(al,this.scope.AtrulePrelude);break;case tl:e=this.Identifier();break;case il:e=this.Parentheses(ol,this.scope.AtrulePrelude);break;default:break e}null!==n&&(t.push(n),n=null),t.push(e);}return t}var ll,cl={parse:function(){return this.createSingleNodeList(this.SelectorList())}},ul={parse:function(){return this.createSingleNodeList(this.Nth(!0))}},hl={parse:function(){return this.createSingleNodeList(this.Nth(!1))}},pl={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Us,atrule:{"font-face":{parse:{prelude:null,block:function(){return this.Block(!0)}}},import:Zs,media:{parse:{prelude:function(){return this.createSingleNodeList(this.MediaQueryList())},block:function(){return this.Block(!1)}}},page:{parse:{prelude:function(){return this.createSingleNodeList(this.SelectorList())},block:function(){return this.Block(!0)}}},supports:{parse:{prelude:function(){var e=sl.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block:function(){return this.Block(!1)}}}},pseudo:{dir:{parse:function(){return this.createSingleNodeList(this.Identifier())}},has:{parse:function(){return this.createSingleNodeList(this.SelectorList())}},lang:{parse:function(){return this.createSingleNodeList(this.Identifier())}},matches:cl,not:cl,"nth-child":ul,"nth-last-child":ul,"nth-last-of-type":hl,"nth-of-type":hl,slotted:{parse:function(){return this.createSingleNodeList(this.Selector())}}},node:hs},dl={node:hs},ml={version:"1.1.2"},gl=(ll=Object.freeze({__proto__:null,version:"1.1.2",default:ml}))&&ll.default||ll;var fl=Ir(function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r];}return e}(ps,pl,dl)),bl=gl.version;return fl.version=bl,fl}));
|
30505 | });
|
30506 |
|
30507 | var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
|
30508 |
|
30509 | function buildMap(list, caseInsensitive) {
|
30510 | var map = Object.create(null);
|
30511 |
|
30512 | if (!Array.isArray(list)) {
|
30513 | return null;
|
30514 | }
|
30515 |
|
30516 | for (var i = 0; i < list.length; i++) {
|
30517 | var name = list[i];
|
30518 |
|
30519 | if (caseInsensitive) {
|
30520 | name = name.toLowerCase();
|
30521 | }
|
30522 |
|
30523 | map[name] = true;
|
30524 | }
|
30525 |
|
30526 | return map;
|
30527 | }
|
30528 |
|
30529 | function buildList(data) {
|
30530 | if (!data) {
|
30531 | return null;
|
30532 | }
|
30533 |
|
30534 | var tags = buildMap(data.tags, true);
|
30535 | var ids = buildMap(data.ids);
|
30536 | var classes = buildMap(data.classes);
|
30537 |
|
30538 | if (tags === null &&
|
30539 | ids === null &&
|
30540 | classes === null) {
|
30541 | return null;
|
30542 | }
|
30543 |
|
30544 | return {
|
30545 | tags: tags,
|
30546 | ids: ids,
|
30547 | classes: classes
|
30548 | };
|
30549 | }
|
30550 |
|
30551 | function buildIndex(data) {
|
30552 | var scopes = false;
|
30553 |
|
30554 | if (data.scopes && Array.isArray(data.scopes)) {
|
30555 | scopes = Object.create(null);
|
30556 |
|
30557 | for (var i = 0; i < data.scopes.length; i++) {
|
30558 | var list = data.scopes[i];
|
30559 |
|
30560 | if (!list || !Array.isArray(list)) {
|
30561 | throw new Error('Wrong usage format');
|
30562 | }
|
30563 |
|
30564 | for (var j = 0; j < list.length; j++) {
|
30565 | var name = list[j];
|
30566 |
|
30567 | if (hasOwnProperty$7.call(scopes, name)) {
|
30568 | throw new Error('Class can\'t be used for several scopes: ' + name);
|
30569 | }
|
30570 |
|
30571 | scopes[name] = i + 1;
|
30572 | }
|
30573 | }
|
30574 | }
|
30575 |
|
30576 | return {
|
30577 | whitelist: buildList(data),
|
30578 | blacklist: buildList(data.blacklist),
|
30579 | scopes: scopes
|
30580 | };
|
30581 | }
|
30582 |
|
30583 | var usage = {
|
30584 | buildIndex: buildIndex
|
30585 | };
|
30586 |
|
30587 | var utils$1 = {
|
30588 | hasNoChildren: function(node) {
|
30589 | return !node || !node.children || node.children.isEmpty();
|
30590 | },
|
30591 | isNodeChildrenList: function(node, list) {
|
30592 | return node !== null && node.children === list;
|
30593 | }
|
30594 | };
|
30595 |
|
30596 | var resolveKeyword = csstree_min.keyword;
|
30597 | var { hasNoChildren } = utils$1;
|
30598 |
|
30599 | var Atrule$1 = function cleanAtrule(node, item, list) {
|
30600 | if (node.block) {
|
30601 |
|
30602 | if (this.stylesheet !== null) {
|
30603 | this.stylesheet.firstAtrulesAllowed = false;
|
30604 | }
|
30605 |
|
30606 | if (hasNoChildren(node.block)) {
|
30607 | list.remove(item);
|
30608 | return;
|
30609 | }
|
30610 | }
|
30611 |
|
30612 | switch (node.name) {
|
30613 | case 'charset':
|
30614 | if (hasNoChildren(node.prelude)) {
|
30615 | list.remove(item);
|
30616 | return;
|
30617 | }
|
30618 |
|
30619 |
|
30620 | if (item.prev) {
|
30621 | list.remove(item);
|
30622 | return;
|
30623 | }
|
30624 |
|
30625 | break;
|
30626 |
|
30627 | case 'import':
|
30628 | if (this.stylesheet === null || !this.stylesheet.firstAtrulesAllowed) {
|
30629 | list.remove(item);
|
30630 | return;
|
30631 | }
|
30632 |
|
30633 |
|
30634 |
|
30635 | list.prevUntil(item.prev, function(rule) {
|
30636 | if (rule.type === 'Atrule') {
|
30637 | if (rule.name === 'import' || rule.name === 'charset') {
|
30638 | return;
|
30639 | }
|
30640 | }
|
30641 |
|
30642 | this.root.firstAtrulesAllowed = false;
|
30643 | list.remove(item);
|
30644 | return true;
|
30645 | }, this);
|
30646 |
|
30647 | break;
|
30648 |
|
30649 | default:
|
30650 | var name = resolveKeyword(node.name).basename;
|
30651 | if (name === 'keyframes' ||
|
30652 | name === 'media' ||
|
30653 | name === 'supports') {
|
30654 |
|
30655 |
|
30656 | if (hasNoChildren(node.prelude) || hasNoChildren(node.block)) {
|
30657 | list.remove(item);
|
30658 | }
|
30659 | }
|
30660 | }
|
30661 | };
|
30662 |
|
30663 | var Comment$1 = function cleanComment(data, item, list) {
|
30664 | list.remove(item);
|
30665 | };
|
30666 |
|
30667 | var property = csstree_min.property;
|
30668 |
|
30669 | var Declaration$1 = function cleanDeclartion(node, item, list) {
|
30670 | if (node.value.children && node.value.children.isEmpty()) {
|
30671 | list.remove(item);
|
30672 | return;
|
30673 | }
|
30674 |
|
30675 | if (property(node.property).custom) {
|
30676 | if (/\S/.test(node.value.value)) {
|
30677 | node.value.value = node.value.value.trim();
|
30678 | }
|
30679 | }
|
30680 | };
|
30681 |
|
30682 | var { isNodeChildrenList } = utils$1;
|
30683 |
|
30684 | var Raw$1 = function cleanRaw(node, item, list) {
|
30685 |
|
30686 | if (isNodeChildrenList(this.stylesheet, list) ||
|
30687 | isNodeChildrenList(this.block, list)) {
|
30688 | list.remove(item);
|
30689 | }
|
30690 | };
|
30691 |
|
30692 | var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
|
30693 | var walk$1 = csstree_min.walk;
|
30694 | var { hasNoChildren: hasNoChildren$1 } = utils$1;
|
30695 |
|
30696 | function cleanUnused(selectorList, usageData) {
|
30697 | selectorList.children.each(function(selector, item, list) {
|
30698 | var shouldRemove = false;
|
30699 |
|
30700 | walk$1(selector, function(node) {
|
30701 |
|
30702 | if (this.selector === null || this.selector === selectorList) {
|
30703 | switch (node.type) {
|
30704 | case 'SelectorList':
|
30705 |
|
30706 |
|
30707 | if (this.function === null || this.function.name.toLowerCase() !== 'not') {
|
30708 | if (cleanUnused(node, usageData)) {
|
30709 | shouldRemove = true;
|
30710 | }
|
30711 | }
|
30712 | break;
|
30713 |
|
30714 | case 'ClassSelector':
|
30715 | if (usageData.whitelist !== null &&
|
30716 | usageData.whitelist.classes !== null &&
|
30717 | !hasOwnProperty$8.call(usageData.whitelist.classes, node.name)) {
|
30718 | shouldRemove = true;
|
30719 | }
|
30720 | if (usageData.blacklist !== null &&
|
30721 | usageData.blacklist.classes !== null &&
|
30722 | hasOwnProperty$8.call(usageData.blacklist.classes, node.name)) {
|
30723 | shouldRemove = true;
|
30724 | }
|
30725 | break;
|
30726 |
|
30727 | case 'IdSelector':
|
30728 | if (usageData.whitelist !== null &&
|
30729 | usageData.whitelist.ids !== null &&
|
30730 | !hasOwnProperty$8.call(usageData.whitelist.ids, node.name)) {
|
30731 | shouldRemove = true;
|
30732 | }
|
30733 | if (usageData.blacklist !== null &&
|
30734 | usageData.blacklist.ids !== null &&
|
30735 | hasOwnProperty$8.call(usageData.blacklist.ids, node.name)) {
|
30736 | shouldRemove = true;
|
30737 | }
|
30738 | break;
|
30739 |
|
30740 | case 'TypeSelector':
|
30741 |
|
30742 |
|
30743 | if (node.name.charAt(node.name.length - 1) !== '*') {
|
30744 | if (usageData.whitelist !== null &&
|
30745 | usageData.whitelist.tags !== null &&
|
30746 | !hasOwnProperty$8.call(usageData.whitelist.tags, node.name.toLowerCase())) {
|
30747 | shouldRemove = true;
|
30748 | }
|
30749 | if (usageData.blacklist !== null &&
|
30750 | usageData.blacklist.tags !== null &&
|
30751 | hasOwnProperty$8.call(usageData.blacklist.tags, node.name.toLowerCase())) {
|
30752 | shouldRemove = true;
|
30753 | }
|
30754 | }
|
30755 | break;
|
30756 | }
|
30757 | }
|
30758 | });
|
30759 |
|
30760 | if (shouldRemove) {
|
30761 | list.remove(item);
|
30762 | }
|
30763 | });
|
30764 |
|
30765 | return selectorList.children.isEmpty();
|
30766 | }
|
30767 |
|
30768 | var Rule$1 = function cleanRule(node, item, list, options) {
|
30769 | if (hasNoChildren$1(node.prelude) || hasNoChildren$1(node.block)) {
|
30770 | list.remove(item);
|
30771 | return;
|
30772 | }
|
30773 |
|
30774 | var usageData = options.usage;
|
30775 |
|
30776 | if (usageData && (usageData.whitelist !== null || usageData.blacklist !== null)) {
|
30777 | cleanUnused(node.prelude, usageData);
|
30778 |
|
30779 | if (hasNoChildren$1(node.prelude)) {
|
30780 | list.remove(item);
|
30781 | return;
|
30782 | }
|
30783 | }
|
30784 | };
|
30785 |
|
30786 |
|
30787 | var TypeSelector$1 = function cleanTypeSelector(node, item, list) {
|
30788 | var name = item.data.name;
|
30789 |
|
30790 |
|
30791 | if (name !== '*') {
|
30792 | return;
|
30793 | }
|
30794 |
|
30795 |
|
30796 | var nextType = item.next && item.next.data.type;
|
30797 | if (nextType === 'IdSelector' ||
|
30798 | nextType === 'ClassSelector' ||
|
30799 | nextType === 'AttributeSelector' ||
|
30800 | nextType === 'PseudoClassSelector' ||
|
30801 | nextType === 'PseudoElementSelector') {
|
30802 | list.remove(item);
|
30803 | }
|
30804 | };
|
30805 |
|
30806 | var { isNodeChildrenList: isNodeChildrenList$1 } = utils$1;
|
30807 |
|
30808 | function isSafeOperator(node) {
|
30809 | return node.type === 'Operator' && node.value !== '+' && node.value !== '-';
|
30810 | }
|
30811 |
|
30812 | var WhiteSpace$2 = function cleanWhitespace(node, item, list) {
|
30813 |
|
30814 | if (item.next === null || item.prev === null) {
|
30815 | list.remove(item);
|
30816 | return;
|
30817 | }
|
30818 |
|
30819 |
|
30820 | if (isNodeChildrenList$1(this.stylesheet, list) ||
|
30821 | isNodeChildrenList$1(this.block, list)) {
|
30822 | list.remove(item);
|
30823 | return;
|
30824 | }
|
30825 |
|
30826 | if (item.next.data.type === 'WhiteSpace') {
|
30827 | list.remove(item);
|
30828 | return;
|
30829 | }
|
30830 |
|
30831 | if (isSafeOperator(item.prev.data) || isSafeOperator(item.next.data)) {
|
30832 | list.remove(item);
|
30833 | return;
|
30834 | }
|
30835 | };
|
30836 |
|
30837 | var walk$2 = csstree_min.walk;
|
30838 | var handlers = {
|
30839 | Atrule: Atrule$1,
|
30840 | Comment: Comment$1,
|
30841 | Declaration: Declaration$1,
|
30842 | Raw: Raw$1,
|
30843 | Rule: Rule$1,
|
30844 | TypeSelector: TypeSelector$1,
|
30845 | WhiteSpace: WhiteSpace$2
|
30846 | };
|
30847 |
|
30848 | var clean = function(ast, options) {
|
30849 | walk$2(ast, {
|
30850 | leave: function(node, item, list) {
|
30851 | if (handlers.hasOwnProperty(node.type)) {
|
30852 | handlers[node.type].call(this, node, item, list, options);
|
30853 | }
|
30854 | }
|
30855 | });
|
30856 | };
|
30857 |
|
30858 | var keyframes = function(node) {
|
30859 | node.block.children.each(function(rule) {
|
30860 | rule.prelude.children.each(function(simpleselector) {
|
30861 | simpleselector.children.each(function(data, item) {
|
30862 | if (data.type === 'Percentage' && data.value === '100') {
|
30863 | item.data = {
|
30864 | type: 'TypeSelector',
|
30865 | loc: data.loc,
|
30866 | name: 'to'
|
30867 | };
|
30868 | } else if (data.type === 'TypeSelector' && data.name === 'from') {
|
30869 | item.data = {
|
30870 | type: 'Percentage',
|
30871 | loc: data.loc,
|
30872 | value: '0'
|
30873 | };
|
30874 | }
|
30875 | });
|
30876 | });
|
30877 | });
|
30878 | };
|
30879 |
|
30880 | var resolveKeyword$1 = csstree_min.keyword;
|
30881 |
|
30882 |
|
30883 | var Atrule$2 = function(node) {
|
30884 |
|
30885 | if (resolveKeyword$1(node.name).basename === 'keyframes') {
|
30886 | keyframes(node);
|
30887 | }
|
30888 | };
|
30889 |
|
30890 |
|
30891 |
|
30892 |
|
30893 | var escapesRx = /\\([0-9A-Fa-f]{1,6})(\r\n|[ \t\n\f\r])?|\\./g;
|
30894 | var blockUnquoteRx = /^(-?\d|--)|[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;
|
30895 |
|
30896 | function canUnquote(value) {
|
30897 | if (value === '' || value === '-') {
|
30898 | return;
|
30899 | }
|
30900 |
|
30901 |
|
30902 | value = value.replace(escapesRx, 'a');
|
30903 |
|
30904 | return !blockUnquoteRx.test(value);
|
30905 | }
|
30906 |
|
30907 | var AttributeSelector$1 = function(node) {
|
30908 | var attrValue = node.value;
|
30909 |
|
30910 | if (!attrValue || attrValue.type !== 'String') {
|
30911 | return;
|
30912 | }
|
30913 |
|
30914 | var unquotedValue = attrValue.value.replace(/^(.)(.*)\1$/, '$2');
|
30915 | if (canUnquote(unquotedValue)) {
|
30916 | node.value = {
|
30917 | type: 'Identifier',
|
30918 | loc: attrValue.loc,
|
30919 | name: unquotedValue
|
30920 | };
|
30921 | }
|
30922 | };
|
30923 |
|
30924 | var font$1 = function compressFont(node) {
|
30925 | var list = node.children;
|
30926 |
|
30927 | list.eachRight(function(node, item) {
|
30928 | if (node.type === 'Identifier') {
|
30929 | if (node.name === 'bold') {
|
30930 | item.data = {
|
30931 | type: 'Number',
|
30932 | loc: node.loc,
|
30933 | value: '700'
|
30934 | };
|
30935 | } else if (node.name === 'normal') {
|
30936 | var prev = item.prev;
|
30937 |
|
30938 | if (prev && prev.data.type === 'Operator' && prev.data.value === '/') {
|
30939 | this.remove(prev);
|
30940 | }
|
30941 |
|
30942 | this.remove(item);
|
30943 | } else if (node.name === 'medium') {
|
30944 | var next = item.next;
|
30945 |
|
30946 | if (!next || next.data.type !== 'Operator') {
|
30947 | this.remove(item);
|
30948 | }
|
30949 | }
|
30950 | }
|
30951 | });
|
30952 |
|
30953 |
|
30954 | list.each(function(node, item) {
|
30955 | if (node.type === 'WhiteSpace') {
|
30956 | if (!item.prev || !item.next || item.next.data.type === 'WhiteSpace') {
|
30957 | this.remove(item);
|
30958 | }
|
30959 | }
|
30960 | });
|
30961 |
|
30962 | if (list.isEmpty()) {
|
30963 | list.insert(list.createItem({
|
30964 | type: 'Identifier',
|
30965 | name: 'normal'
|
30966 | }));
|
30967 | }
|
30968 | };
|
30969 |
|
30970 | var fontWeight = function compressFontWeight(node) {
|
30971 | var value = node.children.head.data;
|
30972 |
|
30973 | if (value.type === 'Identifier') {
|
30974 | switch (value.name) {
|
30975 | case 'normal':
|
30976 | node.children.head.data = {
|
30977 | type: 'Number',
|
30978 | loc: value.loc,
|
30979 | value: '400'
|
30980 | };
|
30981 | break;
|
30982 | case 'bold':
|
30983 | node.children.head.data = {
|
30984 | type: 'Number',
|
30985 | loc: value.loc,
|
30986 | value: '700'
|
30987 | };
|
30988 | break;
|
30989 | }
|
30990 | }
|
30991 | };
|
30992 |
|
30993 | var List$2 = csstree_min.List;
|
30994 |
|
30995 | var background$1 = function compressBackground(node) {
|
30996 | function lastType() {
|
30997 | if (buffer.length) {
|
30998 | return buffer[buffer.length - 1].type;
|
30999 | }
|
31000 | }
|
31001 |
|
31002 | function flush() {
|
31003 | if (lastType() === 'WhiteSpace') {
|
31004 | buffer.pop();
|
31005 | }
|
31006 |
|
31007 | if (!buffer.length) {
|
31008 | buffer.unshift(
|
31009 | {
|
31010 | type: 'Number',
|
31011 | loc: null,
|
31012 | value: '0'
|
31013 | },
|
31014 | {
|
31015 | type: 'WhiteSpace',
|
31016 | value: ' '
|
31017 | },
|
31018 | {
|
31019 | type: 'Number',
|
31020 | loc: null,
|
31021 | value: '0'
|
31022 | }
|
31023 | );
|
31024 | }
|
31025 |
|
31026 | newValue.push.apply(newValue, buffer);
|
31027 |
|
31028 | buffer = [];
|
31029 | }
|
31030 |
|
31031 | var newValue = [];
|
31032 | var buffer = [];
|
31033 |
|
31034 | node.children.each(function(node) {
|
31035 | if (node.type === 'Operator' && node.value === ',') {
|
31036 | flush();
|
31037 | newValue.push(node);
|
31038 | return;
|
31039 | }
|
31040 |
|
31041 |
|
31042 | if (node.type === 'Identifier') {
|
31043 | if (node.name === 'transparent' ||
|
31044 | node.name === 'none' ||
|
31045 | node.name === 'repeat' ||
|
31046 | node.name === 'scroll') {
|
31047 | return;
|
31048 | }
|
31049 | }
|
31050 |
|
31051 |
|
31052 | if (node.type === 'WhiteSpace' && (!buffer.length || lastType() === 'WhiteSpace')) {
|
31053 | return;
|
31054 | }
|
31055 |
|
31056 | buffer.push(node);
|
31057 | });
|
31058 |
|
31059 | flush();
|
31060 | node.children = new List$2().fromArray(newValue);
|
31061 | };
|
31062 |
|
31063 | function removeItemAndRedundantWhiteSpace(list, item) {
|
31064 | var prev = item.prev;
|
31065 | var next = item.next;
|
31066 |
|
31067 | if (next !== null) {
|
31068 | if (next.data.type === 'WhiteSpace' && (prev === null || prev.data.type === 'WhiteSpace')) {
|
31069 | list.remove(next);
|
31070 | }
|
31071 | } else if (prev !== null && prev.data.type === 'WhiteSpace') {
|
31072 | list.remove(prev);
|
31073 | }
|
31074 |
|
31075 | list.remove(item);
|
31076 | }
|
31077 |
|
31078 | var border$1 = function compressBorder(node) {
|
31079 | node.children.each(function(node, item, list) {
|
31080 | if (node.type === 'Identifier' && node.name.toLowerCase() === 'none') {
|
31081 | if (list.head === list.tail) {
|
31082 |
|
31083 | item.data = {
|
31084 | type: 'Number',
|
31085 | loc: node.loc,
|
31086 | value: '0'
|
31087 | };
|
31088 | } else {
|
31089 | removeItemAndRedundantWhiteSpace(list, item);
|
31090 | }
|
31091 | }
|
31092 | });
|
31093 | };
|
31094 |
|
31095 | var resolveName = csstree_min.property;
|
31096 | var handlers$1 = {
|
31097 | 'font': font$1,
|
31098 | 'font-weight': fontWeight,
|
31099 | 'background': background$1,
|
31100 | 'border': border$1,
|
31101 | 'outline': border$1
|
31102 | };
|
31103 |
|
31104 | var Value$1 = function compressValue(node) {
|
31105 | if (!this.declaration) {
|
31106 | return;
|
31107 | }
|
31108 |
|
31109 | var property = resolveName(this.declaration.property);
|
31110 |
|
31111 | if (handlers$1.hasOwnProperty(property.basename)) {
|
31112 | handlers$1[property.basename](node);
|
31113 | }
|
31114 | };
|
31115 |
|
31116 | var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
|
31117 | var KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
|
31118 | var unsafeToRemovePlusSignAfter = {
|
31119 | Dimension: true,
|
31120 | Hash: true,
|
31121 | Identifier: true,
|
31122 | Number: true,
|
31123 | Raw: true,
|
31124 | UnicodeRange: true
|
31125 | };
|
31126 |
|
31127 | function packNumber(value, item) {
|
31128 |
|
31129 | var regexp = item && item.prev !== null && unsafeToRemovePlusSignAfter.hasOwnProperty(item.prev.data.type)
|
31130 | ? KEEP_PLUSSIGN
|
31131 | : OMIT_PLUSSIGN;
|
31132 |
|
31133 |
|
31134 |
|
31135 |
|
31136 |
|
31137 |
|
31138 |
|
31139 |
|
31140 |
|
31141 |
|
31142 | value = String(value).replace(regexp, '$1$2$3');
|
31143 |
|
31144 | if (value === '' || value === '-') {
|
31145 | value = '0';
|
31146 | }
|
31147 |
|
31148 | return value;
|
31149 | }
|
31150 |
|
31151 | var _Number$1 = function(node, item) {
|
31152 | node.value = packNumber(node.value, item);
|
31153 | };
|
31154 | var pack = packNumber;
|
31155 | _Number$1.pack = pack;
|
31156 |
|
31157 | var packNumber$1 = _Number$1.pack;
|
31158 | var MATH_FUNCTIONS = {
|
31159 | 'calc': true,
|
31160 | 'min': true,
|
31161 | 'max': true,
|
31162 | 'clamp': true
|
31163 | };
|
31164 | var LENGTH_UNIT = {
|
31165 |
|
31166 | 'px': true,
|
31167 | 'mm': true,
|
31168 | 'cm': true,
|
31169 | 'in': true,
|
31170 | 'pt': true,
|
31171 | 'pc': true,
|
31172 |
|
31173 |
|
31174 | 'em': true,
|
31175 | 'ex': true,
|
31176 | 'ch': true,
|
31177 | 'rem': true,
|
31178 |
|
31179 |
|
31180 | 'vh': true,
|
31181 | 'vw': true,
|
31182 | 'vmin': true,
|
31183 | 'vmax': true,
|
31184 | 'vm': true
|
31185 | };
|
31186 |
|
31187 | var Dimension$1 = function compressDimension(node, item) {
|
31188 | var value = packNumber$1(node.value, item);
|
31189 |
|
31190 | node.value = value;
|
31191 |
|
31192 | if (value === '0' && this.declaration !== null && this.atrulePrelude === null) {
|
31193 | var unit = node.unit.toLowerCase();
|
31194 |
|
31195 |
|
31196 | if (!LENGTH_UNIT.hasOwnProperty(unit)) {
|
31197 | return;
|
31198 | }
|
31199 |
|
31200 |
|
31201 |
|
31202 | if (this.declaration.property === '-ms-flex' ||
|
31203 | this.declaration.property === 'flex') {
|
31204 | return;
|
31205 | }
|
31206 |
|
31207 |
|
31208 | if (this.function && MATH_FUNCTIONS.hasOwnProperty(this.function.name)) {
|
31209 | return;
|
31210 | }
|
31211 |
|
31212 | item.data = {
|
31213 | type: 'Number',
|
31214 | loc: node.loc,
|
31215 | value: value
|
31216 | };
|
31217 | }
|
31218 | };
|
31219 |
|
31220 | var lexer$1 = csstree_min.lexer;
|
31221 | var packNumber$2 = _Number$1.pack;
|
31222 | var blacklist = new Set([
|
31223 |
|
31224 | 'width',
|
31225 | 'min-width',
|
31226 | 'max-width',
|
31227 | 'height',
|
31228 | 'min-height',
|
31229 | 'max-height',
|
31230 |
|
31231 |
|
31232 |
|
31233 |
|
31234 | 'flex',
|
31235 | '-ms-flex'
|
31236 | ]);
|
31237 |
|
31238 | var Percentage$1 = function compressPercentage(node, item) {
|
31239 | node.value = packNumber$2(node.value, item);
|
31240 |
|
31241 | if (node.value === '0' && this.declaration && !blacklist.has(this.declaration.property)) {
|
31242 |
|
31243 | item.data = {
|
31244 | type: 'Number',
|
31245 | loc: node.loc,
|
31246 | value: node.value
|
31247 | };
|
31248 |
|
31249 |
|
31250 | if (!lexer$1.matchDeclaration(this.declaration).isType(item.data, 'length')) {
|
31251 |
|
31252 | item.data = node;
|
31253 | }
|
31254 | }
|
31255 | };
|
31256 |
|
31257 | var _String$1 = function(node) {
|
31258 | var value = node.value;
|
31259 |
|
31260 |
|
31261 |
|
31262 |
|
31263 |
|
31264 |
|
31265 | value = value.replace(/\\(\r\n|\r|\n|\f)/g, '');
|
31266 |
|
31267 | node.value = value;
|
31268 | };
|
31269 |
|
31270 | var UNICODE = '\\\\[0-9a-f]{1,6}(\\r\\n|[ \\n\\r\\t\\f])?';
|
31271 | var ESCAPE = '(' + UNICODE + '|\\\\[^\\n\\r\\f0-9a-fA-F])';
|
31272 | var NONPRINTABLE = '\u0000\u0008\u000b\u000e-\u001f\u007f';
|
31273 | var SAFE_URL = new RegExp('^(' + ESCAPE + '|[^\"\'\\(\\)\\\\\\s' + NONPRINTABLE + '])*$', 'i');
|
31274 |
|
31275 | var Url$1 = function(node) {
|
31276 | var value = node.value;
|
31277 |
|
31278 | if (value.type !== 'String') {
|
31279 | return;
|
31280 | }
|
31281 |
|
31282 | var quote = value.value[0];
|
31283 | var url = value.value.substr(1, value.value.length - 2);
|
31284 |
|
31285 |
|
31286 | url = url.replace(/\\\\/g, '/');
|
31287 |
|
31288 |
|
31289 |
|
31290 | if (SAFE_URL.test(url)) {
|
31291 | node.value = {
|
31292 | type: 'Raw',
|
31293 | loc: node.value.loc,
|
31294 | value: url
|
31295 | };
|
31296 | } else {
|
31297 |
|
31298 |
|
31299 |
|
31300 | node.value.value = url.indexOf('"') === -1 ? '"' + url + '"' : quote + url + quote;
|
31301 | }
|
31302 | };
|
31303 |
|
31304 | var lexer$2 = csstree_min.lexer;
|
31305 | var packNumber$3 = _Number$1.pack;
|
31306 |
|
31307 |
|
31308 | var NAME_TO_HEX = {
|
31309 | 'aliceblue': 'f0f8ff',
|
31310 | 'antiquewhite': 'faebd7',
|
31311 | 'aqua': '0ff',
|
31312 | 'aquamarine': '7fffd4',
|
31313 | 'azure': 'f0ffff',
|
31314 | 'beige': 'f5f5dc',
|
31315 | 'bisque': 'ffe4c4',
|
31316 | 'black': '000',
|
31317 | 'blanchedalmond': 'ffebcd',
|
31318 | 'blue': '00f',
|
31319 | 'blueviolet': '8a2be2',
|
31320 | 'brown': 'a52a2a',
|
31321 | 'burlywood': 'deb887',
|
31322 | 'cadetblue': '5f9ea0',
|
31323 | 'chartreuse': '7fff00',
|
31324 | 'chocolate': 'd2691e',
|
31325 | 'coral': 'ff7f50',
|
31326 | 'cornflowerblue': '6495ed',
|
31327 | 'cornsilk': 'fff8dc',
|
31328 | 'crimson': 'dc143c',
|
31329 | 'cyan': '0ff',
|
31330 | 'darkblue': '00008b',
|
31331 | 'darkcyan': '008b8b',
|
31332 | 'darkgoldenrod': 'b8860b',
|
31333 | 'darkgray': 'a9a9a9',
|
31334 | 'darkgrey': 'a9a9a9',
|
31335 | 'darkgreen': '006400',
|
31336 | 'darkkhaki': 'bdb76b',
|
31337 | 'darkmagenta': '8b008b',
|
31338 | 'darkolivegreen': '556b2f',
|
31339 | 'darkorange': 'ff8c00',
|
31340 | 'darkorchid': '9932cc',
|
31341 | 'darkred': '8b0000',
|
31342 | 'darksalmon': 'e9967a',
|
31343 | 'darkseagreen': '8fbc8f',
|
31344 | 'darkslateblue': '483d8b',
|
31345 | 'darkslategray': '2f4f4f',
|
31346 | 'darkslategrey': '2f4f4f',
|
31347 | 'darkturquoise': '00ced1',
|
31348 | 'darkviolet': '9400d3',
|
31349 | 'deeppink': 'ff1493',
|
31350 | 'deepskyblue': '00bfff',
|
31351 | 'dimgray': '696969',
|
31352 | 'dimgrey': '696969',
|
31353 | 'dodgerblue': '1e90ff',
|
31354 | 'firebrick': 'b22222',
|
31355 | 'floralwhite': 'fffaf0',
|
31356 | 'forestgreen': '228b22',
|
31357 | 'fuchsia': 'f0f',
|
31358 | 'gainsboro': 'dcdcdc',
|
31359 | 'ghostwhite': 'f8f8ff',
|
31360 | 'gold': 'ffd700',
|
31361 | 'goldenrod': 'daa520',
|
31362 | 'gray': '808080',
|
31363 | 'grey': '808080',
|
31364 | 'green': '008000',
|
31365 | 'greenyellow': 'adff2f',
|
31366 | 'honeydew': 'f0fff0',
|
31367 | 'hotpink': 'ff69b4',
|
31368 | 'indianred': 'cd5c5c',
|
31369 | 'indigo': '4b0082',
|
31370 | 'ivory': 'fffff0',
|
31371 | 'khaki': 'f0e68c',
|
31372 | 'lavender': 'e6e6fa',
|
31373 | 'lavenderblush': 'fff0f5',
|
31374 | 'lawngreen': '7cfc00',
|
31375 | 'lemonchiffon': 'fffacd',
|
31376 | 'lightblue': 'add8e6',
|
31377 | 'lightcoral': 'f08080',
|
31378 | 'lightcyan': 'e0ffff',
|
31379 | 'lightgoldenrodyellow': 'fafad2',
|
31380 | 'lightgray': 'd3d3d3',
|
31381 | 'lightgrey': 'd3d3d3',
|
31382 | 'lightgreen': '90ee90',
|
31383 | 'lightpink': 'ffb6c1',
|
31384 | 'lightsalmon': 'ffa07a',
|
31385 | 'lightseagreen': '20b2aa',
|
31386 | 'lightskyblue': '87cefa',
|
31387 | 'lightslategray': '789',
|
31388 | 'lightslategrey': '789',
|
31389 | 'lightsteelblue': 'b0c4de',
|
31390 | 'lightyellow': 'ffffe0',
|
31391 | 'lime': '0f0',
|
31392 | 'limegreen': '32cd32',
|
31393 | 'linen': 'faf0e6',
|
31394 | 'magenta': 'f0f',
|
31395 | 'maroon': '800000',
|
31396 | 'mediumaquamarine': '66cdaa',
|
31397 | 'mediumblue': '0000cd',
|
31398 | 'mediumorchid': 'ba55d3',
|
31399 | 'mediumpurple': '9370db',
|
31400 | 'mediumseagreen': '3cb371',
|
31401 | 'mediumslateblue': '7b68ee',
|
31402 | 'mediumspringgreen': '00fa9a',
|
31403 | 'mediumturquoise': '48d1cc',
|
31404 | 'mediumvioletred': 'c71585',
|
31405 | 'midnightblue': '191970',
|
31406 | 'mintcream': 'f5fffa',
|
31407 | 'mistyrose': 'ffe4e1',
|
31408 | 'moccasin': 'ffe4b5',
|
31409 | 'navajowhite': 'ffdead',
|
31410 | 'navy': '000080',
|
31411 | 'oldlace': 'fdf5e6',
|
31412 | 'olive': '808000',
|
31413 | 'olivedrab': '6b8e23',
|
31414 | 'orange': 'ffa500',
|
31415 | 'orangered': 'ff4500',
|
31416 | 'orchid': 'da70d6',
|
31417 | 'palegoldenrod': 'eee8aa',
|
31418 | 'palegreen': '98fb98',
|
31419 | 'paleturquoise': 'afeeee',
|
31420 | 'palevioletred': 'db7093',
|
31421 | 'papayawhip': 'ffefd5',
|
31422 | 'peachpuff': 'ffdab9',
|
31423 | 'peru': 'cd853f',
|
31424 | 'pink': 'ffc0cb',
|
31425 | 'plum': 'dda0dd',
|
31426 | 'powderblue': 'b0e0e6',
|
31427 | 'purple': '800080',
|
31428 | 'rebeccapurple': '639',
|
31429 | 'red': 'f00',
|
31430 | 'rosybrown': 'bc8f8f',
|
31431 | 'royalblue': '4169e1',
|
31432 | 'saddlebrown': '8b4513',
|
31433 | 'salmon': 'fa8072',
|
31434 | 'sandybrown': 'f4a460',
|
31435 | 'seagreen': '2e8b57',
|
31436 | 'seashell': 'fff5ee',
|
31437 | 'sienna': 'a0522d',
|
31438 | 'silver': 'c0c0c0',
|
31439 | 'skyblue': '87ceeb',
|
31440 | 'slateblue': '6a5acd',
|
31441 | 'slategray': '708090',
|
31442 | 'slategrey': '708090',
|
31443 | 'snow': 'fffafa',
|
31444 | 'springgreen': '00ff7f',
|
31445 | 'steelblue': '4682b4',
|
31446 | 'tan': 'd2b48c',
|
31447 | 'teal': '008080',
|
31448 | 'thistle': 'd8bfd8',
|
31449 | 'tomato': 'ff6347',
|
31450 | 'turquoise': '40e0d0',
|
31451 | 'violet': 'ee82ee',
|
31452 | 'wheat': 'f5deb3',
|
31453 | 'white': 'fff',
|
31454 | 'whitesmoke': 'f5f5f5',
|
31455 | 'yellow': 'ff0',
|
31456 | 'yellowgreen': '9acd32'
|
31457 | };
|
31458 |
|
31459 | var HEX_TO_NAME = {
|
31460 | '800000': 'maroon',
|
31461 | '800080': 'purple',
|
31462 | '808000': 'olive',
|
31463 | '808080': 'gray',
|
31464 | '00ffff': 'cyan',
|
31465 | 'f0ffff': 'azure',
|
31466 | 'f5f5dc': 'beige',
|
31467 | 'ffe4c4': 'bisque',
|
31468 | '000000': 'black',
|
31469 | '0000ff': 'blue',
|
31470 | 'a52a2a': 'brown',
|
31471 | 'ff7f50': 'coral',
|
31472 | 'ffd700': 'gold',
|
31473 | '008000': 'green',
|
31474 | '4b0082': 'indigo',
|
31475 | 'fffff0': 'ivory',
|
31476 | 'f0e68c': 'khaki',
|
31477 | '00ff00': 'lime',
|
31478 | 'faf0e6': 'linen',
|
31479 | '000080': 'navy',
|
31480 | 'ffa500': 'orange',
|
31481 | 'da70d6': 'orchid',
|
31482 | 'cd853f': 'peru',
|
31483 | 'ffc0cb': 'pink',
|
31484 | 'dda0dd': 'plum',
|
31485 | 'f00': 'red',
|
31486 | 'ff0000': 'red',
|
31487 | 'fa8072': 'salmon',
|
31488 | 'a0522d': 'sienna',
|
31489 | 'c0c0c0': 'silver',
|
31490 | 'fffafa': 'snow',
|
31491 | 'd2b48c': 'tan',
|
31492 | '008080': 'teal',
|
31493 | 'ff6347': 'tomato',
|
31494 | 'ee82ee': 'violet',
|
31495 | 'f5deb3': 'wheat',
|
31496 | 'ffffff': 'white',
|
31497 | 'ffff00': 'yellow'
|
31498 | };
|
31499 |
|
31500 | function hueToRgb(p, q, t) {
|
31501 | if (t < 0) {
|
31502 | t += 1;
|
31503 | }
|
31504 | if (t > 1) {
|
31505 | t -= 1;
|
31506 | }
|
31507 | if (t < 1 / 6) {
|
31508 | return p + (q - p) * 6 * t;
|
31509 | }
|
31510 | if (t < 1 / 2) {
|
31511 | return q;
|
31512 | }
|
31513 | if (t < 2 / 3) {
|
31514 | return p + (q - p) * (2 / 3 - t) * 6;
|
31515 | }
|
31516 | return p;
|
31517 | }
|
31518 |
|
31519 | function hslToRgb(h, s, l, a) {
|
31520 | var r;
|
31521 | var g;
|
31522 | var b;
|
31523 |
|
31524 | if (s === 0) {
|
31525 | r = g = b = l;
|
31526 | } else {
|
31527 | var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
31528 | var p = 2 * l - q;
|
31529 |
|
31530 | r = hueToRgb(p, q, h + 1 / 3);
|
31531 | g = hueToRgb(p, q, h);
|
31532 | b = hueToRgb(p, q, h - 1 / 3);
|
31533 | }
|
31534 |
|
31535 | return [
|
31536 | Math.round(r * 255),
|
31537 | Math.round(g * 255),
|
31538 | Math.round(b * 255),
|
31539 | a
|
31540 | ];
|
31541 | }
|
31542 |
|
31543 | function toHex(value) {
|
31544 | value = value.toString(16);
|
31545 | return value.length === 1 ? '0' + value : value;
|
31546 | }
|
31547 |
|
31548 | function parseFunctionArgs(functionArgs, count, rgb) {
|
31549 | var cursor = functionArgs.head;
|
31550 | var args = [];
|
31551 | var wasValue = false;
|
31552 |
|
31553 | while (cursor !== null) {
|
31554 | var node = cursor.data;
|
31555 | var type = node.type;
|
31556 |
|
31557 | switch (type) {
|
31558 | case 'Number':
|
31559 | case 'Percentage':
|
31560 | if (wasValue) {
|
31561 | return;
|
31562 | }
|
31563 |
|
31564 | wasValue = true;
|
31565 | args.push({
|
31566 | type: type,
|
31567 | value: Number(node.value)
|
31568 | });
|
31569 | break;
|
31570 |
|
31571 | case 'Operator':
|
31572 | if (node.value === ',') {
|
31573 | if (!wasValue) {
|
31574 | return;
|
31575 | }
|
31576 | wasValue = false;
|
31577 | } else if (wasValue || node.value !== '+') {
|
31578 | return;
|
31579 | }
|
31580 | break;
|
31581 |
|
31582 | default:
|
31583 |
|
31584 | return;
|
31585 | }
|
31586 |
|
31587 | cursor = cursor.next;
|
31588 | }
|
31589 |
|
31590 | if (args.length !== count) {
|
31591 |
|
31592 |
|
31593 | return;
|
31594 | }
|
31595 |
|
31596 | if (args.length === 4) {
|
31597 | if (args[3].type !== 'Number') {
|
31598 |
|
31599 |
|
31600 | return;
|
31601 | }
|
31602 |
|
31603 | args[3].type = 'Alpha';
|
31604 | }
|
31605 |
|
31606 | if (rgb) {
|
31607 | if (args[0].type !== args[1].type || args[0].type !== args[2].type) {
|
31608 |
|
31609 |
|
31610 | return;
|
31611 | }
|
31612 | } else {
|
31613 | if (args[0].type !== 'Number' ||
|
31614 | args[1].type !== 'Percentage' ||
|
31615 | args[2].type !== 'Percentage') {
|
31616 |
|
31617 |
|
31618 | return;
|
31619 | }
|
31620 |
|
31621 | args[0].type = 'Angle';
|
31622 | }
|
31623 |
|
31624 | return args.map(function(arg) {
|
31625 | var value = Math.max(0, arg.value);
|
31626 |
|
31627 | switch (arg.type) {
|
31628 | case 'Number':
|
31629 |
|
31630 | value = Math.min(value, 255);
|
31631 | break;
|
31632 |
|
31633 | case 'Percentage':
|
31634 |
|
31635 | value = Math.min(value, 100) / 100;
|
31636 |
|
31637 | if (!rgb) {
|
31638 | return value;
|
31639 | }
|
31640 |
|
31641 | value = 255 * value;
|
31642 | break;
|
31643 |
|
31644 | case 'Angle':
|
31645 |
|
31646 | return (((value % 360) + 360) % 360) / 360;
|
31647 |
|
31648 | case 'Alpha':
|
31649 |
|
31650 | return Math.min(value, 1);
|
31651 | }
|
31652 |
|
31653 | return Math.round(value);
|
31654 | });
|
31655 | }
|
31656 |
|
31657 | function compressFunction(node, item, list) {
|
31658 | var functionName = node.name;
|
31659 | var args;
|
31660 |
|
31661 | if (functionName === 'rgba' || functionName === 'hsla') {
|
31662 | args = parseFunctionArgs(node.children, 4, functionName === 'rgba');
|
31663 |
|
31664 | if (!args) {
|
31665 |
|
31666 | return;
|
31667 | }
|
31668 |
|
31669 | if (functionName === 'hsla') {
|
31670 | args = hslToRgb.apply(null, args);
|
31671 | node.name = 'rgba';
|
31672 | }
|
31673 |
|
31674 | if (args[3] === 0) {
|
31675 |
|
31676 |
|
31677 |
|
31678 |
|
31679 | var scopeFunctionName = this.function && this.function.name;
|
31680 | if ((args[0] === 0 && args[1] === 0 && args[2] === 0) ||
|
31681 | !/^(?:to|from|color-stop)$|gradient$/i.test(scopeFunctionName)) {
|
31682 |
|
31683 | item.data = {
|
31684 | type: 'Identifier',
|
31685 | loc: node.loc,
|
31686 | name: 'transparent'
|
31687 | };
|
31688 |
|
31689 | return;
|
31690 | }
|
31691 | }
|
31692 |
|
31693 | if (args[3] !== 1) {
|
31694 |
|
31695 | node.children.each(function(node, item, list) {
|
31696 | if (node.type === 'Operator') {
|
31697 | if (node.value !== ',') {
|
31698 | list.remove(item);
|
31699 | }
|
31700 | return;
|
31701 | }
|
31702 |
|
31703 | item.data = {
|
31704 | type: 'Number',
|
31705 | loc: node.loc,
|
31706 | value: packNumber$3(args.shift(), null)
|
31707 | };
|
31708 | });
|
31709 |
|
31710 | return;
|
31711 | }
|
31712 |
|
31713 |
|
31714 | functionName = 'rgb';
|
31715 | }
|
31716 |
|
31717 | if (functionName === 'hsl') {
|
31718 | args = args || parseFunctionArgs(node.children, 3, false);
|
31719 |
|
31720 | if (!args) {
|
31721 |
|
31722 | return;
|
31723 | }
|
31724 |
|
31725 |
|
31726 | args = hslToRgb.apply(null, args);
|
31727 | functionName = 'rgb';
|
31728 | }
|
31729 |
|
31730 | if (functionName === 'rgb') {
|
31731 | args = args || parseFunctionArgs(node.children, 3, true);
|
31732 |
|
31733 | if (!args) {
|
31734 |
|
31735 | return;
|
31736 | }
|
31737 |
|
31738 |
|
31739 | var next = item.next;
|
31740 | if (next && next.data.type !== 'WhiteSpace') {
|
31741 | list.insert(list.createItem({
|
31742 | type: 'WhiteSpace',
|
31743 | value: ' '
|
31744 | }), next);
|
31745 | }
|
31746 |
|
31747 | item.data = {
|
31748 | type: 'Hash',
|
31749 | loc: node.loc,
|
31750 | value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])
|
31751 | };
|
31752 |
|
31753 | compressHex(item.data, item);
|
31754 | }
|
31755 | }
|
31756 |
|
31757 | function compressIdent(node, item) {
|
31758 | if (this.declaration === null) {
|
31759 | return;
|
31760 | }
|
31761 |
|
31762 | var color = node.name.toLowerCase();
|
31763 |
|
31764 | if (NAME_TO_HEX.hasOwnProperty(color) &&
|
31765 | lexer$2.matchDeclaration(this.declaration).isType(node, 'color')) {
|
31766 | var hex = NAME_TO_HEX[color];
|
31767 |
|
31768 | if (hex.length + 1 <= color.length) {
|
31769 |
|
31770 | item.data = {
|
31771 | type: 'Hash',
|
31772 | loc: node.loc,
|
31773 | value: hex
|
31774 | };
|
31775 | } else {
|
31776 |
|
31777 | if (color === 'grey') {
|
31778 | color = 'gray';
|
31779 | }
|
31780 |
|
31781 |
|
31782 | node.name = color;
|
31783 | }
|
31784 | }
|
31785 | }
|
31786 |
|
31787 | function compressHex(node, item) {
|
31788 | var color = node.value.toLowerCase();
|
31789 |
|
31790 |
|
31791 | if (color.length === 6 &&
|
31792 | color[0] === color[1] &&
|
31793 | color[2] === color[3] &&
|
31794 | color[4] === color[5]) {
|
31795 | color = color[0] + color[2] + color[4];
|
31796 | }
|
31797 |
|
31798 | if (HEX_TO_NAME[color]) {
|
31799 | item.data = {
|
31800 | type: 'Identifier',
|
31801 | loc: node.loc,
|
31802 | name: HEX_TO_NAME[color]
|
31803 | };
|
31804 | } else {
|
31805 | node.value = color;
|
31806 | }
|
31807 | }
|
31808 |
|
31809 | var color$2 = {
|
31810 | compressFunction: compressFunction,
|
31811 | compressIdent: compressIdent,
|
31812 | compressHex: compressHex
|
31813 | };
|
31814 |
|
31815 | var walk$3 = csstree_min.walk;
|
31816 | var handlers$2 = {
|
31817 | Atrule: Atrule$2,
|
31818 | AttributeSelector: AttributeSelector$1,
|
31819 | Value: Value$1,
|
31820 | Dimension: Dimension$1,
|
31821 | Percentage: Percentage$1,
|
31822 | Number: _Number$1,
|
31823 | String: _String$1,
|
31824 | Url: Url$1,
|
31825 | Hash: color$2.compressHex,
|
31826 | Identifier: color$2.compressIdent,
|
31827 | Function: color$2.compressFunction
|
31828 | };
|
31829 |
|
31830 | var replace = function(ast) {
|
31831 | walk$3(ast, {
|
31832 | leave: function(node, item, list) {
|
31833 | if (handlers$2.hasOwnProperty(node.type)) {
|
31834 | handlers$2[node.type].call(this, node, item, list);
|
31835 | }
|
31836 | }
|
31837 | });
|
31838 | };
|
31839 |
|
31840 | var generate$1 = csstree_min.generate;
|
31841 |
|
31842 | function Index() {
|
31843 | this.seed = 0;
|
31844 | this.map = Object.create(null);
|
31845 | }
|
31846 |
|
31847 | Index.prototype.resolve = function(str) {
|
31848 | var index = this.map[str];
|
31849 |
|
31850 | if (!index) {
|
31851 | index = ++this.seed;
|
31852 | this.map[str] = index;
|
31853 | }
|
31854 |
|
31855 | return index;
|
31856 | };
|
31857 |
|
31858 | var createDeclarationIndexer = function createDeclarationIndexer() {
|
31859 | var ids = new Index();
|
31860 |
|
31861 | return function markDeclaration(node) {
|
31862 | var id = generate$1(node);
|
31863 |
|
31864 | node.id = ids.resolve(id);
|
31865 | node.length = id.length;
|
31866 | node.fingerprint = null;
|
31867 |
|
31868 | return node;
|
31869 | };
|
31870 | };
|
31871 |
|
31872 | var generate$2 = csstree_min.generate;
|
31873 |
|
31874 |
|
31875 | var nonFreezePseudoElements = {
|
31876 | 'first-letter': true,
|
31877 | 'first-line': true,
|
31878 | 'after': true,
|
31879 | 'before': true
|
31880 | };
|
31881 | var nonFreezePseudoClasses = {
|
31882 | 'link': true,
|
31883 | 'visited': true,
|
31884 | 'hover': true,
|
31885 | 'active': true,
|
31886 | 'first-letter': true,
|
31887 | 'first-line': true,
|
31888 | 'after': true,
|
31889 | 'before': true
|
31890 | };
|
31891 |
|
31892 | var processSelector = function freeze(node, usageData) {
|
31893 | var pseudos = Object.create(null);
|
31894 | var hasPseudo = false;
|
31895 |
|
31896 | node.prelude.children.each(function(simpleSelector) {
|
31897 | var tagName = '*';
|
31898 | var scope = 0;
|
31899 |
|
31900 | simpleSelector.children.each(function(node) {
|
31901 | switch (node.type) {
|
31902 | case 'ClassSelector':
|
31903 | if (usageData && usageData.scopes) {
|
31904 | var classScope = usageData.scopes[node.name] || 0;
|
31905 |
|
31906 | if (scope !== 0 && classScope !== scope) {
|
31907 | throw new Error('Selector can\'t has classes from different scopes: ' + generate$2(simpleSelector));
|
31908 | }
|
31909 |
|
31910 | scope = classScope;
|
31911 | }
|
31912 | break;
|
31913 |
|
31914 | case 'PseudoClassSelector':
|
31915 | var name = node.name.toLowerCase();
|
31916 |
|
31917 | if (!nonFreezePseudoClasses.hasOwnProperty(name)) {
|
31918 | pseudos[':' + name] = true;
|
31919 | hasPseudo = true;
|
31920 | }
|
31921 | break;
|
31922 |
|
31923 | case 'PseudoElementSelector':
|
31924 | var name = node.name.toLowerCase();
|
31925 |
|
31926 | if (!nonFreezePseudoElements.hasOwnProperty(name)) {
|
31927 | pseudos['::' + name] = true;
|
31928 | hasPseudo = true;
|
31929 | }
|
31930 | break;
|
31931 |
|
31932 | case 'TypeSelector':
|
31933 | tagName = node.name.toLowerCase();
|
31934 | break;
|
31935 |
|
31936 | case 'AttributeSelector':
|
31937 | if (node.flags) {
|
31938 | pseudos['[' + node.flags.toLowerCase() + ']'] = true;
|
31939 | hasPseudo = true;
|
31940 | }
|
31941 | break;
|
31942 |
|
31943 | case 'WhiteSpace':
|
31944 | case 'Combinator':
|
31945 | tagName = '*';
|
31946 | break;
|
31947 | }
|
31948 | });
|
31949 |
|
31950 | simpleSelector.compareMarker = specificity(simpleSelector).toString();
|
31951 | simpleSelector.id = null;
|
31952 | simpleSelector.id = generate$2(simpleSelector);
|
31953 |
|
31954 | if (scope) {
|
31955 | simpleSelector.compareMarker += ':' + scope;
|
31956 | }
|
31957 |
|
31958 | if (tagName !== '*') {
|
31959 | simpleSelector.compareMarker += ',' + tagName;
|
31960 | }
|
31961 | });
|
31962 |
|
31963 |
|
31964 | node.pseudoSignature = hasPseudo && Object.keys(pseudos).sort().join(',');
|
31965 | };
|
31966 |
|
31967 | var resolveKeyword$2 = csstree_min.keyword;
|
31968 | var walk$4 = csstree_min.walk;
|
31969 | var generate$3 = csstree_min.generate;
|
31970 |
|
31971 |
|
31972 |
|
31973 | var prepare = function prepare(ast, options) {
|
31974 | var markDeclaration = createDeclarationIndexer();
|
31975 |
|
31976 | walk$4(ast, {
|
31977 | visit: 'Rule',
|
31978 | enter: function processRule(node) {
|
31979 | node.block.children.each(markDeclaration);
|
31980 | processSelector(node, options.usage);
|
31981 | }
|
31982 | });
|
31983 |
|
31984 | walk$4(ast, {
|
31985 | visit: 'Atrule',
|
31986 | enter: function(node) {
|
31987 | if (node.prelude) {
|
31988 | node.prelude.id = null;
|
31989 | node.prelude.id = generate$3(node.prelude);
|
31990 | }
|
31991 |
|
31992 |
|
31993 |
|
31994 | if (resolveKeyword$2(node.name).basename === 'keyframes') {
|
31995 | node.block.avoidRulesMerge = true; |
31996 |
|
31997 | node.block.children.each(function(rule) {
|
31998 | rule.prelude.children.each(function(simpleselector) {
|
31999 | simpleselector.compareMarker = simpleselector.id;
|
32000 | });
|
32001 | });
|
32002 | }
|
32003 | }
|
32004 | });
|
32005 |
|
32006 | return {
|
32007 | declaration: markDeclaration
|
32008 | };
|
32009 | };
|
32010 |
|
32011 | var List$3 = csstree_min.List;
|
32012 | var resolveKeyword$3 = csstree_min.keyword;
|
32013 | var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
|
32014 | var walk$5 = csstree_min.walk;
|
32015 |
|
32016 | function addRuleToMap(map, item, list, single) {
|
32017 | var node = item.data;
|
32018 | var name = resolveKeyword$3(node.name).basename;
|
32019 | var id = node.name.toLowerCase() + '/' + (node.prelude ? node.prelude.id : null);
|
32020 |
|
32021 | if (!hasOwnProperty$9.call(map, name)) {
|
32022 | map[name] = Object.create(null);
|
32023 | }
|
32024 |
|
32025 | if (single) {
|
32026 | delete map[name][id];
|
32027 | }
|
32028 |
|
32029 | if (!hasOwnProperty$9.call(map[name], id)) {
|
32030 | map[name][id] = new List$3();
|
32031 | }
|
32032 |
|
32033 | map[name][id].append(list.remove(item));
|
32034 | }
|
32035 |
|
32036 | function relocateAtrules(ast, options) {
|
32037 | var collected = Object.create(null);
|
32038 | var topInjectPoint = null;
|
32039 |
|
32040 | ast.children.each(function(node, item, list) {
|
32041 | if (node.type === 'Atrule') {
|
32042 | var name = resolveKeyword$3(node.name).basename;
|
32043 |
|
32044 | switch (name) {
|
32045 | case 'keyframes':
|
32046 | addRuleToMap(collected, item, list, true);
|
32047 | return;
|
32048 |
|
32049 | case 'media':
|
32050 | if (options.forceMediaMerge) {
|
32051 | addRuleToMap(collected, item, list, false);
|
32052 | return;
|
32053 | }
|
32054 | break;
|
32055 | }
|
32056 |
|
32057 | if (topInjectPoint === null &&
|
32058 | name !== 'charset' &&
|
32059 | name !== 'import') {
|
32060 | topInjectPoint = item;
|
32061 | }
|
32062 | } else {
|
32063 | if (topInjectPoint === null) {
|
32064 | topInjectPoint = item;
|
32065 | }
|
32066 | }
|
32067 | });
|
32068 |
|
32069 | for (var atrule in collected) {
|
32070 | for (var id in collected[atrule]) {
|
32071 | ast.children.insertList(
|
32072 | collected[atrule][id],
|
32073 | atrule === 'media' ? null : topInjectPoint
|
32074 | );
|
32075 | }
|
32076 | }
|
32077 | }
|
32078 | function isMediaRule(node) {
|
32079 | return node.type === 'Atrule' && node.name === 'media';
|
32080 | }
|
32081 |
|
32082 | function processAtrule(node, item, list) {
|
32083 | if (!isMediaRule(node)) {
|
32084 | return;
|
32085 | }
|
32086 |
|
32087 | var prev = item.prev && item.prev.data;
|
32088 |
|
32089 | if (!prev || !isMediaRule(prev)) {
|
32090 | return;
|
32091 | }
|
32092 |
|
32093 |
|
32094 | if (node.prelude &&
|
32095 | prev.prelude &&
|
32096 | node.prelude.id === prev.prelude.id) {
|
32097 | prev.block.children.appendList(node.block.children);
|
32098 | list.remove(item);
|
32099 |
|
32100 |
|
32101 |
|
32102 |
|
32103 |
|
32104 |
|
32105 | }
|
32106 | }
|
32107 |
|
32108 | var _1MergeAtrule = function rejoinAtrule(ast, options) {
|
32109 | relocateAtrules(ast, options);
|
32110 |
|
32111 | walk$5(ast, {
|
32112 | visit: 'Atrule',
|
32113 | reverse: true,
|
32114 | enter: processAtrule
|
32115 | });
|
32116 | };
|
32117 |
|
32118 | var hasOwnProperty$a = Object.prototype.hasOwnProperty;
|
32119 |
|
32120 | function isEqualSelectors(a, b) {
|
32121 | var cursor1 = a.head;
|
32122 | var cursor2 = b.head;
|
32123 |
|
32124 | while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
|
32125 | cursor1 = cursor1.next;
|
32126 | cursor2 = cursor2.next;
|
32127 | }
|
32128 |
|
32129 | return cursor1 === null && cursor2 === null;
|
32130 | }
|
32131 |
|
32132 | function isEqualDeclarations(a, b) {
|
32133 | var cursor1 = a.head;
|
32134 | var cursor2 = b.head;
|
32135 |
|
32136 | while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
|
32137 | cursor1 = cursor1.next;
|
32138 | cursor2 = cursor2.next;
|
32139 | }
|
32140 |
|
32141 | return cursor1 === null && cursor2 === null;
|
32142 | }
|
32143 |
|
32144 | function compareDeclarations(declarations1, declarations2) {
|
32145 | var result = {
|
32146 | eq: [],
|
32147 | ne1: [],
|
32148 | ne2: [],
|
32149 | ne2overrided: []
|
32150 | };
|
32151 |
|
32152 | var fingerprints = Object.create(null);
|
32153 | var declarations2hash = Object.create(null);
|
32154 |
|
32155 | for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
|
32156 | declarations2hash[cursor.data.id] = true;
|
32157 | }
|
32158 |
|
32159 | for (var cursor = declarations1.head; cursor; cursor = cursor.next) {
|
32160 | var data = cursor.data;
|
32161 |
|
32162 | if (data.fingerprint) {
|
32163 | fingerprints[data.fingerprint] = data.important;
|
32164 | }
|
32165 |
|
32166 | if (declarations2hash[data.id]) {
|
32167 | declarations2hash[data.id] = false;
|
32168 | result.eq.push(data);
|
32169 | } else {
|
32170 | result.ne1.push(data);
|
32171 | }
|
32172 | }
|
32173 |
|
32174 | for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
|
32175 | var data = cursor.data;
|
32176 |
|
32177 | if (declarations2hash[data.id]) {
|
32178 |
|
32179 |
|
32180 | if (!hasOwnProperty$a.call(fingerprints, data.fingerprint) ||
|
32181 | (!fingerprints[data.fingerprint] && data.important)) {
|
32182 | result.ne2.push(data);
|
32183 | }
|
32184 |
|
32185 | result.ne2overrided.push(data);
|
32186 | }
|
32187 | }
|
32188 |
|
32189 | return result;
|
32190 | }
|
32191 |
|
32192 | function addSelectors(dest, source) {
|
32193 | source.each(function(sourceData) {
|
32194 | var newStr = sourceData.id;
|
32195 | var cursor = dest.head;
|
32196 |
|
32197 | while (cursor) {
|
32198 | var nextStr = cursor.data.id;
|
32199 |
|
32200 | if (nextStr === newStr) {
|
32201 | return;
|
32202 | }
|
32203 |
|
32204 | if (nextStr > newStr) {
|
32205 | break;
|
32206 | }
|
32207 |
|
32208 | cursor = cursor.next;
|
32209 | }
|
32210 |
|
32211 | dest.insert(dest.createItem(sourceData), cursor);
|
32212 | });
|
32213 |
|
32214 | return dest;
|
32215 | }
|
32216 |
|
32217 |
|
32218 | function hasSimilarSelectors(selectors1, selectors2) {
|
32219 | var cursor1 = selectors1.head;
|
32220 |
|
32221 | while (cursor1 !== null) {
|
32222 | var cursor2 = selectors2.head;
|
32223 |
|
32224 | while (cursor2 !== null) {
|
32225 | if (cursor1.data.compareMarker === cursor2.data.compareMarker) {
|
32226 | return true;
|
32227 | }
|
32228 |
|
32229 | cursor2 = cursor2.next;
|
32230 | }
|
32231 |
|
32232 | cursor1 = cursor1.next;
|
32233 | }
|
32234 |
|
32235 | return false;
|
32236 | }
|
32237 |
|
32238 |
|
32239 | function unsafeToSkipNode(node) {
|
32240 | switch (node.type) {
|
32241 | case 'Rule':
|
32242 |
|
32243 | return hasSimilarSelectors(node.prelude.children, this);
|
32244 |
|
32245 | case 'Atrule':
|
32246 |
|
32247 | if (node.block) {
|
32248 |
|
32249 | return node.block.children.some(unsafeToSkipNode, this);
|
32250 | }
|
32251 | break;
|
32252 |
|
32253 | case 'Declaration':
|
32254 | return false;
|
32255 | }
|
32256 |
|
32257 |
|
32258 | return true;
|
32259 | }
|
32260 |
|
32261 | var utils$2 = {
|
32262 | isEqualSelectors: isEqualSelectors,
|
32263 | isEqualDeclarations: isEqualDeclarations,
|
32264 | compareDeclarations: compareDeclarations,
|
32265 | addSelectors: addSelectors,
|
32266 | hasSimilarSelectors: hasSimilarSelectors,
|
32267 | unsafeToSkipNode: unsafeToSkipNode
|
32268 | };
|
32269 |
|
32270 | var walk$6 = csstree_min.walk;
|
32271 |
|
32272 |
|
32273 | function processRule(node, item, list) {
|
32274 | var selectors = node.prelude.children;
|
32275 | var declarations = node.block.children;
|
32276 |
|
32277 | list.prevUntil(item.prev, function(prev) {
|
32278 |
|
32279 | if (prev.type !== 'Rule') {
|
32280 | return utils$2.unsafeToSkipNode.call(selectors, prev);
|
32281 | }
|
32282 |
|
32283 | var prevSelectors = prev.prelude.children;
|
32284 | var prevDeclarations = prev.block.children;
|
32285 |
|
32286 |
|
32287 | if (node.pseudoSignature === prev.pseudoSignature) {
|
32288 |
|
32289 | if (utils$2.isEqualSelectors(prevSelectors, selectors)) {
|
32290 | prevDeclarations.appendList(declarations);
|
32291 | list.remove(item);
|
32292 | return true;
|
32293 | }
|
32294 |
|
32295 |
|
32296 | if (utils$2.isEqualDeclarations(declarations, prevDeclarations)) {
|
32297 | utils$2.addSelectors(prevSelectors, selectors);
|
32298 | list.remove(item);
|
32299 | return true;
|
32300 | }
|
32301 | }
|
32302 |
|
32303 |
|
32304 | return utils$2.hasSimilarSelectors(selectors, prevSelectors);
|
32305 | });
|
32306 | }
|
32307 |
|
32308 |
|
32309 |
|
32310 |
|
32311 | var _2InitialMergeRuleset = function initialMergeRule(ast) {
|
32312 | walk$6(ast, {
|
32313 | visit: 'Rule',
|
32314 | enter: processRule
|
32315 | });
|
32316 | };
|
32317 |
|
32318 | var List$4 = csstree_min.List;
|
32319 | var walk$7 = csstree_min.walk;
|
32320 |
|
32321 | function processRule$1(node, item, list) {
|
32322 | var selectors = node.prelude.children;
|
32323 |
|
32324 |
|
32325 |
|
32326 |
|
32327 |
|
32328 |
|
32329 |
|
32330 |
|
32331 | while (selectors.head !== selectors.tail) {
|
32332 | var newSelectors = new List$4();
|
32333 | newSelectors.insert(selectors.remove(selectors.head));
|
32334 |
|
32335 | list.insert(list.createItem({
|
32336 | type: 'Rule',
|
32337 | loc: node.loc,
|
32338 | prelude: {
|
32339 | type: 'SelectorList',
|
32340 | loc: node.prelude.loc,
|
32341 | children: newSelectors
|
32342 | },
|
32343 | block: {
|
32344 | type: 'Block',
|
32345 | loc: node.block.loc,
|
32346 | children: node.block.children.copy()
|
32347 | },
|
32348 | pseudoSignature: node.pseudoSignature
|
32349 | }), item);
|
32350 | }
|
32351 | }
|
32352 |
|
32353 | var _3DisjoinRuleset = function disjoinRule(ast) {
|
32354 | walk$7(ast, {
|
32355 | visit: 'Rule',
|
32356 | reverse: true,
|
32357 | enter: processRule$1
|
32358 | });
|
32359 | };
|
32360 |
|
32361 | var List$5 = csstree_min.List;
|
32362 | var generate$4 = csstree_min.generate;
|
32363 | var walk$8 = csstree_min.walk;
|
32364 |
|
32365 | var REPLACE = 1;
|
32366 | var REMOVE = 2;
|
32367 | var TOP = 0;
|
32368 | var RIGHT = 1;
|
32369 | var BOTTOM = 2;
|
32370 | var LEFT = 3;
|
32371 | var SIDES = ['top', 'right', 'bottom', 'left'];
|
32372 | var SIDE = {
|
32373 | 'margin-top': 'top',
|
32374 | 'margin-right': 'right',
|
32375 | 'margin-bottom': 'bottom',
|
32376 | 'margin-left': 'left',
|
32377 |
|
32378 | 'padding-top': 'top',
|
32379 | 'padding-right': 'right',
|
32380 | 'padding-bottom': 'bottom',
|
32381 | 'padding-left': 'left',
|
32382 |
|
32383 | 'border-top-color': 'top',
|
32384 | 'border-right-color': 'right',
|
32385 | 'border-bottom-color': 'bottom',
|
32386 | 'border-left-color': 'left',
|
32387 | 'border-top-width': 'top',
|
32388 | 'border-right-width': 'right',
|
32389 | 'border-bottom-width': 'bottom',
|
32390 | 'border-left-width': 'left',
|
32391 | 'border-top-style': 'top',
|
32392 | 'border-right-style': 'right',
|
32393 | 'border-bottom-style': 'bottom',
|
32394 | 'border-left-style': 'left'
|
32395 | };
|
32396 | var MAIN_PROPERTY = {
|
32397 | 'margin': 'margin',
|
32398 | 'margin-top': 'margin',
|
32399 | 'margin-right': 'margin',
|
32400 | 'margin-bottom': 'margin',
|
32401 | 'margin-left': 'margin',
|
32402 |
|
32403 | 'padding': 'padding',
|
32404 | 'padding-top': 'padding',
|
32405 | 'padding-right': 'padding',
|
32406 | 'padding-bottom': 'padding',
|
32407 | 'padding-left': 'padding',
|
32408 |
|
32409 | 'border-color': 'border-color',
|
32410 | 'border-top-color': 'border-color',
|
32411 | 'border-right-color': 'border-color',
|
32412 | 'border-bottom-color': 'border-color',
|
32413 | 'border-left-color': 'border-color',
|
32414 | 'border-width': 'border-width',
|
32415 | 'border-top-width': 'border-width',
|
32416 | 'border-right-width': 'border-width',
|
32417 | 'border-bottom-width': 'border-width',
|
32418 | 'border-left-width': 'border-width',
|
32419 | 'border-style': 'border-style',
|
32420 | 'border-top-style': 'border-style',
|
32421 | 'border-right-style': 'border-style',
|
32422 | 'border-bottom-style': 'border-style',
|
32423 | 'border-left-style': 'border-style'
|
32424 | };
|
32425 |
|
32426 | function TRBL(name) {
|
32427 | this.name = name;
|
32428 | this.loc = null;
|
32429 | this.iehack = undefined;
|
32430 | this.sides = {
|
32431 | 'top': null,
|
32432 | 'right': null,
|
32433 | 'bottom': null,
|
32434 | 'left': null
|
32435 | };
|
32436 | }
|
32437 |
|
32438 | TRBL.prototype.getValueSequence = function(declaration, count) {
|
32439 | var values = [];
|
32440 | var iehack = '';
|
32441 | var hasBadValues = declaration.value.type !== 'Value' || declaration.value.children.some(function(child) {
|
32442 | var special = false;
|
32443 |
|
32444 | switch (child.type) {
|
32445 | case 'Identifier':
|
32446 | switch (child.name) {
|
32447 | case '\\0':
|
32448 | case '\\9':
|
32449 | iehack = child.name;
|
32450 | return;
|
32451 |
|
32452 | case 'inherit':
|
32453 | case 'initial':
|
32454 | case 'unset':
|
32455 | case 'revert':
|
32456 | special = child.name;
|
32457 | break;
|
32458 | }
|
32459 | break;
|
32460 |
|
32461 | case 'Dimension':
|
32462 | switch (child.unit) {
|
32463 |
|
32464 | case 'rem':
|
32465 |
|
32466 |
|
32467 |
|
32468 | case 'vw':
|
32469 | case 'vh':
|
32470 | case 'vmin':
|
32471 | case 'vmax':
|
32472 | case 'vm':
|
32473 | special = child.unit;
|
32474 | break;
|
32475 | }
|
32476 | break;
|
32477 |
|
32478 | case 'Hash':
|
32479 | case 'Number':
|
32480 | case 'Percentage':
|
32481 | break;
|
32482 |
|
32483 | case 'Function':
|
32484 | if (child.name === 'var') {
|
32485 | return true;
|
32486 | }
|
32487 |
|
32488 | special = child.name;
|
32489 | break;
|
32490 |
|
32491 | case 'WhiteSpace':
|
32492 | return false;
|
32493 |
|
32494 | default:
|
32495 | return true;
|
32496 | }
|
32497 |
|
32498 | values.push({
|
32499 | node: child,
|
32500 | special: special,
|
32501 | important: declaration.important
|
32502 | });
|
32503 | });
|
32504 |
|
32505 | if (hasBadValues || values.length > count) {
|
32506 | return false;
|
32507 | }
|
32508 |
|
32509 | if (typeof this.iehack === 'string' && this.iehack !== iehack) {
|
32510 | return false;
|
32511 | }
|
32512 |
|
32513 | this.iehack = iehack;
|
32514 |
|
32515 | return values;
|
32516 | };
|
32517 |
|
32518 | TRBL.prototype.canOverride = function(side, value) {
|
32519 | var currentValue = this.sides[side];
|
32520 |
|
32521 | return !currentValue || (value.important && !currentValue.important);
|
32522 | };
|
32523 |
|
32524 | TRBL.prototype.add = function(name, declaration) {
|
32525 | function attemptToAdd() {
|
32526 | var sides = this.sides;
|
32527 | var side = SIDE[name];
|
32528 |
|
32529 | if (side) {
|
32530 | if (side in sides === false) {
|
32531 | return false;
|
32532 | }
|
32533 |
|
32534 | var values = this.getValueSequence(declaration, 1);
|
32535 |
|
32536 | if (!values || !values.length) {
|
32537 | return false;
|
32538 | }
|
32539 |
|
32540 |
|
32541 | for (var key in sides) {
|
32542 | if (sides[key] !== null && sides[key].special !== values[0].special) {
|
32543 | return false;
|
32544 | }
|
32545 | }
|
32546 |
|
32547 | if (!this.canOverride(side, values[0])) {
|
32548 | return true;
|
32549 | }
|
32550 |
|
32551 | sides[side] = values[0];
|
32552 | return true;
|
32553 | } else if (name === this.name) {
|
32554 | var values = this.getValueSequence(declaration, 4);
|
32555 |
|
32556 | if (!values || !values.length) {
|
32557 | return false;
|
32558 | }
|
32559 |
|
32560 | switch (values.length) {
|
32561 | case 1:
|
32562 | values[RIGHT] = values[TOP];
|
32563 | values[BOTTOM] = values[TOP];
|
32564 | values[LEFT] = values[TOP];
|
32565 | break;
|
32566 |
|
32567 | case 2:
|
32568 | values[BOTTOM] = values[TOP];
|
32569 | values[LEFT] = values[RIGHT];
|
32570 | break;
|
32571 |
|
32572 | case 3:
|
32573 | values[LEFT] = values[RIGHT];
|
32574 | break;
|
32575 | }
|
32576 |
|
32577 |
|
32578 | for (var i = 0; i < 4; i++) {
|
32579 | for (var key in sides) {
|
32580 | if (sides[key] !== null && sides[key].special !== values[i].special) {
|
32581 | return false;
|
32582 | }
|
32583 | }
|
32584 | }
|
32585 |
|
32586 | for (var i = 0; i < 4; i++) {
|
32587 | if (this.canOverride(SIDES[i], values[i])) {
|
32588 | sides[SIDES[i]] = values[i];
|
32589 | }
|
32590 | }
|
32591 |
|
32592 | return true;
|
32593 | }
|
32594 | }
|
32595 |
|
32596 | if (!attemptToAdd.call(this)) {
|
32597 | return false;
|
32598 | }
|
32599 |
|
32600 |
|
32601 |
|
32602 |
|
32603 |
|
32604 |
|
32605 |
|
32606 |
|
32607 |
|
32608 |
|
32609 | if (!this.loc) {
|
32610 | this.loc = declaration.loc;
|
32611 | }
|
32612 |
|
32613 | return true;
|
32614 | };
|
32615 |
|
32616 | TRBL.prototype.isOkToMinimize = function() {
|
32617 | var top = this.sides.top;
|
32618 | var right = this.sides.right;
|
32619 | var bottom = this.sides.bottom;
|
32620 | var left = this.sides.left;
|
32621 |
|
32622 | if (top && right && bottom && left) {
|
32623 | var important =
|
32624 | top.important +
|
32625 | right.important +
|
32626 | bottom.important +
|
32627 | left.important;
|
32628 |
|
32629 | return important === 0 || important === 4;
|
32630 | }
|
32631 |
|
32632 | return false;
|
32633 | };
|
32634 |
|
32635 | TRBL.prototype.getValue = function() {
|
32636 | var result = new List$5();
|
32637 | var sides = this.sides;
|
32638 | var values = [
|
32639 | sides.top,
|
32640 | sides.right,
|
32641 | sides.bottom,
|
32642 | sides.left
|
32643 | ];
|
32644 | var stringValues = [
|
32645 | generate$4(sides.top.node),
|
32646 | generate$4(sides.right.node),
|
32647 | generate$4(sides.bottom.node),
|
32648 | generate$4(sides.left.node)
|
32649 | ];
|
32650 |
|
32651 | if (stringValues[LEFT] === stringValues[RIGHT]) {
|
32652 | values.pop();
|
32653 | if (stringValues[BOTTOM] === stringValues[TOP]) {
|
32654 | values.pop();
|
32655 | if (stringValues[RIGHT] === stringValues[TOP]) {
|
32656 | values.pop();
|
32657 | }
|
32658 | }
|
32659 | }
|
32660 |
|
32661 | for (var i = 0; i < values.length; i++) {
|
32662 | if (i) {
|
32663 | result.appendData({ type: 'WhiteSpace', value: ' ' });
|
32664 | }
|
32665 |
|
32666 | result.appendData(values[i].node);
|
32667 | }
|
32668 |
|
32669 | if (this.iehack) {
|
32670 | result.appendData({ type: 'WhiteSpace', value: ' ' });
|
32671 | result.appendData({
|
32672 | type: 'Identifier',
|
32673 | loc: null,
|
32674 | name: this.iehack
|
32675 | });
|
32676 | }
|
32677 |
|
32678 | return {
|
32679 | type: 'Value',
|
32680 | loc: null,
|
32681 | children: result
|
32682 | };
|
32683 | };
|
32684 |
|
32685 | TRBL.prototype.getDeclaration = function() {
|
32686 | return {
|
32687 | type: 'Declaration',
|
32688 | loc: this.loc,
|
32689 | important: this.sides.top.important,
|
32690 | property: this.name,
|
32691 | value: this.getValue()
|
32692 | };
|
32693 | };
|
32694 |
|
32695 | function processRule$2(rule, shorts, shortDeclarations, lastShortSelector) {
|
32696 | var declarations = rule.block.children;
|
32697 | var selector = rule.prelude.children.first().id;
|
32698 |
|
32699 | rule.block.children.eachRight(function(declaration, item) {
|
32700 | var property = declaration.property;
|
32701 |
|
32702 | if (!MAIN_PROPERTY.hasOwnProperty(property)) {
|
32703 | return;
|
32704 | }
|
32705 |
|
32706 | var key = MAIN_PROPERTY[property];
|
32707 | var shorthand;
|
32708 | var operation;
|
32709 |
|
32710 | if (!lastShortSelector || selector === lastShortSelector) {
|
32711 | if (key in shorts) {
|
32712 | operation = REMOVE;
|
32713 | shorthand = shorts[key];
|
32714 | }
|
32715 | }
|
32716 |
|
32717 | if (!shorthand || !shorthand.add(property, declaration)) {
|
32718 | operation = REPLACE;
|
32719 | shorthand = new TRBL(key);
|
32720 |
|
32721 |
|
32722 | if (!shorthand.add(property, declaration)) {
|
32723 | lastShortSelector = null;
|
32724 | return;
|
32725 | }
|
32726 | }
|
32727 |
|
32728 | shorts[key] = shorthand;
|
32729 | shortDeclarations.push({
|
32730 | operation: operation,
|
32731 | block: declarations,
|
32732 | item: item,
|
32733 | shorthand: shorthand
|
32734 | });
|
32735 |
|
32736 | lastShortSelector = selector;
|
32737 | });
|
32738 |
|
32739 | return lastShortSelector;
|
32740 | }
|
32741 |
|
32742 | function processShorthands(shortDeclarations, markDeclaration) {
|
32743 | shortDeclarations.forEach(function(item) {
|
32744 | var shorthand = item.shorthand;
|
32745 |
|
32746 | if (!shorthand.isOkToMinimize()) {
|
32747 | return;
|
32748 | }
|
32749 |
|
32750 | if (item.operation === REPLACE) {
|
32751 | item.item.data = markDeclaration(shorthand.getDeclaration());
|
32752 | } else {
|
32753 | item.block.remove(item.item);
|
32754 | }
|
32755 | });
|
32756 | }
|
32757 |
|
32758 | var _4RestructShorthand = function restructBlock(ast, indexer) {
|
32759 | var stylesheetMap = {};
|
32760 | var shortDeclarations = [];
|
32761 |
|
32762 | walk$8(ast, {
|
32763 | visit: 'Rule',
|
32764 | reverse: true,
|
32765 | enter: function(node) {
|
32766 | var stylesheet = this.block || this.stylesheet;
|
32767 | var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
|
32768 | var ruleMap;
|
32769 | var shorts;
|
32770 |
|
32771 | if (!stylesheetMap.hasOwnProperty(stylesheet.id)) {
|
32772 | ruleMap = {
|
32773 | lastShortSelector: null
|
32774 | };
|
32775 | stylesheetMap[stylesheet.id] = ruleMap;
|
32776 | } else {
|
32777 | ruleMap = stylesheetMap[stylesheet.id];
|
32778 | }
|
32779 |
|
32780 | if (ruleMap.hasOwnProperty(ruleId)) {
|
32781 | shorts = ruleMap[ruleId];
|
32782 | } else {
|
32783 | shorts = {};
|
32784 | ruleMap[ruleId] = shorts;
|
32785 | }
|
32786 |
|
32787 | ruleMap.lastShortSelector = processRule$2.call(this, node, shorts, shortDeclarations, ruleMap.lastShortSelector);
|
32788 | }
|
32789 | });
|
32790 |
|
32791 | processShorthands(shortDeclarations, indexer.declaration);
|
32792 | };
|
32793 |
|
32794 | var resolveProperty = csstree_min.property;
|
32795 | var resolveKeyword$4 = csstree_min.keyword;
|
32796 | var walk$9 = csstree_min.walk;
|
32797 | var generate$5 = csstree_min.generate;
|
32798 | var fingerprintId = 1;
|
32799 | var dontRestructure = {
|
32800 | 'src': 1
|
32801 | };
|
32802 |
|
32803 | var DONT_MIX_VALUE = {
|
32804 |
|
32805 | 'display': /table|ruby|flex|-(flex)?box$|grid|contents|run-in/i,
|
32806 |
|
32807 | 'text-align': /^(start|end|match-parent|justify-all)$/i
|
32808 | };
|
32809 |
|
32810 | var SAFE_VALUES = {
|
32811 | cursor: [
|
32812 | 'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
|
32813 | 'n-resize', 'e-resize', 's-resize', 'w-resize',
|
32814 | 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
|
32815 | 'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
|
32816 | 'col-resize', 'row-resize'
|
32817 | ],
|
32818 | overflow: [
|
32819 | 'hidden', 'visible', 'scroll', 'auto'
|
32820 | ],
|
32821 | position: [
|
32822 | 'static', 'relative', 'absolute', 'fixed'
|
32823 | ]
|
32824 | };
|
32825 |
|
32826 | var NEEDLESS_TABLE = {
|
32827 | 'border-width': ['border'],
|
32828 | 'border-style': ['border'],
|
32829 | 'border-color': ['border'],
|
32830 | 'border-top': ['border'],
|
32831 | 'border-right': ['border'],
|
32832 | 'border-bottom': ['border'],
|
32833 | 'border-left': ['border'],
|
32834 | 'border-top-width': ['border-top', 'border-width', 'border'],
|
32835 | 'border-right-width': ['border-right', 'border-width', 'border'],
|
32836 | 'border-bottom-width': ['border-bottom', 'border-width', 'border'],
|
32837 | 'border-left-width': ['border-left', 'border-width', 'border'],
|
32838 | 'border-top-style': ['border-top', 'border-style', 'border'],
|
32839 | 'border-right-style': ['border-right', 'border-style', 'border'],
|
32840 | 'border-bottom-style': ['border-bottom', 'border-style', 'border'],
|
32841 | 'border-left-style': ['border-left', 'border-style', 'border'],
|
32842 | 'border-top-color': ['border-top', 'border-color', 'border'],
|
32843 | 'border-right-color': ['border-right', 'border-color', 'border'],
|
32844 | 'border-bottom-color': ['border-bottom', 'border-color', 'border'],
|
32845 | 'border-left-color': ['border-left', 'border-color', 'border'],
|
32846 | 'margin-top': ['margin'],
|
32847 | 'margin-right': ['margin'],
|
32848 | 'margin-bottom': ['margin'],
|
32849 | 'margin-left': ['margin'],
|
32850 | 'padding-top': ['padding'],
|
32851 | 'padding-right': ['padding'],
|
32852 | 'padding-bottom': ['padding'],
|
32853 | 'padding-left': ['padding'],
|
32854 | 'font-style': ['font'],
|
32855 | 'font-variant': ['font'],
|
32856 | 'font-weight': ['font'],
|
32857 | 'font-size': ['font'],
|
32858 | 'font-family': ['font'],
|
32859 | 'list-style-type': ['list-style'],
|
32860 | 'list-style-position': ['list-style'],
|
32861 | 'list-style-image': ['list-style']
|
32862 | };
|
32863 |
|
32864 | function getPropertyFingerprint(propertyName, declaration, fingerprints) {
|
32865 | var realName = resolveProperty(propertyName).basename;
|
32866 |
|
32867 | if (realName === 'background') {
|
32868 | return propertyName + ':' + generate$5(declaration.value);
|
32869 | }
|
32870 |
|
32871 | var declarationId = declaration.id;
|
32872 | var fingerprint = fingerprints[declarationId];
|
32873 |
|
32874 | if (!fingerprint) {
|
32875 | switch (declaration.value.type) {
|
32876 | case 'Value':
|
32877 | var vendorId = '';
|
32878 | var iehack = '';
|
32879 | var special = {};
|
32880 | var raw = false;
|
32881 |
|
32882 | declaration.value.children.each(function walk(node) {
|
32883 | switch (node.type) {
|
32884 | case 'Value':
|
32885 | case 'Brackets':
|
32886 | case 'Parentheses':
|
32887 | node.children.each(walk);
|
32888 | break;
|
32889 |
|
32890 | case 'Raw':
|
32891 | raw = true;
|
32892 | break;
|
32893 |
|
32894 | case 'Identifier':
|
32895 | var name = node.name;
|
32896 |
|
32897 | if (!vendorId) {
|
32898 | vendorId = resolveKeyword$4(name).vendor;
|
32899 | }
|
32900 |
|
32901 | if (/\\[09]/.test(name)) {
|
32902 | iehack = RegExp.lastMatch;
|
32903 | }
|
32904 |
|
32905 | if (SAFE_VALUES.hasOwnProperty(realName)) {
|
32906 | if (SAFE_VALUES[realName].indexOf(name) === -1) {
|
32907 | special[name] = true;
|
32908 | }
|
32909 | } else if (DONT_MIX_VALUE.hasOwnProperty(realName)) {
|
32910 | if (DONT_MIX_VALUE[realName].test(name)) {
|
32911 | special[name] = true;
|
32912 | }
|
32913 | }
|
32914 |
|
32915 | break;
|
32916 |
|
32917 | case 'Function':
|
32918 | var name = node.name;
|
32919 |
|
32920 | if (!vendorId) {
|
32921 | vendorId = resolveKeyword$4(name).vendor;
|
32922 | }
|
32923 |
|
32924 | if (name === 'rect') {
|
32925 |
|
32926 |
|
32927 |
|
32928 |
|
32929 | var hasComma = node.children.some(function(node) {
|
32930 | return node.type === 'Operator' && node.value === ',';
|
32931 | });
|
32932 | if (!hasComma) {
|
32933 | name = 'rect-backward';
|
32934 | }
|
32935 | }
|
32936 |
|
32937 | special[name + '()'] = true;
|
32938 |
|
32939 |
|
32940 | node.children.each(walk);
|
32941 |
|
32942 | break;
|
32943 |
|
32944 | case 'Dimension':
|
32945 | var unit = node.unit;
|
32946 |
|
32947 | if (/\\[09]/.test(unit)) {
|
32948 | iehack = RegExp.lastMatch;
|
32949 | }
|
32950 |
|
32951 | switch (unit) {
|
32952 |
|
32953 | case 'rem':
|
32954 |
|
32955 |
|
32956 |
|
32957 | case 'vw':
|
32958 | case 'vh':
|
32959 | case 'vmin':
|
32960 | case 'vmax':
|
32961 | case 'vm':
|
32962 | special[unit] = true;
|
32963 | break;
|
32964 | }
|
32965 | break;
|
32966 | }
|
32967 | });
|
32968 |
|
32969 | fingerprint = raw
|
32970 | ? '!' + fingerprintId++
|
32971 | : '!' + Object.keys(special).sort() + '|' + iehack + vendorId;
|
32972 | break;
|
32973 |
|
32974 | case 'Raw':
|
32975 | fingerprint = '!' + declaration.value.value;
|
32976 | break;
|
32977 |
|
32978 | default:
|
32979 | fingerprint = generate$5(declaration.value);
|
32980 | }
|
32981 |
|
32982 | fingerprints[declarationId] = fingerprint;
|
32983 | }
|
32984 |
|
32985 | return propertyName + fingerprint;
|
32986 | }
|
32987 |
|
32988 | function needless(props, declaration, fingerprints) {
|
32989 | var property = resolveProperty(declaration.property);
|
32990 |
|
32991 | if (NEEDLESS_TABLE.hasOwnProperty(property.basename)) {
|
32992 | var table = NEEDLESS_TABLE[property.basename];
|
32993 |
|
32994 | for (var i = 0; i < table.length; i++) {
|
32995 | var ppre = getPropertyFingerprint(property.prefix + table[i], declaration, fingerprints);
|
32996 | var prev = props.hasOwnProperty(ppre) ? props[ppre] : null;
|
32997 |
|
32998 | if (prev && (!declaration.important || prev.item.data.important)) {
|
32999 | return prev;
|
33000 | }
|
33001 | }
|
33002 | }
|
33003 | }
|
33004 |
|
33005 | function processRule$3(rule, item, list, props, fingerprints) {
|
33006 | var declarations = rule.block.children;
|
33007 |
|
33008 | declarations.eachRight(function(declaration, declarationItem) {
|
33009 | var property = declaration.property;
|
33010 | var fingerprint = getPropertyFingerprint(property, declaration, fingerprints);
|
33011 | var prev = props[fingerprint];
|
33012 |
|
33013 | if (prev && !dontRestructure.hasOwnProperty(property)) {
|
33014 | if (declaration.important && !prev.item.data.important) {
|
33015 | props[fingerprint] = {
|
33016 | block: declarations,
|
33017 | item: declarationItem
|
33018 | };
|
33019 |
|
33020 | prev.block.remove(prev.item);
|
33021 |
|
33022 |
|
33023 |
|
33024 |
|
33025 |
|
33026 |
|
33027 | } else {
|
33028 | declarations.remove(declarationItem);
|
33029 |
|
33030 |
|
33031 |
|
33032 |
|
33033 |
|
33034 |
|
33035 | }
|
33036 | } else {
|
33037 | var prev = needless(props, declaration, fingerprints);
|
33038 |
|
33039 | if (prev) {
|
33040 | declarations.remove(declarationItem);
|
33041 |
|
33042 |
|
33043 |
|
33044 |
|
33045 |
|
33046 |
|
33047 | } else {
|
33048 | declaration.fingerprint = fingerprint;
|
33049 |
|
33050 | props[fingerprint] = {
|
33051 | block: declarations,
|
33052 | item: declarationItem
|
33053 | };
|
33054 | }
|
33055 | }
|
33056 | });
|
33057 |
|
33058 | if (declarations.isEmpty()) {
|
33059 | list.remove(item);
|
33060 | }
|
33061 | }
|
33062 |
|
33063 | var _6RestructBlock = function restructBlock(ast) {
|
33064 | var stylesheetMap = {};
|
33065 | var fingerprints = Object.create(null);
|
33066 |
|
33067 | walk$9(ast, {
|
33068 | visit: 'Rule',
|
33069 | reverse: true,
|
33070 | enter: function(node, item, list) {
|
33071 | var stylesheet = this.block || this.stylesheet;
|
33072 | var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
|
33073 | var ruleMap;
|
33074 | var props;
|
33075 |
|
33076 | if (!stylesheetMap.hasOwnProperty(stylesheet.id)) {
|
33077 | ruleMap = {};
|
33078 | stylesheetMap[stylesheet.id] = ruleMap;
|
33079 | } else {
|
33080 | ruleMap = stylesheetMap[stylesheet.id];
|
33081 | }
|
33082 |
|
33083 | if (ruleMap.hasOwnProperty(ruleId)) {
|
33084 | props = ruleMap[ruleId];
|
33085 | } else {
|
33086 | props = {};
|
33087 | ruleMap[ruleId] = props;
|
33088 | }
|
33089 |
|
33090 | processRule$3.call(this, node, item, list, props, fingerprints);
|
33091 | }
|
33092 | });
|
33093 | };
|
33094 |
|
33095 | var walk$a = csstree_min.walk;
|
33096 |
|
33097 |
|
33098 |
|
33099 |
|
33100 |
|
33101 |
|
33102 |
|
33103 |
|
33104 |
|
33105 |
|
33106 |
|
33107 |
|
33108 |
|
33109 |
|
33110 | function processRule$4(node, item, list) {
|
33111 | var selectors = node.prelude.children;
|
33112 | var declarations = node.block.children;
|
33113 | var nodeCompareMarker = selectors.first().compareMarker;
|
33114 | var skippedCompareMarkers = {};
|
33115 |
|
33116 | list.nextUntil(item.next, function(next, nextItem) {
|
33117 |
|
33118 | if (next.type !== 'Rule') {
|
33119 | return utils$2.unsafeToSkipNode.call(selectors, next);
|
33120 | }
|
33121 |
|
33122 | if (node.pseudoSignature !== next.pseudoSignature) {
|
33123 | return true;
|
33124 | }
|
33125 |
|
33126 | var nextFirstSelector = next.prelude.children.head;
|
33127 | var nextDeclarations = next.block.children;
|
33128 | var nextCompareMarker = nextFirstSelector.data.compareMarker;
|
33129 |
|
33130 |
|
33131 | if (nextCompareMarker in skippedCompareMarkers) {
|
33132 | return true;
|
33133 | }
|
33134 |
|
33135 |
|
33136 | if (selectors.head === selectors.tail) {
|
33137 | if (selectors.first().id === nextFirstSelector.data.id) {
|
33138 | declarations.appendList(nextDeclarations);
|
33139 | list.remove(nextItem);
|
33140 | return;
|
33141 | }
|
33142 | }
|
33143 |
|
33144 |
|
33145 | if (utils$2.isEqualDeclarations(declarations, nextDeclarations)) {
|
33146 | var nextStr = nextFirstSelector.data.id;
|
33147 |
|
33148 | selectors.some(function(data, item) {
|
33149 | var curStr = data.id;
|
33150 |
|
33151 | if (nextStr < curStr) {
|
33152 | selectors.insert(nextFirstSelector, item);
|
33153 | return true;
|
33154 | }
|
33155 |
|
33156 | if (!item.next) {
|
33157 | selectors.insert(nextFirstSelector);
|
33158 | return true;
|
33159 | }
|
33160 | });
|
33161 |
|
33162 | list.remove(nextItem);
|
33163 | return;
|
33164 | }
|
33165 |
|
33166 |
|
33167 | if (nextCompareMarker === nodeCompareMarker) {
|
33168 | return true;
|
33169 | }
|
33170 |
|
33171 | skippedCompareMarkers[nextCompareMarker] = true;
|
33172 | });
|
33173 | }
|
33174 |
|
33175 | var _7MergeRuleset = function mergeRule(ast) {
|
33176 | walk$a(ast, {
|
33177 | visit: 'Rule',
|
33178 | enter: processRule$4
|
33179 | });
|
33180 | };
|
33181 |
|
33182 | var List$6 = csstree_min.List;
|
33183 | var walk$b = csstree_min.walk;
|
33184 |
|
33185 |
|
33186 | function calcSelectorLength(list) {
|
33187 | var length = 0;
|
33188 |
|
33189 | list.each(function(data) {
|
33190 | length += data.id.length + 1;
|
33191 | });
|
33192 |
|
33193 | return length - 1;
|
33194 | }
|
33195 |
|
33196 | function calcDeclarationsLength(tokens) {
|
33197 | var length = 0;
|
33198 |
|
33199 | for (var i = 0; i < tokens.length; i++) {
|
33200 | length += tokens[i].length;
|
33201 | }
|
33202 |
|
33203 | return (
|
33204 | length +
|
33205 | tokens.length - 1
|
33206 | );
|
33207 | }
|
33208 |
|
33209 | function processRule$5(node, item, list) {
|
33210 | var avoidRulesMerge = this.block !== null ? this.block.avoidRulesMerge : false;
|
33211 | var selectors = node.prelude.children;
|
33212 | var block = node.block;
|
33213 | var disallowDownMarkers = Object.create(null);
|
33214 | var allowMergeUp = true;
|
33215 | var allowMergeDown = true;
|
33216 |
|
33217 | list.prevUntil(item.prev, function(prev, prevItem) {
|
33218 | var prevBlock = prev.block;
|
33219 | var prevType = prev.type;
|
33220 |
|
33221 | if (prevType !== 'Rule') {
|
33222 | var unsafe = utils$2.unsafeToSkipNode.call(selectors, prev);
|
33223 |
|
33224 | if (!unsafe && prevType === 'Atrule' && prevBlock) {
|
33225 | walk$b(prevBlock, {
|
33226 | visit: 'Rule',
|
33227 | enter: function(node) {
|
33228 | node.prelude.children.each(function(data) {
|
33229 | disallowDownMarkers[data.compareMarker] = true;
|
33230 | });
|
33231 | }
|
33232 | });
|
33233 | }
|
33234 |
|
33235 | return unsafe;
|
33236 | }
|
33237 |
|
33238 | var prevSelectors = prev.prelude.children;
|
33239 |
|
33240 | if (node.pseudoSignature !== prev.pseudoSignature) {
|
33241 | return true;
|
33242 | }
|
33243 |
|
33244 | allowMergeDown = !prevSelectors.some(function(selector) {
|
33245 | return selector.compareMarker in disallowDownMarkers;
|
33246 | });
|
33247 |
|
33248 |
|
33249 | if (!allowMergeDown && !allowMergeUp) {
|
33250 | return true;
|
33251 | }
|
33252 |
|
33253 |
|
33254 | if (allowMergeUp && utils$2.isEqualSelectors(prevSelectors, selectors)) {
|
33255 | prevBlock.children.appendList(block.children);
|
33256 | list.remove(item);
|
33257 | return true;
|
33258 | }
|
33259 |
|
33260 |
|
33261 | var diff = utils$2.compareDeclarations(block.children, prevBlock.children);
|
33262 |
|
33263 |
|
33264 |
|
33265 | if (diff.eq.length) {
|
33266 | if (!diff.ne1.length && !diff.ne2.length) {
|
33267 |
|
33268 | if (allowMergeDown) {
|
33269 | utils$2.addSelectors(selectors, prevSelectors);
|
33270 | list.remove(prevItem);
|
33271 | }
|
33272 |
|
33273 | return true;
|
33274 | } else if (!avoidRulesMerge) { |
33275 |
|
33276 |
|
33277 | if (diff.ne1.length && !diff.ne2.length) {
|
33278 |
|
33279 | var selectorLength = calcSelectorLength(selectors);
|
33280 | var blockLength = calcDeclarationsLength(diff.eq);
|
33281 |
|
33282 | if (allowMergeUp && selectorLength < blockLength) {
|
33283 | utils$2.addSelectors(prevSelectors, selectors);
|
33284 | block.children = new List$6().fromArray(diff.ne1);
|
33285 | }
|
33286 | } else if (!diff.ne1.length && diff.ne2.length) {
|
33287 |
|
33288 | var selectorLength = calcSelectorLength(prevSelectors);
|
33289 | var blockLength = calcDeclarationsLength(diff.eq);
|
33290 |
|
33291 | if (allowMergeDown && selectorLength < blockLength) {
|
33292 | utils$2.addSelectors(selectors, prevSelectors);
|
33293 | prevBlock.children = new List$6().fromArray(diff.ne2);
|
33294 | }
|
33295 | } else {
|
33296 |
|
33297 |
|
33298 | var newSelector = {
|
33299 | type: 'SelectorList',
|
33300 | loc: null,
|
33301 | children: utils$2.addSelectors(prevSelectors.copy(), selectors)
|
33302 | };
|
33303 | var newBlockLength = calcSelectorLength(newSelector.children) + 2;
|
33304 | var blockLength = calcDeclarationsLength(diff.eq);
|
33305 |
|
33306 |
|
33307 |
|
33308 | if (blockLength >= newBlockLength) {
|
33309 | var newItem = list.createItem({
|
33310 | type: 'Rule',
|
33311 | loc: null,
|
33312 | prelude: newSelector,
|
33313 | block: {
|
33314 | type: 'Block',
|
33315 | loc: null,
|
33316 | children: new List$6().fromArray(diff.eq)
|
33317 | },
|
33318 | pseudoSignature: node.pseudoSignature
|
33319 | });
|
33320 |
|
33321 | block.children = new List$6().fromArray(diff.ne1);
|
33322 | prevBlock.children = new List$6().fromArray(diff.ne2overrided);
|
33323 |
|
33324 | if (allowMergeUp) {
|
33325 | list.insert(newItem, prevItem);
|
33326 | } else {
|
33327 | list.insert(newItem, item);
|
33328 | }
|
33329 |
|
33330 | return true;
|
33331 | }
|
33332 | }
|
33333 | }
|
33334 | }
|
33335 |
|
33336 | if (allowMergeUp) {
|
33337 |
|
33338 |
|
33339 | allowMergeUp = !prevSelectors.some(function(prevSelector) {
|
33340 | return selectors.some(function(selector) {
|
33341 | return selector.compareMarker === prevSelector.compareMarker;
|
33342 | });
|
33343 | });
|
33344 | }
|
33345 |
|
33346 | prevSelectors.each(function(data) {
|
33347 | disallowDownMarkers[data.compareMarker] = true;
|
33348 | });
|
33349 | });
|
33350 | }
|
33351 |
|
33352 | var _8RestructRuleset = function restructRule(ast) {
|
33353 | walk$b(ast, {
|
33354 | visit: 'Rule',
|
33355 | reverse: true,
|
33356 | enter: processRule$5
|
33357 | });
|
33358 | };
|
33359 |
|
33360 | var restructure = function(ast, options) {
|
33361 |
|
33362 | var indexer = prepare(ast, options);
|
33363 | options.logger('prepare', ast);
|
33364 |
|
33365 | _1MergeAtrule(ast, options);
|
33366 | options.logger('mergeAtrule', ast);
|
33367 |
|
33368 | _2InitialMergeRuleset(ast);
|
33369 | options.logger('initialMergeRuleset', ast);
|
33370 |
|
33371 | _3DisjoinRuleset(ast);
|
33372 | options.logger('disjoinRuleset', ast);
|
33373 |
|
33374 | _4RestructShorthand(ast, indexer);
|
33375 | options.logger('restructShorthand', ast);
|
33376 |
|
33377 | _6RestructBlock(ast);
|
33378 | options.logger('restructBlock', ast);
|
33379 |
|
33380 | _7MergeRuleset(ast);
|
33381 | options.logger('mergeRuleset', ast);
|
33382 |
|
33383 | _8RestructRuleset(ast);
|
33384 | options.logger('restructRuleset', ast);
|
33385 | };
|
33386 |
|
33387 | var List$7 = csstree_min.List;
|
33388 | var clone$1 = csstree_min.clone;
|
33389 |
|
33390 |
|
33391 |
|
33392 |
|
33393 | var walk$c = csstree_min.walk;
|
33394 |
|
33395 | function readChunk(children, specialComments) {
|
33396 | var buffer = new List$7();
|
33397 | var nonSpaceTokenInBuffer = false;
|
33398 | var protectedComment;
|
33399 |
|
33400 | children.nextUntil(children.head, function(node, item, list) {
|
33401 | if (node.type === 'Comment') {
|
33402 | if (!specialComments || node.value.charAt(0) !== '!') {
|
33403 | list.remove(item);
|
33404 | return;
|
33405 | }
|
33406 |
|
33407 | if (nonSpaceTokenInBuffer || protectedComment) {
|
33408 | return true;
|
33409 | }
|
33410 |
|
33411 | list.remove(item);
|
33412 | protectedComment = node;
|
33413 | return;
|
33414 | }
|
33415 |
|
33416 | if (node.type !== 'WhiteSpace') {
|
33417 | nonSpaceTokenInBuffer = true;
|
33418 | }
|
33419 |
|
33420 | buffer.insert(list.remove(item));
|
33421 | });
|
33422 |
|
33423 | return {
|
33424 | comment: protectedComment,
|
33425 | stylesheet: {
|
33426 | type: 'StyleSheet',
|
33427 | loc: null,
|
33428 | children: buffer
|
33429 | }
|
33430 | };
|
33431 | }
|
33432 |
|
33433 | function compressChunk(ast, firstAtrulesAllowed, num, options) {
|
33434 | options.logger('Compress block #' + num, null, true);
|
33435 |
|
33436 | var seed = 1;
|
33437 |
|
33438 | if (ast.type === 'StyleSheet') {
|
33439 | ast.firstAtrulesAllowed = firstAtrulesAllowed;
|
33440 | ast.id = seed++;
|
33441 | }
|
33442 |
|
33443 | walk$c(ast, {
|
33444 | visit: 'Atrule',
|
33445 | enter: function markScopes(node) {
|
33446 | if (node.block !== null) {
|
33447 | node.block.id = seed++;
|
33448 | }
|
33449 | }
|
33450 | });
|
33451 | options.logger('init', ast);
|
33452 |
|
33453 |
|
33454 | clean(ast, options);
|
33455 | options.logger('clean', ast);
|
33456 |
|
33457 |
|
33458 | replace(ast);
|
33459 | options.logger('replace', ast);
|
33460 |
|
33461 |
|
33462 | if (options.restructuring) {
|
33463 | restructure(ast, options);
|
33464 | }
|
33465 |
|
33466 | return ast;
|
33467 | }
|
33468 |
|
33469 | function getCommentsOption(options) {
|
33470 | var comments = 'comments' in options ? options.comments : 'exclamation';
|
33471 |
|
33472 | if (typeof comments === 'boolean') {
|
33473 | comments = comments ? 'exclamation' : false;
|
33474 | } else if (comments !== 'exclamation' && comments !== 'first-exclamation') {
|
33475 | comments = false;
|
33476 | }
|
33477 |
|
33478 | return comments;
|
33479 | }
|
33480 |
|
33481 | function getRestructureOption(options) {
|
33482 | if ('restructure' in options) {
|
33483 | return options.restructure;
|
33484 | }
|
33485 |
|
33486 | return 'restructuring' in options ? options.restructuring : true;
|
33487 | }
|
33488 |
|
33489 | function wrapBlock(block) {
|
33490 | return new List$7().appendData({
|
33491 | type: 'Rule',
|
33492 | loc: null,
|
33493 | prelude: {
|
33494 | type: 'SelectorList',
|
33495 | loc: null,
|
33496 | children: new List$7().appendData({
|
33497 | type: 'Selector',
|
33498 | loc: null,
|
33499 | children: new List$7().appendData({
|
33500 | type: 'TypeSelector',
|
33501 | loc: null,
|
33502 | name: 'x'
|
33503 | })
|
33504 | })
|
33505 | },
|
33506 | block: block
|
33507 | });
|
33508 | }
|
33509 |
|
33510 | var compress = function compress(ast, options) {
|
33511 | ast = ast || { type: 'StyleSheet', loc: null, children: new List$7() };
|
33512 | options = options || {};
|
33513 |
|
33514 | var compressOptions = {
|
33515 | logger: typeof options.logger === 'function' ? options.logger : function() {},
|
33516 | restructuring: getRestructureOption(options),
|
33517 | forceMediaMerge: Boolean(options.forceMediaMerge),
|
33518 | usage: options.usage ? usage.buildIndex(options.usage) : false
|
33519 | };
|
33520 | var specialComments = getCommentsOption(options);
|
33521 | var firstAtrulesAllowed = true;
|
33522 | var input;
|
33523 | var output = new List$7();
|
33524 | var chunk;
|
33525 | var chunkNum = 1;
|
33526 | var chunkChildren;
|
33527 |
|
33528 | if (options.clone) {
|
33529 | ast = clone$1(ast);
|
33530 | }
|
33531 |
|
33532 | if (ast.type === 'StyleSheet') {
|
33533 | input = ast.children;
|
33534 | ast.children = output;
|
33535 | } else {
|
33536 | input = wrapBlock(ast);
|
33537 | }
|
33538 |
|
33539 | do {
|
33540 | chunk = readChunk(input, Boolean(specialComments));
|
33541 | compressChunk(chunk.stylesheet, firstAtrulesAllowed, chunkNum++, compressOptions);
|
33542 | chunkChildren = chunk.stylesheet.children;
|
33543 |
|
33544 | if (chunk.comment) {
|
33545 |
|
33546 | if (!output.isEmpty()) {
|
33547 | output.insert(List$7.createItem({
|
33548 | type: 'Raw',
|
33549 | value: '\n'
|
33550 | }));
|
33551 | }
|
33552 |
|
33553 | output.insert(List$7.createItem(chunk.comment));
|
33554 |
|
33555 |
|
33556 | if (!chunkChildren.isEmpty()) {
|
33557 | output.insert(List$7.createItem({
|
33558 | type: 'Raw',
|
33559 | value: '\n'
|
33560 | }));
|
33561 | }
|
33562 | }
|
33563 |
|
33564 | if (firstAtrulesAllowed && !chunkChildren.isEmpty()) {
|
33565 | var lastRule = chunkChildren.last();
|
33566 |
|
33567 | if (lastRule.type !== 'Atrule' ||
|
33568 | (lastRule.name !== 'import' && lastRule.name !== 'charset')) {
|
33569 | firstAtrulesAllowed = false;
|
33570 | }
|
33571 | }
|
33572 |
|
33573 | if (specialComments !== 'exclamation') {
|
33574 | specialComments = false;
|
33575 | }
|
33576 |
|
33577 | output.appendList(chunkChildren);
|
33578 | } while (!input.isEmpty());
|
33579 |
|
33580 | return {
|
33581 | ast: ast
|
33582 | };
|
33583 | };
|
33584 |
|
33585 | var _args$1 = [
|
33586 | [
|
33587 | "csso@4.2.0",
|
33588 | "/Users/bogdancadkin/host/svgo"
|
33589 | ]
|
33590 | ];
|
33591 | var _from$1 = "csso@4.2.0";
|
33592 | var _id$1 = "csso@4.2.0";
|
33593 | var _inBundle$1 = false;
|
33594 | var _integrity$1 = "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==";
|
33595 | var _location$1 = "/csso";
|
33596 | var _phantomChildren$1 = {
|
33597 | };
|
33598 | var _requested$1 = {
|
33599 | type: "version",
|
33600 | registry: true,
|
33601 | raw: "csso@4.2.0",
|
33602 | name: "csso",
|
33603 | escapedName: "csso",
|
33604 | rawSpec: "4.2.0",
|
33605 | saveSpec: null,
|
33606 | fetchSpec: "4.2.0"
|
33607 | };
|
33608 | var _requiredBy$1 = [
|
33609 | "/"
|
33610 | ];
|
33611 | var _resolved$1 = "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz";
|
33612 | var _spec$1 = "4.2.0";
|
33613 | var _where$1 = "/Users/bogdancadkin/host/svgo";
|
33614 | var author$1 = {
|
33615 | name: "Sergey Kryzhanovsky",
|
33616 | email: "skryzhanovsky@ya.ru",
|
33617 | url: "https://github.com/afelix"
|
33618 | };
|
33619 | var browser = {
|
33620 | "css-tree": "css-tree/dist/csstree.min.js"
|
33621 | };
|
33622 | var bugs$1 = {
|
33623 | url: "https://github.com/css/csso/issues"
|
33624 | };
|
33625 | var dependencies$1 = {
|
33626 | "css-tree": "^1.1.2"
|
33627 | };
|
33628 | var description$h = "CSS minifier with structural optimisations";
|
33629 | var devDependencies$1 = {
|
33630 | "@rollup/plugin-commonjs": "^11.0.1",
|
33631 | "@rollup/plugin-json": "^4.0.1",
|
33632 | "@rollup/plugin-node-resolve": "^7.0.0",
|
33633 | coveralls: "^3.0.11",
|
33634 | eslint: "^6.8.0",
|
33635 | mocha: "^7.1.1",
|
33636 | nyc: "^15.0.0",
|
33637 | rollup: "^1.29.0",
|
33638 | "source-map": "^0.6.1",
|
33639 | terser: "^4.6.3"
|
33640 | };
|
33641 | var engines$1 = {
|
33642 | node: ">=8.0.0"
|
33643 | };
|
33644 | var files$1 = [
|
33645 | "dist",
|
33646 | "lib"
|
33647 | ];
|
33648 | var homepage$1 = "https://github.com/css/csso";
|
33649 | var keywords$2 = [
|
33650 | "css",
|
33651 | "compress",
|
33652 | "minifier",
|
33653 | "minify",
|
33654 | "optimise",
|
33655 | "optimisation",
|
33656 | "csstree"
|
33657 | ];
|
33658 | var license$1 = "MIT";
|
33659 | var main$1 = "./lib/index";
|
33660 | var maintainers = [
|
33661 | {
|
33662 | name: "Roman Dvornov",
|
33663 | email: "rdvornov@gmail.com"
|
33664 | }
|
33665 | ];
|
33666 | var name$1 = "csso";
|
33667 | var repository$1 = {
|
33668 | type: "git",
|
33669 | url: "git+https://github.com/css/csso.git"
|
33670 | };
|
33671 | var scripts$1 = {
|
33672 | build: "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
|
33673 | coverage: "nyc npm test",
|
33674 | coveralls: "nyc report --reporter=text-lcov | coveralls",
|
33675 | hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
|
33676 | lint: "eslint lib test",
|
33677 | "lint-and-test": "npm run lint && npm test",
|
33678 | prepublishOnly: "npm run build",
|
33679 | test: "mocha --reporter dot",
|
33680 | travis: "nyc npm run lint-and-test && npm run coveralls"
|
33681 | };
|
33682 | var version$2 = "4.2.0";
|
33683 | var require$$0 = {
|
33684 | _args: _args$1,
|
33685 | _from: _from$1,
|
33686 | _id: _id$1,
|
33687 | _inBundle: _inBundle$1,
|
33688 | _integrity: _integrity$1,
|
33689 | _location: _location$1,
|
33690 | _phantomChildren: _phantomChildren$1,
|
33691 | _requested: _requested$1,
|
33692 | _requiredBy: _requiredBy$1,
|
33693 | _resolved: _resolved$1,
|
33694 | _spec: _spec$1,
|
33695 | _where: _where$1,
|
33696 | author: author$1,
|
33697 | browser: browser,
|
33698 | bugs: bugs$1,
|
33699 | dependencies: dependencies$1,
|
33700 | description: description$h,
|
33701 | devDependencies: devDependencies$1,
|
33702 | engines: engines$1,
|
33703 | files: files$1,
|
33704 | homepage: homepage$1,
|
33705 | keywords: keywords$2,
|
33706 | license: license$1,
|
33707 | main: main$1,
|
33708 | maintainers: maintainers,
|
33709 | name: name$1,
|
33710 | repository: repository$1,
|
33711 | scripts: scripts$1,
|
33712 | version: version$2
|
33713 | };
|
33714 |
|
33715 | var parse$1 = csstree_min.parse;
|
33716 |
|
33717 | var generate$6 = csstree_min.generate;
|
33718 |
|
33719 | function debugOutput(name, options, startTime, data) {
|
33720 | if (options.debug) {
|
33721 | console.error('## ' + name + ' done in %d ms\n', Date.now() - startTime);
|
33722 | }
|
33723 |
|
33724 | return data;
|
33725 | }
|
33726 |
|
33727 | function createDefaultLogger(level) {
|
33728 | var lastDebug;
|
33729 |
|
33730 | return function logger(title, ast) {
|
33731 | var line = title;
|
33732 |
|
33733 | if (ast) {
|
33734 | line = '[' + ((Date.now() - lastDebug) / 1000).toFixed(3) + 's] ' + line;
|
33735 | }
|
33736 |
|
33737 | if (level > 1 && ast) {
|
33738 | var css = generate$6(ast);
|
33739 |
|
33740 |
|
33741 | if (level === 2 && css.length > 256) {
|
33742 | css = css.substr(0, 256) + '...';
|
33743 | }
|
33744 |
|
33745 | line += '\n ' + css + '\n';
|
33746 | }
|
33747 |
|
33748 | console.error(line);
|
33749 | lastDebug = Date.now();
|
33750 | };
|
33751 | }
|
33752 |
|
33753 | function copy$1(obj) {
|
33754 | var result = {};
|
33755 |
|
33756 | for (var key in obj) {
|
33757 | result[key] = obj[key];
|
33758 | }
|
33759 |
|
33760 | return result;
|
33761 | }
|
33762 |
|
33763 | function buildCompressOptions(options) {
|
33764 | options = copy$1(options);
|
33765 |
|
33766 | if (typeof options.logger !== 'function' && options.debug) {
|
33767 | options.logger = createDefaultLogger(options.debug);
|
33768 | }
|
33769 |
|
33770 | return options;
|
33771 | }
|
33772 |
|
33773 | function runHandler(ast, options, handlers) {
|
33774 | if (!Array.isArray(handlers)) {
|
33775 | handlers = [handlers];
|
33776 | }
|
33777 |
|
33778 | handlers.forEach(function(fn) {
|
33779 | fn(ast, options);
|
33780 | });
|
33781 | }
|
33782 |
|
33783 | function minify(context, source, options) {
|
33784 | options = options || {};
|
33785 |
|
33786 | var filename = options.filename || '<unknown>';
|
33787 | var result;
|
33788 |
|
33789 |
|
33790 | var ast = debugOutput('parsing', options, Date.now(),
|
33791 | parse$1(source, {
|
33792 | context: context,
|
33793 | filename: filename,
|
33794 | positions: Boolean(options.sourceMap)
|
33795 | })
|
33796 | );
|
33797 |
|
33798 |
|
33799 | if (options.beforeCompress) {
|
33800 | debugOutput('beforeCompress', options, Date.now(),
|
33801 | runHandler(ast, options, options.beforeCompress)
|
33802 | );
|
33803 | }
|
33804 |
|
33805 |
|
33806 | var compressResult = debugOutput('compress', options, Date.now(),
|
33807 | compress(ast, buildCompressOptions(options))
|
33808 | );
|
33809 |
|
33810 |
|
33811 | if (options.afterCompress) {
|
33812 | debugOutput('afterCompress', options, Date.now(),
|
33813 | runHandler(compressResult, options, options.afterCompress)
|
33814 | );
|
33815 | }
|
33816 |
|
33817 |
|
33818 | if (options.sourceMap) {
|
33819 | result = debugOutput('generate(sourceMap: true)', options, Date.now(), (function() {
|
33820 | var tmp = generate$6(compressResult.ast, { sourceMap: true });
|
33821 | tmp.map._file = filename;
|
33822 | tmp.map.setSourceContent(filename, source);
|
33823 | return tmp;
|
33824 | }()));
|
33825 | } else {
|
33826 | result = debugOutput('generate', options, Date.now(), {
|
33827 | css: generate$6(compressResult.ast),
|
33828 | map: null
|
33829 | });
|
33830 | }
|
33831 |
|
33832 | return result;
|
33833 | }
|
33834 |
|
33835 | function minifyStylesheet(source, options) {
|
33836 | return minify('stylesheet', source, options);
|
33837 | }
|
33838 |
|
33839 | function minifyBlock(source, options) {
|
33840 | return minify('declarationList', source, options);
|
33841 | }
|
33842 |
|
33843 | var lib$1 = {
|
33844 | version: require$$0.version,
|
33845 |
|
33846 |
|
33847 | minify: minifyStylesheet,
|
33848 | minifyBlock: minifyBlock,
|
33849 |
|
33850 |
|
33851 | syntax: Object.assign({
|
33852 | compress: compress
|
33853 | }, csstree_min)
|
33854 | };
|
33855 |
|
33856 | var type$g = 'full';
|
33857 |
|
33858 | var active$g = true;
|
33859 |
|
33860 | var description$i = 'minifies styles and removes unused styles based on usage data';
|
33861 |
|
33862 | var params$b = {
|
33863 |
|
33864 |
|
33865 |
|
33866 | usage: {
|
33867 | force: false,
|
33868 | ids: true,
|
33869 | classes: true,
|
33870 | tags: true
|
33871 | }
|
33872 | };
|
33873 |
|
33874 |
|
33875 |
|
33876 |
|
33877 |
|
33878 |
|
33879 |
|
33880 |
|
33881 | var fn$g = function(ast, options) {
|
33882 | options = options || {};
|
33883 |
|
33884 | var minifyOptionsForStylesheet = cloneObject(options);
|
33885 | var minifyOptionsForAttribute = cloneObject(options);
|
33886 | var elems = findStyleElems(ast);
|
33887 |
|
33888 | minifyOptionsForStylesheet.usage = collectUsageData(ast, options);
|
33889 | minifyOptionsForAttribute.usage = null;
|
33890 |
|
33891 | elems.forEach(function(elem) {
|
33892 | if (elem.isElem('style')) {
|
33893 |
|
33894 | var styleCss = elem.content[0].text || elem.content[0].cdata || [];
|
33895 | var DATA = styleCss.indexOf('>') >= 0 || styleCss.indexOf('<') >= 0 ? 'cdata' : 'text';
|
33896 |
|
33897 | elem.content[0][DATA] = lib$1.minify(styleCss, minifyOptionsForStylesheet).css;
|
33898 | } else {
|
33899 |
|
33900 | var elemStyle = elem.attr('style').value;
|
33901 |
|
33902 | elem.attr('style').value = lib$1.minifyBlock(elemStyle, minifyOptionsForAttribute).css;
|
33903 | }
|
33904 | });
|
33905 |
|
33906 | return ast;
|
33907 | };
|
33908 |
|
33909 | function cloneObject(obj) {
|
33910 | var result = {};
|
33911 |
|
33912 | for (var key in obj) {
|
33913 | result[key] = obj[key];
|
33914 | }
|
33915 |
|
33916 | return result;
|
33917 | }
|
33918 |
|
33919 | function findStyleElems(ast) {
|
33920 |
|
33921 | function walk(items, styles) {
|
33922 | for (var i = 0; i < items.content.length; i++) {
|
33923 | var item = items.content[i];
|
33924 |
|
33925 |
|
33926 | if (item.content) {
|
33927 | walk(item, styles);
|
33928 | }
|
33929 |
|
33930 | if (item.isElem('style') && !item.isEmpty()) {
|
33931 | styles.push(item);
|
33932 | } else if (item.isElem() && item.hasAttr('style')) {
|
33933 | styles.push(item);
|
33934 | }
|
33935 | }
|
33936 |
|
33937 | return styles;
|
33938 | }
|
33939 |
|
33940 | return walk(ast, []);
|
33941 | }
|
33942 |
|
33943 | function shouldFilter(options, name) {
|
33944 | if ('usage' in options === false) {
|
33945 | return true;
|
33946 | }
|
33947 |
|
33948 | if (options.usage && name in options.usage === false) {
|
33949 | return true;
|
33950 | }
|
33951 |
|
33952 | return Boolean(options.usage && options.usage[name]);
|
33953 | }
|
33954 |
|
33955 | function collectUsageData(ast, options) {
|
33956 |
|
33957 | function walk(items, usageData) {
|
33958 | for (var i = 0; i < items.content.length; i++) {
|
33959 | var item = items.content[i];
|
33960 |
|
33961 |
|
33962 | if (item.content) {
|
33963 | walk(item, usageData);
|
33964 | }
|
33965 |
|
33966 | if (item.isElem('script')) {
|
33967 | safe = false;
|
33968 | }
|
33969 |
|
33970 | if (item.isElem()) {
|
33971 | usageData.tags[item.elem] = true;
|
33972 |
|
33973 | if (item.hasAttr('id')) {
|
33974 | usageData.ids[item.attr('id').value] = true;
|
33975 | }
|
33976 |
|
33977 | if (item.hasAttr('class')) {
|
33978 | item.attr('class').value.replace(/^\s+|\s+$/g, '').split(/\s+/).forEach(function(className) {
|
33979 | usageData.classes[className] = true;
|
33980 | });
|
33981 | }
|
33982 |
|
33983 | if (item.attrs && Object.keys(item.attrs).some(function(name) { return /^on/i.test(name); })) {
|
33984 | safe = false;
|
33985 | }
|
33986 | }
|
33987 | }
|
33988 |
|
33989 | return usageData;
|
33990 | }
|
33991 |
|
33992 | var safe = true;
|
33993 | var usageData = {};
|
33994 | var hasData = false;
|
33995 | var rawData = walk(ast, {
|
33996 | ids: Object.create(null),
|
33997 | classes: Object.create(null),
|
33998 | tags: Object.create(null)
|
33999 | });
|
34000 |
|
34001 | if (!safe && options.usage && options.usage.force) {
|
34002 | safe = true;
|
34003 | }
|
34004 |
|
34005 | for (var key in rawData) {
|
34006 | if (shouldFilter(options, key)) {
|
34007 | usageData[key] = Object.keys(rawData[key]);
|
34008 | hasData = true;
|
34009 | }
|
34010 | }
|
34011 |
|
34012 | return safe && hasData ? usageData : null;
|
34013 | }
|
34014 |
|
34015 | var minifyStyles = {
|
34016 | type: type$g,
|
34017 | active: active$g,
|
34018 | description: description$i,
|
34019 | params: params$b,
|
34020 | fn: fn$g
|
34021 | };
|
34022 |
|
34023 | var type$h = 'perItemReverse';
|
34024 |
|
34025 | var active$h = true;
|
34026 |
|
34027 | var description$j = 'moves elements attributes to the existing group wrapper';
|
34028 |
|
34029 | var inheritableAttrs$1 = _collections.inheritableAttrs,
|
34030 | pathElems$2 = _collections.pathElems;
|
34031 |
|
34032 |
|
34033 |
|
34034 |
|
34035 |
|
34036 |
|
34037 |
|
34038 |
|
34039 |
|
34040 |
|
34041 |
|
34042 |
|
34043 |
|
34044 |
|
34045 |
|
34046 |
|
34047 |
|
34048 |
|
34049 |
|
34050 |
|
34051 |
|
34052 |
|
34053 |
|
34054 |
|
34055 |
|
34056 | var fn$h = function(item) {
|
34057 |
|
34058 | if (item.isElem('g') && !item.isEmpty() && item.content.length > 1) {
|
34059 |
|
34060 | var intersection = {},
|
34061 | hasTransform = false,
|
34062 | hasClip = item.hasAttr('clip-path') || item.hasAttr('mask'),
|
34063 | intersected = item.content.every(function(inner) {
|
34064 | if (inner.isElem() && inner.hasAttr()) {
|
34065 |
|
34066 | if (inner.hasAttr('class')) return false;
|
34067 | if (!Object.keys(intersection).length) {
|
34068 | intersection = inner.attrs;
|
34069 | } else {
|
34070 | intersection = intersectInheritableAttrs(intersection, inner.attrs);
|
34071 |
|
34072 | if (!intersection) return false;
|
34073 | }
|
34074 |
|
34075 | return true;
|
34076 | }
|
34077 | }),
|
34078 | allPath = item.content.every(function(inner) {
|
34079 | return inner.isElem(pathElems$2);
|
34080 | });
|
34081 |
|
34082 | if (intersected) {
|
34083 |
|
34084 | item.content.forEach(function(g) {
|
34085 |
|
34086 | for (var name in intersection) {
|
34087 |
|
34088 | if (!allPath && !hasClip || name !== 'transform') {
|
34089 |
|
34090 | g.removeAttr(name);
|
34091 |
|
34092 | if (name === 'transform') {
|
34093 | if (!hasTransform) {
|
34094 | if (item.hasAttr('transform')) {
|
34095 | item.attr('transform').value += ' ' + intersection[name].value;
|
34096 | } else {
|
34097 | item.addAttr(intersection[name]);
|
34098 | }
|
34099 |
|
34100 | hasTransform = true;
|
34101 | }
|
34102 | } else {
|
34103 | item.addAttr(intersection[name]);
|
34104 | }
|
34105 |
|
34106 | }
|
34107 | }
|
34108 |
|
34109 | });
|
34110 |
|
34111 | }
|
34112 |
|
34113 | }
|
34114 |
|
34115 | };
|
34116 |
|
34117 |
|
34118 |
|
34119 |
|
34120 |
|
34121 |
|
34122 |
|
34123 |
|
34124 |
|
34125 | function intersectInheritableAttrs(a, b) {
|
34126 |
|
34127 | var c = {};
|
34128 |
|
34129 | for (var n in a) {
|
34130 | if (
|
34131 | b.hasOwnProperty(n) &&
|
34132 | inheritableAttrs$1.indexOf(n) > -1 &&
|
34133 | a[n].name === b[n].name &&
|
34134 | a[n].value === b[n].value &&
|
34135 | a[n].prefix === b[n].prefix &&
|
34136 | a[n].local === b[n].local
|
34137 | ) {
|
34138 | c[n] = a[n];
|
34139 | }
|
34140 | }
|
34141 |
|
34142 | if (!Object.keys(c).length) return false;
|
34143 |
|
34144 | return c;
|
34145 |
|
34146 | }
|
34147 |
|
34148 | var moveElemsAttrsToGroup = {
|
34149 | type: type$h,
|
34150 | active: active$h,
|
34151 | description: description$j,
|
34152 | fn: fn$h
|
34153 | };
|
34154 |
|
34155 | var type$i = 'perItem';
|
34156 |
|
34157 | var active$i = true;
|
34158 |
|
34159 | var description$k = 'moves some group attributes to the content elements';
|
34160 |
|
34161 | var pathElems$3 = _collections.pathElems.concat(['g', 'text']),
|
34162 | referencesProps$2 = _collections.referencesProps;
|
34163 |
|
34164 |
|
34165 |
|
34166 |
|
34167 |
|
34168 |
|
34169 |
|
34170 |
|
34171 |
|
34172 |
|
34173 |
|
34174 |
|
34175 |
|
34176 |
|
34177 |
|
34178 |
|
34179 |
|
34180 |
|
34181 |
|
34182 |
|
34183 | var fn$i = function(item) {
|
34184 |
|
34185 |
|
34186 | if (
|
34187 | item.isElem('g') &&
|
34188 | item.hasAttr('transform') &&
|
34189 | !item.isEmpty() &&
|
34190 | !item.someAttr(function(attr) {
|
34191 | return ~referencesProps$2.indexOf(attr.name) && ~attr.value.indexOf('url(');
|
34192 | }) &&
|
34193 | item.content.every(function(inner) {
|
34194 | return inner.isElem(pathElems$3) && !inner.hasAttr('id');
|
34195 | })
|
34196 | ) {
|
34197 | item.content.forEach(function(inner) {
|
34198 | var attr = item.attr('transform');
|
34199 | if (inner.hasAttr('transform')) {
|
34200 | inner.attr('transform').value = attr.value + ' ' + inner.attr('transform').value;
|
34201 | } else {
|
34202 | inner.addAttr({
|
34203 | 'name': attr.name,
|
34204 | 'local': attr.local,
|
34205 | 'prefix': attr.prefix,
|
34206 | 'value': attr.value
|
34207 | });
|
34208 | }
|
34209 | });
|
34210 |
|
34211 | item.removeAttr('transform');
|
34212 | }
|
34213 |
|
34214 | };
|
34215 |
|
34216 | var moveGroupAttrsToElems = {
|
34217 | type: type$i,
|
34218 | active: active$i,
|
34219 | description: description$k,
|
34220 | fn: fn$i
|
34221 | };
|
34222 |
|
34223 | var type$j = 'perItem';
|
34224 |
|
34225 | var active$j = false;
|
34226 |
|
34227 | var params$c = {
|
34228 | delim: '__',
|
34229 | prefixIds: true,
|
34230 | prefixClassNames: true,
|
34231 | };
|
34232 |
|
34233 | var description$l = 'prefix IDs';
|
34234 |
|
34235 | var referencesProps$3 = _collections.referencesProps,
|
34236 | rxId = /^#(.*)$/,
|
34237 | addPrefix = null;
|
34238 |
|
34239 | const unquote = (string) => {
|
34240 | const first = string.charAt(0);
|
34241 | if (first === "'" || first === '"') {
|
34242 | if (first === string.charAt(string.length - 1)) {
|
34243 | return string.slice(1, -1);
|
34244 | }
|
34245 | }
|
34246 | return string;
|
34247 | };
|
34248 |
|
34249 |
|
34250 | var escapeIdentifierName = function(str) {
|
34251 | return str.replace(/[\. ]/g, '_');
|
34252 | };
|
34253 |
|
34254 |
|
34255 | var matchId = function(urlVal) {
|
34256 | var idUrlMatches = urlVal.match(rxId);
|
34257 | if (idUrlMatches === null) {
|
34258 | return false;
|
34259 | }
|
34260 | return idUrlMatches[1];
|
34261 | };
|
34262 |
|
34263 |
|
34264 | var matchUrl = function(val) {
|
34265 | var urlMatches = /url\((.*?)\)/gi.exec(val);
|
34266 | if (urlMatches === null) {
|
34267 | return false;
|
34268 | }
|
34269 | return urlMatches[1];
|
34270 | };
|
34271 |
|
34272 |
|
34273 | var attrNotEmpty = function(attr) {
|
34274 | return (attr && attr.value && attr.value.length > 0);
|
34275 | };
|
34276 |
|
34277 |
|
34278 | var prefixId = function(val) {
|
34279 | var idName = matchId(val);
|
34280 | if (!idName) {
|
34281 | return false;
|
34282 | }
|
34283 | return '#' + addPrefix(idName);
|
34284 | };
|
34285 |
|
34286 |
|
34287 |
|
34288 |
|
34289 |
|
34290 | var addPrefixToClassAttr = function(attr) {
|
34291 | if (!attrNotEmpty(attr)) {
|
34292 | return;
|
34293 | }
|
34294 |
|
34295 | attr.value = attr.value.split(/\s+/).map(addPrefix).join(' ');
|
34296 | };
|
34297 |
|
34298 |
|
34299 | var addPrefixToIdAttr = function(attr) {
|
34300 | if (!attrNotEmpty(attr)) {
|
34301 | return;
|
34302 | }
|
34303 |
|
34304 | attr.value = addPrefix(attr.value);
|
34305 | };
|
34306 |
|
34307 |
|
34308 | var addPrefixToHrefAttr = function(attr) {
|
34309 | if (!attrNotEmpty(attr)) {
|
34310 | return;
|
34311 | }
|
34312 |
|
34313 | var idPrefixed = prefixId(attr.value);
|
34314 | if (!idPrefixed) {
|
34315 | return;
|
34316 | }
|
34317 | attr.value = idPrefixed;
|
34318 | };
|
34319 |
|
34320 |
|
34321 | var addPrefixToUrlAttr = function(attr) {
|
34322 | if (!attrNotEmpty(attr)) {
|
34323 | return;
|
34324 | }
|
34325 |
|
34326 |
|
34327 | var urlVal = matchUrl(attr.value);
|
34328 | if (!urlVal) {
|
34329 | return;
|
34330 | }
|
34331 |
|
34332 | var idPrefixed = prefixId(urlVal);
|
34333 | if (!idPrefixed) {
|
34334 | return;
|
34335 | }
|
34336 |
|
34337 | attr.value = 'url(' + idPrefixed + ')';
|
34338 | };
|
34339 |
|
34340 |
|
34341 | var addPrefixToBeginEndAttr = function(attr) {
|
34342 | if (!attrNotEmpty(attr)) {
|
34343 | return;
|
34344 | }
|
34345 |
|
34346 | var parts = attr.value.split('; ').map(function(val) {
|
34347 | val = val.trim();
|
34348 |
|
34349 | if (val.endsWith('.end') || val.endsWith('.start')) {
|
34350 | var idPostfix = val.split('.'),
|
34351 | id = idPostfix[0],
|
34352 | postfix = idPostfix[1];
|
34353 |
|
34354 | var idPrefixed = prefixId(`#${id}`);
|
34355 |
|
34356 | if (!idPrefixed) {
|
34357 | return val;
|
34358 | }
|
34359 |
|
34360 | idPrefixed = idPrefixed.slice(1);
|
34361 | return `${idPrefixed}.${postfix}`;
|
34362 | } else {
|
34363 | return val;
|
34364 | }
|
34365 | });
|
34366 |
|
34367 | attr.value = parts.join('; ');
|
34368 | };
|
34369 |
|
34370 | const getBasename = (path) => {
|
34371 |
|
34372 | const matched = path.match(/[\/\\]([^\/\\]+)$/);
|
34373 | if (matched) {
|
34374 | return matched[1];
|
34375 | }
|
34376 | return '';
|
34377 | };
|
34378 |
|
34379 |
|
34380 |
|
34381 |
|
34382 |
|
34383 |
|
34384 |
|
34385 |
|
34386 |
|
34387 |
|
34388 | var fn$j = function(node, opts, extra) {
|
34389 |
|
34390 |
|
34391 | if(extra.multipassCount && extra.multipassCount > 0) {
|
34392 | return node;
|
34393 | }
|
34394 |
|
34395 |
|
34396 | var prefix = 'prefix';
|
34397 | if (opts.prefix) {
|
34398 | if (typeof opts.prefix === 'function') {
|
34399 | prefix = opts.prefix(node, extra);
|
34400 | } else {
|
34401 | prefix = opts.prefix;
|
34402 | }
|
34403 | } else if (opts.prefix === false) {
|
34404 | prefix = false;
|
34405 | } else if (extra && extra.path && extra.path.length > 0) {
|
34406 | var filename = getBasename(extra.path);
|
34407 | prefix = filename;
|
34408 | }
|
34409 |
|
34410 |
|
34411 |
|
34412 | addPrefix = function(name) {
|
34413 | if(prefix === false){
|
34414 | return escapeIdentifierName(name);
|
34415 | }
|
34416 | return escapeIdentifierName(prefix + opts.delim + name);
|
34417 | };
|
34418 |
|
34419 |
|
34420 |
|
34421 |
|
34422 | if (node.elem === 'style') {
|
34423 | if (node.isEmpty()) {
|
34424 |
|
34425 | return node;
|
34426 | }
|
34427 |
|
34428 | var cssStr = node.content[0].text || node.content[0].cdata || [];
|
34429 |
|
34430 | var cssAst = {};
|
34431 | try {
|
34432 | cssAst = lib.parse(cssStr, {
|
34433 | parseValue: true,
|
34434 | parseCustomProperty: false
|
34435 | });
|
34436 | } catch (parseError) {
|
34437 | console.warn('Warning: Parse error of styles of <style/> element, skipped. Error details: ' + parseError);
|
34438 | return node;
|
34439 | }
|
34440 |
|
34441 | var idPrefixed = '';
|
34442 | lib.walk(cssAst, function(node) {
|
34443 |
|
34444 |
|
34445 | if (((opts.prefixIds && node.type === 'IdSelector') ||
|
34446 | (opts.prefixClassNames && node.type === 'ClassSelector')) &&
|
34447 | node.name) {
|
34448 | node.name = addPrefix(node.name);
|
34449 | return;
|
34450 | }
|
34451 |
|
34452 |
|
34453 | if (node.type === 'Url' &&
|
34454 | node.value.value && node.value.value.length > 0) {
|
34455 | idPrefixed = prefixId(unquote(node.value.value));
|
34456 | if (!idPrefixed) {
|
34457 | return;
|
34458 | }
|
34459 | node.value.value = idPrefixed;
|
34460 | }
|
34461 |
|
34462 | });
|
34463 |
|
34464 |
|
34465 | node.content[0].text = lib.generate(cssAst);
|
34466 | return node;
|
34467 | }
|
34468 |
|
34469 |
|
34470 |
|
34471 |
|
34472 | if (!node.attrs) {
|
34473 | return node;
|
34474 | }
|
34475 |
|
34476 |
|
34477 |
|
34478 |
|
34479 | if(opts.prefixIds) {
|
34480 |
|
34481 | addPrefixToIdAttr(node.attrs.id);
|
34482 | }
|
34483 |
|
34484 | if(opts.prefixClassNames) {
|
34485 |
|
34486 | addPrefixToClassAttr(node.attrs.class);
|
34487 | }
|
34488 |
|
34489 |
|
34490 |
|
34491 |
|
34492 |
|
34493 | addPrefixToHrefAttr(node.attrs.href);
|
34494 |
|
34495 |
|
34496 | addPrefixToHrefAttr(node.attrs['xlink:href']);
|
34497 |
|
34498 |
|
34499 | for (var referencesProp of referencesProps$3) {
|
34500 | addPrefixToUrlAttr(node.attrs[referencesProp]);
|
34501 | }
|
34502 |
|
34503 | addPrefixToBeginEndAttr(node.attrs.begin);
|
34504 | addPrefixToBeginEndAttr(node.attrs.end);
|
34505 |
|
34506 | return node;
|
34507 | };
|
34508 |
|
34509 | var prefixIds = {
|
34510 | type: type$j,
|
34511 | active: active$j,
|
34512 | params: params$c,
|
34513 | description: description$l,
|
34514 | fn: fn$j
|
34515 | };
|
34516 |
|
34517 | var type$k = 'perItem';
|
34518 |
|
34519 | var active$k = false;
|
34520 |
|
34521 | var description$m = 'removes attributes of elements that match a css selector';
|
34522 |
|
34523 |
|
34524 |
|
34525 |
|
34526 |
|
34527 |
|
34528 |
|
34529 |
|
34530 |
|
34531 |
|
34532 |
|
34533 |
|
34534 |
|
34535 |
|
34536 |
|
34537 |
|
34538 |
|
34539 |
|
34540 |
|
34541 |
|
34542 |
|
34543 |
|
34544 |
|
34545 |
|
34546 |
|
34547 |
|
34548 |
|
34549 |
|
34550 |
|
34551 |
|
34552 |
|
34553 |
|
34554 |
|
34555 |
|
34556 |
|
34557 |
|
34558 |
|
34559 |
|
34560 |
|
34561 |
|
34562 |
|
34563 |
|
34564 |
|
34565 |
|
34566 |
|
34567 |
|
34568 |
|
34569 |
|
34570 |
|
34571 |
|
34572 |
|
34573 |
|
34574 | var fn$k = function(item, params) {
|
34575 |
|
34576 | var selectors = Array.isArray(params.selectors) ? params.selectors : [params];
|
34577 |
|
34578 | selectors.map(function(i) {
|
34579 | if (item.matches(i.selector)) {
|
34580 | item.removeAttr(i.attributes);
|
34581 | }
|
34582 | });
|
34583 |
|
34584 | };
|
34585 |
|
34586 | var removeAttributesBySelector = {
|
34587 | type: type$k,
|
34588 | active: active$k,
|
34589 | description: description$m,
|
34590 | fn: fn$k
|
34591 | };
|
34592 |
|
34593 | var DEFAULT_SEPARATOR = ':';
|
34594 |
|
34595 | var type$l = 'perItem';
|
34596 |
|
34597 | var active$l = false;
|
34598 |
|
34599 | var description$n = 'removes specified attributes';
|
34600 |
|
34601 | var params$d = {
|
34602 | elemSeparator: DEFAULT_SEPARATOR,
|
34603 | preserveCurrentColor: false,
|
34604 | attrs: []
|
34605 | };
|
34606 |
|
34607 |
|
34608 |
|
34609 |
|
34610 |
|
34611 |
|
34612 |
|
34613 |
|
34614 |
|
34615 |
|
34616 |
|
34617 |
|
34618 |
|
34619 |
|
34620 |
|
34621 |
|
34622 |
|
34623 |
|
34624 |
|
34625 |
|
34626 |
|
34627 |
|
34628 |
|
34629 |
|
34630 |
|
34631 |
|
34632 |
|
34633 |
|
34634 |
|
34635 |
|
34636 |
|
34637 |
|
34638 |
|
34639 |
|
34640 |
|
34641 |
|
34642 |
|
34643 |
|
34644 |
|
34645 |
|
34646 |
|
34647 |
|
34648 |
|
34649 |
|
34650 |
|
34651 |
|
34652 |
|
34653 |
|
34654 |
|
34655 |
|
34656 |
|
34657 |
|
34658 |
|
34659 |
|
34660 |
|
34661 |
|
34662 |
|
34663 |
|
34664 |
|
34665 |
|
34666 |
|
34667 |
|
34668 |
|
34669 |
|
34670 |
|
34671 |
|
34672 |
|
34673 |
|
34674 | var fn$l = function(item, params) {
|
34675 |
|
34676 | if (!Array.isArray(params.attrs)) {
|
34677 | params.attrs = [params.attrs];
|
34678 | }
|
34679 |
|
34680 | if (item.isElem()) {
|
34681 | var elemSeparator = typeof params.elemSeparator == 'string' ? params.elemSeparator : DEFAULT_SEPARATOR;
|
34682 | var preserveCurrentColor = typeof params.preserveCurrentColor == 'boolean' ? params.preserveCurrentColor : false;
|
34683 |
|
34684 |
|
34685 | var patterns = params.attrs.map(function(pattern) {
|
34686 |
|
34687 |
|
34688 | if (pattern.indexOf(elemSeparator) === -1) {
|
34689 | pattern = ['.*', elemSeparator, pattern, elemSeparator, '.*'].join('');
|
34690 |
|
34691 |
|
34692 | } else if (pattern.split(elemSeparator).length < 3) {
|
34693 | pattern = [pattern, elemSeparator, '.*'].join('');
|
34694 | }
|
34695 |
|
34696 |
|
34697 | return pattern.split(elemSeparator)
|
34698 | .map(function(value) {
|
34699 |
|
34700 |
|
34701 | if (value === '*') { value = '.*'; }
|
34702 |
|
34703 | return new RegExp(['^', value, '$'].join(''), 'i');
|
34704 | });
|
34705 |
|
34706 | });
|
34707 |
|
34708 |
|
34709 | patterns.forEach(function(pattern) {
|
34710 |
|
34711 |
|
34712 | if (pattern[0].test(item.elem)) {
|
34713 |
|
34714 |
|
34715 | item.eachAttr(function(attr) {
|
34716 | var name = attr.name;
|
34717 | var value = attr.value;
|
34718 | var isFillCurrentColor = preserveCurrentColor && name == 'fill' && value == 'currentColor';
|
34719 | var isStrokeCurrentColor = preserveCurrentColor && name == 'stroke' && value == 'currentColor';
|
34720 |
|
34721 | if (!(isFillCurrentColor || isStrokeCurrentColor)) {
|
34722 |
|
34723 | if (pattern[1].test(name)) {
|
34724 |
|
34725 |
|
34726 | if (pattern[2].test(attr.value)) {
|
34727 | item.removeAttr(name);
|
34728 | }
|
34729 | }
|
34730 | }
|
34731 |
|
34732 | });
|
34733 |
|
34734 | }
|
34735 |
|
34736 | });
|
34737 |
|
34738 | }
|
34739 |
|
34740 | };
|
34741 |
|
34742 | var removeAttrs = {
|
34743 | type: type$l,
|
34744 | active: active$l,
|
34745 | description: description$n,
|
34746 | params: params$d,
|
34747 | fn: fn$l
|
34748 | };
|
34749 |
|
34750 | var type$m = 'perItem';
|
34751 |
|
34752 | var active$m = true;
|
34753 |
|
34754 | var description$o = 'removes comments';
|
34755 |
|
34756 |
|
34757 |
|
34758 |
|
34759 |
|
34760 |
|
34761 |
|
34762 |
|
34763 |
|
34764 |
|
34765 |
|
34766 |
|
34767 |
|
34768 | var fn$m = function(item) {
|
34769 |
|
34770 | if (item.comment && item.comment.charAt(0) !== '!') {
|
34771 | return false;
|
34772 | }
|
34773 |
|
34774 | };
|
34775 |
|
34776 | var removeComments = {
|
34777 | type: type$m,
|
34778 | active: active$m,
|
34779 | description: description$o,
|
34780 | fn: fn$m
|
34781 | };
|
34782 |
|
34783 | var type$n = 'perItem';
|
34784 |
|
34785 | var active$n = true;
|
34786 |
|
34787 | var params$e = {
|
34788 | removeAny: true
|
34789 | };
|
34790 |
|
34791 | var description$p = 'removes <desc>';
|
34792 |
|
34793 | var standardDescs = /^(Created with|Created using)/;
|
34794 |
|
34795 |
|
34796 |
|
34797 |
|
34798 |
|
34799 |
|
34800 |
|
34801 |
|
34802 |
|
34803 |
|
34804 |
|
34805 |
|
34806 |
|
34807 | var fn$n = function(item, params) {
|
34808 |
|
34809 | return !item.isElem('desc') || !(params.removeAny || item.isEmpty() ||
|
34810 | standardDescs.test(item.content[0].text));
|
34811 |
|
34812 | };
|
34813 |
|
34814 | var removeDesc = {
|
34815 | type: type$n,
|
34816 | active: active$n,
|
34817 | params: params$e,
|
34818 | description: description$p,
|
34819 | fn: fn$n
|
34820 | };
|
34821 |
|
34822 | var type$o = 'perItem';
|
34823 |
|
34824 | var active$o = false;
|
34825 |
|
34826 | var description$q = 'removes width and height in presence of viewBox (opposite to removeViewBox, disable it first)';
|
34827 |
|
34828 |
|
34829 |
|
34830 |
|
34831 |
|
34832 |
|
34833 |
|
34834 |
|
34835 |
|
34836 |
|
34837 |
|
34838 |
|
34839 |
|
34840 |
|
34841 | var fn$o = function(item) {
|
34842 |
|
34843 | if (item.isElem('svg')) {
|
34844 | if (item.hasAttr('viewBox')) {
|
34845 | item.removeAttr('width');
|
34846 | item.removeAttr('height');
|
34847 | } else if (
|
34848 | item.hasAttr('width') &&
|
34849 | item.hasAttr('height') &&
|
34850 | !isNaN(Number(item.attr('width').value)) &&
|
34851 | !isNaN(Number(item.attr('height').value))
|
34852 | ) {
|
34853 | item.addAttr({
|
34854 | name: 'viewBox',
|
34855 | value:
|
34856 | '0 0 ' +
|
34857 | Number(item.attr('width').value) +
|
34858 | ' ' +
|
34859 | Number(item.attr('height').value),
|
34860 | prefix: '',
|
34861 | local: 'viewBox'
|
34862 | });
|
34863 | item.removeAttr('width');
|
34864 | item.removeAttr('height');
|
34865 | }
|
34866 | }
|
34867 |
|
34868 | };
|
34869 |
|
34870 | var removeDimensions = {
|
34871 | type: type$o,
|
34872 | active: active$o,
|
34873 | description: description$q,
|
34874 | fn: fn$o
|
34875 | };
|
34876 |
|
34877 | var type$p = 'perItem';
|
34878 |
|
34879 | var active$p = true;
|
34880 |
|
34881 | var description$r = 'removes doctype declaration';
|
34882 |
|
34883 |
|
34884 |
|
34885 |
|
34886 |
|
34887 |
|
34888 |
|
34889 |
|
34890 |
|
34891 |
|
34892 |
|
34893 |
|
34894 |
|
34895 |
|
34896 |
|
34897 |
|
34898 |
|
34899 |
|
34900 |
|
34901 |
|
34902 |
|
34903 |
|
34904 |
|
34905 |
|
34906 |
|
34907 |
|
34908 | var fn$p = function(item) {
|
34909 |
|
34910 | if (item.doctype) {
|
34911 | return false;
|
34912 | }
|
34913 |
|
34914 | };
|
34915 |
|
34916 | var removeDoctype = {
|
34917 | type: type$p,
|
34918 | active: active$p,
|
34919 | description: description$r,
|
34920 | fn: fn$p
|
34921 | };
|
34922 |
|
34923 | var type$q = 'perItem';
|
34924 |
|
34925 | var active$q = true;
|
34926 |
|
34927 | var description$s = 'removes editors namespaces, elements and attributes';
|
34928 |
|
34929 | var editorNamespaces$1 = _collections.editorNamespaces,
|
34930 | prefixes = [];
|
34931 |
|
34932 | var params$f = {
|
34933 | additionalNamespaces: []
|
34934 | };
|
34935 |
|
34936 |
|
34937 |
|
34938 |
|
34939 |
|
34940 |
|
34941 |
|
34942 |
|
34943 |
|
34944 |
|
34945 |
|
34946 |
|
34947 |
|
34948 |
|
34949 |
|
34950 | var fn$q = function(item, params) {
|
34951 |
|
34952 | if (Array.isArray(params.additionalNamespaces)) {
|
34953 | editorNamespaces$1 = editorNamespaces$1.concat(params.additionalNamespaces);
|
34954 | }
|
34955 |
|
34956 | if (item.elem) {
|
34957 |
|
34958 | if (item.isElem('svg')) {
|
34959 |
|
34960 | item.eachAttr(function(attr) {
|
34961 | if (attr.prefix === 'xmlns' && editorNamespaces$1.indexOf(attr.value) > -1) {
|
34962 | prefixes.push(attr.local);
|
34963 |
|
34964 |
|
34965 | item.removeAttr(attr.name);
|
34966 | }
|
34967 | });
|
34968 |
|
34969 | }
|
34970 |
|
34971 |
|
34972 | item.eachAttr(function(attr) {
|
34973 | if (prefixes.indexOf(attr.prefix) > -1) {
|
34974 | item.removeAttr(attr.name);
|
34975 | }
|
34976 | });
|
34977 |
|
34978 |
|
34979 | if (prefixes.indexOf(item.prefix) > -1) {
|
34980 | return false;
|
34981 | }
|
34982 |
|
34983 | }
|
34984 |
|
34985 | };
|
34986 |
|
34987 | var removeEditorsNSData = {
|
34988 | type: type$q,
|
34989 | active: active$q,
|
34990 | description: description$s,
|
34991 | params: params$f,
|
34992 | fn: fn$q
|
34993 | };
|
34994 |
|
34995 | var type$r = 'perItem';
|
34996 |
|
34997 | var active$r = false;
|
34998 |
|
34999 | var description$t = 'removes arbitrary elements by ID or className (disabled by default)';
|
35000 |
|
35001 | var params$g = {
|
35002 | id: [],
|
35003 | class: []
|
35004 | };
|
35005 |
|
35006 |
|
35007 |
|
35008 |
|
35009 |
|
35010 |
|
35011 |
|
35012 |
|
35013 |
|
35014 |
|
35015 |
|
35016 |
|
35017 |
|
35018 |
|
35019 |
|
35020 |
|
35021 |
|
35022 |
|
35023 |
|
35024 |
|
35025 |
|
35026 |
|
35027 |
|
35028 |
|
35029 |
|
35030 |
|
35031 |
|
35032 |
|
35033 |
|
35034 |
|
35035 |
|
35036 |
|
35037 |
|
35038 |
|
35039 |
|
35040 |
|
35041 |
|
35042 |
|
35043 |
|
35044 |
|
35045 | var fn$r = function(item, params) {
|
35046 | var elemId, elemClass;
|
35047 |
|
35048 |
|
35049 | ['id', 'class'].forEach(function(key) {
|
35050 | if (!Array.isArray(params[key])) {
|
35051 | params[key] = [ params[key] ];
|
35052 | }
|
35053 | });
|
35054 |
|
35055 |
|
35056 | if (!item.isElem()) {
|
35057 | return;
|
35058 | }
|
35059 |
|
35060 |
|
35061 | elemId = item.attr('id');
|
35062 | if (elemId) {
|
35063 | return params.id.indexOf(elemId.value) === -1;
|
35064 | }
|
35065 |
|
35066 |
|
35067 | elemClass = item.attr('class');
|
35068 | if (elemClass) {
|
35069 | var hasClassRegex = new RegExp(params.class.join('|'));
|
35070 | return !hasClassRegex.test(elemClass.value);
|
35071 | }
|
35072 | };
|
35073 |
|
35074 | var removeElementsByAttr = {
|
35075 | type: type$r,
|
35076 | active: active$r,
|
35077 | description: description$t,
|
35078 | params: params$g,
|
35079 | fn: fn$r
|
35080 | };
|
35081 |
|
35082 | var type$s = 'perItem';
|
35083 |
|
35084 | var active$s = true;
|
35085 |
|
35086 | var description$u = 'removes empty attributes';
|
35087 |
|
35088 |
|
35089 |
|
35090 |
|
35091 |
|
35092 |
|
35093 |
|
35094 |
|
35095 |
|
35096 | var fn$s = function(item) {
|
35097 |
|
35098 | if (item.elem) {
|
35099 |
|
35100 | item.eachAttr(function(attr) {
|
35101 | if (attr.value === '') {
|
35102 | item.removeAttr(attr.name);
|
35103 | }
|
35104 | });
|
35105 |
|
35106 | }
|
35107 |
|
35108 | };
|
35109 |
|
35110 | var removeEmptyAttrs = {
|
35111 | type: type$s,
|
35112 | active: active$s,
|
35113 | description: description$u,
|
35114 | fn: fn$s
|
35115 | };
|
35116 |
|
35117 | var type$t = 'perItemReverse';
|
35118 |
|
35119 | var active$t = true;
|
35120 |
|
35121 | var description$v = 'removes empty container elements';
|
35122 |
|
35123 | var container = _collections.elemsGroups.container;
|
35124 |
|
35125 |
|
35126 |
|
35127 |
|
35128 |
|
35129 |
|
35130 |
|
35131 |
|
35132 |
|
35133 |
|
35134 |
|
35135 |
|
35136 |
|
35137 |
|
35138 |
|
35139 |
|
35140 |
|
35141 | var fn$t = function(item) {
|
35142 |
|
35143 | return !(item.isElem(container) && !item.isElem('svg') && item.isEmpty() &&
|
35144 | (!item.isElem('pattern') || !item.hasAttrLocal('href')));
|
35145 |
|
35146 | };
|
35147 |
|
35148 | var removeEmptyContainers = {
|
35149 | type: type$t,
|
35150 | active: active$t,
|
35151 | description: description$v,
|
35152 | fn: fn$t
|
35153 | };
|
35154 |
|
35155 | var type$u = 'perItem';
|
35156 |
|
35157 | var active$u = true;
|
35158 |
|
35159 | var description$w = 'removes empty <text> elements';
|
35160 |
|
35161 | var params$h = {
|
35162 | text: true,
|
35163 | tspan: true,
|
35164 | tref: true
|
35165 | };
|
35166 |
|
35167 |
|
35168 |
|
35169 |
|
35170 |
|
35171 |
|
35172 |
|
35173 |
|
35174 |
|
35175 |
|
35176 |
|
35177 |
|
35178 |
|
35179 |
|
35180 |
|
35181 |
|
35182 |
|
35183 |
|
35184 |
|
35185 |
|
35186 |
|
35187 |
|
35188 | var fn$u = function(item, params) {
|
35189 |
|
35190 |
|
35191 | if (
|
35192 | params.text &&
|
35193 | item.isElem('text') &&
|
35194 | item.isEmpty()
|
35195 | ) return false;
|
35196 |
|
35197 |
|
35198 | if (
|
35199 | params.tspan &&
|
35200 | item.isElem('tspan') &&
|
35201 | item.isEmpty()
|
35202 | ) return false;
|
35203 |
|
35204 |
|
35205 | if (
|
35206 | params.tref &&
|
35207 | item.isElem('tref') &&
|
35208 | !item.hasAttrLocal('href')
|
35209 | ) return false;
|
35210 |
|
35211 | };
|
35212 |
|
35213 | var removeEmptyText = {
|
35214 | type: type$u,
|
35215 | active: active$u,
|
35216 | description: description$w,
|
35217 | params: params$h,
|
35218 | fn: fn$u
|
35219 | };
|
35220 |
|
35221 | var type$v = 'perItem';
|
35222 |
|
35223 | var active$v = true;
|
35224 |
|
35225 | var description$x = 'removes hidden elements (zero sized, with absent attributes)';
|
35226 |
|
35227 | var params$i = {
|
35228 | isHidden: true,
|
35229 | displayNone: true,
|
35230 | opacity0: true,
|
35231 | circleR0: true,
|
35232 | ellipseRX0: true,
|
35233 | ellipseRY0: true,
|
35234 | rectWidth0: true,
|
35235 | rectHeight0: true,
|
35236 | patternWidth0: true,
|
35237 | patternHeight0: true,
|
35238 | imageWidth0: true,
|
35239 | imageHeight0: true,
|
35240 | pathEmptyD: true,
|
35241 | polylineEmptyPoints: true,
|
35242 | polygonEmptyPoints: true
|
35243 | };
|
35244 |
|
35245 | var regValidPath = /M\s*(?:[-+]?(?:\d*\.\d+|\d+(?:\.|(?!\.)))([eE][-+]?\d+)?(?!\d)\s*,?\s*){2}\D*\d/i;
|
35246 |
|
35247 |
|
35248 |
|
35249 |
|
35250 |
|
35251 |
|
35252 |
|
35253 |
|
35254 |
|
35255 |
|
35256 |
|
35257 |
|
35258 |
|
35259 |
|
35260 |
|
35261 |
|
35262 |
|
35263 |
|
35264 |
|
35265 |
|
35266 | var fn$v = function (item, params) {
|
35267 |
|
35268 | if (item.elem) {
|
35269 |
|
35270 |
|
35271 | if (
|
35272 | params.isHidden &&
|
35273 | item.hasAttr('visibility', 'hidden')
|
35274 | ) return false;
|
35275 |
|
35276 |
|
35277 |
|
35278 |
|
35279 |
|
35280 |
|
35281 | if (
|
35282 | params.displayNone &&
|
35283 | item.hasAttr('display', 'none')
|
35284 | ) return false;
|
35285 |
|
35286 |
|
35287 |
|
35288 |
|
35289 | if (
|
35290 | params.opacity0 &&
|
35291 | item.hasAttr('opacity', '0')
|
35292 | ) return false;
|
35293 |
|
35294 |
|
35295 |
|
35296 |
|
35297 |
|
35298 |
|
35299 |
|
35300 | if (
|
35301 | params.circleR0 &&
|
35302 | item.isElem('circle') &&
|
35303 | item.isEmpty() &&
|
35304 | item.hasAttr('r', '0')
|
35305 | ) return false;
|
35306 |
|
35307 |
|
35308 |
|
35309 |
|
35310 |
|
35311 |
|
35312 |
|
35313 | if (
|
35314 | params.ellipseRX0 &&
|
35315 | item.isElem('ellipse') &&
|
35316 | item.isEmpty() &&
|
35317 | item.hasAttr('rx', '0')
|
35318 | ) return false;
|
35319 |
|
35320 |
|
35321 |
|
35322 |
|
35323 |
|
35324 |
|
35325 |
|
35326 | if (
|
35327 | params.ellipseRY0 &&
|
35328 | item.isElem('ellipse') &&
|
35329 | item.isEmpty() &&
|
35330 | item.hasAttr('ry', '0')
|
35331 | ) return false;
|
35332 |
|
35333 |
|
35334 |
|
35335 |
|
35336 |
|
35337 |
|
35338 |
|
35339 | if (
|
35340 | params.rectWidth0 &&
|
35341 | item.isElem('rect') &&
|
35342 | item.isEmpty() &&
|
35343 | item.hasAttr('width', '0')
|
35344 | ) return false;
|
35345 |
|
35346 |
|
35347 |
|
35348 |
|
35349 |
|
35350 |
|
35351 |
|
35352 | if (
|
35353 | params.rectHeight0 &&
|
35354 | params.rectWidth0 &&
|
35355 | item.isElem('rect') &&
|
35356 | item.isEmpty() &&
|
35357 | item.hasAttr('height', '0')
|
35358 | ) return false;
|
35359 |
|
35360 |
|
35361 |
|
35362 |
|
35363 |
|
35364 |
|
35365 |
|
35366 | if (
|
35367 | params.patternWidth0 &&
|
35368 | item.isElem('pattern') &&
|
35369 | item.hasAttr('width', '0')
|
35370 | ) return false;
|
35371 |
|
35372 |
|
35373 |
|
35374 |
|
35375 |
|
35376 |
|
35377 |
|
35378 | if (
|
35379 | params.patternHeight0 &&
|
35380 | item.isElem('pattern') &&
|
35381 | item.hasAttr('height', '0')
|
35382 | ) return false;
|
35383 |
|
35384 |
|
35385 |
|
35386 |
|
35387 |
|
35388 |
|
35389 |
|
35390 | if (
|
35391 | params.imageWidth0 &&
|
35392 | item.isElem('image') &&
|
35393 | item.hasAttr('width', '0')
|
35394 | ) return false;
|
35395 |
|
35396 |
|
35397 |
|
35398 |
|
35399 |
|
35400 |
|
35401 |
|
35402 | if (
|
35403 | params.imageHeight0 &&
|
35404 | item.isElem('image') &&
|
35405 | item.hasAttr('height', '0')
|
35406 | ) return false;
|
35407 |
|
35408 |
|
35409 |
|
35410 |
|
35411 |
|
35412 |
|
35413 | if (
|
35414 | params.pathEmptyD &&
|
35415 | item.isElem('path') &&
|
35416 | (!item.hasAttr('d') || !regValidPath.test(item.attr('d').value))
|
35417 | ) return false;
|
35418 |
|
35419 |
|
35420 |
|
35421 |
|
35422 |
|
35423 |
|
35424 | if (
|
35425 | params.polylineEmptyPoints &&
|
35426 | item.isElem('polyline') &&
|
35427 | !item.hasAttr('points')
|
35428 | ) return false;
|
35429 |
|
35430 |
|
35431 |
|
35432 |
|
35433 |
|
35434 |
|
35435 | if (
|
35436 | params.polygonEmptyPoints &&
|
35437 | item.isElem('polygon') &&
|
35438 | !item.hasAttr('points')
|
35439 | ) return false;
|
35440 |
|
35441 | }
|
35442 |
|
35443 | };
|
35444 |
|
35445 | var removeHiddenElems = {
|
35446 | type: type$v,
|
35447 | active: active$v,
|
35448 | description: description$x,
|
35449 | params: params$i,
|
35450 | fn: fn$v
|
35451 | };
|
35452 |
|
35453 | var type$w = 'perItem';
|
35454 |
|
35455 | var active$w = true;
|
35456 |
|
35457 | var description$y = 'removes <metadata>';
|
35458 |
|
35459 |
|
35460 |
|
35461 |
|
35462 |
|
35463 |
|
35464 |
|
35465 |
|
35466 |
|
35467 |
|
35468 |
|
35469 | var fn$w = function(item) {
|
35470 |
|
35471 | return !item.isElem('metadata');
|
35472 |
|
35473 | };
|
35474 |
|
35475 | var removeMetadata = {
|
35476 | type: type$w,
|
35477 | active: active$w,
|
35478 | description: description$y,
|
35479 | fn: fn$w
|
35480 | };
|
35481 |
|
35482 | var type$x = 'perItem';
|
35483 |
|
35484 | var active$x = true;
|
35485 |
|
35486 | var description$z = 'removes non-inheritable group’s presentational attributes';
|
35487 |
|
35488 | var inheritableAttrs$2 = _collections.inheritableAttrs,
|
35489 | attrsGroups$1 = _collections.attrsGroups,
|
35490 | applyGroups = _collections.presentationNonInheritableGroupAttrs;
|
35491 |
|
35492 |
|
35493 |
|
35494 |
|
35495 |
|
35496 |
|
35497 |
|
35498 |
|
35499 |
|
35500 | var fn$x = function(item) {
|
35501 |
|
35502 | if (item.isElem('g')) {
|
35503 |
|
35504 | item.eachAttr(function(attr) {
|
35505 | if (
|
35506 | ~attrsGroups$1.presentation.indexOf(attr.name) &&
|
35507 | !~inheritableAttrs$2.indexOf(attr.name) &&
|
35508 | !~applyGroups.indexOf(attr.name)
|
35509 | ) {
|
35510 | item.removeAttr(attr.name);
|
35511 | }
|
35512 | });
|
35513 |
|
35514 | }
|
35515 |
|
35516 | };
|
35517 |
|
35518 | var removeNonInheritableGroupAttrs = {
|
35519 | type: type$x,
|
35520 | active: active$x,
|
35521 | description: description$z,
|
35522 | fn: fn$x
|
35523 | };
|
35524 |
|
35525 | var lib$2 = createCommonjsModule(function (module, exports) {
|
35526 | Object.defineProperty(exports, "__esModule", { value: true });
|
35527 | exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = void 0;
|
35528 |
|
35529 |
|
35530 |
|
35531 |
|
35532 |
|
35533 | function isTag(elem) {
|
35534 | return (elem.type === "tag" ||
|
35535 | elem.type === "script" ||
|
35536 | elem.type === "style" );
|
35537 | }
|
35538 | exports.isTag = isTag;
|
35539 |
|
35540 |
|
35541 | exports.Root = "root" ;
|
35542 |
|
35543 | exports.Text = "text" ;
|
35544 |
|
35545 | exports.Directive = "directive" ;
|
35546 |
|
35547 | exports.Comment = "comment" ;
|
35548 |
|
35549 | exports.Script = "script" ;
|
35550 |
|
35551 | exports.Style = "style" ;
|
35552 |
|
35553 | exports.Tag = "tag" ;
|
35554 |
|
35555 | exports.CDATA = "cdata" ;
|
35556 |
|
35557 | exports.Doctype = "doctype" ;
|
35558 | });
|
35559 |
|
35560 | var tagtypes = createCommonjsModule(function (module, exports) {
|
35561 | Object.defineProperty(exports, "__esModule", { value: true });
|
35562 | exports.hasChildren = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;
|
35563 |
|
35564 |
|
35565 |
|
35566 |
|
35567 |
|
35568 | function isTag(node) {
|
35569 | return lib$2.isTag(node);
|
35570 | }
|
35571 | exports.isTag = isTag;
|
35572 |
|
35573 |
|
35574 |
|
35575 |
|
35576 | function isCDATA(node) {
|
35577 | return node.type === "cdata" ;
|
35578 | }
|
35579 | exports.isCDATA = isCDATA;
|
35580 |
|
35581 |
|
35582 |
|
35583 |
|
35584 | function isText(node) {
|
35585 | return node.type === "text" ;
|
35586 | }
|
35587 | exports.isText = isText;
|
35588 |
|
35589 |
|
35590 |
|
35591 |
|
35592 | function isComment(node) {
|
35593 | return node.type === "comment" ;
|
35594 | }
|
35595 | exports.isComment = isComment;
|
35596 |
|
35597 |
|
35598 |
|
35599 |
|
35600 | function hasChildren(node) {
|
35601 | return Object.prototype.hasOwnProperty.call(node, "children");
|
35602 | }
|
35603 | exports.hasChildren = hasChildren;
|
35604 | });
|
35605 |
|
35606 | var Aacute = "Á";
|
35607 | var aacute = "á";
|
35608 | var Abreve = "Ă";
|
35609 | var abreve = "ă";
|
35610 | var ac = "∾";
|
35611 | var acd = "∿";
|
35612 | var acE = "∾̳";
|
35613 | var Acirc = "Â";
|
35614 | var acirc = "â";
|
35615 | var acute = "´";
|
35616 | var Acy = "А";
|
35617 | var acy = "а";
|
35618 | var AElig = "Æ";
|
35619 | var aelig = "æ";
|
35620 | var af = "";
|
35621 | var Afr = "𝔄";
|
35622 | var afr = "𝔞";
|
35623 | var Agrave = "À";
|
35624 | var agrave = "à";
|
35625 | var alefsym = "ℵ";
|
35626 | var aleph = "ℵ";
|
35627 | var Alpha = "Α";
|
35628 | var alpha = "α";
|
35629 | var Amacr = "Ā";
|
35630 | var amacr = "ā";
|
35631 | var amalg = "⨿";
|
35632 | var amp = "&";
|
35633 | var AMP = "&";
|
35634 | var andand = "⩕";
|
35635 | var And = "⩓";
|
35636 | var and = "∧";
|
35637 | var andd = "⩜";
|
35638 | var andslope = "⩘";
|
35639 | var andv = "⩚";
|
35640 | var ang = "∠";
|
35641 | var ange = "⦤";
|
35642 | var angle = "∠";
|
35643 | var angmsdaa = "⦨";
|
35644 | var angmsdab = "⦩";
|
35645 | var angmsdac = "⦪";
|
35646 | var angmsdad = "⦫";
|
35647 | var angmsdae = "⦬";
|
35648 | var angmsdaf = "⦭";
|
35649 | var angmsdag = "⦮";
|
35650 | var angmsdah = "⦯";
|
35651 | var angmsd = "∡";
|
35652 | var angrt = "∟";
|
35653 | var angrtvb = "⊾";
|
35654 | var angrtvbd = "⦝";
|
35655 | var angsph = "∢";
|
35656 | var angst = "Å";
|
35657 | var angzarr = "⍼";
|
35658 | var Aogon = "Ą";
|
35659 | var aogon = "ą";
|
35660 | var Aopf = "𝔸";
|
35661 | var aopf = "𝕒";
|
35662 | var apacir = "⩯";
|
35663 | var ap = "≈";
|
35664 | var apE = "⩰";
|
35665 | var ape = "≊";
|
35666 | var apid = "≋";
|
35667 | var apos = "'";
|
35668 | var ApplyFunction = "";
|
35669 | var approx = "≈";
|
35670 | var approxeq = "≊";
|
35671 | var Aring = "Å";
|
35672 | var aring = "å";
|
35673 | var Ascr = "𝒜";
|
35674 | var ascr = "𝒶";
|
35675 | var Assign = "≔";
|
35676 | var ast = "*";
|
35677 | var asymp = "≈";
|
35678 | var asympeq = "≍";
|
35679 | var Atilde = "Ã";
|
35680 | var atilde = "ã";
|
35681 | var Auml = "Ä";
|
35682 | var auml = "ä";
|
35683 | var awconint = "∳";
|
35684 | var awint = "⨑";
|
35685 | var backcong = "≌";
|
35686 | var backepsilon = "϶";
|
35687 | var backprime = "‵";
|
35688 | var backsim = "∽";
|
35689 | var backsimeq = "⋍";
|
35690 | var Backslash = "∖";
|
35691 | var Barv = "⫧";
|
35692 | var barvee = "⊽";
|
35693 | var barwed = "⌅";
|
35694 | var Barwed = "⌆";
|
35695 | var barwedge = "⌅";
|
35696 | var bbrk = "⎵";
|
35697 | var bbrktbrk = "⎶";
|
35698 | var bcong = "≌";
|
35699 | var Bcy = "Б";
|
35700 | var bcy = "б";
|
35701 | var bdquo = "„";
|
35702 | var becaus = "∵";
|
35703 | var because = "∵";
|
35704 | var Because = "∵";
|
35705 | var bemptyv = "⦰";
|
35706 | var bepsi = "϶";
|
35707 | var bernou = "ℬ";
|
35708 | var Bernoullis = "ℬ";
|
35709 | var Beta = "Β";
|
35710 | var beta = "β";
|
35711 | var beth = "ℶ";
|
35712 | var between = "≬";
|
35713 | var Bfr = "𝔅";
|
35714 | var bfr = "𝔟";
|
35715 | var bigcap = "⋂";
|
35716 | var bigcirc = "◯";
|
35717 | var bigcup = "⋃";
|
35718 | var bigodot = "⨀";
|
35719 | var bigoplus = "⨁";
|
35720 | var bigotimes = "⨂";
|
35721 | var bigsqcup = "⨆";
|
35722 | var bigstar = "★";
|
35723 | var bigtriangledown = "▽";
|
35724 | var bigtriangleup = "△";
|
35725 | var biguplus = "⨄";
|
35726 | var bigvee = "⋁";
|
35727 | var bigwedge = "⋀";
|
35728 | var bkarow = "⤍";
|
35729 | var blacklozenge = "⧫";
|
35730 | var blacksquare = "▪";
|
35731 | var blacktriangle = "▴";
|
35732 | var blacktriangledown = "▾";
|
35733 | var blacktriangleleft = "◂";
|
35734 | var blacktriangleright = "▸";
|
35735 | var blank = "␣";
|
35736 | var blk12 = "▒";
|
35737 | var blk14 = "░";
|
35738 | var blk34 = "▓";
|
35739 | var block = "█";
|
35740 | var bne = "=⃥";
|
35741 | var bnequiv = "≡⃥";
|
35742 | var bNot = "⫭";
|
35743 | var bnot = "⌐";
|
35744 | var Bopf = "𝔹";
|
35745 | var bopf = "𝕓";
|
35746 | var bot = "⊥";
|
35747 | var bottom$1 = "⊥";
|
35748 | var bowtie = "⋈";
|
35749 | var boxbox = "⧉";
|
35750 | var boxdl = "┐";
|
35751 | var boxdL = "╕";
|
35752 | var boxDl = "╖";
|
35753 | var boxDL = "╗";
|
35754 | var boxdr = "┌";
|
35755 | var boxdR = "╒";
|
35756 | var boxDr = "╓";
|
35757 | var boxDR = "╔";
|
35758 | var boxh = "─";
|
35759 | var boxH = "═";
|
35760 | var boxhd = "┬";
|
35761 | var boxHd = "╤";
|
35762 | var boxhD = "╥";
|
35763 | var boxHD = "╦";
|
35764 | var boxhu = "┴";
|
35765 | var boxHu = "╧";
|
35766 | var boxhU = "╨";
|
35767 | var boxHU = "╩";
|
35768 | var boxminus = "⊟";
|
35769 | var boxplus = "⊞";
|
35770 | var boxtimes = "⊠";
|
35771 | var boxul = "┘";
|
35772 | var boxuL = "╛";
|
35773 | var boxUl = "╜";
|
35774 | var boxUL = "╝";
|
35775 | var boxur = "└";
|
35776 | var boxuR = "╘";
|
35777 | var boxUr = "╙";
|
35778 | var boxUR = "╚";
|
35779 | var boxv = "│";
|
35780 | var boxV = "║";
|
35781 | var boxvh = "┼";
|
35782 | var boxvH = "╪";
|
35783 | var boxVh = "╫";
|
35784 | var boxVH = "╬";
|
35785 | var boxvl = "┤";
|
35786 | var boxvL = "╡";
|
35787 | var boxVl = "╢";
|
35788 | var boxVL = "╣";
|
35789 | var boxvr = "├";
|
35790 | var boxvR = "╞";
|
35791 | var boxVr = "╟";
|
35792 | var boxVR = "╠";
|
35793 | var bprime = "‵";
|
35794 | var breve = "˘";
|
35795 | var Breve = "˘";
|
35796 | var brvbar = "¦";
|
35797 | var bscr = "𝒷";
|
35798 | var Bscr = "ℬ";
|
35799 | var bsemi = "⁏";
|
35800 | var bsim = "∽";
|
35801 | var bsime = "⋍";
|
35802 | var bsolb = "⧅";
|
35803 | var bsol = "\\";
|
35804 | var bsolhsub = "⟈";
|
35805 | var bull = "•";
|
35806 | var bullet = "•";
|
35807 | var bump = "≎";
|
35808 | var bumpE = "⪮";
|
35809 | var bumpe = "≏";
|
35810 | var Bumpeq = "≎";
|
35811 | var bumpeq = "≏";
|
35812 | var Cacute = "Ć";
|
35813 | var cacute = "ć";
|
35814 | var capand = "⩄";
|
35815 | var capbrcup = "⩉";
|
35816 | var capcap = "⩋";
|
35817 | var cap = "∩";
|
35818 | var Cap = "⋒";
|
35819 | var capcup = "⩇";
|
35820 | var capdot = "⩀";
|
35821 | var CapitalDifferentialD = "ⅅ";
|
35822 | var caps = "∩︀";
|
35823 | var caret = "⁁";
|
35824 | var caron = "ˇ";
|
35825 | var Cayleys = "ℭ";
|
35826 | var ccaps = "⩍";
|
35827 | var Ccaron = "Č";
|
35828 | var ccaron = "č";
|
35829 | var Ccedil = "Ç";
|
35830 | var ccedil = "ç";
|
35831 | var Ccirc = "Ĉ";
|
35832 | var ccirc = "ĉ";
|
35833 | var Cconint = "∰";
|
35834 | var ccups = "⩌";
|
35835 | var ccupssm = "⩐";
|
35836 | var Cdot = "Ċ";
|
35837 | var cdot = "ċ";
|
35838 | var cedil = "¸";
|
35839 | var Cedilla = "¸";
|
35840 | var cemptyv = "⦲";
|
35841 | var cent = "¢";
|
35842 | var centerdot = "·";
|
35843 | var CenterDot = "·";
|
35844 | var cfr = "𝔠";
|
35845 | var Cfr = "ℭ";
|
35846 | var CHcy = "Ч";
|
35847 | var chcy = "ч";
|
35848 | var check = "✓";
|
35849 | var checkmark = "✓";
|
35850 | var Chi = "Χ";
|
35851 | var chi = "χ";
|
35852 | var circ = "ˆ";
|
35853 | var circeq = "≗";
|
35854 | var circlearrowleft = "↺";
|
35855 | var circlearrowright = "↻";
|
35856 | var circledast = "⊛";
|
35857 | var circledcirc = "⊚";
|
35858 | var circleddash = "⊝";
|
35859 | var CircleDot = "⊙";
|
35860 | var circledR = "®";
|
35861 | var circledS = "Ⓢ";
|
35862 | var CircleMinus = "⊖";
|
35863 | var CirclePlus = "⊕";
|
35864 | var CircleTimes = "⊗";
|
35865 | var cir = "○";
|
35866 | var cirE = "⧃";
|
35867 | var cire = "≗";
|
35868 | var cirfnint = "⨐";
|
35869 | var cirmid = "⫯";
|
35870 | var cirscir = "⧂";
|
35871 | var ClockwiseContourIntegral = "∲";
|
35872 | var CloseCurlyDoubleQuote = "”";
|
35873 | var CloseCurlyQuote = "’";
|
35874 | var clubs = "♣";
|
35875 | var clubsuit = "♣";
|
35876 | var colon = ":";
|
35877 | var Colon = "∷";
|
35878 | var Colone = "⩴";
|
35879 | var colone = "≔";
|
35880 | var coloneq = "≔";
|
35881 | var comma = ",";
|
35882 | var commat = "@";
|
35883 | var comp = "∁";
|
35884 | var compfn = "∘";
|
35885 | var complement = "∁";
|
35886 | var complexes = "ℂ";
|
35887 | var cong = "≅";
|
35888 | var congdot = "⩭";
|
35889 | var Congruent = "≡";
|
35890 | var conint = "∮";
|
35891 | var Conint = "∯";
|
35892 | var ContourIntegral = "∮";
|
35893 | var copf = "𝕔";
|
35894 | var Copf = "ℂ";
|
35895 | var coprod = "∐";
|
35896 | var Coproduct = "∐";
|
35897 | var copy$2 = "©";
|
35898 | var COPY = "©";
|
35899 | var copysr = "℗";
|
35900 | var CounterClockwiseContourIntegral = "∳";
|
35901 | var crarr = "↵";
|
35902 | var cross = "✗";
|
35903 | var Cross = "⨯";
|
35904 | var Cscr = "𝒞";
|
35905 | var cscr = "𝒸";
|
35906 | var csub = "⫏";
|
35907 | var csube = "⫑";
|
35908 | var csup = "⫐";
|
35909 | var csupe = "⫒";
|
35910 | var ctdot = "⋯";
|
35911 | var cudarrl = "⤸";
|
35912 | var cudarrr = "⤵";
|
35913 | var cuepr = "⋞";
|
35914 | var cuesc = "⋟";
|
35915 | var cularr = "↶";
|
35916 | var cularrp = "⤽";
|
35917 | var cupbrcap = "⩈";
|
35918 | var cupcap = "⩆";
|
35919 | var CupCap = "≍";
|
35920 | var cup = "∪";
|
35921 | var Cup = "⋓";
|
35922 | var cupcup = "⩊";
|
35923 | var cupdot = "⊍";
|
35924 | var cupor = "⩅";
|
35925 | var cups = "∪︀";
|
35926 | var curarr = "↷";
|
35927 | var curarrm = "⤼";
|
35928 | var curlyeqprec = "⋞";
|
35929 | var curlyeqsucc = "⋟";
|
35930 | var curlyvee = "⋎";
|
35931 | var curlywedge = "⋏";
|
35932 | var curren = "¤";
|
35933 | var curvearrowleft = "↶";
|
35934 | var curvearrowright = "↷";
|
35935 | var cuvee = "⋎";
|
35936 | var cuwed = "⋏";
|
35937 | var cwconint = "∲";
|
35938 | var cwint = "∱";
|
35939 | var cylcty = "⌭";
|
35940 | var dagger = "†";
|
35941 | var Dagger = "‡";
|
35942 | var daleth = "ℸ";
|
35943 | var darr = "↓";
|
35944 | var Darr = "↡";
|
35945 | var dArr = "⇓";
|
35946 | var dash = "‐";
|
35947 | var Dashv = "⫤";
|
35948 | var dashv = "⊣";
|
35949 | var dbkarow = "⤏";
|
35950 | var dblac = "˝";
|
35951 | var Dcaron = "Ď";
|
35952 | var dcaron = "ď";
|
35953 | var Dcy = "Д";
|
35954 | var dcy = "д";
|
35955 | var ddagger = "‡";
|
35956 | var ddarr = "⇊";
|
35957 | var DD = "ⅅ";
|
35958 | var dd = "ⅆ";
|
35959 | var DDotrahd = "⤑";
|
35960 | var ddotseq = "⩷";
|
35961 | var deg = "°";
|
35962 | var Del = "∇";
|
35963 | var Delta = "Δ";
|
35964 | var delta = "δ";
|
35965 | var demptyv = "⦱";
|
35966 | var dfisht = "⥿";
|
35967 | var Dfr = "𝔇";
|
35968 | var dfr = "𝔡";
|
35969 | var dHar = "⥥";
|
35970 | var dharl = "⇃";
|
35971 | var dharr = "⇂";
|
35972 | var DiacriticalAcute = "´";
|
35973 | var DiacriticalDot = "˙";
|
35974 | var DiacriticalDoubleAcute = "˝";
|
35975 | var DiacriticalGrave = "`";
|
35976 | var DiacriticalTilde = "˜";
|
35977 | var diam = "⋄";
|
35978 | var diamond = "⋄";
|
35979 | var Diamond = "⋄";
|
35980 | var diamondsuit = "♦";
|
35981 | var diams = "♦";
|
35982 | var die = "¨";
|
35983 | var DifferentialD = "ⅆ";
|
35984 | var digamma = "ϝ";
|
35985 | var disin = "⋲";
|
35986 | var div = "÷";
|
35987 | var divide = "÷";
|
35988 | var divideontimes = "⋇";
|
35989 | var divonx = "⋇";
|
35990 | var DJcy = "Ђ";
|
35991 | var djcy = "ђ";
|
35992 | var dlcorn = "⌞";
|
35993 | var dlcrop = "⌍";
|
35994 | var dollar = "$";
|
35995 | var Dopf = "𝔻";
|
35996 | var dopf = "𝕕";
|
35997 | var Dot = "¨";
|
35998 | var dot = "˙";
|
35999 | var DotDot = "⃜";
|
36000 | var doteq = "≐";
|
36001 | var doteqdot = "≑";
|
36002 | var DotEqual = "≐";
|
36003 | var dotminus = "∸";
|
36004 | var dotplus = "∔";
|
36005 | var dotsquare = "⊡";
|
36006 | var doublebarwedge = "⌆";
|
36007 | var DoubleContourIntegral = "∯";
|
36008 | var DoubleDot = "¨";
|
36009 | var DoubleDownArrow = "⇓";
|
36010 | var DoubleLeftArrow = "⇐";
|
36011 | var DoubleLeftRightArrow = "⇔";
|
36012 | var DoubleLeftTee = "⫤";
|
36013 | var DoubleLongLeftArrow = "⟸";
|
36014 | var DoubleLongLeftRightArrow = "⟺";
|
36015 | var DoubleLongRightArrow = "⟹";
|
36016 | var DoubleRightArrow = "⇒";
|
36017 | var DoubleRightTee = "⊨";
|
36018 | var DoubleUpArrow = "⇑";
|
36019 | var DoubleUpDownArrow = "⇕";
|
36020 | var DoubleVerticalBar = "∥";
|
36021 | var DownArrowBar = "⤓";
|
36022 | var downarrow = "↓";
|
36023 | var DownArrow = "↓";
|
36024 | var Downarrow = "⇓";
|
36025 | var DownArrowUpArrow = "⇵";
|
36026 | var DownBreve = "̑";
|
36027 | var downdownarrows = "⇊";
|
36028 | var downharpoonleft = "⇃";
|
36029 | var downharpoonright = "⇂";
|
36030 | var DownLeftRightVector = "⥐";
|
36031 | var DownLeftTeeVector = "⥞";
|
36032 | var DownLeftVectorBar = "⥖";
|
36033 | var DownLeftVector = "↽";
|
36034 | var DownRightTeeVector = "⥟";
|
36035 | var DownRightVectorBar = "⥗";
|
36036 | var DownRightVector = "⇁";
|
36037 | var DownTeeArrow = "↧";
|
36038 | var DownTee = "⊤";
|
36039 | var drbkarow = "⤐";
|
36040 | var drcorn = "⌟";
|
36041 | var drcrop = "⌌";
|
36042 | var Dscr = "𝒟";
|
36043 | var dscr = "𝒹";
|
36044 | var DScy = "Ѕ";
|
36045 | var dscy = "ѕ";
|
36046 | var dsol = "⧶";
|
36047 | var Dstrok = "Đ";
|
36048 | var dstrok = "đ";
|
36049 | var dtdot = "⋱";
|
36050 | var dtri = "▿";
|
36051 | var dtrif = "▾";
|
36052 | var duarr = "⇵";
|
36053 | var duhar = "⥯";
|
36054 | var dwangle = "⦦";
|
36055 | var DZcy = "Џ";
|
36056 | var dzcy = "џ";
|
36057 | var dzigrarr = "⟿";
|
36058 | var Eacute = "É";
|
36059 | var eacute = "é";
|
36060 | var easter = "⩮";
|
36061 | var Ecaron = "Ě";
|
36062 | var ecaron = "ě";
|
36063 | var Ecirc = "Ê";
|
36064 | var ecirc = "ê";
|
36065 | var ecir = "≖";
|
36066 | var ecolon = "≕";
|
36067 | var Ecy = "Э";
|
36068 | var ecy = "э";
|
36069 | var eDDot = "⩷";
|
36070 | var Edot = "Ė";
|
36071 | var edot = "ė";
|
36072 | var eDot = "≑";
|
36073 | var ee = "ⅇ";
|
36074 | var efDot = "≒";
|
36075 | var Efr = "𝔈";
|
36076 | var efr = "𝔢";
|
36077 | var eg = "⪚";
|
36078 | var Egrave = "È";
|
36079 | var egrave = "è";
|
36080 | var egs = "⪖";
|
36081 | var egsdot = "⪘";
|
36082 | var el = "⪙";
|
36083 | var Element = "∈";
|
36084 | var elinters = "⏧";
|
36085 | var ell = "ℓ";
|
36086 | var els = "⪕";
|
36087 | var elsdot = "⪗";
|
36088 | var Emacr = "Ē";
|
36089 | var emacr = "ē";
|
36090 | var empty = "∅";
|
36091 | var emptyset = "∅";
|
36092 | var EmptySmallSquare = "◻";
|
36093 | var emptyv = "∅";
|
36094 | var EmptyVerySmallSquare = "▫";
|
36095 | var emsp13 = " ";
|
36096 | var emsp14 = " ";
|
36097 | var emsp = " ";
|
36098 | var ENG = "Ŋ";
|
36099 | var eng = "ŋ";
|
36100 | var ensp = " ";
|
36101 | var Eogon = "Ę";
|
36102 | var eogon = "ę";
|
36103 | var Eopf = "𝔼";
|
36104 | var eopf = "𝕖";
|
36105 | var epar = "⋕";
|
36106 | var eparsl = "⧣";
|
36107 | var eplus = "⩱";
|
36108 | var epsi = "ε";
|
36109 | var Epsilon = "Ε";
|
36110 | var epsilon = "ε";
|
36111 | var epsiv = "ϵ";
|
36112 | var eqcirc = "≖";
|
36113 | var eqcolon = "≕";
|
36114 | var eqsim = "≂";
|
36115 | var eqslantgtr = "⪖";
|
36116 | var eqslantless = "⪕";
|
36117 | var Equal = "⩵";
|
36118 | var equals = "=";
|
36119 | var EqualTilde = "≂";
|
36120 | var equest = "≟";
|
36121 | var Equilibrium = "⇌";
|
36122 | var equiv = "≡";
|
36123 | var equivDD = "⩸";
|
36124 | var eqvparsl = "⧥";
|
36125 | var erarr = "⥱";
|
36126 | var erDot = "≓";
|
36127 | var escr = "ℯ";
|
36128 | var Escr = "ℰ";
|
36129 | var esdot = "≐";
|
36130 | var Esim = "⩳";
|
36131 | var esim = "≂";
|
36132 | var Eta = "Η";
|
36133 | var eta = "η";
|
36134 | var ETH = "Ð";
|
36135 | var eth = "ð";
|
36136 | var Euml = "Ë";
|
36137 | var euml = "ë";
|
36138 | var euro = "€";
|
36139 | var excl = "!";
|
36140 | var exist = "∃";
|
36141 | var Exists = "∃";
|
36142 | var expectation = "ℰ";
|
36143 | var exponentiale = "ⅇ";
|
36144 | var ExponentialE = "ⅇ";
|
36145 | var fallingdotseq = "≒";
|
36146 | var Fcy = "Ф";
|
36147 | var fcy = "ф";
|
36148 | var female = "♀";
|
36149 | var ffilig = "ffi";
|
36150 | var fflig = "ff";
|
36151 | var ffllig = "ffl";
|
36152 | var Ffr = "𝔉";
|
36153 | var ffr = "𝔣";
|
36154 | var filig = "fi";
|
36155 | var FilledSmallSquare = "◼";
|
36156 | var FilledVerySmallSquare = "▪";
|
36157 | var fjlig = "fj";
|
36158 | var flat = "♭";
|
36159 | var fllig = "fl";
|
36160 | var fltns = "▱";
|
36161 | var fnof = "ƒ";
|
36162 | var Fopf = "𝔽";
|
36163 | var fopf = "𝕗";
|
36164 | var forall = "∀";
|
36165 | var ForAll = "∀";
|
36166 | var fork = "⋔";
|
36167 | var forkv = "⫙";
|
36168 | var Fouriertrf = "ℱ";
|
36169 | var fpartint = "⨍";
|
36170 | var frac12 = "½";
|
36171 | var frac13 = "⅓";
|
36172 | var frac14 = "¼";
|
36173 | var frac15 = "⅕";
|
36174 | var frac16 = "⅙";
|
36175 | var frac18 = "⅛";
|
36176 | var frac23 = "⅔";
|
36177 | var frac25 = "⅖";
|
36178 | var frac34 = "¾";
|
36179 | var frac35 = "⅗";
|
36180 | var frac38 = "⅜";
|
36181 | var frac45 = "⅘";
|
36182 | var frac56 = "⅚";
|
36183 | var frac58 = "⅝";
|
36184 | var frac78 = "⅞";
|
36185 | var frasl = "⁄";
|
36186 | var frown = "⌢";
|
36187 | var fscr = "𝒻";
|
36188 | var Fscr = "ℱ";
|
36189 | var gacute = "ǵ";
|
36190 | var Gamma = "Γ";
|
36191 | var gamma = "γ";
|
36192 | var Gammad = "Ϝ";
|
36193 | var gammad = "ϝ";
|
36194 | var gap$1 = "⪆";
|
36195 | var Gbreve = "Ğ";
|
36196 | var gbreve = "ğ";
|
36197 | var Gcedil = "Ģ";
|
36198 | var Gcirc = "Ĝ";
|
36199 | var gcirc = "ĝ";
|
36200 | var Gcy = "Г";
|
36201 | var gcy = "г";
|
36202 | var Gdot = "Ġ";
|
36203 | var gdot = "ġ";
|
36204 | var ge = "≥";
|
36205 | var gE = "≧";
|
36206 | var gEl = "⪌";
|
36207 | var gel = "⋛";
|
36208 | var geq = "≥";
|
36209 | var geqq = "≧";
|
36210 | var geqslant = "⩾";
|
36211 | var gescc = "⪩";
|
36212 | var ges = "⩾";
|
36213 | var gesdot = "⪀";
|
36214 | var gesdoto = "⪂";
|
36215 | var gesdotol = "⪄";
|
36216 | var gesl = "⋛︀";
|
36217 | var gesles = "⪔";
|
36218 | var Gfr = "𝔊";
|
36219 | var gfr = "𝔤";
|
36220 | var gg = "≫";
|
36221 | var Gg = "⋙";
|
36222 | var ggg = "⋙";
|
36223 | var gimel = "ℷ";
|
36224 | var GJcy = "Ѓ";
|
36225 | var gjcy = "ѓ";
|
36226 | var gla = "⪥";
|
36227 | var gl = "≷";
|
36228 | var glE = "⪒";
|
36229 | var glj = "⪤";
|
36230 | var gnap = "⪊";
|
36231 | var gnapprox = "⪊";
|
36232 | var gne = "⪈";
|
36233 | var gnE = "≩";
|
36234 | var gneq = "⪈";
|
36235 | var gneqq = "≩";
|
36236 | var gnsim = "⋧";
|
36237 | var Gopf = "𝔾";
|
36238 | var gopf = "𝕘";
|
36239 | var grave = "`";
|
36240 | var GreaterEqual = "≥";
|
36241 | var GreaterEqualLess = "⋛";
|
36242 | var GreaterFullEqual = "≧";
|
36243 | var GreaterGreater = "⪢";
|
36244 | var GreaterLess = "≷";
|
36245 | var GreaterSlantEqual = "⩾";
|
36246 | var GreaterTilde = "≳";
|
36247 | var Gscr = "𝒢";
|
36248 | var gscr = "ℊ";
|
36249 | var gsim = "≳";
|
36250 | var gsime = "⪎";
|
36251 | var gsiml = "⪐";
|
36252 | var gtcc = "⪧";
|
36253 | var gtcir = "⩺";
|
36254 | var gt = ">";
|
36255 | var GT = ">";
|
36256 | var Gt = "≫";
|
36257 | var gtdot = "⋗";
|
36258 | var gtlPar = "⦕";
|
36259 | var gtquest = "⩼";
|
36260 | var gtrapprox = "⪆";
|
36261 | var gtrarr = "⥸";
|
36262 | var gtrdot = "⋗";
|
36263 | var gtreqless = "⋛";
|
36264 | var gtreqqless = "⪌";
|
36265 | var gtrless = "≷";
|
36266 | var gtrsim = "≳";
|
36267 | var gvertneqq = "≩︀";
|
36268 | var gvnE = "≩︀";
|
36269 | var Hacek = "ˇ";
|
36270 | var hairsp = " ";
|
36271 | var half = "½";
|
36272 | var hamilt = "ℋ";
|
36273 | var HARDcy = "Ъ";
|
36274 | var hardcy = "ъ";
|
36275 | var harrcir = "⥈";
|
36276 | var harr = "↔";
|
36277 | var hArr = "⇔";
|
36278 | var harrw = "↭";
|
36279 | var Hat = "^";
|
36280 | var hbar = "ℏ";
|
36281 | var Hcirc = "Ĥ";
|
36282 | var hcirc = "ĥ";
|
36283 | var hearts = "♥";
|
36284 | var heartsuit = "♥";
|
36285 | var hellip = "…";
|
36286 | var hercon = "⊹";
|
36287 | var hfr = "𝔥";
|
36288 | var Hfr = "ℌ";
|
36289 | var HilbertSpace = "ℋ";
|
36290 | var hksearow = "⤥";
|
36291 | var hkswarow = "⤦";
|
36292 | var hoarr = "⇿";
|
36293 | var homtht = "∻";
|
36294 | var hookleftarrow = "↩";
|
36295 | var hookrightarrow = "↪";
|
36296 | var hopf = "𝕙";
|
36297 | var Hopf = "ℍ";
|
36298 | var horbar = "―";
|
36299 | var HorizontalLine = "─";
|
36300 | var hscr = "𝒽";
|
36301 | var Hscr = "ℋ";
|
36302 | var hslash = "ℏ";
|
36303 | var Hstrok = "Ħ";
|
36304 | var hstrok = "ħ";
|
36305 | var HumpDownHump = "≎";
|
36306 | var HumpEqual = "≏";
|
36307 | var hybull = "⁃";
|
36308 | var hyphen = "‐";
|
36309 | var Iacute = "Í";
|
36310 | var iacute = "í";
|
36311 | var ic = "";
|
36312 | var Icirc = "Î";
|
36313 | var icirc = "î";
|
36314 | var Icy = "И";
|
36315 | var icy = "и";
|
36316 | var Idot = "İ";
|
36317 | var IEcy = "Е";
|
36318 | var iecy = "е";
|
36319 | var iexcl = "¡";
|
36320 | var iff = "⇔";
|
36321 | var ifr = "𝔦";
|
36322 | var Ifr = "ℑ";
|
36323 | var Igrave = "Ì";
|
36324 | var igrave = "ì";
|
36325 | var ii = "ⅈ";
|
36326 | var iiiint = "⨌";
|
36327 | var iiint = "∭";
|
36328 | var iinfin = "⧜";
|
36329 | var iiota = "℩";
|
36330 | var IJlig = "IJ";
|
36331 | var ijlig = "ij";
|
36332 | var Imacr = "Ī";
|
36333 | var imacr = "ī";
|
36334 | var image$1 = "ℑ";
|
36335 | var ImaginaryI = "ⅈ";
|
36336 | var imagline = "ℐ";
|
36337 | var imagpart = "ℑ";
|
36338 | var imath = "ı";
|
36339 | var Im = "ℑ";
|
36340 | var imof = "⊷";
|
36341 | var imped = "Ƶ";
|
36342 | var Implies = "⇒";
|
36343 | var incare = "℅";
|
36344 | var infin = "∞";
|
36345 | var infintie = "⧝";
|
36346 | var inodot = "ı";
|
36347 | var intcal = "⊺";
|
36348 | var int = "∫";
|
36349 | var Int = "∬";
|
36350 | var integers = "ℤ";
|
36351 | var Integral = "∫";
|
36352 | var intercal = "⊺";
|
36353 | var Intersection = "⋂";
|
36354 | var intlarhk = "⨗";
|
36355 | var intprod = "⨼";
|
36356 | var InvisibleComma = "";
|
36357 | var InvisibleTimes = "";
|
36358 | var IOcy = "Ё";
|
36359 | var iocy = "ё";
|
36360 | var Iogon = "Į";
|
36361 | var iogon = "į";
|
36362 | var Iopf = "𝕀";
|
36363 | var iopf = "𝕚";
|
36364 | var Iota = "Ι";
|
36365 | var iota = "ι";
|
36366 | var iprod = "⨼";
|
36367 | var iquest = "¿";
|
36368 | var iscr = "𝒾";
|
36369 | var Iscr = "ℐ";
|
36370 | var isin = "∈";
|
36371 | var isindot = "⋵";
|
36372 | var isinE = "⋹";
|
36373 | var isins = "⋴";
|
36374 | var isinsv = "⋳";
|
36375 | var isinv = "∈";
|
36376 | var it = "";
|
36377 | var Itilde = "Ĩ";
|
36378 | var itilde = "ĩ";
|
36379 | var Iukcy = "І";
|
36380 | var iukcy = "і";
|
36381 | var Iuml = "Ï";
|
36382 | var iuml = "ï";
|
36383 | var Jcirc = "Ĵ";
|
36384 | var jcirc = "ĵ";
|
36385 | var Jcy = "Й";
|
36386 | var jcy = "й";
|
36387 | var Jfr = "𝔍";
|
36388 | var jfr = "𝔧";
|
36389 | var jmath = "ȷ";
|
36390 | var Jopf = "𝕁";
|
36391 | var jopf = "𝕛";
|
36392 | var Jscr = "𝒥";
|
36393 | var jscr = "𝒿";
|
36394 | var Jsercy = "Ј";
|
36395 | var jsercy = "ј";
|
36396 | var Jukcy = "Є";
|
36397 | var jukcy = "є";
|
36398 | var Kappa = "Κ";
|
36399 | var kappa = "κ";
|
36400 | var kappav = "ϰ";
|
36401 | var Kcedil = "Ķ";
|
36402 | var kcedil = "ķ";
|
36403 | var Kcy = "К";
|
36404 | var kcy = "к";
|
36405 | var Kfr = "𝔎";
|
36406 | var kfr = "𝔨";
|
36407 | var kgreen = "ĸ";
|
36408 | var KHcy = "Х";
|
36409 | var khcy = "х";
|
36410 | var KJcy = "Ќ";
|
36411 | var kjcy = "ќ";
|
36412 | var Kopf = "𝕂";
|
36413 | var kopf = "𝕜";
|
36414 | var Kscr = "𝒦";
|
36415 | var kscr = "𝓀";
|
36416 | var lAarr = "⇚";
|
36417 | var Lacute = "Ĺ";
|
36418 | var lacute = "ĺ";
|
36419 | var laemptyv = "⦴";
|
36420 | var lagran = "ℒ";
|
36421 | var Lambda = "Λ";
|
36422 | var lambda = "λ";
|
36423 | var lang$1 = "⟨";
|
36424 | var Lang = "⟪";
|
36425 | var langd = "⦑";
|
36426 | var langle = "⟨";
|
36427 | var lap = "⪅";
|
36428 | var Laplacetrf = "ℒ";
|
36429 | var laquo = "«";
|
36430 | var larrb = "⇤";
|
36431 | var larrbfs = "⤟";
|
36432 | var larr = "←";
|
36433 | var Larr = "↞";
|
36434 | var lArr = "⇐";
|
36435 | var larrfs = "⤝";
|
36436 | var larrhk = "↩";
|
36437 | var larrlp = "↫";
|
36438 | var larrpl = "⤹";
|
36439 | var larrsim = "⥳";
|
36440 | var larrtl = "↢";
|
36441 | var latail = "⤙";
|
36442 | var lAtail = "⤛";
|
36443 | var lat = "⪫";
|
36444 | var late = "⪭";
|
36445 | var lates = "⪭︀";
|
36446 | var lbarr = "⤌";
|
36447 | var lBarr = "⤎";
|
36448 | var lbbrk = "❲";
|
36449 | var lbrace = "{";
|
36450 | var lbrack = "[";
|
36451 | var lbrke = "⦋";
|
36452 | var lbrksld = "⦏";
|
36453 | var lbrkslu = "⦍";
|
36454 | var Lcaron = "Ľ";
|
36455 | var lcaron = "ľ";
|
36456 | var Lcedil = "Ļ";
|
36457 | var lcedil = "ļ";
|
36458 | var lceil = "⌈";
|
36459 | var lcub = "{";
|
36460 | var Lcy = "Л";
|
36461 | var lcy = "л";
|
36462 | var ldca = "⤶";
|
36463 | var ldquo = "“";
|
36464 | var ldquor = "„";
|
36465 | var ldrdhar = "⥧";
|
36466 | var ldrushar = "⥋";
|
36467 | var ldsh = "↲";
|
36468 | var le = "≤";
|
36469 | var lE = "≦";
|
36470 | var LeftAngleBracket = "⟨";
|
36471 | var LeftArrowBar = "⇤";
|
36472 | var leftarrow = "←";
|
36473 | var LeftArrow = "←";
|
36474 | var Leftarrow = "⇐";
|
36475 | var LeftArrowRightArrow = "⇆";
|
36476 | var leftarrowtail = "↢";
|
36477 | var LeftCeiling = "⌈";
|
36478 | var LeftDoubleBracket = "⟦";
|
36479 | var LeftDownTeeVector = "⥡";
|
36480 | var LeftDownVectorBar = "⥙";
|
36481 | var LeftDownVector = "⇃";
|
36482 | var LeftFloor = "⌊";
|
36483 | var leftharpoondown = "↽";
|
36484 | var leftharpoonup = "↼";
|
36485 | var leftleftarrows = "⇇";
|
36486 | var leftrightarrow = "↔";
|
36487 | var LeftRightArrow = "↔";
|
36488 | var Leftrightarrow = "⇔";
|
36489 | var leftrightarrows = "⇆";
|
36490 | var leftrightharpoons = "⇋";
|
36491 | var leftrightsquigarrow = "↭";
|
36492 | var LeftRightVector = "⥎";
|
36493 | var LeftTeeArrow = "↤";
|
36494 | var LeftTee = "⊣";
|
36495 | var LeftTeeVector = "⥚";
|
36496 | var leftthreetimes = "⋋";
|
36497 | var LeftTriangleBar = "⧏";
|
36498 | var LeftTriangle = "⊲";
|
36499 | var LeftTriangleEqual = "⊴";
|
36500 | var LeftUpDownVector = "⥑";
|
36501 | var LeftUpTeeVector = "⥠";
|
36502 | var LeftUpVectorBar = "⥘";
|
36503 | var LeftUpVector = "↿";
|
36504 | var LeftVectorBar = "⥒";
|
36505 | var LeftVector = "↼";
|
36506 | var lEg = "⪋";
|
36507 | var leg = "⋚";
|
36508 | var leq = "≤";
|
36509 | var leqq = "≦";
|
36510 | var leqslant = "⩽";
|
36511 | var lescc = "⪨";
|
36512 | var les = "⩽";
|
36513 | var lesdot = "⩿";
|
36514 | var lesdoto = "⪁";
|
36515 | var lesdotor = "⪃";
|
36516 | var lesg = "⋚︀";
|
36517 | var lesges = "⪓";
|
36518 | var lessapprox = "⪅";
|
36519 | var lessdot = "⋖";
|
36520 | var lesseqgtr = "⋚";
|
36521 | var lesseqqgtr = "⪋";
|
36522 | var LessEqualGreater = "⋚";
|
36523 | var LessFullEqual = "≦";
|
36524 | var LessGreater = "≶";
|
36525 | var lessgtr = "≶";
|
36526 | var LessLess = "⪡";
|
36527 | var lesssim = "≲";
|
36528 | var LessSlantEqual = "⩽";
|
36529 | var LessTilde = "≲";
|
36530 | var lfisht = "⥼";
|
36531 | var lfloor = "⌊";
|
36532 | var Lfr = "𝔏";
|
36533 | var lfr = "𝔩";
|
36534 | var lg = "≶";
|
36535 | var lgE = "⪑";
|
36536 | var lHar = "⥢";
|
36537 | var lhard = "↽";
|
36538 | var lharu = "↼";
|
36539 | var lharul = "⥪";
|
36540 | var lhblk = "▄";
|
36541 | var LJcy = "Љ";
|
36542 | var ljcy = "љ";
|
36543 | var llarr = "⇇";
|
36544 | var ll = "≪";
|
36545 | var Ll = "⋘";
|
36546 | var llcorner = "⌞";
|
36547 | var Lleftarrow = "⇚";
|
36548 | var llhard = "⥫";
|
36549 | var lltri = "◺";
|
36550 | var Lmidot = "Ŀ";
|
36551 | var lmidot = "ŀ";
|
36552 | var lmoustache = "⎰";
|
36553 | var lmoust = "⎰";
|
36554 | var lnap = "⪉";
|
36555 | var lnapprox = "⪉";
|
36556 | var lne = "⪇";
|
36557 | var lnE = "≨";
|
36558 | var lneq = "⪇";
|
36559 | var lneqq = "≨";
|
36560 | var lnsim = "⋦";
|
36561 | var loang = "⟬";
|
36562 | var loarr = "⇽";
|
36563 | var lobrk = "⟦";
|
36564 | var longleftarrow = "⟵";
|
36565 | var LongLeftArrow = "⟵";
|
36566 | var Longleftarrow = "⟸";
|
36567 | var longleftrightarrow = "⟷";
|
36568 | var LongLeftRightArrow = "⟷";
|
36569 | var Longleftrightarrow = "⟺";
|
36570 | var longmapsto = "⟼";
|
36571 | var longrightarrow = "⟶";
|
36572 | var LongRightArrow = "⟶";
|
36573 | var Longrightarrow = "⟹";
|
36574 | var looparrowleft = "↫";
|
36575 | var looparrowright = "↬";
|
36576 | var lopar = "⦅";
|
36577 | var Lopf = "𝕃";
|
36578 | var lopf = "𝕝";
|
36579 | var loplus = "⨭";
|
36580 | var lotimes = "⨴";
|
36581 | var lowast = "∗";
|
36582 | var lowbar = "_";
|
36583 | var LowerLeftArrow = "↙";
|
36584 | var LowerRightArrow = "↘";
|
36585 | var loz = "◊";
|
36586 | var lozenge = "◊";
|
36587 | var lozf = "⧫";
|
36588 | var lpar = "(";
|
36589 | var lparlt = "⦓";
|
36590 | var lrarr = "⇆";
|
36591 | var lrcorner = "⌟";
|
36592 | var lrhar = "⇋";
|
36593 | var lrhard = "⥭";
|
36594 | var lrm = "";
|
36595 | var lrtri = "⊿";
|
36596 | var lsaquo = "‹";
|
36597 | var lscr = "𝓁";
|
36598 | var Lscr = "ℒ";
|
36599 | var lsh = "↰";
|
36600 | var Lsh = "↰";
|
36601 | var lsim = "≲";
|
36602 | var lsime = "⪍";
|
36603 | var lsimg = "⪏";
|
36604 | var lsqb = "[";
|
36605 | var lsquo = "‘";
|
36606 | var lsquor = "‚";
|
36607 | var Lstrok = "Ł";
|
36608 | var lstrok = "ł";
|
36609 | var ltcc = "⪦";
|
36610 | var ltcir = "⩹";
|
36611 | var lt = "<";
|
36612 | var LT = "<";
|
36613 | var Lt = "≪";
|
36614 | var ltdot = "⋖";
|
36615 | var lthree = "⋋";
|
36616 | var ltimes = "⋉";
|
36617 | var ltlarr = "⥶";
|
36618 | var ltquest = "⩻";
|
36619 | var ltri = "◃";
|
36620 | var ltrie = "⊴";
|
36621 | var ltrif = "◂";
|
36622 | var ltrPar = "⦖";
|
36623 | var lurdshar = "⥊";
|
36624 | var luruhar = "⥦";
|
36625 | var lvertneqq = "≨︀";
|
36626 | var lvnE = "≨︀";
|
36627 | var macr = "¯";
|
36628 | var male = "♂";
|
36629 | var malt = "✠";
|
36630 | var maltese = "✠";
|
36631 | var map = "↦";
|
36632 | var mapsto = "↦";
|
36633 | var mapstodown = "↧";
|
36634 | var mapstoleft = "↤";
|
36635 | var mapstoup = "↥";
|
36636 | var marker = "▮";
|
36637 | var mcomma = "⨩";
|
36638 | var Mcy = "М";
|
36639 | var mcy = "м";
|
36640 | var mdash = "—";
|
36641 | var mDDot = "∺";
|
36642 | var measuredangle = "∡";
|
36643 | var MediumSpace = " ";
|
36644 | var Mellintrf = "ℳ";
|
36645 | var Mfr = "𝔐";
|
36646 | var mfr = "𝔪";
|
36647 | var mho = "℧";
|
36648 | var micro = "µ";
|
36649 | var midast = "*";
|
36650 | var midcir = "⫰";
|
36651 | var mid = "∣";
|
36652 | var middot = "·";
|
36653 | var minusb = "⊟";
|
36654 | var minus = "−";
|
36655 | var minusd = "∸";
|
36656 | var minusdu = "⨪";
|
36657 | var MinusPlus = "∓";
|
36658 | var mlcp = "⫛";
|
36659 | var mldr = "…";
|
36660 | var mnplus = "∓";
|
36661 | var models = "⊧";
|
36662 | var Mopf = "𝕄";
|
36663 | var mopf = "𝕞";
|
36664 | var mp = "∓";
|
36665 | var mscr = "𝓂";
|
36666 | var Mscr = "ℳ";
|
36667 | var mstpos = "∾";
|
36668 | var Mu = "Μ";
|
36669 | var mu = "μ";
|
36670 | var multimap = "⊸";
|
36671 | var mumap = "⊸";
|
36672 | var nabla = "∇";
|
36673 | var Nacute = "Ń";
|
36674 | var nacute = "ń";
|
36675 | var nang = "∠⃒";
|
36676 | var nap = "≉";
|
36677 | var napE = "⩰̸";
|
36678 | var napid = "≋̸";
|
36679 | var napos = "ʼn";
|
36680 | var napprox = "≉";
|
36681 | var natural = "♮";
|
36682 | var naturals = "ℕ";
|
36683 | var natur = "♮";
|
36684 | var nbsp = " ";
|
36685 | var nbump = "≎̸";
|
36686 | var nbumpe = "≏̸";
|
36687 | var ncap = "⩃";
|
36688 | var Ncaron = "Ň";
|
36689 | var ncaron = "ň";
|
36690 | var Ncedil = "Ņ";
|
36691 | var ncedil = "ņ";
|
36692 | var ncong = "≇";
|
36693 | var ncongdot = "⩭̸";
|
36694 | var ncup = "⩂";
|
36695 | var Ncy = "Н";
|
36696 | var ncy = "н";
|
36697 | var ndash = "–";
|
36698 | var nearhk = "⤤";
|
36699 | var nearr = "↗";
|
36700 | var neArr = "⇗";
|
36701 | var nearrow = "↗";
|
36702 | var ne = "≠";
|
36703 | var nedot = "≐̸";
|
36704 | var NegativeMediumSpace = "";
|
36705 | var NegativeThickSpace = "";
|
36706 | var NegativeThinSpace = "";
|
36707 | var NegativeVeryThinSpace = "";
|
36708 | var nequiv = "≢";
|
36709 | var nesear = "⤨";
|
36710 | var nesim = "≂̸";
|
36711 | var NestedGreaterGreater = "≫";
|
36712 | var NestedLessLess = "≪";
|
36713 | var NewLine = "\n";
|
36714 | var nexist = "∄";
|
36715 | var nexists = "∄";
|
36716 | var Nfr = "𝔑";
|
36717 | var nfr = "𝔫";
|
36718 | var ngE = "≧̸";
|
36719 | var nge = "≱";
|
36720 | var ngeq = "≱";
|
36721 | var ngeqq = "≧̸";
|
36722 | var ngeqslant = "⩾̸";
|
36723 | var nges = "⩾̸";
|
36724 | var nGg = "⋙̸";
|
36725 | var ngsim = "≵";
|
36726 | var nGt = "≫⃒";
|
36727 | var ngt = "≯";
|
36728 | var ngtr = "≯";
|
36729 | var nGtv = "≫̸";
|
36730 | var nharr = "↮";
|
36731 | var nhArr = "⇎";
|
36732 | var nhpar = "⫲";
|
36733 | var ni = "∋";
|
36734 | var nis = "⋼";
|
36735 | var nisd = "⋺";
|
36736 | var niv = "∋";
|
36737 | var NJcy = "Њ";
|
36738 | var njcy = "њ";
|
36739 | var nlarr = "↚";
|
36740 | var nlArr = "⇍";
|
36741 | var nldr = "‥";
|
36742 | var nlE = "≦̸";
|
36743 | var nle = "≰";
|
36744 | var nleftarrow = "↚";
|
36745 | var nLeftarrow = "⇍";
|
36746 | var nleftrightarrow = "↮";
|
36747 | var nLeftrightarrow = "⇎";
|
36748 | var nleq = "≰";
|
36749 | var nleqq = "≦̸";
|
36750 | var nleqslant = "⩽̸";
|
36751 | var nles = "⩽̸";
|
36752 | var nless = "≮";
|
36753 | var nLl = "⋘̸";
|
36754 | var nlsim = "≴";
|
36755 | var nLt = "≪⃒";
|
36756 | var nlt = "≮";
|
36757 | var nltri = "⋪";
|
36758 | var nltrie = "⋬";
|
36759 | var nLtv = "≪̸";
|
36760 | var nmid = "∤";
|
36761 | var NoBreak = "";
|
36762 | var NonBreakingSpace = " ";
|
36763 | var nopf = "𝕟";
|
36764 | var Nopf = "ℕ";
|
36765 | var Not = "⫬";
|
36766 | var not$1 = "¬";
|
36767 | var NotCongruent = "≢";
|
36768 | var NotCupCap = "≭";
|
36769 | var NotDoubleVerticalBar = "∦";
|
36770 | var NotElement = "∉";
|
36771 | var NotEqual = "≠";
|
36772 | var NotEqualTilde = "≂̸";
|
36773 | var NotExists = "∄";
|
36774 | var NotGreater = "≯";
|
36775 | var NotGreaterEqual = "≱";
|
36776 | var NotGreaterFullEqual = "≧̸";
|
36777 | var NotGreaterGreater = "≫̸";
|
36778 | var NotGreaterLess = "≹";
|
36779 | var NotGreaterSlantEqual = "⩾̸";
|
36780 | var NotGreaterTilde = "≵";
|
36781 | var NotHumpDownHump = "≎̸";
|
36782 | var NotHumpEqual = "≏̸";
|
36783 | var notin = "∉";
|
36784 | var notindot = "⋵̸";
|
36785 | var notinE = "⋹̸";
|
36786 | var notinva = "∉";
|
36787 | var notinvb = "⋷";
|
36788 | var notinvc = "⋶";
|
36789 | var NotLeftTriangleBar = "⧏̸";
|
36790 | var NotLeftTriangle = "⋪";
|
36791 | var NotLeftTriangleEqual = "⋬";
|
36792 | var NotLess = "≮";
|
36793 | var NotLessEqual = "≰";
|
36794 | var NotLessGreater = "≸";
|
36795 | var NotLessLess = "≪̸";
|
36796 | var NotLessSlantEqual = "⩽̸";
|
36797 | var NotLessTilde = "≴";
|
36798 | var NotNestedGreaterGreater = "⪢̸";
|
36799 | var NotNestedLessLess = "⪡̸";
|
36800 | var notni = "∌";
|
36801 | var notniva = "∌";
|
36802 | var notnivb = "⋾";
|
36803 | var notnivc = "⋽";
|
36804 | var NotPrecedes = "⊀";
|
36805 | var NotPrecedesEqual = "⪯̸";
|
36806 | var NotPrecedesSlantEqual = "⋠";
|
36807 | var NotReverseElement = "∌";
|
36808 | var NotRightTriangleBar = "⧐̸";
|
36809 | var NotRightTriangle = "⋫";
|
36810 | var NotRightTriangleEqual = "⋭";
|
36811 | var NotSquareSubset = "⊏̸";
|
36812 | var NotSquareSubsetEqual = "⋢";
|
36813 | var NotSquareSuperset = "⊐̸";
|
36814 | var NotSquareSupersetEqual = "⋣";
|
36815 | var NotSubset = "⊂⃒";
|
36816 | var NotSubsetEqual = "⊈";
|
36817 | var NotSucceeds = "⊁";
|
36818 | var NotSucceedsEqual = "⪰̸";
|
36819 | var NotSucceedsSlantEqual = "⋡";
|
36820 | var NotSucceedsTilde = "≿̸";
|
36821 | var NotSuperset = "⊃⃒";
|
36822 | var NotSupersetEqual = "⊉";
|
36823 | var NotTilde = "≁";
|
36824 | var NotTildeEqual = "≄";
|
36825 | var NotTildeFullEqual = "≇";
|
36826 | var NotTildeTilde = "≉";
|
36827 | var NotVerticalBar = "∤";
|
36828 | var nparallel = "∦";
|
36829 | var npar = "∦";
|
36830 | var nparsl = "⫽⃥";
|
36831 | var npart = "∂̸";
|
36832 | var npolint = "⨔";
|
36833 | var npr = "⊀";
|
36834 | var nprcue = "⋠";
|
36835 | var nprec = "⊀";
|
36836 | var npreceq = "⪯̸";
|
36837 | var npre = "⪯̸";
|
36838 | var nrarrc = "⤳̸";
|
36839 | var nrarr = "↛";
|
36840 | var nrArr = "⇏";
|
36841 | var nrarrw = "↝̸";
|
36842 | var nrightarrow = "↛";
|
36843 | var nRightarrow = "⇏";
|
36844 | var nrtri = "⋫";
|
36845 | var nrtrie = "⋭";
|
36846 | var nsc = "⊁";
|
36847 | var nsccue = "⋡";
|
36848 | var nsce = "⪰̸";
|
36849 | var Nscr = "𝒩";
|
36850 | var nscr = "𝓃";
|
36851 | var nshortmid = "∤";
|
36852 | var nshortparallel = "∦";
|
36853 | var nsim = "≁";
|
36854 | var nsime = "≄";
|
36855 | var nsimeq = "≄";
|
36856 | var nsmid = "∤";
|
36857 | var nspar = "∦";
|
36858 | var nsqsube = "⋢";
|
36859 | var nsqsupe = "⋣";
|
36860 | var nsub = "⊄";
|
36861 | var nsubE = "⫅̸";
|
36862 | var nsube = "⊈";
|
36863 | var nsubset = "⊂⃒";
|
36864 | var nsubseteq = "⊈";
|
36865 | var nsubseteqq = "⫅̸";
|
36866 | var nsucc = "⊁";
|
36867 | var nsucceq = "⪰̸";
|
36868 | var nsup = "⊅";
|
36869 | var nsupE = "⫆̸";
|
36870 | var nsupe = "⊉";
|
36871 | var nsupset = "⊃⃒";
|
36872 | var nsupseteq = "⊉";
|
36873 | var nsupseteqq = "⫆̸";
|
36874 | var ntgl = "≹";
|
36875 | var Ntilde = "Ñ";
|
36876 | var ntilde = "ñ";
|
36877 | var ntlg = "≸";
|
36878 | var ntriangleleft = "⋪";
|
36879 | var ntrianglelefteq = "⋬";
|
36880 | var ntriangleright = "⋫";
|
36881 | var ntrianglerighteq = "⋭";
|
36882 | var Nu = "Ν";
|
36883 | var nu = "ν";
|
36884 | var num = "#";
|
36885 | var numero = "№";
|
36886 | var numsp = " ";
|
36887 | var nvap = "≍⃒";
|
36888 | var nvdash = "⊬";
|
36889 | var nvDash = "⊭";
|
36890 | var nVdash = "⊮";
|
36891 | var nVDash = "⊯";
|
36892 | var nvge = "≥⃒";
|
36893 | var nvgt = ">⃒";
|
36894 | var nvHarr = "⤄";
|
36895 | var nvinfin = "⧞";
|
36896 | var nvlArr = "⤂";
|
36897 | var nvle = "≤⃒";
|
36898 | var nvlt = "<⃒";
|
36899 | var nvltrie = "⊴⃒";
|
36900 | var nvrArr = "⤃";
|
36901 | var nvrtrie = "⊵⃒";
|
36902 | var nvsim = "∼⃒";
|
36903 | var nwarhk = "⤣";
|
36904 | var nwarr = "↖";
|
36905 | var nwArr = "⇖";
|
36906 | var nwarrow = "↖";
|
36907 | var nwnear = "⤧";
|
36908 | var Oacute = "Ó";
|
36909 | var oacute = "ó";
|
36910 | var oast = "⊛";
|
36911 | var Ocirc = "Ô";
|
36912 | var ocirc = "ô";
|
36913 | var ocir = "⊚";
|
36914 | var Ocy = "О";
|
36915 | var ocy = "о";
|
36916 | var odash = "⊝";
|
36917 | var Odblac = "Ő";
|
36918 | var odblac = "ő";
|
36919 | var odiv = "⨸";
|
36920 | var odot = "⊙";
|
36921 | var odsold = "⦼";
|
36922 | var OElig = "Œ";
|
36923 | var oelig = "œ";
|
36924 | var ofcir = "⦿";
|
36925 | var Ofr = "𝔒";
|
36926 | var ofr = "𝔬";
|
36927 | var ogon = "˛";
|
36928 | var Ograve = "Ò";
|
36929 | var ograve = "ò";
|
36930 | var ogt = "⧁";
|
36931 | var ohbar = "⦵";
|
36932 | var ohm = "Ω";
|
36933 | var oint = "∮";
|
36934 | var olarr = "↺";
|
36935 | var olcir = "⦾";
|
36936 | var olcross = "⦻";
|
36937 | var oline = "‾";
|
36938 | var olt = "⧀";
|
36939 | var Omacr = "Ō";
|
36940 | var omacr = "ō";
|
36941 | var Omega = "Ω";
|
36942 | var omega = "ω";
|
36943 | var Omicron = "Ο";
|
36944 | var omicron = "ο";
|
36945 | var omid = "⦶";
|
36946 | var ominus = "⊖";
|
36947 | var Oopf = "𝕆";
|
36948 | var oopf = "𝕠";
|
36949 | var opar = "⦷";
|
36950 | var OpenCurlyDoubleQuote = "“";
|
36951 | var OpenCurlyQuote = "‘";
|
36952 | var operp = "⦹";
|
36953 | var oplus = "⊕";
|
36954 | var orarr = "↻";
|
36955 | var Or = "⩔";
|
36956 | var or = "∨";
|
36957 | var ord = "⩝";
|
36958 | var order$1 = "ℴ";
|
36959 | var orderof = "ℴ";
|
36960 | var ordf = "ª";
|
36961 | var ordm = "º";
|
36962 | var origof = "⊶";
|
36963 | var oror = "⩖";
|
36964 | var orslope = "⩗";
|
36965 | var orv = "⩛";
|
36966 | var oS = "Ⓢ";
|
36967 | var Oscr = "𝒪";
|
36968 | var oscr = "ℴ";
|
36969 | var Oslash = "Ø";
|
36970 | var oslash = "ø";
|
36971 | var osol = "⊘";
|
36972 | var Otilde = "Õ";
|
36973 | var otilde = "õ";
|
36974 | var otimesas = "⨶";
|
36975 | var Otimes = "⨷";
|
36976 | var otimes = "⊗";
|
36977 | var Ouml = "Ö";
|
36978 | var ouml = "ö";
|
36979 | var ovbar = "⌽";
|
36980 | var OverBar = "‾";
|
36981 | var OverBrace = "⏞";
|
36982 | var OverBracket = "⎴";
|
36983 | var OverParenthesis = "⏜";
|
36984 | var para = "¶";
|
36985 | var parallel = "∥";
|
36986 | var par = "∥";
|
36987 | var parsim = "⫳";
|
36988 | var parsl = "⫽";
|
36989 | var part = "∂";
|
36990 | var PartialD = "∂";
|
36991 | var Pcy = "П";
|
36992 | var pcy = "п";
|
36993 | var percnt = "%";
|
36994 | var period = ".";
|
36995 | var permil = "‰";
|
36996 | var perp = "⊥";
|
36997 | var pertenk = "‱";
|
36998 | var Pfr = "𝔓";
|
36999 | var pfr = "𝔭";
|
37000 | var Phi = "Φ";
|
37001 | var phi = "φ";
|
37002 | var phiv = "ϕ";
|
37003 | var phmmat = "ℳ";
|
37004 | var phone = "☎";
|
37005 | var Pi = "Π";
|
37006 | var pi = "π";
|
37007 | var pitchfork = "⋔";
|
37008 | var piv = "ϖ";
|
37009 | var planck = "ℏ";
|
37010 | var planckh = "ℎ";
|
37011 | var plankv = "ℏ";
|
37012 | var plusacir = "⨣";
|
37013 | var plusb = "⊞";
|
37014 | var pluscir = "⨢";
|
37015 | var plus = "+";
|
37016 | var plusdo = "∔";
|
37017 | var plusdu = "⨥";
|
37018 | var pluse = "⩲";
|
37019 | var PlusMinus = "±";
|
37020 | var plusmn = "±";
|
37021 | var plussim = "⨦";
|
37022 | var plustwo = "⨧";
|
37023 | var pm = "±";
|
37024 | var Poincareplane = "ℌ";
|
37025 | var pointint = "⨕";
|
37026 | var popf = "𝕡";
|
37027 | var Popf = "ℙ";
|
37028 | var pound = "£";
|
37029 | var prap = "⪷";
|
37030 | var Pr = "⪻";
|
37031 | var pr = "≺";
|
37032 | var prcue = "≼";
|
37033 | var precapprox = "⪷";
|
37034 | var prec = "≺";
|
37035 | var preccurlyeq = "≼";
|
37036 | var Precedes = "≺";
|
37037 | var PrecedesEqual = "⪯";
|
37038 | var PrecedesSlantEqual = "≼";
|
37039 | var PrecedesTilde = "≾";
|
37040 | var preceq = "⪯";
|
37041 | var precnapprox = "⪹";
|
37042 | var precneqq = "⪵";
|
37043 | var precnsim = "⋨";
|
37044 | var pre = "⪯";
|
37045 | var prE = "⪳";
|
37046 | var precsim = "≾";
|
37047 | var prime = "′";
|
37048 | var Prime = "″";
|
37049 | var primes = "ℙ";
|
37050 | var prnap = "⪹";
|
37051 | var prnE = "⪵";
|
37052 | var prnsim = "⋨";
|
37053 | var prod = "∏";
|
37054 | var Product = "∏";
|
37055 | var profalar = "⌮";
|
37056 | var profline = "⌒";
|
37057 | var profsurf = "⌓";
|
37058 | var prop = "∝";
|
37059 | var Proportional = "∝";
|
37060 | var Proportion = "∷";
|
37061 | var propto = "∝";
|
37062 | var prsim = "≾";
|
37063 | var prurel = "⊰";
|
37064 | var Pscr = "𝒫";
|
37065 | var pscr = "𝓅";
|
37066 | var Psi = "Ψ";
|
37067 | var psi = "ψ";
|
37068 | var puncsp = " ";
|
37069 | var Qfr = "𝔔";
|
37070 | var qfr = "𝔮";
|
37071 | var qint = "⨌";
|
37072 | var qopf = "𝕢";
|
37073 | var Qopf = "ℚ";
|
37074 | var qprime = "⁗";
|
37075 | var Qscr = "𝒬";
|
37076 | var qscr = "𝓆";
|
37077 | var quaternions = "ℍ";
|
37078 | var quatint = "⨖";
|
37079 | var quest = "?";
|
37080 | var questeq = "≟";
|
37081 | var quot = "\"";
|
37082 | var QUOT = "\"";
|
37083 | var rAarr = "⇛";
|
37084 | var race = "∽̱";
|
37085 | var Racute = "Ŕ";
|
37086 | var racute = "ŕ";
|
37087 | var radic = "√";
|
37088 | var raemptyv = "⦳";
|
37089 | var rang = "⟩";
|
37090 | var Rang = "⟫";
|
37091 | var rangd = "⦒";
|
37092 | var range = "⦥";
|
37093 | var rangle = "⟩";
|
37094 | var raquo = "»";
|
37095 | var rarrap = "⥵";
|
37096 | var rarrb = "⇥";
|
37097 | var rarrbfs = "⤠";
|
37098 | var rarrc = "⤳";
|
37099 | var rarr = "→";
|
37100 | var Rarr = "↠";
|
37101 | var rArr = "⇒";
|
37102 | var rarrfs = "⤞";
|
37103 | var rarrhk = "↪";
|
37104 | var rarrlp = "↬";
|
37105 | var rarrpl = "⥅";
|
37106 | var rarrsim = "⥴";
|
37107 | var Rarrtl = "⤖";
|
37108 | var rarrtl = "↣";
|
37109 | var rarrw = "↝";
|
37110 | var ratail = "⤚";
|
37111 | var rAtail = "⤜";
|
37112 | var ratio = "∶";
|
37113 | var rationals = "ℚ";
|
37114 | var rbarr = "⤍";
|
37115 | var rBarr = "⤏";
|
37116 | var RBarr = "⤐";
|
37117 | var rbbrk = "❳";
|
37118 | var rbrace = "}";
|
37119 | var rbrack = "]";
|
37120 | var rbrke = "⦌";
|
37121 | var rbrksld = "⦎";
|
37122 | var rbrkslu = "⦐";
|
37123 | var Rcaron = "Ř";
|
37124 | var rcaron = "ř";
|
37125 | var Rcedil = "Ŗ";
|
37126 | var rcedil = "ŗ";
|
37127 | var rceil = "⌉";
|
37128 | var rcub = "}";
|
37129 | var Rcy = "Р";
|
37130 | var rcy = "р";
|
37131 | var rdca = "⤷";
|
37132 | var rdldhar = "⥩";
|
37133 | var rdquo = "”";
|
37134 | var rdquor = "”";
|
37135 | var rdsh = "↳";
|
37136 | var real = "ℜ";
|
37137 | var realine = "ℛ";
|
37138 | var realpart = "ℜ";
|
37139 | var reals = "ℝ";
|
37140 | var Re = "ℜ";
|
37141 | var rect = "▭";
|
37142 | var reg = "®";
|
37143 | var REG = "®";
|
37144 | var ReverseElement = "∋";
|
37145 | var ReverseEquilibrium = "⇋";
|
37146 | var ReverseUpEquilibrium = "⥯";
|
37147 | var rfisht = "⥽";
|
37148 | var rfloor = "⌋";
|
37149 | var rfr = "𝔯";
|
37150 | var Rfr = "ℜ";
|
37151 | var rHar = "⥤";
|
37152 | var rhard = "⇁";
|
37153 | var rharu = "⇀";
|
37154 | var rharul = "⥬";
|
37155 | var Rho = "Ρ";
|
37156 | var rho = "ρ";
|
37157 | var rhov = "ϱ";
|
37158 | var RightAngleBracket = "⟩";
|
37159 | var RightArrowBar = "⇥";
|
37160 | var rightarrow = "→";
|
37161 | var RightArrow = "→";
|
37162 | var Rightarrow = "⇒";
|
37163 | var RightArrowLeftArrow = "⇄";
|
37164 | var rightarrowtail = "↣";
|
37165 | var RightCeiling = "⌉";
|
37166 | var RightDoubleBracket = "⟧";
|
37167 | var RightDownTeeVector = "⥝";
|
37168 | var RightDownVectorBar = "⥕";
|
37169 | var RightDownVector = "⇂";
|
37170 | var RightFloor = "⌋";
|
37171 | var rightharpoondown = "⇁";
|
37172 | var rightharpoonup = "⇀";
|
37173 | var rightleftarrows = "⇄";
|
37174 | var rightleftharpoons = "⇌";
|
37175 | var rightrightarrows = "⇉";
|
37176 | var rightsquigarrow = "↝";
|
37177 | var RightTeeArrow = "↦";
|
37178 | var RightTee = "⊢";
|
37179 | var RightTeeVector = "⥛";
|
37180 | var rightthreetimes = "⋌";
|
37181 | var RightTriangleBar = "⧐";
|
37182 | var RightTriangle = "⊳";
|
37183 | var RightTriangleEqual = "⊵";
|
37184 | var RightUpDownVector = "⥏";
|
37185 | var RightUpTeeVector = "⥜";
|
37186 | var RightUpVectorBar = "⥔";
|
37187 | var RightUpVector = "↾";
|
37188 | var RightVectorBar = "⥓";
|
37189 | var RightVector = "⇀";
|
37190 | var ring = "˚";
|
37191 | var risingdotseq = "≓";
|
37192 | var rlarr = "⇄";
|
37193 | var rlhar = "⇌";
|
37194 | var rlm = "";
|
37195 | var rmoustache = "⎱";
|
37196 | var rmoust = "⎱";
|
37197 | var rnmid = "⫮";
|
37198 | var roang = "⟭";
|
37199 | var roarr = "⇾";
|
37200 | var robrk = "⟧";
|
37201 | var ropar = "⦆";
|
37202 | var ropf = "𝕣";
|
37203 | var Ropf = "ℝ";
|
37204 | var roplus = "⨮";
|
37205 | var rotimes = "⨵";
|
37206 | var RoundImplies = "⥰";
|
37207 | var rpar = ")";
|
37208 | var rpargt = "⦔";
|
37209 | var rppolint = "⨒";
|
37210 | var rrarr = "⇉";
|
37211 | var Rrightarrow = "⇛";
|
37212 | var rsaquo = "›";
|
37213 | var rscr = "𝓇";
|
37214 | var Rscr = "ℛ";
|
37215 | var rsh = "↱";
|
37216 | var Rsh = "↱";
|
37217 | var rsqb = "]";
|
37218 | var rsquo = "’";
|
37219 | var rsquor = "’";
|
37220 | var rthree = "⋌";
|
37221 | var rtimes = "⋊";
|
37222 | var rtri = "▹";
|
37223 | var rtrie = "⊵";
|
37224 | var rtrif = "▸";
|
37225 | var rtriltri = "⧎";
|
37226 | var RuleDelayed = "⧴";
|
37227 | var ruluhar = "⥨";
|
37228 | var rx = "℞";
|
37229 | var Sacute = "Ś";
|
37230 | var sacute = "ś";
|
37231 | var sbquo = "‚";
|
37232 | var scap = "⪸";
|
37233 | var Scaron = "Š";
|
37234 | var scaron = "š";
|
37235 | var Sc = "⪼";
|
37236 | var sc = "≻";
|
37237 | var sccue = "≽";
|
37238 | var sce = "⪰";
|
37239 | var scE = "⪴";
|
37240 | var Scedil = "Ş";
|
37241 | var scedil = "ş";
|
37242 | var Scirc = "Ŝ";
|
37243 | var scirc = "ŝ";
|
37244 | var scnap = "⪺";
|
37245 | var scnE = "⪶";
|
37246 | var scnsim = "⋩";
|
37247 | var scpolint = "⨓";
|
37248 | var scsim = "≿";
|
37249 | var Scy = "С";
|
37250 | var scy = "с";
|
37251 | var sdotb = "⊡";
|
37252 | var sdot = "⋅";
|
37253 | var sdote = "⩦";
|
37254 | var searhk = "⤥";
|
37255 | var searr = "↘";
|
37256 | var seArr = "⇘";
|
37257 | var searrow = "↘";
|
37258 | var sect = "§";
|
37259 | var semi = ";";
|
37260 | var seswar = "⤩";
|
37261 | var setminus = "∖";
|
37262 | var setmn = "∖";
|
37263 | var sext = "✶";
|
37264 | var Sfr = "𝔖";
|
37265 | var sfr = "𝔰";
|
37266 | var sfrown = "⌢";
|
37267 | var sharp = "♯";
|
37268 | var SHCHcy = "Щ";
|
37269 | var shchcy = "щ";
|
37270 | var SHcy = "Ш";
|
37271 | var shcy = "ш";
|
37272 | var ShortDownArrow = "↓";
|
37273 | var ShortLeftArrow = "←";
|
37274 | var shortmid = "∣";
|
37275 | var shortparallel = "∥";
|
37276 | var ShortRightArrow = "→";
|
37277 | var ShortUpArrow = "↑";
|
37278 | var shy = "";
|
37279 | var Sigma = "Σ";
|
37280 | var sigma = "σ";
|
37281 | var sigmaf = "ς";
|
37282 | var sigmav = "ς";
|
37283 | var sim = "∼";
|
37284 | var simdot = "⩪";
|
37285 | var sime = "≃";
|
37286 | var simeq = "≃";
|
37287 | var simg = "⪞";
|
37288 | var simgE = "⪠";
|
37289 | var siml = "⪝";
|
37290 | var simlE = "⪟";
|
37291 | var simne = "≆";
|
37292 | var simplus = "⨤";
|
37293 | var simrarr = "⥲";
|
37294 | var slarr = "←";
|
37295 | var SmallCircle = "∘";
|
37296 | var smallsetminus = "∖";
|
37297 | var smashp = "⨳";
|
37298 | var smeparsl = "⧤";
|
37299 | var smid = "∣";
|
37300 | var smile = "⌣";
|
37301 | var smt = "⪪";
|
37302 | var smte = "⪬";
|
37303 | var smtes = "⪬︀";
|
37304 | var SOFTcy = "Ь";
|
37305 | var softcy = "ь";
|
37306 | var solbar = "⌿";
|
37307 | var solb = "⧄";
|
37308 | var sol = "/";
|
37309 | var Sopf = "𝕊";
|
37310 | var sopf = "𝕤";
|
37311 | var spades = "♠";
|
37312 | var spadesuit = "♠";
|
37313 | var spar = "∥";
|
37314 | var sqcap = "⊓";
|
37315 | var sqcaps = "⊓︀";
|
37316 | var sqcup = "⊔";
|
37317 | var sqcups = "⊔︀";
|
37318 | var Sqrt = "√";
|
37319 | var sqsub = "⊏";
|
37320 | var sqsube = "⊑";
|
37321 | var sqsubset = "⊏";
|
37322 | var sqsubseteq = "⊑";
|
37323 | var sqsup = "⊐";
|
37324 | var sqsupe = "⊒";
|
37325 | var sqsupset = "⊐";
|
37326 | var sqsupseteq = "⊒";
|
37327 | var square = "□";
|
37328 | var Square = "□";
|
37329 | var SquareIntersection = "⊓";
|
37330 | var SquareSubset = "⊏";
|
37331 | var SquareSubsetEqual = "⊑";
|
37332 | var SquareSuperset = "⊐";
|
37333 | var SquareSupersetEqual = "⊒";
|
37334 | var SquareUnion = "⊔";
|
37335 | var squarf = "▪";
|
37336 | var squ = "□";
|
37337 | var squf = "▪";
|
37338 | var srarr = "→";
|
37339 | var Sscr = "𝒮";
|
37340 | var sscr = "𝓈";
|
37341 | var ssetmn = "∖";
|
37342 | var ssmile = "⌣";
|
37343 | var sstarf = "⋆";
|
37344 | var Star = "⋆";
|
37345 | var star = "☆";
|
37346 | var starf = "★";
|
37347 | var straightepsilon = "ϵ";
|
37348 | var straightphi = "ϕ";
|
37349 | var strns = "¯";
|
37350 | var sub = "⊂";
|
37351 | var Sub = "⋐";
|
37352 | var subdot = "⪽";
|
37353 | var subE = "⫅";
|
37354 | var sube = "⊆";
|
37355 | var subedot = "⫃";
|
37356 | var submult = "⫁";
|
37357 | var subnE = "⫋";
|
37358 | var subne = "⊊";
|
37359 | var subplus = "⪿";
|
37360 | var subrarr = "⥹";
|
37361 | var subset = "⊂";
|
37362 | var Subset = "⋐";
|
37363 | var subseteq = "⊆";
|
37364 | var subseteqq = "⫅";
|
37365 | var SubsetEqual = "⊆";
|
37366 | var subsetneq = "⊊";
|
37367 | var subsetneqq = "⫋";
|
37368 | var subsim = "⫇";
|
37369 | var subsub = "⫕";
|
37370 | var subsup = "⫓";
|
37371 | var succapprox = "⪸";
|
37372 | var succ = "≻";
|
37373 | var succcurlyeq = "≽";
|
37374 | var Succeeds = "≻";
|
37375 | var SucceedsEqual = "⪰";
|
37376 | var SucceedsSlantEqual = "≽";
|
37377 | var SucceedsTilde = "≿";
|
37378 | var succeq = "⪰";
|
37379 | var succnapprox = "⪺";
|
37380 | var succneqq = "⪶";
|
37381 | var succnsim = "⋩";
|
37382 | var succsim = "≿";
|
37383 | var SuchThat = "∋";
|
37384 | var sum = "∑";
|
37385 | var Sum = "∑";
|
37386 | var sung = "♪";
|
37387 | var sup1 = "¹";
|
37388 | var sup2 = "²";
|
37389 | var sup3 = "³";
|
37390 | var sup = "⊃";
|
37391 | var Sup = "⋑";
|
37392 | var supdot = "⪾";
|
37393 | var supdsub = "⫘";
|
37394 | var supE = "⫆";
|
37395 | var supe = "⊇";
|
37396 | var supedot = "⫄";
|
37397 | var Superset = "⊃";
|
37398 | var SupersetEqual = "⊇";
|
37399 | var suphsol = "⟉";
|
37400 | var suphsub = "⫗";
|
37401 | var suplarr = "⥻";
|
37402 | var supmult = "⫂";
|
37403 | var supnE = "⫌";
|
37404 | var supne = "⊋";
|
37405 | var supplus = "⫀";
|
37406 | var supset = "⊃";
|
37407 | var Supset = "⋑";
|
37408 | var supseteq = "⊇";
|
37409 | var supseteqq = "⫆";
|
37410 | var supsetneq = "⊋";
|
37411 | var supsetneqq = "⫌";
|
37412 | var supsim = "⫈";
|
37413 | var supsub = "⫔";
|
37414 | var supsup = "⫖";
|
37415 | var swarhk = "⤦";
|
37416 | var swarr = "↙";
|
37417 | var swArr = "⇙";
|
37418 | var swarrow = "↙";
|
37419 | var swnwar = "⤪";
|
37420 | var szlig = "ß";
|
37421 | var Tab = "\t";
|
37422 | var target$1 = "⌖";
|
37423 | var Tau = "Τ";
|
37424 | var tau = "τ";
|
37425 | var tbrk = "⎴";
|
37426 | var Tcaron = "Ť";
|
37427 | var tcaron = "ť";
|
37428 | var Tcedil = "Ţ";
|
37429 | var tcedil = "ţ";
|
37430 | var Tcy = "Т";
|
37431 | var tcy = "т";
|
37432 | var tdot = "⃛";
|
37433 | var telrec = "⌕";
|
37434 | var Tfr = "𝔗";
|
37435 | var tfr = "𝔱";
|
37436 | var there4 = "∴";
|
37437 | var therefore = "∴";
|
37438 | var Therefore = "∴";
|
37439 | var Theta = "Θ";
|
37440 | var theta = "θ";
|
37441 | var thetasym = "ϑ";
|
37442 | var thetav = "ϑ";
|
37443 | var thickapprox = "≈";
|
37444 | var thicksim = "∼";
|
37445 | var ThickSpace = " ";
|
37446 | var ThinSpace = " ";
|
37447 | var thinsp = " ";
|
37448 | var thkap = "≈";
|
37449 | var thksim = "∼";
|
37450 | var THORN = "Þ";
|
37451 | var thorn = "þ";
|
37452 | var tilde = "˜";
|
37453 | var Tilde = "∼";
|
37454 | var TildeEqual = "≃";
|
37455 | var TildeFullEqual = "≅";
|
37456 | var TildeTilde = "≈";
|
37457 | var timesbar = "⨱";
|
37458 | var timesb = "⊠";
|
37459 | var times = "×";
|
37460 | var timesd = "⨰";
|
37461 | var tint = "∭";
|
37462 | var toea = "⤨";
|
37463 | var topbot = "⌶";
|
37464 | var topcir = "⫱";
|
37465 | var top$1 = "⊤";
|
37466 | var Topf = "𝕋";
|
37467 | var topf = "𝕥";
|
37468 | var topfork = "⫚";
|
37469 | var tosa = "⤩";
|
37470 | var tprime = "‴";
|
37471 | var trade = "™";
|
37472 | var TRADE = "™";
|
37473 | var triangle = "▵";
|
37474 | var triangledown = "▿";
|
37475 | var triangleleft = "◃";
|
37476 | var trianglelefteq = "⊴";
|
37477 | var triangleq = "≜";
|
37478 | var triangleright = "▹";
|
37479 | var trianglerighteq = "⊵";
|
37480 | var tridot = "◬";
|
37481 | var trie = "≜";
|
37482 | var triminus = "⨺";
|
37483 | var TripleDot = "⃛";
|
37484 | var triplus = "⨹";
|
37485 | var trisb = "⧍";
|
37486 | var tritime = "⨻";
|
37487 | var trpezium = "⏢";
|
37488 | var Tscr = "𝒯";
|
37489 | var tscr = "𝓉";
|
37490 | var TScy = "Ц";
|
37491 | var tscy = "ц";
|
37492 | var TSHcy = "Ћ";
|
37493 | var tshcy = "ћ";
|
37494 | var Tstrok = "Ŧ";
|
37495 | var tstrok = "ŧ";
|
37496 | var twixt = "≬";
|
37497 | var twoheadleftarrow = "↞";
|
37498 | var twoheadrightarrow = "↠";
|
37499 | var Uacute = "Ú";
|
37500 | var uacute = "ú";
|
37501 | var uarr = "↑";
|
37502 | var Uarr = "↟";
|
37503 | var uArr = "⇑";
|
37504 | var Uarrocir = "⥉";
|
37505 | var Ubrcy = "Ў";
|
37506 | var ubrcy = "ў";
|
37507 | var Ubreve = "Ŭ";
|
37508 | var ubreve = "ŭ";
|
37509 | var Ucirc = "Û";
|
37510 | var ucirc = "û";
|
37511 | var Ucy = "У";
|
37512 | var ucy = "у";
|
37513 | var udarr = "⇅";
|
37514 | var Udblac = "Ű";
|
37515 | var udblac = "ű";
|
37516 | var udhar = "⥮";
|
37517 | var ufisht = "⥾";
|
37518 | var Ufr = "𝔘";
|
37519 | var ufr = "𝔲";
|
37520 | var Ugrave = "Ù";
|
37521 | var ugrave = "ù";
|
37522 | var uHar = "⥣";
|
37523 | var uharl = "↿";
|
37524 | var uharr = "↾";
|
37525 | var uhblk = "▀";
|
37526 | var ulcorn = "⌜";
|
37527 | var ulcorner = "⌜";
|
37528 | var ulcrop = "⌏";
|
37529 | var ultri = "◸";
|
37530 | var Umacr = "Ū";
|
37531 | var umacr = "ū";
|
37532 | var uml = "¨";
|
37533 | var UnderBar = "_";
|
37534 | var UnderBrace = "⏟";
|
37535 | var UnderBracket = "⎵";
|
37536 | var UnderParenthesis = "⏝";
|
37537 | var Union = "⋃";
|
37538 | var UnionPlus = "⊎";
|
37539 | var Uogon = "Ų";
|
37540 | var uogon = "ų";
|
37541 | var Uopf = "𝕌";
|
37542 | var uopf = "𝕦";
|
37543 | var UpArrowBar = "⤒";
|
37544 | var uparrow = "↑";
|
37545 | var UpArrow = "↑";
|
37546 | var Uparrow = "⇑";
|
37547 | var UpArrowDownArrow = "⇅";
|
37548 | var updownarrow = "↕";
|
37549 | var UpDownArrow = "↕";
|
37550 | var Updownarrow = "⇕";
|
37551 | var UpEquilibrium = "⥮";
|
37552 | var upharpoonleft = "↿";
|
37553 | var upharpoonright = "↾";
|
37554 | var uplus = "⊎";
|
37555 | var UpperLeftArrow = "↖";
|
37556 | var UpperRightArrow = "↗";
|
37557 | var upsi = "υ";
|
37558 | var Upsi = "ϒ";
|
37559 | var upsih = "ϒ";
|
37560 | var Upsilon = "Υ";
|
37561 | var upsilon = "υ";
|
37562 | var UpTeeArrow = "↥";
|
37563 | var UpTee = "⊥";
|
37564 | var upuparrows = "⇈";
|
37565 | var urcorn = "⌝";
|
37566 | var urcorner = "⌝";
|
37567 | var urcrop = "⌎";
|
37568 | var Uring = "Ů";
|
37569 | var uring = "ů";
|
37570 | var urtri = "◹";
|
37571 | var Uscr = "𝒰";
|
37572 | var uscr = "𝓊";
|
37573 | var utdot = "⋰";
|
37574 | var Utilde = "Ũ";
|
37575 | var utilde = "ũ";
|
37576 | var utri = "▵";
|
37577 | var utrif = "▴";
|
37578 | var uuarr = "⇈";
|
37579 | var Uuml = "Ü";
|
37580 | var uuml = "ü";
|
37581 | var uwangle = "⦧";
|
37582 | var vangrt = "⦜";
|
37583 | var varepsilon = "ϵ";
|
37584 | var varkappa = "ϰ";
|
37585 | var varnothing = "∅";
|
37586 | var varphi = "ϕ";
|
37587 | var varpi = "ϖ";
|
37588 | var varpropto = "∝";
|
37589 | var varr = "↕";
|
37590 | var vArr = "⇕";
|
37591 | var varrho = "ϱ";
|
37592 | var varsigma = "ς";
|
37593 | var varsubsetneq = "⊊︀";
|
37594 | var varsubsetneqq = "⫋︀";
|
37595 | var varsupsetneq = "⊋︀";
|
37596 | var varsupsetneqq = "⫌︀";
|
37597 | var vartheta = "ϑ";
|
37598 | var vartriangleleft = "⊲";
|
37599 | var vartriangleright = "⊳";
|
37600 | var vBar = "⫨";
|
37601 | var Vbar = "⫫";
|
37602 | var vBarv = "⫩";
|
37603 | var Vcy = "В";
|
37604 | var vcy = "в";
|
37605 | var vdash = "⊢";
|
37606 | var vDash = "⊨";
|
37607 | var Vdash = "⊩";
|
37608 | var VDash = "⊫";
|
37609 | var Vdashl = "⫦";
|
37610 | var veebar = "⊻";
|
37611 | var vee = "∨";
|
37612 | var Vee = "⋁";
|
37613 | var veeeq = "≚";
|
37614 | var vellip = "⋮";
|
37615 | var verbar = "|";
|
37616 | var Verbar = "‖";
|
37617 | var vert = "|";
|
37618 | var Vert = "‖";
|
37619 | var VerticalBar = "∣";
|
37620 | var VerticalLine = "|";
|
37621 | var VerticalSeparator = "❘";
|
37622 | var VerticalTilde = "≀";
|
37623 | var VeryThinSpace = " ";
|
37624 | var Vfr = "𝔙";
|
37625 | var vfr = "𝔳";
|
37626 | var vltri = "⊲";
|
37627 | var vnsub = "⊂⃒";
|
37628 | var vnsup = "⊃⃒";
|
37629 | var Vopf = "𝕍";
|
37630 | var vopf = "𝕧";
|
37631 | var vprop = "∝";
|
37632 | var vrtri = "⊳";
|
37633 | var Vscr = "𝒱";
|
37634 | var vscr = "𝓋";
|
37635 | var vsubnE = "⫋︀";
|
37636 | var vsubne = "⊊︀";
|
37637 | var vsupnE = "⫌︀";
|
37638 | var vsupne = "⊋︀";
|
37639 | var Vvdash = "⊪";
|
37640 | var vzigzag = "⦚";
|
37641 | var Wcirc = "Ŵ";
|
37642 | var wcirc = "ŵ";
|
37643 | var wedbar = "⩟";
|
37644 | var wedge = "∧";
|
37645 | var Wedge = "⋀";
|
37646 | var wedgeq = "≙";
|
37647 | var weierp = "℘";
|
37648 | var Wfr = "𝔚";
|
37649 | var wfr = "𝔴";
|
37650 | var Wopf = "𝕎";
|
37651 | var wopf = "𝕨";
|
37652 | var wp = "℘";
|
37653 | var wr = "≀";
|
37654 | var wreath = "≀";
|
37655 | var Wscr = "𝒲";
|
37656 | var wscr = "𝓌";
|
37657 | var xcap = "⋂";
|
37658 | var xcirc = "◯";
|
37659 | var xcup = "⋃";
|
37660 | var xdtri = "▽";
|
37661 | var Xfr = "𝔛";
|
37662 | var xfr = "𝔵";
|
37663 | var xharr = "⟷";
|
37664 | var xhArr = "⟺";
|
37665 | var Xi = "Ξ";
|
37666 | var xi = "ξ";
|
37667 | var xlarr = "⟵";
|
37668 | var xlArr = "⟸";
|
37669 | var xmap = "⟼";
|
37670 | var xnis = "⋻";
|
37671 | var xodot = "⨀";
|
37672 | var Xopf = "𝕏";
|
37673 | var xopf = "𝕩";
|
37674 | var xoplus = "⨁";
|
37675 | var xotime = "⨂";
|
37676 | var xrarr = "⟶";
|
37677 | var xrArr = "⟹";
|
37678 | var Xscr = "𝒳";
|
37679 | var xscr = "𝓍";
|
37680 | var xsqcup = "⨆";
|
37681 | var xuplus = "⨄";
|
37682 | var xutri = "△";
|
37683 | var xvee = "⋁";
|
37684 | var xwedge = "⋀";
|
37685 | var Yacute = "Ý";
|
37686 | var yacute = "ý";
|
37687 | var YAcy = "Я";
|
37688 | var yacy = "я";
|
37689 | var Ycirc = "Ŷ";
|
37690 | var ycirc = "ŷ";
|
37691 | var Ycy = "Ы";
|
37692 | var ycy = "ы";
|
37693 | var yen = "¥";
|
37694 | var Yfr = "𝔜";
|
37695 | var yfr = "𝔶";
|
37696 | var YIcy = "Ї";
|
37697 | var yicy = "ї";
|
37698 | var Yopf = "𝕐";
|
37699 | var yopf = "𝕪";
|
37700 | var Yscr = "𝒴";
|
37701 | var yscr = "𝓎";
|
37702 | var YUcy = "Ю";
|
37703 | var yucy = "ю";
|
37704 | var yuml = "ÿ";
|
37705 | var Yuml = "Ÿ";
|
37706 | var Zacute = "Ź";
|
37707 | var zacute = "ź";
|
37708 | var Zcaron = "Ž";
|
37709 | var zcaron = "ž";
|
37710 | var Zcy = "З";
|
37711 | var zcy = "з";
|
37712 | var Zdot = "Ż";
|
37713 | var zdot = "ż";
|
37714 | var zeetrf = "ℨ";
|
37715 | var ZeroWidthSpace = "";
|
37716 | var Zeta = "Ζ";
|
37717 | var zeta = "ζ";
|
37718 | var zfr = "𝔷";
|
37719 | var Zfr = "ℨ";
|
37720 | var ZHcy = "Ж";
|
37721 | var zhcy = "ж";
|
37722 | var zigrarr = "⇝";
|
37723 | var zopf = "𝕫";
|
37724 | var Zopf = "ℤ";
|
37725 | var Zscr = "𝒵";
|
37726 | var zscr = "𝓏";
|
37727 | var zwj = "";
|
37728 | var zwnj = "";
|
37729 | var require$$1 = {
|
37730 | Aacute: Aacute,
|
37731 | aacute: aacute,
|
37732 | Abreve: Abreve,
|
37733 | abreve: abreve,
|
37734 | ac: ac,
|
37735 | acd: acd,
|
37736 | acE: acE,
|
37737 | Acirc: Acirc,
|
37738 | acirc: acirc,
|
37739 | acute: acute,
|
37740 | Acy: Acy,
|
37741 | acy: acy,
|
37742 | AElig: AElig,
|
37743 | aelig: aelig,
|
37744 | af: af,
|
37745 | Afr: Afr,
|
37746 | afr: afr,
|
37747 | Agrave: Agrave,
|
37748 | agrave: agrave,
|
37749 | alefsym: alefsym,
|
37750 | aleph: aleph,
|
37751 | Alpha: Alpha,
|
37752 | alpha: alpha,
|
37753 | Amacr: Amacr,
|
37754 | amacr: amacr,
|
37755 | amalg: amalg,
|
37756 | amp: amp,
|
37757 | AMP: AMP,
|
37758 | andand: andand,
|
37759 | And: And,
|
37760 | and: and,
|
37761 | andd: andd,
|
37762 | andslope: andslope,
|
37763 | andv: andv,
|
37764 | ang: ang,
|
37765 | ange: ange,
|
37766 | angle: angle,
|
37767 | angmsdaa: angmsdaa,
|
37768 | angmsdab: angmsdab,
|
37769 | angmsdac: angmsdac,
|
37770 | angmsdad: angmsdad,
|
37771 | angmsdae: angmsdae,
|
37772 | angmsdaf: angmsdaf,
|
37773 | angmsdag: angmsdag,
|
37774 | angmsdah: angmsdah,
|
37775 | angmsd: angmsd,
|
37776 | angrt: angrt,
|
37777 | angrtvb: angrtvb,
|
37778 | angrtvbd: angrtvbd,
|
37779 | angsph: angsph,
|
37780 | angst: angst,
|
37781 | angzarr: angzarr,
|
37782 | Aogon: Aogon,
|
37783 | aogon: aogon,
|
37784 | Aopf: Aopf,
|
37785 | aopf: aopf,
|
37786 | apacir: apacir,
|
37787 | ap: ap,
|
37788 | apE: apE,
|
37789 | ape: ape,
|
37790 | apid: apid,
|
37791 | apos: apos,
|
37792 | ApplyFunction: ApplyFunction,
|
37793 | approx: approx,
|
37794 | approxeq: approxeq,
|
37795 | Aring: Aring,
|
37796 | aring: aring,
|
37797 | Ascr: Ascr,
|
37798 | ascr: ascr,
|
37799 | Assign: Assign,
|
37800 | ast: ast,
|
37801 | asymp: asymp,
|
37802 | asympeq: asympeq,
|
37803 | Atilde: Atilde,
|
37804 | atilde: atilde,
|
37805 | Auml: Auml,
|
37806 | auml: auml,
|
37807 | awconint: awconint,
|
37808 | awint: awint,
|
37809 | backcong: backcong,
|
37810 | backepsilon: backepsilon,
|
37811 | backprime: backprime,
|
37812 | backsim: backsim,
|
37813 | backsimeq: backsimeq,
|
37814 | Backslash: Backslash,
|
37815 | Barv: Barv,
|
37816 | barvee: barvee,
|
37817 | barwed: barwed,
|
37818 | Barwed: Barwed,
|
37819 | barwedge: barwedge,
|
37820 | bbrk: bbrk,
|
37821 | bbrktbrk: bbrktbrk,
|
37822 | bcong: bcong,
|
37823 | Bcy: Bcy,
|
37824 | bcy: bcy,
|
37825 | bdquo: bdquo,
|
37826 | becaus: becaus,
|
37827 | because: because,
|
37828 | Because: Because,
|
37829 | bemptyv: bemptyv,
|
37830 | bepsi: bepsi,
|
37831 | bernou: bernou,
|
37832 | Bernoullis: Bernoullis,
|
37833 | Beta: Beta,
|
37834 | beta: beta,
|
37835 | beth: beth,
|
37836 | between: between,
|
37837 | Bfr: Bfr,
|
37838 | bfr: bfr,
|
37839 | bigcap: bigcap,
|
37840 | bigcirc: bigcirc,
|
37841 | bigcup: bigcup,
|
37842 | bigodot: bigodot,
|
37843 | bigoplus: bigoplus,
|
37844 | bigotimes: bigotimes,
|
37845 | bigsqcup: bigsqcup,
|
37846 | bigstar: bigstar,
|
37847 | bigtriangledown: bigtriangledown,
|
37848 | bigtriangleup: bigtriangleup,
|
37849 | biguplus: biguplus,
|
37850 | bigvee: bigvee,
|
37851 | bigwedge: bigwedge,
|
37852 | bkarow: bkarow,
|
37853 | blacklozenge: blacklozenge,
|
37854 | blacksquare: blacksquare,
|
37855 | blacktriangle: blacktriangle,
|
37856 | blacktriangledown: blacktriangledown,
|
37857 | blacktriangleleft: blacktriangleleft,
|
37858 | blacktriangleright: blacktriangleright,
|
37859 | blank: blank,
|
37860 | blk12: blk12,
|
37861 | blk14: blk14,
|
37862 | blk34: blk34,
|
37863 | block: block,
|
37864 | bne: bne,
|
37865 | bnequiv: bnequiv,
|
37866 | bNot: bNot,
|
37867 | bnot: bnot,
|
37868 | Bopf: Bopf,
|
37869 | bopf: bopf,
|
37870 | bot: bot,
|
37871 | bottom: bottom$1,
|
37872 | bowtie: bowtie,
|
37873 | boxbox: boxbox,
|
37874 | boxdl: boxdl,
|
37875 | boxdL: boxdL,
|
37876 | boxDl: boxDl,
|
37877 | boxDL: boxDL,
|
37878 | boxdr: boxdr,
|
37879 | boxdR: boxdR,
|
37880 | boxDr: boxDr,
|
37881 | boxDR: boxDR,
|
37882 | boxh: boxh,
|
37883 | boxH: boxH,
|
37884 | boxhd: boxhd,
|
37885 | boxHd: boxHd,
|
37886 | boxhD: boxhD,
|
37887 | boxHD: boxHD,
|
37888 | boxhu: boxhu,
|
37889 | boxHu: boxHu,
|
37890 | boxhU: boxhU,
|
37891 | boxHU: boxHU,
|
37892 | boxminus: boxminus,
|
37893 | boxplus: boxplus,
|
37894 | boxtimes: boxtimes,
|
37895 | boxul: boxul,
|
37896 | boxuL: boxuL,
|
37897 | boxUl: boxUl,
|
37898 | boxUL: boxUL,
|
37899 | boxur: boxur,
|
37900 | boxuR: boxuR,
|
37901 | boxUr: boxUr,
|
37902 | boxUR: boxUR,
|
37903 | boxv: boxv,
|
37904 | boxV: boxV,
|
37905 | boxvh: boxvh,
|
37906 | boxvH: boxvH,
|
37907 | boxVh: boxVh,
|
37908 | boxVH: boxVH,
|
37909 | boxvl: boxvl,
|
37910 | boxvL: boxvL,
|
37911 | boxVl: boxVl,
|
37912 | boxVL: boxVL,
|
37913 | boxvr: boxvr,
|
37914 | boxvR: boxvR,
|
37915 | boxVr: boxVr,
|
37916 | boxVR: boxVR,
|
37917 | bprime: bprime,
|
37918 | breve: breve,
|
37919 | Breve: Breve,
|
37920 | brvbar: brvbar,
|
37921 | bscr: bscr,
|
37922 | Bscr: Bscr,
|
37923 | bsemi: bsemi,
|
37924 | bsim: bsim,
|
37925 | bsime: bsime,
|
37926 | bsolb: bsolb,
|
37927 | bsol: bsol,
|
37928 | bsolhsub: bsolhsub,
|
37929 | bull: bull,
|
37930 | bullet: bullet,
|
37931 | bump: bump,
|
37932 | bumpE: bumpE,
|
37933 | bumpe: bumpe,
|
37934 | Bumpeq: Bumpeq,
|
37935 | bumpeq: bumpeq,
|
37936 | Cacute: Cacute,
|
37937 | cacute: cacute,
|
37938 | capand: capand,
|
37939 | capbrcup: capbrcup,
|
37940 | capcap: capcap,
|
37941 | cap: cap,
|
37942 | Cap: Cap,
|
37943 | capcup: capcup,
|
37944 | capdot: capdot,
|
37945 | CapitalDifferentialD: CapitalDifferentialD,
|
37946 | caps: caps,
|
37947 | caret: caret,
|
37948 | caron: caron,
|
37949 | Cayleys: Cayleys,
|
37950 | ccaps: ccaps,
|
37951 | Ccaron: Ccaron,
|
37952 | ccaron: ccaron,
|
37953 | Ccedil: Ccedil,
|
37954 | ccedil: ccedil,
|
37955 | Ccirc: Ccirc,
|
37956 | ccirc: ccirc,
|
37957 | Cconint: Cconint,
|
37958 | ccups: ccups,
|
37959 | ccupssm: ccupssm,
|
37960 | Cdot: Cdot,
|
37961 | cdot: cdot,
|
37962 | cedil: cedil,
|
37963 | Cedilla: Cedilla,
|
37964 | cemptyv: cemptyv,
|
37965 | cent: cent,
|
37966 | centerdot: centerdot,
|
37967 | CenterDot: CenterDot,
|
37968 | cfr: cfr,
|
37969 | Cfr: Cfr,
|
37970 | CHcy: CHcy,
|
37971 | chcy: chcy,
|
37972 | check: check,
|
37973 | checkmark: checkmark,
|
37974 | Chi: Chi,
|
37975 | chi: chi,
|
37976 | circ: circ,
|
37977 | circeq: circeq,
|
37978 | circlearrowleft: circlearrowleft,
|
37979 | circlearrowright: circlearrowright,
|
37980 | circledast: circledast,
|
37981 | circledcirc: circledcirc,
|
37982 | circleddash: circleddash,
|
37983 | CircleDot: CircleDot,
|
37984 | circledR: circledR,
|
37985 | circledS: circledS,
|
37986 | CircleMinus: CircleMinus,
|
37987 | CirclePlus: CirclePlus,
|
37988 | CircleTimes: CircleTimes,
|
37989 | cir: cir,
|
37990 | cirE: cirE,
|
37991 | cire: cire,
|
37992 | cirfnint: cirfnint,
|
37993 | cirmid: cirmid,
|
37994 | cirscir: cirscir,
|
37995 | ClockwiseContourIntegral: ClockwiseContourIntegral,
|
37996 | CloseCurlyDoubleQuote: CloseCurlyDoubleQuote,
|
37997 | CloseCurlyQuote: CloseCurlyQuote,
|
37998 | clubs: clubs,
|
37999 | clubsuit: clubsuit,
|
38000 | colon: colon,
|
38001 | Colon: Colon,
|
38002 | Colone: Colone,
|
38003 | colone: colone,
|
38004 | coloneq: coloneq,
|
38005 | comma: comma,
|
38006 | commat: commat,
|
38007 | comp: comp,
|
38008 | compfn: compfn,
|
38009 | complement: complement,
|
38010 | complexes: complexes,
|
38011 | cong: cong,
|
38012 | congdot: congdot,
|
38013 | Congruent: Congruent,
|
38014 | conint: conint,
|
38015 | Conint: Conint,
|
38016 | ContourIntegral: ContourIntegral,
|
38017 | copf: copf,
|
38018 | Copf: Copf,
|
38019 | coprod: coprod,
|
38020 | Coproduct: Coproduct,
|
38021 | copy: copy$2,
|
38022 | COPY: COPY,
|
38023 | copysr: copysr,
|
38024 | CounterClockwiseContourIntegral: CounterClockwiseContourIntegral,
|
38025 | crarr: crarr,
|
38026 | cross: cross,
|
38027 | Cross: Cross,
|
38028 | Cscr: Cscr,
|
38029 | cscr: cscr,
|
38030 | csub: csub,
|
38031 | csube: csube,
|
38032 | csup: csup,
|
38033 | csupe: csupe,
|
38034 | ctdot: ctdot,
|
38035 | cudarrl: cudarrl,
|
38036 | cudarrr: cudarrr,
|
38037 | cuepr: cuepr,
|
38038 | cuesc: cuesc,
|
38039 | cularr: cularr,
|
38040 | cularrp: cularrp,
|
38041 | cupbrcap: cupbrcap,
|
38042 | cupcap: cupcap,
|
38043 | CupCap: CupCap,
|
38044 | cup: cup,
|
38045 | Cup: Cup,
|
38046 | cupcup: cupcup,
|
38047 | cupdot: cupdot,
|
38048 | cupor: cupor,
|
38049 | cups: cups,
|
38050 | curarr: curarr,
|
38051 | curarrm: curarrm,
|
38052 | curlyeqprec: curlyeqprec,
|
38053 | curlyeqsucc: curlyeqsucc,
|
38054 | curlyvee: curlyvee,
|
38055 | curlywedge: curlywedge,
|
38056 | curren: curren,
|
38057 | curvearrowleft: curvearrowleft,
|
38058 | curvearrowright: curvearrowright,
|
38059 | cuvee: cuvee,
|
38060 | cuwed: cuwed,
|
38061 | cwconint: cwconint,
|
38062 | cwint: cwint,
|
38063 | cylcty: cylcty,
|
38064 | dagger: dagger,
|
38065 | Dagger: Dagger,
|
38066 | daleth: daleth,
|
38067 | darr: darr,
|
38068 | Darr: Darr,
|
38069 | dArr: dArr,
|
38070 | dash: dash,
|
38071 | Dashv: Dashv,
|
38072 | dashv: dashv,
|
38073 | dbkarow: dbkarow,
|
38074 | dblac: dblac,
|
38075 | Dcaron: Dcaron,
|
38076 | dcaron: dcaron,
|
38077 | Dcy: Dcy,
|
38078 | dcy: dcy,
|
38079 | ddagger: ddagger,
|
38080 | ddarr: ddarr,
|
38081 | DD: DD,
|
38082 | dd: dd,
|
38083 | DDotrahd: DDotrahd,
|
38084 | ddotseq: ddotseq,
|
38085 | deg: deg,
|
38086 | Del: Del,
|
38087 | Delta: Delta,
|
38088 | delta: delta,
|
38089 | demptyv: demptyv,
|
38090 | dfisht: dfisht,
|
38091 | Dfr: Dfr,
|
38092 | dfr: dfr,
|
38093 | dHar: dHar,
|
38094 | dharl: dharl,
|
38095 | dharr: dharr,
|
38096 | DiacriticalAcute: DiacriticalAcute,
|
38097 | DiacriticalDot: DiacriticalDot,
|
38098 | DiacriticalDoubleAcute: DiacriticalDoubleAcute,
|
38099 | DiacriticalGrave: DiacriticalGrave,
|
38100 | DiacriticalTilde: DiacriticalTilde,
|
38101 | diam: diam,
|
38102 | diamond: diamond,
|
38103 | Diamond: Diamond,
|
38104 | diamondsuit: diamondsuit,
|
38105 | diams: diams,
|
38106 | die: die,
|
38107 | DifferentialD: DifferentialD,
|
38108 | digamma: digamma,
|
38109 | disin: disin,
|
38110 | div: div,
|
38111 | divide: divide,
|
38112 | divideontimes: divideontimes,
|
38113 | divonx: divonx,
|
38114 | DJcy: DJcy,
|
38115 | djcy: djcy,
|
38116 | dlcorn: dlcorn,
|
38117 | dlcrop: dlcrop,
|
38118 | dollar: dollar,
|
38119 | Dopf: Dopf,
|
38120 | dopf: dopf,
|
38121 | Dot: Dot,
|
38122 | dot: dot,
|
38123 | DotDot: DotDot,
|
38124 | doteq: doteq,
|
38125 | doteqdot: doteqdot,
|
38126 | DotEqual: DotEqual,
|
38127 | dotminus: dotminus,
|
38128 | dotplus: dotplus,
|
38129 | dotsquare: dotsquare,
|
38130 | doublebarwedge: doublebarwedge,
|
38131 | DoubleContourIntegral: DoubleContourIntegral,
|
38132 | DoubleDot: DoubleDot,
|
38133 | DoubleDownArrow: DoubleDownArrow,
|
38134 | DoubleLeftArrow: DoubleLeftArrow,
|
38135 | DoubleLeftRightArrow: DoubleLeftRightArrow,
|
38136 | DoubleLeftTee: DoubleLeftTee,
|
38137 | DoubleLongLeftArrow: DoubleLongLeftArrow,
|
38138 | DoubleLongLeftRightArrow: DoubleLongLeftRightArrow,
|
38139 | DoubleLongRightArrow: DoubleLongRightArrow,
|
38140 | DoubleRightArrow: DoubleRightArrow,
|
38141 | DoubleRightTee: DoubleRightTee,
|
38142 | DoubleUpArrow: DoubleUpArrow,
|
38143 | DoubleUpDownArrow: DoubleUpDownArrow,
|
38144 | DoubleVerticalBar: DoubleVerticalBar,
|
38145 | DownArrowBar: DownArrowBar,
|
38146 | downarrow: downarrow,
|
38147 | DownArrow: DownArrow,
|
38148 | Downarrow: Downarrow,
|
38149 | DownArrowUpArrow: DownArrowUpArrow,
|
38150 | DownBreve: DownBreve,
|
38151 | downdownarrows: downdownarrows,
|
38152 | downharpoonleft: downharpoonleft,
|
38153 | downharpoonright: downharpoonright,
|
38154 | DownLeftRightVector: DownLeftRightVector,
|
38155 | DownLeftTeeVector: DownLeftTeeVector,
|
38156 | DownLeftVectorBar: DownLeftVectorBar,
|
38157 | DownLeftVector: DownLeftVector,
|
38158 | DownRightTeeVector: DownRightTeeVector,
|
38159 | DownRightVectorBar: DownRightVectorBar,
|
38160 | DownRightVector: DownRightVector,
|
38161 | DownTeeArrow: DownTeeArrow,
|
38162 | DownTee: DownTee,
|
38163 | drbkarow: drbkarow,
|
38164 | drcorn: drcorn,
|
38165 | drcrop: drcrop,
|
38166 | Dscr: Dscr,
|
38167 | dscr: dscr,
|
38168 | DScy: DScy,
|
38169 | dscy: dscy,
|
38170 | dsol: dsol,
|
38171 | Dstrok: Dstrok,
|
38172 | dstrok: dstrok,
|
38173 | dtdot: dtdot,
|
38174 | dtri: dtri,
|
38175 | dtrif: dtrif,
|
38176 | duarr: duarr,
|
38177 | duhar: duhar,
|
38178 | dwangle: dwangle,
|
38179 | DZcy: DZcy,
|
38180 | dzcy: dzcy,
|
38181 | dzigrarr: dzigrarr,
|
38182 | Eacute: Eacute,
|
38183 | eacute: eacute,
|
38184 | easter: easter,
|
38185 | Ecaron: Ecaron,
|
38186 | ecaron: ecaron,
|
38187 | Ecirc: Ecirc,
|
38188 | ecirc: ecirc,
|
38189 | ecir: ecir,
|
38190 | ecolon: ecolon,
|
38191 | Ecy: Ecy,
|
38192 | ecy: ecy,
|
38193 | eDDot: eDDot,
|
38194 | Edot: Edot,
|
38195 | edot: edot,
|
38196 | eDot: eDot,
|
38197 | ee: ee,
|
38198 | efDot: efDot,
|
38199 | Efr: Efr,
|
38200 | efr: efr,
|
38201 | eg: eg,
|
38202 | Egrave: Egrave,
|
38203 | egrave: egrave,
|
38204 | egs: egs,
|
38205 | egsdot: egsdot,
|
38206 | el: el,
|
38207 | Element: Element,
|
38208 | elinters: elinters,
|
38209 | ell: ell,
|
38210 | els: els,
|
38211 | elsdot: elsdot,
|
38212 | Emacr: Emacr,
|
38213 | emacr: emacr,
|
38214 | empty: empty,
|
38215 | emptyset: emptyset,
|
38216 | EmptySmallSquare: EmptySmallSquare,
|
38217 | emptyv: emptyv,
|
38218 | EmptyVerySmallSquare: EmptyVerySmallSquare,
|
38219 | emsp13: emsp13,
|
38220 | emsp14: emsp14,
|
38221 | emsp: emsp,
|
38222 | ENG: ENG,
|
38223 | eng: eng,
|
38224 | ensp: ensp,
|
38225 | Eogon: Eogon,
|
38226 | eogon: eogon,
|
38227 | Eopf: Eopf,
|
38228 | eopf: eopf,
|
38229 | epar: epar,
|
38230 | eparsl: eparsl,
|
38231 | eplus: eplus,
|
38232 | epsi: epsi,
|
38233 | Epsilon: Epsilon,
|
38234 | epsilon: epsilon,
|
38235 | epsiv: epsiv,
|
38236 | eqcirc: eqcirc,
|
38237 | eqcolon: eqcolon,
|
38238 | eqsim: eqsim,
|
38239 | eqslantgtr: eqslantgtr,
|
38240 | eqslantless: eqslantless,
|
38241 | Equal: Equal,
|
38242 | equals: equals,
|
38243 | EqualTilde: EqualTilde,
|
38244 | equest: equest,
|
38245 | Equilibrium: Equilibrium,
|
38246 | equiv: equiv,
|
38247 | equivDD: equivDD,
|
38248 | eqvparsl: eqvparsl,
|
38249 | erarr: erarr,
|
38250 | erDot: erDot,
|
38251 | escr: escr,
|
38252 | Escr: Escr,
|
38253 | esdot: esdot,
|
38254 | Esim: Esim,
|
38255 | esim: esim,
|
38256 | Eta: Eta,
|
38257 | eta: eta,
|
38258 | ETH: ETH,
|
38259 | eth: eth,
|
38260 | Euml: Euml,
|
38261 | euml: euml,
|
38262 | euro: euro,
|
38263 | excl: excl,
|
38264 | exist: exist,
|
38265 | Exists: Exists,
|
38266 | expectation: expectation,
|
38267 | exponentiale: exponentiale,
|
38268 | ExponentialE: ExponentialE,
|
38269 | fallingdotseq: fallingdotseq,
|
38270 | Fcy: Fcy,
|
38271 | fcy: fcy,
|
38272 | female: female,
|
38273 | ffilig: ffilig,
|
38274 | fflig: fflig,
|
38275 | ffllig: ffllig,
|
38276 | Ffr: Ffr,
|
38277 | ffr: ffr,
|
38278 | filig: filig,
|
38279 | FilledSmallSquare: FilledSmallSquare,
|
38280 | FilledVerySmallSquare: FilledVerySmallSquare,
|
38281 | fjlig: fjlig,
|
38282 | flat: flat,
|
38283 | fllig: fllig,
|
38284 | fltns: fltns,
|
38285 | fnof: fnof,
|
38286 | Fopf: Fopf,
|
38287 | fopf: fopf,
|
38288 | forall: forall,
|
38289 | ForAll: ForAll,
|
38290 | fork: fork,
|
38291 | forkv: forkv,
|
38292 | Fouriertrf: Fouriertrf,
|
38293 | fpartint: fpartint,
|
38294 | frac12: frac12,
|
38295 | frac13: frac13,
|
38296 | frac14: frac14,
|
38297 | frac15: frac15,
|
38298 | frac16: frac16,
|
38299 | frac18: frac18,
|
38300 | frac23: frac23,
|
38301 | frac25: frac25,
|
38302 | frac34: frac34,
|
38303 | frac35: frac35,
|
38304 | frac38: frac38,
|
38305 | frac45: frac45,
|
38306 | frac56: frac56,
|
38307 | frac58: frac58,
|
38308 | frac78: frac78,
|
38309 | frasl: frasl,
|
38310 | frown: frown,
|
38311 | fscr: fscr,
|
38312 | Fscr: Fscr,
|
38313 | gacute: gacute,
|
38314 | Gamma: Gamma,
|
38315 | gamma: gamma,
|
38316 | Gammad: Gammad,
|
38317 | gammad: gammad,
|
38318 | gap: gap$1,
|
38319 | Gbreve: Gbreve,
|
38320 | gbreve: gbreve,
|
38321 | Gcedil: Gcedil,
|
38322 | Gcirc: Gcirc,
|
38323 | gcirc: gcirc,
|
38324 | Gcy: Gcy,
|
38325 | gcy: gcy,
|
38326 | Gdot: Gdot,
|
38327 | gdot: gdot,
|
38328 | ge: ge,
|
38329 | gE: gE,
|
38330 | gEl: gEl,
|
38331 | gel: gel,
|
38332 | geq: geq,
|
38333 | geqq: geqq,
|
38334 | geqslant: geqslant,
|
38335 | gescc: gescc,
|
38336 | ges: ges,
|
38337 | gesdot: gesdot,
|
38338 | gesdoto: gesdoto,
|
38339 | gesdotol: gesdotol,
|
38340 | gesl: gesl,
|
38341 | gesles: gesles,
|
38342 | Gfr: Gfr,
|
38343 | gfr: gfr,
|
38344 | gg: gg,
|
38345 | Gg: Gg,
|
38346 | ggg: ggg,
|
38347 | gimel: gimel,
|
38348 | GJcy: GJcy,
|
38349 | gjcy: gjcy,
|
38350 | gla: gla,
|
38351 | gl: gl,
|
38352 | glE: glE,
|
38353 | glj: glj,
|
38354 | gnap: gnap,
|
38355 | gnapprox: gnapprox,
|
38356 | gne: gne,
|
38357 | gnE: gnE,
|
38358 | gneq: gneq,
|
38359 | gneqq: gneqq,
|
38360 | gnsim: gnsim,
|
38361 | Gopf: Gopf,
|
38362 | gopf: gopf,
|
38363 | grave: grave,
|
38364 | GreaterEqual: GreaterEqual,
|
38365 | GreaterEqualLess: GreaterEqualLess,
|
38366 | GreaterFullEqual: GreaterFullEqual,
|
38367 | GreaterGreater: GreaterGreater,
|
38368 | GreaterLess: GreaterLess,
|
38369 | GreaterSlantEqual: GreaterSlantEqual,
|
38370 | GreaterTilde: GreaterTilde,
|
38371 | Gscr: Gscr,
|
38372 | gscr: gscr,
|
38373 | gsim: gsim,
|
38374 | gsime: gsime,
|
38375 | gsiml: gsiml,
|
38376 | gtcc: gtcc,
|
38377 | gtcir: gtcir,
|
38378 | gt: gt,
|
38379 | GT: GT,
|
38380 | Gt: Gt,
|
38381 | gtdot: gtdot,
|
38382 | gtlPar: gtlPar,
|
38383 | gtquest: gtquest,
|
38384 | gtrapprox: gtrapprox,
|
38385 | gtrarr: gtrarr,
|
38386 | gtrdot: gtrdot,
|
38387 | gtreqless: gtreqless,
|
38388 | gtreqqless: gtreqqless,
|
38389 | gtrless: gtrless,
|
38390 | gtrsim: gtrsim,
|
38391 | gvertneqq: gvertneqq,
|
38392 | gvnE: gvnE,
|
38393 | Hacek: Hacek,
|
38394 | hairsp: hairsp,
|
38395 | half: half,
|
38396 | hamilt: hamilt,
|
38397 | HARDcy: HARDcy,
|
38398 | hardcy: hardcy,
|
38399 | harrcir: harrcir,
|
38400 | harr: harr,
|
38401 | hArr: hArr,
|
38402 | harrw: harrw,
|
38403 | Hat: Hat,
|
38404 | hbar: hbar,
|
38405 | Hcirc: Hcirc,
|
38406 | hcirc: hcirc,
|
38407 | hearts: hearts,
|
38408 | heartsuit: heartsuit,
|
38409 | hellip: hellip,
|
38410 | hercon: hercon,
|
38411 | hfr: hfr,
|
38412 | Hfr: Hfr,
|
38413 | HilbertSpace: HilbertSpace,
|
38414 | hksearow: hksearow,
|
38415 | hkswarow: hkswarow,
|
38416 | hoarr: hoarr,
|
38417 | homtht: homtht,
|
38418 | hookleftarrow: hookleftarrow,
|
38419 | hookrightarrow: hookrightarrow,
|
38420 | hopf: hopf,
|
38421 | Hopf: Hopf,
|
38422 | horbar: horbar,
|
38423 | HorizontalLine: HorizontalLine,
|
38424 | hscr: hscr,
|
38425 | Hscr: Hscr,
|
38426 | hslash: hslash,
|
38427 | Hstrok: Hstrok,
|
38428 | hstrok: hstrok,
|
38429 | HumpDownHump: HumpDownHump,
|
38430 | HumpEqual: HumpEqual,
|
38431 | hybull: hybull,
|
38432 | hyphen: hyphen,
|
38433 | Iacute: Iacute,
|
38434 | iacute: iacute,
|
38435 | ic: ic,
|
38436 | Icirc: Icirc,
|
38437 | icirc: icirc,
|
38438 | Icy: Icy,
|
38439 | icy: icy,
|
38440 | Idot: Idot,
|
38441 | IEcy: IEcy,
|
38442 | iecy: iecy,
|
38443 | iexcl: iexcl,
|
38444 | iff: iff,
|
38445 | ifr: ifr,
|
38446 | Ifr: Ifr,
|
38447 | Igrave: Igrave,
|
38448 | igrave: igrave,
|
38449 | ii: ii,
|
38450 | iiiint: iiiint,
|
38451 | iiint: iiint,
|
38452 | iinfin: iinfin,
|
38453 | iiota: iiota,
|
38454 | IJlig: IJlig,
|
38455 | ijlig: ijlig,
|
38456 | Imacr: Imacr,
|
38457 | imacr: imacr,
|
38458 | image: image$1,
|
38459 | ImaginaryI: ImaginaryI,
|
38460 | imagline: imagline,
|
38461 | imagpart: imagpart,
|
38462 | imath: imath,
|
38463 | Im: Im,
|
38464 | imof: imof,
|
38465 | imped: imped,
|
38466 | Implies: Implies,
|
38467 | incare: incare,
|
38468 | "in": "∈",
|
38469 | infin: infin,
|
38470 | infintie: infintie,
|
38471 | inodot: inodot,
|
38472 | intcal: intcal,
|
38473 | int: int,
|
38474 | Int: Int,
|
38475 | integers: integers,
|
38476 | Integral: Integral,
|
38477 | intercal: intercal,
|
38478 | Intersection: Intersection,
|
38479 | intlarhk: intlarhk,
|
38480 | intprod: intprod,
|
38481 | InvisibleComma: InvisibleComma,
|
38482 | InvisibleTimes: InvisibleTimes,
|
38483 | IOcy: IOcy,
|
38484 | iocy: iocy,
|
38485 | Iogon: Iogon,
|
38486 | iogon: iogon,
|
38487 | Iopf: Iopf,
|
38488 | iopf: iopf,
|
38489 | Iota: Iota,
|
38490 | iota: iota,
|
38491 | iprod: iprod,
|
38492 | iquest: iquest,
|
38493 | iscr: iscr,
|
38494 | Iscr: Iscr,
|
38495 | isin: isin,
|
38496 | isindot: isindot,
|
38497 | isinE: isinE,
|
38498 | isins: isins,
|
38499 | isinsv: isinsv,
|
38500 | isinv: isinv,
|
38501 | it: it,
|
38502 | Itilde: Itilde,
|
38503 | itilde: itilde,
|
38504 | Iukcy: Iukcy,
|
38505 | iukcy: iukcy,
|
38506 | Iuml: Iuml,
|
38507 | iuml: iuml,
|
38508 | Jcirc: Jcirc,
|
38509 | jcirc: jcirc,
|
38510 | Jcy: Jcy,
|
38511 | jcy: jcy,
|
38512 | Jfr: Jfr,
|
38513 | jfr: jfr,
|
38514 | jmath: jmath,
|
38515 | Jopf: Jopf,
|
38516 | jopf: jopf,
|
38517 | Jscr: Jscr,
|
38518 | jscr: jscr,
|
38519 | Jsercy: Jsercy,
|
38520 | jsercy: jsercy,
|
38521 | Jukcy: Jukcy,
|
38522 | jukcy: jukcy,
|
38523 | Kappa: Kappa,
|
38524 | kappa: kappa,
|
38525 | kappav: kappav,
|
38526 | Kcedil: Kcedil,
|
38527 | kcedil: kcedil,
|
38528 | Kcy: Kcy,
|
38529 | kcy: kcy,
|
38530 | Kfr: Kfr,
|
38531 | kfr: kfr,
|
38532 | kgreen: kgreen,
|
38533 | KHcy: KHcy,
|
38534 | khcy: khcy,
|
38535 | KJcy: KJcy,
|
38536 | kjcy: kjcy,
|
38537 | Kopf: Kopf,
|
38538 | kopf: kopf,
|
38539 | Kscr: Kscr,
|
38540 | kscr: kscr,
|
38541 | lAarr: lAarr,
|
38542 | Lacute: Lacute,
|
38543 | lacute: lacute,
|
38544 | laemptyv: laemptyv,
|
38545 | lagran: lagran,
|
38546 | Lambda: Lambda,
|
38547 | lambda: lambda,
|
38548 | lang: lang$1,
|
38549 | Lang: Lang,
|
38550 | langd: langd,
|
38551 | langle: langle,
|
38552 | lap: lap,
|
38553 | Laplacetrf: Laplacetrf,
|
38554 | laquo: laquo,
|
38555 | larrb: larrb,
|
38556 | larrbfs: larrbfs,
|
38557 | larr: larr,
|
38558 | Larr: Larr,
|
38559 | lArr: lArr,
|
38560 | larrfs: larrfs,
|
38561 | larrhk: larrhk,
|
38562 | larrlp: larrlp,
|
38563 | larrpl: larrpl,
|
38564 | larrsim: larrsim,
|
38565 | larrtl: larrtl,
|
38566 | latail: latail,
|
38567 | lAtail: lAtail,
|
38568 | lat: lat,
|
38569 | late: late,
|
38570 | lates: lates,
|
38571 | lbarr: lbarr,
|
38572 | lBarr: lBarr,
|
38573 | lbbrk: lbbrk,
|
38574 | lbrace: lbrace,
|
38575 | lbrack: lbrack,
|
38576 | lbrke: lbrke,
|
38577 | lbrksld: lbrksld,
|
38578 | lbrkslu: lbrkslu,
|
38579 | Lcaron: Lcaron,
|
38580 | lcaron: lcaron,
|
38581 | Lcedil: Lcedil,
|
38582 | lcedil: lcedil,
|
38583 | lceil: lceil,
|
38584 | lcub: lcub,
|
38585 | Lcy: Lcy,
|
38586 | lcy: lcy,
|
38587 | ldca: ldca,
|
38588 | ldquo: ldquo,
|
38589 | ldquor: ldquor,
|
38590 | ldrdhar: ldrdhar,
|
38591 | ldrushar: ldrushar,
|
38592 | ldsh: ldsh,
|
38593 | le: le,
|
38594 | lE: lE,
|
38595 | LeftAngleBracket: LeftAngleBracket,
|
38596 | LeftArrowBar: LeftArrowBar,
|
38597 | leftarrow: leftarrow,
|
38598 | LeftArrow: LeftArrow,
|
38599 | Leftarrow: Leftarrow,
|
38600 | LeftArrowRightArrow: LeftArrowRightArrow,
|
38601 | leftarrowtail: leftarrowtail,
|
38602 | LeftCeiling: LeftCeiling,
|
38603 | LeftDoubleBracket: LeftDoubleBracket,
|
38604 | LeftDownTeeVector: LeftDownTeeVector,
|
38605 | LeftDownVectorBar: LeftDownVectorBar,
|
38606 | LeftDownVector: LeftDownVector,
|
38607 | LeftFloor: LeftFloor,
|
38608 | leftharpoondown: leftharpoondown,
|
38609 | leftharpoonup: leftharpoonup,
|
38610 | leftleftarrows: leftleftarrows,
|
38611 | leftrightarrow: leftrightarrow,
|
38612 | LeftRightArrow: LeftRightArrow,
|
38613 | Leftrightarrow: Leftrightarrow,
|
38614 | leftrightarrows: leftrightarrows,
|
38615 | leftrightharpoons: leftrightharpoons,
|
38616 | leftrightsquigarrow: leftrightsquigarrow,
|
38617 | LeftRightVector: LeftRightVector,
|
38618 | LeftTeeArrow: LeftTeeArrow,
|
38619 | LeftTee: LeftTee,
|
38620 | LeftTeeVector: LeftTeeVector,
|
38621 | leftthreetimes: leftthreetimes,
|
38622 | LeftTriangleBar: LeftTriangleBar,
|
38623 | LeftTriangle: LeftTriangle,
|
38624 | LeftTriangleEqual: LeftTriangleEqual,
|
38625 | LeftUpDownVector: LeftUpDownVector,
|
38626 | LeftUpTeeVector: LeftUpTeeVector,
|
38627 | LeftUpVectorBar: LeftUpVectorBar,
|
38628 | LeftUpVector: LeftUpVector,
|
38629 | LeftVectorBar: LeftVectorBar,
|
38630 | LeftVector: LeftVector,
|
38631 | lEg: lEg,
|
38632 | leg: leg,
|
38633 | leq: leq,
|
38634 | leqq: leqq,
|
38635 | leqslant: leqslant,
|
38636 | lescc: lescc,
|
38637 | les: les,
|
38638 | lesdot: lesdot,
|
38639 | lesdoto: lesdoto,
|
38640 | lesdotor: lesdotor,
|
38641 | lesg: lesg,
|
38642 | lesges: lesges,
|
38643 | lessapprox: lessapprox,
|
38644 | lessdot: lessdot,
|
38645 | lesseqgtr: lesseqgtr,
|
38646 | lesseqqgtr: lesseqqgtr,
|
38647 | LessEqualGreater: LessEqualGreater,
|
38648 | LessFullEqual: LessFullEqual,
|
38649 | LessGreater: LessGreater,
|
38650 | lessgtr: lessgtr,
|
38651 | LessLess: LessLess,
|
38652 | lesssim: lesssim,
|
38653 | LessSlantEqual: LessSlantEqual,
|
38654 | LessTilde: LessTilde,
|
38655 | lfisht: lfisht,
|
38656 | lfloor: lfloor,
|
38657 | Lfr: Lfr,
|
38658 | lfr: lfr,
|
38659 | lg: lg,
|
38660 | lgE: lgE,
|
38661 | lHar: lHar,
|
38662 | lhard: lhard,
|
38663 | lharu: lharu,
|
38664 | lharul: lharul,
|
38665 | lhblk: lhblk,
|
38666 | LJcy: LJcy,
|
38667 | ljcy: ljcy,
|
38668 | llarr: llarr,
|
38669 | ll: ll,
|
38670 | Ll: Ll,
|
38671 | llcorner: llcorner,
|
38672 | Lleftarrow: Lleftarrow,
|
38673 | llhard: llhard,
|
38674 | lltri: lltri,
|
38675 | Lmidot: Lmidot,
|
38676 | lmidot: lmidot,
|
38677 | lmoustache: lmoustache,
|
38678 | lmoust: lmoust,
|
38679 | lnap: lnap,
|
38680 | lnapprox: lnapprox,
|
38681 | lne: lne,
|
38682 | lnE: lnE,
|
38683 | lneq: lneq,
|
38684 | lneqq: lneqq,
|
38685 | lnsim: lnsim,
|
38686 | loang: loang,
|
38687 | loarr: loarr,
|
38688 | lobrk: lobrk,
|
38689 | longleftarrow: longleftarrow,
|
38690 | LongLeftArrow: LongLeftArrow,
|
38691 | Longleftarrow: Longleftarrow,
|
38692 | longleftrightarrow: longleftrightarrow,
|
38693 | LongLeftRightArrow: LongLeftRightArrow,
|
38694 | Longleftrightarrow: Longleftrightarrow,
|
38695 | longmapsto: longmapsto,
|
38696 | longrightarrow: longrightarrow,
|
38697 | LongRightArrow: LongRightArrow,
|
38698 | Longrightarrow: Longrightarrow,
|
38699 | looparrowleft: looparrowleft,
|
38700 | looparrowright: looparrowright,
|
38701 | lopar: lopar,
|
38702 | Lopf: Lopf,
|
38703 | lopf: lopf,
|
38704 | loplus: loplus,
|
38705 | lotimes: lotimes,
|
38706 | lowast: lowast,
|
38707 | lowbar: lowbar,
|
38708 | LowerLeftArrow: LowerLeftArrow,
|
38709 | LowerRightArrow: LowerRightArrow,
|
38710 | loz: loz,
|
38711 | lozenge: lozenge,
|
38712 | lozf: lozf,
|
38713 | lpar: lpar,
|
38714 | lparlt: lparlt,
|
38715 | lrarr: lrarr,
|
38716 | lrcorner: lrcorner,
|
38717 | lrhar: lrhar,
|
38718 | lrhard: lrhard,
|
38719 | lrm: lrm,
|
38720 | lrtri: lrtri,
|
38721 | lsaquo: lsaquo,
|
38722 | lscr: lscr,
|
38723 | Lscr: Lscr,
|
38724 | lsh: lsh,
|
38725 | Lsh: Lsh,
|
38726 | lsim: lsim,
|
38727 | lsime: lsime,
|
38728 | lsimg: lsimg,
|
38729 | lsqb: lsqb,
|
38730 | lsquo: lsquo,
|
38731 | lsquor: lsquor,
|
38732 | Lstrok: Lstrok,
|
38733 | lstrok: lstrok,
|
38734 | ltcc: ltcc,
|
38735 | ltcir: ltcir,
|
38736 | lt: lt,
|
38737 | LT: LT,
|
38738 | Lt: Lt,
|
38739 | ltdot: ltdot,
|
38740 | lthree: lthree,
|
38741 | ltimes: ltimes,
|
38742 | ltlarr: ltlarr,
|
38743 | ltquest: ltquest,
|
38744 | ltri: ltri,
|
38745 | ltrie: ltrie,
|
38746 | ltrif: ltrif,
|
38747 | ltrPar: ltrPar,
|
38748 | lurdshar: lurdshar,
|
38749 | luruhar: luruhar,
|
38750 | lvertneqq: lvertneqq,
|
38751 | lvnE: lvnE,
|
38752 | macr: macr,
|
38753 | male: male,
|
38754 | malt: malt,
|
38755 | maltese: maltese,
|
38756 | "Map": "⤅",
|
38757 | map: map,
|
38758 | mapsto: mapsto,
|
38759 | mapstodown: mapstodown,
|
38760 | mapstoleft: mapstoleft,
|
38761 | mapstoup: mapstoup,
|
38762 | marker: marker,
|
38763 | mcomma: mcomma,
|
38764 | Mcy: Mcy,
|
38765 | mcy: mcy,
|
38766 | mdash: mdash,
|
38767 | mDDot: mDDot,
|
38768 | measuredangle: measuredangle,
|
38769 | MediumSpace: MediumSpace,
|
38770 | Mellintrf: Mellintrf,
|
38771 | Mfr: Mfr,
|
38772 | mfr: mfr,
|
38773 | mho: mho,
|
38774 | micro: micro,
|
38775 | midast: midast,
|
38776 | midcir: midcir,
|
38777 | mid: mid,
|
38778 | middot: middot,
|
38779 | minusb: minusb,
|
38780 | minus: minus,
|
38781 | minusd: minusd,
|
38782 | minusdu: minusdu,
|
38783 | MinusPlus: MinusPlus,
|
38784 | mlcp: mlcp,
|
38785 | mldr: mldr,
|
38786 | mnplus: mnplus,
|
38787 | models: models,
|
38788 | Mopf: Mopf,
|
38789 | mopf: mopf,
|
38790 | mp: mp,
|
38791 | mscr: mscr,
|
38792 | Mscr: Mscr,
|
38793 | mstpos: mstpos,
|
38794 | Mu: Mu,
|
38795 | mu: mu,
|
38796 | multimap: multimap,
|
38797 | mumap: mumap,
|
38798 | nabla: nabla,
|
38799 | Nacute: Nacute,
|
38800 | nacute: nacute,
|
38801 | nang: nang,
|
38802 | nap: nap,
|
38803 | napE: napE,
|
38804 | napid: napid,
|
38805 | napos: napos,
|
38806 | napprox: napprox,
|
38807 | natural: natural,
|
38808 | naturals: naturals,
|
38809 | natur: natur,
|
38810 | nbsp: nbsp,
|
38811 | nbump: nbump,
|
38812 | nbumpe: nbumpe,
|
38813 | ncap: ncap,
|
38814 | Ncaron: Ncaron,
|
38815 | ncaron: ncaron,
|
38816 | Ncedil: Ncedil,
|
38817 | ncedil: ncedil,
|
38818 | ncong: ncong,
|
38819 | ncongdot: ncongdot,
|
38820 | ncup: ncup,
|
38821 | Ncy: Ncy,
|
38822 | ncy: ncy,
|
38823 | ndash: ndash,
|
38824 | nearhk: nearhk,
|
38825 | nearr: nearr,
|
38826 | neArr: neArr,
|
38827 | nearrow: nearrow,
|
38828 | ne: ne,
|
38829 | nedot: nedot,
|
38830 | NegativeMediumSpace: NegativeMediumSpace,
|
38831 | NegativeThickSpace: NegativeThickSpace,
|
38832 | NegativeThinSpace: NegativeThinSpace,
|
38833 | NegativeVeryThinSpace: NegativeVeryThinSpace,
|
38834 | nequiv: nequiv,
|
38835 | nesear: nesear,
|
38836 | nesim: nesim,
|
38837 | NestedGreaterGreater: NestedGreaterGreater,
|
38838 | NestedLessLess: NestedLessLess,
|
38839 | NewLine: NewLine,
|
38840 | nexist: nexist,
|
38841 | nexists: nexists,
|
38842 | Nfr: Nfr,
|
38843 | nfr: nfr,
|
38844 | ngE: ngE,
|
38845 | nge: nge,
|
38846 | ngeq: ngeq,
|
38847 | ngeqq: ngeqq,
|
38848 | ngeqslant: ngeqslant,
|
38849 | nges: nges,
|
38850 | nGg: nGg,
|
38851 | ngsim: ngsim,
|
38852 | nGt: nGt,
|
38853 | ngt: ngt,
|
38854 | ngtr: ngtr,
|
38855 | nGtv: nGtv,
|
38856 | nharr: nharr,
|
38857 | nhArr: nhArr,
|
38858 | nhpar: nhpar,
|
38859 | ni: ni,
|
38860 | nis: nis,
|
38861 | nisd: nisd,
|
38862 | niv: niv,
|
38863 | NJcy: NJcy,
|
38864 | njcy: njcy,
|
38865 | nlarr: nlarr,
|
38866 | nlArr: nlArr,
|
38867 | nldr: nldr,
|
38868 | nlE: nlE,
|
38869 | nle: nle,
|
38870 | nleftarrow: nleftarrow,
|
38871 | nLeftarrow: nLeftarrow,
|
38872 | nleftrightarrow: nleftrightarrow,
|
38873 | nLeftrightarrow: nLeftrightarrow,
|
38874 | nleq: nleq,
|
38875 | nleqq: nleqq,
|
38876 | nleqslant: nleqslant,
|
38877 | nles: nles,
|
38878 | nless: nless,
|
38879 | nLl: nLl,
|
38880 | nlsim: nlsim,
|
38881 | nLt: nLt,
|
38882 | nlt: nlt,
|
38883 | nltri: nltri,
|
38884 | nltrie: nltrie,
|
38885 | nLtv: nLtv,
|
38886 | nmid: nmid,
|
38887 | NoBreak: NoBreak,
|
38888 | NonBreakingSpace: NonBreakingSpace,
|
38889 | nopf: nopf,
|
38890 | Nopf: Nopf,
|
38891 | Not: Not,
|
38892 | not: not$1,
|
38893 | NotCongruent: NotCongruent,
|
38894 | NotCupCap: NotCupCap,
|
38895 | NotDoubleVerticalBar: NotDoubleVerticalBar,
|
38896 | NotElement: NotElement,
|
38897 | NotEqual: NotEqual,
|
38898 | NotEqualTilde: NotEqualTilde,
|
38899 | NotExists: NotExists,
|
38900 | NotGreater: NotGreater,
|
38901 | NotGreaterEqual: NotGreaterEqual,
|
38902 | NotGreaterFullEqual: NotGreaterFullEqual,
|
38903 | NotGreaterGreater: NotGreaterGreater,
|
38904 | NotGreaterLess: NotGreaterLess,
|
38905 | NotGreaterSlantEqual: NotGreaterSlantEqual,
|
38906 | NotGreaterTilde: NotGreaterTilde,
|
38907 | NotHumpDownHump: NotHumpDownHump,
|
38908 | NotHumpEqual: NotHumpEqual,
|
38909 | notin: notin,
|
38910 | notindot: notindot,
|
38911 | notinE: notinE,
|
38912 | notinva: notinva,
|
38913 | notinvb: notinvb,
|
38914 | notinvc: notinvc,
|
38915 | NotLeftTriangleBar: NotLeftTriangleBar,
|
38916 | NotLeftTriangle: NotLeftTriangle,
|
38917 | NotLeftTriangleEqual: NotLeftTriangleEqual,
|
38918 | NotLess: NotLess,
|
38919 | NotLessEqual: NotLessEqual,
|
38920 | NotLessGreater: NotLessGreater,
|
38921 | NotLessLess: NotLessLess,
|
38922 | NotLessSlantEqual: NotLessSlantEqual,
|
38923 | NotLessTilde: NotLessTilde,
|
38924 | NotNestedGreaterGreater: NotNestedGreaterGreater,
|
38925 | NotNestedLessLess: NotNestedLessLess,
|
38926 | notni: notni,
|
38927 | notniva: notniva,
|
38928 | notnivb: notnivb,
|
38929 | notnivc: notnivc,
|
38930 | NotPrecedes: NotPrecedes,
|
38931 | NotPrecedesEqual: NotPrecedesEqual,
|
38932 | NotPrecedesSlantEqual: NotPrecedesSlantEqual,
|
38933 | NotReverseElement: NotReverseElement,
|
38934 | NotRightTriangleBar: NotRightTriangleBar,
|
38935 | NotRightTriangle: NotRightTriangle,
|
38936 | NotRightTriangleEqual: NotRightTriangleEqual,
|
38937 | NotSquareSubset: NotSquareSubset,
|
38938 | NotSquareSubsetEqual: NotSquareSubsetEqual,
|
38939 | NotSquareSuperset: NotSquareSuperset,
|
38940 | NotSquareSupersetEqual: NotSquareSupersetEqual,
|
38941 | NotSubset: NotSubset,
|
38942 | NotSubsetEqual: NotSubsetEqual,
|
38943 | NotSucceeds: NotSucceeds,
|
38944 | NotSucceedsEqual: NotSucceedsEqual,
|
38945 | NotSucceedsSlantEqual: NotSucceedsSlantEqual,
|
38946 | NotSucceedsTilde: NotSucceedsTilde,
|
38947 | NotSuperset: NotSuperset,
|
38948 | NotSupersetEqual: NotSupersetEqual,
|
38949 | NotTilde: NotTilde,
|
38950 | NotTildeEqual: NotTildeEqual,
|
38951 | NotTildeFullEqual: NotTildeFullEqual,
|
38952 | NotTildeTilde: NotTildeTilde,
|
38953 | NotVerticalBar: NotVerticalBar,
|
38954 | nparallel: nparallel,
|
38955 | npar: npar,
|
38956 | nparsl: nparsl,
|
38957 | npart: npart,
|
38958 | npolint: npolint,
|
38959 | npr: npr,
|
38960 | nprcue: nprcue,
|
38961 | nprec: nprec,
|
38962 | npreceq: npreceq,
|
38963 | npre: npre,
|
38964 | nrarrc: nrarrc,
|
38965 | nrarr: nrarr,
|
38966 | nrArr: nrArr,
|
38967 | nrarrw: nrarrw,
|
38968 | nrightarrow: nrightarrow,
|
38969 | nRightarrow: nRightarrow,
|
38970 | nrtri: nrtri,
|
38971 | nrtrie: nrtrie,
|
38972 | nsc: nsc,
|
38973 | nsccue: nsccue,
|
38974 | nsce: nsce,
|
38975 | Nscr: Nscr,
|
38976 | nscr: nscr,
|
38977 | nshortmid: nshortmid,
|
38978 | nshortparallel: nshortparallel,
|
38979 | nsim: nsim,
|
38980 | nsime: nsime,
|
38981 | nsimeq: nsimeq,
|
38982 | nsmid: nsmid,
|
38983 | nspar: nspar,
|
38984 | nsqsube: nsqsube,
|
38985 | nsqsupe: nsqsupe,
|
38986 | nsub: nsub,
|
38987 | nsubE: nsubE,
|
38988 | nsube: nsube,
|
38989 | nsubset: nsubset,
|
38990 | nsubseteq: nsubseteq,
|
38991 | nsubseteqq: nsubseteqq,
|
38992 | nsucc: nsucc,
|
38993 | nsucceq: nsucceq,
|
38994 | nsup: nsup,
|
38995 | nsupE: nsupE,
|
38996 | nsupe: nsupe,
|
38997 | nsupset: nsupset,
|
38998 | nsupseteq: nsupseteq,
|
38999 | nsupseteqq: nsupseteqq,
|
39000 | ntgl: ntgl,
|
39001 | Ntilde: Ntilde,
|
39002 | ntilde: ntilde,
|
39003 | ntlg: ntlg,
|
39004 | ntriangleleft: ntriangleleft,
|
39005 | ntrianglelefteq: ntrianglelefteq,
|
39006 | ntriangleright: ntriangleright,
|
39007 | ntrianglerighteq: ntrianglerighteq,
|
39008 | Nu: Nu,
|
39009 | nu: nu,
|
39010 | num: num,
|
39011 | numero: numero,
|
39012 | numsp: numsp,
|
39013 | nvap: nvap,
|
39014 | nvdash: nvdash,
|
39015 | nvDash: nvDash,
|
39016 | nVdash: nVdash,
|
39017 | nVDash: nVDash,
|
39018 | nvge: nvge,
|
39019 | nvgt: nvgt,
|
39020 | nvHarr: nvHarr,
|
39021 | nvinfin: nvinfin,
|
39022 | nvlArr: nvlArr,
|
39023 | nvle: nvle,
|
39024 | nvlt: nvlt,
|
39025 | nvltrie: nvltrie,
|
39026 | nvrArr: nvrArr,
|
39027 | nvrtrie: nvrtrie,
|
39028 | nvsim: nvsim,
|
39029 | nwarhk: nwarhk,
|
39030 | nwarr: nwarr,
|
39031 | nwArr: nwArr,
|
39032 | nwarrow: nwarrow,
|
39033 | nwnear: nwnear,
|
39034 | Oacute: Oacute,
|
39035 | oacute: oacute,
|
39036 | oast: oast,
|
39037 | Ocirc: Ocirc,
|
39038 | ocirc: ocirc,
|
39039 | ocir: ocir,
|
39040 | Ocy: Ocy,
|
39041 | ocy: ocy,
|
39042 | odash: odash,
|
39043 | Odblac: Odblac,
|
39044 | odblac: odblac,
|
39045 | odiv: odiv,
|
39046 | odot: odot,
|
39047 | odsold: odsold,
|
39048 | OElig: OElig,
|
39049 | oelig: oelig,
|
39050 | ofcir: ofcir,
|
39051 | Ofr: Ofr,
|
39052 | ofr: ofr,
|
39053 | ogon: ogon,
|
39054 | Ograve: Ograve,
|
39055 | ograve: ograve,
|
39056 | ogt: ogt,
|
39057 | ohbar: ohbar,
|
39058 | ohm: ohm,
|
39059 | oint: oint,
|
39060 | olarr: olarr,
|
39061 | olcir: olcir,
|
39062 | olcross: olcross,
|
39063 | oline: oline,
|
39064 | olt: olt,
|
39065 | Omacr: Omacr,
|
39066 | omacr: omacr,
|
39067 | Omega: Omega,
|
39068 | omega: omega,
|
39069 | Omicron: Omicron,
|
39070 | omicron: omicron,
|
39071 | omid: omid,
|
39072 | ominus: ominus,
|
39073 | Oopf: Oopf,
|
39074 | oopf: oopf,
|
39075 | opar: opar,
|
39076 | OpenCurlyDoubleQuote: OpenCurlyDoubleQuote,
|
39077 | OpenCurlyQuote: OpenCurlyQuote,
|
39078 | operp: operp,
|
39079 | oplus: oplus,
|
39080 | orarr: orarr,
|
39081 | Or: Or,
|
39082 | or: or,
|
39083 | ord: ord,
|
39084 | order: order$1,
|
39085 | orderof: orderof,
|
39086 | ordf: ordf,
|
39087 | ordm: ordm,
|
39088 | origof: origof,
|
39089 | oror: oror,
|
39090 | orslope: orslope,
|
39091 | orv: orv,
|
39092 | oS: oS,
|
39093 | Oscr: Oscr,
|
39094 | oscr: oscr,
|
39095 | Oslash: Oslash,
|
39096 | oslash: oslash,
|
39097 | osol: osol,
|
39098 | Otilde: Otilde,
|
39099 | otilde: otilde,
|
39100 | otimesas: otimesas,
|
39101 | Otimes: Otimes,
|
39102 | otimes: otimes,
|
39103 | Ouml: Ouml,
|
39104 | ouml: ouml,
|
39105 | ovbar: ovbar,
|
39106 | OverBar: OverBar,
|
39107 | OverBrace: OverBrace,
|
39108 | OverBracket: OverBracket,
|
39109 | OverParenthesis: OverParenthesis,
|
39110 | para: para,
|
39111 | parallel: parallel,
|
39112 | par: par,
|
39113 | parsim: parsim,
|
39114 | parsl: parsl,
|
39115 | part: part,
|
39116 | PartialD: PartialD,
|
39117 | Pcy: Pcy,
|
39118 | pcy: pcy,
|
39119 | percnt: percnt,
|
39120 | period: period,
|
39121 | permil: permil,
|
39122 | perp: perp,
|
39123 | pertenk: pertenk,
|
39124 | Pfr: Pfr,
|
39125 | pfr: pfr,
|
39126 | Phi: Phi,
|
39127 | phi: phi,
|
39128 | phiv: phiv,
|
39129 | phmmat: phmmat,
|
39130 | phone: phone,
|
39131 | Pi: Pi,
|
39132 | pi: pi,
|
39133 | pitchfork: pitchfork,
|
39134 | piv: piv,
|
39135 | planck: planck,
|
39136 | planckh: planckh,
|
39137 | plankv: plankv,
|
39138 | plusacir: plusacir,
|
39139 | plusb: plusb,
|
39140 | pluscir: pluscir,
|
39141 | plus: plus,
|
39142 | plusdo: plusdo,
|
39143 | plusdu: plusdu,
|
39144 | pluse: pluse,
|
39145 | PlusMinus: PlusMinus,
|
39146 | plusmn: plusmn,
|
39147 | plussim: plussim,
|
39148 | plustwo: plustwo,
|
39149 | pm: pm,
|
39150 | Poincareplane: Poincareplane,
|
39151 | pointint: pointint,
|
39152 | popf: popf,
|
39153 | Popf: Popf,
|
39154 | pound: pound,
|
39155 | prap: prap,
|
39156 | Pr: Pr,
|
39157 | pr: pr,
|
39158 | prcue: prcue,
|
39159 | precapprox: precapprox,
|
39160 | prec: prec,
|
39161 | preccurlyeq: preccurlyeq,
|
39162 | Precedes: Precedes,
|
39163 | PrecedesEqual: PrecedesEqual,
|
39164 | PrecedesSlantEqual: PrecedesSlantEqual,
|
39165 | PrecedesTilde: PrecedesTilde,
|
39166 | preceq: preceq,
|
39167 | precnapprox: precnapprox,
|
39168 | precneqq: precneqq,
|
39169 | precnsim: precnsim,
|
39170 | pre: pre,
|
39171 | prE: prE,
|
39172 | precsim: precsim,
|
39173 | prime: prime,
|
39174 | Prime: Prime,
|
39175 | primes: primes,
|
39176 | prnap: prnap,
|
39177 | prnE: prnE,
|
39178 | prnsim: prnsim,
|
39179 | prod: prod,
|
39180 | Product: Product,
|
39181 | profalar: profalar,
|
39182 | profline: profline,
|
39183 | profsurf: profsurf,
|
39184 | prop: prop,
|
39185 | Proportional: Proportional,
|
39186 | Proportion: Proportion,
|
39187 | propto: propto,
|
39188 | prsim: prsim,
|
39189 | prurel: prurel,
|
39190 | Pscr: Pscr,
|
39191 | pscr: pscr,
|
39192 | Psi: Psi,
|
39193 | psi: psi,
|
39194 | puncsp: puncsp,
|
39195 | Qfr: Qfr,
|
39196 | qfr: qfr,
|
39197 | qint: qint,
|
39198 | qopf: qopf,
|
39199 | Qopf: Qopf,
|
39200 | qprime: qprime,
|
39201 | Qscr: Qscr,
|
39202 | qscr: qscr,
|
39203 | quaternions: quaternions,
|
39204 | quatint: quatint,
|
39205 | quest: quest,
|
39206 | questeq: questeq,
|
39207 | quot: quot,
|
39208 | QUOT: QUOT,
|
39209 | rAarr: rAarr,
|
39210 | race: race,
|
39211 | Racute: Racute,
|
39212 | racute: racute,
|
39213 | radic: radic,
|
39214 | raemptyv: raemptyv,
|
39215 | rang: rang,
|
39216 | Rang: Rang,
|
39217 | rangd: rangd,
|
39218 | range: range,
|
39219 | rangle: rangle,
|
39220 | raquo: raquo,
|
39221 | rarrap: rarrap,
|
39222 | rarrb: rarrb,
|
39223 | rarrbfs: rarrbfs,
|
39224 | rarrc: rarrc,
|
39225 | rarr: rarr,
|
39226 | Rarr: Rarr,
|
39227 | rArr: rArr,
|
39228 | rarrfs: rarrfs,
|
39229 | rarrhk: rarrhk,
|
39230 | rarrlp: rarrlp,
|
39231 | rarrpl: rarrpl,
|
39232 | rarrsim: rarrsim,
|
39233 | Rarrtl: Rarrtl,
|
39234 | rarrtl: rarrtl,
|
39235 | rarrw: rarrw,
|
39236 | ratail: ratail,
|
39237 | rAtail: rAtail,
|
39238 | ratio: ratio,
|
39239 | rationals: rationals,
|
39240 | rbarr: rbarr,
|
39241 | rBarr: rBarr,
|
39242 | RBarr: RBarr,
|
39243 | rbbrk: rbbrk,
|
39244 | rbrace: rbrace,
|
39245 | rbrack: rbrack,
|
39246 | rbrke: rbrke,
|
39247 | rbrksld: rbrksld,
|
39248 | rbrkslu: rbrkslu,
|
39249 | Rcaron: Rcaron,
|
39250 | rcaron: rcaron,
|
39251 | Rcedil: Rcedil,
|
39252 | rcedil: rcedil,
|
39253 | rceil: rceil,
|
39254 | rcub: rcub,
|
39255 | Rcy: Rcy,
|
39256 | rcy: rcy,
|
39257 | rdca: rdca,
|
39258 | rdldhar: rdldhar,
|
39259 | rdquo: rdquo,
|
39260 | rdquor: rdquor,
|
39261 | rdsh: rdsh,
|
39262 | real: real,
|
39263 | realine: realine,
|
39264 | realpart: realpart,
|
39265 | reals: reals,
|
39266 | Re: Re,
|
39267 | rect: rect,
|
39268 | reg: reg,
|
39269 | REG: REG,
|
39270 | ReverseElement: ReverseElement,
|
39271 | ReverseEquilibrium: ReverseEquilibrium,
|
39272 | ReverseUpEquilibrium: ReverseUpEquilibrium,
|
39273 | rfisht: rfisht,
|
39274 | rfloor: rfloor,
|
39275 | rfr: rfr,
|
39276 | Rfr: Rfr,
|
39277 | rHar: rHar,
|
39278 | rhard: rhard,
|
39279 | rharu: rharu,
|
39280 | rharul: rharul,
|
39281 | Rho: Rho,
|
39282 | rho: rho,
|
39283 | rhov: rhov,
|
39284 | RightAngleBracket: RightAngleBracket,
|
39285 | RightArrowBar: RightArrowBar,
|
39286 | rightarrow: rightarrow,
|
39287 | RightArrow: RightArrow,
|
39288 | Rightarrow: Rightarrow,
|
39289 | RightArrowLeftArrow: RightArrowLeftArrow,
|
39290 | rightarrowtail: rightarrowtail,
|
39291 | RightCeiling: RightCeiling,
|
39292 | RightDoubleBracket: RightDoubleBracket,
|
39293 | RightDownTeeVector: RightDownTeeVector,
|
39294 | RightDownVectorBar: RightDownVectorBar,
|
39295 | RightDownVector: RightDownVector,
|
39296 | RightFloor: RightFloor,
|
39297 | rightharpoondown: rightharpoondown,
|
39298 | rightharpoonup: rightharpoonup,
|
39299 | rightleftarrows: rightleftarrows,
|
39300 | rightleftharpoons: rightleftharpoons,
|
39301 | rightrightarrows: rightrightarrows,
|
39302 | rightsquigarrow: rightsquigarrow,
|
39303 | RightTeeArrow: RightTeeArrow,
|
39304 | RightTee: RightTee,
|
39305 | RightTeeVector: RightTeeVector,
|
39306 | rightthreetimes: rightthreetimes,
|
39307 | RightTriangleBar: RightTriangleBar,
|
39308 | RightTriangle: RightTriangle,
|
39309 | RightTriangleEqual: RightTriangleEqual,
|
39310 | RightUpDownVector: RightUpDownVector,
|
39311 | RightUpTeeVector: RightUpTeeVector,
|
39312 | RightUpVectorBar: RightUpVectorBar,
|
39313 | RightUpVector: RightUpVector,
|
39314 | RightVectorBar: RightVectorBar,
|
39315 | RightVector: RightVector,
|
39316 | ring: ring,
|
39317 | risingdotseq: risingdotseq,
|
39318 | rlarr: rlarr,
|
39319 | rlhar: rlhar,
|
39320 | rlm: rlm,
|
39321 | rmoustache: rmoustache,
|
39322 | rmoust: rmoust,
|
39323 | rnmid: rnmid,
|
39324 | roang: roang,
|
39325 | roarr: roarr,
|
39326 | robrk: robrk,
|
39327 | ropar: ropar,
|
39328 | ropf: ropf,
|
39329 | Ropf: Ropf,
|
39330 | roplus: roplus,
|
39331 | rotimes: rotimes,
|
39332 | RoundImplies: RoundImplies,
|
39333 | rpar: rpar,
|
39334 | rpargt: rpargt,
|
39335 | rppolint: rppolint,
|
39336 | rrarr: rrarr,
|
39337 | Rrightarrow: Rrightarrow,
|
39338 | rsaquo: rsaquo,
|
39339 | rscr: rscr,
|
39340 | Rscr: Rscr,
|
39341 | rsh: rsh,
|
39342 | Rsh: Rsh,
|
39343 | rsqb: rsqb,
|
39344 | rsquo: rsquo,
|
39345 | rsquor: rsquor,
|
39346 | rthree: rthree,
|
39347 | rtimes: rtimes,
|
39348 | rtri: rtri,
|
39349 | rtrie: rtrie,
|
39350 | rtrif: rtrif,
|
39351 | rtriltri: rtriltri,
|
39352 | RuleDelayed: RuleDelayed,
|
39353 | ruluhar: ruluhar,
|
39354 | rx: rx,
|
39355 | Sacute: Sacute,
|
39356 | sacute: sacute,
|
39357 | sbquo: sbquo,
|
39358 | scap: scap,
|
39359 | Scaron: Scaron,
|
39360 | scaron: scaron,
|
39361 | Sc: Sc,
|
39362 | sc: sc,
|
39363 | sccue: sccue,
|
39364 | sce: sce,
|
39365 | scE: scE,
|
39366 | Scedil: Scedil,
|
39367 | scedil: scedil,
|
39368 | Scirc: Scirc,
|
39369 | scirc: scirc,
|
39370 | scnap: scnap,
|
39371 | scnE: scnE,
|
39372 | scnsim: scnsim,
|
39373 | scpolint: scpolint,
|
39374 | scsim: scsim,
|
39375 | Scy: Scy,
|
39376 | scy: scy,
|
39377 | sdotb: sdotb,
|
39378 | sdot: sdot,
|
39379 | sdote: sdote,
|
39380 | searhk: searhk,
|
39381 | searr: searr,
|
39382 | seArr: seArr,
|
39383 | searrow: searrow,
|
39384 | sect: sect,
|
39385 | semi: semi,
|
39386 | seswar: seswar,
|
39387 | setminus: setminus,
|
39388 | setmn: setmn,
|
39389 | sext: sext,
|
39390 | Sfr: Sfr,
|
39391 | sfr: sfr,
|
39392 | sfrown: sfrown,
|
39393 | sharp: sharp,
|
39394 | SHCHcy: SHCHcy,
|
39395 | shchcy: shchcy,
|
39396 | SHcy: SHcy,
|
39397 | shcy: shcy,
|
39398 | ShortDownArrow: ShortDownArrow,
|
39399 | ShortLeftArrow: ShortLeftArrow,
|
39400 | shortmid: shortmid,
|
39401 | shortparallel: shortparallel,
|
39402 | ShortRightArrow: ShortRightArrow,
|
39403 | ShortUpArrow: ShortUpArrow,
|
39404 | shy: shy,
|
39405 | Sigma: Sigma,
|
39406 | sigma: sigma,
|
39407 | sigmaf: sigmaf,
|
39408 | sigmav: sigmav,
|
39409 | sim: sim,
|
39410 | simdot: simdot,
|
39411 | sime: sime,
|
39412 | simeq: simeq,
|
39413 | simg: simg,
|
39414 | simgE: simgE,
|
39415 | siml: siml,
|
39416 | simlE: simlE,
|
39417 | simne: simne,
|
39418 | simplus: simplus,
|
39419 | simrarr: simrarr,
|
39420 | slarr: slarr,
|
39421 | SmallCircle: SmallCircle,
|
39422 | smallsetminus: smallsetminus,
|
39423 | smashp: smashp,
|
39424 | smeparsl: smeparsl,
|
39425 | smid: smid,
|
39426 | smile: smile,
|
39427 | smt: smt,
|
39428 | smte: smte,
|
39429 | smtes: smtes,
|
39430 | SOFTcy: SOFTcy,
|
39431 | softcy: softcy,
|
39432 | solbar: solbar,
|
39433 | solb: solb,
|
39434 | sol: sol,
|
39435 | Sopf: Sopf,
|
39436 | sopf: sopf,
|
39437 | spades: spades,
|
39438 | spadesuit: spadesuit,
|
39439 | spar: spar,
|
39440 | sqcap: sqcap,
|
39441 | sqcaps: sqcaps,
|
39442 | sqcup: sqcup,
|
39443 | sqcups: sqcups,
|
39444 | Sqrt: Sqrt,
|
39445 | sqsub: sqsub,
|
39446 | sqsube: sqsube,
|
39447 | sqsubset: sqsubset,
|
39448 | sqsubseteq: sqsubseteq,
|
39449 | sqsup: sqsup,
|
39450 | sqsupe: sqsupe,
|
39451 | sqsupset: sqsupset,
|
39452 | sqsupseteq: sqsupseteq,
|
39453 | square: square,
|
39454 | Square: Square,
|
39455 | SquareIntersection: SquareIntersection,
|
39456 | SquareSubset: SquareSubset,
|
39457 | SquareSubsetEqual: SquareSubsetEqual,
|
39458 | SquareSuperset: SquareSuperset,
|
39459 | SquareSupersetEqual: SquareSupersetEqual,
|
39460 | SquareUnion: SquareUnion,
|
39461 | squarf: squarf,
|
39462 | squ: squ,
|
39463 | squf: squf,
|
39464 | srarr: srarr,
|
39465 | Sscr: Sscr,
|
39466 | sscr: sscr,
|
39467 | ssetmn: ssetmn,
|
39468 | ssmile: ssmile,
|
39469 | sstarf: sstarf,
|
39470 | Star: Star,
|
39471 | star: star,
|
39472 | starf: starf,
|
39473 | straightepsilon: straightepsilon,
|
39474 | straightphi: straightphi,
|
39475 | strns: strns,
|
39476 | sub: sub,
|
39477 | Sub: Sub,
|
39478 | subdot: subdot,
|
39479 | subE: subE,
|
39480 | sube: sube,
|
39481 | subedot: subedot,
|
39482 | submult: submult,
|
39483 | subnE: subnE,
|
39484 | subne: subne,
|
39485 | subplus: subplus,
|
39486 | subrarr: subrarr,
|
39487 | subset: subset,
|
39488 | Subset: Subset,
|
39489 | subseteq: subseteq,
|
39490 | subseteqq: subseteqq,
|
39491 | SubsetEqual: SubsetEqual,
|
39492 | subsetneq: subsetneq,
|
39493 | subsetneqq: subsetneqq,
|
39494 | subsim: subsim,
|
39495 | subsub: subsub,
|
39496 | subsup: subsup,
|
39497 | succapprox: succapprox,
|
39498 | succ: succ,
|
39499 | succcurlyeq: succcurlyeq,
|
39500 | Succeeds: Succeeds,
|
39501 | SucceedsEqual: SucceedsEqual,
|
39502 | SucceedsSlantEqual: SucceedsSlantEqual,
|
39503 | SucceedsTilde: SucceedsTilde,
|
39504 | succeq: succeq,
|
39505 | succnapprox: succnapprox,
|
39506 | succneqq: succneqq,
|
39507 | succnsim: succnsim,
|
39508 | succsim: succsim,
|
39509 | SuchThat: SuchThat,
|
39510 | sum: sum,
|
39511 | Sum: Sum,
|
39512 | sung: sung,
|
39513 | sup1: sup1,
|
39514 | sup2: sup2,
|
39515 | sup3: sup3,
|
39516 | sup: sup,
|
39517 | Sup: Sup,
|
39518 | supdot: supdot,
|
39519 | supdsub: supdsub,
|
39520 | supE: supE,
|
39521 | supe: supe,
|
39522 | supedot: supedot,
|
39523 | Superset: Superset,
|
39524 | SupersetEqual: SupersetEqual,
|
39525 | suphsol: suphsol,
|
39526 | suphsub: suphsub,
|
39527 | suplarr: suplarr,
|
39528 | supmult: supmult,
|
39529 | supnE: supnE,
|
39530 | supne: supne,
|
39531 | supplus: supplus,
|
39532 | supset: supset,
|
39533 | Supset: Supset,
|
39534 | supseteq: supseteq,
|
39535 | supseteqq: supseteqq,
|
39536 | supsetneq: supsetneq,
|
39537 | supsetneqq: supsetneqq,
|
39538 | supsim: supsim,
|
39539 | supsub: supsub,
|
39540 | supsup: supsup,
|
39541 | swarhk: swarhk,
|
39542 | swarr: swarr,
|
39543 | swArr: swArr,
|
39544 | swarrow: swarrow,
|
39545 | swnwar: swnwar,
|
39546 | szlig: szlig,
|
39547 | Tab: Tab,
|
39548 | target: target$1,
|
39549 | Tau: Tau,
|
39550 | tau: tau,
|
39551 | tbrk: tbrk,
|
39552 | Tcaron: Tcaron,
|
39553 | tcaron: tcaron,
|
39554 | Tcedil: Tcedil,
|
39555 | tcedil: tcedil,
|
39556 | Tcy: Tcy,
|
39557 | tcy: tcy,
|
39558 | tdot: tdot,
|
39559 | telrec: telrec,
|
39560 | Tfr: Tfr,
|
39561 | tfr: tfr,
|
39562 | there4: there4,
|
39563 | therefore: therefore,
|
39564 | Therefore: Therefore,
|
39565 | Theta: Theta,
|
39566 | theta: theta,
|
39567 | thetasym: thetasym,
|
39568 | thetav: thetav,
|
39569 | thickapprox: thickapprox,
|
39570 | thicksim: thicksim,
|
39571 | ThickSpace: ThickSpace,
|
39572 | ThinSpace: ThinSpace,
|
39573 | thinsp: thinsp,
|
39574 | thkap: thkap,
|
39575 | thksim: thksim,
|
39576 | THORN: THORN,
|
39577 | thorn: thorn,
|
39578 | tilde: tilde,
|
39579 | Tilde: Tilde,
|
39580 | TildeEqual: TildeEqual,
|
39581 | TildeFullEqual: TildeFullEqual,
|
39582 | TildeTilde: TildeTilde,
|
39583 | timesbar: timesbar,
|
39584 | timesb: timesb,
|
39585 | times: times,
|
39586 | timesd: timesd,
|
39587 | tint: tint,
|
39588 | toea: toea,
|
39589 | topbot: topbot,
|
39590 | topcir: topcir,
|
39591 | top: top$1,
|
39592 | Topf: Topf,
|
39593 | topf: topf,
|
39594 | topfork: topfork,
|
39595 | tosa: tosa,
|
39596 | tprime: tprime,
|
39597 | trade: trade,
|
39598 | TRADE: TRADE,
|
39599 | triangle: triangle,
|
39600 | triangledown: triangledown,
|
39601 | triangleleft: triangleleft,
|
39602 | trianglelefteq: trianglelefteq,
|
39603 | triangleq: triangleq,
|
39604 | triangleright: triangleright,
|
39605 | trianglerighteq: trianglerighteq,
|
39606 | tridot: tridot,
|
39607 | trie: trie,
|
39608 | triminus: triminus,
|
39609 | TripleDot: TripleDot,
|
39610 | triplus: triplus,
|
39611 | trisb: trisb,
|
39612 | tritime: tritime,
|
39613 | trpezium: trpezium,
|
39614 | Tscr: Tscr,
|
39615 | tscr: tscr,
|
39616 | TScy: TScy,
|
39617 | tscy: tscy,
|
39618 | TSHcy: TSHcy,
|
39619 | tshcy: tshcy,
|
39620 | Tstrok: Tstrok,
|
39621 | tstrok: tstrok,
|
39622 | twixt: twixt,
|
39623 | twoheadleftarrow: twoheadleftarrow,
|
39624 | twoheadrightarrow: twoheadrightarrow,
|
39625 | Uacute: Uacute,
|
39626 | uacute: uacute,
|
39627 | uarr: uarr,
|
39628 | Uarr: Uarr,
|
39629 | uArr: uArr,
|
39630 | Uarrocir: Uarrocir,
|
39631 | Ubrcy: Ubrcy,
|
39632 | ubrcy: ubrcy,
|
39633 | Ubreve: Ubreve,
|
39634 | ubreve: ubreve,
|
39635 | Ucirc: Ucirc,
|
39636 | ucirc: ucirc,
|
39637 | Ucy: Ucy,
|
39638 | ucy: ucy,
|
39639 | udarr: udarr,
|
39640 | Udblac: Udblac,
|
39641 | udblac: udblac,
|
39642 | udhar: udhar,
|
39643 | ufisht: ufisht,
|
39644 | Ufr: Ufr,
|
39645 | ufr: ufr,
|
39646 | Ugrave: Ugrave,
|
39647 | ugrave: ugrave,
|
39648 | uHar: uHar,
|
39649 | uharl: uharl,
|
39650 | uharr: uharr,
|
39651 | uhblk: uhblk,
|
39652 | ulcorn: ulcorn,
|
39653 | ulcorner: ulcorner,
|
39654 | ulcrop: ulcrop,
|
39655 | ultri: ultri,
|
39656 | Umacr: Umacr,
|
39657 | umacr: umacr,
|
39658 | uml: uml,
|
39659 | UnderBar: UnderBar,
|
39660 | UnderBrace: UnderBrace,
|
39661 | UnderBracket: UnderBracket,
|
39662 | UnderParenthesis: UnderParenthesis,
|
39663 | Union: Union,
|
39664 | UnionPlus: UnionPlus,
|
39665 | Uogon: Uogon,
|
39666 | uogon: uogon,
|
39667 | Uopf: Uopf,
|
39668 | uopf: uopf,
|
39669 | UpArrowBar: UpArrowBar,
|
39670 | uparrow: uparrow,
|
39671 | UpArrow: UpArrow,
|
39672 | Uparrow: Uparrow,
|
39673 | UpArrowDownArrow: UpArrowDownArrow,
|
39674 | updownarrow: updownarrow,
|
39675 | UpDownArrow: UpDownArrow,
|
39676 | Updownarrow: Updownarrow,
|
39677 | UpEquilibrium: UpEquilibrium,
|
39678 | upharpoonleft: upharpoonleft,
|
39679 | upharpoonright: upharpoonright,
|
39680 | uplus: uplus,
|
39681 | UpperLeftArrow: UpperLeftArrow,
|
39682 | UpperRightArrow: UpperRightArrow,
|
39683 | upsi: upsi,
|
39684 | Upsi: Upsi,
|
39685 | upsih: upsih,
|
39686 | Upsilon: Upsilon,
|
39687 | upsilon: upsilon,
|
39688 | UpTeeArrow: UpTeeArrow,
|
39689 | UpTee: UpTee,
|
39690 | upuparrows: upuparrows,
|
39691 | urcorn: urcorn,
|
39692 | urcorner: urcorner,
|
39693 | urcrop: urcrop,
|
39694 | Uring: Uring,
|
39695 | uring: uring,
|
39696 | urtri: urtri,
|
39697 | Uscr: Uscr,
|
39698 | uscr: uscr,
|
39699 | utdot: utdot,
|
39700 | Utilde: Utilde,
|
39701 | utilde: utilde,
|
39702 | utri: utri,
|
39703 | utrif: utrif,
|
39704 | uuarr: uuarr,
|
39705 | Uuml: Uuml,
|
39706 | uuml: uuml,
|
39707 | uwangle: uwangle,
|
39708 | vangrt: vangrt,
|
39709 | varepsilon: varepsilon,
|
39710 | varkappa: varkappa,
|
39711 | varnothing: varnothing,
|
39712 | varphi: varphi,
|
39713 | varpi: varpi,
|
39714 | varpropto: varpropto,
|
39715 | varr: varr,
|
39716 | vArr: vArr,
|
39717 | varrho: varrho,
|
39718 | varsigma: varsigma,
|
39719 | varsubsetneq: varsubsetneq,
|
39720 | varsubsetneqq: varsubsetneqq,
|
39721 | varsupsetneq: varsupsetneq,
|
39722 | varsupsetneqq: varsupsetneqq,
|
39723 | vartheta: vartheta,
|
39724 | vartriangleleft: vartriangleleft,
|
39725 | vartriangleright: vartriangleright,
|
39726 | vBar: vBar,
|
39727 | Vbar: Vbar,
|
39728 | vBarv: vBarv,
|
39729 | Vcy: Vcy,
|
39730 | vcy: vcy,
|
39731 | vdash: vdash,
|
39732 | vDash: vDash,
|
39733 | Vdash: Vdash,
|
39734 | VDash: VDash,
|
39735 | Vdashl: Vdashl,
|
39736 | veebar: veebar,
|
39737 | vee: vee,
|
39738 | Vee: Vee,
|
39739 | veeeq: veeeq,
|
39740 | vellip: vellip,
|
39741 | verbar: verbar,
|
39742 | Verbar: Verbar,
|
39743 | vert: vert,
|
39744 | Vert: Vert,
|
39745 | VerticalBar: VerticalBar,
|
39746 | VerticalLine: VerticalLine,
|
39747 | VerticalSeparator: VerticalSeparator,
|
39748 | VerticalTilde: VerticalTilde,
|
39749 | VeryThinSpace: VeryThinSpace,
|
39750 | Vfr: Vfr,
|
39751 | vfr: vfr,
|
39752 | vltri: vltri,
|
39753 | vnsub: vnsub,
|
39754 | vnsup: vnsup,
|
39755 | Vopf: Vopf,
|
39756 | vopf: vopf,
|
39757 | vprop: vprop,
|
39758 | vrtri: vrtri,
|
39759 | Vscr: Vscr,
|
39760 | vscr: vscr,
|
39761 | vsubnE: vsubnE,
|
39762 | vsubne: vsubne,
|
39763 | vsupnE: vsupnE,
|
39764 | vsupne: vsupne,
|
39765 | Vvdash: Vvdash,
|
39766 | vzigzag: vzigzag,
|
39767 | Wcirc: Wcirc,
|
39768 | wcirc: wcirc,
|
39769 | wedbar: wedbar,
|
39770 | wedge: wedge,
|
39771 | Wedge: Wedge,
|
39772 | wedgeq: wedgeq,
|
39773 | weierp: weierp,
|
39774 | Wfr: Wfr,
|
39775 | wfr: wfr,
|
39776 | Wopf: Wopf,
|
39777 | wopf: wopf,
|
39778 | wp: wp,
|
39779 | wr: wr,
|
39780 | wreath: wreath,
|
39781 | Wscr: Wscr,
|
39782 | wscr: wscr,
|
39783 | xcap: xcap,
|
39784 | xcirc: xcirc,
|
39785 | xcup: xcup,
|
39786 | xdtri: xdtri,
|
39787 | Xfr: Xfr,
|
39788 | xfr: xfr,
|
39789 | xharr: xharr,
|
39790 | xhArr: xhArr,
|
39791 | Xi: Xi,
|
39792 | xi: xi,
|
39793 | xlarr: xlarr,
|
39794 | xlArr: xlArr,
|
39795 | xmap: xmap,
|
39796 | xnis: xnis,
|
39797 | xodot: xodot,
|
39798 | Xopf: Xopf,
|
39799 | xopf: xopf,
|
39800 | xoplus: xoplus,
|
39801 | xotime: xotime,
|
39802 | xrarr: xrarr,
|
39803 | xrArr: xrArr,
|
39804 | Xscr: Xscr,
|
39805 | xscr: xscr,
|
39806 | xsqcup: xsqcup,
|
39807 | xuplus: xuplus,
|
39808 | xutri: xutri,
|
39809 | xvee: xvee,
|
39810 | xwedge: xwedge,
|
39811 | Yacute: Yacute,
|
39812 | yacute: yacute,
|
39813 | YAcy: YAcy,
|
39814 | yacy: yacy,
|
39815 | Ycirc: Ycirc,
|
39816 | ycirc: ycirc,
|
39817 | Ycy: Ycy,
|
39818 | ycy: ycy,
|
39819 | yen: yen,
|
39820 | Yfr: Yfr,
|
39821 | yfr: yfr,
|
39822 | YIcy: YIcy,
|
39823 | yicy: yicy,
|
39824 | Yopf: Yopf,
|
39825 | yopf: yopf,
|
39826 | Yscr: Yscr,
|
39827 | yscr: yscr,
|
39828 | YUcy: YUcy,
|
39829 | yucy: yucy,
|
39830 | yuml: yuml,
|
39831 | Yuml: Yuml,
|
39832 | Zacute: Zacute,
|
39833 | zacute: zacute,
|
39834 | Zcaron: Zcaron,
|
39835 | zcaron: zcaron,
|
39836 | Zcy: Zcy,
|
39837 | zcy: zcy,
|
39838 | Zdot: Zdot,
|
39839 | zdot: zdot,
|
39840 | zeetrf: zeetrf,
|
39841 | ZeroWidthSpace: ZeroWidthSpace,
|
39842 | Zeta: Zeta,
|
39843 | zeta: zeta,
|
39844 | zfr: zfr,
|
39845 | Zfr: Zfr,
|
39846 | ZHcy: ZHcy,
|
39847 | zhcy: zhcy,
|
39848 | zigrarr: zigrarr,
|
39849 | zopf: zopf,
|
39850 | Zopf: Zopf,
|
39851 | Zscr: Zscr,
|
39852 | zscr: zscr,
|
39853 | zwj: zwj,
|
39854 | zwnj: zwnj
|
39855 | };
|
39856 |
|
39857 | var Aacute$1 = "Á";
|
39858 | var aacute$1 = "á";
|
39859 | var Acirc$1 = "Â";
|
39860 | var acirc$1 = "â";
|
39861 | var acute$1 = "´";
|
39862 | var AElig$1 = "Æ";
|
39863 | var aelig$1 = "æ";
|
39864 | var Agrave$1 = "À";
|
39865 | var agrave$1 = "à";
|
39866 | var amp$1 = "&";
|
39867 | var AMP$1 = "&";
|
39868 | var Aring$1 = "Å";
|
39869 | var aring$1 = "å";
|
39870 | var Atilde$1 = "Ã";
|
39871 | var atilde$1 = "ã";
|
39872 | var Auml$1 = "Ä";
|
39873 | var auml$1 = "ä";
|
39874 | var brvbar$1 = "¦";
|
39875 | var Ccedil$1 = "Ç";
|
39876 | var ccedil$1 = "ç";
|
39877 | var cedil$1 = "¸";
|
39878 | var cent$1 = "¢";
|
39879 | var copy$3 = "©";
|
39880 | var COPY$1 = "©";
|
39881 | var curren$1 = "¤";
|
39882 | var deg$1 = "°";
|
39883 | var divide$1 = "÷";
|
39884 | var Eacute$1 = "É";
|
39885 | var eacute$1 = "é";
|
39886 | var Ecirc$1 = "Ê";
|
39887 | var ecirc$1 = "ê";
|
39888 | var Egrave$1 = "È";
|
39889 | var egrave$1 = "è";
|
39890 | var ETH$1 = "Ð";
|
39891 | var eth$1 = "ð";
|
39892 | var Euml$1 = "Ë";
|
39893 | var euml$1 = "ë";
|
39894 | var frac12$1 = "½";
|
39895 | var frac14$1 = "¼";
|
39896 | var frac34$1 = "¾";
|
39897 | var gt$1 = ">";
|
39898 | var GT$1 = ">";
|
39899 | var Iacute$1 = "Í";
|
39900 | var iacute$1 = "í";
|
39901 | var Icirc$1 = "Î";
|
39902 | var icirc$1 = "î";
|
39903 | var iexcl$1 = "¡";
|
39904 | var Igrave$1 = "Ì";
|
39905 | var igrave$1 = "ì";
|
39906 | var iquest$1 = "¿";
|
39907 | var Iuml$1 = "Ï";
|
39908 | var iuml$1 = "ï";
|
39909 | var laquo$1 = "«";
|
39910 | var lt$1 = "<";
|
39911 | var LT$1 = "<";
|
39912 | var macr$1 = "¯";
|
39913 | var micro$1 = "µ";
|
39914 | var middot$1 = "·";
|
39915 | var nbsp$1 = " ";
|
39916 | var not$2 = "¬";
|
39917 | var Ntilde$1 = "Ñ";
|
39918 | var ntilde$1 = "ñ";
|
39919 | var Oacute$1 = "Ó";
|
39920 | var oacute$1 = "ó";
|
39921 | var Ocirc$1 = "Ô";
|
39922 | var ocirc$1 = "ô";
|
39923 | var Ograve$1 = "Ò";
|
39924 | var ograve$1 = "ò";
|
39925 | var ordf$1 = "ª";
|
39926 | var ordm$1 = "º";
|
39927 | var Oslash$1 = "Ø";
|
39928 | var oslash$1 = "ø";
|
39929 | var Otilde$1 = "Õ";
|
39930 | var otilde$1 = "õ";
|
39931 | var Ouml$1 = "Ö";
|
39932 | var ouml$1 = "ö";
|
39933 | var para$1 = "¶";
|
39934 | var plusmn$1 = "±";
|
39935 | var pound$1 = "£";
|
39936 | var quot$1 = "\"";
|
39937 | var QUOT$1 = "\"";
|
39938 | var raquo$1 = "»";
|
39939 | var reg$1 = "®";
|
39940 | var REG$1 = "®";
|
39941 | var sect$1 = "§";
|
39942 | var shy$1 = "";
|
39943 | var sup1$1 = "¹";
|
39944 | var sup2$1 = "²";
|
39945 | var sup3$1 = "³";
|
39946 | var szlig$1 = "ß";
|
39947 | var THORN$1 = "Þ";
|
39948 | var thorn$1 = "þ";
|
39949 | var times$1 = "×";
|
39950 | var Uacute$1 = "Ú";
|
39951 | var uacute$1 = "ú";
|
39952 | var Ucirc$1 = "Û";
|
39953 | var ucirc$1 = "û";
|
39954 | var Ugrave$1 = "Ù";
|
39955 | var ugrave$1 = "ù";
|
39956 | var uml$1 = "¨";
|
39957 | var Uuml$1 = "Ü";
|
39958 | var uuml$1 = "ü";
|
39959 | var Yacute$1 = "Ý";
|
39960 | var yacute$1 = "ý";
|
39961 | var yen$1 = "¥";
|
39962 | var yuml$1 = "ÿ";
|
39963 | var require$$1$1 = {
|
39964 | Aacute: Aacute$1,
|
39965 | aacute: aacute$1,
|
39966 | Acirc: Acirc$1,
|
39967 | acirc: acirc$1,
|
39968 | acute: acute$1,
|
39969 | AElig: AElig$1,
|
39970 | aelig: aelig$1,
|
39971 | Agrave: Agrave$1,
|
39972 | agrave: agrave$1,
|
39973 | amp: amp$1,
|
39974 | AMP: AMP$1,
|
39975 | Aring: Aring$1,
|
39976 | aring: aring$1,
|
39977 | Atilde: Atilde$1,
|
39978 | atilde: atilde$1,
|
39979 | Auml: Auml$1,
|
39980 | auml: auml$1,
|
39981 | brvbar: brvbar$1,
|
39982 | Ccedil: Ccedil$1,
|
39983 | ccedil: ccedil$1,
|
39984 | cedil: cedil$1,
|
39985 | cent: cent$1,
|
39986 | copy: copy$3,
|
39987 | COPY: COPY$1,
|
39988 | curren: curren$1,
|
39989 | deg: deg$1,
|
39990 | divide: divide$1,
|
39991 | Eacute: Eacute$1,
|
39992 | eacute: eacute$1,
|
39993 | Ecirc: Ecirc$1,
|
39994 | ecirc: ecirc$1,
|
39995 | Egrave: Egrave$1,
|
39996 | egrave: egrave$1,
|
39997 | ETH: ETH$1,
|
39998 | eth: eth$1,
|
39999 | Euml: Euml$1,
|
40000 | euml: euml$1,
|
40001 | frac12: frac12$1,
|
40002 | frac14: frac14$1,
|
40003 | frac34: frac34$1,
|
40004 | gt: gt$1,
|
40005 | GT: GT$1,
|
40006 | Iacute: Iacute$1,
|
40007 | iacute: iacute$1,
|
40008 | Icirc: Icirc$1,
|
40009 | icirc: icirc$1,
|
40010 | iexcl: iexcl$1,
|
40011 | Igrave: Igrave$1,
|
40012 | igrave: igrave$1,
|
40013 | iquest: iquest$1,
|
40014 | Iuml: Iuml$1,
|
40015 | iuml: iuml$1,
|
40016 | laquo: laquo$1,
|
40017 | lt: lt$1,
|
40018 | LT: LT$1,
|
40019 | macr: macr$1,
|
40020 | micro: micro$1,
|
40021 | middot: middot$1,
|
40022 | nbsp: nbsp$1,
|
40023 | not: not$2,
|
40024 | Ntilde: Ntilde$1,
|
40025 | ntilde: ntilde$1,
|
40026 | Oacute: Oacute$1,
|
40027 | oacute: oacute$1,
|
40028 | Ocirc: Ocirc$1,
|
40029 | ocirc: ocirc$1,
|
40030 | Ograve: Ograve$1,
|
40031 | ograve: ograve$1,
|
40032 | ordf: ordf$1,
|
40033 | ordm: ordm$1,
|
40034 | Oslash: Oslash$1,
|
40035 | oslash: oslash$1,
|
40036 | Otilde: Otilde$1,
|
40037 | otilde: otilde$1,
|
40038 | Ouml: Ouml$1,
|
40039 | ouml: ouml$1,
|
40040 | para: para$1,
|
40041 | plusmn: plusmn$1,
|
40042 | pound: pound$1,
|
40043 | quot: quot$1,
|
40044 | QUOT: QUOT$1,
|
40045 | raquo: raquo$1,
|
40046 | reg: reg$1,
|
40047 | REG: REG$1,
|
40048 | sect: sect$1,
|
40049 | shy: shy$1,
|
40050 | sup1: sup1$1,
|
40051 | sup2: sup2$1,
|
40052 | sup3: sup3$1,
|
40053 | szlig: szlig$1,
|
40054 | THORN: THORN$1,
|
40055 | thorn: thorn$1,
|
40056 | times: times$1,
|
40057 | Uacute: Uacute$1,
|
40058 | uacute: uacute$1,
|
40059 | Ucirc: Ucirc$1,
|
40060 | ucirc: ucirc$1,
|
40061 | Ugrave: Ugrave$1,
|
40062 | ugrave: ugrave$1,
|
40063 | uml: uml$1,
|
40064 | Uuml: Uuml$1,
|
40065 | uuml: uuml$1,
|
40066 | Yacute: Yacute$1,
|
40067 | yacute: yacute$1,
|
40068 | yen: yen$1,
|
40069 | yuml: yuml$1
|
40070 | };
|
40071 |
|
40072 | var amp$2 = "&";
|
40073 | var apos$1 = "'";
|
40074 | var gt$2 = ">";
|
40075 | var lt$2 = "<";
|
40076 | var quot$2 = "\"";
|
40077 | var require$$0$1 = {
|
40078 | amp: amp$2,
|
40079 | apos: apos$1,
|
40080 | gt: gt$2,
|
40081 | lt: lt$2,
|
40082 | quot: quot$2
|
40083 | };
|
40084 |
|
40085 | var require$$0$2 = {
|
40086 | "0": 65533,
|
40087 | "128": 8364,
|
40088 | "130": 8218,
|
40089 | "131": 402,
|
40090 | "132": 8222,
|
40091 | "133": 8230,
|
40092 | "134": 8224,
|
40093 | "135": 8225,
|
40094 | "136": 710,
|
40095 | "137": 8240,
|
40096 | "138": 352,
|
40097 | "139": 8249,
|
40098 | "140": 338,
|
40099 | "142": 381,
|
40100 | "145": 8216,
|
40101 | "146": 8217,
|
40102 | "147": 8220,
|
40103 | "148": 8221,
|
40104 | "149": 8226,
|
40105 | "150": 8211,
|
40106 | "151": 8212,
|
40107 | "152": 732,
|
40108 | "153": 8482,
|
40109 | "154": 353,
|
40110 | "155": 8250,
|
40111 | "156": 339,
|
40112 | "158": 382,
|
40113 | "159": 376
|
40114 | };
|
40115 |
|
40116 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
40117 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
40118 | };
|
40119 |
|
40120 | var decode_json_1 = __importDefault(require$$0$2);
|
40121 |
|
40122 | var fromCodePoint =
|
40123 |
|
40124 | String.fromCodePoint ||
|
40125 | function (codePoint) {
|
40126 | var output = "";
|
40127 | if (codePoint > 0xffff) {
|
40128 | codePoint -= 0x10000;
|
40129 | output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);
|
40130 | codePoint = 0xdc00 | (codePoint & 0x3ff);
|
40131 | }
|
40132 | output += String.fromCharCode(codePoint);
|
40133 | return output;
|
40134 | };
|
40135 | function decodeCodePoint(codePoint) {
|
40136 | if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {
|
40137 | return "\uFFFD";
|
40138 | }
|
40139 | if (codePoint in decode_json_1.default) {
|
40140 | codePoint = decode_json_1.default[codePoint];
|
40141 | }
|
40142 | return fromCodePoint(codePoint);
|
40143 | }
|
40144 | var _default$1 = decodeCodePoint;
|
40145 |
|
40146 | var decode_codepoint = Object.defineProperty({
|
40147 | default: _default$1
|
40148 | }, '__esModule', {value: true});
|
40149 |
|
40150 | var decode$2 = createCommonjsModule(function (module, exports) {
|
40151 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
40152 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
40153 | };
|
40154 | Object.defineProperty(exports, "__esModule", { value: true });
|
40155 | exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0;
|
40156 | var entities_json_1 = __importDefault(require$$1);
|
40157 | var legacy_json_1 = __importDefault(require$$1$1);
|
40158 | var xml_json_1 = __importDefault(require$$0$1);
|
40159 | var decode_codepoint_1 = __importDefault(decode_codepoint);
|
40160 | var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;
|
40161 | exports.decodeXML = getStrictDecoder(xml_json_1.default);
|
40162 | exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default);
|
40163 | function getStrictDecoder(map) {
|
40164 | var replace = getReplacer(map);
|
40165 | return function (str) { return String(str).replace(strictEntityRe, replace); };
|
40166 | }
|
40167 | var sorter = function (a, b) { return (a < b ? 1 : -1); };
|
40168 | exports.decodeHTML = (function () {
|
40169 | var legacy = Object.keys(legacy_json_1.default).sort(sorter);
|
40170 | var keys = Object.keys(entities_json_1.default).sort(sorter);
|
40171 | for (var i = 0, j = 0; i < keys.length; i++) {
|
40172 | if (legacy[j] === keys[i]) {
|
40173 | keys[i] += ";?";
|
40174 | j++;
|
40175 | }
|
40176 | else {
|
40177 | keys[i] += ";";
|
40178 | }
|
40179 | }
|
40180 | var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g");
|
40181 | var replace = getReplacer(entities_json_1.default);
|
40182 | function replacer(str) {
|
40183 | if (str.substr(-1) !== ";")
|
40184 | str += ";";
|
40185 | return replace(str);
|
40186 | }
|
40187 |
|
40188 | return function (str) { return String(str).replace(re, replacer); };
|
40189 | })();
|
40190 | function getReplacer(map) {
|
40191 | return function replace(str) {
|
40192 | if (str.charAt(1) === "#") {
|
40193 | var secondChar = str.charAt(2);
|
40194 | if (secondChar === "X" || secondChar === "x") {
|
40195 | return decode_codepoint_1.default(parseInt(str.substr(3), 16));
|
40196 | }
|
40197 | return decode_codepoint_1.default(parseInt(str.substr(2), 10));
|
40198 | }
|
40199 |
|
40200 | return map[str.slice(1, -1)] || str;
|
40201 | };
|
40202 | }
|
40203 | });
|
40204 |
|
40205 | var encode$2 = createCommonjsModule(function (module, exports) {
|
40206 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
40207 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
40208 | };
|
40209 | Object.defineProperty(exports, "__esModule", { value: true });
|
40210 | exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0;
|
40211 | var xml_json_1 = __importDefault(require$$0$1);
|
40212 | var inverseXML = getInverseObj(xml_json_1.default);
|
40213 | var xmlReplacer = getInverseReplacer(inverseXML);
|
40214 |
|
40215 |
|
40216 |
|
40217 |
|
40218 |
|
40219 |
|
40220 |
|
40221 | exports.encodeXML = getASCIIEncoder(inverseXML);
|
40222 | var entities_json_1 = __importDefault(require$$1);
|
40223 | var inverseHTML = getInverseObj(entities_json_1.default);
|
40224 | var htmlReplacer = getInverseReplacer(inverseHTML);
|
40225 |
|
40226 |
|
40227 |
|
40228 |
|
40229 |
|
40230 |
|
40231 |
|
40232 |
|
40233 |
|
40234 |
|
40235 | exports.encodeHTML = getInverse(inverseHTML, htmlReplacer);
|
40236 |
|
40237 |
|
40238 |
|
40239 |
|
40240 |
|
40241 |
|
40242 |
|
40243 | exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML);
|
40244 | function getInverseObj(obj) {
|
40245 | return Object.keys(obj)
|
40246 | .sort()
|
40247 | .reduce(function (inverse, name) {
|
40248 | inverse[obj[name]] = "&" + name + ";";
|
40249 | return inverse;
|
40250 | }, {});
|
40251 | }
|
40252 | function getInverseReplacer(inverse) {
|
40253 | var single = [];
|
40254 | var multiple = [];
|
40255 | for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) {
|
40256 | var k = _a[_i];
|
40257 | if (k.length === 1) {
|
40258 |
|
40259 | single.push("\\" + k);
|
40260 | }
|
40261 | else {
|
40262 |
|
40263 | multiple.push(k);
|
40264 | }
|
40265 | }
|
40266 |
|
40267 | single.sort();
|
40268 | for (var start = 0; start < single.length - 1; start++) {
|
40269 |
|
40270 | var end = start;
|
40271 | while (end < single.length - 1 &&
|
40272 | single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) {
|
40273 | end += 1;
|
40274 | }
|
40275 | var count = 1 + end - start;
|
40276 |
|
40277 | if (count < 3)
|
40278 | continue;
|
40279 | single.splice(start, count, single[start] + "-" + single[end]);
|
40280 | }
|
40281 | multiple.unshift("[" + single.join("") + "]");
|
40282 | return new RegExp(multiple.join("|"), "g");
|
40283 | }
|
40284 |
|
40285 | var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g;
|
40286 | var getCodePoint =
|
40287 |
|
40288 | String.prototype.codePointAt != null
|
40289 | ?
|
40290 | function (str) { return str.codePointAt(0); }
|
40291 | :
|
40292 | function (c) {
|
40293 | return (c.charCodeAt(0) - 0xd800) * 0x400 +
|
40294 | c.charCodeAt(1) -
|
40295 | 0xdc00 +
|
40296 | 0x10000;
|
40297 | };
|
40298 | function singleCharReplacer(c) {
|
40299 | return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0))
|
40300 | .toString(16)
|
40301 | .toUpperCase() + ";";
|
40302 | }
|
40303 | function getInverse(inverse, re) {
|
40304 | return function (data) {
|
40305 | return data
|
40306 | .replace(re, function (name) { return inverse[name]; })
|
40307 | .replace(reNonASCII, singleCharReplacer);
|
40308 | };
|
40309 | }
|
40310 | var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g");
|
40311 |
|
40312 |
|
40313 |
|
40314 |
|
40315 |
|
40316 |
|
40317 |
|
40318 |
|
40319 |
|
40320 | function escape(data) {
|
40321 | return data.replace(reEscapeChars, singleCharReplacer);
|
40322 | }
|
40323 | exports.escape = escape;
|
40324 |
|
40325 |
|
40326 |
|
40327 |
|
40328 |
|
40329 |
|
40330 |
|
40331 |
|
40332 | function escapeUTF8(data) {
|
40333 | return data.replace(xmlReplacer, singleCharReplacer);
|
40334 | }
|
40335 | exports.escapeUTF8 = escapeUTF8;
|
40336 | function getASCIIEncoder(obj) {
|
40337 | return function (data) {
|
40338 | return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); });
|
40339 | };
|
40340 | }
|
40341 | });
|
40342 |
|
40343 | var lib$3 = createCommonjsModule(function (module, exports) {
|
40344 | Object.defineProperty(exports, "__esModule", { value: true });
|
40345 | exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0;
|
40346 |
|
40347 |
|
40348 |
|
40349 |
|
40350 |
|
40351 |
|
40352 |
|
40353 |
|
40354 |
|
40355 | function decode(data, level) {
|
40356 | return (!level || level <= 0 ? decode$2.decodeXML : decode$2.decodeHTML)(data);
|
40357 | }
|
40358 | exports.decode = decode;
|
40359 |
|
40360 |
|
40361 |
|
40362 |
|
40363 |
|
40364 |
|
40365 |
|
40366 | function decodeStrict(data, level) {
|
40367 | return (!level || level <= 0 ? decode$2.decodeXML : decode$2.decodeHTMLStrict)(data);
|
40368 | }
|
40369 | exports.decodeStrict = decodeStrict;
|
40370 |
|
40371 |
|
40372 |
|
40373 |
|
40374 |
|
40375 |
|
40376 |
|
40377 | function encode(data, level) {
|
40378 | return (!level || level <= 0 ? encode$2.encodeXML : encode$2.encodeHTML)(data);
|
40379 | }
|
40380 | exports.encode = encode;
|
40381 | var encode_2 = encode$2;
|
40382 | Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return encode_2.encodeXML; } });
|
40383 | Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_2.encodeHTML; } });
|
40384 | Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } });
|
40385 | Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return encode_2.escape; } });
|
40386 | Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return encode_2.escapeUTF8; } });
|
40387 |
|
40388 | Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_2.encodeHTML; } });
|
40389 | Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_2.encodeHTML; } });
|
40390 | var decode_2 = decode$2;
|
40391 | Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_2.decodeXML; } });
|
40392 | Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_2.decodeHTML; } });
|
40393 | Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });
|
40394 |
|
40395 | Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_2.decodeHTML; } });
|
40396 | Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_2.decodeHTML; } });
|
40397 | Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });
|
40398 | Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } });
|
40399 | Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_2.decodeXML; } });
|
40400 | });
|
40401 |
|
40402 | var foreignNames = createCommonjsModule(function (module, exports) {
|
40403 | Object.defineProperty(exports, "__esModule", { value: true });
|
40404 | exports.attributeNames = exports.elementNames = void 0;
|
40405 | exports.elementNames = new Map([
|
40406 | ["altglyph", "altGlyph"],
|
40407 | ["altglyphdef", "altGlyphDef"],
|
40408 | ["altglyphitem", "altGlyphItem"],
|
40409 | ["animatecolor", "animateColor"],
|
40410 | ["animatemotion", "animateMotion"],
|
40411 | ["animatetransform", "animateTransform"],
|
40412 | ["clippath", "clipPath"],
|
40413 | ["feblend", "feBlend"],
|
40414 | ["fecolormatrix", "feColorMatrix"],
|
40415 | ["fecomponenttransfer", "feComponentTransfer"],
|
40416 | ["fecomposite", "feComposite"],
|
40417 | ["feconvolvematrix", "feConvolveMatrix"],
|
40418 | ["fediffuselighting", "feDiffuseLighting"],
|
40419 | ["fedisplacementmap", "feDisplacementMap"],
|
40420 | ["fedistantlight", "feDistantLight"],
|
40421 | ["fedropshadow", "feDropShadow"],
|
40422 | ["feflood", "feFlood"],
|
40423 | ["fefunca", "feFuncA"],
|
40424 | ["fefuncb", "feFuncB"],
|
40425 | ["fefuncg", "feFuncG"],
|
40426 | ["fefuncr", "feFuncR"],
|
40427 | ["fegaussianblur", "feGaussianBlur"],
|
40428 | ["feimage", "feImage"],
|
40429 | ["femerge", "feMerge"],
|
40430 | ["femergenode", "feMergeNode"],
|
40431 | ["femorphology", "feMorphology"],
|
40432 | ["feoffset", "feOffset"],
|
40433 | ["fepointlight", "fePointLight"],
|
40434 | ["fespecularlighting", "feSpecularLighting"],
|
40435 | ["fespotlight", "feSpotLight"],
|
40436 | ["fetile", "feTile"],
|
40437 | ["feturbulence", "feTurbulence"],
|
40438 | ["foreignobject", "foreignObject"],
|
40439 | ["glyphref", "glyphRef"],
|
40440 | ["lineargradient", "linearGradient"],
|
40441 | ["radialgradient", "radialGradient"],
|
40442 | ["textpath", "textPath"],
|
40443 | ]);
|
40444 | exports.attributeNames = new Map([
|
40445 | ["definitionurl", "definitionURL"],
|
40446 | ["attributename", "attributeName"],
|
40447 | ["attributetype", "attributeType"],
|
40448 | ["basefrequency", "baseFrequency"],
|
40449 | ["baseprofile", "baseProfile"],
|
40450 | ["calcmode", "calcMode"],
|
40451 | ["clippathunits", "clipPathUnits"],
|
40452 | ["diffuseconstant", "diffuseConstant"],
|
40453 | ["edgemode", "edgeMode"],
|
40454 | ["filterunits", "filterUnits"],
|
40455 | ["glyphref", "glyphRef"],
|
40456 | ["gradienttransform", "gradientTransform"],
|
40457 | ["gradientunits", "gradientUnits"],
|
40458 | ["kernelmatrix", "kernelMatrix"],
|
40459 | ["kernelunitlength", "kernelUnitLength"],
|
40460 | ["keypoints", "keyPoints"],
|
40461 | ["keysplines", "keySplines"],
|
40462 | ["keytimes", "keyTimes"],
|
40463 | ["lengthadjust", "lengthAdjust"],
|
40464 | ["limitingconeangle", "limitingConeAngle"],
|
40465 | ["markerheight", "markerHeight"],
|
40466 | ["markerunits", "markerUnits"],
|
40467 | ["markerwidth", "markerWidth"],
|
40468 | ["maskcontentunits", "maskContentUnits"],
|
40469 | ["maskunits", "maskUnits"],
|
40470 | ["numoctaves", "numOctaves"],
|
40471 | ["pathlength", "pathLength"],
|
40472 | ["patterncontentunits", "patternContentUnits"],
|
40473 | ["patterntransform", "patternTransform"],
|
40474 | ["patternunits", "patternUnits"],
|
40475 | ["pointsatx", "pointsAtX"],
|
40476 | ["pointsaty", "pointsAtY"],
|
40477 | ["pointsatz", "pointsAtZ"],
|
40478 | ["preservealpha", "preserveAlpha"],
|
40479 | ["preserveaspectratio", "preserveAspectRatio"],
|
40480 | ["primitiveunits", "primitiveUnits"],
|
40481 | ["refx", "refX"],
|
40482 | ["refy", "refY"],
|
40483 | ["repeatcount", "repeatCount"],
|
40484 | ["repeatdur", "repeatDur"],
|
40485 | ["requiredextensions", "requiredExtensions"],
|
40486 | ["requiredfeatures", "requiredFeatures"],
|
40487 | ["specularconstant", "specularConstant"],
|
40488 | ["specularexponent", "specularExponent"],
|
40489 | ["spreadmethod", "spreadMethod"],
|
40490 | ["startoffset", "startOffset"],
|
40491 | ["stddeviation", "stdDeviation"],
|
40492 | ["stitchtiles", "stitchTiles"],
|
40493 | ["surfacescale", "surfaceScale"],
|
40494 | ["systemlanguage", "systemLanguage"],
|
40495 | ["tablevalues", "tableValues"],
|
40496 | ["targetx", "targetX"],
|
40497 | ["targety", "targetY"],
|
40498 | ["textlength", "textLength"],
|
40499 | ["viewbox", "viewBox"],
|
40500 | ["viewtarget", "viewTarget"],
|
40501 | ["xchannelselector", "xChannelSelector"],
|
40502 | ["ychannelselector", "yChannelSelector"],
|
40503 | ["zoomandpan", "zoomAndPan"],
|
40504 | ]);
|
40505 | });
|
40506 |
|
40507 | var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
40508 | __assign = Object.assign || function(t) {
|
40509 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
40510 | s = arguments[i];
|
40511 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
40512 | t[p] = s[p];
|
40513 | }
|
40514 | return t;
|
40515 | };
|
40516 | return __assign.apply(this, arguments);
|
40517 | };
|
40518 | var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
40519 | if (k2 === undefined) k2 = k;
|
40520 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
40521 | }) : (function(o, m, k, k2) {
|
40522 | if (k2 === undefined) k2 = k;
|
40523 | o[k2] = m[k];
|
40524 | }));
|
40525 | var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
40526 | Object.defineProperty(o, "default", { enumerable: true, value: v });
|
40527 | }) : function(o, v) {
|
40528 | o["default"] = v;
|
40529 | });
|
40530 | var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
40531 | if (mod && mod.__esModule) return mod;
|
40532 | var result = {};
|
40533 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
40534 | __setModuleDefault(result, mod);
|
40535 | return result;
|
40536 | };
|
40537 |
|
40538 |
|
40539 |
|
40540 |
|
40541 | var ElementType = __importStar(lib$2);
|
40542 |
|
40543 |
|
40544 |
|
40545 |
|
40546 |
|
40547 |
|
40548 |
|
40549 | var unencodedElements = new Set([
|
40550 | "style",
|
40551 | "script",
|
40552 | "xmp",
|
40553 | "iframe",
|
40554 | "noembed",
|
40555 | "noframes",
|
40556 | "plaintext",
|
40557 | "noscript",
|
40558 | ]);
|
40559 |
|
40560 |
|
40561 |
|
40562 | function formatAttributes(attributes, opts) {
|
40563 | if (!attributes)
|
40564 | return;
|
40565 | return Object.keys(attributes)
|
40566 | .map(function (key) {
|
40567 | var _a, _b;
|
40568 | var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
|
40569 | if (opts.xmlMode === "foreign") {
|
40570 |
|
40571 | key = (_b = foreignNames.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
|
40572 | }
|
40573 | if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
|
40574 | return key;
|
40575 | }
|
40576 | return key + "=\"" + (opts.decodeEntities ? lib$3.encodeXML(value) : value.replace(/"/g, """)) + "\"";
|
40577 | })
|
40578 | .join(" ");
|
40579 | }
|
40580 |
|
40581 |
|
40582 |
|
40583 | var singleTag = new Set([
|
40584 | "area",
|
40585 | "base",
|
40586 | "basefont",
|
40587 | "br",
|
40588 | "col",
|
40589 | "command",
|
40590 | "embed",
|
40591 | "frame",
|
40592 | "hr",
|
40593 | "img",
|
40594 | "input",
|
40595 | "isindex",
|
40596 | "keygen",
|
40597 | "link",
|
40598 | "meta",
|
40599 | "param",
|
40600 | "source",
|
40601 | "track",
|
40602 | "wbr",
|
40603 | ]);
|
40604 |
|
40605 |
|
40606 |
|
40607 |
|
40608 |
|
40609 |
|
40610 |
|
40611 |
|
40612 | function render(node, options) {
|
40613 | if (options === void 0) { options = {}; }
|
40614 |
|
40615 | var nodes = Array.isArray(node) || node.cheerio ? node : [node];
|
40616 | var output = "";
|
40617 | for (var i = 0; i < nodes.length; i++) {
|
40618 | output += renderNode(nodes[i], options);
|
40619 | }
|
40620 | return output;
|
40621 | }
|
40622 | var _default$2 = render;
|
40623 | function renderNode(node, options) {
|
40624 | switch (node.type) {
|
40625 | case ElementType.Root:
|
40626 | return render(node.children, options);
|
40627 | case ElementType.Directive:
|
40628 | case ElementType.Doctype:
|
40629 | return renderDirective(node);
|
40630 | case ElementType.Comment:
|
40631 | return renderComment(node);
|
40632 | case ElementType.CDATA:
|
40633 | return renderCdata(node);
|
40634 | case ElementType.Script:
|
40635 | case ElementType.Style:
|
40636 | case ElementType.Tag:
|
40637 | return renderTag(node, options);
|
40638 | case ElementType.Text:
|
40639 | return renderText(node, options);
|
40640 | }
|
40641 | }
|
40642 | var foreignModeIntegrationPoints = new Set([
|
40643 | "mi",
|
40644 | "mo",
|
40645 | "mn",
|
40646 | "ms",
|
40647 | "mtext",
|
40648 | "annotation-xml",
|
40649 | "foreignObject",
|
40650 | "desc",
|
40651 | "title",
|
40652 | ]);
|
40653 | var foreignElements = new Set(["svg", "math"]);
|
40654 | function renderTag(elem, opts) {
|
40655 | var _a;
|
40656 |
|
40657 | if (opts.xmlMode === "foreign") {
|
40658 |
|
40659 | elem.name = (_a = foreignNames.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
|
40660 |
|
40661 | if (elem.parent &&
|
40662 | foreignModeIntegrationPoints.has(elem.parent.name)) {
|
40663 | opts = __assign(__assign({}, opts), { xmlMode: false });
|
40664 | }
|
40665 | }
|
40666 | if (!opts.xmlMode && foreignElements.has(elem.name)) {
|
40667 | opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
|
40668 | }
|
40669 | var tag = "<" + elem.name;
|
40670 | var attribs = formatAttributes(elem.attribs, opts);
|
40671 | if (attribs) {
|
40672 | tag += " " + attribs;
|
40673 | }
|
40674 | if (elem.children.length === 0 &&
|
40675 | (opts.xmlMode
|
40676 | ?
|
40677 | opts.selfClosingTags !== false
|
40678 | :
|
40679 | opts.selfClosingTags && singleTag.has(elem.name))) {
|
40680 | if (!opts.xmlMode)
|
40681 | tag += " ";
|
40682 | tag += "/>";
|
40683 | }
|
40684 | else {
|
40685 | tag += ">";
|
40686 | if (elem.children.length > 0) {
|
40687 | tag += render(elem.children, opts);
|
40688 | }
|
40689 | if (opts.xmlMode || !singleTag.has(elem.name)) {
|
40690 | tag += "</" + elem.name + ">";
|
40691 | }
|
40692 | }
|
40693 | return tag;
|
40694 | }
|
40695 | function renderDirective(elem) {
|
40696 | return "<" + elem.data + ">";
|
40697 | }
|
40698 | function renderText(elem, opts) {
|
40699 | var data = elem.data || "";
|
40700 |
|
40701 | if (opts.decodeEntities &&
|
40702 | !(elem.parent && unencodedElements.has(elem.parent.name))) {
|
40703 | data = lib$3.encodeXML(data);
|
40704 | }
|
40705 | return data;
|
40706 | }
|
40707 | function renderCdata(elem) {
|
40708 | return "<![CDATA[" + elem.children[0].data + "]]>";
|
40709 | }
|
40710 | function renderComment(elem) {
|
40711 | return "<!--" + elem.data + "-->";
|
40712 | }
|
40713 |
|
40714 | var lib$4 = Object.defineProperty({
|
40715 | default: _default$2
|
40716 | }, '__esModule', {value: true});
|
40717 |
|
40718 | var stringify = createCommonjsModule(function (module, exports) {
|
40719 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
40720 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
40721 | };
|
40722 | Object.defineProperty(exports, "__esModule", { value: true });
|
40723 | exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;
|
40724 |
|
40725 | var dom_serializer_1 = __importDefault(lib$4);
|
40726 |
|
40727 |
|
40728 |
|
40729 |
|
40730 |
|
40731 |
|
40732 | function getOuterHTML(node, options) {
|
40733 | return dom_serializer_1.default(node, options);
|
40734 | }
|
40735 | exports.getOuterHTML = getOuterHTML;
|
40736 |
|
40737 |
|
40738 |
|
40739 |
|
40740 |
|
40741 |
|
40742 | function getInnerHTML(node, options) {
|
40743 | return tagtypes.hasChildren(node)
|
40744 | ? node.children.map(function (node) { return getOuterHTML(node, options); }).join("")
|
40745 | : "";
|
40746 | }
|
40747 | exports.getInnerHTML = getInnerHTML;
|
40748 |
|
40749 |
|
40750 |
|
40751 |
|
40752 |
|
40753 |
|
40754 | function getText(node) {
|
40755 | if (Array.isArray(node))
|
40756 | return node.map(getText).join("");
|
40757 | if (tagtypes.isTag(node))
|
40758 | return node.name === "br" ? "\n" : getText(node.children);
|
40759 | if (tagtypes.isCDATA(node))
|
40760 | return getText(node.children);
|
40761 | if (tagtypes.isText(node))
|
40762 | return node.data;
|
40763 | return "";
|
40764 | }
|
40765 | exports.getText = getText;
|
40766 | });
|
40767 |
|
40768 | var traversal = createCommonjsModule(function (module, exports) {
|
40769 | Object.defineProperty(exports, "__esModule", { value: true });
|
40770 | exports.nextElementSibling = exports.getName = exports.hasAttrib = exports.getAttributeValue = exports.getSiblings = exports.getParent = exports.getChildren = void 0;
|
40771 |
|
40772 | var emptyArray = [];
|
40773 |
|
40774 |
|
40775 |
|
40776 |
|
40777 |
|
40778 |
|
40779 | function getChildren(elem) {
|
40780 | var _a;
|
40781 | return (_a = elem.children) !== null && _a !== void 0 ? _a : emptyArray;
|
40782 | }
|
40783 | exports.getChildren = getChildren;
|
40784 |
|
40785 |
|
40786 |
|
40787 |
|
40788 |
|
40789 |
|
40790 | function getParent(elem) {
|
40791 | return elem.parent || null;
|
40792 | }
|
40793 | exports.getParent = getParent;
|
40794 |
|
40795 |
|
40796 |
|
40797 |
|
40798 |
|
40799 |
|
40800 |
|
40801 |
|
40802 |
|
40803 |
|
40804 | function getSiblings(elem) {
|
40805 | var _a, _b;
|
40806 | var parent = getParent(elem);
|
40807 | if (parent != null)
|
40808 | return getChildren(parent);
|
40809 | var siblings = [elem];
|
40810 | var prev = elem.prev, next = elem.next;
|
40811 | while (prev != null) {
|
40812 | siblings.unshift(prev);
|
40813 | (_a = prev, prev = _a.prev);
|
40814 | }
|
40815 | while (next != null) {
|
40816 | siblings.push(next);
|
40817 | (_b = next, next = _b.next);
|
40818 | }
|
40819 | return siblings;
|
40820 | }
|
40821 | exports.getSiblings = getSiblings;
|
40822 |
|
40823 |
|
40824 |
|
40825 |
|
40826 |
|
40827 |
|
40828 |
|
40829 | function getAttributeValue(elem, name) {
|
40830 | var _a;
|
40831 | return (_a = elem.attribs) === null || _a === void 0 ? void 0 : _a[name];
|
40832 | }
|
40833 | exports.getAttributeValue = getAttributeValue;
|
40834 |
|
40835 |
|
40836 |
|
40837 |
|
40838 |
|
40839 |
|
40840 |
|
40841 | function hasAttrib(elem, name) {
|
40842 | return (elem.attribs != null &&
|
40843 | Object.prototype.hasOwnProperty.call(elem.attribs, name) &&
|
40844 | elem.attribs[name] != null);
|
40845 | }
|
40846 | exports.hasAttrib = hasAttrib;
|
40847 |
|
40848 |
|
40849 |
|
40850 |
|
40851 |
|
40852 |
|
40853 | function getName(elem) {
|
40854 | return elem.name;
|
40855 | }
|
40856 | exports.getName = getName;
|
40857 |
|
40858 |
|
40859 |
|
40860 |
|
40861 |
|
40862 |
|
40863 | function nextElementSibling(elem) {
|
40864 | var _a;
|
40865 | var next = elem.next;
|
40866 | while (next !== null && !tagtypes.isTag(next))
|
40867 | (_a = next, next = _a.next);
|
40868 | return next;
|
40869 | }
|
40870 | exports.nextElementSibling = nextElementSibling;
|
40871 | });
|
40872 |
|
40873 | var manipulation = createCommonjsModule(function (module, exports) {
|
40874 | Object.defineProperty(exports, "__esModule", { value: true });
|
40875 | exports.prepend = exports.prependChild = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0;
|
40876 |
|
40877 |
|
40878 |
|
40879 |
|
40880 |
|
40881 | function removeElement(elem) {
|
40882 | if (elem.prev)
|
40883 | elem.prev.next = elem.next;
|
40884 | if (elem.next)
|
40885 | elem.next.prev = elem.prev;
|
40886 | if (elem.parent) {
|
40887 | var childs = elem.parent.children;
|
40888 | childs.splice(childs.lastIndexOf(elem), 1);
|
40889 | }
|
40890 | }
|
40891 | exports.removeElement = removeElement;
|
40892 |
|
40893 |
|
40894 |
|
40895 |
|
40896 |
|
40897 |
|
40898 | function replaceElement(elem, replacement) {
|
40899 | var prev = (replacement.prev = elem.prev);
|
40900 | if (prev) {
|
40901 | prev.next = replacement;
|
40902 | }
|
40903 | var next = (replacement.next = elem.next);
|
40904 | if (next) {
|
40905 | next.prev = replacement;
|
40906 | }
|
40907 | var parent = (replacement.parent = elem.parent);
|
40908 | if (parent) {
|
40909 | var childs = parent.children;
|
40910 | childs[childs.lastIndexOf(elem)] = replacement;
|
40911 | }
|
40912 | }
|
40913 | exports.replaceElement = replaceElement;
|
40914 |
|
40915 |
|
40916 |
|
40917 |
|
40918 |
|
40919 |
|
40920 | function appendChild(elem, child) {
|
40921 | removeElement(child);
|
40922 | child.next = null;
|
40923 | child.parent = elem;
|
40924 | if (elem.children.push(child) > 1) {
|
40925 | var sibling = elem.children[elem.children.length - 2];
|
40926 | sibling.next = child;
|
40927 | child.prev = sibling;
|
40928 | }
|
40929 | else {
|
40930 | child.prev = null;
|
40931 | }
|
40932 | }
|
40933 | exports.appendChild = appendChild;
|
40934 |
|
40935 |
|
40936 |
|
40937 |
|
40938 |
|
40939 |
|
40940 | function append(elem, next) {
|
40941 | removeElement(next);
|
40942 | var parent = elem.parent;
|
40943 | var currNext = elem.next;
|
40944 | next.next = currNext;
|
40945 | next.prev = elem;
|
40946 | elem.next = next;
|
40947 | next.parent = parent;
|
40948 | if (currNext) {
|
40949 | currNext.prev = next;
|
40950 | if (parent) {
|
40951 | var childs = parent.children;
|
40952 | childs.splice(childs.lastIndexOf(currNext), 0, next);
|
40953 | }
|
40954 | }
|
40955 | else if (parent) {
|
40956 | parent.children.push(next);
|
40957 | }
|
40958 | }
|
40959 | exports.append = append;
|
40960 |
|
40961 |
|
40962 |
|
40963 |
|
40964 |
|
40965 |
|
40966 | function prependChild(elem, child) {
|
40967 | removeElement(child);
|
40968 | child.parent = elem;
|
40969 | child.prev = null;
|
40970 | if (elem.children.unshift(child) !== 1) {
|
40971 | var sibling = elem.children[1];
|
40972 | sibling.prev = child;
|
40973 | child.next = sibling;
|
40974 | }
|
40975 | else {
|
40976 | child.next = null;
|
40977 | }
|
40978 | }
|
40979 | exports.prependChild = prependChild;
|
40980 |
|
40981 |
|
40982 |
|
40983 |
|
40984 |
|
40985 |
|
40986 | function prepend(elem, prev) {
|
40987 | removeElement(prev);
|
40988 | var parent = elem.parent;
|
40989 | if (parent) {
|
40990 | var childs = parent.children;
|
40991 | childs.splice(childs.indexOf(elem), 0, prev);
|
40992 | }
|
40993 | if (elem.prev) {
|
40994 | elem.prev.next = prev;
|
40995 | }
|
40996 | prev.parent = parent;
|
40997 | prev.prev = elem.prev;
|
40998 | prev.next = elem;
|
40999 | elem.prev = prev;
|
41000 | }
|
41001 | exports.prepend = prepend;
|
41002 | });
|
41003 |
|
41004 | var querying = createCommonjsModule(function (module, exports) {
|
41005 | Object.defineProperty(exports, "__esModule", { value: true });
|
41006 | exports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;
|
41007 |
|
41008 |
|
41009 |
|
41010 |
|
41011 |
|
41012 |
|
41013 |
|
41014 |
|
41015 |
|
41016 |
|
41017 | function filter(test, node, recurse, limit) {
|
41018 | if (recurse === void 0) { recurse = true; }
|
41019 | if (limit === void 0) { limit = Infinity; }
|
41020 | if (!Array.isArray(node))
|
41021 | node = [node];
|
41022 | return find(test, node, recurse, limit);
|
41023 | }
|
41024 | exports.filter = filter;
|
41025 |
|
41026 |
|
41027 |
|
41028 |
|
41029 |
|
41030 |
|
41031 |
|
41032 |
|
41033 |
|
41034 | function find(test, nodes, recurse, limit) {
|
41035 | var result = [];
|
41036 | for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
|
41037 | var elem = nodes_1[_i];
|
41038 | if (test(elem)) {
|
41039 | result.push(elem);
|
41040 | if (--limit <= 0)
|
41041 | break;
|
41042 | }
|
41043 | if (recurse && tagtypes.hasChildren(elem) && elem.children.length > 0) {
|
41044 | var children = find(test, elem.children, recurse, limit);
|
41045 | result.push.apply(result, children);
|
41046 | limit -= children.length;
|
41047 | if (limit <= 0)
|
41048 | break;
|
41049 | }
|
41050 | }
|
41051 | return result;
|
41052 | }
|
41053 | exports.find = find;
|
41054 |
|
41055 |
|
41056 |
|
41057 |
|
41058 |
|
41059 |
|
41060 |
|
41061 | function findOneChild(test, nodes) {
|
41062 | return nodes.find(test);
|
41063 | }
|
41064 | exports.findOneChild = findOneChild;
|
41065 |
|
41066 |
|
41067 |
|
41068 |
|
41069 |
|
41070 |
|
41071 |
|
41072 |
|
41073 | function findOne(test, nodes, recurse) {
|
41074 | if (recurse === void 0) { recurse = true; }
|
41075 | var elem = null;
|
41076 | for (var i = 0; i < nodes.length && !elem; i++) {
|
41077 | var checked = nodes[i];
|
41078 | if (!tagtypes.isTag(checked)) {
|
41079 | continue;
|
41080 | }
|
41081 | else if (test(checked)) {
|
41082 | elem = checked;
|
41083 | }
|
41084 | else if (recurse && checked.children.length > 0) {
|
41085 | elem = findOne(test, checked.children);
|
41086 | }
|
41087 | }
|
41088 | return elem;
|
41089 | }
|
41090 | exports.findOne = findOne;
|
41091 |
|
41092 |
|
41093 |
|
41094 |
|
41095 |
|
41096 | function existsOne(test, nodes) {
|
41097 | return nodes.some(function (checked) {
|
41098 | return tagtypes.isTag(checked) &&
|
41099 | (test(checked) ||
|
41100 | (checked.children.length > 0 &&
|
41101 | existsOne(test, checked.children)));
|
41102 | });
|
41103 | }
|
41104 | exports.existsOne = existsOne;
|
41105 |
|
41106 |
|
41107 |
|
41108 |
|
41109 |
|
41110 |
|
41111 |
|
41112 |
|
41113 |
|
41114 | function findAll(test, nodes) {
|
41115 | var _a;
|
41116 | var result = [];
|
41117 | var stack = nodes.filter(tagtypes.isTag);
|
41118 | var elem;
|
41119 | while ((elem = stack.shift())) {
|
41120 | var children = (_a = elem.children) === null || _a === void 0 ? void 0 : _a.filter(tagtypes.isTag);
|
41121 | if (children && children.length > 0) {
|
41122 | stack.unshift.apply(stack, children);
|
41123 | }
|
41124 | if (test(elem))
|
41125 | result.push(elem);
|
41126 | }
|
41127 | return result;
|
41128 | }
|
41129 | exports.findAll = findAll;
|
41130 | });
|
41131 |
|
41132 | var legacy = createCommonjsModule(function (module, exports) {
|
41133 | Object.defineProperty(exports, "__esModule", { value: true });
|
41134 | exports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;
|
41135 |
|
41136 |
|
41137 | var Checks = {
|
41138 | tag_name: function (name) {
|
41139 | if (typeof name === "function") {
|
41140 | return function (elem) { return tagtypes.isTag(elem) && name(elem.name); };
|
41141 | }
|
41142 | else if (name === "*") {
|
41143 | return tagtypes.isTag;
|
41144 | }
|
41145 | return function (elem) { return tagtypes.isTag(elem) && elem.name === name; };
|
41146 | },
|
41147 | tag_type: function (type) {
|
41148 | if (typeof type === "function") {
|
41149 | return function (elem) { return type(elem.type); };
|
41150 | }
|
41151 | return function (elem) { return elem.type === type; };
|
41152 | },
|
41153 | tag_contains: function (data) {
|
41154 | if (typeof data === "function") {
|
41155 | return function (elem) { return tagtypes.isText(elem) && data(elem.data); };
|
41156 | }
|
41157 | return function (elem) { return tagtypes.isText(elem) && elem.data === data; };
|
41158 | },
|
41159 | };
|
41160 |
|
41161 |
|
41162 |
|
41163 |
|
41164 |
|
41165 | function getAttribCheck(attrib, value) {
|
41166 | if (typeof value === "function") {
|
41167 | return function (elem) { return tagtypes.isTag(elem) && value(elem.attribs[attrib]); };
|
41168 | }
|
41169 | return function (elem) { return tagtypes.isTag(elem) && elem.attribs[attrib] === value; };
|
41170 | }
|
41171 |
|
41172 |
|
41173 |
|
41174 |
|
41175 |
|
41176 |
|
41177 | function combineFuncs(a, b) {
|
41178 | return function (elem) { return a(elem) || b(elem); };
|
41179 | }
|
41180 |
|
41181 |
|
41182 |
|
41183 |
|
41184 |
|
41185 | function compileTest(options) {
|
41186 | var funcs = Object.keys(options).map(function (key) {
|
41187 | var value = options[key];
|
41188 | return key in Checks
|
41189 | ? Checks[key](value)
|
41190 | : getAttribCheck(key, value);
|
41191 | });
|
41192 | return funcs.length === 0 ? null : funcs.reduce(combineFuncs);
|
41193 | }
|
41194 |
|
41195 |
|
41196 |
|
41197 |
|
41198 |
|
41199 | function testElement(options, node) {
|
41200 | var test = compileTest(options);
|
41201 | return test ? test(node) : true;
|
41202 | }
|
41203 | exports.testElement = testElement;
|
41204 |
|
41205 |
|
41206 |
|
41207 |
|
41208 |
|
41209 |
|
41210 |
|
41211 | function getElements(options, nodes, recurse, limit) {
|
41212 | if (limit === void 0) { limit = Infinity; }
|
41213 | var test = compileTest(options);
|
41214 | return test ? querying.filter(test, nodes, recurse, limit) : [];
|
41215 | }
|
41216 | exports.getElements = getElements;
|
41217 |
|
41218 |
|
41219 |
|
41220 |
|
41221 |
|
41222 |
|
41223 | function getElementById(id, nodes, recurse) {
|
41224 | if (recurse === void 0) { recurse = true; }
|
41225 | if (!Array.isArray(nodes))
|
41226 | nodes = [nodes];
|
41227 | return querying.findOne(getAttribCheck("id", id), nodes, recurse);
|
41228 | }
|
41229 | exports.getElementById = getElementById;
|
41230 |
|
41231 |
|
41232 |
|
41233 |
|
41234 |
|
41235 |
|
41236 |
|
41237 | function getElementsByTagName(tagName, nodes, recurse, limit) {
|
41238 | if (recurse === void 0) { recurse = true; }
|
41239 | if (limit === void 0) { limit = Infinity; }
|
41240 | return querying.filter(Checks.tag_name(tagName), nodes, recurse, limit);
|
41241 | }
|
41242 | exports.getElementsByTagName = getElementsByTagName;
|
41243 |
|
41244 |
|
41245 |
|
41246 |
|
41247 |
|
41248 |
|
41249 |
|
41250 | function getElementsByTagType(type, nodes, recurse, limit) {
|
41251 | if (recurse === void 0) { recurse = true; }
|
41252 | if (limit === void 0) { limit = Infinity; }
|
41253 | return querying.filter(Checks.tag_type(type), nodes, recurse, limit);
|
41254 | }
|
41255 | exports.getElementsByTagType = getElementsByTagType;
|
41256 | });
|
41257 |
|
41258 | var helpers = createCommonjsModule(function (module, exports) {
|
41259 | Object.defineProperty(exports, "__esModule", { value: true });
|
41260 | exports.uniqueSort = exports.compareDocumentPosition = exports.removeSubsets = void 0;
|
41261 |
|
41262 |
|
41263 |
|
41264 |
|
41265 |
|
41266 |
|
41267 |
|
41268 | function removeSubsets(nodes) {
|
41269 | var idx = nodes.length;
|
41270 | |
41271 |
|
41272 |
|
41273 |
|
41274 | while (--idx >= 0) {
|
41275 | var node = nodes[idx];
|
41276 | |
41277 |
|
41278 |
|
41279 |
|
41280 |
|
41281 | if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {
|
41282 | nodes.splice(idx, 1);
|
41283 | continue;
|
41284 | }
|
41285 | for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
|
41286 | if (nodes.includes(ancestor)) {
|
41287 | nodes.splice(idx, 1);
|
41288 | break;
|
41289 | }
|
41290 | }
|
41291 | }
|
41292 | return nodes;
|
41293 | }
|
41294 | exports.removeSubsets = removeSubsets;
|
41295 |
|
41296 |
|
41297 |
|
41298 |
|
41299 |
|
41300 |
|
41301 |
|
41302 |
|
41303 |
|
41304 |
|
41305 |
|
41306 |
|
41307 |
|
41308 |
|
41309 |
|
41310 |
|
41311 |
|
41312 |
|
41313 |
|
41314 |
|
41315 |
|
41316 |
|
41317 |
|
41318 |
|
41319 |
|
41320 | function compareDocumentPosition(nodeA, nodeB) {
|
41321 | var aParents = [];
|
41322 | var bParents = [];
|
41323 | if (nodeA === nodeB) {
|
41324 | return 0;
|
41325 | }
|
41326 | var current = tagtypes.hasChildren(nodeA) ? nodeA : nodeA.parent;
|
41327 | while (current) {
|
41328 | aParents.unshift(current);
|
41329 | current = current.parent;
|
41330 | }
|
41331 | current = tagtypes.hasChildren(nodeB) ? nodeB : nodeB.parent;
|
41332 | while (current) {
|
41333 | bParents.unshift(current);
|
41334 | current = current.parent;
|
41335 | }
|
41336 | var maxIdx = Math.min(aParents.length, bParents.length);
|
41337 | var idx = 0;
|
41338 | while (idx < maxIdx && aParents[idx] === bParents[idx]) {
|
41339 | idx++;
|
41340 | }
|
41341 | if (idx === 0) {
|
41342 | return 1 ;
|
41343 | }
|
41344 | var sharedParent = aParents[idx - 1];
|
41345 | var siblings = sharedParent.children;
|
41346 | var aSibling = aParents[idx];
|
41347 | var bSibling = bParents[idx];
|
41348 | if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
|
41349 | if (sharedParent === nodeB) {
|
41350 | return 4 | 16 ;
|
41351 | }
|
41352 | return 4 ;
|
41353 | }
|
41354 | if (sharedParent === nodeA) {
|
41355 | return 2 | 8 ;
|
41356 | }
|
41357 | return 2 ;
|
41358 | }
|
41359 | exports.compareDocumentPosition = compareDocumentPosition;
|
41360 |
|
41361 |
|
41362 |
|
41363 |
|
41364 |
|
41365 |
|
41366 |
|
41367 |
|
41368 | function uniqueSort(nodes) {
|
41369 | nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); });
|
41370 | nodes.sort(function (a, b) {
|
41371 | var relative = compareDocumentPosition(a, b);
|
41372 | if (relative & 2 ) {
|
41373 | return -1;
|
41374 | }
|
41375 | else if (relative & 4 ) {
|
41376 | return 1;
|
41377 | }
|
41378 | return 0;
|
41379 | });
|
41380 | return nodes;
|
41381 | }
|
41382 | exports.uniqueSort = uniqueSort;
|
41383 | });
|
41384 |
|
41385 | var lib$5 = createCommonjsModule(function (module, exports) {
|
41386 | var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
41387 | if (k2 === undefined) k2 = k;
|
41388 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
41389 | }) : (function(o, m, k, k2) {
|
41390 | if (k2 === undefined) k2 = k;
|
41391 | o[k2] = m[k];
|
41392 | }));
|
41393 | var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
41394 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
41395 | };
|
41396 | Object.defineProperty(exports, "__esModule", { value: true });
|
41397 | __exportStar(stringify, exports);
|
41398 | __exportStar(traversal, exports);
|
41399 | __exportStar(manipulation, exports);
|
41400 | __exportStar(querying, exports);
|
41401 | __exportStar(legacy, exports);
|
41402 | __exportStar(helpers, exports);
|
41403 | __exportStar(tagtypes, exports);
|
41404 | });
|
41405 |
|
41406 | var boolbase = {
|
41407 | trueFunc: function trueFunc(){
|
41408 | return true;
|
41409 | },
|
41410 | falseFunc: function falseFunc(){
|
41411 | return false;
|
41412 | }
|
41413 | };
|
41414 |
|
41415 | var parse_1$1 = createCommonjsModule(function (module, exports) {
|
41416 | var __spreadArrays = (commonjsGlobal && commonjsGlobal.__spreadArrays) || function () {
|
41417 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
41418 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
41419 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
41420 | r[k] = a[j];
|
41421 | return r;
|
41422 | };
|
41423 | Object.defineProperty(exports, "__esModule", { value: true });
|
41424 | exports.isTraversal = void 0;
|
41425 | var reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;
|
41426 | var reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi;
|
41427 |
|
41428 | var reAttr = /^\s*(?:(\*|[-\w]*)\|)?((?:\\.|[\w\u00b0-\uFFFF-])+)\s*(?:(\S?)=\s*(?:(['"])((?:[^\\]|\\[^])*?)\4|(#?(?:\\.|[\w\u00b0-\uFFFF-])*)|)|)\s*([iI])?\]/;
|
41429 | var actionTypes = {
|
41430 | undefined: "exists",
|
41431 | "": "equals",
|
41432 | "~": "element",
|
41433 | "^": "start",
|
41434 | $: "end",
|
41435 | "*": "any",
|
41436 | "!": "not",
|
41437 | "|": "hyphen",
|
41438 | };
|
41439 | var Traversals = {
|
41440 | ">": "child",
|
41441 | "<": "parent",
|
41442 | "~": "sibling",
|
41443 | "+": "adjacent",
|
41444 | };
|
41445 | var attribSelectors = {
|
41446 | "#": ["id", "equals"],
|
41447 | ".": ["class", "element"],
|
41448 | };
|
41449 |
|
41450 | var unpackPseudos = new Set([
|
41451 | "has",
|
41452 | "not",
|
41453 | "matches",
|
41454 | "is",
|
41455 | "host",
|
41456 | "host-context",
|
41457 | ]);
|
41458 | var traversalNames = new Set(__spreadArrays([
|
41459 | "descendant"
|
41460 | ], Object.keys(Traversals).map(function (k) { return Traversals[k]; })));
|
41461 |
|
41462 |
|
41463 |
|
41464 |
|
41465 |
|
41466 |
|
41467 |
|
41468 | function isTraversal(selector) {
|
41469 | return traversalNames.has(selector.type);
|
41470 | }
|
41471 | exports.isTraversal = isTraversal;
|
41472 | var stripQuotesFromPseudos = new Set(["contains", "icontains"]);
|
41473 | var quotes = new Set(['"', "'"]);
|
41474 |
|
41475 | function funescape(_, escaped, escapedWhitespace) {
|
41476 | var high = parseInt(escaped, 16) - 0x10000;
|
41477 |
|
41478 | return high !== high || escapedWhitespace
|
41479 | ? escaped
|
41480 | : high < 0
|
41481 | ?
|
41482 | String.fromCharCode(high + 0x10000)
|
41483 | :
|
41484 | String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);
|
41485 | }
|
41486 | function unescapeCSS(str) {
|
41487 | return str.replace(reEscape, funescape);
|
41488 | }
|
41489 | function isWhitespace(c) {
|
41490 | return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
|
41491 | }
|
41492 |
|
41493 |
|
41494 |
|
41495 |
|
41496 |
|
41497 |
|
41498 |
|
41499 |
|
41500 |
|
41501 | function parse(selector, options) {
|
41502 | var subselects = [];
|
41503 | var endIndex = parseSelector(subselects, "" + selector, options, 0);
|
41504 | if (endIndex < selector.length) {
|
41505 | throw new Error("Unmatched selector: " + selector.slice(endIndex));
|
41506 | }
|
41507 | return subselects;
|
41508 | }
|
41509 | exports.default = parse;
|
41510 | function parseSelector(subselects, selector, options, selectorIndex) {
|
41511 | var _a, _b;
|
41512 | if (options === void 0) { options = {}; }
|
41513 | var tokens = [];
|
41514 | var sawWS = false;
|
41515 | function getName(offset) {
|
41516 | var match = selector.slice(selectorIndex + offset).match(reName);
|
41517 | if (!match) {
|
41518 | throw new Error("Expected name, found " + selector.slice(selectorIndex));
|
41519 | }
|
41520 | var name = match[0];
|
41521 | selectorIndex += offset + name.length;
|
41522 | return unescapeCSS(name);
|
41523 | }
|
41524 | function stripWhitespace(offset) {
|
41525 | while (isWhitespace(selector.charAt(selectorIndex + offset)))
|
41526 | offset++;
|
41527 | selectorIndex += offset;
|
41528 | }
|
41529 | function isEscaped(pos) {
|
41530 | var slashCount = 0;
|
41531 | while (selector.charAt(--pos) === "\\")
|
41532 | slashCount++;
|
41533 | return (slashCount & 1) === 1;
|
41534 | }
|
41535 | function ensureNotTraversal() {
|
41536 | if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) {
|
41537 | throw new Error("Did not expect successive traversals.");
|
41538 | }
|
41539 | }
|
41540 | stripWhitespace(0);
|
41541 | while (selector !== "") {
|
41542 | var firstChar = selector.charAt(selectorIndex);
|
41543 | if (isWhitespace(firstChar)) {
|
41544 | sawWS = true;
|
41545 | stripWhitespace(1);
|
41546 | }
|
41547 | else if (firstChar in Traversals) {
|
41548 | ensureNotTraversal();
|
41549 | tokens.push({ type: Traversals[firstChar] });
|
41550 | sawWS = false;
|
41551 | stripWhitespace(1);
|
41552 | }
|
41553 | else if (firstChar === ",") {
|
41554 | if (tokens.length === 0) {
|
41555 | throw new Error("Empty sub-selector");
|
41556 | }
|
41557 | subselects.push(tokens);
|
41558 | tokens = [];
|
41559 | sawWS = false;
|
41560 | stripWhitespace(1);
|
41561 | }
|
41562 | else {
|
41563 | if (sawWS) {
|
41564 | ensureNotTraversal();
|
41565 | tokens.push({ type: "descendant" });
|
41566 | sawWS = false;
|
41567 | }
|
41568 | if (firstChar in attribSelectors) {
|
41569 | var _c = attribSelectors[firstChar], name_1 = _c[0], action = _c[1];
|
41570 | tokens.push({
|
41571 | type: "attribute",
|
41572 | name: name_1,
|
41573 | action: action,
|
41574 | value: getName(1),
|
41575 | ignoreCase: false,
|
41576 | namespace: null,
|
41577 | });
|
41578 | }
|
41579 | else if (firstChar === "[") {
|
41580 | var attributeMatch = selector
|
41581 | .slice(selectorIndex + 1)
|
41582 | .match(reAttr);
|
41583 | if (!attributeMatch) {
|
41584 | throw new Error("Malformed attribute selector: " + selector.slice(selectorIndex));
|
41585 | }
|
41586 | var completeSelector = attributeMatch[0], _d = attributeMatch[1], namespace = _d === void 0 ? null : _d, baseName = attributeMatch[2], actionType = attributeMatch[3], _e = attributeMatch[5], quotedValue = _e === void 0 ? "" : _e, _f = attributeMatch[6], value = _f === void 0 ? quotedValue : _f, ignoreCase = attributeMatch[7];
|
41587 | selectorIndex += completeSelector.length + 1;
|
41588 | var name_2 = unescapeCSS(baseName);
|
41589 | if ((_a = options.lowerCaseAttributeNames) !== null && _a !== void 0 ? _a : !options.xmlMode) {
|
41590 | name_2 = name_2.toLowerCase();
|
41591 | }
|
41592 | tokens.push({
|
41593 | type: "attribute",
|
41594 | name: name_2,
|
41595 | action: actionTypes[actionType],
|
41596 | value: unescapeCSS(value),
|
41597 | namespace: namespace,
|
41598 | ignoreCase: !!ignoreCase,
|
41599 | });
|
41600 | }
|
41601 | else if (firstChar === ":") {
|
41602 | if (selector.charAt(selectorIndex + 1) === ":") {
|
41603 | tokens.push({
|
41604 | type: "pseudo-element",
|
41605 | name: getName(2).toLowerCase(),
|
41606 | });
|
41607 | continue;
|
41608 | }
|
41609 | var name_3 = getName(1).toLowerCase();
|
41610 | var data = null;
|
41611 | if (selector.charAt(selectorIndex) === "(") {
|
41612 | if (unpackPseudos.has(name_3)) {
|
41613 | if (quotes.has(selector.charAt(selectorIndex + 1))) {
|
41614 | throw new Error("Pseudo-selector " + name_3 + " cannot be quoted");
|
41615 | }
|
41616 | data = [];
|
41617 | selectorIndex = parseSelector(data, selector, options, selectorIndex + 1);
|
41618 | if (selector.charAt(selectorIndex) !== ")") {
|
41619 | throw new Error("Missing closing parenthesis in :" + name_3 + " (" + selector + ")");
|
41620 | }
|
41621 | selectorIndex += 1;
|
41622 | }
|
41623 | else {
|
41624 | selectorIndex += 1;
|
41625 | var start = selectorIndex;
|
41626 | var counter = 1;
|
41627 | for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) {
|
41628 | if (selector.charAt(selectorIndex) === "(" &&
|
41629 | !isEscaped(selectorIndex)) {
|
41630 | counter++;
|
41631 | }
|
41632 | else if (selector.charAt(selectorIndex) === ")" &&
|
41633 | !isEscaped(selectorIndex)) {
|
41634 | counter--;
|
41635 | }
|
41636 | }
|
41637 | if (counter) {
|
41638 | throw new Error("Parenthesis not matched");
|
41639 | }
|
41640 | data = selector.slice(start, selectorIndex - 1);
|
41641 | if (stripQuotesFromPseudos.has(name_3)) {
|
41642 | var quot = data.charAt(0);
|
41643 | if (quot === data.slice(-1) && quotes.has(quot)) {
|
41644 | data = data.slice(1, -1);
|
41645 | }
|
41646 | data = unescapeCSS(data);
|
41647 | }
|
41648 | }
|
41649 | }
|
41650 | tokens.push({ type: "pseudo", name: name_3, data: data });
|
41651 | }
|
41652 | else {
|
41653 | var namespace = null;
|
41654 | var name_4 = void 0;
|
41655 | if (firstChar === "*") {
|
41656 | selectorIndex += 1;
|
41657 | name_4 = "*";
|
41658 | }
|
41659 | else if (reName.test(selector.slice(selectorIndex))) {
|
41660 | name_4 = getName(0);
|
41661 | }
|
41662 | else {
|
41663 | |
41664 |
|
41665 |
|
41666 |
|
41667 |
|
41668 |
|
41669 | if (tokens.length &&
|
41670 | tokens[tokens.length - 1].type === "descendant") {
|
41671 | tokens.pop();
|
41672 | }
|
41673 | addToken(subselects, tokens);
|
41674 | return selectorIndex;
|
41675 | }
|
41676 | if (selector.charAt(selectorIndex) === "|") {
|
41677 | namespace = name_4;
|
41678 | if (selector.charAt(selectorIndex + 1) === "*") {
|
41679 | name_4 = "*";
|
41680 | selectorIndex += 2;
|
41681 | }
|
41682 | else {
|
41683 | name_4 = getName(1);
|
41684 | }
|
41685 | }
|
41686 | if (name_4 === "*") {
|
41687 | tokens.push({ type: "universal", namespace: namespace });
|
41688 | }
|
41689 | else {
|
41690 | if ((_b = options.lowerCaseTags) !== null && _b !== void 0 ? _b : !options.xmlMode) {
|
41691 | name_4 = name_4.toLowerCase();
|
41692 | }
|
41693 | tokens.push({ type: "tag", name: name_4, namespace: namespace });
|
41694 | }
|
41695 | }
|
41696 | }
|
41697 | }
|
41698 | addToken(subselects, tokens);
|
41699 | return selectorIndex;
|
41700 | }
|
41701 | function addToken(subselects, tokens) {
|
41702 | if (subselects.length > 0 && tokens.length === 0) {
|
41703 | throw new Error("Empty sub-selector");
|
41704 | }
|
41705 | subselects.push(tokens);
|
41706 | }
|
41707 | });
|
41708 |
|
41709 | var __spreadArrays = (commonjsGlobal && commonjsGlobal.__spreadArrays) || function () {
|
41710 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
41711 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
41712 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
41713 | r[k] = a[j];
|
41714 | return r;
|
41715 | };
|
41716 |
|
41717 | var actionTypes = {
|
41718 | equals: "",
|
41719 | element: "~",
|
41720 | start: "^",
|
41721 | end: "$",
|
41722 | any: "*",
|
41723 | not: "!",
|
41724 | hyphen: "|",
|
41725 | };
|
41726 | var charsToEscape = new Set(__spreadArrays(Object.keys(actionTypes)
|
41727 | .map(function (typeKey) { return actionTypes[typeKey]; })
|
41728 | .filter(Boolean), [
|
41729 | ":",
|
41730 | "[",
|
41731 | "]",
|
41732 | " ",
|
41733 | "\\",
|
41734 | "(",
|
41735 | ")",
|
41736 | ]));
|
41737 |
|
41738 |
|
41739 |
|
41740 |
|
41741 |
|
41742 | function stringify$1(selector) {
|
41743 | return selector.map(stringifySubselector).join(", ");
|
41744 | }
|
41745 | var _default$3 = stringify$1;
|
41746 | function stringifySubselector(token) {
|
41747 | return token.map(stringifyToken).join("");
|
41748 | }
|
41749 | function stringifyToken(token) {
|
41750 | switch (token.type) {
|
41751 |
|
41752 | case "child":
|
41753 | return " > ";
|
41754 | case "parent":
|
41755 | return " < ";
|
41756 | case "sibling":
|
41757 | return " ~ ";
|
41758 | case "adjacent":
|
41759 | return " + ";
|
41760 | case "descendant":
|
41761 | return " ";
|
41762 | case "universal":
|
41763 | return getNamespace(token.namespace) + "*";
|
41764 | case "tag":
|
41765 | return getNamespacedName(token);
|
41766 | case "pseudo-element":
|
41767 | return "::" + escapeName(token.name);
|
41768 | case "pseudo":
|
41769 | if (token.data === null)
|
41770 | return ":" + escapeName(token.name);
|
41771 | if (typeof token.data === "string") {
|
41772 | return ":" + escapeName(token.name) + "(" + escapeName(token.data) + ")";
|
41773 | }
|
41774 | return ":" + escapeName(token.name) + "(" + stringify$1(token.data) + ")";
|
41775 | case "attribute": {
|
41776 | if (token.name === "id" &&
|
41777 | token.action === "equals" &&
|
41778 | !token.ignoreCase &&
|
41779 | !token.namespace) {
|
41780 | return "#" + escapeName(token.value);
|
41781 | }
|
41782 | if (token.name === "class" &&
|
41783 | token.action === "element" &&
|
41784 | !token.ignoreCase &&
|
41785 | !token.namespace) {
|
41786 | return "." + escapeName(token.value);
|
41787 | }
|
41788 | var name_1 = getNamespacedName(token);
|
41789 | if (token.action === "exists") {
|
41790 | return "[" + name_1 + "]";
|
41791 | }
|
41792 | return "[" + name_1 + actionTypes[token.action] + "='" + escapeName(token.value) + "'" + (token.ignoreCase ? "i" : "") + "]";
|
41793 | }
|
41794 | }
|
41795 | }
|
41796 | function getNamespacedName(token) {
|
41797 | return "" + getNamespace(token.namespace) + escapeName(token.name);
|
41798 | }
|
41799 | function getNamespace(namespace) {
|
41800 | return namespace
|
41801 | ? (namespace === "*" ? "*" : escapeName(namespace)) + "|"
|
41802 | : "";
|
41803 | }
|
41804 | function escapeName(str) {
|
41805 | return str
|
41806 | .split("")
|
41807 | .map(function (c) { return (charsToEscape.has(c) ? "\\" + c : c); })
|
41808 | .join("");
|
41809 | }
|
41810 |
|
41811 | var stringify_1 = Object.defineProperty({
|
41812 | default: _default$3
|
41813 | }, '__esModule', {value: true});
|
41814 |
|
41815 | var lib$6 = createCommonjsModule(function (module, exports) {
|
41816 | var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
41817 | if (k2 === undefined) k2 = k;
|
41818 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
41819 | }) : (function(o, m, k, k2) {
|
41820 | if (k2 === undefined) k2 = k;
|
41821 | o[k2] = m[k];
|
41822 | }));
|
41823 | var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
41824 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
41825 | };
|
41826 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
41827 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
41828 | };
|
41829 | Object.defineProperty(exports, "__esModule", { value: true });
|
41830 | exports.stringify = exports.parse = void 0;
|
41831 | __exportStar(parse_1$1, exports);
|
41832 |
|
41833 | Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return __importDefault(parse_1$1).default; } });
|
41834 |
|
41835 | Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return __importDefault(stringify_1).default; } });
|
41836 | });
|
41837 |
|
41838 | var procedure = createCommonjsModule(function (module, exports) {
|
41839 | Object.defineProperty(exports, "__esModule", { value: true });
|
41840 | exports.isTraversal = exports.procedure = void 0;
|
41841 | exports.procedure = {
|
41842 | universal: 50,
|
41843 | tag: 30,
|
41844 | attribute: 1,
|
41845 | pseudo: 0,
|
41846 | "pseudo-element": 0,
|
41847 | descendant: -1,
|
41848 | child: -1,
|
41849 | parent: -1,
|
41850 | sibling: -1,
|
41851 | adjacent: -1,
|
41852 | _flexibleDescendant: -1,
|
41853 | };
|
41854 | function isTraversal(t) {
|
41855 | return exports.procedure[t.type] < 0;
|
41856 | }
|
41857 | exports.isTraversal = isTraversal;
|
41858 | });
|
41859 |
|
41860 | var attributes = {
|
41861 | exists: 10,
|
41862 | equals: 8,
|
41863 | not: 7,
|
41864 | start: 6,
|
41865 | end: 6,
|
41866 | any: 5,
|
41867 | hyphen: 4,
|
41868 | element: 4,
|
41869 | };
|
41870 |
|
41871 |
|
41872 |
|
41873 |
|
41874 |
|
41875 |
|
41876 |
|
41877 | function sortByProcedure(arr) {
|
41878 | var procs = arr.map(getProcedure);
|
41879 | for (var i = 1; i < arr.length; i++) {
|
41880 | var procNew = procs[i];
|
41881 | if (procNew < 0)
|
41882 | continue;
|
41883 | for (var j = i - 1; j >= 0 && procNew < procs[j]; j--) {
|
41884 | var token = arr[j + 1];
|
41885 | arr[j + 1] = arr[j];
|
41886 | arr[j] = token;
|
41887 | procs[j + 1] = procs[j];
|
41888 | procs[j] = procNew;
|
41889 | }
|
41890 | }
|
41891 | }
|
41892 | var _default$4 = sortByProcedure;
|
41893 | function getProcedure(token) {
|
41894 | var proc = procedure.procedure[token.type];
|
41895 | if (token.type === "attribute") {
|
41896 | proc = attributes[token.action];
|
41897 | if (proc === attributes.equals && token.name === "id") {
|
41898 |
|
41899 | proc = 9;
|
41900 | }
|
41901 | if (token.ignoreCase) {
|
41902 | |
41903 |
|
41904 |
|
41905 |
|
41906 | proc >>= 1;
|
41907 | }
|
41908 | }
|
41909 | else if (token.type === "pseudo") {
|
41910 | if (!token.data) {
|
41911 | proc = 3;
|
41912 | }
|
41913 | else if (token.name === "has" || token.name === "contains") {
|
41914 | proc = 0;
|
41915 | }
|
41916 | else if (Array.isArray(token.data)) {
|
41917 |
|
41918 | proc = 0;
|
41919 | for (var i = 0; i < token.data.length; i++) {
|
41920 |
|
41921 | if (token.data[i].length !== 1)
|
41922 | continue;
|
41923 | var cur = getProcedure(token.data[i][0]);
|
41924 |
|
41925 | if (cur === 0) {
|
41926 | proc = 0;
|
41927 | break;
|
41928 | }
|
41929 | if (cur > proc)
|
41930 | proc = cur;
|
41931 | }
|
41932 | if (token.data.length > 1 && proc > 0)
|
41933 | proc -= 1;
|
41934 | }
|
41935 | else {
|
41936 | proc = 1;
|
41937 | }
|
41938 | }
|
41939 | return proc;
|
41940 | }
|
41941 |
|
41942 | var sort = Object.defineProperty({
|
41943 | default: _default$4
|
41944 | }, '__esModule', {value: true});
|
41945 |
|
41946 | var attributes$1 = createCommonjsModule(function (module, exports) {
|
41947 | Object.defineProperty(exports, "__esModule", { value: true });
|
41948 | exports.attributeRules = void 0;
|
41949 |
|
41950 |
|
41951 |
|
41952 |
|
41953 |
|
41954 |
|
41955 |
|
41956 | var reChars = /[-[\]{}()*+?.,\\^$|#\s]/g;
|
41957 | function escapeRegex(value) {
|
41958 | return value.replace(reChars, "\\$&");
|
41959 | }
|
41960 |
|
41961 |
|
41962 |
|
41963 | exports.attributeRules = {
|
41964 | equals: function (next, data, _a) {
|
41965 | var adapter = _a.adapter;
|
41966 | var name = data.name;
|
41967 | var value = data.value;
|
41968 | if (data.ignoreCase) {
|
41969 | value = value.toLowerCase();
|
41970 | return function (elem) {
|
41971 | var _a;
|
41972 | return ((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) ===
|
41973 | value && next(elem);
|
41974 | };
|
41975 | }
|
41976 | return function (elem) {
|
41977 | return adapter.getAttributeValue(elem, name) === value && next(elem);
|
41978 | };
|
41979 | },
|
41980 | hyphen: function (next, data, _a) {
|
41981 | var adapter = _a.adapter;
|
41982 | var name = data.name;
|
41983 | var value = data.value;
|
41984 | var len = value.length;
|
41985 | if (data.ignoreCase) {
|
41986 | value = value.toLowerCase();
|
41987 | return function hyphenIC(elem) {
|
41988 | var attr = adapter.getAttributeValue(elem, name);
|
41989 | return (attr != null &&
|
41990 | (attr.length === len || attr.charAt(len) === "-") &&
|
41991 | attr.substr(0, len).toLowerCase() === value &&
|
41992 | next(elem));
|
41993 | };
|
41994 | }
|
41995 | return function hyphen(elem) {
|
41996 | var attr = adapter.getAttributeValue(elem, name);
|
41997 | return (attr != null &&
|
41998 | attr.substr(0, len) === value &&
|
41999 | (attr.length === len || attr.charAt(len) === "-") &&
|
42000 | next(elem));
|
42001 | };
|
42002 | },
|
42003 | element: function (next, _a, _b) {
|
42004 | var name = _a.name, value = _a.value, ignoreCase = _a.ignoreCase;
|
42005 | var adapter = _b.adapter;
|
42006 | if (/\s/.test(value)) {
|
42007 | return boolbase.falseFunc;
|
42008 | }
|
42009 | var regex = new RegExp("(?:^|\\s)" + escapeRegex(value) + "(?:$|\\s)", ignoreCase ? "i" : "");
|
42010 | return function element(elem) {
|
42011 | var attr = adapter.getAttributeValue(elem, name);
|
42012 | return attr != null && regex.test(attr) && next(elem);
|
42013 | };
|
42014 | },
|
42015 | exists: function (next, _a, _b) {
|
42016 | var name = _a.name;
|
42017 | var adapter = _b.adapter;
|
42018 | return function (elem) { return adapter.hasAttrib(elem, name) && next(elem); };
|
42019 | },
|
42020 | start: function (next, data, _a) {
|
42021 | var adapter = _a.adapter;
|
42022 | var name = data.name;
|
42023 | var value = data.value;
|
42024 | var len = value.length;
|
42025 | if (len === 0) {
|
42026 | return boolbase.falseFunc;
|
42027 | }
|
42028 | if (data.ignoreCase) {
|
42029 | value = value.toLowerCase();
|
42030 | return function (elem) {
|
42031 | var _a;
|
42032 | return ((_a = adapter
|
42033 | .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(0, len).toLowerCase()) === value && next(elem);
|
42034 | };
|
42035 | }
|
42036 | return function (elem) {
|
42037 | var _a;
|
42038 | return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.startsWith(value)) &&
|
42039 | next(elem);
|
42040 | };
|
42041 | },
|
42042 | end: function (next, data, _a) {
|
42043 | var adapter = _a.adapter;
|
42044 | var name = data.name;
|
42045 | var value = data.value;
|
42046 | var len = -value.length;
|
42047 | if (len === 0) {
|
42048 | return boolbase.falseFunc;
|
42049 | }
|
42050 | if (data.ignoreCase) {
|
42051 | value = value.toLowerCase();
|
42052 | return function (elem) {
|
42053 | var _a;
|
42054 | return ((_a = adapter
|
42055 | .getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.substr(len).toLowerCase()) === value && next(elem);
|
42056 | };
|
42057 | }
|
42058 | return function (elem) {
|
42059 | var _a;
|
42060 | return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.endsWith(value)) &&
|
42061 | next(elem);
|
42062 | };
|
42063 | },
|
42064 | any: function (next, data, _a) {
|
42065 | var adapter = _a.adapter;
|
42066 | var name = data.name, value = data.value;
|
42067 | if (value === "") {
|
42068 | return boolbase.falseFunc;
|
42069 | }
|
42070 | if (data.ignoreCase) {
|
42071 | var regex_1 = new RegExp(escapeRegex(value), "i");
|
42072 | return function anyIC(elem) {
|
42073 | var attr = adapter.getAttributeValue(elem, name);
|
42074 | return attr != null && regex_1.test(attr) && next(elem);
|
42075 | };
|
42076 | }
|
42077 | return function (elem) {
|
42078 | var _a;
|
42079 | return !!((_a = adapter.getAttributeValue(elem, name)) === null || _a === void 0 ? void 0 : _a.includes(value)) &&
|
42080 | next(elem);
|
42081 | };
|
42082 | },
|
42083 | not: function (next, data, _a) {
|
42084 | var adapter = _a.adapter;
|
42085 | var name = data.name;
|
42086 | var value = data.value;
|
42087 | if (value === "") {
|
42088 | return function (elem) {
|
42089 | return !!adapter.getAttributeValue(elem, name) && next(elem);
|
42090 | };
|
42091 | }
|
42092 | else if (data.ignoreCase) {
|
42093 | value = value.toLowerCase();
|
42094 | return function (elem) {
|
42095 | var attr = adapter.getAttributeValue(elem, name);
|
42096 | return (attr != null &&
|
42097 | attr.toLocaleLowerCase() !== value &&
|
42098 | next(elem));
|
42099 | };
|
42100 | }
|
42101 | return function (elem) {
|
42102 | return adapter.getAttributeValue(elem, name) !== value && next(elem);
|
42103 | };
|
42104 | },
|
42105 | };
|
42106 | });
|
42107 |
|
42108 | var parse_1$2 = createCommonjsModule(function (module, exports) {
|
42109 |
|
42110 | Object.defineProperty(exports, "__esModule", { value: true });
|
42111 | exports.parse = void 0;
|
42112 |
|
42113 | var RE_NTH_ELEMENT = /^([+-]?\d*n)?\s*(?:([+-]?)\s*(\d+))?$/;
|
42114 |
|
42115 |
|
42116 |
|
42117 |
|
42118 |
|
42119 |
|
42120 |
|
42121 | function parse(formula) {
|
42122 | formula = formula.trim().toLowerCase();
|
42123 | if (formula === "even") {
|
42124 | return [2, 0];
|
42125 | }
|
42126 | else if (formula === "odd") {
|
42127 | return [2, 1];
|
42128 | }
|
42129 | var parsed = formula.match(RE_NTH_ELEMENT);
|
42130 | if (!parsed) {
|
42131 | throw new Error("n-th rule couldn't be parsed ('" + formula + "')");
|
42132 | }
|
42133 | var a;
|
42134 | if (parsed[1]) {
|
42135 | a = parseInt(parsed[1], 10);
|
42136 | if (isNaN(a)) {
|
42137 | a = parsed[1].startsWith("-") ? -1 : 1;
|
42138 | }
|
42139 | }
|
42140 | else
|
42141 | a = 0;
|
42142 | var b = (parsed[2] === "-" ? -1 : 1) *
|
42143 | (parsed[3] ? parseInt(parsed[3], 10) : 0);
|
42144 | return [a, b];
|
42145 | }
|
42146 | exports.parse = parse;
|
42147 | });
|
42148 |
|
42149 | var compile_1 = createCommonjsModule(function (module, exports) {
|
42150 | Object.defineProperty(exports, "__esModule", { value: true });
|
42151 | exports.compile = void 0;
|
42152 |
|
42153 |
|
42154 |
|
42155 |
|
42156 |
|
42157 |
|
42158 |
|
42159 |
|
42160 |
|
42161 |
|
42162 |
|
42163 |
|
42164 |
|
42165 |
|
42166 |
|
42167 |
|
42168 |
|
42169 |
|
42170 | function compile(parsed) {
|
42171 | var a = parsed[0];
|
42172 |
|
42173 | var b = parsed[1] - 1;
|
42174 | |
42175 |
|
42176 |
|
42177 |
|
42178 |
|
42179 |
|
42180 |
|
42181 | if (b < 0 && a <= 0)
|
42182 | return boolbase.falseFunc;
|
42183 |
|
42184 | if (a === -1)
|
42185 | return function (index) { return index <= b; };
|
42186 | if (a === 0)
|
42187 | return function (index) { return index === b; };
|
42188 |
|
42189 | if (a === 1)
|
42190 | return b < 0 ? boolbase.trueFunc : function (index) { return index >= b; };
|
42191 | |
42192 |
|
42193 |
|
42194 |
|
42195 |
|
42196 | var absA = Math.abs(a);
|
42197 |
|
42198 | var bMod = ((b % absA) + absA) % absA;
|
42199 | return a > 1
|
42200 | ? function (index) { return index >= b && index % absA === bMod; }
|
42201 | : function (index) { return index <= b && index % absA === bMod; };
|
42202 | }
|
42203 | exports.compile = compile;
|
42204 | });
|
42205 |
|
42206 | var lib$7 = createCommonjsModule(function (module, exports) {
|
42207 | Object.defineProperty(exports, "__esModule", { value: true });
|
42208 | exports.compile = exports.parse = void 0;
|
42209 |
|
42210 | Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_1$2.parse; } });
|
42211 |
|
42212 | Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return compile_1.compile; } });
|
42213 |
|
42214 |
|
42215 |
|
42216 |
|
42217 |
|
42218 |
|
42219 |
|
42220 |
|
42221 |
|
42222 |
|
42223 |
|
42224 |
|
42225 |
|
42226 |
|
42227 |
|
42228 |
|
42229 |
|
42230 |
|
42231 |
|
42232 |
|
42233 |
|
42234 |
|
42235 |
|
42236 | function nthCheck(formula) {
|
42237 | return compile_1.compile(parse_1$2.parse(formula));
|
42238 | }
|
42239 | exports.default = nthCheck;
|
42240 | });
|
42241 |
|
42242 | var filters$1 = createCommonjsModule(function (module, exports) {
|
42243 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
42244 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
42245 | };
|
42246 | Object.defineProperty(exports, "__esModule", { value: true });
|
42247 | exports.filters = void 0;
|
42248 | var nth_check_1 = __importDefault(lib$7);
|
42249 |
|
42250 |
|
42251 | var checkAttrib = attributes$1.attributeRules.equals;
|
42252 | function getAttribFunc(name, value) {
|
42253 | var data = {
|
42254 | type: "attribute",
|
42255 | action: "equals",
|
42256 | ignoreCase: false,
|
42257 | namespace: null,
|
42258 | name: name,
|
42259 | value: value,
|
42260 | };
|
42261 | return function attribFunc(next, _rule, options) {
|
42262 | return checkAttrib(next, data, options);
|
42263 | };
|
42264 | }
|
42265 | function getChildFunc(next, adapter) {
|
42266 | return function (elem) {
|
42267 | var parent = adapter.getParent(elem);
|
42268 | return !!parent && adapter.isTag(parent) && next(elem);
|
42269 | };
|
42270 | }
|
42271 | exports.filters = {
|
42272 | contains: function (next, text, _a) {
|
42273 | var adapter = _a.adapter;
|
42274 | return function contains(elem) {
|
42275 | return next(elem) && adapter.getText(elem).includes(text);
|
42276 | };
|
42277 | },
|
42278 | icontains: function (next, text, _a) {
|
42279 | var adapter = _a.adapter;
|
42280 | var itext = text.toLowerCase();
|
42281 | return function icontains(elem) {
|
42282 | return (next(elem) &&
|
42283 | adapter.getText(elem).toLowerCase().includes(itext));
|
42284 | };
|
42285 | },
|
42286 |
|
42287 | "nth-child": function (next, rule, _a) {
|
42288 | var adapter = _a.adapter, equals = _a.equals;
|
42289 | var func = nth_check_1.default(rule);
|
42290 | if (func === boolbase.falseFunc)
|
42291 | return boolbase.falseFunc;
|
42292 | if (func === boolbase.trueFunc)
|
42293 | return getChildFunc(next, adapter);
|
42294 | return function nthChild(elem) {
|
42295 | var siblings = adapter.getSiblings(elem);
|
42296 | var pos = 0;
|
42297 | for (var i = 0; i < siblings.length; i++) {
|
42298 | if (equals(elem, siblings[i]))
|
42299 | break;
|
42300 | if (adapter.isTag(siblings[i])) {
|
42301 | pos++;
|
42302 | }
|
42303 | }
|
42304 | return func(pos) && next(elem);
|
42305 | };
|
42306 | },
|
42307 | "nth-last-child": function (next, rule, _a) {
|
42308 | var adapter = _a.adapter, equals = _a.equals;
|
42309 | var func = nth_check_1.default(rule);
|
42310 | if (func === boolbase.falseFunc)
|
42311 | return boolbase.falseFunc;
|
42312 | if (func === boolbase.trueFunc)
|
42313 | return getChildFunc(next, adapter);
|
42314 | return function nthLastChild(elem) {
|
42315 | var siblings = adapter.getSiblings(elem);
|
42316 | var pos = 0;
|
42317 | for (var i = siblings.length - 1; i >= 0; i--) {
|
42318 | if (equals(elem, siblings[i]))
|
42319 | break;
|
42320 | if (adapter.isTag(siblings[i])) {
|
42321 | pos++;
|
42322 | }
|
42323 | }
|
42324 | return func(pos) && next(elem);
|
42325 | };
|
42326 | },
|
42327 | "nth-of-type": function (next, rule, _a) {
|
42328 | var adapter = _a.adapter, equals = _a.equals;
|
42329 | var func = nth_check_1.default(rule);
|
42330 | if (func === boolbase.falseFunc)
|
42331 | return boolbase.falseFunc;
|
42332 | if (func === boolbase.trueFunc)
|
42333 | return getChildFunc(next, adapter);
|
42334 | return function nthOfType(elem) {
|
42335 | var siblings = adapter.getSiblings(elem);
|
42336 | var pos = 0;
|
42337 | for (var i = 0; i < siblings.length; i++) {
|
42338 | var currentSibling = siblings[i];
|
42339 | if (equals(elem, currentSibling))
|
42340 | break;
|
42341 | if (adapter.isTag(currentSibling) &&
|
42342 | adapter.getName(currentSibling) === adapter.getName(elem)) {
|
42343 | pos++;
|
42344 | }
|
42345 | }
|
42346 | return func(pos) && next(elem);
|
42347 | };
|
42348 | },
|
42349 | "nth-last-of-type": function (next, rule, _a) {
|
42350 | var adapter = _a.adapter, equals = _a.equals;
|
42351 | var func = nth_check_1.default(rule);
|
42352 | if (func === boolbase.falseFunc)
|
42353 | return boolbase.falseFunc;
|
42354 | if (func === boolbase.trueFunc)
|
42355 | return getChildFunc(next, adapter);
|
42356 | return function nthLastOfType(elem) {
|
42357 | var siblings = adapter.getSiblings(elem);
|
42358 | var pos = 0;
|
42359 | for (var i = siblings.length - 1; i >= 0; i--) {
|
42360 | var currentSibling = siblings[i];
|
42361 | if (equals(elem, currentSibling))
|
42362 | break;
|
42363 | if (adapter.isTag(currentSibling) &&
|
42364 | adapter.getName(currentSibling) === adapter.getName(elem)) {
|
42365 | pos++;
|
42366 | }
|
42367 | }
|
42368 | return func(pos) && next(elem);
|
42369 | };
|
42370 | },
|
42371 |
|
42372 | root: function (next, _rule, _a) {
|
42373 | var adapter = _a.adapter;
|
42374 | return function (elem) {
|
42375 | var parent = adapter.getParent(elem);
|
42376 | return (parent == null || !adapter.isTag(parent)) && next(elem);
|
42377 | };
|
42378 | },
|
42379 | scope: function (next, rule, options, context) {
|
42380 | var equals = options.equals;
|
42381 | if (!context || context.length === 0) {
|
42382 |
|
42383 | return exports.filters.root(next, rule, options);
|
42384 | }
|
42385 | if (context.length === 1) {
|
42386 |
|
42387 | return function (elem) { return equals(context[0], elem) && next(elem); };
|
42388 | }
|
42389 | return function (elem) { return context.includes(elem) && next(elem); };
|
42390 | },
|
42391 |
|
42392 | checkbox: getAttribFunc("type", "checkbox"),
|
42393 | file: getAttribFunc("type", "file"),
|
42394 | password: getAttribFunc("type", "password"),
|
42395 | radio: getAttribFunc("type", "radio"),
|
42396 | reset: getAttribFunc("type", "reset"),
|
42397 | image: getAttribFunc("type", "image"),
|
42398 | submit: getAttribFunc("type", "submit"),
|
42399 |
|
42400 | hover: function (next, _rule, _a) {
|
42401 | var adapter = _a.adapter;
|
42402 | var isHovered = adapter.isHovered;
|
42403 | if (typeof isHovered !== "function") {
|
42404 | return boolbase.falseFunc;
|
42405 | }
|
42406 | return function hover(elem) {
|
42407 | return isHovered(elem) && next(elem);
|
42408 | };
|
42409 | },
|
42410 | visited: function (next, _rule, _a) {
|
42411 | var adapter = _a.adapter;
|
42412 | var isVisited = adapter.isVisited;
|
42413 | if (typeof isVisited !== "function") {
|
42414 | return boolbase.falseFunc;
|
42415 | }
|
42416 | return function visited(elem) {
|
42417 | return isVisited(elem) && next(elem);
|
42418 | };
|
42419 | },
|
42420 | active: function (next, _rule, _a) {
|
42421 | var adapter = _a.adapter;
|
42422 | var isActive = adapter.isActive;
|
42423 | if (typeof isActive !== "function") {
|
42424 | return boolbase.falseFunc;
|
42425 | }
|
42426 | return function active(elem) {
|
42427 | return isActive(elem) && next(elem);
|
42428 | };
|
42429 | },
|
42430 | };
|
42431 | });
|
42432 |
|
42433 | var pseudos = createCommonjsModule(function (module, exports) {
|
42434 | Object.defineProperty(exports, "__esModule", { value: true });
|
42435 | exports.verifyPseudoArgs = exports.pseudos = void 0;
|
42436 | var isLinkTag = namePseudo(["a", "area", "link"]);
|
42437 |
|
42438 | exports.pseudos = {
|
42439 | empty: function (elem, _a) {
|
42440 | var adapter = _a.adapter;
|
42441 | return !adapter.getChildren(elem).some(function (elem) {
|
42442 |
|
42443 | return adapter.isTag(elem) || adapter.getText(elem) !== "";
|
42444 | });
|
42445 | },
|
42446 | "first-child": function (elem, _a) {
|
42447 | var adapter = _a.adapter, equals = _a.equals;
|
42448 | var firstChild = adapter
|
42449 | .getSiblings(elem)
|
42450 | .find(function (elem) { return adapter.isTag(elem); });
|
42451 | return firstChild != null && equals(elem, firstChild);
|
42452 | },
|
42453 | "last-child": function (elem, _a) {
|
42454 | var adapter = _a.adapter, equals = _a.equals;
|
42455 | var siblings = adapter.getSiblings(elem);
|
42456 | for (var i = siblings.length - 1; i >= 0; i--) {
|
42457 | if (equals(elem, siblings[i]))
|
42458 | return true;
|
42459 | if (adapter.isTag(siblings[i]))
|
42460 | break;
|
42461 | }
|
42462 | return false;
|
42463 | },
|
42464 | "first-of-type": function (elem, _a) {
|
42465 | var adapter = _a.adapter, equals = _a.equals;
|
42466 | var siblings = adapter.getSiblings(elem);
|
42467 | var elemName = adapter.getName(elem);
|
42468 | for (var i = 0; i < siblings.length; i++) {
|
42469 | var currentSibling = siblings[i];
|
42470 | if (equals(elem, currentSibling))
|
42471 | return true;
|
42472 | if (adapter.isTag(currentSibling) &&
|
42473 | adapter.getName(currentSibling) === elemName) {
|
42474 | break;
|
42475 | }
|
42476 | }
|
42477 | return false;
|
42478 | },
|
42479 | "last-of-type": function (elem, _a) {
|
42480 | var adapter = _a.adapter, equals = _a.equals;
|
42481 | var siblings = adapter.getSiblings(elem);
|
42482 | var elemName = adapter.getName(elem);
|
42483 | for (var i = siblings.length - 1; i >= 0; i--) {
|
42484 | var currentSibling = siblings[i];
|
42485 | if (equals(elem, currentSibling))
|
42486 | return true;
|
42487 | if (adapter.isTag(currentSibling) &&
|
42488 | adapter.getName(currentSibling) === elemName) {
|
42489 | break;
|
42490 | }
|
42491 | }
|
42492 | return false;
|
42493 | },
|
42494 | "only-of-type": function (elem, _a) {
|
42495 | var adapter = _a.adapter, equals = _a.equals;
|
42496 | var elemName = adapter.getName(elem);
|
42497 | return adapter
|
42498 | .getSiblings(elem)
|
42499 | .every(function (sibling) {
|
42500 | return equals(elem, sibling) ||
|
42501 | !adapter.isTag(sibling) ||
|
42502 | adapter.getName(sibling) !== elemName;
|
42503 | });
|
42504 | },
|
42505 | "only-child": function (elem, _a) {
|
42506 | var adapter = _a.adapter, equals = _a.equals;
|
42507 | return adapter
|
42508 | .getSiblings(elem)
|
42509 | .every(function (sibling) { return equals(elem, sibling) || !adapter.isTag(sibling); });
|
42510 | },
|
42511 |
|
42512 | "any-link": function (elem, options) {
|
42513 | return (isLinkTag(elem, options) && options.adapter.hasAttrib(elem, "href"));
|
42514 | },
|
42515 |
|
42516 | link: function (elem, options) {
|
42517 | var _a, _b;
|
42518 | return (((_b = (_a = options.adapter).isVisited) === null || _b === void 0 ? void 0 : _b.call(_a, elem)) !== true &&
|
42519 | exports.pseudos["any-link"](elem, options));
|
42520 | },
|
42521 | |
42522 |
|
42523 |
|
42524 |
|
42525 |
|
42526 | selected: function (elem, _a) {
|
42527 | var adapter = _a.adapter, equals = _a.equals;
|
42528 | if (adapter.hasAttrib(elem, "selected"))
|
42529 | return true;
|
42530 | else if (adapter.getName(elem) !== "option")
|
42531 | return false;
|
42532 |
|
42533 | var parent = adapter.getParent(elem);
|
42534 | if (!parent ||
|
42535 | !adapter.isTag(parent) ||
|
42536 | adapter.getName(parent) !== "select" ||
|
42537 | adapter.hasAttrib(parent, "multiple")) {
|
42538 | return false;
|
42539 | }
|
42540 | var siblings = adapter.getChildren(parent);
|
42541 | var sawElem = false;
|
42542 | for (var i = 0; i < siblings.length; i++) {
|
42543 | var currentSibling = siblings[i];
|
42544 | if (adapter.isTag(currentSibling)) {
|
42545 | if (equals(elem, currentSibling)) {
|
42546 | sawElem = true;
|
42547 | }
|
42548 | else if (!sawElem) {
|
42549 | return false;
|
42550 | }
|
42551 | else if (adapter.hasAttrib(currentSibling, "selected")) {
|
42552 | return false;
|
42553 | }
|
42554 | }
|
42555 | }
|
42556 | return sawElem;
|
42557 | },
|
42558 | |
42559 |
|
42560 |
|
42561 |
|
42562 |
|
42563 |
|
42564 |
|
42565 |
|
42566 | disabled: function (elem, _a) {
|
42567 | var adapter = _a.adapter;
|
42568 | return adapter.hasAttrib(elem, "disabled");
|
42569 | },
|
42570 | enabled: function (elem, _a) {
|
42571 | var adapter = _a.adapter;
|
42572 | return !adapter.hasAttrib(elem, "disabled");
|
42573 | },
|
42574 |
|
42575 | checked: function (elem, options) {
|
42576 | return (options.adapter.hasAttrib(elem, "checked") ||
|
42577 | exports.pseudos.selected(elem, options));
|
42578 | },
|
42579 |
|
42580 | required: function (elem, _a) {
|
42581 | var adapter = _a.adapter;
|
42582 | return adapter.hasAttrib(elem, "required");
|
42583 | },
|
42584 |
|
42585 | optional: function (elem, _a) {
|
42586 | var adapter = _a.adapter;
|
42587 | return !adapter.hasAttrib(elem, "required");
|
42588 | },
|
42589 |
|
42590 |
|
42591 | parent: function (elem, options) {
|
42592 | return !exports.pseudos.empty(elem, options);
|
42593 | },
|
42594 |
|
42595 | header: namePseudo(["h1", "h2", "h3", "h4", "h5", "h6"]),
|
42596 |
|
42597 | button: function (elem, _a) {
|
42598 | var adapter = _a.adapter;
|
42599 | var name = adapter.getName(elem);
|
42600 | return (name === "button" ||
|
42601 | (name === "input" &&
|
42602 | adapter.getAttributeValue(elem, "type") === "button"));
|
42603 | },
|
42604 |
|
42605 | input: namePseudo(["input", "textarea", "select", "button"]),
|
42606 |
|
42607 | text: function (elem, _a) {
|
42608 | var adapter = _a.adapter;
|
42609 | var type = adapter.getAttributeValue(elem, "type");
|
42610 | return (adapter.getName(elem) === "input" &&
|
42611 | (!type || type.toLowerCase() === "text"));
|
42612 | },
|
42613 | };
|
42614 | function namePseudo(names) {
|
42615 | if (typeof Set !== "undefined") {
|
42616 | var nameSet_1 = new Set(names);
|
42617 | return function (elem, _a) {
|
42618 | var adapter = _a.adapter;
|
42619 | return nameSet_1.has(adapter.getName(elem));
|
42620 | };
|
42621 | }
|
42622 | return function (elem, _a) {
|
42623 | var adapter = _a.adapter;
|
42624 | return names.includes(adapter.getName(elem));
|
42625 | };
|
42626 | }
|
42627 | function verifyPseudoArgs(func, name, subselect) {
|
42628 | if (subselect === null) {
|
42629 | if (func.length > 2 && name !== "scope") {
|
42630 | throw new Error("pseudo-selector :" + name + " requires an argument");
|
42631 | }
|
42632 | }
|
42633 | else {
|
42634 | if (func.length === 2) {
|
42635 | throw new Error("pseudo-selector :" + name + " doesn't have any arguments");
|
42636 | }
|
42637 | }
|
42638 | }
|
42639 | exports.verifyPseudoArgs = verifyPseudoArgs;
|
42640 | });
|
42641 |
|
42642 | var subselects = createCommonjsModule(function (module, exports) {
|
42643 | var __spreadArrays = (commonjsGlobal && commonjsGlobal.__spreadArrays) || function () {
|
42644 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
42645 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
42646 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
42647 | r[k] = a[j];
|
42648 | return r;
|
42649 | };
|
42650 | Object.defineProperty(exports, "__esModule", { value: true });
|
42651 | exports.subselects = exports.getNextSiblings = exports.ensureIsTag = exports.PLACEHOLDER_ELEMENT = void 0;
|
42652 |
|
42653 |
|
42654 |
|
42655 | exports.PLACEHOLDER_ELEMENT = {};
|
42656 | function containsTraversal(t) {
|
42657 | return t.some(procedure.isTraversal);
|
42658 | }
|
42659 | function ensureIsTag(next, adapter) {
|
42660 | if (next === boolbase.falseFunc)
|
42661 | return next;
|
42662 | return function (elem) { return adapter.isTag(elem) && next(elem); };
|
42663 | }
|
42664 | exports.ensureIsTag = ensureIsTag;
|
42665 | function getNextSiblings(elem, adapter) {
|
42666 | var siblings = adapter.getSiblings(elem);
|
42667 | if (siblings.length <= 1)
|
42668 | return [];
|
42669 | var elemIndex = siblings.indexOf(elem);
|
42670 | if (elemIndex < 0 || elemIndex === siblings.length - 1)
|
42671 | return [];
|
42672 | return siblings.slice(elemIndex + 1).filter(adapter.isTag);
|
42673 | }
|
42674 | exports.getNextSiblings = getNextSiblings;
|
42675 |
|
42676 |
|
42677 |
|
42678 |
|
42679 |
|
42680 | exports.subselects = {
|
42681 | |
42682 |
|
42683 |
|
42684 | is: function (next, token, options, context, compileToken) {
|
42685 | return exports.subselects.matches(next, token, options, context, compileToken);
|
42686 | },
|
42687 | matches: function (next, token, options, context, compileToken) {
|
42688 | var opts = {
|
42689 | xmlMode: !!options.xmlMode,
|
42690 | strict: !!options.strict,
|
42691 | adapter: options.adapter,
|
42692 | equals: options.equals,
|
42693 | rootFunc: next,
|
42694 | };
|
42695 | return compileToken(token, opts, context);
|
42696 | },
|
42697 | not: function (next, token, options, context, compileToken) {
|
42698 | var opts = {
|
42699 | xmlMode: !!options.xmlMode,
|
42700 | strict: !!options.strict,
|
42701 | adapter: options.adapter,
|
42702 | equals: options.equals,
|
42703 | };
|
42704 | if (opts.strict) {
|
42705 | if (token.length > 1 || token.some(containsTraversal)) {
|
42706 | throw new Error("complex selectors in :not aren't allowed in strict mode");
|
42707 | }
|
42708 | }
|
42709 | var func = compileToken(token, opts, context);
|
42710 | if (func === boolbase.falseFunc)
|
42711 | return next;
|
42712 | if (func === boolbase.trueFunc)
|
42713 | return boolbase.falseFunc;
|
42714 | return function not(elem) {
|
42715 | return !func(elem) && next(elem);
|
42716 | };
|
42717 | },
|
42718 | has: function (next, subselect, options, _context, compileToken) {
|
42719 | var adapter = options.adapter;
|
42720 | var opts = {
|
42721 | xmlMode: !!options.xmlMode,
|
42722 | strict: !!options.strict,
|
42723 | adapter: adapter,
|
42724 | equals: options.equals,
|
42725 | };
|
42726 |
|
42727 | var context = subselect.some(containsTraversal)
|
42728 | ? [exports.PLACEHOLDER_ELEMENT]
|
42729 | : undefined;
|
42730 | var compiled = compileToken(subselect, opts, context);
|
42731 | if (compiled === boolbase.falseFunc)
|
42732 | return boolbase.falseFunc;
|
42733 | if (compiled === boolbase.trueFunc) {
|
42734 | return function (elem) {
|
42735 | return adapter.getChildren(elem).some(adapter.isTag) && next(elem);
|
42736 | };
|
42737 | }
|
42738 | var hasElement = ensureIsTag(compiled, adapter);
|
42739 | var _a = compiled.shouldTestNextSiblings, shouldTestNextSiblings = _a === void 0 ? false : _a;
|
42740 | |
42741 |
|
42742 |
|
42743 |
|
42744 | if (context) {
|
42745 | return function (elem) {
|
42746 | context[0] = elem;
|
42747 | var childs = adapter.getChildren(elem);
|
42748 | var nextElements = shouldTestNextSiblings
|
42749 | ? __spreadArrays(childs, getNextSiblings(elem, adapter)) : childs;
|
42750 | return (next(elem) && adapter.existsOne(hasElement, nextElements));
|
42751 | };
|
42752 | }
|
42753 | return function (elem) {
|
42754 | return next(elem) &&
|
42755 | adapter.existsOne(hasElement, adapter.getChildren(elem));
|
42756 | };
|
42757 | },
|
42758 | };
|
42759 | });
|
42760 |
|
42761 | var pseudoSelectors = createCommonjsModule(function (module, exports) {
|
42762 | Object.defineProperty(exports, "__esModule", { value: true });
|
42763 | exports.compilePseudoSelector = exports.pseudos = exports.filters = void 0;
|
42764 |
|
42765 |
|
42766 |
|
42767 |
|
42768 |
|
42769 |
|
42770 |
|
42771 |
|
42772 |
|
42773 |
|
42774 |
|
42775 |
|
42776 |
|
42777 |
|
42778 |
|
42779 |
|
42780 | Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return filters$1.filters; } });
|
42781 |
|
42782 | Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return pseudos.pseudos; } });
|
42783 |
|
42784 |
|
42785 | var reCSS3 = /^(?:(?:nth|last|first|only)-(?:child|of-type)|root|empty|(?:en|dis)abled|checked|not)$/;
|
42786 | function compilePseudoSelector(next, selector, options, context, compileToken) {
|
42787 | var name = selector.name, data = selector.data;
|
42788 | if (options.strict && !reCSS3.test(name)) {
|
42789 | throw new Error(":" + name + " isn't part of CSS3");
|
42790 | }
|
42791 | if (Array.isArray(data)) {
|
42792 | return subselects.subselects[name](next, data, options, context, compileToken);
|
42793 | }
|
42794 | if (name in filters$1.filters) {
|
42795 | return filters$1.filters[name](next, data, options, context);
|
42796 | }
|
42797 | if (name in pseudos.pseudos) {
|
42798 | var pseudo_1 = pseudos.pseudos[name];
|
42799 | pseudos.verifyPseudoArgs(pseudo_1, name, data);
|
42800 | return pseudo_1 === boolbase.falseFunc
|
42801 | ? boolbase.falseFunc
|
42802 | : next === boolbase.trueFunc
|
42803 | ? function (elem) { return pseudo_1(elem, options, data); }
|
42804 | : function (elem) { return pseudo_1(elem, options, data) && next(elem); };
|
42805 | }
|
42806 | throw new Error("unmatched pseudo-class :" + name);
|
42807 | }
|
42808 | exports.compilePseudoSelector = compilePseudoSelector;
|
42809 | });
|
42810 |
|
42811 | var general = createCommonjsModule(function (module, exports) {
|
42812 | Object.defineProperty(exports, "__esModule", { value: true });
|
42813 | exports.compileGeneralSelector = void 0;
|
42814 |
|
42815 |
|
42816 |
|
42817 |
|
42818 |
|
42819 | function compileGeneralSelector(next, selector, options, context, compileToken) {
|
42820 | var adapter = options.adapter, equals = options.equals;
|
42821 | switch (selector.type) {
|
42822 | case "pseudo-element":
|
42823 | throw new Error("Pseudo-elements are not supported by css-select");
|
42824 | case "attribute":
|
42825 | if (options.strict &&
|
42826 | (selector.ignoreCase || selector.action === "not")) {
|
42827 | throw new Error("Unsupported attribute selector");
|
42828 | }
|
42829 | return attributes$1.attributeRules[selector.action](next, selector, options);
|
42830 | case "pseudo":
|
42831 | return pseudoSelectors.compilePseudoSelector(next, selector, options, context, compileToken);
|
42832 |
|
42833 | case "tag":
|
42834 | return function tag(elem) {
|
42835 | return adapter.getName(elem) === selector.name && next(elem);
|
42836 | };
|
42837 |
|
42838 | case "descendant":
|
42839 | if (options.cacheResults === false ||
|
42840 | typeof WeakSet === "undefined") {
|
42841 | return function descendant(elem) {
|
42842 | var current = elem;
|
42843 | while ((current = adapter.getParent(current))) {
|
42844 | if (adapter.isTag(current) && next(current)) {
|
42845 | return true;
|
42846 | }
|
42847 | }
|
42848 | return false;
|
42849 | };
|
42850 | }
|
42851 |
|
42852 |
|
42853 | var isFalseCache_1 = new WeakSet();
|
42854 | return function cachedDescendant(elem) {
|
42855 | var current = elem;
|
42856 | while ((current = adapter.getParent(current))) {
|
42857 | if (!isFalseCache_1.has(current)) {
|
42858 | if (adapter.isTag(current) && next(current)) {
|
42859 | return true;
|
42860 | }
|
42861 | isFalseCache_1.add(current);
|
42862 | }
|
42863 | }
|
42864 | return false;
|
42865 | };
|
42866 | case "_flexibleDescendant":
|
42867 |
|
42868 | return function flexibleDescendant(elem) {
|
42869 | var current = elem;
|
42870 | do {
|
42871 | if (adapter.isTag(current) && next(current))
|
42872 | return true;
|
42873 | } while ((current = adapter.getParent(current)));
|
42874 | return false;
|
42875 | };
|
42876 | case "parent":
|
42877 | if (options.strict) {
|
42878 | throw new Error("Parent selector isn't part of CSS3");
|
42879 | }
|
42880 | return function parent(elem) {
|
42881 | return adapter
|
42882 | .getChildren(elem)
|
42883 | .some(function (elem) { return adapter.isTag(elem) && next(elem); });
|
42884 | };
|
42885 | case "child":
|
42886 | return function child(elem) {
|
42887 | var parent = adapter.getParent(elem);
|
42888 | return !!parent && adapter.isTag(parent) && next(parent);
|
42889 | };
|
42890 | case "sibling":
|
42891 | return function sibling(elem) {
|
42892 | var siblings = adapter.getSiblings(elem);
|
42893 | for (var i = 0; i < siblings.length; i++) {
|
42894 | var currentSibling = siblings[i];
|
42895 | if (equals(elem, currentSibling))
|
42896 | break;
|
42897 | if (adapter.isTag(currentSibling) && next(currentSibling)) {
|
42898 | return true;
|
42899 | }
|
42900 | }
|
42901 | return false;
|
42902 | };
|
42903 | case "adjacent":
|
42904 | return function adjacent(elem) {
|
42905 | var siblings = adapter.getSiblings(elem);
|
42906 | var lastElement;
|
42907 | for (var i = 0; i < siblings.length; i++) {
|
42908 | var currentSibling = siblings[i];
|
42909 | if (equals(elem, currentSibling))
|
42910 | break;
|
42911 | if (adapter.isTag(currentSibling)) {
|
42912 | lastElement = currentSibling;
|
42913 | }
|
42914 | }
|
42915 | return !!lastElement && next(lastElement);
|
42916 | };
|
42917 | case "universal":
|
42918 | return next;
|
42919 | }
|
42920 | }
|
42921 | exports.compileGeneralSelector = compileGeneralSelector;
|
42922 | });
|
42923 |
|
42924 | var compile_1$1 = createCommonjsModule(function (module, exports) {
|
42925 | var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
42926 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
42927 | };
|
42928 | Object.defineProperty(exports, "__esModule", { value: true });
|
42929 | exports.compileToken = exports.compileUnsafe = exports.compile = void 0;
|
42930 |
|
42931 |
|
42932 | var sort_1 = __importDefault(sort);
|
42933 |
|
42934 |
|
42935 |
|
42936 |
|
42937 |
|
42938 |
|
42939 |
|
42940 |
|
42941 |
|
42942 |
|
42943 | function compile(selector, options, context) {
|
42944 | var next = compileUnsafe(selector, options, context);
|
42945 | return subselects.ensureIsTag(next, options.adapter);
|
42946 | }
|
42947 | exports.compile = compile;
|
42948 | function compileUnsafe(selector, options, context) {
|
42949 | var token = lib$6.parse(selector, options);
|
42950 | return compileToken(token, options, context);
|
42951 | }
|
42952 | exports.compileUnsafe = compileUnsafe;
|
42953 | function includesScopePseudo(t) {
|
42954 | return (t.type === "pseudo" &&
|
42955 | (t.name === "scope" ||
|
42956 | (Array.isArray(t.data) &&
|
42957 | t.data.some(function (data) { return data.some(includesScopePseudo); }))));
|
42958 | }
|
42959 | var DESCENDANT_TOKEN = { type: "descendant" };
|
42960 | var FLEXIBLE_DESCENDANT_TOKEN = {
|
42961 | type: "_flexibleDescendant",
|
42962 | };
|
42963 | var SCOPE_TOKEN = { type: "pseudo", name: "scope", data: null };
|
42964 |
|
42965 |
|
42966 |
|
42967 |
|
42968 | function absolutize(token, _a, context) {
|
42969 | var adapter = _a.adapter;
|
42970 |
|
42971 | var hasContext = !!(context === null || context === void 0 ? void 0 : context.every(function (e) {
|
42972 | var parent = adapter.getParent(e);
|
42973 | return e === subselects.PLACEHOLDER_ELEMENT || !!(parent && adapter.isTag(parent));
|
42974 | }));
|
42975 | for (var _i = 0, token_1 = token; _i < token_1.length; _i++) {
|
42976 | var t = token_1[_i];
|
42977 | if (t.length > 0 && procedure.isTraversal(t[0]) && t[0].type !== "descendant") ;
|
42978 | else if (hasContext && !t.some(includesScopePseudo)) {
|
42979 | t.unshift(DESCENDANT_TOKEN);
|
42980 | }
|
42981 | else {
|
42982 | continue;
|
42983 | }
|
42984 | t.unshift(SCOPE_TOKEN);
|
42985 | }
|
42986 | }
|
42987 | function compileToken(token, options, context) {
|
42988 | var _a;
|
42989 | token = token.filter(function (t) { return t.length > 0; });
|
42990 | token.forEach(sort_1.default);
|
42991 | context = (_a = options.context) !== null && _a !== void 0 ? _a : context;
|
42992 | var isArrayContext = Array.isArray(context);
|
42993 | var finalContext = context && (Array.isArray(context) ? context : [context]);
|
42994 | absolutize(token, options, finalContext);
|
42995 | var shouldTestNextSiblings = false;
|
42996 | var query = token
|
42997 | .map(function (rules) {
|
42998 | if (rules.length >= 2) {
|
42999 | var first = rules[0], second = rules[1];
|
43000 | if (first.type !== "pseudo" || first.name !== "scope") ;
|
43001 | else if (isArrayContext && second.type === "descendant") {
|
43002 | rules[1] = FLEXIBLE_DESCENDANT_TOKEN;
|
43003 | }
|
43004 | else if (second.type === "adjacent" ||
|
43005 | second.type === "sibling") {
|
43006 | shouldTestNextSiblings = true;
|
43007 | }
|
43008 | }
|
43009 | return compileRules(rules, options, finalContext);
|
43010 | })
|
43011 | .reduce(reduceRules, boolbase.falseFunc);
|
43012 | query.shouldTestNextSiblings = shouldTestNextSiblings;
|
43013 | return query;
|
43014 | }
|
43015 | exports.compileToken = compileToken;
|
43016 | function compileRules(rules, options, context) {
|
43017 | var _a;
|
43018 | return rules.reduce(function (previous, rule) {
|
43019 | return previous === boolbase.falseFunc
|
43020 | ? boolbase.falseFunc
|
43021 | : general.compileGeneralSelector(previous, rule, options, context, compileToken);
|
43022 | }, (_a = options.rootFunc) !== null && _a !== void 0 ? _a : boolbase.trueFunc);
|
43023 | }
|
43024 | function reduceRules(a, b) {
|
43025 | if (b === boolbase.falseFunc || a === boolbase.trueFunc) {
|
43026 | return a;
|
43027 | }
|
43028 | if (a === boolbase.falseFunc || b === boolbase.trueFunc) {
|
43029 | return b;
|
43030 | }
|
43031 | return function combine(elem) {
|
43032 | return a(elem) || b(elem);
|
43033 | };
|
43034 | }
|
43035 | });
|
43036 |
|
43037 | var lib$8 = createCommonjsModule(function (module, exports) {
|
43038 | var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
43039 | if (k2 === undefined) k2 = k;
|
43040 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
43041 | }) : (function(o, m, k, k2) {
|
43042 | if (k2 === undefined) k2 = k;
|
43043 | o[k2] = m[k];
|
43044 | }));
|
43045 | var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
43046 | Object.defineProperty(o, "default", { enumerable: true, value: v });
|
43047 | }) : function(o, v) {
|
43048 | o["default"] = v;
|
43049 | });
|
43050 | var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
43051 | if (mod && mod.__esModule) return mod;
|
43052 | var result = {};
|
43053 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
43054 | __setModuleDefault(result, mod);
|
43055 | return result;
|
43056 | };
|
43057 | Object.defineProperty(exports, "__esModule", { value: true });
|
43058 | exports.pseudos = exports.filters = exports.is = exports.selectOne = exports.selectAll = exports.prepareContext = exports._compileToken = exports._compileUnsafe = exports.compile = void 0;
|
43059 | var DomUtils = __importStar(lib$5);
|
43060 |
|
43061 |
|
43062 |
|
43063 | var defaultEquals = function (a, b) { return a === b; };
|
43064 | var defaultOptions = {
|
43065 | adapter: DomUtils,
|
43066 | equals: defaultEquals,
|
43067 | };
|
43068 | function convertOptionFormats(options) {
|
43069 | var _a, _b, _c, _d;
|
43070 | |
43071 |
|
43072 |
|
43073 |
|
43074 | var opts = options !== null && options !== void 0 ? options : defaultOptions;
|
43075 |
|
43076 | (_a = opts.adapter) !== null && _a !== void 0 ? _a : (opts.adapter = DomUtils);
|
43077 |
|
43078 | (_b = opts.equals) !== null && _b !== void 0 ? _b : (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals);
|
43079 | return opts;
|
43080 | }
|
43081 | function wrapCompile(func) {
|
43082 | return function addAdapter(selector, options, context) {
|
43083 | var opts = convertOptionFormats(options);
|
43084 | return func(selector, opts, context);
|
43085 | };
|
43086 | }
|
43087 |
|
43088 |
|
43089 |
|
43090 | exports.compile = wrapCompile(compile_1$1.compile);
|
43091 | exports._compileUnsafe = wrapCompile(compile_1$1.compileUnsafe);
|
43092 | exports._compileToken = wrapCompile(compile_1$1.compileToken);
|
43093 | function getSelectorFunc(searchFunc) {
|
43094 | return function select(query, elements, options) {
|
43095 | var opts = convertOptionFormats(options);
|
43096 | if (typeof query !== "function") {
|
43097 | query = compile_1$1.compileUnsafe(query, opts, elements);
|
43098 | }
|
43099 | var filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings);
|
43100 | return searchFunc(query, filteredElements, opts);
|
43101 | };
|
43102 | }
|
43103 | function prepareContext(elems, adapter, shouldTestNextSiblings) {
|
43104 | if (shouldTestNextSiblings === void 0) { shouldTestNextSiblings = false; }
|
43105 | |
43106 |
|
43107 |
|
43108 |
|
43109 | if (shouldTestNextSiblings) {
|
43110 | elems = appendNextSiblings(elems, adapter);
|
43111 | }
|
43112 | return Array.isArray(elems)
|
43113 | ? adapter.removeSubsets(elems)
|
43114 | : adapter.getChildren(elems);
|
43115 | }
|
43116 | exports.prepareContext = prepareContext;
|
43117 | function appendNextSiblings(elem, adapter) {
|
43118 |
|
43119 | var elems = Array.isArray(elem) ? elem.slice(0) : [elem];
|
43120 | for (var i = 0; i < elems.length; i++) {
|
43121 | var nextSiblings = subselects.getNextSiblings(elems[i], adapter);
|
43122 | elems.push.apply(elems, nextSiblings);
|
43123 | }
|
43124 | return elems;
|
43125 | }
|
43126 |
|
43127 |
|
43128 |
|
43129 |
|
43130 |
|
43131 |
|
43132 |
|
43133 |
|
43134 |
|
43135 |
|
43136 | exports.selectAll = getSelectorFunc(function (query, elems, options) {
|
43137 | return query === boolbase.falseFunc || !elems || elems.length === 0
|
43138 | ? []
|
43139 | : options.adapter.findAll(query, elems);
|
43140 | });
|
43141 |
|
43142 |
|
43143 |
|
43144 |
|
43145 |
|
43146 |
|
43147 |
|
43148 |
|
43149 |
|
43150 | exports.selectOne = getSelectorFunc(function (query, elems, options) {
|
43151 | return query === boolbase.falseFunc || !elems || elems.length === 0
|
43152 | ? null
|
43153 | : options.adapter.findOne(query, elems);
|
43154 | });
|
43155 |
|
43156 |
|
43157 |
|
43158 |
|
43159 |
|
43160 |
|
43161 |
|
43162 |
|
43163 |
|
43164 |
|
43165 |
|
43166 | function is(elem, query, options) {
|
43167 | var opts = convertOptionFormats(options);
|
43168 | return (typeof query === "function" ? query : compile_1$1.compile(query, opts))(elem);
|
43169 | }
|
43170 | exports.is = is;
|
43171 |
|
43172 |
|
43173 |
|
43174 |
|
43175 | exports.default = exports.selectAll;
|
43176 |
|
43177 |
|
43178 | Object.defineProperty(exports, "filters", { enumerable: true, get: function () { return pseudoSelectors.filters; } });
|
43179 | Object.defineProperty(exports, "pseudos", { enumerable: true, get: function () { return pseudoSelectors.pseudos; } });
|
43180 | });
|
43181 |
|
43182 | var cssSelectBaseAdapter = adapterFactory;
|
43183 |
|
43184 | function adapterFactory(implementation){
|
43185 | ensureImplementation(implementation);
|
43186 |
|
43187 | var adapter = {};
|
43188 |
|
43189 | var baseAdapter = {
|
43190 | removeSubsets: function (nodes){
|
43191 | return removeSubsets(adapter, nodes);
|
43192 | },
|
43193 | existsOne: function(test, elems){
|
43194 | return existsOne(adapter, test, elems);
|
43195 | },
|
43196 | getSiblings: function(elem){
|
43197 | return getSiblings(adapter, elem);
|
43198 | },
|
43199 | hasAttrib: function(elem, name){
|
43200 | return hasAttrib(adapter, elem, name);
|
43201 | },
|
43202 | findOne: function(test, arr){
|
43203 | return findOne(adapter, test, arr);
|
43204 | },
|
43205 | findAll: function(test, elems){
|
43206 | return findAll(adapter, test, elems)
|
43207 | }
|
43208 | };
|
43209 |
|
43210 | Object.assign(adapter, baseAdapter, implementation);
|
43211 |
|
43212 | return adapter;
|
43213 | }
|
43214 |
|
43215 | var expectImplemented = [
|
43216 | "isTag", "getAttributeValue", "getChildren", "getName", "getParent",
|
43217 | "getText"
|
43218 | ];
|
43219 |
|
43220 | function ensureImplementation(implementation){
|
43221 | if(!implementation) throw new TypeError("Expected implementation")
|
43222 |
|
43223 | var notImplemented = expectImplemented.filter(function(fname){
|
43224 | return typeof implementation[fname] !== "function";
|
43225 | });
|
43226 |
|
43227 | if(notImplemented.length){
|
43228 | var notList = "(" + notImplemented.join(", ") + ")";
|
43229 | var message = "Expected functions " + notList + " to be implemented";
|
43230 | throw new Error(message);
|
43231 | }
|
43232 | }
|
43233 |
|
43234 | function removeSubsets(adapter, nodes){
|
43235 | var idx = nodes.length, node, ancestor, replace;
|
43236 |
|
43237 |
|
43238 |
|
43239 | while(--idx > -1){
|
43240 | node = ancestor = nodes[idx];
|
43241 |
|
43242 |
|
43243 | nodes[idx] = null;
|
43244 | replace = true;
|
43245 |
|
43246 | while(ancestor){
|
43247 | if(nodes.indexOf(ancestor) > -1){
|
43248 | replace = false;
|
43249 | nodes.splice(idx, 1);
|
43250 | break;
|
43251 | }
|
43252 | ancestor = adapter.getParent(ancestor);
|
43253 | }
|
43254 |
|
43255 |
|
43256 | if(replace){
|
43257 | nodes[idx] = node;
|
43258 | }
|
43259 | }
|
43260 |
|
43261 | return nodes;
|
43262 | }
|
43263 |
|
43264 | function existsOne(adapter, test, elems){
|
43265 | return elems.some(function(elem){
|
43266 | return adapter.isTag(elem) ?
|
43267 | test(elem) || adapter.existsOne(test, adapter.getChildren(elem)) :
|
43268 | false;
|
43269 | });
|
43270 | }
|
43271 |
|
43272 | function getSiblings(adapter, elem){
|
43273 | var parent = adapter.getParent(elem);
|
43274 | return parent && adapter.getChildren(parent);
|
43275 | }
|
43276 |
|
43277 |
|
43278 | function hasAttrib(adapter, elem, name){
|
43279 | return adapter.getAttributeValue(elem,name) !== undefined
|
43280 | }
|
43281 |
|
43282 | function findOne(adapter, test, arr){
|
43283 | var elem = null;
|
43284 |
|
43285 | for(var i = 0, l = arr.length; i < l && !elem; i++){
|
43286 | if(test(arr[i])){
|
43287 | elem = arr[i];
|
43288 | } else {
|
43289 | var childs = adapter.getChildren(arr[i]);
|
43290 | if(childs && childs.length > 0){
|
43291 | elem = adapter.findOne(test, childs);
|
43292 | }
|
43293 | }
|
43294 | }
|
43295 |
|
43296 | return elem;
|
43297 | }
|
43298 |
|
43299 | function findAll(adapter, test, elems){
|
43300 | var result = [];
|
43301 |
|
43302 | for(var i = 0, j = elems.length; i < j; i++){
|
43303 | if(!adapter.isTag(elems[i])) continue;
|
43304 | if(test(elems[i])) result.push(elems[i]);
|
43305 | var childs = adapter.getChildren(elems[i]);
|
43306 | if(childs) result = result.concat(adapter.findAll(test, childs));
|
43307 | }
|
43308 |
|
43309 | return result;
|
43310 | }
|
43311 |
|
43312 |
|
43313 |
|
43314 |
|
43315 | var svgoCssSelectAdapterMin = {
|
43316 |
|
43317 |
|
43318 |
|
43319 | isTag: function(node) {
|
43320 | return node.isElem();
|
43321 | },
|
43322 |
|
43323 |
|
43324 |
|
43325 |
|
43326 | getParent: function(node) {
|
43327 | return node.parentNode || null;
|
43328 | },
|
43329 |
|
43330 |
|
43331 |
|
43332 | getChildren: function(node) {
|
43333 | return node.content || [];
|
43334 | },
|
43335 |
|
43336 |
|
43337 |
|
43338 | getName: function(elemAst) {
|
43339 | return elemAst.elem;
|
43340 | },
|
43341 |
|
43342 |
|
43343 |
|
43344 |
|
43345 | getText: function(node) {
|
43346 | return node.content[0].text || node.content[0].cdata || '';
|
43347 | },
|
43348 |
|
43349 |
|
43350 |
|
43351 |
|
43352 | getAttributeValue: function(elem, name) {
|
43353 | return elem.hasAttr(name) ? elem.attr(name).value : null;
|
43354 | }
|
43355 | };
|
43356 |
|
43357 |
|
43358 | var svgoCssSelectAdapter = cssSelectBaseAdapter(svgoCssSelectAdapterMin);
|
43359 |
|
43360 | var cssSelectAdapter = svgoCssSelectAdapter;
|
43361 |
|
43362 | var jsAPI = createCommonjsModule(function (module) {
|
43363 |
|
43364 | const { selectAll, selectOne, is } = lib$8;
|
43365 |
|
43366 |
|
43367 | var cssSelectOpts = {
|
43368 | xmlMode: true,
|
43369 | adapter: cssSelectAdapter
|
43370 | };
|
43371 |
|
43372 | var JSAPI = module.exports = function(data, parentNode) {
|
43373 | Object.assign(this, data);
|
43374 | if (parentNode) {
|
43375 | Object.defineProperty(this, 'parentNode', {
|
43376 | writable: true,
|
43377 | value: parentNode
|
43378 | });
|
43379 | }
|
43380 | };
|
43381 |
|
43382 |
|
43383 |
|
43384 |
|
43385 |
|
43386 |
|
43387 | JSAPI.prototype.clone = function() {
|
43388 | var node = this;
|
43389 | var nodeData = {};
|
43390 |
|
43391 | Object.keys(node).forEach(function(key) {
|
43392 | if (key !== 'class' && key !== 'style' && key !== 'content') {
|
43393 | nodeData[key] = node[key];
|
43394 | }
|
43395 | });
|
43396 |
|
43397 |
|
43398 | nodeData = JSON.parse(JSON.stringify(nodeData));
|
43399 |
|
43400 |
|
43401 |
|
43402 |
|
43403 | var clonedNode = new JSAPI(nodeData, !!node.parentNode);
|
43404 |
|
43405 | if (node.class) {
|
43406 | clonedNode.class = node.class.clone(clonedNode);
|
43407 | }
|
43408 | if (node.style) {
|
43409 | clonedNode.style = node.style.clone(clonedNode);
|
43410 | }
|
43411 | if (node.content) {
|
43412 | clonedNode.content = node.content.map(function(childNode) {
|
43413 | var clonedChild = childNode.clone();
|
43414 | clonedChild.parentNode = clonedNode;
|
43415 | return clonedChild;
|
43416 | });
|
43417 | }
|
43418 |
|
43419 | return clonedNode;
|
43420 | };
|
43421 |
|
43422 |
|
43423 |
|
43424 |
|
43425 |
|
43426 |
|
43427 |
|
43428 |
|
43429 | JSAPI.prototype.isElem = function(param) {
|
43430 |
|
43431 | if (!param) return !!this.elem;
|
43432 |
|
43433 | if (Array.isArray(param)) return !!this.elem && (param.indexOf(this.elem) > -1);
|
43434 |
|
43435 | return !!this.elem && this.elem === param;
|
43436 |
|
43437 | };
|
43438 |
|
43439 |
|
43440 |
|
43441 |
|
43442 |
|
43443 |
|
43444 |
|
43445 | JSAPI.prototype.renameElem = function(name) {
|
43446 |
|
43447 | if (name && typeof name === 'string')
|
43448 | this.elem = this.local = name;
|
43449 |
|
43450 | return this;
|
43451 |
|
43452 | };
|
43453 |
|
43454 |
|
43455 |
|
43456 |
|
43457 |
|
43458 |
|
43459 | JSAPI.prototype.isEmpty = function() {
|
43460 |
|
43461 | return !this.content || !this.content.length;
|
43462 |
|
43463 | };
|
43464 |
|
43465 |
|
43466 |
|
43467 |
|
43468 |
|
43469 |
|
43470 |
|
43471 | JSAPI.prototype.closestElem = function(elemName) {
|
43472 | var elem = this;
|
43473 |
|
43474 | while ((elem = elem.parentNode) && !elem.isElem(elemName));
|
43475 |
|
43476 | return elem;
|
43477 | };
|
43478 |
|
43479 |
|
43480 |
|
43481 |
|
43482 |
|
43483 |
|
43484 |
|
43485 |
|
43486 |
|
43487 | JSAPI.prototype.spliceContent = function(start, n, insertion) {
|
43488 |
|
43489 | if (arguments.length < 2) return [];
|
43490 |
|
43491 | if (!Array.isArray(insertion))
|
43492 | insertion = Array.apply(null, arguments).slice(2);
|
43493 |
|
43494 | insertion.forEach(function(inner) { inner.parentNode = this; }, this);
|
43495 |
|
43496 | return this.content.splice.apply(this.content, [start, n].concat(insertion));
|
43497 |
|
43498 |
|
43499 | };
|
43500 |
|
43501 |
|
43502 |
|
43503 |
|
43504 |
|
43505 |
|
43506 |
|
43507 |
|
43508 |
|
43509 | JSAPI.prototype.hasAttr = function(name, val) {
|
43510 |
|
43511 | if (!this.attrs || !Object.keys(this.attrs).length) return false;
|
43512 |
|
43513 | if (!arguments.length) return !!this.attrs;
|
43514 |
|
43515 | if (val !== undefined) return !!this.attrs[name] && this.attrs[name].value === val.toString();
|
43516 |
|
43517 | return !!this.attrs[name];
|
43518 |
|
43519 | };
|
43520 |
|
43521 |
|
43522 |
|
43523 |
|
43524 |
|
43525 |
|
43526 |
|
43527 |
|
43528 |
|
43529 | JSAPI.prototype.hasAttrLocal = function(localName, val) {
|
43530 |
|
43531 | if (!this.attrs || !Object.keys(this.attrs).length) return false;
|
43532 |
|
43533 | if (!arguments.length) return !!this.attrs;
|
43534 |
|
43535 | var callback;
|
43536 |
|
43537 | switch (val != null && val.constructor && val.constructor.name) {
|
43538 | case 'Number':
|
43539 | case 'String': callback = stringValueTest; break;
|
43540 | case 'RegExp': callback = regexpValueTest; break;
|
43541 | case 'Function': callback = funcValueTest; break;
|
43542 | default: callback = nameTest;
|
43543 | }
|
43544 | return this.someAttr(callback);
|
43545 |
|
43546 | function nameTest(attr) {
|
43547 | return attr.local === localName;
|
43548 | }
|
43549 |
|
43550 | function stringValueTest(attr) {
|
43551 | return attr.local === localName && val == attr.value;
|
43552 | }
|
43553 |
|
43554 | function regexpValueTest(attr) {
|
43555 | return attr.local === localName && val.test(attr.value);
|
43556 | }
|
43557 |
|
43558 | function funcValueTest(attr) {
|
43559 | return attr.local === localName && val(attr.value);
|
43560 | }
|
43561 |
|
43562 | };
|
43563 |
|
43564 |
|
43565 |
|
43566 |
|
43567 |
|
43568 |
|
43569 |
|
43570 |
|
43571 |
|
43572 | JSAPI.prototype.attr = function(name, val) {
|
43573 |
|
43574 | if (!this.hasAttr() || !arguments.length) return undefined;
|
43575 |
|
43576 | if (val !== undefined) return this.hasAttr(name, val) ? this.attrs[name] : undefined;
|
43577 |
|
43578 | return this.attrs[name];
|
43579 |
|
43580 | };
|
43581 |
|
43582 |
|
43583 |
|
43584 |
|
43585 |
|
43586 |
|
43587 |
|
43588 | JSAPI.prototype.computedAttr = function(name, val) {
|
43589 |
|
43590 | if (!arguments.length) return;
|
43591 |
|
43592 | for (var elem = this; elem && (!elem.hasAttr(name) || !elem.attr(name).value); elem = elem.parentNode);
|
43593 |
|
43594 | if (val != null) {
|
43595 | return elem ? elem.hasAttr(name, val) : false;
|
43596 | } else if (elem && elem.hasAttr(name)) {
|
43597 | return elem.attrs[name].value;
|
43598 | }
|
43599 |
|
43600 | };
|
43601 |
|
43602 |
|
43603 |
|
43604 |
|
43605 |
|
43606 |
|
43607 |
|
43608 |
|
43609 | JSAPI.prototype.removeAttr = function(name, val, recursive) {
|
43610 |
|
43611 | if (!arguments.length) return false;
|
43612 |
|
43613 | if (Array.isArray(name)) {
|
43614 | name.forEach(this.removeAttr, this);
|
43615 | return false;
|
43616 | }
|
43617 |
|
43618 | if (!this.hasAttr(name)) return false;
|
43619 |
|
43620 | if (!recursive && val && this.attrs[name].value !== val) return false;
|
43621 |
|
43622 | delete this.attrs[name];
|
43623 |
|
43624 | if (!Object.keys(this.attrs).length) delete this.attrs;
|
43625 |
|
43626 | return true;
|
43627 |
|
43628 | };
|
43629 |
|
43630 |
|
43631 |
|
43632 |
|
43633 |
|
43634 |
|
43635 |
|
43636 | JSAPI.prototype.addAttr = function(attr) {
|
43637 | attr = attr || {};
|
43638 |
|
43639 | if (attr.name === undefined ||
|
43640 | attr.prefix === undefined ||
|
43641 | attr.local === undefined
|
43642 | ) return false;
|
43643 |
|
43644 | this.attrs = this.attrs || {};
|
43645 | this.attrs[attr.name] = attr;
|
43646 |
|
43647 | if(attr.name === 'class') {
|
43648 | this.class.hasClass();
|
43649 | }
|
43650 |
|
43651 | if(attr.name === 'style') {
|
43652 | this.style.hasStyle();
|
43653 | }
|
43654 |
|
43655 | return this.attrs[attr.name];
|
43656 |
|
43657 | };
|
43658 |
|
43659 |
|
43660 |
|
43661 |
|
43662 |
|
43663 |
|
43664 |
|
43665 |
|
43666 | JSAPI.prototype.eachAttr = function(callback, context) {
|
43667 |
|
43668 | if (!this.hasAttr()) return false;
|
43669 |
|
43670 | for (var name in this.attrs) {
|
43671 | callback.call(context, this.attrs[name]);
|
43672 | }
|
43673 |
|
43674 | return true;
|
43675 |
|
43676 | };
|
43677 |
|
43678 |
|
43679 |
|
43680 |
|
43681 |
|
43682 |
|
43683 |
|
43684 |
|
43685 | JSAPI.prototype.someAttr = function(callback, context) {
|
43686 |
|
43687 | if (!this.hasAttr()) return false;
|
43688 |
|
43689 | for (var name in this.attrs) {
|
43690 | if (callback.call(context, this.attrs[name])) return true;
|
43691 | }
|
43692 |
|
43693 | return false;
|
43694 |
|
43695 | };
|
43696 |
|
43697 |
|
43698 |
|
43699 |
|
43700 |
|
43701 |
|
43702 |
|
43703 | JSAPI.prototype.querySelectorAll = function(selectors) {
|
43704 |
|
43705 | var matchedEls = selectAll(selectors, this, cssSelectOpts);
|
43706 |
|
43707 | return matchedEls.length > 0 ? matchedEls : null;
|
43708 |
|
43709 | };
|
43710 |
|
43711 |
|
43712 |
|
43713 |
|
43714 |
|
43715 |
|
43716 |
|
43717 | JSAPI.prototype.querySelector = function(selectors) {
|
43718 |
|
43719 | return selectOne(selectors, this, cssSelectOpts);
|
43720 |
|
43721 | };
|
43722 |
|
43723 |
|
43724 |
|
43725 |
|
43726 |
|
43727 |
|
43728 |
|
43729 | JSAPI.prototype.matches = function(selector) {
|
43730 |
|
43731 | return is(this, selector, cssSelectOpts);
|
43732 |
|
43733 | };
|
43734 | });
|
43735 |
|
43736 | var type$y = 'perItem';
|
43737 |
|
43738 | var active$y = false;
|
43739 |
|
43740 | var description$A = 'removes elements that are drawn outside of the viewbox (disabled by default)';
|
43741 |
|
43742 |
|
43743 |
|
43744 | var intersects$1 = _path.intersects,
|
43745 | path2js$2 = _path.path2js,
|
43746 | viewBox,
|
43747 | viewBoxJS;
|
43748 |
|
43749 |
|
43750 |
|
43751 |
|
43752 |
|
43753 |
|
43754 |
|
43755 |
|
43756 |
|
43757 | var fn$y = function(item) {
|
43758 |
|
43759 | if (item.isElem('path') && item.hasAttr('d') && typeof viewBox !== 'undefined')
|
43760 | {
|
43761 |
|
43762 |
|
43763 | if (hasTransform(item) || pathMovesWithinViewBox(item.attr('d').value))
|
43764 | {
|
43765 | return true;
|
43766 | }
|
43767 |
|
43768 | var pathJS = path2js$2(item);
|
43769 | if (pathJS.length === 2)
|
43770 | {
|
43771 |
|
43772 | pathJS = JSON.parse(JSON.stringify(pathJS));
|
43773 | pathJS.push({ instruction: 'z' });
|
43774 | }
|
43775 |
|
43776 | return intersects$1(viewBoxJS, pathJS);
|
43777 | }
|
43778 | if (item.isElem('svg'))
|
43779 | {
|
43780 | parseViewBox(item);
|
43781 | }
|
43782 |
|
43783 | return true;
|
43784 | };
|
43785 |
|
43786 |
|
43787 |
|
43788 |
|
43789 |
|
43790 |
|
43791 |
|
43792 | function hasTransform(item)
|
43793 | {
|
43794 | return item.hasAttr('transform') || (item.parentNode && hasTransform(item.parentNode));
|
43795 | }
|
43796 |
|
43797 |
|
43798 |
|
43799 |
|
43800 |
|
43801 |
|
43802 | function parseViewBox(svg)
|
43803 | {
|
43804 | var viewBoxData = '';
|
43805 | if (svg.hasAttr('viewBox'))
|
43806 | {
|
43807 |
|
43808 | viewBoxData = svg.attr('viewBox').value;
|
43809 | }
|
43810 | else if (svg.hasAttr('height') && svg.hasAttr('width'))
|
43811 | {
|
43812 | viewBoxData = '0 0 ' + svg.attr('width').value + ' ' + svg.attr('height').value;
|
43813 | }
|
43814 |
|
43815 |
|
43816 | viewBoxData = viewBoxData.replace(/[,+]|px/g, ' ').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
|
43817 |
|
43818 |
|
43819 | var m = /^(-?\d*\.?\d+) (-?\d*\.?\d+) (\d*\.?\d+) (\d*\.?\d+)$/.exec(viewBoxData);
|
43820 | if (!m)
|
43821 | {
|
43822 | return;
|
43823 | }
|
43824 |
|
43825 |
|
43826 | viewBox = {
|
43827 | left: parseFloat(m[1]),
|
43828 | top: parseFloat(m[2]),
|
43829 | right: parseFloat(m[1]) + parseFloat(m[3]),
|
43830 | bottom: parseFloat(m[2]) + parseFloat(m[4])
|
43831 | };
|
43832 |
|
43833 | var path = new jsAPI({
|
43834 | elem: 'path',
|
43835 | prefix: '',
|
43836 | local: 'path'
|
43837 | });
|
43838 | path.addAttr({
|
43839 | name: 'd',
|
43840 | prefix: '',
|
43841 | local: 'd',
|
43842 | value: 'M' + m[1] + ' ' + m[2] + 'h' + m[3] + 'v' + m[4] + 'H' + m[1] + 'z'
|
43843 | });
|
43844 |
|
43845 | viewBoxJS = path2js$2(path);
|
43846 | }
|
43847 |
|
43848 |
|
43849 |
|
43850 |
|
43851 |
|
43852 |
|
43853 |
|
43854 | function pathMovesWithinViewBox(path)
|
43855 | {
|
43856 | var regexp = /M\s*(-?\d*\.?\d+)(?!\d)\s*(-?\d*\.?\d+)/g, m;
|
43857 | while (null !== (m = regexp.exec(path)))
|
43858 | {
|
43859 | if (m[1] >= viewBox.left && m[1] <= viewBox.right && m[2] >= viewBox.top && m[2] <= viewBox.bottom)
|
43860 | {
|
43861 | return true;
|
43862 | }
|
43863 | }
|
43864 |
|
43865 | return false;
|
43866 | }
|
43867 |
|
43868 | var removeOffCanvasPaths = {
|
43869 | type: type$y,
|
43870 | active: active$y,
|
43871 | description: description$A,
|
43872 | fn: fn$y
|
43873 | };
|
43874 |
|
43875 | var type$z = 'perItem';
|
43876 |
|
43877 | var active$z = false;
|
43878 |
|
43879 | var description$B = 'removes raster images (disabled by default)';
|
43880 |
|
43881 |
|
43882 |
|
43883 |
|
43884 |
|
43885 |
|
43886 |
|
43887 |
|
43888 |
|
43889 |
|
43890 |
|
43891 | var fn$z = function(item) {
|
43892 |
|
43893 | if (
|
43894 | item.isElem('image') &&
|
43895 | item.hasAttrLocal('href', /(\.|image\/)(jpg|png|gif)/)
|
43896 | ) {
|
43897 | return false;
|
43898 | }
|
43899 |
|
43900 | };
|
43901 |
|
43902 | var removeRasterImages = {
|
43903 | type: type$z,
|
43904 | active: active$z,
|
43905 | description: description$B,
|
43906 | fn: fn$z
|
43907 | };
|
43908 |
|
43909 | var type$A = 'perItem';
|
43910 |
|
43911 | var active$A = false;
|
43912 |
|
43913 | var description$C = 'removes <script> elements (disabled by default)';
|
43914 |
|
43915 |
|
43916 |
|
43917 |
|
43918 |
|
43919 |
|
43920 |
|
43921 |
|
43922 |
|
43923 |
|
43924 |
|
43925 | var fn$A = function(item) {
|
43926 |
|
43927 | return !item.isElem('script');
|
43928 |
|
43929 | };
|
43930 |
|
43931 | var removeScriptElement = {
|
43932 | type: type$A,
|
43933 | active: active$A,
|
43934 | description: description$C,
|
43935 | fn: fn$A
|
43936 | };
|
43937 |
|
43938 | var type$B = 'perItem';
|
43939 |
|
43940 | var active$B = false;
|
43941 |
|
43942 | var description$D = 'removes <style> element (disabled by default)';
|
43943 |
|
43944 |
|
43945 |
|
43946 |
|
43947 |
|
43948 |
|
43949 |
|
43950 |
|
43951 |
|
43952 |
|
43953 |
|
43954 | var fn$B = function(item) {
|
43955 |
|
43956 | return !item.isElem('style');
|
43957 |
|
43958 | };
|
43959 |
|
43960 | var removeStyleElement = {
|
43961 | type: type$B,
|
43962 | active: active$B,
|
43963 | description: description$D,
|
43964 | fn: fn$B
|
43965 | };
|
43966 |
|
43967 | var type$C = 'perItem';
|
43968 |
|
43969 | var active$C = true;
|
43970 |
|
43971 | var description$E = 'removes <title>';
|
43972 |
|
43973 |
|
43974 |
|
43975 |
|
43976 |
|
43977 |
|
43978 |
|
43979 |
|
43980 |
|
43981 |
|
43982 |
|
43983 | var fn$C = function(item) {
|
43984 |
|
43985 | return !item.isElem('title');
|
43986 |
|
43987 | };
|
43988 |
|
43989 | var removeTitle = {
|
43990 | type: type$C,
|
43991 | active: active$C,
|
43992 | description: description$E,
|
43993 | fn: fn$C
|
43994 | };
|
43995 |
|
43996 | var type$D = 'perItem';
|
43997 |
|
43998 | var active$D = true;
|
43999 |
|
44000 | var description$F = 'removes unknown elements content and attributes, removes attrs with default values';
|
44001 |
|
44002 | var params$j = {
|
44003 | unknownContent: true,
|
44004 | unknownAttrs: true,
|
44005 | defaultAttrs: true,
|
44006 | uselessOverrides: true,
|
44007 | keepDataAttrs: true,
|
44008 | keepAriaAttrs: true,
|
44009 | keepRoleAttr: false
|
44010 | };
|
44011 |
|
44012 | var elems$1 = _collections.elems,
|
44013 | attrsGroups$2 = _collections.attrsGroups,
|
44014 | elemsGroups$1 = _collections.elemsGroups,
|
44015 | attrsGroupsDefaults$1 = _collections.attrsGroupsDefaults,
|
44016 | attrsInheritable$1 = _collections.inheritableAttrs,
|
44017 | applyGroups$1 = _collections.presentationNonInheritableGroupAttrs;
|
44018 |
|
44019 |
|
44020 | for (var elem in elems$1) {
|
44021 | elem = elems$1[elem];
|
44022 |
|
44023 | if (elem.attrsGroups) {
|
44024 | elem.attrs = elem.attrs || [];
|
44025 |
|
44026 | elem.attrsGroups.forEach(function(attrsGroupName) {
|
44027 | elem.attrs = elem.attrs.concat(attrsGroups$2[attrsGroupName]);
|
44028 |
|
44029 | var groupDefaults = attrsGroupsDefaults$1[attrsGroupName];
|
44030 |
|
44031 | if (groupDefaults) {
|
44032 | elem.defaults = elem.defaults || {};
|
44033 |
|
44034 | for (var attrName in groupDefaults) {
|
44035 | elem.defaults[attrName] = groupDefaults[attrName];
|
44036 | }
|
44037 | }
|
44038 | });
|
44039 |
|
44040 | }
|
44041 |
|
44042 | if (elem.contentGroups) {
|
44043 | elem.content = elem.content || [];
|
44044 |
|
44045 | elem.contentGroups.forEach(function(contentGroupName) {
|
44046 | elem.content = elem.content.concat(elemsGroups$1[contentGroupName]);
|
44047 | });
|
44048 | }
|
44049 | }
|
44050 |
|
44051 |
|
44052 |
|
44053 |
|
44054 |
|
44055 |
|
44056 |
|
44057 |
|
44058 |
|
44059 |
|
44060 |
|
44061 | var fn$D = function(item, params) {
|
44062 |
|
44063 |
|
44064 | if (item.isElem() && !item.prefix) {
|
44065 |
|
44066 | var elem = item.elem;
|
44067 |
|
44068 |
|
44069 | if (
|
44070 | params.unknownContent &&
|
44071 | !item.isEmpty() &&
|
44072 | elems$1[elem] &&
|
44073 | elem !== 'foreignObject'
|
44074 | ) {
|
44075 | item.content.forEach(function(content, i) {
|
44076 | if (
|
44077 | content.isElem() &&
|
44078 | !content.prefix &&
|
44079 | (
|
44080 | (
|
44081 | elems$1[elem].content &&
|
44082 | elems$1[elem].content.indexOf(content.elem) === -1
|
44083 | ) ||
|
44084 | (
|
44085 | !elems$1[elem].content &&
|
44086 | !elems$1[content.elem]
|
44087 | )
|
44088 | )
|
44089 | ) {
|
44090 | item.content.splice(i, 1);
|
44091 | }
|
44092 | });
|
44093 | }
|
44094 |
|
44095 |
|
44096 | if (elems$1[elem] && elems$1[elem].attrs) {
|
44097 |
|
44098 | item.eachAttr(function(attr) {
|
44099 |
|
44100 | if (
|
44101 | attr.name !== 'xmlns' &&
|
44102 | (attr.prefix === 'xml' || !attr.prefix) &&
|
44103 | (!params.keepDataAttrs || attr.name.indexOf('data-') != 0) &&
|
44104 | (!params.keepAriaAttrs || attr.name.indexOf('aria-') != 0) &&
|
44105 | (!params.keepRoleAttr || attr.name != 'role')
|
44106 | ) {
|
44107 | if (
|
44108 |
|
44109 | (
|
44110 | params.unknownAttrs &&
|
44111 | elems$1[elem].attrs.indexOf(attr.name) === -1
|
44112 | ) ||
|
44113 |
|
44114 | (
|
44115 | params.defaultAttrs &&
|
44116 | !item.hasAttr('id') &&
|
44117 | elems$1[elem].defaults &&
|
44118 | elems$1[elem].defaults[attr.name] === attr.value && (
|
44119 | attrsInheritable$1.indexOf(attr.name) < 0 ||
|
44120 | !item.parentNode.computedAttr(attr.name)
|
44121 | )
|
44122 | ) ||
|
44123 |
|
44124 | (
|
44125 | params.uselessOverrides &&
|
44126 | !item.hasAttr('id') &&
|
44127 | applyGroups$1.indexOf(attr.name) < 0 &&
|
44128 | attrsInheritable$1.indexOf(attr.name) > -1 &&
|
44129 | item.parentNode.computedAttr(attr.name, attr.value)
|
44130 | )
|
44131 | ) {
|
44132 | item.removeAttr(attr.name);
|
44133 | }
|
44134 | }
|
44135 |
|
44136 | });
|
44137 |
|
44138 | }
|
44139 |
|
44140 | }
|
44141 |
|
44142 | };
|
44143 |
|
44144 | var removeUnknownsAndDefaults = {
|
44145 | type: type$D,
|
44146 | active: active$D,
|
44147 | description: description$F,
|
44148 | params: params$j,
|
44149 | fn: fn$D
|
44150 | };
|
44151 |
|
44152 | var type$E = 'full';
|
44153 |
|
44154 | var active$E = true;
|
44155 |
|
44156 | var description$G = 'removes unused namespaces declaration';
|
44157 |
|
44158 |
|
44159 |
|
44160 |
|
44161 |
|
44162 |
|
44163 |
|
44164 |
|
44165 |
|
44166 | var fn$E = function(data) {
|
44167 |
|
44168 | var svgElem,
|
44169 | xmlnsCollection = [];
|
44170 |
|
44171 | |
44172 |
|
44173 |
|
44174 |
|
44175 |
|
44176 | function removeNSfromCollection(ns) {
|
44177 |
|
44178 | var pos = xmlnsCollection.indexOf(ns);
|
44179 |
|
44180 |
|
44181 | if (pos > -1) {
|
44182 | xmlnsCollection.splice(pos, 1);
|
44183 | }
|
44184 |
|
44185 | }
|
44186 |
|
44187 | |
44188 |
|
44189 |
|
44190 |
|
44191 |
|
44192 |
|
44193 |
|
44194 | function monkeys(items) {
|
44195 |
|
44196 | var i = 0,
|
44197 | length = items.content.length;
|
44198 |
|
44199 | while(i < length) {
|
44200 |
|
44201 | var item = items.content[i];
|
44202 |
|
44203 | if (item.isElem('svg')) {
|
44204 |
|
44205 | item.eachAttr(function(attr) {
|
44206 |
|
44207 | if (attr.prefix === 'xmlns' && attr.local) {
|
44208 | xmlnsCollection.push(attr.local);
|
44209 | }
|
44210 | });
|
44211 |
|
44212 |
|
44213 | if (xmlnsCollection.length) {
|
44214 |
|
44215 | svgElem = item;
|
44216 | }
|
44217 |
|
44218 | }
|
44219 |
|
44220 | if (xmlnsCollection.length) {
|
44221 |
|
44222 |
|
44223 | if (item.prefix) {
|
44224 | removeNSfromCollection(item.prefix);
|
44225 | }
|
44226 |
|
44227 |
|
44228 | item.eachAttr(function(attr) {
|
44229 | removeNSfromCollection(attr.prefix);
|
44230 | });
|
44231 |
|
44232 | }
|
44233 |
|
44234 |
|
44235 | if (xmlnsCollection.length && item.content) {
|
44236 | monkeys(item);
|
44237 | }
|
44238 |
|
44239 | i++;
|
44240 |
|
44241 | }
|
44242 |
|
44243 | return items;
|
44244 |
|
44245 | }
|
44246 |
|
44247 | data = monkeys(data);
|
44248 |
|
44249 |
|
44250 | if (xmlnsCollection.length) {
|
44251 | xmlnsCollection.forEach(function(name) {
|
44252 | svgElem.removeAttr('xmlns:' + name);
|
44253 | });
|
44254 | }
|
44255 |
|
44256 | return data;
|
44257 |
|
44258 | };
|
44259 |
|
44260 | var removeUnusedNS = {
|
44261 | type: type$E,
|
44262 | active: active$E,
|
44263 | description: description$G,
|
44264 | fn: fn$E
|
44265 | };
|
44266 |
|
44267 | var type$F = 'perItem';
|
44268 |
|
44269 | var active$F = true;
|
44270 |
|
44271 | var description$H = 'removes elements in <defs> without id';
|
44272 |
|
44273 | var nonRendering = _collections.elemsGroups.nonRendering;
|
44274 |
|
44275 |
|
44276 |
|
44277 |
|
44278 |
|
44279 |
|
44280 |
|
44281 |
|
44282 |
|
44283 | var fn$F = function(item) {
|
44284 |
|
44285 | if (item.isElem('defs')) {
|
44286 |
|
44287 | if (item.content) {
|
44288 | item.content = getUsefulItems(item, []);
|
44289 | }
|
44290 |
|
44291 | if (item.isEmpty()) return false;
|
44292 |
|
44293 | } else if (item.isElem(nonRendering) && !item.hasAttr('id')) {
|
44294 |
|
44295 | return false;
|
44296 |
|
44297 | }
|
44298 |
|
44299 | };
|
44300 |
|
44301 | function getUsefulItems(item, usefulItems) {
|
44302 |
|
44303 | item.content.forEach(function(child) {
|
44304 | if (child.hasAttr('id') || child.isElem('style')) {
|
44305 |
|
44306 | usefulItems.push(child);
|
44307 | child.parentNode = item;
|
44308 |
|
44309 | } else if (!child.isEmpty()) {
|
44310 |
|
44311 | child.content = getUsefulItems(child, usefulItems);
|
44312 |
|
44313 | }
|
44314 | });
|
44315 |
|
44316 | return usefulItems;
|
44317 | }
|
44318 |
|
44319 | var removeUselessDefs = {
|
44320 | type: type$F,
|
44321 | active: active$F,
|
44322 | description: description$H,
|
44323 | fn: fn$F
|
44324 | };
|
44325 |
|
44326 | var type$G = 'perItem';
|
44327 |
|
44328 | var active$G = true;
|
44329 |
|
44330 | var description$I = 'removes useless stroke and fill attributes';
|
44331 |
|
44332 | var params$k = {
|
44333 | stroke: true,
|
44334 | fill: true,
|
44335 | removeNone: false,
|
44336 | hasStyleOrScript: false
|
44337 | };
|
44338 |
|
44339 | var shape$2 = _collections.elemsGroups.shape,
|
44340 | regStrokeProps = /^stroke/,
|
44341 | regFillProps = /^fill-/,
|
44342 | styleOrScript$1 = ['style', 'script'];
|
44343 |
|
44344 |
|
44345 |
|
44346 |
|
44347 |
|
44348 |
|
44349 |
|
44350 |
|
44351 |
|
44352 |
|
44353 | var fn$G = function(item, params) {
|
44354 |
|
44355 | if (item.isElem(styleOrScript$1)) {
|
44356 | params.hasStyleOrScript = true;
|
44357 | }
|
44358 |
|
44359 | if (!params.hasStyleOrScript && item.isElem(shape$2) && !item.computedAttr('id')) {
|
44360 |
|
44361 | var stroke = params.stroke && item.computedAttr('stroke'),
|
44362 | fill = params.fill && !item.computedAttr('fill', 'none');
|
44363 |
|
44364 |
|
44365 | if (
|
44366 | params.stroke &&
|
44367 | (!stroke ||
|
44368 | stroke == 'none' ||
|
44369 | item.computedAttr('stroke-opacity', '0') ||
|
44370 | item.computedAttr('stroke-width', '0')
|
44371 | )
|
44372 | ) {
|
44373 | var parentStroke = item.parentNode.computedAttr('stroke'),
|
44374 | declineStroke = parentStroke && parentStroke != 'none';
|
44375 |
|
44376 | item.eachAttr(function(attr) {
|
44377 | if (regStrokeProps.test(attr.name)) {
|
44378 | item.removeAttr(attr.name);
|
44379 | }
|
44380 | });
|
44381 |
|
44382 | if (declineStroke) item.addAttr({
|
44383 | name: 'stroke',
|
44384 | value: 'none',
|
44385 | prefix: '',
|
44386 | local: 'stroke'
|
44387 | });
|
44388 | }
|
44389 |
|
44390 |
|
44391 | if (
|
44392 | params.fill &&
|
44393 | (!fill || item.computedAttr('fill-opacity', '0'))
|
44394 | ) {
|
44395 | item.eachAttr(function(attr) {
|
44396 | if (regFillProps.test(attr.name)) {
|
44397 | item.removeAttr(attr.name);
|
44398 | }
|
44399 | });
|
44400 |
|
44401 | if (fill) {
|
44402 | if (item.hasAttr('fill'))
|
44403 | item.attr('fill').value = 'none';
|
44404 | else
|
44405 | item.addAttr({
|
44406 | name: 'fill',
|
44407 | value: 'none',
|
44408 | prefix: '',
|
44409 | local: 'fill'
|
44410 | });
|
44411 | }
|
44412 | }
|
44413 |
|
44414 | if (params.removeNone &&
|
44415 | (!stroke || item.hasAttr('stroke') && item.attr('stroke').value=='none') &&
|
44416 | (!fill || item.hasAttr('fill') && item.attr('fill').value=='none')) {
|
44417 |
|
44418 | return false;
|
44419 | }
|
44420 |
|
44421 | }
|
44422 |
|
44423 | };
|
44424 |
|
44425 | var removeUselessStrokeAndFill = {
|
44426 | type: type$G,
|
44427 | active: active$G,
|
44428 | description: description$I,
|
44429 | params: params$k,
|
44430 | fn: fn$G
|
44431 | };
|
44432 |
|
44433 | var type$H = 'perItem';
|
44434 |
|
44435 | var active$H = true;
|
44436 |
|
44437 | var description$J = 'removes viewBox attribute when possible';
|
44438 |
|
44439 | var viewBoxElems = ['svg', 'pattern', 'symbol'];
|
44440 |
|
44441 |
|
44442 |
|
44443 |
|
44444 |
|
44445 |
|
44446 |
|
44447 |
|
44448 |
|
44449 |
|
44450 |
|
44451 |
|
44452 |
|
44453 |
|
44454 |
|
44455 |
|
44456 | var fn$H = function(item) {
|
44457 |
|
44458 | if (
|
44459 | item.isElem(viewBoxElems) &&
|
44460 | item.hasAttr('viewBox') &&
|
44461 | item.hasAttr('width') &&
|
44462 | item.hasAttr('height')
|
44463 | ) {
|
44464 |
|
44465 | var nums = item.attr('viewBox').value.split(/[ ,]+/g);
|
44466 |
|
44467 | if (
|
44468 | nums[0] === '0' &&
|
44469 | nums[1] === '0' &&
|
44470 | item.attr('width').value.replace(/px$/, '') === nums[2] &&
|
44471 | item.attr('height').value.replace(/px$/, '') === nums[3]
|
44472 | ) {
|
44473 | item.removeAttr('viewBox');
|
44474 | }
|
44475 |
|
44476 | }
|
44477 |
|
44478 | };
|
44479 |
|
44480 | var removeViewBox = {
|
44481 | type: type$H,
|
44482 | active: active$H,
|
44483 | description: description$J,
|
44484 | fn: fn$H
|
44485 | };
|
44486 |
|
44487 | var type$I = 'perItem';
|
44488 |
|
44489 | var active$I = false;
|
44490 |
|
44491 | var description$K = 'removes xmlns attribute (for inline svg, disabled by default)';
|
44492 |
|
44493 |
|
44494 |
|
44495 |
|
44496 |
|
44497 |
|
44498 |
|
44499 |
|
44500 |
|
44501 |
|
44502 |
|
44503 |
|
44504 |
|
44505 |
|
44506 | var fn$I = function(item) {
|
44507 |
|
44508 | if (item.isElem('svg') && item.hasAttr('xmlns')) {
|
44509 | item.removeAttr('xmlns');
|
44510 | }
|
44511 |
|
44512 | };
|
44513 |
|
44514 | var removeXMLNS = {
|
44515 | type: type$I,
|
44516 | active: active$I,
|
44517 | description: description$K,
|
44518 | fn: fn$I
|
44519 | };
|
44520 |
|
44521 | var type$J = 'perItem';
|
44522 |
|
44523 | var active$J = true;
|
44524 |
|
44525 | var description$L = 'removes XML processing instructions';
|
44526 |
|
44527 |
|
44528 |
|
44529 |
|
44530 |
|
44531 |
|
44532 |
|
44533 |
|
44534 |
|
44535 |
|
44536 |
|
44537 |
|
44538 | var fn$J = function(item) {
|
44539 |
|
44540 | return !(item.processinginstruction && item.processinginstruction.name === 'xml');
|
44541 |
|
44542 | };
|
44543 |
|
44544 | var removeXMLProcInst = {
|
44545 | type: type$J,
|
44546 | active: active$J,
|
44547 | description: description$L,
|
44548 | fn: fn$J
|
44549 | };
|
44550 |
|
44551 |
|
44552 |
|
44553 |
|
44554 |
|
44555 |
|
44556 |
|
44557 |
|
44558 |
|
44559 |
|
44560 |
|
44561 |
|
44562 |
|
44563 |
|
44564 |
|
44565 |
|
44566 |
|
44567 |
|
44568 |
|
44569 |
|
44570 |
|
44571 |
|
44572 |
|
44573 |
|
44574 |
|
44575 |
|
44576 |
|
44577 |
|
44578 |
|
44579 |
|
44580 |
|
44581 |
|
44582 |
|
44583 |
|
44584 |
|
44585 |
|
44586 |
|
44587 |
|
44588 |
|
44589 |
|
44590 |
|
44591 |
|
44592 |
|
44593 |
|
44594 |
|
44595 |
|
44596 |
|
44597 |
|
44598 |
|
44599 |
|
44600 |
|
44601 |
|
44602 |
|
44603 |
|
44604 |
|
44605 |
|
44606 |
|
44607 |
|
44608 |
|
44609 |
|
44610 |
|
44611 |
|
44612 |
|
44613 |
|
44614 |
|
44615 |
|
44616 |
|
44617 |
|
44618 |
|
44619 |
|
44620 |
|
44621 |
|
44622 |
|
44623 |
|
44624 |
|
44625 |
|
44626 |
|
44627 |
|
44628 |
|
44629 |
|
44630 |
|
44631 | var type$K = 'full';
|
44632 |
|
44633 | var active$K = false;
|
44634 |
|
44635 | var description$M = 'Finds <path> elements with the same d, fill, and ' +
|
44636 | 'stroke, and converts them to <use> elements ' +
|
44637 | 'referencing a single <path> def.';
|
44638 |
|
44639 |
|
44640 |
|
44641 |
|
44642 |
|
44643 |
|
44644 |
|
44645 | var fn$K = function(data) {
|
44646 | const seen = new Map();
|
44647 | let count = 0;
|
44648 | const defs = [];
|
44649 | traverse(data, item => {
|
44650 | if (!item.isElem('path') || !item.hasAttr('d')) {
|
44651 | return;
|
44652 | }
|
44653 | const d = item.attr('d').value;
|
44654 | const fill = (item.hasAttr('fill') && item.attr('fill').value) || '';
|
44655 | const stroke = (item.hasAttr('stroke') && item.attr('stroke').value) || '';
|
44656 | const key = d + ';s:' + stroke + ';f:' + fill;
|
44657 | const hasSeen = seen.get(key);
|
44658 | if (!hasSeen) {
|
44659 | seen.set(key, {elem: item, reused: false});
|
44660 | return;
|
44661 | }
|
44662 | if (!hasSeen.reused) {
|
44663 | hasSeen.reused = true;
|
44664 | if (!hasSeen.elem.hasAttr('id')) {
|
44665 | hasSeen.elem.addAttr({name: 'id', local: 'id',
|
44666 | prefix: '', value: 'reuse-' + (count++)});
|
44667 | }
|
44668 | defs.push(hasSeen.elem);
|
44669 | }
|
44670 | item = convertToUse(item, hasSeen.elem.attr('id').value);
|
44671 | });
|
44672 | const defsTag = new jsAPI({
|
44673 | elem: 'defs', prefix: '', local: 'defs', content: [], attrs: []}, data);
|
44674 | data.content[0].spliceContent(0, 0, defsTag);
|
44675 | for (let def of defs) {
|
44676 |
|
44677 |
|
44678 |
|
44679 | const style = def.style;
|
44680 | const defClass = def.class;
|
44681 | delete def.style;
|
44682 | delete def.class;
|
44683 | const defClone = def.clone();
|
44684 | def.style = style;
|
44685 | def.class = defClass;
|
44686 | defClone.removeAttr('transform');
|
44687 | defsTag.spliceContent(0, 0, defClone);
|
44688 |
|
44689 | def = convertToUse(def, defClone.attr('id').value);
|
44690 | def.removeAttr('id');
|
44691 | }
|
44692 | return data;
|
44693 | };
|
44694 |
|
44695 |
|
44696 | function convertToUse(item, href) {
|
44697 | item.renameElem('use');
|
44698 | item.removeAttr('d');
|
44699 | item.removeAttr('stroke');
|
44700 | item.removeAttr('fill');
|
44701 | item.addAttr({name: 'xlink:href', local: 'xlink:href',
|
44702 | prefix: 'none', value: '#' + href});
|
44703 | delete item.pathJS;
|
44704 | return item;
|
44705 | }
|
44706 |
|
44707 |
|
44708 | function traverse(parent, callback) {
|
44709 | if (parent.isEmpty()) {
|
44710 | return;
|
44711 | }
|
44712 | for (let child of parent.content) {
|
44713 | callback(child);
|
44714 | traverse(child, callback);
|
44715 | }
|
44716 | }
|
44717 |
|
44718 | var reusePaths = {
|
44719 | type: type$K,
|
44720 | active: active$K,
|
44721 | description: description$M,
|
44722 | fn: fn$K
|
44723 | };
|
44724 |
|
44725 | var type$L = 'perItem';
|
44726 |
|
44727 | var active$L = false;
|
44728 |
|
44729 | var description$N = 'sorts element attributes (disabled by default)';
|
44730 |
|
44731 | var params$l = {
|
44732 | order: [
|
44733 | 'id',
|
44734 | 'width', 'height',
|
44735 | 'x', 'x1', 'x2',
|
44736 | 'y', 'y1', 'y2',
|
44737 | 'cx', 'cy', 'r',
|
44738 | 'fill', 'stroke', 'marker',
|
44739 | 'd', 'points'
|
44740 | ]
|
44741 | };
|
44742 |
|
44743 |
|
44744 |
|
44745 |
|
44746 |
|
44747 |
|
44748 |
|
44749 |
|
44750 |
|
44751 | var fn$L = function(item, params) {
|
44752 |
|
44753 | var attrs = [],
|
44754 | sorted = {},
|
44755 | orderlen = params.order.length + 1,
|
44756 | xmlnsOrder = params.xmlnsOrder || 'front';
|
44757 |
|
44758 | if (item.elem) {
|
44759 |
|
44760 | item.eachAttr(function(attr) {
|
44761 | attrs.push(attr);
|
44762 | });
|
44763 |
|
44764 | attrs.sort(function(a, b) {
|
44765 | if (a.prefix != b.prefix) {
|
44766 |
|
44767 | if (xmlnsOrder == 'front') {
|
44768 | if (a.prefix == 'xmlns')
|
44769 | return -1;
|
44770 | if (b.prefix == 'xmlns')
|
44771 | return 1;
|
44772 | }
|
44773 | return a.prefix < b.prefix ? -1 : 1;
|
44774 | }
|
44775 |
|
44776 | var aindex = orderlen;
|
44777 | var bindex = orderlen;
|
44778 |
|
44779 | for (var i = 0; i < params.order.length; i++) {
|
44780 | if (a.name == params.order[i]) {
|
44781 | aindex = i;
|
44782 | } else if (a.name.indexOf(params.order[i] + '-') === 0) {
|
44783 | aindex = i + .5;
|
44784 | }
|
44785 | if (b.name == params.order[i]) {
|
44786 | bindex = i;
|
44787 | } else if (b.name.indexOf(params.order[i] + '-') === 0) {
|
44788 | bindex = i + .5;
|
44789 | }
|
44790 | }
|
44791 |
|
44792 | if (aindex != bindex) {
|
44793 | return aindex - bindex;
|
44794 | }
|
44795 | return a.name < b.name ? -1 : 1;
|
44796 | });
|
44797 |
|
44798 | attrs.forEach(function (attr) {
|
44799 | sorted[attr.name] = attr;
|
44800 | });
|
44801 |
|
44802 | item.attrs = sorted;
|
44803 |
|
44804 | }
|
44805 |
|
44806 | };
|
44807 |
|
44808 | var sortAttrs = {
|
44809 | type: type$L,
|
44810 | active: active$L,
|
44811 | description: description$N,
|
44812 | params: params$l,
|
44813 | fn: fn$L
|
44814 | };
|
44815 |
|
44816 | var type$M = 'perItem';
|
44817 |
|
44818 | var active$M = true;
|
44819 |
|
44820 | var description$O = 'Sorts children of <defs> to improve compression';
|
44821 |
|
44822 |
|
44823 |
|
44824 |
|
44825 |
|
44826 |
|
44827 |
|
44828 |
|
44829 |
|
44830 |
|
44831 | var fn$M = function(item) {
|
44832 |
|
44833 | if (item.isElem('defs')) {
|
44834 |
|
44835 | if (item.content) {
|
44836 | var frequency = item.content.reduce(function (frequency, child) {
|
44837 | if (child.elem in frequency) {
|
44838 | frequency[child.elem]++;
|
44839 | } else {
|
44840 | frequency[child.elem] = 1;
|
44841 | }
|
44842 | return frequency;
|
44843 | }, {});
|
44844 | item.content.sort(function (a, b) {
|
44845 | var frequencyComparison = frequency[b.elem] - frequency[a.elem];
|
44846 | if (frequencyComparison !== 0 ) {
|
44847 | return frequencyComparison;
|
44848 | }
|
44849 | var lengthComparison = b.elem.length - a.elem.length;
|
44850 | if (lengthComparison !== 0) {
|
44851 | return lengthComparison;
|
44852 | }
|
44853 | return a.elem != b.elem ? a.elem > b.elem ? -1 : 1 : 0;
|
44854 | });
|
44855 | }
|
44856 |
|
44857 | return true;
|
44858 | }
|
44859 |
|
44860 | };
|
44861 |
|
44862 | var sortDefsChildren = {
|
44863 | type: type$M,
|
44864 | active: active$M,
|
44865 | description: description$O,
|
44866 | fn: fn$M
|
44867 | };
|
44868 |
|
44869 | var addAttributesToSVGElement$1 = addAttributesToSVGElement;
|
44870 | var addClassesToSVGElement$1 = addClassesToSVGElement;
|
44871 | var cleanupAttrs$1 = cleanupAttrs;
|
44872 | var cleanupEnableBackground$1 = cleanupEnableBackground;
|
44873 | var cleanupIDs$1 = cleanupIDs;
|
44874 | var cleanupListOfValues$1 = cleanupListOfValues;
|
44875 | var cleanupNumericValues$1 = cleanupNumericValues;
|
44876 | var collapseGroups$1 = collapseGroups;
|
44877 | var convertColors$1 = convertColors;
|
44878 | var convertEllipseToCircle$1 = convertEllipseToCircle;
|
44879 | var convertPathData$1 = convertPathData;
|
44880 | var convertShapeToPath$1 = convertShapeToPath;
|
44881 | var convertStyleToAttrs$1 = convertStyleToAttrs;
|
44882 | var convertTransform$1 = convertTransform_1;
|
44883 | var inlineStyles$1 = inlineStyles;
|
44884 | var mergePaths$1 = mergePaths;
|
44885 | var minifyStyles$1 = minifyStyles;
|
44886 | var moveElemsAttrsToGroup$1 = moveElemsAttrsToGroup;
|
44887 | var moveGroupAttrsToElems$1 = moveGroupAttrsToElems;
|
44888 | var prefixIds$1 = prefixIds;
|
44889 | var removeAttributesBySelector$1 = removeAttributesBySelector;
|
44890 | var removeAttrs$1 = removeAttrs;
|
44891 | var removeComments$1 = removeComments;
|
44892 | var removeDesc$1 = removeDesc;
|
44893 | var removeDimensions$1 = removeDimensions;
|
44894 | var removeDoctype$1 = removeDoctype;
|
44895 | var removeEditorsNSData$1 = removeEditorsNSData;
|
44896 | var removeElementsByAttr$1 = removeElementsByAttr;
|
44897 | var removeEmptyAttrs$1 = removeEmptyAttrs;
|
44898 | var removeEmptyContainers$1 = removeEmptyContainers;
|
44899 | var removeEmptyText$1 = removeEmptyText;
|
44900 | var removeHiddenElems$1 = removeHiddenElems;
|
44901 | var removeMetadata$1 = removeMetadata;
|
44902 | var removeNonInheritableGroupAttrs$1 = removeNonInheritableGroupAttrs;
|
44903 | var removeOffCanvasPaths$1 = removeOffCanvasPaths;
|
44904 | var removeRasterImages$1 = removeRasterImages;
|
44905 | var removeScriptElement$1 = removeScriptElement;
|
44906 | var removeStyleElement$1 = removeStyleElement;
|
44907 | var removeTitle$1 = removeTitle;
|
44908 | var removeUnknownsAndDefaults$1 = removeUnknownsAndDefaults;
|
44909 | var removeUnusedNS$1 = removeUnusedNS;
|
44910 | var removeUselessDefs$1 = removeUselessDefs;
|
44911 | var removeUselessStrokeAndFill$1 = removeUselessStrokeAndFill;
|
44912 | var removeViewBox$1 = removeViewBox;
|
44913 | var removeXMLNS$1 = removeXMLNS;
|
44914 | var removeXMLProcInst$1 = removeXMLProcInst;
|
44915 | var reusePaths$1 = reusePaths;
|
44916 | var sortAttrs$1 = sortAttrs;
|
44917 | var sortDefsChildren$1 = sortDefsChildren;
|
44918 |
|
44919 | var plugins = {
|
44920 | addAttributesToSVGElement: addAttributesToSVGElement$1,
|
44921 | addClassesToSVGElement: addClassesToSVGElement$1,
|
44922 | cleanupAttrs: cleanupAttrs$1,
|
44923 | cleanupEnableBackground: cleanupEnableBackground$1,
|
44924 | cleanupIDs: cleanupIDs$1,
|
44925 | cleanupListOfValues: cleanupListOfValues$1,
|
44926 | cleanupNumericValues: cleanupNumericValues$1,
|
44927 | collapseGroups: collapseGroups$1,
|
44928 | convertColors: convertColors$1,
|
44929 | convertEllipseToCircle: convertEllipseToCircle$1,
|
44930 | convertPathData: convertPathData$1,
|
44931 | convertShapeToPath: convertShapeToPath$1,
|
44932 | convertStyleToAttrs: convertStyleToAttrs$1,
|
44933 | convertTransform: convertTransform$1,
|
44934 | inlineStyles: inlineStyles$1,
|
44935 | mergePaths: mergePaths$1,
|
44936 | minifyStyles: minifyStyles$1,
|
44937 | moveElemsAttrsToGroup: moveElemsAttrsToGroup$1,
|
44938 | moveGroupAttrsToElems: moveGroupAttrsToElems$1,
|
44939 | prefixIds: prefixIds$1,
|
44940 | removeAttributesBySelector: removeAttributesBySelector$1,
|
44941 | removeAttrs: removeAttrs$1,
|
44942 | removeComments: removeComments$1,
|
44943 | removeDesc: removeDesc$1,
|
44944 | removeDimensions: removeDimensions$1,
|
44945 | removeDoctype: removeDoctype$1,
|
44946 | removeEditorsNSData: removeEditorsNSData$1,
|
44947 | removeElementsByAttr: removeElementsByAttr$1,
|
44948 | removeEmptyAttrs: removeEmptyAttrs$1,
|
44949 | removeEmptyContainers: removeEmptyContainers$1,
|
44950 | removeEmptyText: removeEmptyText$1,
|
44951 | removeHiddenElems: removeHiddenElems$1,
|
44952 | removeMetadata: removeMetadata$1,
|
44953 | removeNonInheritableGroupAttrs: removeNonInheritableGroupAttrs$1,
|
44954 | removeOffCanvasPaths: removeOffCanvasPaths$1,
|
44955 | removeRasterImages: removeRasterImages$1,
|
44956 | removeScriptElement: removeScriptElement$1,
|
44957 | removeStyleElement: removeStyleElement$1,
|
44958 | removeTitle: removeTitle$1,
|
44959 | removeUnknownsAndDefaults: removeUnknownsAndDefaults$1,
|
44960 | removeUnusedNS: removeUnusedNS$1,
|
44961 | removeUselessDefs: removeUselessDefs$1,
|
44962 | removeUselessStrokeAndFill: removeUselessStrokeAndFill$1,
|
44963 | removeViewBox: removeViewBox$1,
|
44964 | removeXMLNS: removeXMLNS$1,
|
44965 | removeXMLProcInst: removeXMLProcInst$1,
|
44966 | reusePaths: reusePaths$1,
|
44967 | sortAttrs: sortAttrs$1,
|
44968 | sortDefsChildren: sortDefsChildren$1
|
44969 | };
|
44970 |
|
44971 | const pluginsOrder = [
|
44972 | 'removeDoctype',
|
44973 | 'removeXMLProcInst',
|
44974 | 'removeComments',
|
44975 | 'removeMetadata',
|
44976 | 'removeXMLNS',
|
44977 | 'removeEditorsNSData',
|
44978 | 'cleanupAttrs',
|
44979 | 'inlineStyles',
|
44980 | 'minifyStyles',
|
44981 | 'convertStyleToAttrs',
|
44982 | 'cleanupIDs',
|
44983 | 'prefixIds',
|
44984 | 'removeRasterImages',
|
44985 | 'removeUselessDefs',
|
44986 | 'cleanupNumericValues',
|
44987 | 'cleanupListOfValues',
|
44988 | 'convertColors',
|
44989 | 'removeUnknownsAndDefaults',
|
44990 | 'removeNonInheritableGroupAttrs',
|
44991 | 'removeUselessStrokeAndFill',
|
44992 | 'removeViewBox',
|
44993 | 'cleanupEnableBackground',
|
44994 | 'removeHiddenElems',
|
44995 | 'removeEmptyText',
|
44996 | 'convertShapeToPath',
|
44997 | 'convertEllipseToCircle',
|
44998 | 'moveElemsAttrsToGroup',
|
44999 | 'moveGroupAttrsToElems',
|
45000 | 'collapseGroups',
|
45001 | 'convertPathData',
|
45002 | 'convertTransform',
|
45003 | 'removeEmptyAttrs',
|
45004 | 'removeEmptyContainers',
|
45005 | 'mergePaths',
|
45006 | 'removeUnusedNS',
|
45007 | 'sortAttrs',
|
45008 | 'sortDefsChildren',
|
45009 | 'removeTitle',
|
45010 | 'removeDesc',
|
45011 | 'removeDimensions',
|
45012 | 'removeAttrs',
|
45013 | 'removeAttributesBySelector',
|
45014 | 'removeElementsByAttr',
|
45015 | 'addClassesToSVGElement',
|
45016 | 'removeStyleElement',
|
45017 | 'removeScriptElement',
|
45018 | 'addAttributesToSVGElement',
|
45019 | 'removeOffCanvasPaths',
|
45020 | 'reusePaths',
|
45021 | ];
|
45022 | const defaultPlugins = pluginsOrder.filter(name => plugins[name].active);
|
45023 | var defaultPlugins_1 = defaultPlugins;
|
45024 |
|
45025 | const extendDefaultPlugins = (plugins$1) => {
|
45026 | const extendedPlugins = pluginsOrder.map(name => ({ name, ...plugins[name] }));
|
45027 | for (const plugin of plugins$1) {
|
45028 | const resolvedPlugin = resolvePluginConfig(plugin, {});
|
45029 | const index = pluginsOrder.indexOf(resolvedPlugin.name);
|
45030 | if (index === -1) {
|
45031 | extendedPlugins.push(plugin);
|
45032 | } else {
|
45033 | extendedPlugins[index] = plugin;
|
45034 | }
|
45035 | }
|
45036 | return extendedPlugins;
|
45037 | };
|
45038 | var extendDefaultPlugins_1 = extendDefaultPlugins;
|
45039 |
|
45040 | const resolvePluginConfig = (plugin, config) => {
|
45041 | let configParams = {};
|
45042 | if ('floatPrecision' in config) {
|
45043 | configParams.floatPrecision = config.floatPrecision;
|
45044 | }
|
45045 | if (typeof plugin === 'string') {
|
45046 |
|
45047 | const pluginConfig = plugins[plugin];
|
45048 | if (pluginConfig == null) {
|
45049 | throw Error(`Unknown builtin plugin "${plugin}" specified.`);
|
45050 | }
|
45051 | return {
|
45052 | ...pluginConfig,
|
45053 | name: plugin,
|
45054 | active: true,
|
45055 | params: { ...pluginConfig.params, ...configParams }
|
45056 | };
|
45057 | }
|
45058 | if (typeof plugin === 'object' && plugin != null) {
|
45059 | if (plugin.name == null) {
|
45060 | throw Error(`Plugin name should be specified`);
|
45061 | }
|
45062 | if (plugin.fn) {
|
45063 |
|
45064 | return {
|
45065 | active: true,
|
45066 | ...plugin,
|
45067 | params: { configParams, ...plugin.params }
|
45068 | };
|
45069 | } else {
|
45070 |
|
45071 | const pluginConfig = plugins[plugin.name];
|
45072 | if (pluginConfig == null) {
|
45073 | throw Error(`Unknown builtin plugin "${plugin.name}" specified.`);
|
45074 | }
|
45075 | return {
|
45076 | ...pluginConfig,
|
45077 | active: true,
|
45078 | ...plugin,
|
45079 | params: { ...pluginConfig.params, ...configParams, ...plugin.params }
|
45080 | };
|
45081 | }
|
45082 | }
|
45083 | return null;
|
45084 | };
|
45085 | var resolvePluginConfig_1 = resolvePluginConfig;
|
45086 |
|
45087 | var config = {
|
45088 | defaultPlugins: defaultPlugins_1,
|
45089 | extendDefaultPlugins: extendDefaultPlugins_1,
|
45090 | resolvePluginConfig: resolvePluginConfig_1
|
45091 | };
|
45092 |
|
45093 | function Stream(){}
|
45094 |
|
45095 | var stream = Object.freeze({
|
45096 | __proto__: null,
|
45097 | Stream: Stream
|
45098 | });
|
45099 |
|
45100 | var string_decoder = null;
|
45101 |
|
45102 | var string_decoder$1 = Object.freeze({
|
45103 | __proto__: null,
|
45104 | 'default': string_decoder
|
45105 | });
|
45106 |
|
45107 | var require$$0$3 = getAugmentedNamespace(stream);
|
45108 |
|
45109 | var require$$1$2 = getAugmentedNamespace(string_decoder$1);
|
45110 |
|
45111 | var sax = createCommonjsModule(function (module, exports) {
|
45112 | (function (sax) {
|
45113 | sax.parser = function (strict, opt) { return new SAXParser(strict, opt) };
|
45114 | sax.SAXParser = SAXParser;
|
45115 | sax.SAXStream = SAXStream;
|
45116 | sax.createStream = createStream;
|
45117 |
|
45118 |
|
45119 |
|
45120 |
|
45121 |
|
45122 |
|
45123 |
|
45124 |
|
45125 |
|
45126 |
|
45127 | sax.MAX_BUFFER_LENGTH = 64 * 1024;
|
45128 |
|
45129 | var buffers = [
|
45130 | 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
|
45131 | 'procInstName', 'procInstBody', 'entity', 'attribName',
|
45132 | 'attribValue', 'cdata', 'script'
|
45133 | ];
|
45134 |
|
45135 | sax.EVENTS = [
|
45136 | 'text',
|
45137 | 'processinginstruction',
|
45138 | 'sgmldeclaration',
|
45139 | 'doctype',
|
45140 | 'comment',
|
45141 | 'opentagstart',
|
45142 | 'attribute',
|
45143 | 'opentag',
|
45144 | 'closetag',
|
45145 | 'opencdata',
|
45146 | 'cdata',
|
45147 | 'closecdata',
|
45148 | 'error',
|
45149 | 'end',
|
45150 | 'ready',
|
45151 | 'script',
|
45152 | 'opennamespace',
|
45153 | 'closenamespace'
|
45154 | ];
|
45155 |
|
45156 | function SAXParser (strict, opt) {
|
45157 | if (!(this instanceof SAXParser)) {
|
45158 | return new SAXParser(strict, opt)
|
45159 | }
|
45160 |
|
45161 | var parser = this;
|
45162 | clearBuffers(parser);
|
45163 | parser.q = parser.c = '';
|
45164 | parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH;
|
45165 | parser.opt = opt || {};
|
45166 | parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
|
45167 | parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase';
|
45168 | parser.tags = [];
|
45169 | parser.closed = parser.closedRoot = parser.sawRoot = false;
|
45170 | parser.tag = parser.error = null;
|
45171 | parser.strict = !!strict;
|
45172 | parser.noscript = !!(strict || parser.opt.noscript);
|
45173 | parser.state = S.BEGIN;
|
45174 | parser.strictEntities = parser.opt.strictEntities;
|
45175 | parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES);
|
45176 | parser.attribList = [];
|
45177 |
|
45178 |
|
45179 |
|
45180 |
|
45181 | if (parser.opt.xmlns) {
|
45182 | parser.ns = Object.create(rootNS);
|
45183 | }
|
45184 |
|
45185 |
|
45186 | parser.trackPosition = parser.opt.position !== false;
|
45187 | if (parser.trackPosition) {
|
45188 | parser.position = parser.line = parser.column = 0;
|
45189 | }
|
45190 | emit(parser, 'onready');
|
45191 | }
|
45192 |
|
45193 | if (!Object.create) {
|
45194 | Object.create = function (o) {
|
45195 | function F () {}
|
45196 | F.prototype = o;
|
45197 | var newf = new F();
|
45198 | return newf
|
45199 | };
|
45200 | }
|
45201 |
|
45202 | if (!Object.keys) {
|
45203 | Object.keys = function (o) {
|
45204 | var a = [];
|
45205 | for (var i in o) if (o.hasOwnProperty(i)) a.push(i);
|
45206 | return a
|
45207 | };
|
45208 | }
|
45209 |
|
45210 | function checkBufferLength (parser) {
|
45211 | var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10);
|
45212 | var maxActual = 0;
|
45213 | for (var i = 0, l = buffers.length; i < l; i++) {
|
45214 | var len = parser[buffers[i]].length;
|
45215 | if (len > maxAllowed) {
|
45216 |
|
45217 |
|
45218 |
|
45219 |
|
45220 | switch (buffers[i]) {
|
45221 | case 'textNode':
|
45222 | closeText(parser);
|
45223 | break
|
45224 |
|
45225 | case 'cdata':
|
45226 | emitNode(parser, 'oncdata', parser.cdata);
|
45227 | parser.cdata = '';
|
45228 | break
|
45229 |
|
45230 | case 'script':
|
45231 | emitNode(parser, 'onscript', parser.script);
|
45232 | parser.script = '';
|
45233 | break
|
45234 |
|
45235 | default:
|
45236 | error(parser, 'Max buffer length exceeded: ' + buffers[i]);
|
45237 | }
|
45238 | }
|
45239 | maxActual = Math.max(maxActual, len);
|
45240 | }
|
45241 |
|
45242 | var m = sax.MAX_BUFFER_LENGTH - maxActual;
|
45243 | parser.bufferCheckPosition = m + parser.position;
|
45244 | }
|
45245 |
|
45246 | function clearBuffers (parser) {
|
45247 | for (var i = 0, l = buffers.length; i < l; i++) {
|
45248 | parser[buffers[i]] = '';
|
45249 | }
|
45250 | }
|
45251 |
|
45252 | function flushBuffers (parser) {
|
45253 | closeText(parser);
|
45254 | if (parser.cdata !== '') {
|
45255 | emitNode(parser, 'oncdata', parser.cdata);
|
45256 | parser.cdata = '';
|
45257 | }
|
45258 | if (parser.script !== '') {
|
45259 | emitNode(parser, 'onscript', parser.script);
|
45260 | parser.script = '';
|
45261 | }
|
45262 | }
|
45263 |
|
45264 | SAXParser.prototype = {
|
45265 | end: function () { end(this); },
|
45266 | write: write,
|
45267 | resume: function () { this.error = null; return this },
|
45268 | close: function () { return this.write(null) },
|
45269 | flush: function () { flushBuffers(this); }
|
45270 | };
|
45271 |
|
45272 | var Stream;
|
45273 | try {
|
45274 | Stream = require$$0$3.Stream;
|
45275 | } catch (ex) {
|
45276 | Stream = function () {};
|
45277 | }
|
45278 |
|
45279 | var streamWraps = sax.EVENTS.filter(function (ev) {
|
45280 | return ev !== 'error' && ev !== 'end'
|
45281 | });
|
45282 |
|
45283 | function createStream (strict, opt) {
|
45284 | return new SAXStream(strict, opt)
|
45285 | }
|
45286 |
|
45287 | function SAXStream (strict, opt) {
|
45288 | if (!(this instanceof SAXStream)) {
|
45289 | return new SAXStream(strict, opt)
|
45290 | }
|
45291 |
|
45292 | Stream.apply(this);
|
45293 |
|
45294 | this._parser = new SAXParser(strict, opt);
|
45295 | this.writable = true;
|
45296 | this.readable = true;
|
45297 |
|
45298 | var me = this;
|
45299 |
|
45300 | this._parser.onend = function () {
|
45301 | me.emit('end');
|
45302 | };
|
45303 |
|
45304 | this._parser.onerror = function (er) {
|
45305 | me.emit('error', er);
|
45306 |
|
45307 |
|
45308 |
|
45309 | me._parser.error = null;
|
45310 | };
|
45311 |
|
45312 | this._decoder = null;
|
45313 |
|
45314 | streamWraps.forEach(function (ev) {
|
45315 | Object.defineProperty(me, 'on' + ev, {
|
45316 | get: function () {
|
45317 | return me._parser['on' + ev]
|
45318 | },
|
45319 | set: function (h) {
|
45320 | if (!h) {
|
45321 | me.removeAllListeners(ev);
|
45322 | me._parser['on' + ev] = h;
|
45323 | return h
|
45324 | }
|
45325 | me.on(ev, h);
|
45326 | },
|
45327 | enumerable: true,
|
45328 | configurable: false
|
45329 | });
|
45330 | });
|
45331 | }
|
45332 |
|
45333 | SAXStream.prototype = Object.create(Stream.prototype, {
|
45334 | constructor: {
|
45335 | value: SAXStream
|
45336 | }
|
45337 | });
|
45338 |
|
45339 | SAXStream.prototype.write = function (data) {
|
45340 | if (typeof Buffer === 'function' &&
|
45341 | typeof Buffer.isBuffer === 'function' &&
|
45342 | Buffer.isBuffer(data)) {
|
45343 | if (!this._decoder) {
|
45344 | var SD = require$$1$2.StringDecoder;
|
45345 | this._decoder = new SD('utf8');
|
45346 | }
|
45347 | data = this._decoder.write(data);
|
45348 | }
|
45349 |
|
45350 | this._parser.write(data.toString());
|
45351 | this.emit('data', data);
|
45352 | return true
|
45353 | };
|
45354 |
|
45355 | SAXStream.prototype.end = function (chunk) {
|
45356 | if (chunk && chunk.length) {
|
45357 | this.write(chunk);
|
45358 | }
|
45359 | this._parser.end();
|
45360 | return true
|
45361 | };
|
45362 |
|
45363 | SAXStream.prototype.on = function (ev, handler) {
|
45364 | var me = this;
|
45365 | if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
|
45366 | me._parser['on' + ev] = function () {
|
45367 | var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
|
45368 | args.splice(0, 0, ev);
|
45369 | me.emit.apply(me, args);
|
45370 | };
|
45371 | }
|
45372 |
|
45373 | return Stream.prototype.on.call(me, ev, handler)
|
45374 | };
|
45375 |
|
45376 |
|
45377 |
|
45378 | var CDATA = '[CDATA[';
|
45379 | var DOCTYPE = 'DOCTYPE';
|
45380 | var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
45381 | var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/';
|
45382 | var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE };
|
45383 |
|
45384 |
|
45385 |
|
45386 |
|
45387 |
|
45388 |
|
45389 |
|
45390 | var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
|
45391 |
|
45392 | var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
|
45393 |
|
45394 | var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;
|
45395 | var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
|
45396 |
|
45397 | function isWhitespace (c) {
|
45398 | return c === ' ' || c === '\n' || c === '\r' || c === '\t'
|
45399 | }
|
45400 |
|
45401 | function isQuote (c) {
|
45402 | return c === '"' || c === '\''
|
45403 | }
|
45404 |
|
45405 | function isAttribEnd (c) {
|
45406 | return c === '>' || isWhitespace(c)
|
45407 | }
|
45408 |
|
45409 | function isMatch (regex, c) {
|
45410 | return regex.test(c)
|
45411 | }
|
45412 |
|
45413 | function notMatch (regex, c) {
|
45414 | return !isMatch(regex, c)
|
45415 | }
|
45416 |
|
45417 | var S = 0;
|
45418 | sax.STATE = {
|
45419 | BEGIN: S++,
|
45420 | BEGIN_WHITESPACE: S++,
|
45421 | TEXT: S++,
|
45422 | TEXT_ENTITY: S++,
|
45423 | OPEN_WAKA: S++,
|
45424 | SGML_DECL: S++,
|
45425 | SGML_DECL_QUOTED: S++,
|
45426 | DOCTYPE: S++,
|
45427 | DOCTYPE_QUOTED: S++,
|
45428 | DOCTYPE_DTD: S++,
|
45429 | DOCTYPE_DTD_QUOTED: S++,
|
45430 | COMMENT_STARTING: S++,
|
45431 | COMMENT: S++,
|
45432 | COMMENT_ENDING: S++,
|
45433 | COMMENT_ENDED: S++,
|
45434 | CDATA: S++,
|
45435 | CDATA_ENDING: S++,
|
45436 | CDATA_ENDING_2: S++,
|
45437 | PROC_INST: S++,
|
45438 | PROC_INST_BODY: S++,
|
45439 | PROC_INST_ENDING: S++,
|
45440 | OPEN_TAG: S++,
|
45441 | OPEN_TAG_SLASH: S++,
|
45442 | ATTRIB: S++,
|
45443 | ATTRIB_NAME: S++,
|
45444 | ATTRIB_NAME_SAW_WHITE: S++,
|
45445 | ATTRIB_VALUE: S++,
|
45446 | ATTRIB_VALUE_QUOTED: S++,
|
45447 | ATTRIB_VALUE_CLOSED: S++,
|
45448 | ATTRIB_VALUE_UNQUOTED: S++,
|
45449 | ATTRIB_VALUE_ENTITY_Q: S++,
|
45450 | ATTRIB_VALUE_ENTITY_U: S++,
|
45451 | CLOSE_TAG: S++,
|
45452 | CLOSE_TAG_SAW_WHITE: S++,
|
45453 | SCRIPT: S++,
|
45454 | SCRIPT_ENDING: S++
|
45455 | };
|
45456 |
|
45457 | sax.XML_ENTITIES = {
|
45458 | 'amp': '&',
|
45459 | 'gt': '>',
|
45460 | 'lt': '<',
|
45461 | 'quot': '"',
|
45462 | 'apos': "'"
|
45463 | };
|
45464 |
|
45465 | sax.ENTITIES = {
|
45466 | 'amp': '&',
|
45467 | 'gt': '>',
|
45468 | 'lt': '<',
|
45469 | 'quot': '"',
|
45470 | 'apos': "'",
|
45471 | 'AElig': 198,
|
45472 | 'Aacute': 193,
|
45473 | 'Acirc': 194,
|
45474 | 'Agrave': 192,
|
45475 | 'Aring': 197,
|
45476 | 'Atilde': 195,
|
45477 | 'Auml': 196,
|
45478 | 'Ccedil': 199,
|
45479 | 'ETH': 208,
|
45480 | 'Eacute': 201,
|
45481 | 'Ecirc': 202,
|
45482 | 'Egrave': 200,
|
45483 | 'Euml': 203,
|
45484 | 'Iacute': 205,
|
45485 | 'Icirc': 206,
|
45486 | 'Igrave': 204,
|
45487 | 'Iuml': 207,
|
45488 | 'Ntilde': 209,
|
45489 | 'Oacute': 211,
|
45490 | 'Ocirc': 212,
|
45491 | 'Ograve': 210,
|
45492 | 'Oslash': 216,
|
45493 | 'Otilde': 213,
|
45494 | 'Ouml': 214,
|
45495 | 'THORN': 222,
|
45496 | 'Uacute': 218,
|
45497 | 'Ucirc': 219,
|
45498 | 'Ugrave': 217,
|
45499 | 'Uuml': 220,
|
45500 | 'Yacute': 221,
|
45501 | 'aacute': 225,
|
45502 | 'acirc': 226,
|
45503 | 'aelig': 230,
|
45504 | 'agrave': 224,
|
45505 | 'aring': 229,
|
45506 | 'atilde': 227,
|
45507 | 'auml': 228,
|
45508 | 'ccedil': 231,
|
45509 | 'eacute': 233,
|
45510 | 'ecirc': 234,
|
45511 | 'egrave': 232,
|
45512 | 'eth': 240,
|
45513 | 'euml': 235,
|
45514 | 'iacute': 237,
|
45515 | 'icirc': 238,
|
45516 | 'igrave': 236,
|
45517 | 'iuml': 239,
|
45518 | 'ntilde': 241,
|
45519 | 'oacute': 243,
|
45520 | 'ocirc': 244,
|
45521 | 'ograve': 242,
|
45522 | 'oslash': 248,
|
45523 | 'otilde': 245,
|
45524 | 'ouml': 246,
|
45525 | 'szlig': 223,
|
45526 | 'thorn': 254,
|
45527 | 'uacute': 250,
|
45528 | 'ucirc': 251,
|
45529 | 'ugrave': 249,
|
45530 | 'uuml': 252,
|
45531 | 'yacute': 253,
|
45532 | 'yuml': 255,
|
45533 | 'copy': 169,
|
45534 | 'reg': 174,
|
45535 | 'nbsp': 160,
|
45536 | 'iexcl': 161,
|
45537 | 'cent': 162,
|
45538 | 'pound': 163,
|
45539 | 'curren': 164,
|
45540 | 'yen': 165,
|
45541 | 'brvbar': 166,
|
45542 | 'sect': 167,
|
45543 | 'uml': 168,
|
45544 | 'ordf': 170,
|
45545 | 'laquo': 171,
|
45546 | 'not': 172,
|
45547 | 'shy': 173,
|
45548 | 'macr': 175,
|
45549 | 'deg': 176,
|
45550 | 'plusmn': 177,
|
45551 | 'sup1': 185,
|
45552 | 'sup2': 178,
|
45553 | 'sup3': 179,
|
45554 | 'acute': 180,
|
45555 | 'micro': 181,
|
45556 | 'para': 182,
|
45557 | 'middot': 183,
|
45558 | 'cedil': 184,
|
45559 | 'ordm': 186,
|
45560 | 'raquo': 187,
|
45561 | 'frac14': 188,
|
45562 | 'frac12': 189,
|
45563 | 'frac34': 190,
|
45564 | 'iquest': 191,
|
45565 | 'times': 215,
|
45566 | 'divide': 247,
|
45567 | 'OElig': 338,
|
45568 | 'oelig': 339,
|
45569 | 'Scaron': 352,
|
45570 | 'scaron': 353,
|
45571 | 'Yuml': 376,
|
45572 | 'fnof': 402,
|
45573 | 'circ': 710,
|
45574 | 'tilde': 732,
|
45575 | 'Alpha': 913,
|
45576 | 'Beta': 914,
|
45577 | 'Gamma': 915,
|
45578 | 'Delta': 916,
|
45579 | 'Epsilon': 917,
|
45580 | 'Zeta': 918,
|
45581 | 'Eta': 919,
|
45582 | 'Theta': 920,
|
45583 | 'Iota': 921,
|
45584 | 'Kappa': 922,
|
45585 | 'Lambda': 923,
|
45586 | 'Mu': 924,
|
45587 | 'Nu': 925,
|
45588 | 'Xi': 926,
|
45589 | 'Omicron': 927,
|
45590 | 'Pi': 928,
|
45591 | 'Rho': 929,
|
45592 | 'Sigma': 931,
|
45593 | 'Tau': 932,
|
45594 | 'Upsilon': 933,
|
45595 | 'Phi': 934,
|
45596 | 'Chi': 935,
|
45597 | 'Psi': 936,
|
45598 | 'Omega': 937,
|
45599 | 'alpha': 945,
|
45600 | 'beta': 946,
|
45601 | 'gamma': 947,
|
45602 | 'delta': 948,
|
45603 | 'epsilon': 949,
|
45604 | 'zeta': 950,
|
45605 | 'eta': 951,
|
45606 | 'theta': 952,
|
45607 | 'iota': 953,
|
45608 | 'kappa': 954,
|
45609 | 'lambda': 955,
|
45610 | 'mu': 956,
|
45611 | 'nu': 957,
|
45612 | 'xi': 958,
|
45613 | 'omicron': 959,
|
45614 | 'pi': 960,
|
45615 | 'rho': 961,
|
45616 | 'sigmaf': 962,
|
45617 | 'sigma': 963,
|
45618 | 'tau': 964,
|
45619 | 'upsilon': 965,
|
45620 | 'phi': 966,
|
45621 | 'chi': 967,
|
45622 | 'psi': 968,
|
45623 | 'omega': 969,
|
45624 | 'thetasym': 977,
|
45625 | 'upsih': 978,
|
45626 | 'piv': 982,
|
45627 | 'ensp': 8194,
|
45628 | 'emsp': 8195,
|
45629 | 'thinsp': 8201,
|
45630 | 'zwnj': 8204,
|
45631 | 'zwj': 8205,
|
45632 | 'lrm': 8206,
|
45633 | 'rlm': 8207,
|
45634 | 'ndash': 8211,
|
45635 | 'mdash': 8212,
|
45636 | 'lsquo': 8216,
|
45637 | 'rsquo': 8217,
|
45638 | 'sbquo': 8218,
|
45639 | 'ldquo': 8220,
|
45640 | 'rdquo': 8221,
|
45641 | 'bdquo': 8222,
|
45642 | 'dagger': 8224,
|
45643 | 'Dagger': 8225,
|
45644 | 'bull': 8226,
|
45645 | 'hellip': 8230,
|
45646 | 'permil': 8240,
|
45647 | 'prime': 8242,
|
45648 | 'Prime': 8243,
|
45649 | 'lsaquo': 8249,
|
45650 | 'rsaquo': 8250,
|
45651 | 'oline': 8254,
|
45652 | 'frasl': 8260,
|
45653 | 'euro': 8364,
|
45654 | 'image': 8465,
|
45655 | 'weierp': 8472,
|
45656 | 'real': 8476,
|
45657 | 'trade': 8482,
|
45658 | 'alefsym': 8501,
|
45659 | 'larr': 8592,
|
45660 | 'uarr': 8593,
|
45661 | 'rarr': 8594,
|
45662 | 'darr': 8595,
|
45663 | 'harr': 8596,
|
45664 | 'crarr': 8629,
|
45665 | 'lArr': 8656,
|
45666 | 'uArr': 8657,
|
45667 | 'rArr': 8658,
|
45668 | 'dArr': 8659,
|
45669 | 'hArr': 8660,
|
45670 | 'forall': 8704,
|
45671 | 'part': 8706,
|
45672 | 'exist': 8707,
|
45673 | 'empty': 8709,
|
45674 | 'nabla': 8711,
|
45675 | 'isin': 8712,
|
45676 | 'notin': 8713,
|
45677 | 'ni': 8715,
|
45678 | 'prod': 8719,
|
45679 | 'sum': 8721,
|
45680 | 'minus': 8722,
|
45681 | 'lowast': 8727,
|
45682 | 'radic': 8730,
|
45683 | 'prop': 8733,
|
45684 | 'infin': 8734,
|
45685 | 'ang': 8736,
|
45686 | 'and': 8743,
|
45687 | 'or': 8744,
|
45688 | 'cap': 8745,
|
45689 | 'cup': 8746,
|
45690 | 'int': 8747,
|
45691 | 'there4': 8756,
|
45692 | 'sim': 8764,
|
45693 | 'cong': 8773,
|
45694 | 'asymp': 8776,
|
45695 | 'ne': 8800,
|
45696 | 'equiv': 8801,
|
45697 | 'le': 8804,
|
45698 | 'ge': 8805,
|
45699 | 'sub': 8834,
|
45700 | 'sup': 8835,
|
45701 | 'nsub': 8836,
|
45702 | 'sube': 8838,
|
45703 | 'supe': 8839,
|
45704 | 'oplus': 8853,
|
45705 | 'otimes': 8855,
|
45706 | 'perp': 8869,
|
45707 | 'sdot': 8901,
|
45708 | 'lceil': 8968,
|
45709 | 'rceil': 8969,
|
45710 | 'lfloor': 8970,
|
45711 | 'rfloor': 8971,
|
45712 | 'lang': 9001,
|
45713 | 'rang': 9002,
|
45714 | 'loz': 9674,
|
45715 | 'spades': 9824,
|
45716 | 'clubs': 9827,
|
45717 | 'hearts': 9829,
|
45718 | 'diams': 9830
|
45719 | };
|
45720 |
|
45721 | Object.keys(sax.ENTITIES).forEach(function (key) {
|
45722 | var e = sax.ENTITIES[key];
|
45723 | var s = typeof e === 'number' ? String.fromCharCode(e) : e;
|
45724 | sax.ENTITIES[key] = s;
|
45725 | });
|
45726 |
|
45727 | for (var s in sax.STATE) {
|
45728 | sax.STATE[sax.STATE[s]] = s;
|
45729 | }
|
45730 |
|
45731 |
|
45732 | S = sax.STATE;
|
45733 |
|
45734 | function emit (parser, event, data) {
|
45735 | parser[event] && parser[event](data);
|
45736 | }
|
45737 |
|
45738 | function emitNode (parser, nodeType, data) {
|
45739 | if (parser.textNode) closeText(parser);
|
45740 | emit(parser, nodeType, data);
|
45741 | }
|
45742 |
|
45743 | function closeText (parser) {
|
45744 | parser.textNode = textopts(parser.opt, parser.textNode);
|
45745 | if (parser.textNode) emit(parser, 'ontext', parser.textNode);
|
45746 | parser.textNode = '';
|
45747 | }
|
45748 |
|
45749 | function textopts (opt, text) {
|
45750 | if (opt.trim) text = text.trim();
|
45751 | if (opt.normalize) text = text.replace(/\s+/g, ' ');
|
45752 | return text
|
45753 | }
|
45754 |
|
45755 | function error (parser, er) {
|
45756 | closeText(parser);
|
45757 | if (parser.trackPosition) {
|
45758 | er += '\nLine: ' + parser.line +
|
45759 | '\nColumn: ' + parser.column +
|
45760 | '\nChar: ' + parser.c;
|
45761 | }
|
45762 | er = new Error(er);
|
45763 | parser.error = er;
|
45764 | emit(parser, 'onerror', er);
|
45765 | return parser
|
45766 | }
|
45767 |
|
45768 | function end (parser) {
|
45769 | if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag');
|
45770 | if ((parser.state !== S.BEGIN) &&
|
45771 | (parser.state !== S.BEGIN_WHITESPACE) &&
|
45772 | (parser.state !== S.TEXT)) {
|
45773 | error(parser, 'Unexpected end');
|
45774 | }
|
45775 | closeText(parser);
|
45776 | parser.c = '';
|
45777 | parser.closed = true;
|
45778 | emit(parser, 'onend');
|
45779 | SAXParser.call(parser, parser.strict, parser.opt);
|
45780 | return parser
|
45781 | }
|
45782 |
|
45783 | function strictFail (parser, message) {
|
45784 | if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
|
45785 | throw new Error('bad call to strictFail')
|
45786 | }
|
45787 | if (parser.strict) {
|
45788 | error(parser, message);
|
45789 | }
|
45790 | }
|
45791 |
|
45792 | function newTag (parser) {
|
45793 | if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]();
|
45794 | var parent = parser.tags[parser.tags.length - 1] || parser;
|
45795 | var tag = parser.tag = { name: parser.tagName, attributes: {} };
|
45796 |
|
45797 |
|
45798 | if (parser.opt.xmlns) {
|
45799 | tag.ns = parent.ns;
|
45800 | }
|
45801 | parser.attribList.length = 0;
|
45802 | emitNode(parser, 'onopentagstart', tag);
|
45803 | }
|
45804 |
|
45805 | function qname (name, attribute) {
|
45806 | var i = name.indexOf(':');
|
45807 | var qualName = i < 0 ? [ '', name ] : name.split(':');
|
45808 | var prefix = qualName[0];
|
45809 | var local = qualName[1];
|
45810 |
|
45811 |
|
45812 | if (attribute && name === 'xmlns') {
|
45813 | prefix = 'xmlns';
|
45814 | local = '';
|
45815 | }
|
45816 |
|
45817 | return { prefix: prefix, local: local }
|
45818 | }
|
45819 |
|
45820 | function attrib (parser) {
|
45821 | if (!parser.strict) {
|
45822 | parser.attribName = parser.attribName[parser.looseCase]();
|
45823 | }
|
45824 |
|
45825 | if (parser.attribList.indexOf(parser.attribName) !== -1 ||
|
45826 | parser.tag.attributes.hasOwnProperty(parser.attribName)) {
|
45827 | parser.attribName = parser.attribValue = '';
|
45828 | return
|
45829 | }
|
45830 |
|
45831 | if (parser.opt.xmlns) {
|
45832 | var qn = qname(parser.attribName, true);
|
45833 | var prefix = qn.prefix;
|
45834 | var local = qn.local;
|
45835 |
|
45836 | if (prefix === 'xmlns') {
|
45837 |
|
45838 | if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
|
45839 | strictFail(parser,
|
45840 | 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' +
|
45841 | 'Actual: ' + parser.attribValue);
|
45842 | } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
|
45843 | strictFail(parser,
|
45844 | 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' +
|
45845 | 'Actual: ' + parser.attribValue);
|
45846 | } else {
|
45847 | var tag = parser.tag;
|
45848 | var parent = parser.tags[parser.tags.length - 1] || parser;
|
45849 | if (tag.ns === parent.ns) {
|
45850 | tag.ns = Object.create(parent.ns);
|
45851 | }
|
45852 | tag.ns[local] = parser.attribValue;
|
45853 | }
|
45854 | }
|
45855 |
|
45856 |
|
45857 |
|
45858 |
|
45859 | parser.attribList.push([parser.attribName, parser.attribValue]);
|
45860 | } else {
|
45861 |
|
45862 | parser.tag.attributes[parser.attribName] = parser.attribValue;
|
45863 | emitNode(parser, 'onattribute', {
|
45864 | name: parser.attribName,
|
45865 | value: parser.attribValue
|
45866 | });
|
45867 | }
|
45868 |
|
45869 | parser.attribName = parser.attribValue = '';
|
45870 | }
|
45871 |
|
45872 | function openTag (parser, selfClosing) {
|
45873 | if (parser.opt.xmlns) {
|
45874 |
|
45875 | var tag = parser.tag;
|
45876 |
|
45877 |
|
45878 | var qn = qname(parser.tagName);
|
45879 | tag.prefix = qn.prefix;
|
45880 | tag.local = qn.local;
|
45881 | tag.uri = tag.ns[qn.prefix] || '';
|
45882 |
|
45883 | if (tag.prefix && !tag.uri) {
|
45884 | strictFail(parser, 'Unbound namespace prefix: ' +
|
45885 | JSON.stringify(parser.tagName));
|
45886 | tag.uri = qn.prefix;
|
45887 | }
|
45888 |
|
45889 | var parent = parser.tags[parser.tags.length - 1] || parser;
|
45890 | if (tag.ns && parent.ns !== tag.ns) {
|
45891 | Object.keys(tag.ns).forEach(function (p) {
|
45892 | emitNode(parser, 'onopennamespace', {
|
45893 | prefix: p,
|
45894 | uri: tag.ns[p]
|
45895 | });
|
45896 | });
|
45897 | }
|
45898 |
|
45899 |
|
45900 |
|
45901 |
|
45902 | for (var i = 0, l = parser.attribList.length; i < l; i++) {
|
45903 | var nv = parser.attribList[i];
|
45904 | var name = nv[0];
|
45905 | var value = nv[1];
|
45906 | var qualName = qname(name, true);
|
45907 | var prefix = qualName.prefix;
|
45908 | var local = qualName.local;
|
45909 | var uri = prefix === '' ? '' : (tag.ns[prefix] || '');
|
45910 | var a = {
|
45911 | name: name,
|
45912 | value: value,
|
45913 | prefix: prefix,
|
45914 | local: local,
|
45915 | uri: uri
|
45916 | };
|
45917 |
|
45918 |
|
45919 |
|
45920 | if (prefix && prefix !== 'xmlns' && !uri) {
|
45921 | strictFail(parser, 'Unbound namespace prefix: ' +
|
45922 | JSON.stringify(prefix));
|
45923 | a.uri = prefix;
|
45924 | }
|
45925 | parser.tag.attributes[name] = a;
|
45926 | emitNode(parser, 'onattribute', a);
|
45927 | }
|
45928 | parser.attribList.length = 0;
|
45929 | }
|
45930 |
|
45931 | parser.tag.isSelfClosing = !!selfClosing;
|
45932 |
|
45933 |
|
45934 | parser.sawRoot = true;
|
45935 | parser.tags.push(parser.tag);
|
45936 | emitNode(parser, 'onopentag', parser.tag);
|
45937 | if (!selfClosing) {
|
45938 |
|
45939 | if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
|
45940 | parser.state = S.SCRIPT;
|
45941 | } else {
|
45942 | parser.state = S.TEXT;
|
45943 | }
|
45944 | parser.tag = null;
|
45945 | parser.tagName = '';
|
45946 | }
|
45947 | parser.attribName = parser.attribValue = '';
|
45948 | parser.attribList.length = 0;
|
45949 | }
|
45950 |
|
45951 | function closeTag (parser) {
|
45952 | if (!parser.tagName) {
|
45953 | strictFail(parser, 'Weird empty close tag.');
|
45954 | parser.textNode += '</>';
|
45955 | parser.state = S.TEXT;
|
45956 | return
|
45957 | }
|
45958 |
|
45959 | if (parser.script) {
|
45960 | if (parser.tagName !== 'script') {
|
45961 | parser.script += '</' + parser.tagName + '>';
|
45962 | parser.tagName = '';
|
45963 | parser.state = S.SCRIPT;
|
45964 | return
|
45965 | }
|
45966 | emitNode(parser, 'onscript', parser.script);
|
45967 | parser.script = '';
|
45968 | }
|
45969 |
|
45970 |
|
45971 |
|
45972 | var t = parser.tags.length;
|
45973 | var tagName = parser.tagName;
|
45974 | if (!parser.strict) {
|
45975 | tagName = tagName[parser.looseCase]();
|
45976 | }
|
45977 | var closeTo = tagName;
|
45978 | while (t--) {
|
45979 | var close = parser.tags[t];
|
45980 | if (close.name !== closeTo) {
|
45981 |
|
45982 | strictFail(parser, 'Unexpected close tag');
|
45983 | } else {
|
45984 | break
|
45985 | }
|
45986 | }
|
45987 |
|
45988 |
|
45989 | if (t < 0) {
|
45990 | strictFail(parser, 'Unmatched closing tag: ' + parser.tagName);
|
45991 | parser.textNode += '</' + parser.tagName + '>';
|
45992 | parser.state = S.TEXT;
|
45993 | return
|
45994 | }
|
45995 | parser.tagName = tagName;
|
45996 | var s = parser.tags.length;
|
45997 | while (s-- > t) {
|
45998 | var tag = parser.tag = parser.tags.pop();
|
45999 | parser.tagName = parser.tag.name;
|
46000 | emitNode(parser, 'onclosetag', parser.tagName);
|
46001 |
|
46002 | var x = {};
|
46003 | for (var i in tag.ns) {
|
46004 | x[i] = tag.ns[i];
|
46005 | }
|
46006 |
|
46007 | var parent = parser.tags[parser.tags.length - 1] || parser;
|
46008 | if (parser.opt.xmlns && tag.ns !== parent.ns) {
|
46009 |
|
46010 | Object.keys(tag.ns).forEach(function (p) {
|
46011 | var n = tag.ns[p];
|
46012 | emitNode(parser, 'onclosenamespace', { prefix: p, uri: n });
|
46013 | });
|
46014 | }
|
46015 | }
|
46016 | if (t === 0) parser.closedRoot = true;
|
46017 | parser.tagName = parser.attribValue = parser.attribName = '';
|
46018 | parser.attribList.length = 0;
|
46019 | parser.state = S.TEXT;
|
46020 | }
|
46021 |
|
46022 | function parseEntity (parser) {
|
46023 | var entity = parser.entity;
|
46024 | var entityLC = entity.toLowerCase();
|
46025 | var num;
|
46026 | var numStr = '';
|
46027 |
|
46028 | if (parser.ENTITIES[entity]) {
|
46029 | return parser.ENTITIES[entity]
|
46030 | }
|
46031 | if (parser.ENTITIES[entityLC]) {
|
46032 | return parser.ENTITIES[entityLC]
|
46033 | }
|
46034 | entity = entityLC;
|
46035 | if (entity.charAt(0) === '#') {
|
46036 | if (entity.charAt(1) === 'x') {
|
46037 | entity = entity.slice(2);
|
46038 | num = parseInt(entity, 16);
|
46039 | numStr = num.toString(16);
|
46040 | } else {
|
46041 | entity = entity.slice(1);
|
46042 | num = parseInt(entity, 10);
|
46043 | numStr = num.toString(10);
|
46044 | }
|
46045 | }
|
46046 | entity = entity.replace(/^0+/, '');
|
46047 | if (isNaN(num) || numStr.toLowerCase() !== entity) {
|
46048 | strictFail(parser, 'Invalid character entity');
|
46049 | return '&' + parser.entity + ';'
|
46050 | }
|
46051 |
|
46052 | return String.fromCodePoint(num)
|
46053 | }
|
46054 |
|
46055 | function beginWhiteSpace (parser, c) {
|
46056 | if (c === '<') {
|
46057 | parser.state = S.OPEN_WAKA;
|
46058 | parser.startTagPosition = parser.position;
|
46059 | } else if (!isWhitespace(c)) {
|
46060 |
|
46061 |
|
46062 | strictFail(parser, 'Non-whitespace before first tag.');
|
46063 | parser.textNode = c;
|
46064 | parser.state = S.TEXT;
|
46065 | }
|
46066 | }
|
46067 |
|
46068 | function charAt (chunk, i) {
|
46069 | var result = '';
|
46070 | if (i < chunk.length) {
|
46071 | result = chunk.charAt(i);
|
46072 | }
|
46073 | return result
|
46074 | }
|
46075 |
|
46076 | function write (chunk) {
|
46077 | var parser = this;
|
46078 | if (this.error) {
|
46079 | throw this.error
|
46080 | }
|
46081 | if (parser.closed) {
|
46082 | return error(parser,
|
46083 | 'Cannot write after close. Assign an onready handler.')
|
46084 | }
|
46085 | if (chunk === null) {
|
46086 | return end(parser)
|
46087 | }
|
46088 | if (typeof chunk === 'object') {
|
46089 | chunk = chunk.toString();
|
46090 | }
|
46091 | var i = 0;
|
46092 | var c = '';
|
46093 | while (true) {
|
46094 | c = charAt(chunk, i++);
|
46095 | parser.c = c;
|
46096 |
|
46097 | if (!c) {
|
46098 | break
|
46099 | }
|
46100 |
|
46101 | if (parser.trackPosition) {
|
46102 | parser.position++;
|
46103 | if (c === '\n') {
|
46104 | parser.line++;
|
46105 | parser.column = 0;
|
46106 | } else {
|
46107 | parser.column++;
|
46108 | }
|
46109 | }
|
46110 |
|
46111 | switch (parser.state) {
|
46112 | case S.BEGIN:
|
46113 | parser.state = S.BEGIN_WHITESPACE;
|
46114 | if (c === '\uFEFF') {
|
46115 | continue
|
46116 | }
|
46117 | beginWhiteSpace(parser, c);
|
46118 | continue
|
46119 |
|
46120 | case S.BEGIN_WHITESPACE:
|
46121 | beginWhiteSpace(parser, c);
|
46122 | continue
|
46123 |
|
46124 | case S.TEXT:
|
46125 | if (parser.sawRoot && !parser.closedRoot) {
|
46126 | var starti = i - 1;
|
46127 | while (c && c !== '<' && c !== '&') {
|
46128 | c = charAt(chunk, i++);
|
46129 | if (c && parser.trackPosition) {
|
46130 | parser.position++;
|
46131 | if (c === '\n') {
|
46132 | parser.line++;
|
46133 | parser.column = 0;
|
46134 | } else {
|
46135 | parser.column++;
|
46136 | }
|
46137 | }
|
46138 | }
|
46139 | parser.textNode += chunk.substring(starti, i - 1);
|
46140 | }
|
46141 | if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
|
46142 | parser.state = S.OPEN_WAKA;
|
46143 | parser.startTagPosition = parser.position;
|
46144 | } else {
|
46145 | if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
|
46146 | strictFail(parser, 'Text data outside of root node.');
|
46147 | }
|
46148 | if (c === '&') {
|
46149 | parser.state = S.TEXT_ENTITY;
|
46150 | } else {
|
46151 | parser.textNode += c;
|
46152 | }
|
46153 | }
|
46154 | continue
|
46155 |
|
46156 | case S.SCRIPT:
|
46157 |
|
46158 | if (c === '<') {
|
46159 | parser.state = S.SCRIPT_ENDING;
|
46160 | } else {
|
46161 | parser.script += c;
|
46162 | }
|
46163 | continue
|
46164 |
|
46165 | case S.SCRIPT_ENDING:
|
46166 | if (c === '/') {
|
46167 | parser.state = S.CLOSE_TAG;
|
46168 | } else {
|
46169 | parser.script += '<' + c;
|
46170 | parser.state = S.SCRIPT;
|
46171 | }
|
46172 | continue
|
46173 |
|
46174 | case S.OPEN_WAKA:
|
46175 |
|
46176 | if (c === '!') {
|
46177 | parser.state = S.SGML_DECL;
|
46178 | parser.sgmlDecl = '';
|
46179 | } else if (isWhitespace(c)) ; else if (isMatch(nameStart, c)) {
|
46180 | parser.state = S.OPEN_TAG;
|
46181 | parser.tagName = c;
|
46182 | } else if (c === '/') {
|
46183 | parser.state = S.CLOSE_TAG;
|
46184 | parser.tagName = '';
|
46185 | } else if (c === '?') {
|
46186 | parser.state = S.PROC_INST;
|
46187 | parser.procInstName = parser.procInstBody = '';
|
46188 | } else {
|
46189 | strictFail(parser, 'Unencoded <');
|
46190 |
|
46191 | if (parser.startTagPosition + 1 < parser.position) {
|
46192 | var pad = parser.position - parser.startTagPosition;
|
46193 | c = new Array(pad).join(' ') + c;
|
46194 | }
|
46195 | parser.textNode += '<' + c;
|
46196 | parser.state = S.TEXT;
|
46197 | }
|
46198 | continue
|
46199 |
|
46200 | case S.SGML_DECL:
|
46201 | if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
|
46202 | emitNode(parser, 'onopencdata');
|
46203 | parser.state = S.CDATA;
|
46204 | parser.sgmlDecl = '';
|
46205 | parser.cdata = '';
|
46206 | } else if (parser.sgmlDecl + c === '--') {
|
46207 | parser.state = S.COMMENT;
|
46208 | parser.comment = '';
|
46209 | parser.sgmlDecl = '';
|
46210 | } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
|
46211 | parser.state = S.DOCTYPE;
|
46212 | if (parser.doctype || parser.sawRoot) {
|
46213 | strictFail(parser,
|
46214 | 'Inappropriately located doctype declaration');
|
46215 | }
|
46216 | parser.doctype = '';
|
46217 | parser.sgmlDecl = '';
|
46218 | } else if (c === '>') {
|
46219 | emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl);
|
46220 | parser.sgmlDecl = '';
|
46221 | parser.state = S.TEXT;
|
46222 | } else if (isQuote(c)) {
|
46223 | parser.state = S.SGML_DECL_QUOTED;
|
46224 | parser.sgmlDecl += c;
|
46225 | } else {
|
46226 | parser.sgmlDecl += c;
|
46227 | }
|
46228 | continue
|
46229 |
|
46230 | case S.SGML_DECL_QUOTED:
|
46231 | if (c === parser.q) {
|
46232 | parser.state = S.SGML_DECL;
|
46233 | parser.q = '';
|
46234 | }
|
46235 | parser.sgmlDecl += c;
|
46236 | continue
|
46237 |
|
46238 | case S.DOCTYPE:
|
46239 | if (c === '>') {
|
46240 | parser.state = S.TEXT;
|
46241 | emitNode(parser, 'ondoctype', parser.doctype);
|
46242 | parser.doctype = true;
|
46243 | } else {
|
46244 | parser.doctype += c;
|
46245 | if (c === '[') {
|
46246 | parser.state = S.DOCTYPE_DTD;
|
46247 | } else if (isQuote(c)) {
|
46248 | parser.state = S.DOCTYPE_QUOTED;
|
46249 | parser.q = c;
|
46250 | }
|
46251 | }
|
46252 | continue
|
46253 |
|
46254 | case S.DOCTYPE_QUOTED:
|
46255 | parser.doctype += c;
|
46256 | if (c === parser.q) {
|
46257 | parser.q = '';
|
46258 | parser.state = S.DOCTYPE;
|
46259 | }
|
46260 | continue
|
46261 |
|
46262 | case S.DOCTYPE_DTD:
|
46263 | parser.doctype += c;
|
46264 | if (c === ']') {
|
46265 | parser.state = S.DOCTYPE;
|
46266 | } else if (isQuote(c)) {
|
46267 | parser.state = S.DOCTYPE_DTD_QUOTED;
|
46268 | parser.q = c;
|
46269 | }
|
46270 | continue
|
46271 |
|
46272 | case S.DOCTYPE_DTD_QUOTED:
|
46273 | parser.doctype += c;
|
46274 | if (c === parser.q) {
|
46275 | parser.state = S.DOCTYPE_DTD;
|
46276 | parser.q = '';
|
46277 | }
|
46278 | continue
|
46279 |
|
46280 | case S.COMMENT:
|
46281 | if (c === '-') {
|
46282 | parser.state = S.COMMENT_ENDING;
|
46283 | } else {
|
46284 | parser.comment += c;
|
46285 | }
|
46286 | continue
|
46287 |
|
46288 | case S.COMMENT_ENDING:
|
46289 | if (c === '-') {
|
46290 | parser.state = S.COMMENT_ENDED;
|
46291 | parser.comment = textopts(parser.opt, parser.comment);
|
46292 | if (parser.comment) {
|
46293 | emitNode(parser, 'oncomment', parser.comment);
|
46294 | }
|
46295 | parser.comment = '';
|
46296 | } else {
|
46297 | parser.comment += '-' + c;
|
46298 | parser.state = S.COMMENT;
|
46299 | }
|
46300 | continue
|
46301 |
|
46302 | case S.COMMENT_ENDED:
|
46303 | if (c !== '>') {
|
46304 | strictFail(parser, 'Malformed comment');
|
46305 |
|
46306 |
|
46307 | parser.comment += '--' + c;
|
46308 | parser.state = S.COMMENT;
|
46309 | } else {
|
46310 | parser.state = S.TEXT;
|
46311 | }
|
46312 | continue
|
46313 |
|
46314 | case S.CDATA:
|
46315 | if (c === ']') {
|
46316 | parser.state = S.CDATA_ENDING;
|
46317 | } else {
|
46318 | parser.cdata += c;
|
46319 | }
|
46320 | continue
|
46321 |
|
46322 | case S.CDATA_ENDING:
|
46323 | if (c === ']') {
|
46324 | parser.state = S.CDATA_ENDING_2;
|
46325 | } else {
|
46326 | parser.cdata += ']' + c;
|
46327 | parser.state = S.CDATA;
|
46328 | }
|
46329 | continue
|
46330 |
|
46331 | case S.CDATA_ENDING_2:
|
46332 | if (c === '>') {
|
46333 | if (parser.cdata) {
|
46334 | emitNode(parser, 'oncdata', parser.cdata);
|
46335 | }
|
46336 | emitNode(parser, 'onclosecdata');
|
46337 | parser.cdata = '';
|
46338 | parser.state = S.TEXT;
|
46339 | } else if (c === ']') {
|
46340 | parser.cdata += ']';
|
46341 | } else {
|
46342 | parser.cdata += ']]' + c;
|
46343 | parser.state = S.CDATA;
|
46344 | }
|
46345 | continue
|
46346 |
|
46347 | case S.PROC_INST:
|
46348 | if (c === '?') {
|
46349 | parser.state = S.PROC_INST_ENDING;
|
46350 | } else if (isWhitespace(c)) {
|
46351 | parser.state = S.PROC_INST_BODY;
|
46352 | } else {
|
46353 | parser.procInstName += c;
|
46354 | }
|
46355 | continue
|
46356 |
|
46357 | case S.PROC_INST_BODY:
|
46358 | if (!parser.procInstBody && isWhitespace(c)) {
|
46359 | continue
|
46360 | } else if (c === '?') {
|
46361 | parser.state = S.PROC_INST_ENDING;
|
46362 | } else {
|
46363 | parser.procInstBody += c;
|
46364 | }
|
46365 | continue
|
46366 |
|
46367 | case S.PROC_INST_ENDING:
|
46368 | if (c === '>') {
|
46369 | emitNode(parser, 'onprocessinginstruction', {
|
46370 | name: parser.procInstName,
|
46371 | body: parser.procInstBody
|
46372 | });
|
46373 | parser.procInstName = parser.procInstBody = '';
|
46374 | parser.state = S.TEXT;
|
46375 | } else {
|
46376 | parser.procInstBody += '?' + c;
|
46377 | parser.state = S.PROC_INST_BODY;
|
46378 | }
|
46379 | continue
|
46380 |
|
46381 | case S.OPEN_TAG:
|
46382 | if (isMatch(nameBody, c)) {
|
46383 | parser.tagName += c;
|
46384 | } else {
|
46385 | newTag(parser);
|
46386 | if (c === '>') {
|
46387 | openTag(parser);
|
46388 | } else if (c === '/') {
|
46389 | parser.state = S.OPEN_TAG_SLASH;
|
46390 | } else {
|
46391 | if (!isWhitespace(c)) {
|
46392 | strictFail(parser, 'Invalid character in tag name');
|
46393 | }
|
46394 | parser.state = S.ATTRIB;
|
46395 | }
|
46396 | }
|
46397 | continue
|
46398 |
|
46399 | case S.OPEN_TAG_SLASH:
|
46400 | if (c === '>') {
|
46401 | openTag(parser, true);
|
46402 | closeTag(parser);
|
46403 | } else {
|
46404 | strictFail(parser, 'Forward-slash in opening tag not followed by >');
|
46405 | parser.state = S.ATTRIB;
|
46406 | }
|
46407 | continue
|
46408 |
|
46409 | case S.ATTRIB:
|
46410 |
|
46411 | if (isWhitespace(c)) {
|
46412 | continue
|
46413 | } else if (c === '>') {
|
46414 | openTag(parser);
|
46415 | } else if (c === '/') {
|
46416 | parser.state = S.OPEN_TAG_SLASH;
|
46417 | } else if (isMatch(nameStart, c)) {
|
46418 | parser.attribName = c;
|
46419 | parser.attribValue = '';
|
46420 | parser.state = S.ATTRIB_NAME;
|
46421 | } else {
|
46422 | strictFail(parser, 'Invalid attribute name');
|
46423 | }
|
46424 | continue
|
46425 |
|
46426 | case S.ATTRIB_NAME:
|
46427 | if (c === '=') {
|
46428 | parser.state = S.ATTRIB_VALUE;
|
46429 | } else if (c === '>') {
|
46430 | strictFail(parser, 'Attribute without value');
|
46431 | parser.attribValue = parser.attribName;
|
46432 | attrib(parser);
|
46433 | openTag(parser);
|
46434 | } else if (isWhitespace(c)) {
|
46435 | parser.state = S.ATTRIB_NAME_SAW_WHITE;
|
46436 | } else if (isMatch(nameBody, c)) {
|
46437 | parser.attribName += c;
|
46438 | } else {
|
46439 | strictFail(parser, 'Invalid attribute name');
|
46440 | }
|
46441 | continue
|
46442 |
|
46443 | case S.ATTRIB_NAME_SAW_WHITE:
|
46444 | if (c === '=') {
|
46445 | parser.state = S.ATTRIB_VALUE;
|
46446 | } else if (isWhitespace(c)) {
|
46447 | continue
|
46448 | } else {
|
46449 | strictFail(parser, 'Attribute without value');
|
46450 | parser.tag.attributes[parser.attribName] = '';
|
46451 | parser.attribValue = '';
|
46452 | emitNode(parser, 'onattribute', {
|
46453 | name: parser.attribName,
|
46454 | value: ''
|
46455 | });
|
46456 | parser.attribName = '';
|
46457 | if (c === '>') {
|
46458 | openTag(parser);
|
46459 | } else if (isMatch(nameStart, c)) {
|
46460 | parser.attribName = c;
|
46461 | parser.state = S.ATTRIB_NAME;
|
46462 | } else {
|
46463 | strictFail(parser, 'Invalid attribute name');
|
46464 | parser.state = S.ATTRIB;
|
46465 | }
|
46466 | }
|
46467 | continue
|
46468 |
|
46469 | case S.ATTRIB_VALUE:
|
46470 | if (isWhitespace(c)) {
|
46471 | continue
|
46472 | } else if (isQuote(c)) {
|
46473 | parser.q = c;
|
46474 | parser.state = S.ATTRIB_VALUE_QUOTED;
|
46475 | } else {
|
46476 | strictFail(parser, 'Unquoted attribute value');
|
46477 | parser.state = S.ATTRIB_VALUE_UNQUOTED;
|
46478 | parser.attribValue = c;
|
46479 | }
|
46480 | continue
|
46481 |
|
46482 | case S.ATTRIB_VALUE_QUOTED:
|
46483 | if (c !== parser.q) {
|
46484 | if (c === '&') {
|
46485 | parser.state = S.ATTRIB_VALUE_ENTITY_Q;
|
46486 | } else {
|
46487 | parser.attribValue += c;
|
46488 | }
|
46489 | continue
|
46490 | }
|
46491 | attrib(parser);
|
46492 | parser.q = '';
|
46493 | parser.state = S.ATTRIB_VALUE_CLOSED;
|
46494 | continue
|
46495 |
|
46496 | case S.ATTRIB_VALUE_CLOSED:
|
46497 | if (isWhitespace(c)) {
|
46498 | parser.state = S.ATTRIB;
|
46499 | } else if (c === '>') {
|
46500 | openTag(parser);
|
46501 | } else if (c === '/') {
|
46502 | parser.state = S.OPEN_TAG_SLASH;
|
46503 | } else if (isMatch(nameStart, c)) {
|
46504 | strictFail(parser, 'No whitespace between attributes');
|
46505 | parser.attribName = c;
|
46506 | parser.attribValue = '';
|
46507 | parser.state = S.ATTRIB_NAME;
|
46508 | } else {
|
46509 | strictFail(parser, 'Invalid attribute name');
|
46510 | }
|
46511 | continue
|
46512 |
|
46513 | case S.ATTRIB_VALUE_UNQUOTED:
|
46514 | if (!isAttribEnd(c)) {
|
46515 | if (c === '&') {
|
46516 | parser.state = S.ATTRIB_VALUE_ENTITY_U;
|
46517 | } else {
|
46518 | parser.attribValue += c;
|
46519 | }
|
46520 | continue
|
46521 | }
|
46522 | attrib(parser);
|
46523 | if (c === '>') {
|
46524 | openTag(parser);
|
46525 | } else {
|
46526 | parser.state = S.ATTRIB;
|
46527 | }
|
46528 | continue
|
46529 |
|
46530 | case S.CLOSE_TAG:
|
46531 | if (!parser.tagName) {
|
46532 | if (isWhitespace(c)) {
|
46533 | continue
|
46534 | } else if (notMatch(nameStart, c)) {
|
46535 | if (parser.script) {
|
46536 | parser.script += '</' + c;
|
46537 | parser.state = S.SCRIPT;
|
46538 | } else {
|
46539 | strictFail(parser, 'Invalid tagname in closing tag.');
|
46540 | }
|
46541 | } else {
|
46542 | parser.tagName = c;
|
46543 | }
|
46544 | } else if (c === '>') {
|
46545 | closeTag(parser);
|
46546 | } else if (isMatch(nameBody, c)) {
|
46547 | parser.tagName += c;
|
46548 | } else if (parser.script) {
|
46549 | parser.script += '</' + parser.tagName;
|
46550 | parser.tagName = '';
|
46551 | parser.state = S.SCRIPT;
|
46552 | } else {
|
46553 | if (!isWhitespace(c)) {
|
46554 | strictFail(parser, 'Invalid tagname in closing tag');
|
46555 | }
|
46556 | parser.state = S.CLOSE_TAG_SAW_WHITE;
|
46557 | }
|
46558 | continue
|
46559 |
|
46560 | case S.CLOSE_TAG_SAW_WHITE:
|
46561 | if (isWhitespace(c)) {
|
46562 | continue
|
46563 | }
|
46564 | if (c === '>') {
|
46565 | closeTag(parser);
|
46566 | } else {
|
46567 | strictFail(parser, 'Invalid characters in closing tag');
|
46568 | }
|
46569 | continue
|
46570 |
|
46571 | case S.TEXT_ENTITY:
|
46572 | case S.ATTRIB_VALUE_ENTITY_Q:
|
46573 | case S.ATTRIB_VALUE_ENTITY_U:
|
46574 | var returnState;
|
46575 | var buffer;
|
46576 | switch (parser.state) {
|
46577 | case S.TEXT_ENTITY:
|
46578 | returnState = S.TEXT;
|
46579 | buffer = 'textNode';
|
46580 | break
|
46581 |
|
46582 | case S.ATTRIB_VALUE_ENTITY_Q:
|
46583 | returnState = S.ATTRIB_VALUE_QUOTED;
|
46584 | buffer = 'attribValue';
|
46585 | break
|
46586 |
|
46587 | case S.ATTRIB_VALUE_ENTITY_U:
|
46588 | returnState = S.ATTRIB_VALUE_UNQUOTED;
|
46589 | buffer = 'attribValue';
|
46590 | break
|
46591 | }
|
46592 |
|
46593 | if (c === ';') {
|
46594 | parser[buffer] += parseEntity(parser);
|
46595 | parser.entity = '';
|
46596 | parser.state = returnState;
|
46597 | } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
|
46598 | parser.entity += c;
|
46599 | } else {
|
46600 | strictFail(parser, 'Invalid character in entity name');
|
46601 | parser[buffer] += '&' + parser.entity + c;
|
46602 | parser.entity = '';
|
46603 | parser.state = returnState;
|
46604 | }
|
46605 |
|
46606 | continue
|
46607 |
|
46608 | default:
|
46609 | throw new Error(parser, 'Unknown state: ' + parser.state)
|
46610 | }
|
46611 | }
|
46612 |
|
46613 | if (parser.position >= parser.bufferCheckPosition) {
|
46614 | checkBufferLength(parser);
|
46615 | }
|
46616 | return parser
|
46617 | }
|
46618 |
|
46619 |
|
46620 |
|
46621 | if (!String.fromCodePoint) {
|
46622 | (function () {
|
46623 | var stringFromCharCode = String.fromCharCode;
|
46624 | var floor = Math.floor;
|
46625 | var fromCodePoint = function () {
|
46626 | var MAX_SIZE = 0x4000;
|
46627 | var codeUnits = [];
|
46628 | var highSurrogate;
|
46629 | var lowSurrogate;
|
46630 | var index = -1;
|
46631 | var length = arguments.length;
|
46632 | if (!length) {
|
46633 | return ''
|
46634 | }
|
46635 | var result = '';
|
46636 | while (++index < length) {
|
46637 | var codePoint = Number(arguments[index]);
|
46638 | if (
|
46639 | !isFinite(codePoint) ||
|
46640 | codePoint < 0 ||
|
46641 | codePoint > 0x10FFFF ||
|
46642 | floor(codePoint) !== codePoint
|
46643 | ) {
|
46644 | throw RangeError('Invalid code point: ' + codePoint)
|
46645 | }
|
46646 | if (codePoint <= 0xFFFF) {
|
46647 | codeUnits.push(codePoint);
|
46648 | } else {
|
46649 |
|
46650 | codePoint -= 0x10000;
|
46651 | highSurrogate = (codePoint >> 10) + 0xD800;
|
46652 | lowSurrogate = (codePoint % 0x400) + 0xDC00;
|
46653 | codeUnits.push(highSurrogate, lowSurrogate);
|
46654 | }
|
46655 | if (index + 1 === length || codeUnits.length > MAX_SIZE) {
|
46656 | result += stringFromCharCode.apply(null, codeUnits);
|
46657 | codeUnits.length = 0;
|
46658 | }
|
46659 | }
|
46660 | return result
|
46661 | };
|
46662 |
|
46663 | if (Object.defineProperty) {
|
46664 | Object.defineProperty(String, 'fromCodePoint', {
|
46665 | value: fromCodePoint,
|
46666 | configurable: true,
|
46667 | writable: true
|
46668 | });
|
46669 | } else {
|
46670 | String.fromCodePoint = fromCodePoint;
|
46671 | }
|
46672 | }());
|
46673 | }
|
46674 | })(exports);
|
46675 | });
|
46676 |
|
46677 | var CSSClassList = function(node) {
|
46678 | this.parentNode = node;
|
46679 | this.classNames = new Set();
|
46680 | this.classAttr = null;
|
46681 |
|
46682 | };
|
46683 |
|
46684 |
|
46685 |
|
46686 |
|
46687 |
|
46688 |
|
46689 | CSSClassList.prototype.clone = function(parentNode) {
|
46690 | var node = this;
|
46691 | var nodeData = {};
|
46692 |
|
46693 | Object.keys(node).forEach(function(key) {
|
46694 | if (key !== 'parentNode') {
|
46695 | nodeData[key] = node[key];
|
46696 | }
|
46697 | });
|
46698 |
|
46699 |
|
46700 | nodeData = JSON.parse(JSON.stringify(nodeData));
|
46701 |
|
46702 | var clone = new CSSClassList(parentNode);
|
46703 | Object.assign(clone, nodeData);
|
46704 | return clone;
|
46705 | };
|
46706 |
|
46707 | CSSClassList.prototype.hasClass = function() {
|
46708 | this.classAttr = {
|
46709 | 'name': 'class',
|
46710 | 'value': null
|
46711 | };
|
46712 |
|
46713 | this.addClassHandler();
|
46714 | };
|
46715 |
|
46716 |
|
46717 |
|
46718 |
|
46719 | CSSClassList.prototype.addClassHandler = function() {
|
46720 |
|
46721 | Object.defineProperty(this.parentNode.attrs, 'class', {
|
46722 | get: this.getClassAttr.bind(this),
|
46723 | set: this.setClassAttr.bind(this),
|
46724 | enumerable: true,
|
46725 | configurable: true
|
46726 | });
|
46727 |
|
46728 | this.addClassValueHandler();
|
46729 | };
|
46730 |
|
46731 | // attr.class.value
|
46732 |
|
46733 | CSSClassList.prototype.addClassValueHandler = function() {
|
46734 |
|
46735 | Object.defineProperty(this.classAttr, 'value', {
|
46736 | get: this.getClassValue.bind(this),
|
46737 | set: this.setClassValue.bind(this),
|
46738 | enumerable: true,
|
46739 | configurable: true
|
46740 | });
|
46741 | };
|
46742 |
|
46743 | CSSClassList.prototype.getClassAttr = function() {
|
46744 | return this.classAttr;
|
46745 | };
|
46746 |
|
46747 | CSSClassList.prototype.setClassAttr = function(newClassAttr) {
|
46748 | this.setClassValue(newClassAttr.value);
|
46749 |
|
46750 | this.classAttr = newClassAttr;
|
46751 | this.addClassValueHandler();
|
46752 | };
|
46753 |
|
46754 | CSSClassList.prototype.getClassValue = function() {
|
46755 | var arrClassNames = Array.from(this.classNames);
|
46756 | return arrClassNames.join(' ');
|
46757 | };
|
46758 |
|
46759 | CSSClassList.prototype.setClassValue = function(newValue) {
|
46760 | if(typeof newValue === 'undefined') {
|
46761 | this.classNames.clear();
|
46762 | return;
|
46763 | }
|
46764 | var arrClassNames = newValue.split(' ');
|
46765 | this.classNames = new Set(arrClassNames);
|
46766 | };
|
46767 |
|
46768 |
|
46769 | CSSClassList.prototype.add = function(/* variadic */) {
|
46770 | this.hasClass();
|
46771 | Object.values(arguments).forEach(this._addSingle.bind(this));
|
46772 | };
|
46773 |
|
46774 | CSSClassList.prototype._addSingle = function(className) {
|
46775 | this.classNames.add(className);
|
46776 | };
|
46777 |
|
46778 |
|
46779 | CSSClassList.prototype.remove = function(/* variadic */) {
|
46780 | this.hasClass();
|
46781 | Object.values(arguments).forEach(this._removeSingle.bind(this));
|
46782 | };
|
46783 |
|
46784 | CSSClassList.prototype._removeSingle = function(className) {
|
46785 | this.classNames.delete(className);
|
46786 | };
|
46787 |
|
46788 |
|
46789 | CSSClassList.prototype.item = function(index) {
|
46790 | var arrClassNames = Array.from(this.classNames);
|
46791 | return arrClassNames[index];
|
46792 | };
|
46793 |
|
46794 | CSSClassList.prototype.toggle = function(className, force) {
|
46795 | if(this.contains(className) || force === false) {
|
46796 | this.classNames.delete(className);
|
46797 | }
|
46798 | this.classNames.add(className);
|
46799 | };
|
46800 |
|
46801 | CSSClassList.prototype.contains = function(className) {
|
46802 | return this.classNames.has(className);
|
46803 | };
|
46804 |
|
46805 |
|
46806 | var cssClassList = CSSClassList;
|
46807 |
|
46808 | var CSSStyleDeclaration = function(node) {
|
46809 | this.parentNode = node;
|
46810 |
|
46811 | this.properties = new Map();
|
46812 | this.hasSynced = false;
|
46813 |
|
46814 | this.styleAttr = null;
|
46815 | this.styleValue = null;
|
46816 |
|
46817 | this.parseError = false;
|
46818 | };
|
46819 |
|
46820 |
|
46821 |
|
46822 |
|
46823 |
|
46824 |
|
46825 | CSSStyleDeclaration.prototype.clone = function(parentNode) {
|
46826 | var node = this;
|
46827 | var nodeData = {};
|
46828 |
|
46829 | Object.keys(node).forEach(function(key) {
|
46830 | if (key !== 'parentNode') {
|
46831 | nodeData[key] = node[key];
|
46832 | }
|
46833 | });
|
46834 |
|
46835 |
|
46836 | nodeData = JSON.parse(JSON.stringify(nodeData));
|
46837 |
|
46838 | var clone = new CSSStyleDeclaration(parentNode);
|
46839 | Object.assign(clone, nodeData);
|
46840 | return clone;
|
46841 | };
|
46842 |
|
46843 | CSSStyleDeclaration.prototype.hasStyle = function() {
|
46844 | this.addStyleHandler();
|
46845 | };
|
46846 |
|
46847 |
|
46848 |
|
46849 |
|
46850 |
|
46851 |
|
46852 | CSSStyleDeclaration.prototype.addStyleHandler = function() {
|
46853 |
|
46854 | this.styleAttr = {
|
46855 | 'name': 'style',
|
46856 | 'value': null
|
46857 | };
|
46858 |
|
46859 | Object.defineProperty(this.parentNode.attrs, 'style', {
|
46860 | get: this.getStyleAttr.bind(this),
|
46861 | set: this.setStyleAttr.bind(this),
|
46862 | enumerable: true,
|
46863 | configurable: true
|
46864 | });
|
46865 |
|
46866 | this.addStyleValueHandler();
|
46867 | };
|
46868 |
|
46869 | // attr.style.value
|
46870 |
|
46871 | CSSStyleDeclaration.prototype.addStyleValueHandler = function() {
|
46872 |
|
46873 | Object.defineProperty(this.styleAttr, 'value', {
|
46874 | get: this.getStyleValue.bind(this),
|
46875 | set: this.setStyleValue.bind(this),
|
46876 | enumerable: true,
|
46877 | configurable: true
|
46878 | });
|
46879 | };
|
46880 |
|
46881 | CSSStyleDeclaration.prototype.getStyleAttr = function() {
|
46882 | return this.styleAttr;
|
46883 | };
|
46884 |
|
46885 | CSSStyleDeclaration.prototype.setStyleAttr = function(newStyleAttr) {
|
46886 | this.setStyleValue(newStyleAttr.value);
|
46887 |
|
46888 | this.styleAttr = newStyleAttr;
|
46889 | this.addStyleValueHandler();
|
46890 | this.hasSynced = false;
|
46891 | };
|
46892 |
|
46893 | CSSStyleDeclaration.prototype.getStyleValue = function() {
|
46894 | return this.getCssText();
|
46895 | };
|
46896 |
|
46897 | CSSStyleDeclaration.prototype.setStyleValue = function(newValue) {
|
46898 | this.properties.clear();
|
46899 | this.styleValue = newValue;
|
46900 | this.hasSynced = false;
|
46901 | };
|
46902 |
|
46903 |
|
46904 |
|
46905 |
|
46906 | CSSStyleDeclaration.prototype._loadCssText = function() {
|
46907 | if (this.hasSynced) {
|
46908 | return;
|
46909 | }
|
46910 | this.hasSynced = true;
|
46911 |
|
46912 | if (!this.styleValue || this.styleValue.length === 0) {
|
46913 | return;
|
46914 | }
|
46915 | var inlineCssStr = this.styleValue;
|
46916 |
|
46917 | var declarations = {};
|
46918 | try {
|
46919 | declarations = lib.parse(inlineCssStr, {
|
46920 | context: 'declarationList',
|
46921 | parseValue: false
|
46922 | });
|
46923 | } catch (parseError) {
|
46924 | this.parseError = parseError;
|
46925 | return;
|
46926 | }
|
46927 | this.parseError = false;
|
46928 |
|
46929 | var self = this;
|
46930 | declarations.children.each(function(declaration) {
|
46931 | try {
|
46932 | var styleDeclaration = cssTools.csstreeToStyleDeclaration(declaration);
|
46933 | self.setProperty(styleDeclaration.name, styleDeclaration.value, styleDeclaration.priority);
|
46934 | } catch(styleError) {
|
46935 | if(styleError.message !== 'Unknown node type: undefined') {
|
46936 | self.parseError = styleError;
|
46937 | }
|
46938 | }
|
46939 | });
|
46940 | };
|
46941 |
|
46942 |
|
46943 |
|
46944 |
|
46945 |
|
46946 |
|
46947 |
|
46948 |
|
46949 |
|
46950 | CSSStyleDeclaration.prototype.getCssText = function() {
|
46951 | var properties = this.getProperties();
|
46952 |
|
46953 | if (this.parseError) {
|
46954 |
|
46955 | return this.styleValue;
|
46956 | }
|
46957 |
|
46958 | var cssText = [];
|
46959 | properties.forEach(function(property, propertyName) {
|
46960 | var strImportant = property.priority === 'important' ? '!important' : '';
|
46961 | cssText.push(propertyName.trim() + ':' + property.value.trim() + strImportant);
|
46962 | });
|
46963 | return cssText.join(';');
|
46964 | };
|
46965 |
|
46966 | CSSStyleDeclaration.prototype._handleParseError = function() {
|
46967 | if (this.parseError) {
|
46968 | console.warn('Warning: Parse error when parsing inline styles, style properties of this element cannot be used. The raw styles can still be get/set using .attr(\'style\').value. Error details: ' + this.parseError);
|
46969 | }
|
46970 | };
|
46971 |
|
46972 |
|
46973 | CSSStyleDeclaration.prototype._getProperty = function(propertyName) {
|
46974 | if(typeof propertyName === 'undefined') {
|
46975 | throw Error('1 argument required, but only 0 present.');
|
46976 | }
|
46977 |
|
46978 | var properties = this.getProperties();
|
46979 | this._handleParseError();
|
46980 |
|
46981 | var property = properties.get(propertyName.trim());
|
46982 | return property;
|
46983 | };
|
46984 |
|
46985 |
|
46986 |
|
46987 |
|
46988 |
|
46989 |
|
46990 |
|
46991 | CSSStyleDeclaration.prototype.getPropertyPriority = function(propertyName) {
|
46992 | var property = this._getProperty(propertyName);
|
46993 | return property ? property.priority : '';
|
46994 | };
|
46995 |
|
46996 |
|
46997 |
|
46998 |
|
46999 |
|
47000 |
|
47001 |
|
47002 | CSSStyleDeclaration.prototype.getPropertyValue = function(propertyName) {
|
47003 | var property = this._getProperty(propertyName);
|
47004 | return property ? property.value : null;
|
47005 | };
|
47006 |
|
47007 |
|
47008 |
|
47009 |
|
47010 |
|
47011 |
|
47012 |
|
47013 | CSSStyleDeclaration.prototype.item = function(index) {
|
47014 | if(typeof index === 'undefined') {
|
47015 | throw Error('1 argument required, but only 0 present.');
|
47016 | }
|
47017 |
|
47018 | var properties = this.getProperties();
|
47019 | this._handleParseError();
|
47020 |
|
47021 | return Array.from(properties.keys())[index];
|
47022 | };
|
47023 |
|
47024 |
|
47025 |
|
47026 |
|
47027 |
|
47028 |
|
47029 | CSSStyleDeclaration.prototype.getProperties = function() {
|
47030 | this._loadCssText();
|
47031 | return this.properties;
|
47032 | };
|
47033 |
|
47034 |
|
47035 |
|
47036 |
|
47037 |
|
47038 |
|
47039 |
|
47040 |
|
47041 |
|
47042 |
|
47043 | CSSStyleDeclaration.prototype.removeProperty = function(propertyName) {
|
47044 | if(typeof propertyName === 'undefined') {
|
47045 | throw Error('1 argument required, but only 0 present.');
|
47046 | }
|
47047 |
|
47048 | this.hasStyle();
|
47049 |
|
47050 | var properties = this.getProperties();
|
47051 | this._handleParseError();
|
47052 |
|
47053 | var oldValue = this.getPropertyValue(propertyName);
|
47054 | properties.delete(propertyName.trim());
|
47055 | return oldValue;
|
47056 | };
|
47057 |
|
47058 |
|
47059 |
|
47060 |
|
47061 |
|
47062 |
|
47063 |
|
47064 |
|
47065 |
|
47066 | CSSStyleDeclaration.prototype.setProperty = function(propertyName, value, priority) {
|
47067 | if(typeof propertyName === 'undefined') {
|
47068 | throw Error('propertyName argument required, but only not present.');
|
47069 | }
|
47070 |
|
47071 | this.hasStyle();
|
47072 |
|
47073 | var properties = this.getProperties();
|
47074 | this._handleParseError();
|
47075 |
|
47076 | var property = {
|
47077 | value: value.trim(),
|
47078 | priority: priority.trim()
|
47079 | };
|
47080 | properties.set(propertyName.trim(), property);
|
47081 |
|
47082 | return property;
|
47083 | };
|
47084 |
|
47085 |
|
47086 | var cssStyleDeclaration = CSSStyleDeclaration;
|
47087 |
|
47088 | var entityDeclaration = /<!ENTITY\s+(\S+)\s+(?:'([^\']+)'|"([^\"]+)")\s*>/g;
|
47089 |
|
47090 | var config$1 = {
|
47091 | strict: true,
|
47092 | trim: false,
|
47093 | normalize: true,
|
47094 | lowercase: true,
|
47095 | xmlns: true,
|
47096 | position: true
|
47097 | };
|
47098 |
|
47099 |
|
47100 |
|
47101 |
|
47102 |
|
47103 |
|
47104 | var svg2js = function(data) {
|
47105 |
|
47106 | var sax$1 = sax.parser(config$1.strict, config$1),
|
47107 | root = new jsAPI({ elem: '#document', content: [] }),
|
47108 | current = root,
|
47109 | stack = [root],
|
47110 | textContext = null;
|
47111 |
|
47112 | function pushToContent(content) {
|
47113 |
|
47114 | content = new jsAPI(content, current);
|
47115 |
|
47116 | (current.content = current.content || []).push(content);
|
47117 |
|
47118 | return content;
|
47119 |
|
47120 | }
|
47121 |
|
47122 | sax$1.ondoctype = function(doctype) {
|
47123 |
|
47124 | pushToContent({
|
47125 | doctype: doctype
|
47126 | });
|
47127 |
|
47128 | var subsetStart = doctype.indexOf('['),
|
47129 | entityMatch;
|
47130 |
|
47131 | if (subsetStart >= 0) {
|
47132 | entityDeclaration.lastIndex = subsetStart;
|
47133 |
|
47134 | while ((entityMatch = entityDeclaration.exec(data)) != null) {
|
47135 | sax$1.ENTITIES[entityMatch[1]] = entityMatch[2] || entityMatch[3];
|
47136 | }
|
47137 | }
|
47138 | };
|
47139 |
|
47140 | sax$1.onprocessinginstruction = function(data) {
|
47141 |
|
47142 | pushToContent({
|
47143 | processinginstruction: data
|
47144 | });
|
47145 |
|
47146 | };
|
47147 |
|
47148 | sax$1.oncomment = function(comment) {
|
47149 |
|
47150 | pushToContent({
|
47151 | comment: comment.trim()
|
47152 | });
|
47153 |
|
47154 | };
|
47155 |
|
47156 | sax$1.oncdata = function(cdata) {
|
47157 |
|
47158 | pushToContent({
|
47159 | cdata: cdata
|
47160 | });
|
47161 |
|
47162 | };
|
47163 |
|
47164 | sax$1.onopentag = function(data) {
|
47165 |
|
47166 | var elem = {
|
47167 | elem: data.name,
|
47168 | prefix: data.prefix,
|
47169 | local: data.local,
|
47170 | attrs: {}
|
47171 | };
|
47172 |
|
47173 | elem.class = new cssClassList(elem);
|
47174 | elem.style = new cssStyleDeclaration(elem);
|
47175 |
|
47176 | if (Object.keys(data.attributes).length) {
|
47177 | for (var name in data.attributes) {
|
47178 |
|
47179 | if (name === 'class') {
|
47180 | elem.class.hasClass();
|
47181 | }
|
47182 |
|
47183 | if (name === 'style') {
|
47184 | elem.style.hasStyle();
|
47185 | }
|
47186 |
|
47187 | elem.attrs[name] = {
|
47188 | name: name,
|
47189 | value: data.attributes[name].value,
|
47190 | prefix: data.attributes[name].prefix,
|
47191 | local: data.attributes[name].local
|
47192 | };
|
47193 | }
|
47194 | }
|
47195 |
|
47196 | elem = pushToContent(elem);
|
47197 | current = elem;
|
47198 |
|
47199 |
|
47200 | if (data.name == 'text' && !data.prefix) {
|
47201 | textContext = current;
|
47202 | }
|
47203 |
|
47204 | stack.push(elem);
|
47205 |
|
47206 | };
|
47207 |
|
47208 | sax$1.ontext = function(text) {
|
47209 |
|
47210 | if (/\S/.test(text) || textContext) {
|
47211 |
|
47212 | if (!textContext)
|
47213 | text = text.trim();
|
47214 |
|
47215 | pushToContent({
|
47216 | text: text
|
47217 | });
|
47218 |
|
47219 | }
|
47220 |
|
47221 | };
|
47222 |
|
47223 | sax$1.onclosetag = function() {
|
47224 |
|
47225 | var last = stack.pop();
|
47226 |
|
47227 |
|
47228 | if (last == textContext) {
|
47229 | trim(textContext);
|
47230 | textContext = null;
|
47231 | }
|
47232 | current = stack[stack.length - 1];
|
47233 |
|
47234 | };
|
47235 |
|
47236 | sax$1.onerror = function(e) {
|
47237 |
|
47238 | e.message = 'Error in parsing SVG: ' + e.message;
|
47239 | if (e.message.indexOf('Unexpected end') < 0) {
|
47240 | throw e;
|
47241 | }
|
47242 |
|
47243 | };
|
47244 |
|
47245 | try {
|
47246 | sax$1.write(data).close();
|
47247 | return root;
|
47248 | } catch (e) {
|
47249 | return { error: e.message };
|
47250 | }
|
47251 |
|
47252 | function trim(elem) {
|
47253 | if (!elem.content) return elem;
|
47254 |
|
47255 | var start = elem.content[0],
|
47256 | end = elem.content[elem.content.length - 1];
|
47257 |
|
47258 | while (start && start.content && !start.text) start = start.content[0];
|
47259 | if (start && start.text) start.text = start.text.replace(/^\s+/, '');
|
47260 |
|
47261 | while (end && end.content && !end.text) end = end.content[end.content.length - 1];
|
47262 | if (end && end.text) end.text = end.text.replace(/\s+$/, '');
|
47263 |
|
47264 | return elem;
|
47265 |
|
47266 | }
|
47267 |
|
47268 | };
|
47269 |
|
47270 | var EOL = '\n';
|
47271 |
|
47272 | var os = Object.freeze({
|
47273 | __proto__: null,
|
47274 | EOL: EOL
|
47275 | });
|
47276 |
|
47277 | var require$$0$4 = getAugmentedNamespace(os);
|
47278 |
|
47279 | var EOL$1 = require$$0$4.EOL,
|
47280 | textElem = _collections.elemsGroups.textContent.concat('title');
|
47281 |
|
47282 | var defaults = {
|
47283 | doctypeStart: '<!DOCTYPE',
|
47284 | doctypeEnd: '>',
|
47285 | procInstStart: '<?',
|
47286 | procInstEnd: '?>',
|
47287 | tagOpenStart: '<',
|
47288 | tagOpenEnd: '>',
|
47289 | tagCloseStart: '</',
|
47290 | tagCloseEnd: '>',
|
47291 | tagShortStart: '<',
|
47292 | tagShortEnd: '/>',
|
47293 | attrStart: '="',
|
47294 | attrEnd: '"',
|
47295 | commentStart: '<!--',
|
47296 | commentEnd: '-->',
|
47297 | cdataStart: '<![CDATA[',
|
47298 | cdataEnd: ']]>',
|
47299 | textStart: '',
|
47300 | textEnd: '',
|
47301 | indent: 4,
|
47302 | regEntities: /[&'"<>]/g,
|
47303 | regValEntities: /[&"<>]/g,
|
47304 | encodeEntity: encodeEntity,
|
47305 | pretty: false,
|
47306 | useShortTags: true
|
47307 | };
|
47308 |
|
47309 | var entities = {
|
47310 | '&': '&',
|
47311 | '\'': ''',
|
47312 | '"': '"',
|
47313 | '>': '>',
|
47314 | '<': '<',
|
47315 | };
|
47316 |
|
47317 |
|
47318 |
|
47319 |
|
47320 |
|
47321 |
|
47322 |
|
47323 |
|
47324 |
|
47325 | var js2svg = function(data, config) {
|
47326 |
|
47327 | return new JS2SVG(config).convert(data);
|
47328 |
|
47329 | };
|
47330 |
|
47331 | function JS2SVG(config) {
|
47332 |
|
47333 | if (config) {
|
47334 | this.config = Object.assign({}, defaults, config);
|
47335 | } else {
|
47336 | this.config = Object.assign({}, defaults);
|
47337 | }
|
47338 |
|
47339 | var indent = this.config.indent;
|
47340 | if (typeof indent == 'number' && !isNaN(indent)) {
|
47341 | this.config.indent = (indent < 0) ? '\t' : ' '.repeat(indent);
|
47342 | } else if (typeof indent != 'string') {
|
47343 | this.config.indent = ' ';
|
47344 | }
|
47345 |
|
47346 | if (this.config.pretty) {
|
47347 | this.config.doctypeEnd += EOL$1;
|
47348 | this.config.procInstEnd += EOL$1;
|
47349 | this.config.commentEnd += EOL$1;
|
47350 | this.config.cdataEnd += EOL$1;
|
47351 | this.config.tagShortEnd += EOL$1;
|
47352 | this.config.tagOpenEnd += EOL$1;
|
47353 | this.config.tagCloseEnd += EOL$1;
|
47354 | this.config.textEnd += EOL$1;
|
47355 | }
|
47356 |
|
47357 | this.indentLevel = 0;
|
47358 | this.textContext = null;
|
47359 |
|
47360 | }
|
47361 |
|
47362 | function encodeEntity(char) {
|
47363 | return entities[char];
|
47364 | }
|
47365 |
|
47366 |
|
47367 |
|
47368 |
|
47369 |
|
47370 |
|
47371 |
|
47372 |
|
47373 | JS2SVG.prototype.convert = function(data) {
|
47374 |
|
47375 | var svg = '';
|
47376 |
|
47377 | if (data.content) {
|
47378 |
|
47379 | this.indentLevel++;
|
47380 |
|
47381 | data.content.forEach(function(item) {
|
47382 |
|
47383 | if (item.elem) {
|
47384 | svg += this.createElem(item);
|
47385 | } else if (item.text) {
|
47386 | svg += this.createText(item.text);
|
47387 | } else if (item.doctype) {
|
47388 | svg += this.createDoctype(item.doctype);
|
47389 | } else if (item.processinginstruction) {
|
47390 | svg += this.createProcInst(item.processinginstruction);
|
47391 | } else if (item.comment) {
|
47392 | svg += this.createComment(item.comment);
|
47393 | } else if (item.cdata) {
|
47394 | svg += this.createCDATA(item.cdata);
|
47395 | }
|
47396 |
|
47397 | }, this);
|
47398 |
|
47399 | }
|
47400 |
|
47401 | this.indentLevel--;
|
47402 |
|
47403 | return {
|
47404 | data: svg,
|
47405 | info: {
|
47406 | width: this.width,
|
47407 | height: this.height
|
47408 | }
|
47409 | };
|
47410 |
|
47411 | };
|
47412 |
|
47413 |
|
47414 |
|
47415 |
|
47416 |
|
47417 |
|
47418 | JS2SVG.prototype.createIndent = function() {
|
47419 |
|
47420 | var indent = '';
|
47421 |
|
47422 | if (this.config.pretty && !this.textContext) {
|
47423 | indent = this.config.indent.repeat(this.indentLevel - 1);
|
47424 | }
|
47425 |
|
47426 | return indent;
|
47427 |
|
47428 | };
|
47429 |
|
47430 |
|
47431 |
|
47432 |
|
47433 |
|
47434 |
|
47435 |
|
47436 |
|
47437 | JS2SVG.prototype.createDoctype = function(doctype) {
|
47438 |
|
47439 | return this.config.doctypeStart +
|
47440 | doctype +
|
47441 | this.config.doctypeEnd;
|
47442 |
|
47443 | };
|
47444 |
|
47445 |
|
47446 |
|
47447 |
|
47448 |
|
47449 |
|
47450 |
|
47451 |
|
47452 | JS2SVG.prototype.createProcInst = function(instruction) {
|
47453 |
|
47454 | return this.config.procInstStart +
|
47455 | instruction.name +
|
47456 | ' ' +
|
47457 | instruction.body +
|
47458 | this.config.procInstEnd;
|
47459 |
|
47460 | };
|
47461 |
|
47462 |
|
47463 |
|
47464 |
|
47465 |
|
47466 |
|
47467 |
|
47468 |
|
47469 | JS2SVG.prototype.createComment = function(comment) {
|
47470 |
|
47471 | return this.config.commentStart +
|
47472 | comment +
|
47473 | this.config.commentEnd;
|
47474 |
|
47475 | };
|
47476 |
|
47477 |
|
47478 |
|
47479 |
|
47480 |
|
47481 |
|
47482 |
|
47483 |
|
47484 | JS2SVG.prototype.createCDATA = function(cdata) {
|
47485 |
|
47486 | return this.createIndent() +
|
47487 | this.config.cdataStart +
|
47488 | cdata +
|
47489 | this.config.cdataEnd;
|
47490 |
|
47491 | };
|
47492 |
|
47493 |
|
47494 |
|
47495 |
|
47496 |
|
47497 |
|
47498 |
|
47499 |
|
47500 | JS2SVG.prototype.createElem = function(data) {
|
47501 |
|
47502 |
|
47503 | if (
|
47504 | data.isElem('svg') &&
|
47505 | data.hasAttr('width') &&
|
47506 | data.hasAttr('height')
|
47507 | ) {
|
47508 | this.width = data.attr('width').value;
|
47509 | this.height = data.attr('height').value;
|
47510 | }
|
47511 |
|
47512 |
|
47513 | if (data.isEmpty()) {
|
47514 | if (this.config.useShortTags) {
|
47515 | return this.createIndent() +
|
47516 | this.config.tagShortStart +
|
47517 | data.elem +
|
47518 | this.createAttrs(data) +
|
47519 | this.config.tagShortEnd;
|
47520 | } else {
|
47521 | return this.createIndent() +
|
47522 | this.config.tagShortStart +
|
47523 | data.elem +
|
47524 | this.createAttrs(data) +
|
47525 | this.config.tagOpenEnd +
|
47526 | this.config.tagCloseStart +
|
47527 | data.elem +
|
47528 | this.config.tagCloseEnd;
|
47529 | }
|
47530 |
|
47531 | } else {
|
47532 | var tagOpenStart = this.config.tagOpenStart,
|
47533 | tagOpenEnd = this.config.tagOpenEnd,
|
47534 | tagCloseStart = this.config.tagCloseStart,
|
47535 | tagCloseEnd = this.config.tagCloseEnd,
|
47536 | openIndent = this.createIndent(),
|
47537 | textIndent = '',
|
47538 | processedData = '',
|
47539 | dataEnd = '';
|
47540 |
|
47541 | if (this.textContext) {
|
47542 | tagOpenStart = defaults.tagOpenStart;
|
47543 | tagOpenEnd = defaults.tagOpenEnd;
|
47544 | tagCloseStart = defaults.tagCloseStart;
|
47545 | tagCloseEnd = defaults.tagCloseEnd;
|
47546 | openIndent = '';
|
47547 | } else if (data.isElem(textElem)) {
|
47548 | if (this.config.pretty) {
|
47549 | textIndent += openIndent + this.config.indent;
|
47550 | }
|
47551 | this.textContext = data;
|
47552 | }
|
47553 |
|
47554 | processedData += this.convert(data).data;
|
47555 |
|
47556 | if (this.textContext == data) {
|
47557 | this.textContext = null;
|
47558 | if (this.config.pretty) dataEnd = EOL$1;
|
47559 | }
|
47560 |
|
47561 | return openIndent +
|
47562 | tagOpenStart +
|
47563 | data.elem +
|
47564 | this.createAttrs(data) +
|
47565 | tagOpenEnd +
|
47566 | textIndent +
|
47567 | processedData +
|
47568 | dataEnd +
|
47569 | this.createIndent() +
|
47570 | tagCloseStart +
|
47571 | data.elem +
|
47572 | tagCloseEnd;
|
47573 |
|
47574 | }
|
47575 |
|
47576 | };
|
47577 |
|
47578 |
|
47579 |
|
47580 |
|
47581 |
|
47582 |
|
47583 |
|
47584 |
|
47585 | JS2SVG.prototype.createAttrs = function(elem) {
|
47586 |
|
47587 | var attrs = '';
|
47588 |
|
47589 | elem.eachAttr(function(attr) {
|
47590 |
|
47591 | if (attr.value !== undefined) {
|
47592 | attrs += ' ' +
|
47593 | attr.name +
|
47594 | this.config.attrStart +
|
47595 | String(attr.value).replace(this.config.regValEntities, this.config.encodeEntity) +
|
47596 | this.config.attrEnd;
|
47597 | }
|
47598 | else {
|
47599 | attrs += ' ' +
|
47600 | attr.name;
|
47601 | }
|
47602 |
|
47603 |
|
47604 | }, this);
|
47605 |
|
47606 | return attrs;
|
47607 |
|
47608 | };
|
47609 |
|
47610 |
|
47611 |
|
47612 |
|
47613 |
|
47614 |
|
47615 |
|
47616 |
|
47617 | JS2SVG.prototype.createText = function(text) {
|
47618 |
|
47619 | return this.createIndent() +
|
47620 | this.config.textStart +
|
47621 | text.replace(this.config.regEntities, this.config.encodeEntity) +
|
47622 | (this.textContext ? '' : this.config.textEnd);
|
47623 |
|
47624 | };
|
47625 |
|
47626 |
|
47627 |
|
47628 |
|
47629 |
|
47630 |
|
47631 |
|
47632 |
|
47633 |
|
47634 |
|
47635 |
|
47636 | var plugins$1 = function(data, info, plugins) {
|
47637 |
|
47638 |
|
47639 | const groups = [];
|
47640 | let prev;
|
47641 | for (const plugin of plugins) {
|
47642 | if (prev && plugin.type == prev[0].type) {
|
47643 | prev.push(plugin);
|
47644 | } else {
|
47645 | prev = [plugin];
|
47646 | groups.push(prev);
|
47647 | }
|
47648 | }
|
47649 | for (const group of groups) {
|
47650 | switch(group[0].type) {
|
47651 | case 'perItem':
|
47652 | data = perItem(data, info, group);
|
47653 | break;
|
47654 | case 'perItemReverse':
|
47655 | data = perItem(data, info, group, true);
|
47656 | break;
|
47657 | case 'full':
|
47658 | data = full(data, info, group);
|
47659 | break;
|
47660 | }
|
47661 | }
|
47662 | return data;
|
47663 | };
|
47664 |
|
47665 |
|
47666 |
|
47667 |
|
47668 |
|
47669 |
|
47670 |
|
47671 |
|
47672 |
|
47673 |
|
47674 | function perItem(data, info, plugins, reverse) {
|
47675 |
|
47676 | function monkeys(items) {
|
47677 |
|
47678 | items.content = items.content.filter(function(item) {
|
47679 |
|
47680 |
|
47681 | if (reverse && item.content) {
|
47682 | monkeys(item);
|
47683 | }
|
47684 |
|
47685 |
|
47686 | var filter = true;
|
47687 |
|
47688 | for (var i = 0; filter && i < plugins.length; i++) {
|
47689 | var plugin = plugins[i];
|
47690 |
|
47691 | if (plugin.active && plugin.fn(item, plugin.params, info) === false) {
|
47692 | filter = false;
|
47693 | }
|
47694 | }
|
47695 |
|
47696 |
|
47697 | if (!reverse && item.content) {
|
47698 | monkeys(item);
|
47699 | }
|
47700 |
|
47701 | return filter;
|
47702 |
|
47703 | });
|
47704 |
|
47705 | return items;
|
47706 |
|
47707 | }
|
47708 |
|
47709 | return monkeys(data);
|
47710 |
|
47711 | }
|
47712 |
|
47713 |
|
47714 |
|
47715 |
|
47716 |
|
47717 |
|
47718 |
|
47719 |
|
47720 |
|
47721 | function full(data, info, plugins) {
|
47722 |
|
47723 | plugins.forEach(function(plugin) {
|
47724 | if (plugin.active) {
|
47725 | data = plugin.fn(data, plugin.params, info);
|
47726 | }
|
47727 | });
|
47728 |
|
47729 | return data;
|
47730 |
|
47731 | }
|
47732 |
|
47733 |
|
47734 |
|
47735 |
|
47736 |
|
47737 |
|
47738 |
|
47739 |
|
47740 |
|
47741 |
|
47742 |
|
47743 | const {
|
47744 | defaultPlugins: defaultPlugins$1,
|
47745 | resolvePluginConfig: resolvePluginConfig$1,
|
47746 | extendDefaultPlugins: extendDefaultPlugins$1
|
47747 | } = config;
|
47748 |
|
47749 |
|
47750 |
|
47751 |
|
47752 | const { encodeSVGDatauri } = tools;
|
47753 |
|
47754 | var extendDefaultPlugins_1$1 = extendDefaultPlugins$1;
|
47755 |
|
47756 | const optimize = (input, config) => {
|
47757 | if (config == null) {
|
47758 | config = {};
|
47759 | }
|
47760 | if (typeof config !== 'object') {
|
47761 | throw Error('Config should be an object')
|
47762 | }
|
47763 | const maxPassCount = config.multipass ? 10 : 1;
|
47764 | let prevResultSize = Number.POSITIVE_INFINITY;
|
47765 | let svgjs = null;
|
47766 | const info = {};
|
47767 | if (config.path != null) {
|
47768 | info.path = config.path;
|
47769 | }
|
47770 | for (let i = 0; i < maxPassCount; i += 1) {
|
47771 | info.multipassCount = i;
|
47772 | svgjs = svg2js(input);
|
47773 | if (svgjs.error == null) {
|
47774 | const plugins = config.plugins || defaultPlugins$1;
|
47775 | if (Array.isArray(plugins) === false) {
|
47776 | throw Error('Invalid plugins list. Provided \'plugins\' in config should be an array.');
|
47777 | }
|
47778 | const resolvedPlugins = plugins.map(plugin => resolvePluginConfig$1(plugin, config));
|
47779 | svgjs = plugins$1(svgjs, info, resolvedPlugins);
|
47780 | }
|
47781 | svgjs = js2svg(svgjs, config.js2svg);
|
47782 | if (svgjs.error) {
|
47783 | throw Error(svgjs.error);
|
47784 | }
|
47785 | if (svgjs.data.length < prevResultSize) {
|
47786 | input = svgjs.data;
|
47787 | prevResultSize = svgjs.data.length;
|
47788 | } else {
|
47789 | if (config.datauri) {
|
47790 | svgjs.data = encodeSVGDatauri(svgjs.data, config.datauri);
|
47791 | }
|
47792 | if (config.path != null) {
|
47793 | svgjs.path = config.path;
|
47794 | }
|
47795 | return svgjs;
|
47796 | }
|
47797 | }
|
47798 | return svgjs;
|
47799 | };
|
47800 | var optimize_1 = optimize;
|
47801 |
|
47802 |
|
47803 |
|
47804 |
|
47805 |
|
47806 |
|
47807 |
|
47808 | const createContentItem = (data) => {
|
47809 | return new jsAPI(data);
|
47810 | };
|
47811 | var createContentItem_1 = createContentItem;
|
47812 |
|
47813 | var svgo = {
|
47814 | extendDefaultPlugins: extendDefaultPlugins_1$1,
|
47815 | optimize: optimize_1,
|
47816 | createContentItem: createContentItem_1
|
47817 | };
|
47818 |
|
47819 | export default svgo;
|
47820 | export { createContentItem_1 as createContentItem, extendDefaultPlugins_1$1 as extendDefaultPlugins, optimize_1 as optimize };
|