spell 0.8.7 → 0.8.9
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/README-epics.md +149 -49
- package/app/package.json +25 -1
- package/app/spaces/@spell/guides/SpellUI/SpellUI.spellml +486 -486
- package/app/spaces/@spell/sites/SpellApp/SpellApp.spellml +50 -124
- package/dist/app/app/pages/SiteBoardView.css +5 -5
- package/dist/app/app/pages/SiteBoardView.js +1 -1
- package/dist/app/app/pages/SiteEditorPage.js +6 -3
- package/dist/app/app/pages/SiteEdits.js +27 -10
- package/dist/app/app/pages/SiteWrites.js +11 -0
- package/dist/app/app/runner/spellRuntime.js +1 -0
- package/dist/cli/publish/PublishedPackage.d.ts +2 -1
- package/dist/cli/publish/PublishedPackage.js +6 -3
- package/dist/cli/publish/ScratchInstall.d.ts +14 -3
- package/dist/cli/publish/ScratchInstall.js +69 -8
- package/dist/epic/cli/EpicProgram.js +20 -5
- package/dist/epic/cli/epicGroups.js +7 -1
- package/dist/epic/command/BaseBranch.d.ts +35 -0
- package/dist/epic/command/BaseBranch.js +58 -0
- package/dist/epic/command/EpicCheckout.d.ts +1 -1
- package/dist/epic/command/EpicCheckout.js +4 -4
- package/dist/epic/command/EpicGuide.js +3 -2
- package/dist/epic/command/EpicTools.d.ts +5 -0
- package/dist/epic/command/EpicTools.js +14 -3
- package/dist/epic/command/MainMerge.d.ts +26 -15
- package/dist/epic/command/MainMerge.js +60 -16
- package/dist/epic/command/PullRequest.d.ts +45 -0
- package/dist/epic/command/PullRequest.js +100 -0
- package/dist/epic/command/RepoInit.d.ts +196 -39
- package/dist/epic/command/RepoInit.js +481 -60
- package/dist/epic/command/Requests.d.ts +1 -0
- package/dist/epic/command/Requests.js +7 -1
- package/dist/epic/command/SessionMoves.js +2 -1
- package/dist/epic/command/SkillsCheck.js +3 -2
- package/dist/epic/command/Stock.js +3 -1
- package/dist/epic/command/TurnEnd.d.ts +1 -1
- package/dist/epic/command/TurnEnd.js +4 -3
- package/dist/epic/command/Worktrees.d.ts +20 -3
- package/dist/epic/command/Worktrees.js +39 -7
- package/dist/epic/command/command.types.d.ts +3 -0
- package/dist/epic/components/__pack/epics.entry.js +43 -43
- package/dist/epic/components/__pack/epics.pack.js +36 -12794
- package/dist/epic/config/CodeHost.d.ts +96 -0
- package/dist/epic/config/CodeHost.js +89 -0
- package/dist/epic/config/EngineFiles.mjs +60 -0
- package/dist/epic/config/EpicConfig.d.ts +20 -3
- package/dist/epic/config/EpicConfig.js +25 -1
- package/dist/epic/config/EpicRepo.js +1 -1
- package/dist/epic/config/GitHub.d.ts +75 -3
- package/dist/epic/config/GitHub.js +106 -5
- package/dist/epic/config/GitLab.d.ts +138 -0
- package/dist/epic/config/GitLab.js +297 -0
- package/dist/epic/config/LayeredSettings.js +3 -2
- package/dist/epic/server/EpicServer.d.ts +1 -1
- package/dist/epic/server/EpicServer.js +26 -12
- package/dist/epic/tool/InboxPoller.mjs +2 -1
- package/dist/epic/tool/MigrateCommands.js +6 -8
- package/dist/epic/tool/PlanCommits.d.ts +7 -4
- package/dist/epic/tool/PlanCommits.js +7 -5
- package/dist/epic/tool/PlanDocCommands.js +3 -4
- package/dist/epic/tool/PlanDocFiles.d.ts +3 -1
- package/dist/epic/tool/PlanDocFiles.js +13 -5
- package/dist/epic/tool/ServedFolders.d.ts +1 -1
- package/dist/epic/tool/ServedFolders.js +4 -4
- package/dist/epic/tools/PageInboxes.js +3 -3
- package/dist/epic/tools/_assets/commands.entry.js +149 -68
- package/dist/epic/tools/_assets/commands.js +20 -2073
- package/dist/epic/tools/_assets/core-reference.entry.js +244 -124
- package/dist/epic/tools/_assets/core-reference.js +20 -2142
- package/dist/epic/tools/_assets/emoji/cldr/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/z.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/q.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/z.js +2 -2
- package/dist/epic/tools/_assets/goals-live.js +318 -210
- package/dist/epic/tools/_assets/highlight.min.js +5764 -5269
- package/dist/epic/tools/_assets/lazy/code-engine.js +5 -1270
- package/dist/epic/tools/_assets/lazy/markdown-engine.js +67 -1513
- package/dist/epic/tools/_assets/lazy/markdown-sanitizer.js +3 -753
- package/dist/epic/tools/_assets/spell-comments.entry.js +282 -159
- package/dist/epic/tools/_assets/spell-comments.js +24 -3716
- package/dist/epic/tools/_assets/spell-doc-comments.js +1243 -816
- package/dist/epic/tools/_assets/spell-doc-helpers.js +298 -165
- package/dist/epic/tools/_assets/spell-doc-runtime.js +2760 -1415
- package/dist/epic/tools/_assets/spell-doc-toolbar.js +396 -227
- package/dist/epic/tools/_assets/spell-syntax.entry.js +505 -285
- package/dist/epic/tools/_assets/spell-syntax.js +22 -2916
- package/dist/epic/tools/_assets/spell-ui-sources.js +102 -60
- package/dist/epic/tools/_assets/spell-ui.entry.js +108 -40
- package/dist/epic/tools/_assets/spell-ui.js +3131 -46465
- package/dist/epic/tools/pages.d.ts +5 -6
- package/dist/epic/tools/pages.js +7 -6
- package/dist/epic/window.mjs +2 -3
- package/dist/parser/core/classes/View.d.ts +20 -0
- package/dist/parser/core/classes/View.js +91 -17
- package/dist/parser/core/core.declarations.json5 +18 -0
- package/dist/parser/core/core.scopes.js +5 -0
- package/dist/parser/core/sites.d.ts +10 -0
- package/dist/parser/core/sites.js +12 -0
- package/dist/parser/parser/tokenizer/Tokenizer.d.ts +9 -1
- package/dist/parser/parser/tokenizer/Tokenizer.js +43 -5
- package/dist/parser/parser/tokenizer/Tokens.d.ts +4 -0
- package/dist/parser/parser/tokenizer/Tokens.js +4 -0
- package/dist/parser/parser/tokenizer/tokenizer.types.d.ts +5 -0
- package/dist/parser/parser/tokenizer/tokenizer.types.js +2 -0
- package/dist/parser/py/core/spell_core/apps.py +2 -0
- package/dist/parser/spell/PARSING.md +21 -0
- package/dist/parser/spell/SpellParser.d.ts +2 -0
- package/dist/parser/spell/SpellParser.js +58 -3
- package/dist/parser/spell/SpellxTokenizer.js +2 -1
- package/dist/parser/spell/SpellxTwin.d.ts +4 -1
- package/dist/parser/spell/SpellxTwin.js +10 -3
- package/dist/parser/spell/builtinTypes.js +24 -1
- package/dist/parser/spell/ingest/PlaceIngest.js +3 -1
- package/dist/parser/spell/languages/Language.d.ts +11 -2
- package/dist/parser/spell/languages/en/words.js +3 -2
- package/dist/parser/spell/languages/es/words.js +7 -4
- package/dist/parser/spell/rules/Statement.js +1 -1
- package/dist/parser/spell/rules/classes/DrawSlot.js +6 -1
- package/dist/parser/spell/rules/sites/SitePage.d.ts +3 -3
- package/dist/parser/spell/rules/sites/SitePage.js +2 -2
- package/dist/parser/spell/rules/sites/sites.en.js +1 -1
- package/dist/parser/spell/rules/sites/sites.es.js +1 -1
- package/dist/parser/spell/rules/sites/sites.shared.d.ts +2 -2
- package/dist/parser/spell/spell.types.d.ts +7 -0
- package/dist/parser/spell/spellSyntax.es.json +6 -6
- package/dist/parser/spell/spellSyntax.json +6 -6
- package/dist/parser/spellx/SpellxView.js +2 -1
- package/dist/ui/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/ui/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/ui/components/ui-button/UIButton.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/ui/components/ui-button/UIOr.d.ts +1 -0
- package/dist/ui/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/ui/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/ui/components/ui-card/UICards.d.ts +31 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/ui/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/ui/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/ui/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/ui/components/ui-dimmer/UIDimmer.d.ts +1 -0
- package/dist/ui/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/ui/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/ui/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/ui/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/ui/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/ui/components/ui-form/UIFields.d.ts +1 -0
- package/dist/ui/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/ui/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/ui/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/ui/components/ui-image/UIImages.d.ts +1 -0
- package/dist/ui/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/ui/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/ui/components/ui-items/UIItems.d.ts +1 -0
- package/dist/ui/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/ui/components/ui-label/UILabel.d.ts +2 -0
- package/dist/ui/components/ui-label/UILabels.d.ts +1 -0
- package/dist/ui/components/ui-list/UIList.d.ts +2 -0
- package/dist/ui/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/ui/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/ui/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/ui/components/ui-nag/UINag.d.ts +1 -0
- package/dist/ui/components/ui-page/UIPage.d.ts +15 -0
- package/dist/ui/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIHeader.d.ts +15 -3
- package/dist/ui/components/ui-parts/UIHeader.en.d.ts +5 -2
- package/dist/ui/components/ui-parts/UIHeader.en.js +6 -3
- package/dist/ui/components/ui-parts/UIHeader.js +45 -5
- package/dist/ui/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIParts.css +18 -0
- package/dist/ui/components/ui-parts/UIParts.css.inline.js +1 -1
- package/dist/ui/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/ui/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/ui/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/ui/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/ui/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/ui/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/ui/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/ui/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/ui/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/ui/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/ui/components/ui-section/UISections.d.ts +1 -0
- package/dist/ui/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/ui/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/ui/components/ui-select/UISelect.d.ts +6 -0
- package/dist/ui/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/ui/components/ui-shape/UISide.d.ts +4 -0
- package/dist/ui/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/ui/components/ui-sides/UISides.d.ts +6 -0
- package/dist/ui/components/ui-sides/UISides.fallback.d.ts +6 -0
- package/dist/ui/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/ui/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/ui/components/ui-space/UISpace.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/ui/components/ui-step/UIStep.d.ts +1 -0
- package/dist/ui/components/ui-step/UISteps.d.ts +1 -0
- package/dist/ui/components/ui-table/UICell.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/ui/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/ui/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/ui/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/ui/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/ui/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/ui/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/ui/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/ui/jsx.d.ts +4 -4
- package/dist/ui/vocabulary/defaults.generated.js +1 -1
- package/dist/util/spell/constants.js +1 -1
- package/epic/.claude-plugin/plugin.json +1 -1
- package/epic/.codex-plugin/plugin.json +1 -1
- package/epic/hooks/handoff.mjs +4 -3
- package/epic/hooks/worktree.mjs +22 -3
- package/epic/package.json +41 -2
- package/epic/skills/details/SKILL.md +2 -1
- package/epic/skills/epic/SKILL.md +7 -1
- package/epic/skills/epic/guide.md +3 -0
- package/epic/skills/isolate/SKILL.md +53 -20
- package/epic/src/AGENTS.md +11 -2
- package/epic/templates/durable.html +1 -1
- package/epic/vscode/package.json +1 -1
- package/epic/vscode/spell-epic.vsix +0 -0
- package/package.json +1 -1
- package/parser/package.json +1 -1
- package/ui/package.json +15 -2
|
@@ -1,756 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
|
-
// src/tools/_assets/lazy/markdown-sanitizer.js
|
|
5
|
-
var __spellMarkdownSanitizer = (() => {
|
|
6
|
-
var Ue = Object.defineProperty;
|
|
7
|
-
var Kn = Object.getOwnPropertyDescriptor;
|
|
8
|
-
var qn = Object.getOwnPropertyNames;
|
|
9
|
-
var $n = Object.prototype.hasOwnProperty;
|
|
10
|
-
var a = /* @__PURE__ */ __name((o, n) => Ue(o, "name", { value: n, configurable: true }), "a");
|
|
11
|
-
var Xn = /* @__PURE__ */ __name((o, n) => {
|
|
12
|
-
for (var l in n) Ue(o, l, { get: n[l], enumerable: true });
|
|
13
|
-
}, "Xn"), Zn = /* @__PURE__ */ __name((o, n, l, c) => {
|
|
14
|
-
if (n && typeof n == "object" || typeof n == "function") for (let p of qn(n)) !$n.call(o, p) && p !== l && Ue(o, p, { get: /* @__PURE__ */ __name(() => n[p], "get"), enumerable: !(c = Kn(n, p)) || c.enumerable });
|
|
15
|
-
return o;
|
|
16
|
-
}, "Zn");
|
|
17
|
-
var Qn = /* @__PURE__ */ __name((o) => Zn(Ue({}, "__esModule", { value: true }), o), "Qn");
|
|
18
|
-
var Fo = {};
|
|
19
|
-
Xn(Fo, { MarkdownSanitizer: /* @__PURE__ */ __name(() => ht, "MarkdownSanitizer") });
|
|
20
|
-
function Jn(o, n) {
|
|
21
|
-
this.v = o, this.k = n;
|
|
22
|
-
}
|
|
23
|
-
__name(Jn, "Jn");
|
|
24
|
-
a(Jn, "_OverloadYield");
|
|
25
|
-
function Zt(o, n) {
|
|
26
|
-
(n == null || n > o.length) && (n = o.length);
|
|
27
|
-
for (var l = 0, c = Array(n); l < n; l++) c[l] = o[l];
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
__name(Zt, "Zt");
|
|
31
|
-
a(Zt, "_arrayLikeToArray");
|
|
32
|
-
function eo(o) {
|
|
33
|
-
if (Array.isArray(o)) return o;
|
|
34
|
-
}
|
|
35
|
-
__name(eo, "eo");
|
|
36
|
-
a(eo, "_arrayWithHoles");
|
|
37
|
-
function to(o, n) {
|
|
38
|
-
var l = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
|
|
39
|
-
if (l != null) {
|
|
40
|
-
var c, p, m, h, U = [], E = true, F = false;
|
|
41
|
-
try {
|
|
42
|
-
if (m = (l = l.call(o)).next, n === 0) {
|
|
43
|
-
if (Object(l) !== l) return;
|
|
44
|
-
E = false;
|
|
45
|
-
} else for (; !(E = (c = m.call(l)).done) && (U.push(c.value), U.length !== n); E = true) ;
|
|
46
|
-
} catch (x) {
|
|
47
|
-
F = true, p = x;
|
|
48
|
-
} finally {
|
|
49
|
-
try {
|
|
50
|
-
if (!E && l.return != null && (h = l.return(), Object(h) !== h)) return;
|
|
51
|
-
} finally {
|
|
52
|
-
if (F) throw p;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return U;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
__name(to, "to");
|
|
59
|
-
a(to, "_iterableToArrayLimit");
|
|
60
|
-
function no() {
|
|
61
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
63
|
-
}
|
|
64
|
-
__name(no, "no");
|
|
65
|
-
a(no, "_nonIterableRest");
|
|
66
|
-
function oo(o, n) {
|
|
67
|
-
return eo(o) || to(o, n) || ro(o, n) || no();
|
|
68
|
-
}
|
|
69
|
-
__name(oo, "oo");
|
|
70
|
-
a(oo, "_slicedToArray");
|
|
71
|
-
function ro(o, n) {
|
|
72
|
-
if (o) {
|
|
73
|
-
if (typeof o == "string") return Zt(o, n);
|
|
74
|
-
var l = {}.toString.call(o).slice(8, -1);
|
|
75
|
-
return l === "Object" && o.constructor && (l = o.constructor.name), l === "Map" || l === "Set" ? Array.from(o) : l === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l) ? Zt(o, n) : void 0;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
__name(ro, "ro");
|
|
79
|
-
a(ro, "_unsupportedIterableToArray");
|
|
80
|
-
function Fe(o) {
|
|
81
|
-
var n, l;
|
|
82
|
-
function c(m, h) {
|
|
83
|
-
try {
|
|
84
|
-
var U = o[m](h), E = U.value, F = E instanceof Jn;
|
|
85
|
-
Promise.resolve(F ? E.v : E).then(function(x) {
|
|
86
|
-
if (F) {
|
|
87
|
-
var k = m === "return" && E.k ? m : "next";
|
|
88
|
-
if (!E.k || x.done) return c(k, x);
|
|
89
|
-
x = o[k](x).value;
|
|
90
|
-
}
|
|
91
|
-
p(!!U.done, x);
|
|
92
|
-
}, function(x) {
|
|
93
|
-
c("throw", x);
|
|
94
|
-
});
|
|
95
|
-
} catch (x) {
|
|
96
|
-
p(2, x);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
__name(c, "c");
|
|
100
|
-
a(c, "resume");
|
|
101
|
-
function p(m, h) {
|
|
102
|
-
m === 2 ? n.reject(h) : n.resolve({ value: h, done: m }), (n = n.next) ? c(n.key, n.arg) : l = null;
|
|
103
|
-
}
|
|
104
|
-
__name(p, "p");
|
|
105
|
-
a(p, "settle"), this._invoke = function(m, h) {
|
|
106
|
-
return new Promise(function(U, E) {
|
|
107
|
-
var F = { key: m, arg: h, resolve: U, reject: E, next: null };
|
|
108
|
-
l ? l = l.next = F : (n = l = F, c(m, h));
|
|
109
|
-
});
|
|
110
|
-
}, typeof o.return != "function" && (this.return = void 0);
|
|
111
|
-
}
|
|
112
|
-
__name(Fe, "Fe");
|
|
113
|
-
a(Fe, "AsyncGenerator");
|
|
114
|
-
Fe.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
115
|
-
return this;
|
|
116
|
-
}, Fe.prototype.next = function(o) {
|
|
117
|
-
return this._invoke("next", o);
|
|
118
|
-
}, Fe.prototype.throw = function(o) {
|
|
119
|
-
return this._invoke("throw", o);
|
|
120
|
-
}, Fe.prototype.return = function(o) {
|
|
121
|
-
return this._invoke("return", o);
|
|
122
|
-
};
|
|
123
|
-
var mn = Object.entries, Qt = Object.setPrototypeOf, io = Object.isFrozen, so = Object.getPrototypeOf, ao = Object.getOwnPropertyDescriptor, R = Object.freeze, O = Object.seal, pe = Object.create, dn = typeof Reflect < "u" && Reflect, mt = dn.apply, dt = dn.construct;
|
|
124
|
-
R || (R = a(function(n) {
|
|
125
|
-
return n;
|
|
126
|
-
}, "freeze"));
|
|
127
|
-
O || (O = a(function(n) {
|
|
128
|
-
return n;
|
|
129
|
-
}, "seal"));
|
|
130
|
-
mt || (mt = a(function(n, l) {
|
|
131
|
-
for (var c = arguments.length, p = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++) p[m - 2] = arguments[m];
|
|
132
|
-
return n.apply(l, p);
|
|
133
|
-
}, "apply"));
|
|
134
|
-
dt || (dt = a(function(n) {
|
|
135
|
-
for (var l = arguments.length, c = new Array(l > 1 ? l - 1 : 0), p = 1; p < l; p++) c[p - 1] = arguments[p];
|
|
136
|
-
return new n(...c);
|
|
137
|
-
}, "construct"));
|
|
138
|
-
var Q = S(Array.prototype.forEach);
|
|
139
|
-
Array.prototype.indexOf;
|
|
140
|
-
var lo = S(Array.prototype.lastIndexOf), Jt = S(Array.prototype.pop), Te = S(Array.prototype.push);
|
|
141
|
-
Array.prototype.slice;
|
|
142
|
-
var co = S(Array.prototype.splice), fe = Array.isArray, _e = S(String.prototype.toLowerCase), at = S(String.prototype.toString), en = S(String.prototype.match), be = S(String.prototype.replace), tn = S(String.prototype.indexOf), uo = S(String.prototype.trim), po = S(Number.prototype.toString), fo = S(Boolean.prototype.toString), nn = typeof BigInt > "u" ? null : S(BigInt.prototype.toString), on = typeof Symbol > "u" ? null : S(Symbol.prototype.toString), D = S(Object.prototype.hasOwnProperty), Ee = S(Object.prototype.toString), w = S(RegExp.prototype.test), Y = mo(TypeError);
|
|
143
|
-
function S(o) {
|
|
144
|
-
return function(n) {
|
|
145
|
-
n instanceof RegExp && (n.lastIndex = 0);
|
|
146
|
-
for (var l = arguments.length, c = new Array(l > 1 ? l - 1 : 0), p = 1; p < l; p++) c[p - 1] = arguments[p];
|
|
147
|
-
return mt(o, n, c);
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
__name(S, "S");
|
|
151
|
-
a(S, "unapply");
|
|
152
|
-
function mo(o) {
|
|
153
|
-
return function() {
|
|
154
|
-
for (var n = arguments.length, l = new Array(n), c = 0; c < n; c++) l[c] = arguments[c];
|
|
155
|
-
return dt(o, l);
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
__name(mo, "mo");
|
|
159
|
-
a(mo, "unconstruct");
|
|
160
|
-
function g(o, n) {
|
|
161
|
-
let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _e;
|
|
162
|
-
if (Qt && Qt(o, null), !fe(n)) return o;
|
|
163
|
-
let c = n.length;
|
|
164
|
-
for (; c--; ) {
|
|
165
|
-
let p = n[c];
|
|
166
|
-
if (typeof p == "string") {
|
|
167
|
-
let m = l(p);
|
|
168
|
-
m !== p && (io(n) || (n[c] = m), p = m);
|
|
169
|
-
}
|
|
170
|
-
o[p] = true;
|
|
171
|
-
}
|
|
172
|
-
return o;
|
|
173
|
-
}
|
|
174
|
-
__name(g, "g");
|
|
175
|
-
a(g, "addToSet");
|
|
176
|
-
function go(o) {
|
|
177
|
-
for (let n = 0; n < o.length; n++) D(o, n) || (o[n] = null);
|
|
178
|
-
return o;
|
|
179
|
-
}
|
|
180
|
-
__name(go, "go");
|
|
181
|
-
a(go, "cleanArray");
|
|
182
|
-
function N(o) {
|
|
183
|
-
let n = pe(null);
|
|
184
|
-
for (let c of mn(o)) {
|
|
185
|
-
var l = oo(c, 2);
|
|
186
|
-
let p = l[0], m = l[1];
|
|
187
|
-
D(o, p) && (fe(m) ? n[p] = go(m) : m && typeof m == "object" && m.constructor === Object ? n[p] = N(m) : n[p] = m);
|
|
188
|
-
}
|
|
189
|
-
return n;
|
|
190
|
-
}
|
|
191
|
-
__name(N, "N");
|
|
192
|
-
a(N, "clone");
|
|
193
|
-
function ho(o) {
|
|
194
|
-
switch (typeof o) {
|
|
195
|
-
case "string":
|
|
196
|
-
return o;
|
|
197
|
-
case "number":
|
|
198
|
-
return po(o);
|
|
199
|
-
case "boolean":
|
|
200
|
-
return fo(o);
|
|
201
|
-
case "bigint":
|
|
202
|
-
return nn ? nn(o) : "0";
|
|
203
|
-
case "symbol":
|
|
204
|
-
return on ? on(o) : "Symbol()";
|
|
205
|
-
case "undefined":
|
|
206
|
-
return Ee(o);
|
|
207
|
-
case "function":
|
|
208
|
-
case "object": {
|
|
209
|
-
if (o === null) return Ee(o);
|
|
210
|
-
let n = o, l = M(n, "toString");
|
|
211
|
-
if (typeof l == "function") {
|
|
212
|
-
let c = l(n);
|
|
213
|
-
return typeof c == "string" ? c : Ee(c);
|
|
214
|
-
}
|
|
215
|
-
return Ee(o);
|
|
216
|
-
}
|
|
217
|
-
default:
|
|
218
|
-
return Ee(o);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
__name(ho, "ho");
|
|
222
|
-
a(ho, "stringifyValue");
|
|
223
|
-
function M(o, n) {
|
|
224
|
-
for (; o !== null; ) {
|
|
225
|
-
let c = ao(o, n);
|
|
226
|
-
if (c) {
|
|
227
|
-
if (c.get) return S(c.get);
|
|
228
|
-
if (typeof c.value == "function") return S(c.value);
|
|
229
|
-
}
|
|
230
|
-
o = so(o);
|
|
231
|
-
}
|
|
232
|
-
function l() {
|
|
233
|
-
return null;
|
|
234
|
-
}
|
|
235
|
-
__name(l, "l");
|
|
236
|
-
return a(l, "fallbackValue"), l;
|
|
237
|
-
}
|
|
238
|
-
__name(M, "M");
|
|
239
|
-
a(M, "lookupGetter");
|
|
240
|
-
function yo(o) {
|
|
241
|
-
try {
|
|
242
|
-
return w(o, ""), true;
|
|
243
|
-
} catch {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
__name(yo, "yo");
|
|
248
|
-
a(yo, "isRegex");
|
|
249
|
-
var rn = R(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), lt = R(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ct = R(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), To = R(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ut = R(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), bo = R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), sn = R(["#text"]), an = R(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), pt = R(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ln = R(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ze = R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Eo = O(/{{[\w\W]*|^[\w\W]*}}/g), _o = O(/<%[\w\W]*|^[\w\W]*%>/g), Ao = O(/\${[\w\W]*/g), So = O(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ro = O(/^aria-[\-\w]+$/), cn = O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Oo = O(/^(?:\w+script|data):/i), xo = O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), wo = O(/^html$/i), vo = O(/^[a-z][.\w]*(-[.\w]+)+$/i), un = O(/<[/\w!]/g), pn = O(/<[/\w]/g), Io = O(/<\/no(script|embed|frames)/i), Do = O(/\/>/i), L = { element: 1, attribute: 2, text: 3, cdataSection: 4, entityReference: 5, entityNode: 6, processingInstruction: 7, comment: 8, document: 9, documentType: 10, documentFragment: 11, notation: 12 }, gn = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], Co = R(g({}, gn)), Lo = (function() {
|
|
250
|
-
let o = {};
|
|
251
|
-
return Q(gn, (n) => {
|
|
252
|
-
o[n] = O(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
253
|
-
}), R(o);
|
|
254
|
-
})(), No = a(function() {
|
|
255
|
-
return typeof window > "u" ? null : window;
|
|
256
|
-
}, "getGlobal"), Po = a(function(n, l) {
|
|
257
|
-
if (typeof n != "object" || typeof n.createPolicy != "function") return null;
|
|
258
|
-
let c = null, p = "data-tt-policy-suffix";
|
|
259
|
-
l && l.hasAttribute(p) && (c = l.getAttribute(p));
|
|
260
|
-
let m = "dompurify" + (c ? "#" + c : "");
|
|
261
|
-
try {
|
|
262
|
-
return n.createPolicy(m, { createHTML(h) {
|
|
263
|
-
return h;
|
|
264
|
-
}, createScriptURL(h) {
|
|
265
|
-
return h;
|
|
266
|
-
} });
|
|
267
|
-
} catch {
|
|
268
|
-
return console.warn("TrustedTypes policy " + m + " could not be created."), null;
|
|
269
|
-
}
|
|
270
|
-
}, "_createTrustedTypesPolicy"), fn = a(function() {
|
|
271
|
-
return { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] };
|
|
272
|
-
}, "_createHooksMap"), j = a(function(n, l, c, p) {
|
|
273
|
-
return D(n, l) && fe(n[l]) ? g(p.base ? N(p.base) : {}, n[l], p.transform) : c;
|
|
274
|
-
}, "_resolveSetOption"), ft = a(function(n, l, c) {
|
|
275
|
-
let p = D(n, l) ? n[l] : void 0;
|
|
276
|
-
return p && typeof p == "object" ? N(p) : c();
|
|
277
|
-
}, "_resolveObjectOption");
|
|
278
|
-
function hn() {
|
|
279
|
-
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : No(), n = a((i) => hn(i), "DOMPurify");
|
|
280
|
-
if (n.version = "3.4.16", n.removed = [], !o || !o.document || o.document.nodeType !== L.document || !o.Element) return n.isSupported = false, n;
|
|
281
|
-
let l = o.document, c = l, p = c.currentScript;
|
|
282
|
-
o.DocumentFragment;
|
|
283
|
-
let m = o.HTMLTemplateElement, h = o.Node, U = o.Element, E = o.NodeFilter;
|
|
284
|
-
o.NamedNodeMap === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
|
|
285
|
-
let F = o.DOMParser, x = o.trustedTypes, k = U.prototype, yn = M(k, "cloneNode"), Ge = M(k, "remove"), yt = M(k, "removeAttributeNode"), Tn = M(k, "nextSibling"), J = M(k, "childNodes"), ee = M(k, "parentNode"), Tt = M(k, "shadowRoot"), Be = M(k, "attributes"), K = h && h.prototype ? M(h.prototype, "nodeType") : null, te = h && h.prototype ? M(h.prototype, "nodeName") : null, Se = h && h.prototype ? M(h.prototype, "ownerDocument") : null, me = a(function(e) {
|
|
286
|
-
return K ? K(e) : e.nodeType;
|
|
287
|
-
}, "_readNodeType"), Ve = a(function(e) {
|
|
288
|
-
return te ? te(e) : e.nodeName;
|
|
289
|
-
}, "_readNodeName");
|
|
290
|
-
if (typeof m == "function") {
|
|
291
|
-
let i = l.createElement("template");
|
|
292
|
-
i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
|
|
293
|
-
}
|
|
294
|
-
let I, q = "", We, bt = false, de = 0, Et = a(function() {
|
|
295
|
-
if (de > 0) throw Y('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
296
|
-
}, "_assertNotInTrustedTypesPolicy"), ne = a(function(e) {
|
|
297
|
-
Et(), de++;
|
|
298
|
-
try {
|
|
299
|
-
return I.createHTML(e);
|
|
300
|
-
} finally {
|
|
301
|
-
de--;
|
|
302
|
-
}
|
|
303
|
-
}, "_createTrustedHTML"), bn = a(function(e) {
|
|
304
|
-
Et(), de++;
|
|
305
|
-
try {
|
|
306
|
-
return I.createScriptURL(e);
|
|
307
|
-
} finally {
|
|
308
|
-
de--;
|
|
309
|
-
}
|
|
310
|
-
}, "_createTrustedScriptURL"), En = a(function() {
|
|
311
|
-
return bt || (We = Po(x, p), bt = true), We;
|
|
312
|
-
}, "_getDefaultTrustedTypesPolicy"), Re = l, Ye = Re.implementation, _t = Re.createNodeIterator, _n = Re.createDocumentFragment, An = Re.getElementsByTagName, Sn = c.importNode, y = fn();
|
|
313
|
-
n.isSupported = typeof mn == "function" && typeof ee == "function" && Ye && Ye.createHTMLDocument !== void 0;
|
|
314
|
-
let Rn = Eo, On = _o, xn = Ao, wn = So, vn = Ro, In = Oo, At = xo, Dn = vo, St = cn, T = null, je = g({}, [...rn, ...lt, ...ct, ...ut, ...sn]), b = null, Ke = g({}, [...an, ...pt, ...ln, ...ze]), z = Object.seal(pe(null, { tagNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, attributeNameCheck: { writable: true, configurable: false, enumerable: true, value: null }, allowCustomizedBuiltInElements: { writable: true, configurable: false, enumerable: true, value: false } })), ge = null, Rt = null, B = Object.seal(pe(null, { tagCheck: { writable: true, configurable: false, enumerable: true, value: null }, attributeCheck: { writable: true, configurable: false, enumerable: true, value: null } })), Ot = true, qe = true, xt = false, wt = true, V = false, $ = true, X = false, $e = false, Oe = null, xe = null, Xe = false, oe = false, we = false, ve = false, vt = true, It = false, Dt = "user-content-", Ze = true, Qe = false, re = {}, ie = null, Ct = g({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "selectedcontent", "style", "svg", "template", "thead", "title", "video", "xmp"]), Lt = null, Nt = g({}, ["audio", "video", "img", "source", "image", "track"]), Pt = null, Mt = g({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ie = "http://www.w3.org/1998/Math/MathML", De = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml", se = H, Je = false, et = null, Cn = g({}, [Ie, De, H], at), kt = R(["mi", "mo", "mn", "ms", "mtext"]), tt = g({}, kt), Ut = R(["annotation-xml"]), nt = g({}, Ut), Ln = g({}, ["title", "style", "font", "a", "script"]), he = null, Nn = ["application/xhtml+xml", "text/html"], Pn = "text/html", A = null, ae = null, Mn = l.createElement("form"), Ft = a(function(e) {
|
|
315
|
-
return e instanceof RegExp || e instanceof Function;
|
|
316
|
-
}, "isRegexOrFunction"), ot = a(function() {
|
|
317
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
318
|
-
if (ae && ae === e) return;
|
|
319
|
-
(!e || typeof e != "object") && (e = {}), e = N(e), he = Nn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Pn : e.PARSER_MEDIA_TYPE, A = he === "application/xhtml+xml" ? at : _e, T = j(e, "ALLOWED_TAGS", je, { transform: A }), b = j(e, "ALLOWED_ATTR", Ke, { transform: A }), et = j(e, "ALLOWED_NAMESPACES", Cn, { transform: at }), Pt = j(e, "ADD_URI_SAFE_ATTR", Mt, { transform: A, base: Mt }), Lt = j(e, "ADD_DATA_URI_TAGS", Nt, { transform: A, base: Nt }), ie = j(e, "FORBID_CONTENTS", Ct, { transform: A }), ge = j(e, "FORBID_TAGS", N({}), { transform: A }), Rt = j(e, "FORBID_ATTR", N({}), { transform: A }), re = D(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? N(e.USE_PROFILES) : e.USE_PROFILES : false, Ot = e.ALLOW_ARIA_ATTR !== false, qe = e.ALLOW_DATA_ATTR !== false, xt = e.ALLOW_UNKNOWN_PROTOCOLS || false, wt = e.ALLOW_SELF_CLOSE_IN_ATTR !== false, V = e.SAFE_FOR_TEMPLATES || false, $ = e.SAFE_FOR_XML !== false, X = e.WHOLE_DOCUMENT || false, oe = e.RETURN_DOM || false, we = e.RETURN_DOM_FRAGMENT || false, ve = e.RETURN_TRUSTED_TYPE || false, Xe = e.FORCE_BODY || false, vt = e.SANITIZE_DOM !== false, It = e.SANITIZE_NAMED_PROPS || false, Ze = e.KEEP_CONTENT !== false, Qe = e.IN_PLACE || false, St = yo(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : cn, se = typeof e.NAMESPACE == "string" ? e.NAMESPACE : H, tt = ft(e, "MATHML_TEXT_INTEGRATION_POINTS", () => g({}, kt)), nt = ft(e, "HTML_INTEGRATION_POINTS", () => g({}, Ut));
|
|
320
|
-
let t = ft(e, "CUSTOM_ELEMENT_HANDLING", () => pe(null));
|
|
321
|
-
if (z = pe(null), D(t, "tagNameCheck") && Ft(t.tagNameCheck) && (z.tagNameCheck = t.tagNameCheck), D(t, "attributeNameCheck") && Ft(t.attributeNameCheck) && (z.attributeNameCheck = t.attributeNameCheck), D(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), O(z), V && (qe = false), we && (oe = true), re && (T = g({}, sn), b = pe(null), re.html === true && (g(T, rn), g(b, an)), re.svg === true && (g(T, lt), g(b, pt), g(b, ze)), re.svgFilters === true && (g(T, ct), g(b, pt), g(b, ze)), re.mathMl === true && (g(T, ut), g(b, ln), g(b, ze))), B.tagCheck = null, B.attributeCheck = null, D(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : fe(e.ADD_TAGS) && (T === je && (T = N(T)), g(T, e.ADD_TAGS, A))), D(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : fe(e.ADD_ATTR) && (b === Ke && (b = N(b)), g(b, e.ADD_ATTR, A))), D(e, "ADD_FORBID_CONTENTS") && fe(e.ADD_FORBID_CONTENTS) && (ie === Ct && (ie = N(ie)), g(ie, e.ADD_FORBID_CONTENTS, A)), Ze && (T["#text"] = true), X && g(T, ["html", "head", "body"]), T.table && (g(T, ["tbody"]), delete ge.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
322
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
323
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
324
|
-
let r = I;
|
|
325
|
-
I = e.TRUSTED_TYPES_POLICY;
|
|
326
|
-
try {
|
|
327
|
-
q = ne("");
|
|
328
|
-
} catch (s) {
|
|
329
|
-
throw I = r, s;
|
|
330
|
-
}
|
|
331
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (I = void 0, q = "") : (I === void 0 && (I = En()), I && typeof q == "string" && (q = ne("")));
|
|
332
|
-
R && R(e), ae = e;
|
|
333
|
-
}, "_parseConfig"), zt = g({}, [...lt, ...ct, ...To]), Ht = g({}, [...ut, ...bo]), kn = a(function(e, t, r) {
|
|
334
|
-
return t.namespaceURI === H ? e === "svg" : t.namespaceURI === Ie ? e === "svg" && (r === "annotation-xml" || tt[r]) : !!zt[e];
|
|
335
|
-
}, "_checkSvgNamespace"), Un = a(function(e, t, r) {
|
|
336
|
-
return t.namespaceURI === H ? e === "math" : t.namespaceURI === De ? e === "math" && nt[r] : !!Ht[e];
|
|
337
|
-
}, "_checkMathMlNamespace"), Fn = a(function(e, t, r) {
|
|
338
|
-
return t.namespaceURI === De && !nt[r] || t.namespaceURI === Ie && !tt[r] ? false : !Ht[e] && (Ln[e] || !zt[e]);
|
|
339
|
-
}, "_checkHtmlNamespace"), zn = a(function(e) {
|
|
340
|
-
let t = ee(e);
|
|
341
|
-
(!t || !t.tagName) && (t = { namespaceURI: se, tagName: "template" });
|
|
342
|
-
let r = _e(e.tagName), s = _e(t.tagName);
|
|
343
|
-
return et[e.namespaceURI] ? e.namespaceURI === De ? kn(r, t, s) : e.namespaceURI === Ie ? Un(r, t, s) : e.namespaceURI === H ? Fn(r, t, s) : !!(he === "application/xhtml+xml" && et[e.namespaceURI]) : false;
|
|
344
|
-
}, "_checkValidNamespace"), W = a(function(e) {
|
|
345
|
-
Te(n.removed, { element: e });
|
|
346
|
-
try {
|
|
347
|
-
ee(e).removeChild(e);
|
|
348
|
-
} catch {
|
|
349
|
-
if (Ge(e), !ee(e)) throw Y("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
350
|
-
}
|
|
351
|
-
}, "_forceRemove"), Gt = a(function(e, t, r) {
|
|
352
|
-
try {
|
|
353
|
-
yt(e, t);
|
|
354
|
-
} catch {
|
|
355
|
-
try {
|
|
356
|
-
e.removeAttribute(r);
|
|
357
|
-
} catch {
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}, "_stripAttributeNode"), Ce = a(function(e) {
|
|
361
|
-
Le(e);
|
|
362
|
-
let t = J(e);
|
|
363
|
-
if (t) {
|
|
364
|
-
let s = [];
|
|
365
|
-
Q(t, (u) => {
|
|
366
|
-
Te(s, u);
|
|
367
|
-
}), Q(s, (u) => {
|
|
368
|
-
try {
|
|
369
|
-
Ge(u);
|
|
370
|
-
} catch {
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
let r = Be(e);
|
|
375
|
-
if (r) for (let s = r.length - 1; s >= 0; --s) {
|
|
376
|
-
let u = r[s], f = u && u.name;
|
|
377
|
-
typeof f == "string" && Gt(e, u, f);
|
|
378
|
-
}
|
|
379
|
-
}, "_neutralizeRoot"), Z = a(function(e, t, r) {
|
|
380
|
-
if (!r) try {
|
|
381
|
-
r = t.getAttributeNode(e);
|
|
382
|
-
} catch {
|
|
383
|
-
r = null;
|
|
384
|
-
}
|
|
385
|
-
Te(n.removed, { attribute: r || null, from: t });
|
|
386
|
-
try {
|
|
387
|
-
r ? yt(t, r) : t.removeAttribute(e);
|
|
388
|
-
} catch {
|
|
389
|
-
try {
|
|
390
|
-
t.removeAttribute(e);
|
|
391
|
-
} catch {
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
if (e === "is") if (oe || we) try {
|
|
395
|
-
W(t);
|
|
396
|
-
} catch {
|
|
397
|
-
}
|
|
398
|
-
else try {
|
|
399
|
-
t.setAttribute(e, "");
|
|
400
|
-
} catch {
|
|
401
|
-
}
|
|
402
|
-
}, "_removeAttribute"), Hn = a(function(e) {
|
|
403
|
-
let t = Be(e);
|
|
404
|
-
if (t) for (let r = t.length - 1; r >= 0; --r) {
|
|
405
|
-
let s = t[r], u = s && s.name;
|
|
406
|
-
typeof u != "string" || b[A(u)] || Gt(e, s, u);
|
|
407
|
-
}
|
|
408
|
-
}, "_stripDisallowedAttributes"), Le = a(function(e) {
|
|
409
|
-
let t = [e];
|
|
410
|
-
for (; t.length > 0; ) {
|
|
411
|
-
let r = t.pop();
|
|
412
|
-
me(r) === L.element && Hn(r);
|
|
413
|
-
let s = J(r);
|
|
414
|
-
if (s) for (let u = s.length - 1; u >= 0; --u) t.push(s[u]);
|
|
415
|
-
}
|
|
416
|
-
}, "_neutralizeSubtree"), Bt = a(function(e, t) {
|
|
417
|
-
return $ ? e === "patchsrc" ? true : e === "for" && t !== "label" && t !== "output" : false;
|
|
418
|
-
}, "_isPatchLinkageAttribute"), Gn = a(function(e) {
|
|
419
|
-
if (!$) return;
|
|
420
|
-
let t = [e];
|
|
421
|
-
for (; t.length > 0; ) {
|
|
422
|
-
let r = t.pop(), s = me(r);
|
|
423
|
-
if (s === L.processingInstruction || s === L.comment && w(pn, r.data)) {
|
|
424
|
-
try {
|
|
425
|
-
Ge(r);
|
|
426
|
-
} catch {
|
|
427
|
-
}
|
|
428
|
-
continue;
|
|
429
|
-
}
|
|
430
|
-
if (s === L.element) {
|
|
431
|
-
let f = r, d = A(Ve(r));
|
|
432
|
-
try {
|
|
433
|
-
f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && Bt("for", d) && f.removeAttribute("for");
|
|
434
|
-
} catch {
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
let u = J(r);
|
|
438
|
-
if (u) for (let f = u.length - 1; f >= 0; --f) t.push(u[f]);
|
|
439
|
-
}
|
|
440
|
-
}, "_neutralizePatchLinkage"), Vt = a(function(e) {
|
|
441
|
-
let t = null, r = null;
|
|
442
|
-
if (Xe) e = "<remove></remove>" + e;
|
|
443
|
-
else {
|
|
444
|
-
let f = en(e, /^[\r\n\t ]+/);
|
|
445
|
-
r = f && f[0];
|
|
446
|
-
}
|
|
447
|
-
he === "application/xhtml+xml" && se === H && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
448
|
-
let s = I ? ne(e) : e;
|
|
449
|
-
if (se === H) try {
|
|
450
|
-
t = new F().parseFromString(s, he);
|
|
451
|
-
} catch {
|
|
452
|
-
}
|
|
453
|
-
if (!t || !t.documentElement) {
|
|
454
|
-
t = Ye.createDocument(se, "template", null);
|
|
455
|
-
try {
|
|
456
|
-
t.documentElement.innerHTML = Je ? q : s;
|
|
457
|
-
} catch {
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
let u = t.body || t.documentElement;
|
|
461
|
-
return e && r && u.insertBefore(l.createTextNode(r), u.childNodes[0] || null), se === H ? An.call(t, X ? "html" : "body")[0] : X ? t.documentElement : u;
|
|
462
|
-
}, "_initDocument"), Wt = a(function(e) {
|
|
463
|
-
let t = Se ? Se(e) : e.ownerDocument;
|
|
464
|
-
return _t.call(t || e, e, E.SHOW_ELEMENT | E.SHOW_COMMENT | E.SHOW_TEXT | E.SHOW_PROCESSING_INSTRUCTION | E.SHOW_CDATA_SECTION, null);
|
|
465
|
-
}, "_createNodeIterator"), Ne = a(function(e) {
|
|
466
|
-
return e = be(e, Rn, " "), e = be(e, On, " "), e = be(e, xn, " "), e;
|
|
467
|
-
}, "_stripTemplateExpressions"), rt = a(function(e) {
|
|
468
|
-
var t;
|
|
469
|
-
e.normalize();
|
|
470
|
-
let r = Se ? Se(e) : e.ownerDocument, s = _t.call(r || e, e, E.SHOW_TEXT | E.SHOW_COMMENT | E.SHOW_CDATA_SECTION | E.SHOW_PROCESSING_INSTRUCTION, null), u = s.nextNode();
|
|
471
|
-
for (; u; ) u.data = Ne(u.data), u = s.nextNode();
|
|
472
|
-
let f = (t = e.querySelectorAll) === null || t === void 0 ? void 0 : t.call(e, "template");
|
|
473
|
-
f && Q(f, (d) => {
|
|
474
|
-
le(d.content) && rt(d.content);
|
|
475
|
-
});
|
|
476
|
-
}, "_scrubTemplateExpressions"), Pe = a(function(e) {
|
|
477
|
-
let t = te ? te(e) : null;
|
|
478
|
-
return typeof t != "string" || A(t) !== "form" ? false : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== Be(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== K(e) || e.childNodes !== J(e);
|
|
479
|
-
}, "_isClobbered"), le = a(function(e) {
|
|
480
|
-
if (!K || typeof e != "object" || e === null) return false;
|
|
481
|
-
try {
|
|
482
|
-
return K(e) === L.documentFragment;
|
|
483
|
-
} catch {
|
|
484
|
-
return false;
|
|
485
|
-
}
|
|
486
|
-
}, "_isDocumentFragment"), ye = a(function(e) {
|
|
487
|
-
if (!K || typeof e != "object" || e === null) return false;
|
|
488
|
-
try {
|
|
489
|
-
return typeof K(e) == "number";
|
|
490
|
-
} catch {
|
|
491
|
-
return false;
|
|
492
|
-
}
|
|
493
|
-
}, "_isNode");
|
|
494
|
-
function G(i, e, t) {
|
|
495
|
-
i.length !== 0 && Q(i, (r) => {
|
|
496
|
-
r.call(n, e, t, ae);
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
__name(G, "G");
|
|
500
|
-
a(G, "_executeHooks");
|
|
501
|
-
let Bn = a(function(e, t) {
|
|
502
|
-
return !!($ && e.hasChildNodes() && !ye(e.firstElementChild) && w(un, e.textContent) && w(un, e.innerHTML) || $ && e.namespaceURI === H && Co[t] && (ye(e.firstElementChild) || typeof e.textContent == "string" && w(Lo[t], e.textContent)) || e.nodeType === L.processingInstruction || $ && e.nodeType === L.comment && w(pn, e.data));
|
|
503
|
-
}, "_isUnsafeNode"), Me = a(function(e, t) {
|
|
504
|
-
if (e instanceof RegExp) return w(e, t);
|
|
505
|
-
if (e instanceof Function) {
|
|
506
|
-
for (var r = arguments.length, s = new Array(r > 2 ? r - 2 : 0), u = 2; u < r; u++) s[u - 2] = arguments[u];
|
|
507
|
-
return !!e(t, ...s);
|
|
508
|
-
}
|
|
509
|
-
return false;
|
|
510
|
-
}, "_matchesNameCheck"), Vn = a(function(e, t, r) {
|
|
511
|
-
if (!ge[t] && qt(t) && Me(z.tagNameCheck, t)) return false;
|
|
512
|
-
if (Ze && !ie[t]) {
|
|
513
|
-
let s = ee(e), u = J(e);
|
|
514
|
-
if (u && s) {
|
|
515
|
-
let f = u.length;
|
|
516
|
-
for (let d = f - 1; d >= 0; --d) {
|
|
517
|
-
let _ = e === r ? yn(u[d], true) : u[d];
|
|
518
|
-
s.insertBefore(_, Tn(e));
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
return W(e), true;
|
|
523
|
-
}, "_sanitizeDisallowedNode"), Yt = a(function(e, t, r, s) {
|
|
524
|
-
return e.length === 0 ? t : t === r || t === s ? N(t) : t;
|
|
525
|
-
}, "_forkSharedAllowlist"), ce = a(function(e, t) {
|
|
526
|
-
return e === t || ee(e) !== null ? false : (Qe && Le(e), true);
|
|
527
|
-
}, "_handleHookDetachedNode"), jt = a(function(e, t) {
|
|
528
|
-
if (G(y.beforeSanitizeElements, e, null), ce(e, t)) return true;
|
|
529
|
-
if (Pe(e)) return W(e), true;
|
|
530
|
-
let r = A(Ve(e));
|
|
531
|
-
if (T = Yt(y.uponSanitizeElement, T, je, Oe), G(y.uponSanitizeElement, e, { tagName: r, allowedTags: T }), ce(e, t)) return true;
|
|
532
|
-
if (Bn(e, r)) return W(e), true;
|
|
533
|
-
if (ge[r] || !(B.tagCheck instanceof Function && B.tagCheck(r)) && !T[r]) {
|
|
534
|
-
let s = Vn(e, r, t);
|
|
535
|
-
return s === false && (G(y.afterSanitizeElements, e, null), ce(e, t)) ? true : s;
|
|
536
|
-
}
|
|
537
|
-
if (me(e) === L.element && !zn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && w(Io, e.innerHTML)) return W(e), true;
|
|
538
|
-
if (V && e.nodeType === L.text) {
|
|
539
|
-
let s = Ne(e.textContent);
|
|
540
|
-
e.textContent !== s && (Te(n.removed, { element: e.cloneNode() }), e.textContent = s);
|
|
541
|
-
}
|
|
542
|
-
return G(y.afterSanitizeElements, e, null), ce(e, t);
|
|
543
|
-
}, "_sanitizeElements"), Kt = a(function(e, t, r) {
|
|
544
|
-
if (Rt[t] || Bt(t, e) || vt && (t === "id" || t === "name") && (r in l || r in Mn)) return false;
|
|
545
|
-
let s = b[t] || B.attributeCheck instanceof Function && B.attributeCheck(t, e);
|
|
546
|
-
return qe && w(wn, t) || Ot && w(vn, t) ? true : s ? Pt[t] || w(St, be(r, At, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && tn(r, "data:") === 0 && Lt[e] || xt && !w(In, be(r, At, "")) ? true : !r : qt(e) && Me(z.tagNameCheck, e) && Me(z.attributeNameCheck, t, e) || t === "is" && z.allowCustomizedBuiltInElements && Me(z.tagNameCheck, r);
|
|
547
|
-
}, "_isValidAttribute"), Wn = g({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qt = a(function(e) {
|
|
548
|
-
return !Wn[_e(e)] && w(Dn, e);
|
|
549
|
-
}, "_isBasicCustomElement"), Yn = a(function(e, t, r, s) {
|
|
550
|
-
if (I && typeof x == "object" && typeof x.getAttributeType == "function" && !r) switch (x.getAttributeType(e, t)) {
|
|
551
|
-
case "TrustedHTML":
|
|
552
|
-
return ne(s);
|
|
553
|
-
case "TrustedScriptURL":
|
|
554
|
-
return bn(s);
|
|
555
|
-
}
|
|
556
|
-
return s;
|
|
557
|
-
}, "_applyTrustedTypesToAttribute"), jn = a(function(e, t, r, s) {
|
|
558
|
-
try {
|
|
559
|
-
return r ? e.setAttributeNS(r, t, s) : e.setAttribute(t, s), Pe(e) ? (W(e), false) : true;
|
|
560
|
-
} catch {
|
|
561
|
-
return Z(t, e), false;
|
|
562
|
-
}
|
|
563
|
-
}, "_setAttributeValue"), $t = a(function(e, t) {
|
|
564
|
-
if (G(y.beforeSanitizeAttributes, e, null), ce(e, t)) return;
|
|
565
|
-
let r = e.attributes;
|
|
566
|
-
if (!r || Pe(e)) return;
|
|
567
|
-
b = Yt(y.uponSanitizeAttribute, b, Ke, xe);
|
|
568
|
-
let s = { attrName: "", attrValue: "", keepAttr: true, allowedAttributes: b, forceKeepAttr: void 0 }, u = r.length, f = A(e.nodeName);
|
|
569
|
-
for (; u--; ) {
|
|
570
|
-
let d = r[u], _ = d.name, P = d.namespaceURI, C = d.value, ue = A(_), st = C, v = _ === "value" ? st : uo(st), Xt = false;
|
|
571
|
-
if (s.attrName = ue, s.attrValue = v, s.keepAttr = true, s.forceKeepAttr = void 0, G(y.uponSanitizeAttribute, e, s), v = s.attrValue, It && (ue === "id" || ue === "name") && tn(v, Dt) !== 0 && (Z(_, e, d), v = Dt + v, Xt = true), $ && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, v)) {
|
|
572
|
-
Z(_, e, d);
|
|
573
|
-
continue;
|
|
574
|
-
}
|
|
575
|
-
if (ue === "attributename" && en(v, "href")) {
|
|
576
|
-
Z(_, e, d);
|
|
577
|
-
continue;
|
|
578
|
-
}
|
|
579
|
-
if (!s.forceKeepAttr) {
|
|
580
|
-
if (!s.keepAttr) {
|
|
581
|
-
Z(_, e, d);
|
|
582
|
-
continue;
|
|
583
|
-
}
|
|
584
|
-
if (!wt && w(Do, v)) {
|
|
585
|
-
Z(_, e, d);
|
|
586
|
-
continue;
|
|
587
|
-
}
|
|
588
|
-
if (V && (v = Ne(v)), !Kt(f, ue, v)) {
|
|
589
|
-
Z(_, e, d);
|
|
590
|
-
continue;
|
|
591
|
-
}
|
|
592
|
-
v = Yn(f, ue, P, v), v !== st && jn(e, _, P, v) && Xt && Jt(n.removed);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
G(y.afterSanitizeAttributes, e, null), ce(e, t);
|
|
596
|
-
}, "_sanitizeAttributes"), ke = a(function(e) {
|
|
597
|
-
let t = null, r = Wt(e);
|
|
598
|
-
for (G(y.beforeSanitizeShadowDOM, e, null); t = r.nextNode(); ) if (G(y.uponSanitizeShadowNode, t, null), jt(t, e), $t(t, e), le(t.content) && ke(t.content), me(t) === L.element) {
|
|
599
|
-
let s = Tt(t);
|
|
600
|
-
le(s) && (it(s), ke(s));
|
|
601
|
-
}
|
|
602
|
-
G(y.afterSanitizeShadowDOM, e, null);
|
|
603
|
-
}, "_sanitizeShadowDOM"), it = a(function(e) {
|
|
604
|
-
let t = [{ node: e, shadow: null }];
|
|
605
|
-
for (; t.length > 0; ) {
|
|
606
|
-
let r = t.pop();
|
|
607
|
-
if (r.shadow) {
|
|
608
|
-
ke(r.shadow);
|
|
609
|
-
continue;
|
|
610
|
-
}
|
|
611
|
-
let s = r.node, u = me(s) === L.element, f = J(s);
|
|
612
|
-
if (f) for (let d = f.length - 1; d >= 0; --d) t.push({ node: f[d], shadow: null });
|
|
613
|
-
if (u) {
|
|
614
|
-
let d = te ? te(s) : null;
|
|
615
|
-
if (typeof d == "string" && A(d) === "template") {
|
|
616
|
-
let _ = s.content;
|
|
617
|
-
le(_) && t.push({ node: _, shadow: null });
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
if (u) {
|
|
621
|
-
let d = Tt(s);
|
|
622
|
-
le(d) && t.push({ node: null, shadow: d }, { node: d, shadow: null });
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}, "_sanitizeAttachedShadowRoots");
|
|
626
|
-
return n.sanitize = function(i) {
|
|
627
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, r = null, s = null, u = null;
|
|
628
|
-
if (Je = !i, Je && (i = "<!-->"), typeof i != "string" && !ye(i) && (i = ho(i), typeof i != "string")) throw Y("dirty is not a string, aborting");
|
|
629
|
-
if (!n.isSupported) return i;
|
|
630
|
-
$e ? (T = Oe, b = xe) : ot(e), (y.uponSanitizeElement.length > 0 || y.uponSanitizeAttribute.length > 0) && (T = N(T)), y.uponSanitizeAttribute.length > 0 && (b = N(b)), n.removed = [];
|
|
631
|
-
let f = Qe && typeof i != "string" && ye(i);
|
|
632
|
-
if (f) {
|
|
633
|
-
Gn(i);
|
|
634
|
-
let P = Ve(i);
|
|
635
|
-
if (typeof P == "string") {
|
|
636
|
-
let C = A(P);
|
|
637
|
-
if (!T[C] || ge[C]) throw Ce(i), Y("root node is forbidden and cannot be sanitized in-place");
|
|
638
|
-
}
|
|
639
|
-
if (Pe(i)) throw Ce(i), Y("root node is clobbered and cannot be sanitized in-place");
|
|
640
|
-
try {
|
|
641
|
-
it(i);
|
|
642
|
-
} catch (C) {
|
|
643
|
-
throw Ce(i), C;
|
|
644
|
-
}
|
|
645
|
-
} else if (ye(i)) t = Vt("<!---->"), r = t.ownerDocument.importNode(i, true), r.nodeType === L.element && r.nodeName === "BODY" || r.nodeName === "HTML" ? t = r : t.appendChild(r), it(t);
|
|
646
|
-
else {
|
|
647
|
-
if (!oe && !V && !X && i.indexOf("<") === -1) return I && ve ? ne(i) : i;
|
|
648
|
-
if (t = Vt(i), !t) return oe ? null : ve ? q : "";
|
|
649
|
-
}
|
|
650
|
-
t && Xe && W(t.firstChild);
|
|
651
|
-
let d = f ? i : t;
|
|
652
|
-
try {
|
|
653
|
-
let P = Wt(d);
|
|
654
|
-
for (; s = P.nextNode(); ) jt(s, d), $t(s, d), le(s.content) && ke(s.content);
|
|
655
|
-
} catch (P) {
|
|
656
|
-
throw f && (Ce(i), Q(n.removed, (C) => {
|
|
657
|
-
C.element && Le(C.element);
|
|
658
|
-
})), P;
|
|
659
|
-
}
|
|
660
|
-
if (f) {
|
|
661
|
-
let P = false;
|
|
662
|
-
if (Q(n.removed, (C) => {
|
|
663
|
-
C.element && (C.element === i && (P = true), Le(C.element));
|
|
664
|
-
}), P) throw Y("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
665
|
-
return V && rt(i), i;
|
|
666
|
-
}
|
|
667
|
-
if (oe) {
|
|
668
|
-
if (V && rt(t), we) for (u = _n.call(t.ownerDocument); t.firstChild; ) u.appendChild(t.firstChild);
|
|
669
|
-
else u = t;
|
|
670
|
-
return (b.shadowroot || b.shadowrootmode) && (u = Sn.call(c, u, true)), u;
|
|
671
|
-
}
|
|
672
|
-
let _ = X ? t.outerHTML : t.innerHTML;
|
|
673
|
-
return X && T["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && w(wo, t.ownerDocument.doctype.name) && (_ = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
674
|
-
` + _), V && (_ = Ne(_)), I && ve ? ne(_) : _;
|
|
675
|
-
}, n.setConfig = function() {
|
|
676
|
-
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
677
|
-
ot(i), $e = true, Oe = T, xe = b;
|
|
678
|
-
}, n.clearConfig = function() {
|
|
679
|
-
ae = null, $e = false, Oe = null, xe = null, I = We, q = "";
|
|
680
|
-
}, n.isValidAttribute = function(i, e, t) {
|
|
681
|
-
ae || ot({});
|
|
682
|
-
let r = A(i), s = A(e);
|
|
683
|
-
return Kt(r, s, t);
|
|
684
|
-
}, n.addHook = function(i, e) {
|
|
685
|
-
typeof e == "function" && D(y, i) && Te(y[i], e);
|
|
686
|
-
}, n.removeHook = function(i, e) {
|
|
687
|
-
if (D(y, i)) {
|
|
688
|
-
if (e !== void 0) {
|
|
689
|
-
let t = lo(y[i], e);
|
|
690
|
-
return t === -1 ? void 0 : co(y[i], t, 1)[0];
|
|
691
|
-
}
|
|
692
|
-
return Jt(y[i]);
|
|
693
|
-
}
|
|
694
|
-
}, n.removeHooks = function(i) {
|
|
695
|
-
D(y, i) && (y[i] = []);
|
|
696
|
-
}, n.removeAllHooks = function() {
|
|
697
|
-
y = fn();
|
|
698
|
-
}, n;
|
|
699
|
-
}
|
|
700
|
-
__name(hn, "hn");
|
|
701
|
-
a(hn, "createDOMPurify");
|
|
702
|
-
var gt = hn();
|
|
703
|
-
var He = class extends Error {
|
|
704
|
-
static {
|
|
705
|
-
__name(this, "He");
|
|
706
|
-
}
|
|
707
|
-
static {
|
|
708
|
-
a(this, "ApiError");
|
|
709
|
-
}
|
|
710
|
-
get status() {
|
|
711
|
-
return this.cause?.response.status;
|
|
712
|
-
}
|
|
713
|
-
get response() {
|
|
714
|
-
return this.cause?.response;
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
He.prototype.name = "ApiError";
|
|
718
|
-
var Mo = ["load", "cross-origin", "file-protocol", "save", "conflict", "no-saver", "render"], Ae = class o extends Error {
|
|
719
|
-
static {
|
|
720
|
-
__name(this, "o");
|
|
721
|
-
}
|
|
722
|
-
static {
|
|
723
|
-
a(this, "SourceError");
|
|
724
|
-
}
|
|
725
|
-
get kind() {
|
|
726
|
-
return this.cause?.kind;
|
|
727
|
-
}
|
|
728
|
-
get status() {
|
|
729
|
-
return this.cause?.status;
|
|
730
|
-
}
|
|
731
|
-
static kindFor(n, l) {
|
|
732
|
-
return n instanceof o && n.kind || l;
|
|
733
|
-
}
|
|
734
|
-
static isKind(n) {
|
|
735
|
-
return Mo.includes(n);
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
Ae.prototype.name = "SourceError";
|
|
739
|
-
var ht = class o {
|
|
740
|
-
static {
|
|
741
|
-
__name(this, "o");
|
|
742
|
-
}
|
|
743
|
-
static {
|
|
744
|
-
a(this, "MarkdownSanitizer");
|
|
745
|
-
}
|
|
746
|
-
static instance = new o();
|
|
747
|
-
sanitize(n, { uiTags: l = false } = {}) {
|
|
748
|
-
if (!gt.isSupported) throw new Ae("MarkdownSanitizer.sanitize(): DOMPurify can't sanitize in this browser; use a newer one", { cause: { kind: "render" } });
|
|
749
|
-
return gt.sanitize(n, { RETURN_DOM_FRAGMENT: true, SANITIZE_DOM: false, ...l && { CUSTOM_ELEMENT_HANDLING: { tagNameCheck: ko, attributeNameCheck: a((c) => !Uo.test(c), "attributeNameCheck"), allowCustomizedBuiltInElements: false } } });
|
|
750
|
-
}
|
|
751
|
-
}, ko = /^ui-[a-z-]+$/, Uo = /^on/i;
|
|
752
|
-
return Qn(Fo);
|
|
753
|
-
})();
|
|
1
|
+
"use strict";var __spellMarkdownSanitizer=(()=>{var Ue=Object.defineProperty;var Kn=Object.getOwnPropertyDescriptor;var qn=Object.getOwnPropertyNames;var $n=Object.prototype.hasOwnProperty;var a=(o,n)=>Ue(o,"name",{value:n,configurable:!0});var Xn=(o,n)=>{for(var l in n)Ue(o,l,{get:n[l],enumerable:!0})},Zn=(o,n,l,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of qn(n))!$n.call(o,p)&&p!==l&&Ue(o,p,{get:()=>n[p],enumerable:!(c=Kn(n,p))||c.enumerable});return o};var Qn=o=>Zn(Ue({},"__esModule",{value:!0}),o);var Fo={};Xn(Fo,{MarkdownSanitizer:()=>ht});function Jn(o,n){this.v=o,this.k=n}a(Jn,"_OverloadYield");function Zt(o,n){(n==null||n>o.length)&&(n=o.length);for(var l=0,c=Array(n);l<n;l++)c[l]=o[l];return c}a(Zt,"_arrayLikeToArray");function eo(o){if(Array.isArray(o))return o}a(eo,"_arrayWithHoles");function to(o,n){var l=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(l!=null){var c,p,m,h,U=[],E=!0,F=!1;try{if(m=(l=l.call(o)).next,n===0){if(Object(l)!==l)return;E=!1}else for(;!(E=(c=m.call(l)).done)&&(U.push(c.value),U.length!==n);E=!0);}catch(x){F=!0,p=x}finally{try{if(!E&&l.return!=null&&(h=l.return(),Object(h)!==h))return}finally{if(F)throw p}}return U}}a(to,"_iterableToArrayLimit");function no(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}a(no,"_nonIterableRest");function oo(o,n){return eo(o)||to(o,n)||ro(o,n)||no()}a(oo,"_slicedToArray");function ro(o,n){if(o){if(typeof o=="string")return Zt(o,n);var l={}.toString.call(o).slice(8,-1);return l==="Object"&&o.constructor&&(l=o.constructor.name),l==="Map"||l==="Set"?Array.from(o):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Zt(o,n):void 0}}a(ro,"_unsupportedIterableToArray");function Fe(o){var n,l;function c(m,h){try{var U=o[m](h),E=U.value,F=E instanceof Jn;Promise.resolve(F?E.v:E).then(function(x){if(F){var k=m==="return"&&E.k?m:"next";if(!E.k||x.done)return c(k,x);x=o[k](x).value}p(!!U.done,x)},function(x){c("throw",x)})}catch(x){p(2,x)}}a(c,"resume");function p(m,h){m===2?n.reject(h):n.resolve({value:h,done:m}),(n=n.next)?c(n.key,n.arg):l=null}a(p,"settle"),this._invoke=function(m,h){return new Promise(function(U,E){var F={key:m,arg:h,resolve:U,reject:E,next:null};l?l=l.next=F:(n=l=F,c(m,h))})},typeof o.return!="function"&&(this.return=void 0)}a(Fe,"AsyncGenerator");Fe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Fe.prototype.next=function(o){return this._invoke("next",o)},Fe.prototype.throw=function(o){return this._invoke("throw",o)},Fe.prototype.return=function(o){return this._invoke("return",o)};var mn=Object.entries,Qt=Object.setPrototypeOf,io=Object.isFrozen,so=Object.getPrototypeOf,ao=Object.getOwnPropertyDescriptor,R=Object.freeze,O=Object.seal,pe=Object.create,dn=typeof Reflect<"u"&&Reflect,mt=dn.apply,dt=dn.construct;R||(R=a(function(n){return n},"freeze"));O||(O=a(function(n){return n},"seal"));mt||(mt=a(function(n,l){for(var c=arguments.length,p=new Array(c>2?c-2:0),m=2;m<c;m++)p[m-2]=arguments[m];return n.apply(l,p)},"apply"));dt||(dt=a(function(n){for(var l=arguments.length,c=new Array(l>1?l-1:0),p=1;p<l;p++)c[p-1]=arguments[p];return new n(...c)},"construct"));var Q=S(Array.prototype.forEach);Array.prototype.indexOf;var lo=S(Array.prototype.lastIndexOf),Jt=S(Array.prototype.pop),Te=S(Array.prototype.push);Array.prototype.slice;var co=S(Array.prototype.splice),fe=Array.isArray,_e=S(String.prototype.toLowerCase),at=S(String.prototype.toString),en=S(String.prototype.match),be=S(String.prototype.replace),tn=S(String.prototype.indexOf),uo=S(String.prototype.trim),po=S(Number.prototype.toString),fo=S(Boolean.prototype.toString),nn=typeof BigInt>"u"?null:S(BigInt.prototype.toString),on=typeof Symbol>"u"?null:S(Symbol.prototype.toString),D=S(Object.prototype.hasOwnProperty),Ee=S(Object.prototype.toString),w=S(RegExp.prototype.test),Y=mo(TypeError);function S(o){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var l=arguments.length,c=new Array(l>1?l-1:0),p=1;p<l;p++)c[p-1]=arguments[p];return mt(o,n,c)}}a(S,"unapply");function mo(o){return function(){for(var n=arguments.length,l=new Array(n),c=0;c<n;c++)l[c]=arguments[c];return dt(o,l)}}a(mo,"unconstruct");function g(o,n){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_e;if(Qt&&Qt(o,null),!fe(n))return o;let c=n.length;for(;c--;){let p=n[c];if(typeof p=="string"){let m=l(p);m!==p&&(io(n)||(n[c]=m),p=m)}o[p]=!0}return o}a(g,"addToSet");function go(o){for(let n=0;n<o.length;n++)D(o,n)||(o[n]=null);return o}a(go,"cleanArray");function N(o){let n=pe(null);for(let c of mn(o)){var l=oo(c,2);let p=l[0],m=l[1];D(o,p)&&(fe(m)?n[p]=go(m):m&&typeof m=="object"&&m.constructor===Object?n[p]=N(m):n[p]=m)}return n}a(N,"clone");function ho(o){switch(typeof o){case"string":return o;case"number":return po(o);case"boolean":return fo(o);case"bigint":return nn?nn(o):"0";case"symbol":return on?on(o):"Symbol()";case"undefined":return Ee(o);case"function":case"object":{if(o===null)return Ee(o);let n=o,l=M(n,"toString");if(typeof l=="function"){let c=l(n);return typeof c=="string"?c:Ee(c)}return Ee(o)}default:return Ee(o)}}a(ho,"stringifyValue");function M(o,n){for(;o!==null;){let c=ao(o,n);if(c){if(c.get)return S(c.get);if(typeof c.value=="function")return S(c.value)}o=so(o)}function l(){return null}return a(l,"fallbackValue"),l}a(M,"lookupGetter");function yo(o){try{return w(o,""),!0}catch{return!1}}a(yo,"isRegex");var rn=R(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lt=R(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ct=R(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),To=R(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ut=R(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bo=R(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),sn=R(["#text"]),an=R(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pt=R(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ln=R(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ze=R(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Eo=O(/{{[\w\W]*|^[\w\W]*}}/g),_o=O(/<%[\w\W]*|^[\w\W]*%>/g),Ao=O(/\${[\w\W]*/g),So=O(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ro=O(/^aria-[\-\w]+$/),cn=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oo=O(/^(?:\w+script|data):/i),xo=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wo=O(/^html$/i),vo=O(/^[a-z][.\w]*(-[.\w]+)+$/i),un=O(/<[/\w!]/g),pn=O(/<[/\w]/g),Io=O(/<\/no(script|embed|frames)/i),Do=O(/\/>/i),L={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},gn=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Co=R(g({},gn)),Lo=(function(){let o={};return Q(gn,n=>{o[n]=O(new RegExp("</"+n+"(?=[\\t\\n\\f\\r />])","i"))}),R(o)})(),No=a(function(){return typeof window>"u"?null:window},"getGlobal"),Po=a(function(n,l){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let c=null,p="data-tt-policy-suffix";l&&l.hasAttribute(p)&&(c=l.getAttribute(p));let m="dompurify"+(c?"#"+c:"");try{return n.createPolicy(m,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},"_createTrustedTypesPolicy"),fn=a(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),j=a(function(n,l,c,p){return D(n,l)&&fe(n[l])?g(p.base?N(p.base):{},n[l],p.transform):c},"_resolveSetOption"),ft=a(function(n,l,c){let p=D(n,l)?n[l]:void 0;return p&&typeof p=="object"?N(p):c()},"_resolveObjectOption");function hn(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:No(),n=a(i=>hn(i),"DOMPurify");if(n.version="3.4.16",n.removed=[],!o||!o.document||o.document.nodeType!==L.document||!o.Element)return n.isSupported=!1,n;let l=o.document,c=l,p=c.currentScript;o.DocumentFragment;let m=o.HTMLTemplateElement,h=o.Node,U=o.Element,E=o.NodeFilter;o.NamedNodeMap===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;let F=o.DOMParser,x=o.trustedTypes,k=U.prototype,yn=M(k,"cloneNode"),Ge=M(k,"remove"),yt=M(k,"removeAttributeNode"),Tn=M(k,"nextSibling"),J=M(k,"childNodes"),ee=M(k,"parentNode"),Tt=M(k,"shadowRoot"),Be=M(k,"attributes"),K=h&&h.prototype?M(h.prototype,"nodeType"):null,te=h&&h.prototype?M(h.prototype,"nodeName"):null,Se=h&&h.prototype?M(h.prototype,"ownerDocument"):null,me=a(function(e){return K?K(e):e.nodeType},"_readNodeType"),Ve=a(function(e){return te?te(e):e.nodeName},"_readNodeName");if(typeof m=="function"){let i=l.createElement("template");i.content&&i.content.ownerDocument&&(l=i.content.ownerDocument)}let I,q="",We,bt=!1,de=0,Et=a(function(){if(de>0)throw Y('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},"_assertNotInTrustedTypesPolicy"),ne=a(function(e){Et(),de++;try{return I.createHTML(e)}finally{de--}},"_createTrustedHTML"),bn=a(function(e){Et(),de++;try{return I.createScriptURL(e)}finally{de--}},"_createTrustedScriptURL"),En=a(function(){return bt||(We=Po(x,p),bt=!0),We},"_getDefaultTrustedTypesPolicy"),Re=l,Ye=Re.implementation,_t=Re.createNodeIterator,_n=Re.createDocumentFragment,An=Re.getElementsByTagName,Sn=c.importNode,y=fn();n.isSupported=typeof mn=="function"&&typeof ee=="function"&&Ye&&Ye.createHTMLDocument!==void 0;let Rn=Eo,On=_o,xn=Ao,wn=So,vn=Ro,In=Oo,At=xo,Dn=vo,St=cn,T=null,je=g({},[...rn,...lt,...ct,...ut,...sn]),b=null,Ke=g({},[...an,...pt,...ln,...ze]),z=Object.seal(pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,Rt=null,B=Object.seal(pe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ot=!0,qe=!0,xt=!1,wt=!0,V=!1,$=!0,X=!1,$e=!1,Oe=null,xe=null,Xe=!1,oe=!1,we=!1,ve=!1,vt=!0,It=!1,Dt="user-content-",Ze=!0,Qe=!1,re={},ie=null,Ct=g({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Lt=null,Nt=g({},["audio","video","img","source","image","track"]),Pt=null,Mt=g({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ie="http://www.w3.org/1998/Math/MathML",De="http://www.w3.org/2000/svg",H="http://www.w3.org/1999/xhtml",se=H,Je=!1,et=null,Cn=g({},[Ie,De,H],at),kt=R(["mi","mo","mn","ms","mtext"]),tt=g({},kt),Ut=R(["annotation-xml"]),nt=g({},Ut),Ln=g({},["title","style","font","a","script"]),he=null,Nn=["application/xhtml+xml","text/html"],Pn="text/html",A=null,ae=null,Mn=l.createElement("form"),Ft=a(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),ot=a(function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ae&&ae===e)return;(!e||typeof e!="object")&&(e={}),e=N(e),he=Nn.indexOf(e.PARSER_MEDIA_TYPE)===-1?Pn:e.PARSER_MEDIA_TYPE,A=he==="application/xhtml+xml"?at:_e,T=j(e,"ALLOWED_TAGS",je,{transform:A}),b=j(e,"ALLOWED_ATTR",Ke,{transform:A}),et=j(e,"ALLOWED_NAMESPACES",Cn,{transform:at}),Pt=j(e,"ADD_URI_SAFE_ATTR",Mt,{transform:A,base:Mt}),Lt=j(e,"ADD_DATA_URI_TAGS",Nt,{transform:A,base:Nt}),ie=j(e,"FORBID_CONTENTS",Ct,{transform:A}),ge=j(e,"FORBID_TAGS",N({}),{transform:A}),Rt=j(e,"FORBID_ATTR",N({}),{transform:A}),re=D(e,"USE_PROFILES")?e.USE_PROFILES&&typeof e.USE_PROFILES=="object"?N(e.USE_PROFILES):e.USE_PROFILES:!1,Ot=e.ALLOW_ARIA_ATTR!==!1,qe=e.ALLOW_DATA_ATTR!==!1,xt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,wt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,$=e.SAFE_FOR_XML!==!1,X=e.WHOLE_DOCUMENT||!1,oe=e.RETURN_DOM||!1,we=e.RETURN_DOM_FRAGMENT||!1,ve=e.RETURN_TRUSTED_TYPE||!1,Xe=e.FORCE_BODY||!1,vt=e.SANITIZE_DOM!==!1,It=e.SANITIZE_NAMED_PROPS||!1,Ze=e.KEEP_CONTENT!==!1,Qe=e.IN_PLACE||!1,St=yo(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:cn,se=typeof e.NAMESPACE=="string"?e.NAMESPACE:H,tt=ft(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>g({},kt)),nt=ft(e,"HTML_INTEGRATION_POINTS",()=>g({},Ut));let t=ft(e,"CUSTOM_ELEMENT_HANDLING",()=>pe(null));if(z=pe(null),D(t,"tagNameCheck")&&Ft(t.tagNameCheck)&&(z.tagNameCheck=t.tagNameCheck),D(t,"attributeNameCheck")&&Ft(t.attributeNameCheck)&&(z.attributeNameCheck=t.attributeNameCheck),D(t,"allowCustomizedBuiltInElements")&&typeof t.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),O(z),V&&(qe=!1),we&&(oe=!0),re&&(T=g({},sn),b=pe(null),re.html===!0&&(g(T,rn),g(b,an)),re.svg===!0&&(g(T,lt),g(b,pt),g(b,ze)),re.svgFilters===!0&&(g(T,ct),g(b,pt),g(b,ze)),re.mathMl===!0&&(g(T,ut),g(b,ln),g(b,ze))),B.tagCheck=null,B.attributeCheck=null,D(e,"ADD_TAGS")&&(typeof e.ADD_TAGS=="function"?B.tagCheck=e.ADD_TAGS:fe(e.ADD_TAGS)&&(T===je&&(T=N(T)),g(T,e.ADD_TAGS,A))),D(e,"ADD_ATTR")&&(typeof e.ADD_ATTR=="function"?B.attributeCheck=e.ADD_ATTR:fe(e.ADD_ATTR)&&(b===Ke&&(b=N(b)),g(b,e.ADD_ATTR,A))),D(e,"ADD_FORBID_CONTENTS")&&fe(e.ADD_FORBID_CONTENTS)&&(ie===Ct&&(ie=N(ie)),g(ie,e.ADD_FORBID_CONTENTS,A)),Ze&&(T["#text"]=!0),X&&g(T,["html","head","body"]),T.table&&(g(T,["tbody"]),delete ge.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let r=I;I=e.TRUSTED_TYPES_POLICY;try{q=ne("")}catch(s){throw I=r,s}}else e.TRUSTED_TYPES_POLICY===null?(I=void 0,q=""):(I===void 0&&(I=En()),I&&typeof q=="string"&&(q=ne("")));R&&R(e),ae=e},"_parseConfig"),zt=g({},[...lt,...ct,...To]),Ht=g({},[...ut,...bo]),kn=a(function(e,t,r){return t.namespaceURI===H?e==="svg":t.namespaceURI===Ie?e==="svg"&&(r==="annotation-xml"||tt[r]):!!zt[e]},"_checkSvgNamespace"),Un=a(function(e,t,r){return t.namespaceURI===H?e==="math":t.namespaceURI===De?e==="math"&&nt[r]:!!Ht[e]},"_checkMathMlNamespace"),Fn=a(function(e,t,r){return t.namespaceURI===De&&!nt[r]||t.namespaceURI===Ie&&!tt[r]?!1:!Ht[e]&&(Ln[e]||!zt[e])},"_checkHtmlNamespace"),zn=a(function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:se,tagName:"template"});let r=_e(e.tagName),s=_e(t.tagName);return et[e.namespaceURI]?e.namespaceURI===De?kn(r,t,s):e.namespaceURI===Ie?Un(r,t,s):e.namespaceURI===H?Fn(r,t,s):!!(he==="application/xhtml+xml"&&et[e.namespaceURI]):!1},"_checkValidNamespace"),W=a(function(e){Te(n.removed,{element:e});try{ee(e).removeChild(e)}catch{if(Ge(e),!ee(e))throw Y("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},"_forceRemove"),Gt=a(function(e,t,r){try{yt(e,t)}catch{try{e.removeAttribute(r)}catch{}}},"_stripAttributeNode"),Ce=a(function(e){Le(e);let t=J(e);if(t){let s=[];Q(t,u=>{Te(s,u)}),Q(s,u=>{try{Ge(u)}catch{}})}let r=Be(e);if(r)for(let s=r.length-1;s>=0;--s){let u=r[s],f=u&&u.name;typeof f=="string"&&Gt(e,u,f)}},"_neutralizeRoot"),Z=a(function(e,t,r){if(!r)try{r=t.getAttributeNode(e)}catch{r=null}Te(n.removed,{attribute:r||null,from:t});try{r?yt(t,r):t.removeAttribute(e)}catch{try{t.removeAttribute(e)}catch{}}if(e==="is")if(oe||we)try{W(t)}catch{}else try{t.setAttribute(e,"")}catch{}},"_removeAttribute"),Hn=a(function(e){let t=Be(e);if(t)for(let r=t.length-1;r>=0;--r){let s=t[r],u=s&&s.name;typeof u!="string"||b[A(u)]||Gt(e,s,u)}},"_stripDisallowedAttributes"),Le=a(function(e){let t=[e];for(;t.length>0;){let r=t.pop();me(r)===L.element&&Hn(r);let s=J(r);if(s)for(let u=s.length-1;u>=0;--u)t.push(s[u])}},"_neutralizeSubtree"),Bt=a(function(e,t){return $?e==="patchsrc"?!0:e==="for"&&t!=="label"&&t!=="output":!1},"_isPatchLinkageAttribute"),Gn=a(function(e){if(!$)return;let t=[e];for(;t.length>0;){let r=t.pop(),s=me(r);if(s===L.processingInstruction||s===L.comment&&w(pn,r.data)){try{Ge(r)}catch{}continue}if(s===L.element){let f=r,d=A(Ve(r));try{f.hasAttribute&&f.hasAttribute("patchsrc")&&f.removeAttribute("patchsrc"),f.hasAttribute&&f.hasAttribute("for")&&Bt("for",d)&&f.removeAttribute("for")}catch{}}let u=J(r);if(u)for(let f=u.length-1;f>=0;--f)t.push(u[f])}},"_neutralizePatchLinkage"),Vt=a(function(e){let t=null,r=null;if(Xe)e="<remove></remove>"+e;else{let f=en(e,/^[\r\n\t ]+/);r=f&&f[0]}he==="application/xhtml+xml"&&se===H&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let s=I?ne(e):e;if(se===H)try{t=new F().parseFromString(s,he)}catch{}if(!t||!t.documentElement){t=Ye.createDocument(se,"template",null);try{t.documentElement.innerHTML=Je?q:s}catch{}}let u=t.body||t.documentElement;return e&&r&&u.insertBefore(l.createTextNode(r),u.childNodes[0]||null),se===H?An.call(t,X?"html":"body")[0]:X?t.documentElement:u},"_initDocument"),Wt=a(function(e){let t=Se?Se(e):e.ownerDocument;return _t.call(t||e,e,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Ne=a(function(e){return e=be(e,Rn," "),e=be(e,On," "),e=be(e,xn," "),e},"_stripTemplateExpressions"),rt=a(function(e){var t;e.normalize();let r=Se?Se(e):e.ownerDocument,s=_t.call(r||e,e,E.SHOW_TEXT|E.SHOW_COMMENT|E.SHOW_CDATA_SECTION|E.SHOW_PROCESSING_INSTRUCTION,null),u=s.nextNode();for(;u;)u.data=Ne(u.data),u=s.nextNode();let f=(t=e.querySelectorAll)===null||t===void 0?void 0:t.call(e,"template");f&&Q(f,d=>{le(d.content)&&rt(d.content)})},"_scrubTemplateExpressions"),Pe=a(function(e){let t=te?te(e):null;return typeof t!="string"||A(t)!=="form"?!1:typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||e.attributes!==Be(e)||typeof e.removeAttribute!="function"||typeof e.removeAttributeNode!="function"||typeof e.getAttributeNode!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function"||e.nodeType!==K(e)||e.childNodes!==J(e)},"_isClobbered"),le=a(function(e){if(!K||typeof e!="object"||e===null)return!1;try{return K(e)===L.documentFragment}catch{return!1}},"_isDocumentFragment"),ye=a(function(e){if(!K||typeof e!="object"||e===null)return!1;try{return typeof K(e)=="number"}catch{return!1}},"_isNode");function G(i,e,t){i.length!==0&&Q(i,r=>{r.call(n,e,t,ae)})}a(G,"_executeHooks");let Bn=a(function(e,t){return!!($&&e.hasChildNodes()&&!ye(e.firstElementChild)&&w(un,e.textContent)&&w(un,e.innerHTML)||$&&e.namespaceURI===H&&Co[t]&&(ye(e.firstElementChild)||typeof e.textContent=="string"&&w(Lo[t],e.textContent))||e.nodeType===L.processingInstruction||$&&e.nodeType===L.comment&&w(pn,e.data))},"_isUnsafeNode"),Me=a(function(e,t){if(e instanceof RegExp)return w(e,t);if(e instanceof Function){for(var r=arguments.length,s=new Array(r>2?r-2:0),u=2;u<r;u++)s[u-2]=arguments[u];return!!e(t,...s)}return!1},"_matchesNameCheck"),Vn=a(function(e,t,r){if(!ge[t]&&qt(t)&&Me(z.tagNameCheck,t))return!1;if(Ze&&!ie[t]){let s=ee(e),u=J(e);if(u&&s){let f=u.length;for(let d=f-1;d>=0;--d){let _=e===r?yn(u[d],!0):u[d];s.insertBefore(_,Tn(e))}}}return W(e),!0},"_sanitizeDisallowedNode"),Yt=a(function(e,t,r,s){return e.length===0?t:t===r||t===s?N(t):t},"_forkSharedAllowlist"),ce=a(function(e,t){return e===t||ee(e)!==null?!1:(Qe&&Le(e),!0)},"_handleHookDetachedNode"),jt=a(function(e,t){if(G(y.beforeSanitizeElements,e,null),ce(e,t))return!0;if(Pe(e))return W(e),!0;let r=A(Ve(e));if(T=Yt(y.uponSanitizeElement,T,je,Oe),G(y.uponSanitizeElement,e,{tagName:r,allowedTags:T}),ce(e,t))return!0;if(Bn(e,r))return W(e),!0;if(ge[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!T[r]){let s=Vn(e,r,t);return s===!1&&(G(y.afterSanitizeElements,e,null),ce(e,t))?!0:s}if(me(e)===L.element&&!zn(e)||(r==="noscript"||r==="noembed"||r==="noframes")&&w(Io,e.innerHTML))return W(e),!0;if(V&&e.nodeType===L.text){let s=Ne(e.textContent);e.textContent!==s&&(Te(n.removed,{element:e.cloneNode()}),e.textContent=s)}return G(y.afterSanitizeElements,e,null),ce(e,t)},"_sanitizeElements"),Kt=a(function(e,t,r){if(Rt[t]||Bt(t,e)||vt&&(t==="id"||t==="name")&&(r in l||r in Mn))return!1;let s=b[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);return qe&&w(wn,t)||Ot&&w(vn,t)?!0:s?Pt[t]||w(St,be(r,At,""))||(t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&tn(r,"data:")===0&&Lt[e]||xt&&!w(In,be(r,At,""))?!0:!r:qt(e)&&Me(z.tagNameCheck,e)&&Me(z.attributeNameCheck,t,e)||t==="is"&&z.allowCustomizedBuiltInElements&&Me(z.tagNameCheck,r)},"_isValidAttribute"),Wn=g({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),qt=a(function(e){return!Wn[_e(e)]&&w(Dn,e)},"_isBasicCustomElement"),Yn=a(function(e,t,r,s){if(I&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!r)switch(x.getAttributeType(e,t)){case"TrustedHTML":return ne(s);case"TrustedScriptURL":return bn(s)}return s},"_applyTrustedTypesToAttribute"),jn=a(function(e,t,r,s){try{return r?e.setAttributeNS(r,t,s):e.setAttribute(t,s),Pe(e)?(W(e),!1):!0}catch{return Z(t,e),!1}},"_setAttributeValue"),$t=a(function(e,t){if(G(y.beforeSanitizeAttributes,e,null),ce(e,t))return;let r=e.attributes;if(!r||Pe(e))return;b=Yt(y.uponSanitizeAttribute,b,Ke,xe);let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:b,forceKeepAttr:void 0},u=r.length,f=A(e.nodeName);for(;u--;){let d=r[u],_=d.name,P=d.namespaceURI,C=d.value,ue=A(_),st=C,v=_==="value"?st:uo(st),Xt=!1;if(s.attrName=ue,s.attrValue=v,s.keepAttr=!0,s.forceKeepAttr=void 0,G(y.uponSanitizeAttribute,e,s),v=s.attrValue,It&&(ue==="id"||ue==="name")&&tn(v,Dt)!==0&&(Z(_,e,d),v=Dt+v,Xt=!0),$&&w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,v)){Z(_,e,d);continue}if(ue==="attributename"&&en(v,"href")){Z(_,e,d);continue}if(!s.forceKeepAttr){if(!s.keepAttr){Z(_,e,d);continue}if(!wt&&w(Do,v)){Z(_,e,d);continue}if(V&&(v=Ne(v)),!Kt(f,ue,v)){Z(_,e,d);continue}v=Yn(f,ue,P,v),v!==st&&jn(e,_,P,v)&&Xt&&Jt(n.removed)}}G(y.afterSanitizeAttributes,e,null),ce(e,t)},"_sanitizeAttributes"),ke=a(function(e){let t=null,r=Wt(e);for(G(y.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)if(G(y.uponSanitizeShadowNode,t,null),jt(t,e),$t(t,e),le(t.content)&&ke(t.content),me(t)===L.element){let s=Tt(t);le(s)&&(it(s),ke(s))}G(y.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM"),it=a(function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let r=t.pop();if(r.shadow){ke(r.shadow);continue}let s=r.node,u=me(s)===L.element,f=J(s);if(f)for(let d=f.length-1;d>=0;--d)t.push({node:f[d],shadow:null});if(u){let d=te?te(s):null;if(typeof d=="string"&&A(d)==="template"){let _=s.content;le(_)&&t.push({node:_,shadow:null})}}if(u){let d=Tt(s);le(d)&&t.push({node:null,shadow:d},{node:d,shadow:null})}}},"_sanitizeAttachedShadowRoots");return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,r=null,s=null,u=null;if(Je=!i,Je&&(i="<!-->"),typeof i!="string"&&!ye(i)&&(i=ho(i),typeof i!="string"))throw Y("dirty is not a string, aborting");if(!n.isSupported)return i;$e?(T=Oe,b=xe):ot(e),(y.uponSanitizeElement.length>0||y.uponSanitizeAttribute.length>0)&&(T=N(T)),y.uponSanitizeAttribute.length>0&&(b=N(b)),n.removed=[];let f=Qe&&typeof i!="string"&&ye(i);if(f){Gn(i);let P=Ve(i);if(typeof P=="string"){let C=A(P);if(!T[C]||ge[C])throw Ce(i),Y("root node is forbidden and cannot be sanitized in-place")}if(Pe(i))throw Ce(i),Y("root node is clobbered and cannot be sanitized in-place");try{it(i)}catch(C){throw Ce(i),C}}else if(ye(i))t=Vt("<!---->"),r=t.ownerDocument.importNode(i,!0),r.nodeType===L.element&&r.nodeName==="BODY"||r.nodeName==="HTML"?t=r:t.appendChild(r),it(t);else{if(!oe&&!V&&!X&&i.indexOf("<")===-1)return I&&ve?ne(i):i;if(t=Vt(i),!t)return oe?null:ve?q:""}t&&Xe&&W(t.firstChild);let d=f?i:t;try{let P=Wt(d);for(;s=P.nextNode();)jt(s,d),$t(s,d),le(s.content)&&ke(s.content)}catch(P){throw f&&(Ce(i),Q(n.removed,C=>{C.element&&Le(C.element)})),P}if(f){let P=!1;if(Q(n.removed,C=>{C.element&&(C.element===i&&(P=!0),Le(C.element))}),P)throw Y("a node selected for removal could not be safely returned; refusing to sanitize in place");return V&&rt(i),i}if(oe){if(V&&rt(t),we)for(u=_n.call(t.ownerDocument);t.firstChild;)u.appendChild(t.firstChild);else u=t;return(b.shadowroot||b.shadowrootmode)&&(u=Sn.call(c,u,!0)),u}let _=X?t.outerHTML:t.innerHTML;return X&&T["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&w(wo,t.ownerDocument.doctype.name)&&(_="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
3
|
+
`+_),V&&(_=Ne(_)),I&&ve?ne(_):_},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ot(i),$e=!0,Oe=T,xe=b},n.clearConfig=function(){ae=null,$e=!1,Oe=null,xe=null,I=We,q=""},n.isValidAttribute=function(i,e,t){ae||ot({});let r=A(i),s=A(e);return Kt(r,s,t)},n.addHook=function(i,e){typeof e=="function"&&D(y,i)&&Te(y[i],e)},n.removeHook=function(i,e){if(D(y,i)){if(e!==void 0){let t=lo(y[i],e);return t===-1?void 0:co(y[i],t,1)[0]}return Jt(y[i])}},n.removeHooks=function(i){D(y,i)&&(y[i]=[])},n.removeAllHooks=function(){y=fn()},n}a(hn,"createDOMPurify");var gt=hn();var He=class extends Error{static{a(this,"ApiError")}get status(){return this.cause?.response.status}get response(){return this.cause?.response}};He.prototype.name="ApiError";var Mo=["load","cross-origin","file-protocol","save","conflict","no-saver","render"],Ae=class o extends Error{static{a(this,"SourceError")}get kind(){return this.cause?.kind}get status(){return this.cause?.status}static kindFor(n,l){return n instanceof o&&n.kind||l}static isKind(n){return Mo.includes(n)}};Ae.prototype.name="SourceError";var ht=class o{static{a(this,"MarkdownSanitizer")}static instance=new o;sanitize(n,{uiTags:l=!1}={}){if(!gt.isSupported)throw new Ae("MarkdownSanitizer.sanitize(): DOMPurify can't sanitize in this browser; use a newer one",{cause:{kind:"render"}});return gt.sanitize(n,{RETURN_DOM_FRAGMENT:!0,SANITIZE_DOM:!1,...l&&{CUSTOM_ELEMENT_HANDLING:{tagNameCheck:ko,attributeNameCheck:a(c=>!Uo.test(c),"attributeNameCheck"),allowCustomizedBuiltInElements:!1}}})}},ko=/^ui-[a-z-]+$/,Uo=/^on/i;return Qn(Fo);})();
|
|
754
4
|
/*! Bundled license information:
|
|
755
5
|
|
|
756
6
|
dompurify/dist/purify.es.mjs:
|