@rankingcoach/vanguard 1.3.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-AMPMMidnightParser.js +1 -1
- package/dist/index-AMPMParser.js +1 -1
- package/dist/index-Accordion2.js +1 -1
- package/dist/index-AccordionDetails.js +1 -1
- package/dist/index-AccordionSummary.js +1 -1
- package/dist/index-AiGlow.js +1 -1
- package/dist/index-AppBar2.js +1 -1
- package/dist/index-Autocomplete.js +2 -2
- package/dist/index-Autocomplete2.js +1 -1
- package/dist/index-Backdrop.js +1 -1
- package/dist/index-BasePopper.js +1 -1
- package/dist/index-Box.js +1 -1
- package/dist/index-Button2.js +1 -1
- package/dist/index-ButtonBase.js +1 -1
- package/dist/index-CSSTransition.js +1 -1
- package/dist/index-Calendar.js +20 -20
- package/dist/index-CalendarPicker.js +1 -1
- package/dist/index-Chip.js +1 -1
- package/dist/index-ClickAwayListener.js +1 -1
- package/dist/index-ClockPicker.js +1 -1
- package/dist/index-Collapse2.js +1 -1
- package/dist/index-CreditCard.js +1 -1
- package/dist/index-DateInput.js +1 -1
- package/dist/index-DateParser.js +1 -1
- package/dist/index-DatePicker2.js +1 -1
- package/dist/index-DateRange2.js +7 -7
- package/dist/index-DateRangePicker2.js +1 -1
- package/dist/index-DayCell.js +5 -5
- package/dist/index-DayOfYearParser.js +1 -1
- package/dist/index-DayParser.js +1 -1
- package/dist/index-DayPeriodParser.js +1 -1
- package/dist/index-DefaultPropsProvider.js +1 -1
- package/dist/index-DefaultPropsProvider2.js +1 -1
- package/dist/index-DefinedRange.js +1 -1
- package/dist/index-DesktopDatePicker.js +1 -1
- package/dist/index-Dialog.js +1 -1
- package/dist/index-DialogActions.js +1 -1
- package/dist/index-DialogContent.js +1 -1
- package/dist/index-Drawer.js +1 -1
- package/dist/index-Drawer2.js +1 -1
- package/dist/index-EraParser.js +1 -1
- package/dist/index-ExtendedYearParser.js +1 -1
- package/dist/index-Fade.js +1 -1
- package/dist/index-FilledInput.js +1 -1
- package/dist/index-FocusTrap.js +1 -1
- package/dist/index-FormControl2.js +1 -1
- package/dist/index-FormHelperText.js +1 -1
- package/dist/index-FormLabel.js +1 -1
- package/dist/index-FractionOfSecondParser.js +1 -1
- package/dist/index-GlobalStyles.js +1 -1
- package/dist/index-GlobalStyles2.js +1 -1
- package/dist/index-GlobalStyles3.js +1 -1
- package/dist/index-Grid.js +1 -1
- package/dist/index-Grow.js +1 -1
- package/dist/index-Header.js +1 -1
- package/dist/index-Hour0To11Parser.js +1 -1
- package/dist/index-Hour0to23Parser.js +1 -1
- package/dist/index-Hour1To24Parser.js +1 -1
- package/dist/index-Hour1to12Parser.js +1 -1
- package/dist/index-ISODayParser.js +1 -1
- package/dist/index-ISOTimezoneParser.js +1 -1
- package/dist/index-ISOTimezoneWithZParser.js +1 -1
- package/dist/index-ISOWeekParser.js +1 -1
- package/dist/index-ISOWeekYearParser.js +1 -1
- package/dist/index-IconButton2.js +1 -1
- package/dist/index-Input2.js +1 -1
- package/dist/index-InputAdornment.js +1 -1
- package/dist/index-InputBase.js +155 -150
- package/dist/index-InputBase2.js +1 -1
- package/dist/index-InputLabel.js +1 -1
- package/dist/index-LinearProgress.js +1 -1
- package/dist/index-List2.js +1 -1
- package/dist/index-ListSubheader.js +1 -1
- package/dist/index-LocalDayParser.js +1 -1
- package/dist/index-LocalWeekParser.js +1 -1
- package/dist/index-LocalWeekYearParser.js +1 -1
- package/dist/index-LocalizationProvider.js +1 -1
- package/dist/index-LoginButton.js +1 -1
- package/dist/index-Menu.js +1 -1
- package/dist/index-MenuItem.js +1 -1
- package/dist/index-MenuList.js +1 -1
- package/dist/index-MinuteParser.js +1 -1
- package/dist/index-MobileDatePicker.js +1 -1
- package/dist/index-Modal2.js +1 -1
- package/dist/index-Month.js +9 -9
- package/dist/index-MonthParser.js +1 -1
- package/dist/index-MonthPicker.js +1 -1
- package/dist/index-NativeSelectInput.js +1 -1
- package/dist/index-NotchedOutline.js +1 -1
- package/dist/index-OutlinedInput.js +1 -1
- package/dist/index-Paper.js +1 -1
- package/dist/index-Parser2.js +315 -255
- package/dist/index-Parser3.js +129 -2
- package/dist/index-PickersDay.js +1 -1
- package/dist/index-Popover2.js +1 -1
- package/dist/index-Popper.js +1 -1
- package/dist/index-Portal.js +1 -1
- package/dist/index-PropTypes.js +1 -1
- package/dist/index-QuarterParser.js +1 -1
- package/dist/index-QuoteContainer.js +1 -1
- package/dist/index-Ripple.js +1 -1
- package/dist/index-RtlProvider.js +1 -1
- package/dist/index-ScrollbarSize.js +1 -1
- package/dist/index-SecondParser.js +1 -1
- package/dist/index-Select2.js +1 -1
- package/dist/index-SelectInput2.js +1 -1
- package/dist/index-Skeleton2.js +1 -1
- package/dist/index-Slide.js +1 -1
- package/dist/index-Slider2.js +1 -1
- package/dist/index-SliderValueLabel.js +1 -1
- package/dist/index-Snackbar2.js +1 -1
- package/dist/index-SnackbarContent.js +1 -1
- package/dist/index-StandAloneLocalDayParser.js +1 -1
- package/dist/index-StandAloneMonthParser.js +1 -1
- package/dist/index-StandAloneQuarterParser.js +1 -1
- package/dist/index-StyledEngineProvider.js +1 -1
- package/dist/index-StyledSVG2.js +1 -1
- package/dist/index-SvgIcon.js +1 -1
- package/dist/index-Tab2.js +1 -1
- package/dist/index-TabScrollButton.js +1 -1
- package/dist/index-Tabs2.js +1 -1
- package/dist/index-Text.js +18 -18
- package/dist/index-TextField.js +1 -1
- package/dist/index-TextHighlighted.js +23 -19
- package/dist/index-TextareaAutosize.js +1 -1
- package/dist/index-TimestampMillisecondsParser.js +1 -1
- package/dist/index-TimestampSecondsParser.js +1 -1
- package/dist/index-ToggleButton2.js +1 -1
- package/dist/index-ToggleButtonGroup2.js +1 -1
- package/dist/index-Tokenizer.js +411 -334
- package/dist/index-Tokenizer2.js +139 -2
- package/dist/index-Toolbar2.js +1 -1
- package/dist/index-Tooltip.js +1 -1
- package/dist/index-TouchRipple.js +1 -1
- package/dist/index-Transition.js +1 -1
- package/dist/index-TransitionGroup.js +1 -1
- package/dist/index-Typography.js +1 -1
- package/dist/index-YearParser.js +1 -1
- package/dist/index-YearPicker.js +1 -1
- package/dist/index-_virtual12.js +1 -1
- package/dist/index-_virtual15.js +2 -5
- package/dist/index-_virtual16.js +5 -3
- package/dist/index-_virtual17.js +5 -2
- package/dist/index-_virtual18.js +2 -7
- package/dist/index-_virtual19.js +5 -2
- package/dist/index-_virtual2.js +5 -5
- package/dist/index-_virtual20.js +2 -5
- package/dist/index-_virtual23.js +1 -1
- package/dist/index-_virtual3.js +4 -4
- package/dist/index-_virtual34.js +2 -2
- package/dist/index-_virtual35.js +2 -4
- package/dist/index-_virtual36.js +1 -1
- package/dist/index-_virtual37.js +1 -1
- package/dist/index-_virtual38.js +1 -1
- package/dist/index-_virtual39.js +1 -1
- package/dist/index-_virtual4.js +5 -5
- package/dist/index-_virtual40.js +1 -1
- package/dist/index-_virtual41.js +4 -2
- package/dist/index-_virtual42.js +2 -4
- package/dist/index-_virtual43.js +1 -1
- package/dist/index-_virtual44.js +1 -1
- package/dist/index-_virtual45.js +1 -1
- package/dist/index-_virtual46.js +1 -1
- package/dist/index-_virtual47.js +1 -1
- package/dist/index-_virtual48.js +1 -1
- package/dist/index-_virtual49.js +1 -1
- package/dist/index-_virtual50.js +1 -1
- package/dist/index-_virtual51.js +1 -1
- package/dist/index-_virtual52.js +1 -1
- package/dist/index-_virtual53.js +1 -1
- package/dist/index-_virtual54.js +1 -1
- package/dist/index-_virtual55.js +1 -1
- package/dist/index-_virtual56.js +1 -1
- package/dist/index-_virtual57.js +1 -1
- package/dist/index-_virtual58.js +4 -2
- package/dist/index-_virtual60.js +2 -4
- package/dist/index-_virtual61.js +1 -1
- package/dist/index-_virtual62.js +4 -2
- package/dist/index-_virtual63.js +2 -2
- package/dist/index-_virtual75.js +1 -1
- package/dist/index-_virtual77.js +4 -2
- package/dist/index-_virtual78.js +1 -1
- package/dist/index-_virtual79.js +1 -1
- package/dist/index-_virtual80.js +1 -1
- package/dist/index-_virtual81.js +1 -1
- package/dist/index-_virtual82.js +1 -1
- package/dist/index-_virtual83.js +1 -1
- package/dist/index-_virtual84.js +1 -1
- package/dist/index-_virtual85.js +2 -4
- package/dist/index-_virtual86.js +2 -2
- package/dist/index-applyInternationalSeparatorStyle.js +1 -1
- package/dist/index-attributes-to-props.js +1 -1
- package/dist/index-cjs.js +19 -75
- package/dist/index-colorManipulator3.js +2 -2
- package/dist/index-constants.js +38 -8
- package/dist/index-constants2.js +8 -38
- package/dist/index-createExtensionPattern.js +1 -1
- package/dist/index-createStyled2.js +6 -6
- package/dist/index-decode-data-html.js +5 -11
- package/dist/index-decode-data-xml.js +5 -11
- package/dist/index-decode.js +263 -216
- package/dist/index-decode_codepoint.js +43 -53
- package/dist/index-defaultRanges.js +10 -10
- package/dist/index-dist4.js +1 -1
- package/dist/index-dist5.js +1 -1
- package/dist/index-elementAcceptingRef.js +1 -1
- package/dist/index-elementTypeAcceptingRef.js +1 -1
- package/dist/index-emotion-cache.browser.esm.js +2 -2
- package/dist/index-escape.js +43 -48
- package/dist/index-esm2.js +108 -129
- package/dist/index-esm3.js +12 -301
- package/dist/index-esm4.js +135 -17
- package/dist/index-esm5.js +303 -0
- package/dist/index-esm6.js +21 -0
- package/dist/index-esm7.js +102 -0
- package/dist/index-exenv.js +1 -1
- package/dist/index-extractCountryCallingCode.js +1 -1
- package/dist/index-extractPhoneContext.js +1 -1
- package/dist/index-foreignNames.js +101 -108
- package/dist/index-helpers3.js +1 -1
- package/dist/index-http.store.js +1 -1
- package/dist/index-isViablePhoneNumber.js +1 -1
- package/dist/index-lib.js +2 -2
- package/dist/index-lib2.js +424 -111
- package/dist/index-lib3.js +14 -433
- package/dist/index-lib4.js +120 -14
- package/dist/index-lib5.js +10 -69
- package/dist/index-node.js +1 -1
- package/dist/index-node2.js +1 -1
- package/dist/index-parse2.js +1 -1
- package/dist/index-parse3.js +122 -20
- package/dist/index-refType.js +1 -1
- package/dist/index-responsivePropType.js +1 -1
- package/dist/index-sanitize-html.js +91 -48
- package/dist/index-stripIddPrefix.js +1 -1
- package/dist/index-style-to-object.js +1 -1
- package/dist/index-text-animate-words-style.js +12 -12
- package/dist/index-tiny-emitter.js +1 -1
- package/dist/index-useRteAiAssistant-selection.js +5 -5
- package/dist/index-useThemeWithoutDefault3.js +1 -1
- package/dist/index-utilities.js +1 -1
- package/dist/index-utilities2.js +1 -1
- package/dist/index-utils2.js +1 -1
- package/dist/index-utils6.js +7 -7
- package/dist/index.js +428 -426
- package/dist/types/core/Form/stories/SelectChangeDetection.story.d.ts +2 -0
- package/dist/types/core/Form/stories/bootstrap/form.test.slice.d.ts +58 -17
- package/dist/types/core/RichTextEditor/stories/RichTextEditorStory.story.d.ts +2 -0
- package/dist/types/core/RichTextEditor/stories/RichTextEditorWithXSSAttackStory.story.d.ts +2 -0
- package/dist/types/core/RichTextEditor/stories/_RichTextEditor.default.d.ts +4 -0
- package/dist/types/core/RichTextEditor/stories/bootstrap/richtexteditor.test.slice.d.ts +1 -0
- package/dist/types/core/TextHighlighted/stories/TextHighlightedStory.story.d.ts +2 -0
- package/dist/types/core/TextHighlighted/stories/TextHighlightedStory2.story.d.ts +2 -0
- package/dist/types/core/TextHighlighted/stories/TextHighlightedWithEmphasisStory.story.d.ts +2 -0
- package/dist/types/core/TextHighlighted/stories/TextHighlightedWithXSSAttackStory.story.d.ts +2 -0
- package/dist/types/core/TextHighlighted/stories/_TextHighlighted.default.d.ts +7 -0
- package/dist/types/core/_internal/InputBase/stories/HighlightLengthExceededTest.story.d.ts +2 -0
- package/dist/types/core/_internal/InputBase/stories/HighlightUrlTest.story.d.ts +2 -0
- package/dist/types/core/_internal/InputBase/stories/HighlightWordsTest.story.d.ts +2 -0
- package/dist/types/helpers/sanitize-html.d.ts +18 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/vanguard-asset-analysis.json +1 -1
- package/dist-wordpress/index.js +23637 -22231
- package/package.json +5 -2
- package/scripts/check-meta-coverage.js +117 -0
- package/scripts/generate-exports-props.js +855 -0
- package/dist/index-Parser5.js +0 -131
- package/dist/index-Tokenizer3.js +0 -141
- package/dist/index-_virtual87.js +0 -4
- package/dist/index-_virtual88.js +0 -4
- package/dist/index-_virtual89.js +0 -4
- package/dist/index-_virtual90.js +0 -4
- package/dist/index-_virtual91.js +0 -4
- package/dist/index-at-rule.js +0 -22
- package/dist/index-cjs2.js +0 -23
- package/dist/index-comment.js +0 -16
- package/dist/index-container.js +0 -223
- package/dist/index-css-syntax-error.js +0 -56
- package/dist/index-declaration.js +0 -19
- package/dist/index-decode-data-html2.js +0 -4
- package/dist/index-decode-data-xml2.js +0 -4
- package/dist/index-decode2.js +0 -4
- package/dist/index-decode_codepoint2.js +0 -4
- package/dist/index-document3.js +0 -23
- package/dist/index-encode-html.js +0 -15
- package/dist/index-encode-html2.js +0 -4
- package/dist/index-encode.js +0 -49
- package/dist/index-encode2.js +0 -4
- package/dist/index-escape-string-regexp.js +0 -11
- package/dist/index-escape2.js +0 -4
- package/dist/index-feeds.js +0 -92
- package/dist/index-feeds2.js +0 -4
- package/dist/index-foreignNames2.js +0 -4
- package/dist/index-fromJSON.js +0 -46
- package/dist/index-helpers4.js +0 -54
- package/dist/index-helpers5.js +0 -4
- package/dist/index-input3.js +0 -139
- package/dist/index-is-plain-object.js +0 -17
- package/dist/index-is-plain-object2.js +0 -4
- package/dist/index-lazy-result.js +0 -343
- package/dist/index-legacy.js +0 -75
- package/dist/index-legacy2.js +0 -4
- package/dist/index-lib6.js +0 -13
- package/dist/index-lib7.js +0 -43
- package/dist/index-lib8.js +0 -147
- package/dist/index-lib9.js +0 -90
- package/dist/index-list3.js +0 -25
- package/dist/index-manipulation.js +0 -61
- package/dist/index-manipulation2.js +0 -4
- package/dist/index-map-generator.js +0 -171
- package/dist/index-no-work-result.js +0 -94
- package/dist/index-node4.js +0 -259
- package/dist/index-non-secure.js +0 -20
- package/dist/index-parse-srcset.js +0 -71
- package/dist/index-parse-srcset2.js +0 -4
- package/dist/index-parse4.js +0 -127
- package/dist/index-parser4.js +0 -322
- package/dist/index-picocolors.browser.js +0 -13
- package/dist/index-picocolors.browser2.js +0 -4
- package/dist/index-postcss.js +0 -46
- package/dist/index-previous-map.js +0 -92
- package/dist/index-processor.js +0 -43
- package/dist/index-querying.js +0 -63
- package/dist/index-querying2.js +0 -4
- package/dist/index-result.js +0 -30
- package/dist/index-root.js +0 -38
- package/dist/index-rule.js +0 -24
- package/dist/index-sanitize-html2.js +0 -672
- package/dist/index-stringifier.js +0 -196
- package/dist/index-stringify.js +0 -14
- package/dist/index-stringify2.js +0 -36
- package/dist/index-stringify3.js +0 -4
- package/dist/index-symbols.js +0 -8
- package/dist/index-symbols2.js +0 -4
- package/dist/index-tokenize.js +0 -114
- package/dist/index-traversal.js +0 -48
- package/dist/index-traversal2.js +0 -4
- package/dist/index-warn-once.js +0 -12
- package/dist/index-warning2.js +0 -25
- /package/dist/{index-Parser6.js → index-Parser4.js} +0 -0
|
@@ -2,9 +2,9 @@ import { StyleSheet as K } from "./index-emotion-sheet.esm.js";
|
|
|
2
2
|
import { RULESET as z, KEYFRAMES as B, DECLARATION as D, WEBKIT as e, MS as o, MOZ as k } from "./index-Enum.js";
|
|
3
3
|
import { combine as F, replace as c, hash as H, charat as y, strlen as E, indexof as R, match as N, from as U } from "./index-Utility.js";
|
|
4
4
|
import { serialize as m, stringify as Y } from "./index-Serializer.js";
|
|
5
|
-
import { copy as g, dealloc as Z, alloc as _, next as C, token as S, peek as A, delimit as G, slice as J, position as T } from "./index-
|
|
5
|
+
import { copy as g, dealloc as Z, alloc as _, next as C, token as S, peek as A, delimit as G, slice as J, position as T } from "./index-Tokenizer2.js";
|
|
6
6
|
import { middleware as Q, rulesheet as V } from "./index-Middleware.js";
|
|
7
|
-
import { compile as X } from "./index-
|
|
7
|
+
import { compile as X } from "./index-Parser3.js";
|
|
8
8
|
var j = function(t, a, s) {
|
|
9
9
|
for (var i = 0, n = 0; i = n, n = A(), i === 38 && n === 12 && (a[s] = 1), !S(n); )
|
|
10
10
|
C();
|
package/dist/index-escape.js
CHANGED
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
function g(a) {
|
|
23
|
-
for (var n = "", r = 0, u; (u = e.xmlReplacer.exec(a)) !== null; ) {
|
|
24
|
-
var t = u.index, c = a.charCodeAt(t), i = l.get(c);
|
|
25
|
-
i !== void 0 ? (n += a.substring(r, t) + i, r = t + 1) : (n += "".concat(a.substring(r, t), "&#x").concat((0, e.getCodePoint)(a, t).toString(16), ";"), r = e.xmlReplacer.lastIndex += +((c & 64512) === 55296));
|
|
26
|
-
}
|
|
27
|
-
return n + a.substr(r);
|
|
28
|
-
}
|
|
29
|
-
e.encodeXML = g, e.escape = g;
|
|
30
|
-
function d(a, n) {
|
|
31
|
-
return function(u) {
|
|
32
|
-
for (var t, c = 0, i = ""; t = a.exec(u); )
|
|
33
|
-
c !== t.index && (i += u.substring(c, t.index)), i += n.get(t[0].charCodeAt(0)), c = t.index + 1;
|
|
34
|
-
return i + u.substring(c);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
e.escapeUTF8 = d(/[&<>'"]/g, l), e.escapeAttribute = d(/["&\u00A0]/g, /* @__PURE__ */ new Map([
|
|
38
|
-
[34, """],
|
|
39
|
-
[38, "&"],
|
|
40
|
-
[160, " "]
|
|
41
|
-
])), e.escapeText = d(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
|
|
42
|
-
[38, "&"],
|
|
43
|
-
[60, "<"],
|
|
44
|
-
[62, ">"],
|
|
45
|
-
[160, " "]
|
|
46
|
-
]));
|
|
47
|
-
})(o), o);
|
|
1
|
+
const l = /["&'<>$\x80-\uFFFF]/g, a = /* @__PURE__ */ new Map([
|
|
2
|
+
[34, """],
|
|
3
|
+
[38, "&"],
|
|
4
|
+
[39, "'"],
|
|
5
|
+
[60, "<"],
|
|
6
|
+
[62, ">"]
|
|
7
|
+
]), x = (
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
9
|
+
String.prototype.codePointAt != null ? (e, t) => e.codePointAt(t) : (
|
|
10
|
+
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
|
11
|
+
(e, t) => (e.charCodeAt(t) & 64512) === 55296 ? (e.charCodeAt(t) - 55296) * 1024 + e.charCodeAt(t + 1) - 56320 + 65536 : e.charCodeAt(t)
|
|
12
|
+
)
|
|
13
|
+
);
|
|
14
|
+
function i(e) {
|
|
15
|
+
let t = "", c = 0, s;
|
|
16
|
+
for (; (s = l.exec(e)) !== null; ) {
|
|
17
|
+
const n = s.index, o = e.charCodeAt(n), r = a.get(o);
|
|
18
|
+
r !== void 0 ? (t += e.substring(c, n) + r, c = n + 1) : (t += `${e.substring(c, n)}&#x${x(e, n).toString(16)};`, c = l.lastIndex += +((o & 64512) === 55296));
|
|
19
|
+
}
|
|
20
|
+
return t + e.substr(c);
|
|
48
21
|
}
|
|
22
|
+
function u(e, t) {
|
|
23
|
+
return function(s) {
|
|
24
|
+
let n, o = 0, r = "";
|
|
25
|
+
for (; n = e.exec(s); )
|
|
26
|
+
o !== n.index && (r += s.substring(o, n.index)), r += t.get(n[0].charCodeAt(0)), o = n.index + 1;
|
|
27
|
+
return r + s.substring(o);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const d = u(/["&\u00A0]/g, /* @__PURE__ */ new Map([
|
|
31
|
+
[34, """],
|
|
32
|
+
[38, "&"],
|
|
33
|
+
[160, " "]
|
|
34
|
+
])), p = u(/[&<>\u00A0]/g, /* @__PURE__ */ new Map([
|
|
35
|
+
[38, "&"],
|
|
36
|
+
[60, "<"],
|
|
37
|
+
[62, ">"],
|
|
38
|
+
[160, " "]
|
|
39
|
+
]));
|
|
49
40
|
export {
|
|
50
|
-
|
|
41
|
+
i as encodeXML,
|
|
42
|
+
d as escapeAttribute,
|
|
43
|
+
p as escapeText,
|
|
44
|
+
x as getCodePoint,
|
|
45
|
+
l as xmlReplacer
|
|
51
46
|
};
|
package/dist/index-esm2.js
CHANGED
|
@@ -1,138 +1,117 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for (; (e === void 0 || e-- > 0) && !(a = n.next()).done; ) c.push(a.value);
|
|
17
|
-
} catch (u) {
|
|
18
|
-
l = { error: u };
|
|
19
|
-
} finally {
|
|
20
|
-
try {
|
|
21
|
-
a && !a.done && (t = n.return) && t.call(n);
|
|
22
|
-
} finally {
|
|
23
|
-
if (l) throw l.error;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return c;
|
|
27
|
-
}, _ = function(r, e, t) {
|
|
28
|
-
if (t || arguments.length === 2) for (var n = 0, a = e.length, c; n < a; n++)
|
|
29
|
-
(c || !(n in e)) && (c || (c = Array.prototype.slice.call(e, 0, n)), c[n] = e[n]);
|
|
30
|
-
return r.concat(c || Array.prototype.slice.call(e));
|
|
31
|
-
};
|
|
32
|
-
function O(r, e) {
|
|
33
|
-
var t = {
|
|
34
|
-
key: e
|
|
35
|
-
};
|
|
36
|
-
if (r instanceof Element) {
|
|
37
|
-
var n = r.getAttribute("class");
|
|
38
|
-
n && (t.className = n), _([], g(r.attributes), !1).forEach(function(a) {
|
|
39
|
-
switch (a.name) {
|
|
40
|
-
// this is manually handled above, so break;
|
|
41
|
-
case "class":
|
|
42
|
-
break;
|
|
43
|
-
case "style":
|
|
44
|
-
t[a.name] = A(a.value);
|
|
45
|
-
break;
|
|
46
|
-
case "allowfullscreen":
|
|
47
|
-
case "allowpaymentrequest":
|
|
48
|
-
case "async":
|
|
49
|
-
case "autofocus":
|
|
50
|
-
case "autoplay":
|
|
51
|
-
case "checked":
|
|
52
|
-
case "controls":
|
|
53
|
-
case "default":
|
|
54
|
-
case "defer":
|
|
55
|
-
case "disabled":
|
|
56
|
-
case "formnovalidate":
|
|
57
|
-
case "hidden":
|
|
58
|
-
case "ismap":
|
|
59
|
-
case "itemscope":
|
|
60
|
-
case "loop":
|
|
61
|
-
case "multiple":
|
|
62
|
-
case "muted":
|
|
63
|
-
case "nomodule":
|
|
64
|
-
case "novalidate":
|
|
65
|
-
case "open":
|
|
66
|
-
case "readonly":
|
|
67
|
-
case "required":
|
|
68
|
-
case "reversed":
|
|
69
|
-
case "selected":
|
|
70
|
-
case "typemustmatch":
|
|
71
|
-
t[h[a.name] || a.name] = !0;
|
|
72
|
-
break;
|
|
73
|
-
default:
|
|
74
|
-
t[h[a.name] || a.name] = a.value;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
return t;
|
|
1
|
+
import { Text as m, Tag as u, Style as s, Script as g, CDATA as x, Comment as h, Directive as M, Doctype as v, Root as b } from "./index-esm6.js";
|
|
2
|
+
import { elementNames as T, attributeNames as E } from "./index-foreignNames.js";
|
|
3
|
+
import { encodeXML as f, escapeText as $, escapeAttribute as A } from "./index-escape.js";
|
|
4
|
+
const C = /* @__PURE__ */ new Set([
|
|
5
|
+
"style",
|
|
6
|
+
"script",
|
|
7
|
+
"xmp",
|
|
8
|
+
"iframe",
|
|
9
|
+
"noembed",
|
|
10
|
+
"noframes",
|
|
11
|
+
"plaintext",
|
|
12
|
+
"noscript"
|
|
13
|
+
]);
|
|
14
|
+
function w(e) {
|
|
15
|
+
return e.replace(/"/g, """);
|
|
79
16
|
}
|
|
80
|
-
function S(
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
17
|
+
function S(e, n) {
|
|
18
|
+
var r;
|
|
19
|
+
if (!e)
|
|
20
|
+
return;
|
|
21
|
+
const t = ((r = n.encodeEntities) !== null && r !== void 0 ? r : n.decodeEntities) === !1 ? w : n.xmlMode || n.encodeEntities !== "utf8" ? f : A;
|
|
22
|
+
return Object.keys(e).map((a) => {
|
|
23
|
+
var i, c;
|
|
24
|
+
const o = (i = e[a]) !== null && i !== void 0 ? i : "";
|
|
25
|
+
return n.xmlMode === "foreign" && (a = (c = E.get(a)) !== null && c !== void 0 ? c : a), !n.emptyAttrs && !n.xmlMode && o === "" ? a : `${a}="${t(o)}"`;
|
|
26
|
+
}).join(" ");
|
|
85
27
|
}
|
|
86
|
-
|
|
87
|
-
|
|
28
|
+
const d = /* @__PURE__ */ new Set([
|
|
29
|
+
"area",
|
|
30
|
+
"base",
|
|
31
|
+
"basefont",
|
|
32
|
+
"br",
|
|
33
|
+
"col",
|
|
34
|
+
"command",
|
|
35
|
+
"embed",
|
|
36
|
+
"frame",
|
|
37
|
+
"hr",
|
|
38
|
+
"img",
|
|
39
|
+
"input",
|
|
40
|
+
"isindex",
|
|
41
|
+
"keygen",
|
|
42
|
+
"link",
|
|
43
|
+
"meta",
|
|
44
|
+
"param",
|
|
45
|
+
"source",
|
|
46
|
+
"track",
|
|
47
|
+
"wbr"
|
|
48
|
+
]);
|
|
49
|
+
function l(e, n = {}) {
|
|
50
|
+
const r = "length" in e ? e : [e];
|
|
51
|
+
let t = "";
|
|
52
|
+
for (let a = 0; a < r.length; a++)
|
|
53
|
+
t += D(r[a], n);
|
|
54
|
+
return t;
|
|
88
55
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
case
|
|
100
|
-
return
|
|
101
|
-
case
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
var N = o.parentNode.nodeName.toLowerCase();
|
|
108
|
-
return w.includes(N) ? (/\S/.test(f), null) : f;
|
|
109
|
-
}
|
|
110
|
-
case 8:
|
|
111
|
-
return null;
|
|
112
|
-
/* istanbul ignore next */
|
|
113
|
-
default:
|
|
114
|
-
return null;
|
|
56
|
+
function D(e, n) {
|
|
57
|
+
switch (e.type) {
|
|
58
|
+
case b:
|
|
59
|
+
return l(e.children, n);
|
|
60
|
+
// @ts-expect-error We don't use `Doctype` yet
|
|
61
|
+
case v:
|
|
62
|
+
case M:
|
|
63
|
+
return y(e);
|
|
64
|
+
case h:
|
|
65
|
+
return I(e);
|
|
66
|
+
case x:
|
|
67
|
+
return q(e);
|
|
68
|
+
case g:
|
|
69
|
+
case s:
|
|
70
|
+
case u:
|
|
71
|
+
return N(e, n);
|
|
72
|
+
case m:
|
|
73
|
+
return O(e, n);
|
|
115
74
|
}
|
|
116
75
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
76
|
+
const _ = /* @__PURE__ */ new Set([
|
|
77
|
+
"mi",
|
|
78
|
+
"mo",
|
|
79
|
+
"mn",
|
|
80
|
+
"ms",
|
|
81
|
+
"mtext",
|
|
82
|
+
"annotation-xml",
|
|
83
|
+
"foreignObject",
|
|
84
|
+
"desc",
|
|
85
|
+
"title"
|
|
86
|
+
]), j = /* @__PURE__ */ new Set(["svg", "math"]);
|
|
87
|
+
function N(e, n) {
|
|
88
|
+
var r;
|
|
89
|
+
n.xmlMode === "foreign" && (e.name = (r = T.get(e.name)) !== null && r !== void 0 ? r : e.name, e.parent && _.has(e.parent.name) && (n = { ...n, xmlMode: !1 })), !n.xmlMode && j.has(e.name) && (n = { ...n, xmlMode: "foreign" });
|
|
90
|
+
let t = `<${e.name}`;
|
|
91
|
+
const a = S(e.attribs, n);
|
|
92
|
+
return a && (t += ` ${a}`), e.children.length === 0 && (n.xmlMode ? (
|
|
93
|
+
// In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
|
|
94
|
+
n.selfClosingTags !== !1
|
|
95
|
+
) : (
|
|
96
|
+
// User explicitly asked for self-closing tags, even in HTML mode
|
|
97
|
+
n.selfClosingTags && d.has(e.name)
|
|
98
|
+
)) ? (n.xmlMode || (t += " "), t += "/>") : (t += ">", e.children.length > 0 && (t += l(e.children, n)), (n.xmlMode || !d.has(e.name)) && (t += `</${e.name}>`)), t;
|
|
99
|
+
}
|
|
100
|
+
function y(e) {
|
|
101
|
+
return `<${e.data}>`;
|
|
102
|
+
}
|
|
103
|
+
function O(e, n) {
|
|
104
|
+
var r;
|
|
105
|
+
let t = e.data || "";
|
|
106
|
+
return ((r = n.encodeEntities) !== null && r !== void 0 ? r : n.decodeEntities) !== !1 && !(!n.xmlMode && e.parent && C.has(e.parent.name)) && (t = n.xmlMode || n.encodeEntities !== "utf8" ? f(t) : $(t)), t;
|
|
107
|
+
}
|
|
108
|
+
function q(e) {
|
|
109
|
+
return `<![CDATA[${e.children[0].data}]]>`;
|
|
130
110
|
}
|
|
131
|
-
function
|
|
132
|
-
return e
|
|
111
|
+
function I(e) {
|
|
112
|
+
return `<!--${e.data}-->`;
|
|
133
113
|
}
|
|
134
114
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
F as default
|
|
115
|
+
l as default,
|
|
116
|
+
l as render
|
|
138
117
|
};
|
package/dist/index-esm3.js
CHANGED
|
@@ -1,303 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} || function(e, r) {
|
|
9
|
-
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
10
|
-
}, l(a, t);
|
|
11
|
-
};
|
|
12
|
-
return function(a, t) {
|
|
13
|
-
if (typeof t != "function" && t !== null)
|
|
14
|
-
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
15
|
-
l(a, t);
|
|
16
|
-
function e() {
|
|
17
|
-
this.constructor = a;
|
|
18
|
-
}
|
|
19
|
-
a.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
20
|
-
};
|
|
21
|
-
})(), _ = function() {
|
|
22
|
-
return _ = Object.assign || function(l) {
|
|
23
|
-
for (var a, t = 1, e = arguments.length; t < e; t++) {
|
|
24
|
-
a = arguments[t];
|
|
25
|
-
for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && (l[r] = a[r]);
|
|
26
|
-
}
|
|
27
|
-
return l;
|
|
28
|
-
}, _.apply(this, arguments);
|
|
29
|
-
}, g = function(l, a) {
|
|
30
|
-
var t = typeof Symbol == "function" && l[Symbol.iterator];
|
|
31
|
-
if (!t) return l;
|
|
32
|
-
var e = t.call(l), r, n = [], u;
|
|
33
|
-
try {
|
|
34
|
-
for (; (a === void 0 || a-- > 0) && !(r = e.next()).done; ) n.push(r.value);
|
|
35
|
-
} catch (i) {
|
|
36
|
-
u = { error: i };
|
|
37
|
-
} finally {
|
|
38
|
-
try {
|
|
39
|
-
r && !r.done && (t = e.return) && t.call(e);
|
|
40
|
-
} finally {
|
|
41
|
-
if (u) throw u.error;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return n;
|
|
45
|
-
}, D = function(l, a, t) {
|
|
46
|
-
if (t || arguments.length === 2) for (var e = 0, r = a.length, n; e < r; e++)
|
|
47
|
-
(n || !(e in a)) && (n || (n = Array.prototype.slice.call(a, 0, e)), n[e] = a[e]);
|
|
48
|
-
return l.concat(n || Array.prototype.slice.call(a));
|
|
49
|
-
}, h = /* @__PURE__ */ Object.create(null), L = (
|
|
50
|
-
/** @class */
|
|
51
|
-
(function(l) {
|
|
52
|
-
A(a, l);
|
|
53
|
-
function a(t) {
|
|
54
|
-
var e = l.call(this, t) || this;
|
|
55
|
-
return Object.defineProperty(e, "isInitialized", {
|
|
56
|
-
enumerable: !0,
|
|
57
|
-
configurable: !0,
|
|
58
|
-
writable: !0,
|
|
59
|
-
value: !1
|
|
60
|
-
}), Object.defineProperty(e, "isActive", {
|
|
61
|
-
enumerable: !0,
|
|
62
|
-
configurable: !0,
|
|
63
|
-
writable: !0,
|
|
64
|
-
value: !1
|
|
65
|
-
}), Object.defineProperty(e, "hash", {
|
|
66
|
-
enumerable: !0,
|
|
67
|
-
configurable: !0,
|
|
68
|
-
writable: !0,
|
|
69
|
-
value: void 0
|
|
70
|
-
}), Object.defineProperty(e, "handleLoad", {
|
|
71
|
-
enumerable: !0,
|
|
72
|
-
configurable: !0,
|
|
73
|
-
writable: !0,
|
|
74
|
-
value: function(r, n) {
|
|
75
|
-
n === void 0 && (n = !1), e.isActive && e.setState({
|
|
76
|
-
content: r,
|
|
77
|
-
hasCache: n,
|
|
78
|
-
status: p.LOADED
|
|
79
|
-
}, e.getElement);
|
|
80
|
-
}
|
|
81
|
-
}), Object.defineProperty(e, "handleError", {
|
|
82
|
-
enumerable: !0,
|
|
83
|
-
configurable: !0,
|
|
84
|
-
writable: !0,
|
|
85
|
-
value: function(r) {
|
|
86
|
-
var n = e.props.onError, u = r.message === "Browser does not support SVG" ? p.UNSUPPORTED : p.FAILED;
|
|
87
|
-
e.isActive && e.setState({ status: u }, function() {
|
|
88
|
-
typeof n == "function" && n(r);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}), Object.defineProperty(e, "request", {
|
|
92
|
-
enumerable: !0,
|
|
93
|
-
configurable: !0,
|
|
94
|
-
writable: !0,
|
|
95
|
-
value: function() {
|
|
96
|
-
var r = e.props, n = r.cacheRequests, u = r.fetchOptions, i = r.src;
|
|
97
|
-
try {
|
|
98
|
-
return n && (h[i] = { content: "", status: p.LOADING }), fetch(i, u).then(function(o) {
|
|
99
|
-
var s = o.headers.get("content-type"), f = g((s || "").split(/ ?; ?/), 1), c = f[0];
|
|
100
|
-
if (o.status > 299)
|
|
101
|
-
throw new Error("Not found");
|
|
102
|
-
if (!["image/svg+xml", "text/plain"].some(function(d) {
|
|
103
|
-
return c.includes(d);
|
|
104
|
-
}))
|
|
105
|
-
throw new Error("Content type isn't valid: ".concat(c));
|
|
106
|
-
return o.text();
|
|
107
|
-
}).then(function(o) {
|
|
108
|
-
var s = e.props.src;
|
|
109
|
-
if (i !== s) {
|
|
110
|
-
h[i].status === p.LOADING && delete h[i];
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (e.handleLoad(o), n) {
|
|
114
|
-
var f = h[i];
|
|
115
|
-
f && (f.content = o, f.status = p.LOADED);
|
|
116
|
-
}
|
|
117
|
-
}).catch(function(o) {
|
|
118
|
-
if (e.handleError(o), n) {
|
|
119
|
-
var s = h[i];
|
|
120
|
-
s && delete h[i];
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
} catch (o) {
|
|
124
|
-
return e.handleError(new Error(o.message));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}), e.state = {
|
|
128
|
-
content: "",
|
|
129
|
-
element: null,
|
|
130
|
-
hasCache: !!t.cacheRequests && !!h[t.src],
|
|
131
|
-
status: p.PENDING
|
|
132
|
-
}, e.hash = t.uniqueHash || E(8), e;
|
|
133
|
-
}
|
|
134
|
-
return Object.defineProperty(a.prototype, "componentDidMount", {
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
configurable: !0,
|
|
137
|
-
writable: !0,
|
|
138
|
-
value: function() {
|
|
139
|
-
if (this.isActive = !0, !(!w() || this.isInitialized)) {
|
|
140
|
-
var t = this.state.status, e = this.props.src;
|
|
141
|
-
try {
|
|
142
|
-
if (t === p.PENDING) {
|
|
143
|
-
if (!S())
|
|
144
|
-
throw new Error("Browser does not support SVG");
|
|
145
|
-
if (!e)
|
|
146
|
-
throw new Error("Missing src");
|
|
147
|
-
this.load();
|
|
148
|
-
}
|
|
149
|
-
} catch (r) {
|
|
150
|
-
this.handleError(r);
|
|
151
|
-
}
|
|
152
|
-
this.isInitialized = !0;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}), Object.defineProperty(a.prototype, "componentDidUpdate", {
|
|
156
|
-
enumerable: !1,
|
|
157
|
-
configurable: !0,
|
|
158
|
-
writable: !0,
|
|
159
|
-
value: function(t, e) {
|
|
160
|
-
if (w()) {
|
|
161
|
-
var r = this.state, n = r.hasCache, u = r.status, i = this.props, o = i.onLoad, s = i.src;
|
|
162
|
-
if (e.status !== p.READY && u === p.READY && o && o(s, n), t.src !== s) {
|
|
163
|
-
if (!s) {
|
|
164
|
-
this.handleError(new Error("Missing src"));
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
this.load();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}), Object.defineProperty(a.prototype, "componentWillUnmount", {
|
|
172
|
-
enumerable: !1,
|
|
173
|
-
configurable: !0,
|
|
174
|
-
writable: !0,
|
|
175
|
-
value: function() {
|
|
176
|
-
this.isActive = !1;
|
|
177
|
-
}
|
|
178
|
-
}), Object.defineProperty(a.prototype, "getNode", {
|
|
179
|
-
enumerable: !1,
|
|
180
|
-
configurable: !0,
|
|
181
|
-
writable: !0,
|
|
182
|
-
value: function() {
|
|
183
|
-
var t = this.props, e = t.description, r = t.title;
|
|
184
|
-
try {
|
|
185
|
-
var n = this.processSVG(), u = O(n, { nodeOnly: !0 });
|
|
186
|
-
if (!u || !(u instanceof SVGSVGElement))
|
|
187
|
-
throw new Error("Could not convert the src to a DOM Node");
|
|
188
|
-
var i = this.updateSVGAttributes(u);
|
|
189
|
-
if (e) {
|
|
190
|
-
var o = i.querySelector("desc");
|
|
191
|
-
o && o.parentNode && o.parentNode.removeChild(o);
|
|
192
|
-
var s = document.createElementNS("http://www.w3.org/2000/svg", "desc");
|
|
193
|
-
s.innerHTML = e, i.prepend(s);
|
|
194
|
-
}
|
|
195
|
-
if (typeof r < "u") {
|
|
196
|
-
var f = i.querySelector("title");
|
|
197
|
-
if (f && f.parentNode && f.parentNode.removeChild(f), r) {
|
|
198
|
-
var c = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
199
|
-
c.innerHTML = r, i.prepend(c);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
return i;
|
|
203
|
-
} catch (d) {
|
|
204
|
-
return this.handleError(d);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}), Object.defineProperty(a.prototype, "getElement", {
|
|
208
|
-
enumerable: !1,
|
|
209
|
-
configurable: !0,
|
|
210
|
-
writable: !0,
|
|
211
|
-
value: function() {
|
|
212
|
-
try {
|
|
213
|
-
var t = this.getNode(), e = O(t);
|
|
214
|
-
if (!e || !m.isValidElement(e))
|
|
215
|
-
throw new Error("Could not convert the src to a React element");
|
|
216
|
-
this.setState({
|
|
217
|
-
element: e,
|
|
218
|
-
status: p.READY
|
|
219
|
-
});
|
|
220
|
-
} catch (r) {
|
|
221
|
-
this.handleError(new Error(r.message));
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}), Object.defineProperty(a.prototype, "load", {
|
|
225
|
-
enumerable: !1,
|
|
226
|
-
configurable: !0,
|
|
227
|
-
writable: !0,
|
|
228
|
-
value: function() {
|
|
229
|
-
var t = this;
|
|
230
|
-
this.isActive && this.setState({
|
|
231
|
-
content: "",
|
|
232
|
-
element: null,
|
|
233
|
-
hasCache: !1,
|
|
234
|
-
status: p.LOADING
|
|
235
|
-
}, function() {
|
|
236
|
-
var e = t.props, r = e.cacheRequests, n = e.src, u = r && h[n];
|
|
237
|
-
if (u && u.status === p.LOADED) {
|
|
238
|
-
t.handleLoad(u.content, !0);
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
var i = n.match(/data:image\/svg[^,]*?(;base64)?,(.*)/), o;
|
|
242
|
-
if (i ? o = i[1] ? window.atob(i[2]) : decodeURIComponent(i[2]) : n.includes("<svg") && (o = n), o) {
|
|
243
|
-
t.handleLoad(o);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
t.request();
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}), Object.defineProperty(a.prototype, "updateSVGAttributes", {
|
|
250
|
-
enumerable: !1,
|
|
251
|
-
configurable: !0,
|
|
252
|
-
writable: !0,
|
|
253
|
-
value: function(t) {
|
|
254
|
-
var e = this, r = this.props, n = r.baseURL, u = n === void 0 ? "" : n, i = r.uniquifyIDs, o = ["id", "href", "xlink:href", "xlink:role", "xlink:arcrole"], s = ["href", "xlink:href"], f = function(c, d) {
|
|
255
|
-
return s.includes(c) && (d ? !d.includes("#") : !1);
|
|
256
|
-
};
|
|
257
|
-
return i && D([], g(t.children), !1).map(function(c) {
|
|
258
|
-
if (c.attributes && c.attributes.length) {
|
|
259
|
-
var d = Object.values(c.attributes).map(function(b) {
|
|
260
|
-
var v = b, y = b.value.match(/url\((.*?)\)/);
|
|
261
|
-
return y && y[1] && (v.value = b.value.replace(y[0], "url(".concat(u).concat(y[1], "__").concat(e.hash, ")"))), v;
|
|
262
|
-
});
|
|
263
|
-
o.forEach(function(b) {
|
|
264
|
-
var v = d.find(function(y) {
|
|
265
|
-
return y.name === b;
|
|
266
|
-
});
|
|
267
|
-
v && !f(b, v.value) && (v.value = "".concat(v.value, "__").concat(e.hash));
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
return c.children.length ? e.updateSVGAttributes(c) : c;
|
|
271
|
-
}), t;
|
|
272
|
-
}
|
|
273
|
-
}), Object.defineProperty(a.prototype, "processSVG", {
|
|
274
|
-
enumerable: !1,
|
|
275
|
-
configurable: !0,
|
|
276
|
-
writable: !0,
|
|
277
|
-
value: function() {
|
|
278
|
-
var t = this.state.content, e = this.props.preProcessor;
|
|
279
|
-
return e ? e(t) : t;
|
|
280
|
-
}
|
|
281
|
-
}), Object.defineProperty(a.prototype, "render", {
|
|
282
|
-
enumerable: !1,
|
|
283
|
-
configurable: !0,
|
|
284
|
-
writable: !0,
|
|
285
|
-
value: function() {
|
|
286
|
-
var t = this.state, e = t.element, r = t.status, n = this.props, u = n.children, i = u === void 0 ? null : u, o = n.innerRef, s = n.loader, f = s === void 0 ? null : s, c = P(this.props, "baseURL", "cacheRequests", "children", "description", "fetchOptions", "innerRef", "loader", "onError", "onLoad", "preProcessor", "src", "title", "uniqueHash", "uniquifyIDs");
|
|
287
|
-
return w() ? e ? m.cloneElement(e, _({ ref: o }, c)) : [p.UNSUPPORTED, p.FAILED].includes(r) ? i : f : f;
|
|
288
|
-
}
|
|
289
|
-
}), Object.defineProperty(a, "defaultProps", {
|
|
290
|
-
enumerable: !0,
|
|
291
|
-
configurable: !0,
|
|
292
|
-
writable: !0,
|
|
293
|
-
value: {
|
|
294
|
-
cacheRequests: !0,
|
|
295
|
-
uniquifyIDs: !1
|
|
296
|
-
}
|
|
297
|
-
}), a;
|
|
298
|
-
})(m.PureComponent)
|
|
299
|
-
);
|
|
1
|
+
import { Parser as o } from "./index-Parser2.js";
|
|
2
|
+
import { DomHandler as t } from "./index-esm7.js";
|
|
3
|
+
import { default as l } from "./index-Tokenizer.js";
|
|
4
|
+
function f(n, e) {
|
|
5
|
+
const r = new t(void 0, e);
|
|
6
|
+
return new o(r, e).end(n), r.root;
|
|
7
|
+
}
|
|
300
8
|
export {
|
|
301
|
-
|
|
302
|
-
|
|
9
|
+
t as DefaultHandler,
|
|
10
|
+
t as DomHandler,
|
|
11
|
+
o as Parser,
|
|
12
|
+
l as Tokenizer,
|
|
13
|
+
f as parseDocument
|
|
303
14
|
};
|