v-code-diff 0.3.12 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4337 @@
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".file{--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(27,31,36,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: -2px -2px 0 rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(27,31,36,.12), 0 8px 24px rgba(66,74,83,.12);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(27,31,36,.15);--color-btn-shadow: 0 1px 0 rgba(27,31,36,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(27,31,36,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(27,31,36,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-focus-bg: #f6f8fa;--color-btn-focus-border: rgba(27,31,36,.15);--color-btn-focus-shadow: 0 0 0 3px rgba(9,105,218,.3);--color-btn-shadow-active: inset 0 .15em .3em rgba(27,31,36,.15);--color-btn-shadow-input-focus: 0 0 0 .2em rgba(9,105,218,.3);--color-btn-counter-bg: rgba(27,31,36,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #2da44e;--color-btn-primary-border: rgba(27,31,36,.15);--color-btn-primary-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #2c974b;--color-btn-primary-hover-border: rgba(27,31,36,.15);--color-btn-primary-selected-bg: hsla(137,55%,36%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(27,31,36,.15);--color-btn-primary-focus-bg: #2da44e;--color-btn-primary-focus-border: rgba(27,31,36,.15);--color-btn-primary-focus-shadow: 0 0 0 3px rgba(45,164,78,.4);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(255,255,255,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(27,31,36,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(27,31,36,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-focus-border: rgba(27,31,36,.15);--color-btn-outline-focus-shadow: 0 0 0 3px rgba(5,80,174,.4);--color-btn-outline-counter-bg: rgba(9,105,218,.1);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(27,31,36,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(27,31,36,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(27,31,36,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-focus-border: rgba(27,31,36,.15);--color-btn-danger-focus-shadow: 0 0 0 3px rgba(164,14,38,.4);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #cf222e;--color-switch-track-bg: #eaeef2;--color-switch-track-border: #afb8c1;--color-switch-track-checked-bg: #ddf4ff;--color-switch-track-checked-hover-bg: #b6e3ff;--color-switch-track-checked-active-bg: #80ccff;--color-switch-track-checked-border: #54aeff;--color-switch-knob-checked-bg: #0969da;--color-switch-knob-checked-disabled-bg: #6e7781;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #6e7781;--color-fg-default: #24292f;--color-fg-muted: #57606a;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(27,31,36,.15);--color-shadow-small: 0 1px 0 rgba(27,31,36,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #2da44e;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #bf8700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #cf222e;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #2da44e;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #cf222e;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(27,31,36,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(27,31,36,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-primer-shadow-focus: 0 0 0 3px rgba(9,105,218,.3);--color-scale-black: #1b1f24;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view *{position:static}.code-diff-view .file{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:2px}.code-diff-view .file table{border-spacing:0}.code-diff-view .file .diff-table{width:100%}.code-diff-view .file .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .file .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .file .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .file .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .file .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .file .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .file .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .file .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .file .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .file .diff-table .blob-code-context,.code-diff-view .file .diff-table .blob-code-addition,.code-diff-view .file .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .file .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .file .file-diff-split{table-layout:fixed}.code-diff-view .file .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:gray}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import wn, { defineComponent as de, computed as Ee } from "vue";
3
+ wn.util.warn;
4
+ function Z() {
5
+ }
6
+ Z.prototype = {
7
+ diff: function(n, t) {
8
+ var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, c = s.callback;
9
+ typeof s == "function" && (c = s, s = {}), this.options = s;
10
+ var l = this;
11
+ function i(g) {
12
+ return c ? (setTimeout(function() {
13
+ c(void 0, g);
14
+ }, 0), !0) : g;
15
+ }
16
+ n = this.castInput(n), t = this.castInput(t), n = this.removeEmpty(this.tokenize(n)), t = this.removeEmpty(this.tokenize(t));
17
+ var r = t.length, a = n.length, o = 1, p = r + a;
18
+ s.maxEditLength && (p = Math.min(p, s.maxEditLength));
19
+ var _ = [{
20
+ newPos: -1,
21
+ components: []
22
+ }], f = this.extractCommon(_[0], t, n, 0);
23
+ if (_[0].newPos + 1 >= r && f + 1 >= a)
24
+ return i([{
25
+ value: this.join(t),
26
+ count: t.length
27
+ }]);
28
+ function N() {
29
+ for (var g = -1 * o; g <= o; g += 2) {
30
+ var A = void 0, S = _[g - 1], x = _[g + 1], y = (x ? x.newPos : 0) - g;
31
+ S && (_[g - 1] = void 0);
32
+ var M = S && S.newPos + 1 < r, L = x && 0 <= y && y < a;
33
+ if (!M && !L) {
34
+ _[g] = void 0;
35
+ continue;
36
+ }
37
+ if (!M || L && S.newPos < x.newPos ? (A = Rn(x), l.pushComponent(A.components, void 0, !0)) : (A = S, A.newPos++, l.pushComponent(A.components, !0, void 0)), y = l.extractCommon(A, t, n, g), A.newPos + 1 >= r && y + 1 >= a)
38
+ return i(Sn(l, A.components, t, n, l.useLongestToken));
39
+ _[g] = A;
40
+ }
41
+ o++;
42
+ }
43
+ if (c)
44
+ (function g() {
45
+ setTimeout(function() {
46
+ if (o > p)
47
+ return c();
48
+ N() || g();
49
+ }, 0);
50
+ })();
51
+ else
52
+ for (; o <= p; ) {
53
+ var h = N();
54
+ if (h)
55
+ return h;
56
+ }
57
+ },
58
+ pushComponent: function(n, t, s) {
59
+ var c = n[n.length - 1];
60
+ c && c.added === t && c.removed === s ? n[n.length - 1] = {
61
+ count: c.count + 1,
62
+ added: t,
63
+ removed: s
64
+ } : n.push({
65
+ count: 1,
66
+ added: t,
67
+ removed: s
68
+ });
69
+ },
70
+ extractCommon: function(n, t, s, c) {
71
+ for (var l = t.length, i = s.length, r = n.newPos, a = r - c, o = 0; r + 1 < l && a + 1 < i && this.equals(t[r + 1], s[a + 1]); )
72
+ r++, a++, o++;
73
+ return o && n.components.push({
74
+ count: o
75
+ }), n.newPos = r, a;
76
+ },
77
+ equals: function(n, t) {
78
+ return this.options.comparator ? this.options.comparator(n, t) : n === t || this.options.ignoreCase && n.toLowerCase() === t.toLowerCase();
79
+ },
80
+ removeEmpty: function(n) {
81
+ for (var t = [], s = 0; s < n.length; s++)
82
+ n[s] && t.push(n[s]);
83
+ return t;
84
+ },
85
+ castInput: function(n) {
86
+ return n;
87
+ },
88
+ tokenize: function(n) {
89
+ return n.split("");
90
+ },
91
+ join: function(n) {
92
+ return n.join("");
93
+ }
94
+ };
95
+ function Sn(e, n, t, s, c) {
96
+ for (var l = 0, i = n.length, r = 0, a = 0; l < i; l++) {
97
+ var o = n[l];
98
+ if (o.removed) {
99
+ if (o.value = e.join(s.slice(a, a + o.count)), a += o.count, l && n[l - 1].added) {
100
+ var _ = n[l - 1];
101
+ n[l - 1] = n[l], n[l] = _;
102
+ }
103
+ } else {
104
+ if (!o.added && c) {
105
+ var p = t.slice(r, r + o.count);
106
+ p = p.map(function(N, h) {
107
+ var g = s[a + h];
108
+ return g.length > N.length ? g : N;
109
+ }), o.value = e.join(p);
110
+ } else
111
+ o.value = e.join(t.slice(r, r + o.count));
112
+ r += o.count, o.added || (a += o.count);
113
+ }
114
+ }
115
+ var f = n[i - 1];
116
+ return i > 1 && typeof f.value == "string" && (f.added || f.removed) && e.equals("", f.value) && (n[i - 2].value += f.value, n.pop()), n;
117
+ }
118
+ function Rn(e) {
119
+ return {
120
+ newPos: e.newPos,
121
+ components: e.components.slice(0)
122
+ };
123
+ }
124
+ var Mn = new Z();
125
+ function On(e, n, t) {
126
+ return Mn.diff(e, n, t);
127
+ }
128
+ function xn(e, n) {
129
+ if (typeof e == "function")
130
+ n.callback = e;
131
+ else if (e)
132
+ for (var t in e)
133
+ e.hasOwnProperty(t) && (n[t] = e[t]);
134
+ return n;
135
+ }
136
+ var We = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Ve = /\S/, Ce = new Z();
137
+ Ce.equals = function(e, n) {
138
+ return this.options.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e === n || this.options.ignoreWhitespace && !Ve.test(e) && !Ve.test(n);
139
+ };
140
+ Ce.tokenize = function(e) {
141
+ for (var n = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), t = 0; t < n.length - 1; t++)
142
+ !n[t + 1] && n[t + 2] && We.test(n[t]) && We.test(n[t + 2]) && (n[t] += n[t + 2], n.splice(t + 1, 2), t--);
143
+ return n;
144
+ };
145
+ function Ln(e, n, t) {
146
+ return t = xn(t, {
147
+ ignoreWhitespace: !0
148
+ }), Ce.diff(e, n, t);
149
+ }
150
+ var Ie = new Z();
151
+ Ie.tokenize = function(e) {
152
+ var n = [], t = e.split(/(\n|\r\n)/);
153
+ t[t.length - 1] || t.pop();
154
+ for (var s = 0; s < t.length; s++) {
155
+ var c = t[s];
156
+ s % 2 && !this.options.newlineIsToken ? n[n.length - 1] += c : (this.options.ignoreWhitespace && (c = c.trim()), n.push(c));
157
+ }
158
+ return n;
159
+ };
160
+ function tn(e, n, t) {
161
+ return Ie.diff(e, n, t);
162
+ }
163
+ var Dn = new Z();
164
+ Dn.tokenize = function(e) {
165
+ return e.split(/(\S.+?[.!?])(?=\s+|$)/);
166
+ };
167
+ var Cn = new Z();
168
+ Cn.tokenize = function(e) {
169
+ return e.split(/([{}:;,]|\s+)/);
170
+ };
171
+ function Ne(e) {
172
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ne = function(n) {
173
+ return typeof n;
174
+ } : Ne = function(n) {
175
+ return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
176
+ }, Ne(e);
177
+ }
178
+ var In = Object.prototype.toString, ce = new Z();
179
+ ce.useLongestToken = !0;
180
+ ce.tokenize = Ie.tokenize;
181
+ ce.castInput = function(e) {
182
+ var n = this.options, t = n.undefinedReplacement, s = n.stringifyReplacer, c = s === void 0 ? function(l, i) {
183
+ return typeof i > "u" ? t : i;
184
+ } : s;
185
+ return typeof e == "string" ? e : JSON.stringify(Le(e, null, null, c), c, " ");
186
+ };
187
+ ce.equals = function(e, n) {
188
+ return Z.prototype.equals.call(ce, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"));
189
+ };
190
+ function Le(e, n, t, s, c) {
191
+ n = n || [], t = t || [], s && (e = s(c, e));
192
+ var l;
193
+ for (l = 0; l < n.length; l += 1)
194
+ if (n[l] === e)
195
+ return t[l];
196
+ var i;
197
+ if (In.call(e) === "[object Array]") {
198
+ for (n.push(e), i = new Array(e.length), t.push(i), l = 0; l < e.length; l += 1)
199
+ i[l] = Le(e[l], n, t, s, c);
200
+ return n.pop(), t.pop(), i;
201
+ }
202
+ if (e && e.toJSON && (e = e.toJSON()), Ne(e) === "object" && e !== null) {
203
+ n.push(e), i = {}, t.push(i);
204
+ var r = [], a;
205
+ for (a in e)
206
+ e.hasOwnProperty(a) && r.push(a);
207
+ for (r.sort(), l = 0; l < r.length; l += 1)
208
+ a = r[l], i[a] = Le(e[a], n, t, s, a);
209
+ n.pop(), t.pop();
210
+ } else
211
+ i = e;
212
+ return i;
213
+ }
214
+ var De = new Z();
215
+ De.tokenize = function(e) {
216
+ return e.slice();
217
+ };
218
+ De.join = De.removeEmpty = function(e) {
219
+ return e;
220
+ };
221
+ var ke = { exports: {} };
222
+ function Be(e) {
223
+ return e instanceof Map ? e.clear = e.delete = e.set = function() {
224
+ throw new Error("map is read-only");
225
+ } : e instanceof Set && (e.add = e.clear = e.delete = function() {
226
+ throw new Error("set is read-only");
227
+ }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach(function(n) {
228
+ var t = e[n];
229
+ typeof t == "object" && !Object.isFrozen(t) && Be(t);
230
+ }), e;
231
+ }
232
+ ke.exports = Be;
233
+ ke.exports.default = Be;
234
+ class Ye {
235
+ /**
236
+ * @param {CompiledMode} mode
237
+ */
238
+ constructor(n) {
239
+ n.data === void 0 && (n.data = {}), this.data = n.data, this.isMatchIgnored = !1;
240
+ }
241
+ ignoreMatch() {
242
+ this.isMatchIgnored = !0;
243
+ }
244
+ }
245
+ function sn(e) {
246
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
247
+ }
248
+ function q(e, ...n) {
249
+ const t = /* @__PURE__ */ Object.create(null);
250
+ for (const s in e)
251
+ t[s] = e[s];
252
+ return n.forEach(function(s) {
253
+ for (const c in s)
254
+ t[c] = s[c];
255
+ }), /** @type {T} */
256
+ t;
257
+ }
258
+ const kn = "</span>", Ze = (e) => !!e.scope || e.sublanguage && e.language, Bn = (e, { prefix: n }) => {
259
+ if (e.includes(".")) {
260
+ const t = e.split(".");
261
+ return [
262
+ `${n}${t.shift()}`,
263
+ ...t.map((s, c) => `${s}${"_".repeat(c + 1)}`)
264
+ ].join(" ");
265
+ }
266
+ return `${n}${e}`;
267
+ };
268
+ class $n {
269
+ /**
270
+ * Creates a new HTMLRenderer
271
+ *
272
+ * @param {Tree} parseTree - the parse tree (must support `walk` API)
273
+ * @param {{classPrefix: string}} options
274
+ */
275
+ constructor(n, t) {
276
+ this.buffer = "", this.classPrefix = t.classPrefix, n.walk(this);
277
+ }
278
+ /**
279
+ * Adds texts to the output stream
280
+ *
281
+ * @param {string} text */
282
+ addText(n) {
283
+ this.buffer += sn(n);
284
+ }
285
+ /**
286
+ * Adds a node open to the output stream (if needed)
287
+ *
288
+ * @param {Node} node */
289
+ openNode(n) {
290
+ if (!Ze(n))
291
+ return;
292
+ let t = "";
293
+ n.sublanguage ? t = `language-${n.language}` : t = Bn(n.scope, { prefix: this.classPrefix }), this.span(t);
294
+ }
295
+ /**
296
+ * Adds a node close to the output stream (if needed)
297
+ *
298
+ * @param {Node} node */
299
+ closeNode(n) {
300
+ Ze(n) && (this.buffer += kn);
301
+ }
302
+ /**
303
+ * returns the accumulated buffer
304
+ */
305
+ value() {
306
+ return this.buffer;
307
+ }
308
+ // helpers
309
+ /**
310
+ * Builds a span element
311
+ *
312
+ * @param {string} className */
313
+ span(n) {
314
+ this.buffer += `<span class="${n}">`;
315
+ }
316
+ }
317
+ const Qe = (e = {}) => {
318
+ const n = { children: [] };
319
+ return Object.assign(n, e), n;
320
+ };
321
+ class $e {
322
+ constructor() {
323
+ this.rootNode = Qe(), this.stack = [this.rootNode];
324
+ }
325
+ get top() {
326
+ return this.stack[this.stack.length - 1];
327
+ }
328
+ get root() {
329
+ return this.rootNode;
330
+ }
331
+ /** @param {Node} node */
332
+ add(n) {
333
+ this.top.children.push(n);
334
+ }
335
+ /** @param {string} scope */
336
+ openNode(n) {
337
+ const t = Qe({ scope: n });
338
+ this.add(t), this.stack.push(t);
339
+ }
340
+ closeNode() {
341
+ if (this.stack.length > 1)
342
+ return this.stack.pop();
343
+ }
344
+ closeAllNodes() {
345
+ for (; this.closeNode(); )
346
+ ;
347
+ }
348
+ toJSON() {
349
+ return JSON.stringify(this.rootNode, null, 4);
350
+ }
351
+ /**
352
+ * @typedef { import("./html_renderer").Renderer } Renderer
353
+ * @param {Renderer} builder
354
+ */
355
+ walk(n) {
356
+ return this.constructor._walk(n, this.rootNode);
357
+ }
358
+ /**
359
+ * @param {Renderer} builder
360
+ * @param {Node} node
361
+ */
362
+ static _walk(n, t) {
363
+ return typeof t == "string" ? n.addText(t) : t.children && (n.openNode(t), t.children.forEach((s) => this._walk(n, s)), n.closeNode(t)), n;
364
+ }
365
+ /**
366
+ * @param {Node} node
367
+ */
368
+ static _collapse(n) {
369
+ typeof n != "string" && n.children && (n.children.every((t) => typeof t == "string") ? n.children = [n.children.join("")] : n.children.forEach((t) => {
370
+ $e._collapse(t);
371
+ }));
372
+ }
373
+ }
374
+ class Un extends $e {
375
+ /**
376
+ * @param {*} options
377
+ */
378
+ constructor(n) {
379
+ super(), this.options = n;
380
+ }
381
+ /**
382
+ * @param {string} text
383
+ * @param {string} scope
384
+ */
385
+ addKeyword(n, t) {
386
+ n !== "" && (this.openNode(t), this.addText(n), this.closeNode());
387
+ }
388
+ /**
389
+ * @param {string} text
390
+ */
391
+ addText(n) {
392
+ n !== "" && this.add(n);
393
+ }
394
+ /**
395
+ * @param {Emitter & {root: DataNode}} emitter
396
+ * @param {string} name
397
+ */
398
+ addSublanguage(n, t) {
399
+ const s = n.root;
400
+ s.sublanguage = !0, s.language = t, this.add(s);
401
+ }
402
+ toHTML() {
403
+ return new $n(this, this.options).value();
404
+ }
405
+ finalize() {
406
+ return !0;
407
+ }
408
+ }
409
+ function le(e) {
410
+ return e ? typeof e == "string" ? e : e.source : null;
411
+ }
412
+ function rn(e) {
413
+ return ee("(?=", e, ")");
414
+ }
415
+ function Pn(e) {
416
+ return ee("(?:", e, ")*");
417
+ }
418
+ function Hn(e) {
419
+ return ee("(?:", e, ")?");
420
+ }
421
+ function ee(...e) {
422
+ return e.map((t) => le(t)).join("");
423
+ }
424
+ function zn(e) {
425
+ const n = e[e.length - 1];
426
+ return typeof n == "object" && n.constructor === Object ? (e.splice(e.length - 1, 1), n) : {};
427
+ }
428
+ function Ue(...e) {
429
+ return "(" + (zn(e).capture ? "" : "?:") + e.map((s) => le(s)).join("|") + ")";
430
+ }
431
+ function an(e) {
432
+ return new RegExp(e.toString() + "|").exec("").length - 1;
433
+ }
434
+ function Fn(e, n) {
435
+ const t = e && e.exec(n);
436
+ return t && t.index === 0;
437
+ }
438
+ const Gn = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
439
+ function Pe(e, { joinWith: n }) {
440
+ let t = 0;
441
+ return e.map((s) => {
442
+ t += 1;
443
+ const c = t;
444
+ let l = le(s), i = "";
445
+ for (; l.length > 0; ) {
446
+ const r = Gn.exec(l);
447
+ if (!r) {
448
+ i += l;
449
+ break;
450
+ }
451
+ i += l.substring(0, r.index), l = l.substring(r.index + r[0].length), r[0][0] === "\\" && r[1] ? i += "\\" + String(Number(r[1]) + c) : (i += r[0], r[0] === "(" && t++);
452
+ }
453
+ return i;
454
+ }).map((s) => `(${s})`).join(n);
455
+ }
456
+ const Kn = /\b\B/, on = "[a-zA-Z]\\w*", He = "[a-zA-Z_]\\w*", cn = "\\b\\d+(\\.\\d+)?", ln = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", un = "\\b(0b[01]+)", Wn = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Vn = (e = {}) => {
457
+ const n = /^#![ ]*\//;
458
+ return e.binary && (e.begin = ee(
459
+ n,
460
+ /.*\b/,
461
+ e.binary,
462
+ /\b.*/
463
+ )), q({
464
+ scope: "meta",
465
+ begin: n,
466
+ end: /$/,
467
+ relevance: 0,
468
+ /** @type {ModeCallback} */
469
+ "on:begin": (t, s) => {
470
+ t.index !== 0 && s.ignoreMatch();
471
+ }
472
+ }, e);
473
+ }, ue = {
474
+ begin: "\\\\[\\s\\S]",
475
+ relevance: 0
476
+ }, Yn = {
477
+ scope: "string",
478
+ begin: "'",
479
+ end: "'",
480
+ illegal: "\\n",
481
+ contains: [ue]
482
+ }, Zn = {
483
+ scope: "string",
484
+ begin: '"',
485
+ end: '"',
486
+ illegal: "\\n",
487
+ contains: [ue]
488
+ }, Qn = {
489
+ begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
490
+ }, we = function(e, n, t = {}) {
491
+ const s = q(
492
+ {
493
+ scope: "comment",
494
+ begin: e,
495
+ end: n,
496
+ contains: []
497
+ },
498
+ t
499
+ );
500
+ s.contains.push({
501
+ scope: "doctag",
502
+ // hack to avoid the space from being included. the space is necessary to
503
+ // match here to prevent the plain text rule below from gobbling up doctags
504
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
505
+ end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
506
+ excludeBegin: !0,
507
+ relevance: 0
508
+ });
509
+ const c = Ue(
510
+ // list of common 1 and 2 letter words in English
511
+ "I",
512
+ "a",
513
+ "is",
514
+ "so",
515
+ "us",
516
+ "to",
517
+ "at",
518
+ "if",
519
+ "in",
520
+ "it",
521
+ "on",
522
+ // note: this is not an exhaustive list of contractions, just popular ones
523
+ /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
524
+ // contractions - can't we'd they're let's, etc
525
+ /[A-Za-z]+[-][a-z]+/,
526
+ // `no-way`, etc.
527
+ /[A-Za-z][a-z]{2,}/
528
+ // allow capitalized words at beginning of sentences
529
+ );
530
+ return s.contains.push(
531
+ {
532
+ // TODO: how to include ", (, ) without breaking grammars that use these for
533
+ // comment delimiters?
534
+ // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
535
+ // ---
536
+ // this tries to find sequences of 3 english words in a row (without any
537
+ // "programming" type syntax) this gives us a strong signal that we've
538
+ // TRULY found a comment - vs perhaps scanning with the wrong language.
539
+ // It's possible to find something that LOOKS like the start of the
540
+ // comment - but then if there is no readable text - good chance it is a
541
+ // false match and not a comment.
542
+ //
543
+ // for a visual example please see:
544
+ // https://github.com/highlightjs/highlight.js/issues/2827
545
+ begin: ee(
546
+ /[ ]+/,
547
+ // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
548
+ "(",
549
+ c,
550
+ /[.]?[:]?([.][ ]|[ ])/,
551
+ "){3}"
552
+ )
553
+ // look for 3 words in a row
554
+ }
555
+ ), s;
556
+ }, Xn = we("//", "$"), qn = we("/\\*", "\\*/"), jn = we("#", "$"), Jn = {
557
+ scope: "number",
558
+ begin: cn,
559
+ relevance: 0
560
+ }, et = {
561
+ scope: "number",
562
+ begin: ln,
563
+ relevance: 0
564
+ }, nt = {
565
+ scope: "number",
566
+ begin: un,
567
+ relevance: 0
568
+ }, tt = {
569
+ // this outer rule makes sure we actually have a WHOLE regex and not simply
570
+ // an expression such as:
571
+ //
572
+ // 3 / something
573
+ //
574
+ // (which will then blow up when regex's `illegal` sees the newline)
575
+ begin: /(?=\/[^/\n]*\/)/,
576
+ contains: [{
577
+ scope: "regexp",
578
+ begin: /\//,
579
+ end: /\/[gimuy]*/,
580
+ illegal: /\n/,
581
+ contains: [
582
+ ue,
583
+ {
584
+ begin: /\[/,
585
+ end: /\]/,
586
+ relevance: 0,
587
+ contains: [ue]
588
+ }
589
+ ]
590
+ }]
591
+ }, st = {
592
+ scope: "title",
593
+ begin: on,
594
+ relevance: 0
595
+ }, it = {
596
+ scope: "title",
597
+ begin: He,
598
+ relevance: 0
599
+ }, rt = {
600
+ // excludes method names from keyword processing
601
+ begin: "\\.\\s*" + He,
602
+ relevance: 0
603
+ }, at = function(e) {
604
+ return Object.assign(
605
+ e,
606
+ {
607
+ /** @type {ModeCallback} */
608
+ "on:begin": (n, t) => {
609
+ t.data._beginMatch = n[1];
610
+ },
611
+ /** @type {ModeCallback} */
612
+ "on:end": (n, t) => {
613
+ t.data._beginMatch !== n[1] && t.ignoreMatch();
614
+ }
615
+ }
616
+ );
617
+ };
618
+ var me = /* @__PURE__ */ Object.freeze({
619
+ __proto__: null,
620
+ MATCH_NOTHING_RE: Kn,
621
+ IDENT_RE: on,
622
+ UNDERSCORE_IDENT_RE: He,
623
+ NUMBER_RE: cn,
624
+ C_NUMBER_RE: ln,
625
+ BINARY_NUMBER_RE: un,
626
+ RE_STARTERS_RE: Wn,
627
+ SHEBANG: Vn,
628
+ BACKSLASH_ESCAPE: ue,
629
+ APOS_STRING_MODE: Yn,
630
+ QUOTE_STRING_MODE: Zn,
631
+ PHRASAL_WORDS_MODE: Qn,
632
+ COMMENT: we,
633
+ C_LINE_COMMENT_MODE: Xn,
634
+ C_BLOCK_COMMENT_MODE: qn,
635
+ HASH_COMMENT_MODE: jn,
636
+ NUMBER_MODE: Jn,
637
+ C_NUMBER_MODE: et,
638
+ BINARY_NUMBER_MODE: nt,
639
+ REGEXP_MODE: tt,
640
+ TITLE_MODE: st,
641
+ UNDERSCORE_TITLE_MODE: it,
642
+ METHOD_GUARD: rt,
643
+ END_SAME_AS_BEGIN: at
644
+ });
645
+ function ot(e, n) {
646
+ e.input[e.index - 1] === "." && n.ignoreMatch();
647
+ }
648
+ function ct(e, n) {
649
+ e.className !== void 0 && (e.scope = e.className, delete e.className);
650
+ }
651
+ function lt(e, n) {
652
+ n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ot, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
653
+ }
654
+ function ut(e, n) {
655
+ Array.isArray(e.illegal) && (e.illegal = Ue(...e.illegal));
656
+ }
657
+ function ft(e, n) {
658
+ if (e.match) {
659
+ if (e.begin || e.end)
660
+ throw new Error("begin & end are not supported with match");
661
+ e.begin = e.match, delete e.match;
662
+ }
663
+ }
664
+ function dt(e, n) {
665
+ e.relevance === void 0 && (e.relevance = 1);
666
+ }
667
+ const gt = (e, n) => {
668
+ if (!e.beforeMatch)
669
+ return;
670
+ if (e.starts)
671
+ throw new Error("beforeMatch cannot be used with starts");
672
+ const t = Object.assign({}, e);
673
+ Object.keys(e).forEach((s) => {
674
+ delete e[s];
675
+ }), e.keywords = t.keywords, e.begin = ee(t.beforeMatch, rn(t.begin)), e.starts = {
676
+ relevance: 0,
677
+ contains: [
678
+ Object.assign(t, { endsParent: !0 })
679
+ ]
680
+ }, e.relevance = 0, delete t.beforeMatch;
681
+ }, pt = [
682
+ "of",
683
+ "and",
684
+ "for",
685
+ "in",
686
+ "not",
687
+ "or",
688
+ "if",
689
+ "then",
690
+ "parent",
691
+ // common variable name
692
+ "list",
693
+ // common variable name
694
+ "value"
695
+ // common variable name
696
+ ], _t = "keyword";
697
+ function fn(e, n, t = _t) {
698
+ const s = /* @__PURE__ */ Object.create(null);
699
+ return typeof e == "string" ? c(t, e.split(" ")) : Array.isArray(e) ? c(t, e) : Object.keys(e).forEach(function(l) {
700
+ Object.assign(
701
+ s,
702
+ fn(e[l], n, l)
703
+ );
704
+ }), s;
705
+ function c(l, i) {
706
+ n && (i = i.map((r) => r.toLowerCase())), i.forEach(function(r) {
707
+ const a = r.split("|");
708
+ s[a[0]] = [l, bt(a[0], a[1])];
709
+ });
710
+ }
711
+ }
712
+ function bt(e, n) {
713
+ return n ? Number(n) : ht(e) ? 0 : 1;
714
+ }
715
+ function ht(e) {
716
+ return pt.includes(e.toLowerCase());
717
+ }
718
+ const Xe = {}, J = (e) => {
719
+ console.error(e);
720
+ }, qe = (e, ...n) => {
721
+ console.log(`WARN: ${e}`, ...n);
722
+ }, ie = (e, n) => {
723
+ Xe[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), Xe[`${e}/${n}`] = !0);
724
+ }, Te = new Error();
725
+ function dn(e, n, { key: t }) {
726
+ let s = 0;
727
+ const c = e[t], l = {}, i = {};
728
+ for (let r = 1; r <= n.length; r++)
729
+ i[r + s] = c[r], l[r + s] = !0, s += an(n[r - 1]);
730
+ e[t] = i, e[t]._emit = l, e[t]._multi = !0;
731
+ }
732
+ function Et(e) {
733
+ if (Array.isArray(e.begin)) {
734
+ if (e.skip || e.excludeBegin || e.returnBegin)
735
+ throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Te;
736
+ if (typeof e.beginScope != "object" || e.beginScope === null)
737
+ throw J("beginScope must be object"), Te;
738
+ dn(e, e.begin, { key: "beginScope" }), e.begin = Pe(e.begin, { joinWith: "" });
739
+ }
740
+ }
741
+ function mt(e) {
742
+ if (Array.isArray(e.end)) {
743
+ if (e.skip || e.excludeEnd || e.returnEnd)
744
+ throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Te;
745
+ if (typeof e.endScope != "object" || e.endScope === null)
746
+ throw J("endScope must be object"), Te;
747
+ dn(e, e.end, { key: "endScope" }), e.end = Pe(e.end, { joinWith: "" });
748
+ }
749
+ }
750
+ function yt(e) {
751
+ e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
752
+ }
753
+ function vt(e) {
754
+ yt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), Et(e), mt(e);
755
+ }
756
+ function Nt(e) {
757
+ function n(i, r) {
758
+ return new RegExp(
759
+ le(i),
760
+ "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : "")
761
+ );
762
+ }
763
+ class t {
764
+ constructor() {
765
+ this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
766
+ }
767
+ // @ts-ignore
768
+ addRule(r, a) {
769
+ a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, r]), this.matchAt += an(r) + 1;
770
+ }
771
+ compile() {
772
+ this.regexes.length === 0 && (this.exec = () => null);
773
+ const r = this.regexes.map((a) => a[1]);
774
+ this.matcherRe = n(Pe(r, { joinWith: "|" }), !0), this.lastIndex = 0;
775
+ }
776
+ /** @param {string} s */
777
+ exec(r) {
778
+ this.matcherRe.lastIndex = this.lastIndex;
779
+ const a = this.matcherRe.exec(r);
780
+ if (!a)
781
+ return null;
782
+ const o = a.findIndex((_, f) => f > 0 && _ !== void 0), p = this.matchIndexes[o];
783
+ return a.splice(0, o), Object.assign(a, p);
784
+ }
785
+ }
786
+ class s {
787
+ constructor() {
788
+ this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
789
+ }
790
+ // @ts-ignore
791
+ getMatcher(r) {
792
+ if (this.multiRegexes[r])
793
+ return this.multiRegexes[r];
794
+ const a = new t();
795
+ return this.rules.slice(r).forEach(([o, p]) => a.addRule(o, p)), a.compile(), this.multiRegexes[r] = a, a;
796
+ }
797
+ resumingScanAtSamePosition() {
798
+ return this.regexIndex !== 0;
799
+ }
800
+ considerAll() {
801
+ this.regexIndex = 0;
802
+ }
803
+ // @ts-ignore
804
+ addRule(r, a) {
805
+ this.rules.push([r, a]), a.type === "begin" && this.count++;
806
+ }
807
+ /** @param {string} s */
808
+ exec(r) {
809
+ const a = this.getMatcher(this.regexIndex);
810
+ a.lastIndex = this.lastIndex;
811
+ let o = a.exec(r);
812
+ if (this.resumingScanAtSamePosition() && !(o && o.index === this.lastIndex)) {
813
+ const p = this.getMatcher(0);
814
+ p.lastIndex = this.lastIndex + 1, o = p.exec(r);
815
+ }
816
+ return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
817
+ }
818
+ }
819
+ function c(i) {
820
+ const r = new s();
821
+ return i.contains.forEach((a) => r.addRule(a.begin, { rule: a, type: "begin" })), i.terminatorEnd && r.addRule(i.terminatorEnd, { type: "end" }), i.illegal && r.addRule(i.illegal, { type: "illegal" }), r;
822
+ }
823
+ function l(i, r) {
824
+ const a = (
825
+ /** @type CompiledMode */
826
+ i
827
+ );
828
+ if (i.isCompiled)
829
+ return a;
830
+ [
831
+ ct,
832
+ // do this early so compiler extensions generally don't have to worry about
833
+ // the distinction between match/begin
834
+ ft,
835
+ vt,
836
+ gt
837
+ ].forEach((p) => p(i, r)), e.compilerExtensions.forEach((p) => p(i, r)), i.__beforeBegin = null, [
838
+ lt,
839
+ // do this later so compiler extensions that come earlier have access to the
840
+ // raw array if they wanted to perhaps manipulate it, etc.
841
+ ut,
842
+ // default to 1 relevance if not specified
843
+ dt
844
+ ].forEach((p) => p(i, r)), i.isCompiled = !0;
845
+ let o = null;
846
+ return typeof i.keywords == "object" && i.keywords.$pattern && (i.keywords = Object.assign({}, i.keywords), o = i.keywords.$pattern, delete i.keywords.$pattern), o = o || /\w+/, i.keywords && (i.keywords = fn(i.keywords, e.case_insensitive)), a.keywordPatternRe = n(o, !0), r && (i.begin || (i.begin = /\B|\b/), a.beginRe = n(a.begin), !i.end && !i.endsWithParent && (i.end = /\B|\b/), i.end && (a.endRe = n(a.end)), a.terminatorEnd = le(a.end) || "", i.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (i.end ? "|" : "") + r.terminatorEnd)), i.illegal && (a.illegalRe = n(
847
+ /** @type {RegExp | string} */
848
+ i.illegal
849
+ )), i.contains || (i.contains = []), i.contains = [].concat(...i.contains.map(function(p) {
850
+ return Tt(p === "self" ? i : p);
851
+ })), i.contains.forEach(function(p) {
852
+ l(
853
+ /** @type Mode */
854
+ p,
855
+ a
856
+ );
857
+ }), i.starts && l(i.starts, r), a.matcher = c(a), a;
858
+ }
859
+ if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
860
+ throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
861
+ return e.classNameAliases = q(e.classNameAliases || {}), l(
862
+ /** @type Mode */
863
+ e
864
+ );
865
+ }
866
+ function gn(e) {
867
+ return e ? e.endsWithParent || gn(e.starts) : !1;
868
+ }
869
+ function Tt(e) {
870
+ return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
871
+ return q(e, { variants: null }, n);
872
+ })), e.cachedVariants ? e.cachedVariants : gn(e) ? q(e, { starts: e.starts ? q(e.starts) : null }) : Object.isFrozen(e) ? q(e) : e;
873
+ }
874
+ var At = "11.7.0";
875
+ class wt extends Error {
876
+ constructor(n, t) {
877
+ super(n), this.name = "HTMLInjectionError", this.html = t;
878
+ }
879
+ }
880
+ const xe = sn, je = q, Je = Symbol("nomatch"), St = 7, Rt = function(e) {
881
+ const n = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), s = [];
882
+ let c = !0;
883
+ const l = "Could not find the language '{}', did you forget to load/include a language module?", i = { disableAutodetect: !0, name: "Plain text", contains: [] };
884
+ let r = {
885
+ ignoreUnescapedHTML: !1,
886
+ throwUnescapedHTML: !1,
887
+ noHighlightRe: /^(no-?highlight)$/i,
888
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
889
+ classPrefix: "hljs-",
890
+ cssSelector: "pre code",
891
+ languages: null,
892
+ // beta configuration options, subject to change, welcome to discuss
893
+ // https://github.com/highlightjs/highlight.js/issues/1086
894
+ __emitter: Un
895
+ };
896
+ function a(u) {
897
+ return r.noHighlightRe.test(u);
898
+ }
899
+ function o(u) {
900
+ let b = u.className + " ";
901
+ b += u.parentNode ? u.parentNode.className : "";
902
+ const T = r.languageDetectRe.exec(b);
903
+ if (T) {
904
+ const R = z(T[1]);
905
+ return R || (qe(l.replace("{}", T[1])), qe("Falling back to no-highlight mode for this block.", u)), R ? T[1] : "no-highlight";
906
+ }
907
+ return b.split(/\s+/).find((R) => a(R) || z(R));
908
+ }
909
+ function p(u, b, T) {
910
+ let R = "", I = "";
911
+ typeof b == "object" ? (R = u, T = b.ignoreIllegals, I = b.language) : (ie("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ie("10.7.0", `Please use highlight(code, options) instead.
912
+ https://github.com/highlightjs/highlight.js/issues/2277`), I = u, R = b), T === void 0 && (T = !0);
913
+ const U = {
914
+ code: R,
915
+ language: I
916
+ };
917
+ se("before:highlight", U);
918
+ const K = U.result ? U.result : _(U.language, U.code, T);
919
+ return K.code = U.code, se("after:highlight", K), K;
920
+ }
921
+ function _(u, b, T, R) {
922
+ const I = /* @__PURE__ */ Object.create(null);
923
+ function U(d, E) {
924
+ return d.keywords[E];
925
+ }
926
+ function K() {
927
+ if (!v.keywords) {
928
+ B.addText(C);
929
+ return;
930
+ }
931
+ let d = 0;
932
+ v.keywordPatternRe.lastIndex = 0;
933
+ let E = v.keywordPatternRe.exec(C), w = "";
934
+ for (; E; ) {
935
+ w += C.substring(d, E.index);
936
+ const O = X.case_insensitive ? E[0].toLowerCase() : E[0], $ = U(v, O);
937
+ if ($) {
938
+ const [W, Tn] = $;
939
+ if (B.addText(w), w = "", I[O] = (I[O] || 0) + 1, I[O] <= St && (he += Tn), W.startsWith("_"))
940
+ w += E[0];
941
+ else {
942
+ const An = X.classNameAliases[W] || W;
943
+ B.addKeyword(E[0], An);
944
+ }
945
+ } else
946
+ w += E[0];
947
+ d = v.keywordPatternRe.lastIndex, E = v.keywordPatternRe.exec(C);
948
+ }
949
+ w += C.substring(d), B.addText(w);
950
+ }
951
+ function _e() {
952
+ if (C === "")
953
+ return;
954
+ let d = null;
955
+ if (typeof v.subLanguage == "string") {
956
+ if (!n[v.subLanguage]) {
957
+ B.addText(C);
958
+ return;
959
+ }
960
+ d = _(v.subLanguage, C, !0, Ke[v.subLanguage]), Ke[v.subLanguage] = /** @type {CompiledMode} */
961
+ d._top;
962
+ } else
963
+ d = N(C, v.subLanguage.length ? v.subLanguage : null);
964
+ v.relevance > 0 && (he += d.relevance), B.addSublanguage(d._emitter, d.language);
965
+ }
966
+ function P() {
967
+ v.subLanguage != null ? _e() : K(), C = "";
968
+ }
969
+ function Q(d, E) {
970
+ let w = 1;
971
+ const O = E.length - 1;
972
+ for (; w <= O; ) {
973
+ if (!d._emit[w]) {
974
+ w++;
975
+ continue;
976
+ }
977
+ const $ = X.classNameAliases[d[w]] || d[w], W = E[w];
978
+ $ ? B.addKeyword(W, $) : (C = W, K(), C = ""), w++;
979
+ }
980
+ }
981
+ function ze(d, E) {
982
+ return d.scope && typeof d.scope == "string" && B.openNode(X.classNameAliases[d.scope] || d.scope), d.beginScope && (d.beginScope._wrap ? (B.addKeyword(C, X.classNameAliases[d.beginScope._wrap] || d.beginScope._wrap), C = "") : d.beginScope._multi && (Q(d.beginScope, E), C = "")), v = Object.create(d, { parent: { value: v } }), v;
983
+ }
984
+ function Fe(d, E, w) {
985
+ let O = Fn(d.endRe, w);
986
+ if (O) {
987
+ if (d["on:end"]) {
988
+ const $ = new Ye(d);
989
+ d["on:end"](E, $), $.isMatchIgnored && (O = !1);
990
+ }
991
+ if (O) {
992
+ for (; d.endsParent && d.parent; )
993
+ d = d.parent;
994
+ return d;
995
+ }
996
+ }
997
+ if (d.endsWithParent)
998
+ return Fe(d.parent, E, w);
999
+ }
1000
+ function En(d) {
1001
+ return v.matcher.regexIndex === 0 ? (C += d[0], 1) : (Oe = !0, 0);
1002
+ }
1003
+ function mn(d) {
1004
+ const E = d[0], w = d.rule, O = new Ye(w), $ = [w.__beforeBegin, w["on:begin"]];
1005
+ for (const W of $)
1006
+ if (W && (W(d, O), O.isMatchIgnored))
1007
+ return En(E);
1008
+ return w.skip ? C += E : (w.excludeBegin && (C += E), P(), !w.returnBegin && !w.excludeBegin && (C = E)), ze(w, d), w.returnBegin ? 0 : E.length;
1009
+ }
1010
+ function yn(d) {
1011
+ const E = d[0], w = b.substring(d.index), O = Fe(v, d, w);
1012
+ if (!O)
1013
+ return Je;
1014
+ const $ = v;
1015
+ v.endScope && v.endScope._wrap ? (P(), B.addKeyword(E, v.endScope._wrap)) : v.endScope && v.endScope._multi ? (P(), Q(v.endScope, d)) : $.skip ? C += E : ($.returnEnd || $.excludeEnd || (C += E), P(), $.excludeEnd && (C = E));
1016
+ do
1017
+ v.scope && B.closeNode(), !v.skip && !v.subLanguage && (he += v.relevance), v = v.parent;
1018
+ while (v !== O.parent);
1019
+ return O.starts && ze(O.starts, d), $.returnEnd ? 0 : E.length;
1020
+ }
1021
+ function vn() {
1022
+ const d = [];
1023
+ for (let E = v; E !== X; E = E.parent)
1024
+ E.scope && d.unshift(E.scope);
1025
+ d.forEach((E) => B.openNode(E));
1026
+ }
1027
+ let be = {};
1028
+ function Ge(d, E) {
1029
+ const w = E && E[0];
1030
+ if (C += d, w == null)
1031
+ return P(), 0;
1032
+ if (be.type === "begin" && E.type === "end" && be.index === E.index && w === "") {
1033
+ if (C += b.slice(E.index, E.index + 1), !c) {
1034
+ const O = new Error(`0 width match regex (${u})`);
1035
+ throw O.languageName = u, O.badRule = be.rule, O;
1036
+ }
1037
+ return 1;
1038
+ }
1039
+ if (be = E, E.type === "begin")
1040
+ return mn(E);
1041
+ if (E.type === "illegal" && !T) {
1042
+ const O = new Error('Illegal lexeme "' + w + '" for mode "' + (v.scope || "<unnamed>") + '"');
1043
+ throw O.mode = v, O;
1044
+ } else if (E.type === "end") {
1045
+ const O = yn(E);
1046
+ if (O !== Je)
1047
+ return O;
1048
+ }
1049
+ if (E.type === "illegal" && w === "")
1050
+ return 1;
1051
+ if (Me > 1e5 && Me > E.index * 3)
1052
+ throw new Error("potential infinite loop, way more iterations than matches");
1053
+ return C += w, w.length;
1054
+ }
1055
+ const X = z(u);
1056
+ if (!X)
1057
+ throw J(l.replace("{}", u)), new Error('Unknown language: "' + u + '"');
1058
+ const Nn = Nt(X);
1059
+ let Re = "", v = R || Nn;
1060
+ const Ke = {}, B = new r.__emitter(r);
1061
+ vn();
1062
+ let C = "", he = 0, j = 0, Me = 0, Oe = !1;
1063
+ try {
1064
+ for (v.matcher.considerAll(); ; ) {
1065
+ Me++, Oe ? Oe = !1 : v.matcher.considerAll(), v.matcher.lastIndex = j;
1066
+ const d = v.matcher.exec(b);
1067
+ if (!d)
1068
+ break;
1069
+ const E = b.substring(j, d.index), w = Ge(E, d);
1070
+ j = d.index + w;
1071
+ }
1072
+ return Ge(b.substring(j)), B.closeAllNodes(), B.finalize(), Re = B.toHTML(), {
1073
+ language: u,
1074
+ value: Re,
1075
+ relevance: he,
1076
+ illegal: !1,
1077
+ _emitter: B,
1078
+ _top: v
1079
+ };
1080
+ } catch (d) {
1081
+ if (d.message && d.message.includes("Illegal"))
1082
+ return {
1083
+ language: u,
1084
+ value: xe(b),
1085
+ illegal: !0,
1086
+ relevance: 0,
1087
+ _illegalBy: {
1088
+ message: d.message,
1089
+ index: j,
1090
+ context: b.slice(j - 100, j + 100),
1091
+ mode: d.mode,
1092
+ resultSoFar: Re
1093
+ },
1094
+ _emitter: B
1095
+ };
1096
+ if (c)
1097
+ return {
1098
+ language: u,
1099
+ value: xe(b),
1100
+ illegal: !1,
1101
+ relevance: 0,
1102
+ errorRaised: d,
1103
+ _emitter: B,
1104
+ _top: v
1105
+ };
1106
+ throw d;
1107
+ }
1108
+ }
1109
+ function f(u) {
1110
+ const b = {
1111
+ value: xe(u),
1112
+ illegal: !1,
1113
+ relevance: 0,
1114
+ _top: i,
1115
+ _emitter: new r.__emitter(r)
1116
+ };
1117
+ return b._emitter.addText(u), b;
1118
+ }
1119
+ function N(u, b) {
1120
+ b = b || r.languages || Object.keys(n);
1121
+ const T = f(u), R = b.filter(z).filter(te).map(
1122
+ (P) => _(P, u, !1)
1123
+ );
1124
+ R.unshift(T);
1125
+ const I = R.sort((P, Q) => {
1126
+ if (P.relevance !== Q.relevance)
1127
+ return Q.relevance - P.relevance;
1128
+ if (P.language && Q.language) {
1129
+ if (z(P.language).supersetOf === Q.language)
1130
+ return 1;
1131
+ if (z(Q.language).supersetOf === P.language)
1132
+ return -1;
1133
+ }
1134
+ return 0;
1135
+ }), [U, K] = I, _e = U;
1136
+ return _e.secondBest = K, _e;
1137
+ }
1138
+ function h(u, b, T) {
1139
+ const R = b && t[b] || T;
1140
+ u.classList.add("hljs"), u.classList.add(`language-${R}`);
1141
+ }
1142
+ function g(u) {
1143
+ let b = null;
1144
+ const T = o(u);
1145
+ if (a(T))
1146
+ return;
1147
+ if (se(
1148
+ "before:highlightElement",
1149
+ { el: u, language: T }
1150
+ ), u.children.length > 0 && (r.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(u)), r.throwUnescapedHTML))
1151
+ throw new wt(
1152
+ "One of your code blocks includes unescaped HTML.",
1153
+ u.innerHTML
1154
+ );
1155
+ b = u;
1156
+ const R = b.textContent, I = T ? p(R, { language: T, ignoreIllegals: !0 }) : N(R);
1157
+ u.innerHTML = I.value, h(u, T, I.language), u.result = {
1158
+ language: I.language,
1159
+ // TODO: remove with version 11.0
1160
+ re: I.relevance,
1161
+ relevance: I.relevance
1162
+ }, I.secondBest && (u.secondBest = {
1163
+ language: I.secondBest.language,
1164
+ relevance: I.secondBest.relevance
1165
+ }), se("after:highlightElement", { el: u, result: I, text: R });
1166
+ }
1167
+ function A(u) {
1168
+ r = je(r, u);
1169
+ }
1170
+ const S = () => {
1171
+ M(), ie("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
1172
+ };
1173
+ function x() {
1174
+ M(), ie("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
1175
+ }
1176
+ let y = !1;
1177
+ function M() {
1178
+ if (document.readyState === "loading") {
1179
+ y = !0;
1180
+ return;
1181
+ }
1182
+ document.querySelectorAll(r.cssSelector).forEach(g);
1183
+ }
1184
+ function L() {
1185
+ y && M();
1186
+ }
1187
+ typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", L, !1);
1188
+ function D(u, b) {
1189
+ let T = null;
1190
+ try {
1191
+ T = b(e);
1192
+ } catch (R) {
1193
+ if (J("Language definition for '{}' could not be registered.".replace("{}", u)), c)
1194
+ J(R);
1195
+ else
1196
+ throw R;
1197
+ T = i;
1198
+ }
1199
+ T.name || (T.name = u), n[u] = T, T.rawDefinition = b.bind(null, e), T.aliases && ne(T.aliases, { languageName: u });
1200
+ }
1201
+ function k(u) {
1202
+ delete n[u];
1203
+ for (const b of Object.keys(t))
1204
+ t[b] === u && delete t[b];
1205
+ }
1206
+ function H() {
1207
+ return Object.keys(n);
1208
+ }
1209
+ function z(u) {
1210
+ return u = (u || "").toLowerCase(), n[u] || n[t[u]];
1211
+ }
1212
+ function ne(u, { languageName: b }) {
1213
+ typeof u == "string" && (u = [u]), u.forEach((T) => {
1214
+ t[T.toLowerCase()] = b;
1215
+ });
1216
+ }
1217
+ function te(u) {
1218
+ const b = z(u);
1219
+ return b && !b.disableAutodetect;
1220
+ }
1221
+ function oe(u) {
1222
+ u["before:highlightBlock"] && !u["before:highlightElement"] && (u["before:highlightElement"] = (b) => {
1223
+ u["before:highlightBlock"](
1224
+ Object.assign({ block: b.el }, b)
1225
+ );
1226
+ }), u["after:highlightBlock"] && !u["after:highlightElement"] && (u["after:highlightElement"] = (b) => {
1227
+ u["after:highlightBlock"](
1228
+ Object.assign({ block: b.el }, b)
1229
+ );
1230
+ });
1231
+ }
1232
+ function Se(u) {
1233
+ oe(u), s.push(u);
1234
+ }
1235
+ function se(u, b) {
1236
+ const T = u;
1237
+ s.forEach(function(R) {
1238
+ R[T] && R[T](b);
1239
+ });
1240
+ }
1241
+ function pe(u) {
1242
+ return ie("10.7.0", "highlightBlock will be removed entirely in v12.0"), ie("10.7.0", "Please use highlightElement now."), g(u);
1243
+ }
1244
+ Object.assign(e, {
1245
+ highlight: p,
1246
+ highlightAuto: N,
1247
+ highlightAll: M,
1248
+ highlightElement: g,
1249
+ // TODO: Remove with v12 API
1250
+ highlightBlock: pe,
1251
+ configure: A,
1252
+ initHighlighting: S,
1253
+ initHighlightingOnLoad: x,
1254
+ registerLanguage: D,
1255
+ unregisterLanguage: k,
1256
+ listLanguages: H,
1257
+ getLanguage: z,
1258
+ registerAliases: ne,
1259
+ autoDetection: te,
1260
+ inherit: je,
1261
+ addPlugin: Se
1262
+ }), e.debugMode = function() {
1263
+ c = !1;
1264
+ }, e.safeMode = function() {
1265
+ c = !0;
1266
+ }, e.versionString = At, e.regex = {
1267
+ concat: ee,
1268
+ lookahead: rn,
1269
+ either: Ue,
1270
+ optional: Hn,
1271
+ anyNumberOfTimes: Pn
1272
+ };
1273
+ for (const u in me)
1274
+ typeof me[u] == "object" && ke.exports(me[u]);
1275
+ return Object.assign(e, me), e;
1276
+ };
1277
+ var fe = Rt({}), Mt = fe;
1278
+ fe.HighlightJS = fe;
1279
+ fe.default = fe;
1280
+ const G = Mt;
1281
+ function Ot(e) {
1282
+ const n = e.regex, t = n.concat(/[\p{L}_]/u, n.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), s = /[\p{L}0-9._:-]+/u, c = {
1283
+ className: "symbol",
1284
+ begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
1285
+ }, l = {
1286
+ begin: /\s/,
1287
+ contains: [
1288
+ {
1289
+ className: "keyword",
1290
+ begin: /#?[a-z_][a-z1-9_-]+/,
1291
+ illegal: /\n/
1292
+ }
1293
+ ]
1294
+ }, i = e.inherit(l, {
1295
+ begin: /\(/,
1296
+ end: /\)/
1297
+ }), r = e.inherit(e.APOS_STRING_MODE, { className: "string" }), a = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), o = {
1298
+ endsWithParent: !0,
1299
+ illegal: /</,
1300
+ relevance: 0,
1301
+ contains: [
1302
+ {
1303
+ className: "attr",
1304
+ begin: s,
1305
+ relevance: 0
1306
+ },
1307
+ {
1308
+ begin: /=\s*/,
1309
+ relevance: 0,
1310
+ contains: [
1311
+ {
1312
+ className: "string",
1313
+ endsParent: !0,
1314
+ variants: [
1315
+ {
1316
+ begin: /"/,
1317
+ end: /"/,
1318
+ contains: [c]
1319
+ },
1320
+ {
1321
+ begin: /'/,
1322
+ end: /'/,
1323
+ contains: [c]
1324
+ },
1325
+ { begin: /[^\s"'=<>`]+/ }
1326
+ ]
1327
+ }
1328
+ ]
1329
+ }
1330
+ ]
1331
+ };
1332
+ return {
1333
+ name: "HTML, XML",
1334
+ aliases: [
1335
+ "html",
1336
+ "xhtml",
1337
+ "rss",
1338
+ "atom",
1339
+ "xjb",
1340
+ "xsd",
1341
+ "xsl",
1342
+ "plist",
1343
+ "wsf",
1344
+ "svg"
1345
+ ],
1346
+ case_insensitive: !0,
1347
+ unicodeRegex: !0,
1348
+ contains: [
1349
+ {
1350
+ className: "meta",
1351
+ begin: /<![a-z]/,
1352
+ end: />/,
1353
+ relevance: 10,
1354
+ contains: [
1355
+ l,
1356
+ a,
1357
+ r,
1358
+ i,
1359
+ {
1360
+ begin: /\[/,
1361
+ end: /\]/,
1362
+ contains: [
1363
+ {
1364
+ className: "meta",
1365
+ begin: /<![a-z]/,
1366
+ end: />/,
1367
+ contains: [
1368
+ l,
1369
+ i,
1370
+ a,
1371
+ r
1372
+ ]
1373
+ }
1374
+ ]
1375
+ }
1376
+ ]
1377
+ },
1378
+ e.COMMENT(
1379
+ /<!--/,
1380
+ /-->/,
1381
+ { relevance: 10 }
1382
+ ),
1383
+ {
1384
+ begin: /<!\[CDATA\[/,
1385
+ end: /\]\]>/,
1386
+ relevance: 10
1387
+ },
1388
+ c,
1389
+ // xml processing instructions
1390
+ {
1391
+ className: "meta",
1392
+ end: /\?>/,
1393
+ variants: [
1394
+ {
1395
+ begin: /<\?xml/,
1396
+ relevance: 10,
1397
+ contains: [
1398
+ a
1399
+ ]
1400
+ },
1401
+ {
1402
+ begin: /<\?[a-z][a-z0-9]+/
1403
+ }
1404
+ ]
1405
+ },
1406
+ {
1407
+ className: "tag",
1408
+ /*
1409
+ The lookahead pattern (?=...) ensures that 'begin' only matches
1410
+ '<style' as a single word, followed by a whitespace or an
1411
+ ending bracket.
1412
+ */
1413
+ begin: /<style(?=\s|>)/,
1414
+ end: />/,
1415
+ keywords: { name: "style" },
1416
+ contains: [o],
1417
+ starts: {
1418
+ end: /<\/style>/,
1419
+ returnEnd: !0,
1420
+ subLanguage: [
1421
+ "css",
1422
+ "xml"
1423
+ ]
1424
+ }
1425
+ },
1426
+ {
1427
+ className: "tag",
1428
+ // See the comment in the <style tag about the lookahead pattern
1429
+ begin: /<script(?=\s|>)/,
1430
+ end: />/,
1431
+ keywords: { name: "script" },
1432
+ contains: [o],
1433
+ starts: {
1434
+ end: /<\/script>/,
1435
+ returnEnd: !0,
1436
+ subLanguage: [
1437
+ "javascript",
1438
+ "handlebars",
1439
+ "xml"
1440
+ ]
1441
+ }
1442
+ },
1443
+ // we need this for now for jSX
1444
+ {
1445
+ className: "tag",
1446
+ begin: /<>|<\/>/
1447
+ },
1448
+ // open tag
1449
+ {
1450
+ className: "tag",
1451
+ begin: n.concat(
1452
+ /</,
1453
+ n.lookahead(n.concat(
1454
+ t,
1455
+ // <tag/>
1456
+ // <tag>
1457
+ // <tag ...
1458
+ n.either(/\/>/, />/, /\s/)
1459
+ ))
1460
+ ),
1461
+ end: /\/?>/,
1462
+ contains: [
1463
+ {
1464
+ className: "name",
1465
+ begin: t,
1466
+ relevance: 0,
1467
+ starts: o
1468
+ }
1469
+ ]
1470
+ },
1471
+ // close tag
1472
+ {
1473
+ className: "tag",
1474
+ begin: n.concat(
1475
+ /<\//,
1476
+ n.lookahead(n.concat(
1477
+ t,
1478
+ />/
1479
+ ))
1480
+ ),
1481
+ contains: [
1482
+ {
1483
+ className: "name",
1484
+ begin: t,
1485
+ relevance: 0
1486
+ },
1487
+ {
1488
+ begin: />/,
1489
+ relevance: 0,
1490
+ endsParent: !0
1491
+ }
1492
+ ]
1493
+ }
1494
+ ]
1495
+ };
1496
+ }
1497
+ const en = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
1498
+ "as",
1499
+ // for exports
1500
+ "in",
1501
+ "of",
1502
+ "if",
1503
+ "for",
1504
+ "while",
1505
+ "finally",
1506
+ "var",
1507
+ "new",
1508
+ "function",
1509
+ "do",
1510
+ "return",
1511
+ "void",
1512
+ "else",
1513
+ "break",
1514
+ "catch",
1515
+ "instanceof",
1516
+ "with",
1517
+ "throw",
1518
+ "case",
1519
+ "default",
1520
+ "try",
1521
+ "switch",
1522
+ "continue",
1523
+ "typeof",
1524
+ "delete",
1525
+ "let",
1526
+ "yield",
1527
+ "const",
1528
+ "class",
1529
+ // JS handles these with a special rule
1530
+ // "get",
1531
+ // "set",
1532
+ "debugger",
1533
+ "async",
1534
+ "await",
1535
+ "static",
1536
+ "import",
1537
+ "from",
1538
+ "export",
1539
+ "extends"
1540
+ ], Lt = [
1541
+ "true",
1542
+ "false",
1543
+ "null",
1544
+ "undefined",
1545
+ "NaN",
1546
+ "Infinity"
1547
+ ], pn = [
1548
+ // Fundamental objects
1549
+ "Object",
1550
+ "Function",
1551
+ "Boolean",
1552
+ "Symbol",
1553
+ // numbers and dates
1554
+ "Math",
1555
+ "Date",
1556
+ "Number",
1557
+ "BigInt",
1558
+ // text
1559
+ "String",
1560
+ "RegExp",
1561
+ // Indexed collections
1562
+ "Array",
1563
+ "Float32Array",
1564
+ "Float64Array",
1565
+ "Int8Array",
1566
+ "Uint8Array",
1567
+ "Uint8ClampedArray",
1568
+ "Int16Array",
1569
+ "Int32Array",
1570
+ "Uint16Array",
1571
+ "Uint32Array",
1572
+ "BigInt64Array",
1573
+ "BigUint64Array",
1574
+ // Keyed collections
1575
+ "Set",
1576
+ "Map",
1577
+ "WeakSet",
1578
+ "WeakMap",
1579
+ // Structured data
1580
+ "ArrayBuffer",
1581
+ "SharedArrayBuffer",
1582
+ "Atomics",
1583
+ "DataView",
1584
+ "JSON",
1585
+ // Control abstraction objects
1586
+ "Promise",
1587
+ "Generator",
1588
+ "GeneratorFunction",
1589
+ "AsyncFunction",
1590
+ // Reflection
1591
+ "Reflect",
1592
+ "Proxy",
1593
+ // Internationalization
1594
+ "Intl",
1595
+ // WebAssembly
1596
+ "WebAssembly"
1597
+ ], _n = [
1598
+ "Error",
1599
+ "EvalError",
1600
+ "InternalError",
1601
+ "RangeError",
1602
+ "ReferenceError",
1603
+ "SyntaxError",
1604
+ "TypeError",
1605
+ "URIError"
1606
+ ], bn = [
1607
+ "setInterval",
1608
+ "setTimeout",
1609
+ "clearInterval",
1610
+ "clearTimeout",
1611
+ "require",
1612
+ "exports",
1613
+ "eval",
1614
+ "isFinite",
1615
+ "isNaN",
1616
+ "parseFloat",
1617
+ "parseInt",
1618
+ "decodeURI",
1619
+ "decodeURIComponent",
1620
+ "encodeURI",
1621
+ "encodeURIComponent",
1622
+ "escape",
1623
+ "unescape"
1624
+ ], Dt = [
1625
+ "arguments",
1626
+ "this",
1627
+ "super",
1628
+ "console",
1629
+ "window",
1630
+ "document",
1631
+ "localStorage",
1632
+ "module",
1633
+ "global"
1634
+ // Node.js
1635
+ ], Ct = [].concat(
1636
+ bn,
1637
+ pn,
1638
+ _n
1639
+ );
1640
+ function It(e) {
1641
+ const n = e.regex, t = (b, { after: T }) => {
1642
+ const R = "</" + b[0].slice(1);
1643
+ return b.input.indexOf(R, T) !== -1;
1644
+ }, s = en, c = {
1645
+ begin: "<>",
1646
+ end: "</>"
1647
+ }, l = /<[A-Za-z0-9\\._:-]+\s*\/>/, i = {
1648
+ begin: /<[A-Za-z0-9\\._:-]+/,
1649
+ end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
1650
+ /**
1651
+ * @param {RegExpMatchArray} match
1652
+ * @param {CallbackResponse} response
1653
+ */
1654
+ isTrulyOpeningTag: (b, T) => {
1655
+ const R = b[0].length + b.index, I = b.input[R];
1656
+ if (
1657
+ // HTML should not include another raw `<` inside a tag
1658
+ // nested type?
1659
+ // `<Array<Array<number>>`, etc.
1660
+ I === "<" || // the , gives away that this is not HTML
1661
+ // `<T, A extends keyof T, V>`
1662
+ I === ","
1663
+ ) {
1664
+ T.ignoreMatch();
1665
+ return;
1666
+ }
1667
+ I === ">" && (t(b, { after: R }) || T.ignoreMatch());
1668
+ let U;
1669
+ const K = b.input.substring(R);
1670
+ if (U = K.match(/^\s*=/)) {
1671
+ T.ignoreMatch();
1672
+ return;
1673
+ }
1674
+ if ((U = K.match(/^\s+extends\s+/)) && U.index === 0) {
1675
+ T.ignoreMatch();
1676
+ return;
1677
+ }
1678
+ }
1679
+ }, r = {
1680
+ $pattern: en,
1681
+ keyword: xt,
1682
+ literal: Lt,
1683
+ built_in: Ct,
1684
+ "variable.language": Dt
1685
+ }, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, p = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", _ = {
1686
+ className: "number",
1687
+ variants: [
1688
+ // DecimalLiteral
1689
+ { begin: `(\\b(${p})((${o})|\\.)?|(${o}))[eE][+-]?(${a})\\b` },
1690
+ { begin: `\\b(${p})\\b((${o})\\b|\\.)?|(${o})\\b` },
1691
+ // DecimalBigIntegerLiteral
1692
+ { begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
1693
+ // NonDecimalIntegerLiteral
1694
+ { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" },
1695
+ { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" },
1696
+ { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" },
1697
+ // LegacyOctalIntegerLiteral (does not include underscore separators)
1698
+ // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
1699
+ { begin: "\\b0[0-7]+n?\\b" }
1700
+ ],
1701
+ relevance: 0
1702
+ }, f = {
1703
+ className: "subst",
1704
+ begin: "\\$\\{",
1705
+ end: "\\}",
1706
+ keywords: r,
1707
+ contains: []
1708
+ // defined later
1709
+ }, N = {
1710
+ begin: "html`",
1711
+ end: "",
1712
+ starts: {
1713
+ end: "`",
1714
+ returnEnd: !1,
1715
+ contains: [
1716
+ e.BACKSLASH_ESCAPE,
1717
+ f
1718
+ ],
1719
+ subLanguage: "xml"
1720
+ }
1721
+ }, h = {
1722
+ begin: "css`",
1723
+ end: "",
1724
+ starts: {
1725
+ end: "`",
1726
+ returnEnd: !1,
1727
+ contains: [
1728
+ e.BACKSLASH_ESCAPE,
1729
+ f
1730
+ ],
1731
+ subLanguage: "css"
1732
+ }
1733
+ }, g = {
1734
+ className: "string",
1735
+ begin: "`",
1736
+ end: "`",
1737
+ contains: [
1738
+ e.BACKSLASH_ESCAPE,
1739
+ f
1740
+ ]
1741
+ }, S = {
1742
+ className: "comment",
1743
+ variants: [
1744
+ e.COMMENT(
1745
+ /\/\*\*(?!\/)/,
1746
+ "\\*/",
1747
+ {
1748
+ relevance: 0,
1749
+ contains: [
1750
+ {
1751
+ begin: "(?=@[A-Za-z]+)",
1752
+ relevance: 0,
1753
+ contains: [
1754
+ {
1755
+ className: "doctag",
1756
+ begin: "@[A-Za-z]+"
1757
+ },
1758
+ {
1759
+ className: "type",
1760
+ begin: "\\{",
1761
+ end: "\\}",
1762
+ excludeEnd: !0,
1763
+ excludeBegin: !0,
1764
+ relevance: 0
1765
+ },
1766
+ {
1767
+ className: "variable",
1768
+ begin: s + "(?=\\s*(-)|$)",
1769
+ endsParent: !0,
1770
+ relevance: 0
1771
+ },
1772
+ // eat spaces (not newlines) so we can find
1773
+ // types or variables
1774
+ {
1775
+ begin: /(?=[^\n])\s/,
1776
+ relevance: 0
1777
+ }
1778
+ ]
1779
+ }
1780
+ ]
1781
+ }
1782
+ ),
1783
+ e.C_BLOCK_COMMENT_MODE,
1784
+ e.C_LINE_COMMENT_MODE
1785
+ ]
1786
+ }, x = [
1787
+ e.APOS_STRING_MODE,
1788
+ e.QUOTE_STRING_MODE,
1789
+ N,
1790
+ h,
1791
+ g,
1792
+ // Skip numbers when they are part of a variable name
1793
+ { match: /\$\d+/ },
1794
+ _
1795
+ // This is intentional:
1796
+ // See https://github.com/highlightjs/highlight.js/issues/3288
1797
+ // hljs.REGEXP_MODE
1798
+ ];
1799
+ f.contains = x.concat({
1800
+ // we need to pair up {} inside our subst to prevent
1801
+ // it from ending too early by matching another }
1802
+ begin: /\{/,
1803
+ end: /\}/,
1804
+ keywords: r,
1805
+ contains: [
1806
+ "self"
1807
+ ].concat(x)
1808
+ });
1809
+ const y = [].concat(S, f.contains), M = y.concat([
1810
+ // eat recursive parens in sub expressions
1811
+ {
1812
+ begin: /\(/,
1813
+ end: /\)/,
1814
+ keywords: r,
1815
+ contains: ["self"].concat(y)
1816
+ }
1817
+ ]), L = {
1818
+ className: "params",
1819
+ begin: /\(/,
1820
+ end: /\)/,
1821
+ excludeBegin: !0,
1822
+ excludeEnd: !0,
1823
+ keywords: r,
1824
+ contains: M
1825
+ }, D = {
1826
+ variants: [
1827
+ // class Car extends vehicle
1828
+ {
1829
+ match: [
1830
+ /class/,
1831
+ /\s+/,
1832
+ s,
1833
+ /\s+/,
1834
+ /extends/,
1835
+ /\s+/,
1836
+ n.concat(s, "(", n.concat(/\./, s), ")*")
1837
+ ],
1838
+ scope: {
1839
+ 1: "keyword",
1840
+ 3: "title.class",
1841
+ 5: "keyword",
1842
+ 7: "title.class.inherited"
1843
+ }
1844
+ },
1845
+ // class Car
1846
+ {
1847
+ match: [
1848
+ /class/,
1849
+ /\s+/,
1850
+ s
1851
+ ],
1852
+ scope: {
1853
+ 1: "keyword",
1854
+ 3: "title.class"
1855
+ }
1856
+ }
1857
+ ]
1858
+ }, k = {
1859
+ relevance: 0,
1860
+ match: n.either(
1861
+ // Hard coded exceptions
1862
+ /\bJSON/,
1863
+ // Float32Array, OutT
1864
+ /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,
1865
+ // CSSFactory, CSSFactoryT
1866
+ /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,
1867
+ // FPs, FPsT
1868
+ /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/
1869
+ // P
1870
+ // single letters are not highlighted
1871
+ // BLAH
1872
+ // this will be flagged as a UPPER_CASE_CONSTANT instead
1873
+ ),
1874
+ className: "title.class",
1875
+ keywords: {
1876
+ _: [
1877
+ // se we still get relevance credit for JS library classes
1878
+ ...pn,
1879
+ ..._n
1880
+ ]
1881
+ }
1882
+ }, H = {
1883
+ label: "use_strict",
1884
+ className: "meta",
1885
+ relevance: 10,
1886
+ begin: /^\s*['"]use (strict|asm)['"]/
1887
+ }, z = {
1888
+ variants: [
1889
+ {
1890
+ match: [
1891
+ /function/,
1892
+ /\s+/,
1893
+ s,
1894
+ /(?=\s*\()/
1895
+ ]
1896
+ },
1897
+ // anonymous function
1898
+ {
1899
+ match: [
1900
+ /function/,
1901
+ /\s*(?=\()/
1902
+ ]
1903
+ }
1904
+ ],
1905
+ className: {
1906
+ 1: "keyword",
1907
+ 3: "title.function"
1908
+ },
1909
+ label: "func.def",
1910
+ contains: [L],
1911
+ illegal: /%/
1912
+ }, ne = {
1913
+ relevance: 0,
1914
+ match: /\b[A-Z][A-Z_0-9]+\b/,
1915
+ className: "variable.constant"
1916
+ };
1917
+ function te(b) {
1918
+ return n.concat("(?!", b.join("|"), ")");
1919
+ }
1920
+ const oe = {
1921
+ match: n.concat(
1922
+ /\b/,
1923
+ te([
1924
+ ...bn,
1925
+ "super",
1926
+ "import"
1927
+ ]),
1928
+ s,
1929
+ n.lookahead(/\(/)
1930
+ ),
1931
+ className: "title.function",
1932
+ relevance: 0
1933
+ }, Se = {
1934
+ begin: n.concat(/\./, n.lookahead(
1935
+ n.concat(s, /(?![0-9A-Za-z$_(])/)
1936
+ )),
1937
+ end: s,
1938
+ excludeBegin: !0,
1939
+ keywords: "prototype",
1940
+ className: "property",
1941
+ relevance: 0
1942
+ }, se = {
1943
+ match: [
1944
+ /get|set/,
1945
+ /\s+/,
1946
+ s,
1947
+ /(?=\()/
1948
+ ],
1949
+ className: {
1950
+ 1: "keyword",
1951
+ 3: "title.function"
1952
+ },
1953
+ contains: [
1954
+ {
1955
+ // eat to avoid empty params
1956
+ begin: /\(\)/
1957
+ },
1958
+ L
1959
+ ]
1960
+ }, pe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", u = {
1961
+ match: [
1962
+ /const|var|let/,
1963
+ /\s+/,
1964
+ s,
1965
+ /\s*/,
1966
+ /=\s*/,
1967
+ /(async\s*)?/,
1968
+ // async is optional
1969
+ n.lookahead(pe)
1970
+ ],
1971
+ keywords: "async",
1972
+ className: {
1973
+ 1: "keyword",
1974
+ 3: "title.function"
1975
+ },
1976
+ contains: [
1977
+ L
1978
+ ]
1979
+ };
1980
+ return {
1981
+ name: "Javascript",
1982
+ aliases: ["js", "jsx", "mjs", "cjs"],
1983
+ keywords: r,
1984
+ // this will be extended by TypeScript
1985
+ exports: { PARAMS_CONTAINS: M, CLASS_REFERENCE: k },
1986
+ illegal: /#(?![$_A-z])/,
1987
+ contains: [
1988
+ e.SHEBANG({
1989
+ label: "shebang",
1990
+ binary: "node",
1991
+ relevance: 5
1992
+ }),
1993
+ H,
1994
+ e.APOS_STRING_MODE,
1995
+ e.QUOTE_STRING_MODE,
1996
+ N,
1997
+ h,
1998
+ g,
1999
+ S,
2000
+ // Skip numbers when they are part of a variable name
2001
+ { match: /\$\d+/ },
2002
+ _,
2003
+ k,
2004
+ {
2005
+ className: "attr",
2006
+ begin: s + n.lookahead(":"),
2007
+ relevance: 0
2008
+ },
2009
+ u,
2010
+ {
2011
+ // "value" container
2012
+ begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
2013
+ keywords: "return throw case",
2014
+ relevance: 0,
2015
+ contains: [
2016
+ S,
2017
+ e.REGEXP_MODE,
2018
+ {
2019
+ className: "function",
2020
+ // we have to count the parens to make sure we actually have the
2021
+ // correct bounding ( ) before the =>. There could be any number of
2022
+ // sub-expressions inside also surrounded by parens.
2023
+ begin: pe,
2024
+ returnBegin: !0,
2025
+ end: "\\s*=>",
2026
+ contains: [
2027
+ {
2028
+ className: "params",
2029
+ variants: [
2030
+ {
2031
+ begin: e.UNDERSCORE_IDENT_RE,
2032
+ relevance: 0
2033
+ },
2034
+ {
2035
+ className: null,
2036
+ begin: /\(\s*\)/,
2037
+ skip: !0
2038
+ },
2039
+ {
2040
+ begin: /\(/,
2041
+ end: /\)/,
2042
+ excludeBegin: !0,
2043
+ excludeEnd: !0,
2044
+ keywords: r,
2045
+ contains: M
2046
+ }
2047
+ ]
2048
+ }
2049
+ ]
2050
+ },
2051
+ {
2052
+ // could be a comma delimited list of params to a function call
2053
+ begin: /,/,
2054
+ relevance: 0
2055
+ },
2056
+ {
2057
+ match: /\s+/,
2058
+ relevance: 0
2059
+ },
2060
+ {
2061
+ // JSX
2062
+ variants: [
2063
+ { begin: c.begin, end: c.end },
2064
+ { match: l },
2065
+ {
2066
+ begin: i.begin,
2067
+ // we carefully check the opening tag to see if it truly
2068
+ // is a tag and not a false positive
2069
+ "on:begin": i.isTrulyOpeningTag,
2070
+ end: i.end
2071
+ }
2072
+ ],
2073
+ subLanguage: "xml",
2074
+ contains: [
2075
+ {
2076
+ begin: i.begin,
2077
+ end: i.end,
2078
+ skip: !0,
2079
+ contains: ["self"]
2080
+ }
2081
+ ]
2082
+ }
2083
+ ]
2084
+ },
2085
+ z,
2086
+ {
2087
+ // prevent this from getting swallowed up by function
2088
+ // since they appear "function like"
2089
+ beginKeywords: "while if switch catch for"
2090
+ },
2091
+ {
2092
+ // we have to count the parens to make sure we actually have the correct
2093
+ // bounding ( ). There could be any number of sub-expressions inside
2094
+ // also surrounded by parens.
2095
+ begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
2096
+ // end parens
2097
+ returnBegin: !0,
2098
+ label: "func.def",
2099
+ contains: [
2100
+ L,
2101
+ e.inherit(e.TITLE_MODE, { begin: s, className: "title.function" })
2102
+ ]
2103
+ },
2104
+ // catch ... so it won't trigger the property rule below
2105
+ {
2106
+ match: /\.\.\./,
2107
+ relevance: 0
2108
+ },
2109
+ Se,
2110
+ // hack: prevents detection of keywords in some circumstances
2111
+ // .keyword()
2112
+ // $keyword = x
2113
+ {
2114
+ match: "\\$" + s,
2115
+ relevance: 0
2116
+ },
2117
+ {
2118
+ match: [/\bconstructor(?=\s*\()/],
2119
+ className: { 1: "title.function" },
2120
+ contains: [L]
2121
+ },
2122
+ oe,
2123
+ ne,
2124
+ D,
2125
+ se,
2126
+ {
2127
+ match: /\$[(.]/
2128
+ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
2129
+ }
2130
+ ]
2131
+ };
2132
+ }
2133
+ function kt(e) {
2134
+ const n = {
2135
+ className: "attr",
2136
+ begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
2137
+ relevance: 1.01
2138
+ }, t = {
2139
+ match: /[{}[\],:]/,
2140
+ className: "punctuation",
2141
+ relevance: 0
2142
+ }, s = [
2143
+ "true",
2144
+ "false",
2145
+ "null"
2146
+ ], c = {
2147
+ scope: "literal",
2148
+ beginKeywords: s.join(" ")
2149
+ };
2150
+ return {
2151
+ name: "JSON",
2152
+ keywords: {
2153
+ literal: s
2154
+ },
2155
+ contains: [
2156
+ n,
2157
+ t,
2158
+ e.QUOTE_STRING_MODE,
2159
+ c,
2160
+ e.C_NUMBER_MODE,
2161
+ e.C_LINE_COMMENT_MODE,
2162
+ e.C_BLOCK_COMMENT_MODE
2163
+ ],
2164
+ illegal: "\\S"
2165
+ };
2166
+ }
2167
+ function Bt(e) {
2168
+ const n = "true false yes no null", t = "[\\w#;/?:@&=+$,.~*'()[\\]]+", s = {
2169
+ className: "attr",
2170
+ variants: [
2171
+ { begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
2172
+ {
2173
+ // double quoted keys
2174
+ begin: '"\\w[\\w :\\/.-]*":(?=[ ]|$)'
2175
+ },
2176
+ {
2177
+ // single quoted keys
2178
+ begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
2179
+ }
2180
+ ]
2181
+ }, c = {
2182
+ className: "template-variable",
2183
+ variants: [
2184
+ {
2185
+ // jinja templates Ansible
2186
+ begin: /\{\{/,
2187
+ end: /\}\}/
2188
+ },
2189
+ {
2190
+ // Ruby i18n
2191
+ begin: /%\{/,
2192
+ end: /\}/
2193
+ }
2194
+ ]
2195
+ }, l = {
2196
+ className: "string",
2197
+ relevance: 0,
2198
+ variants: [
2199
+ {
2200
+ begin: /'/,
2201
+ end: /'/
2202
+ },
2203
+ {
2204
+ begin: /"/,
2205
+ end: /"/
2206
+ },
2207
+ { begin: /\S+/ }
2208
+ ],
2209
+ contains: [
2210
+ e.BACKSLASH_ESCAPE,
2211
+ c
2212
+ ]
2213
+ }, i = e.inherit(l, { variants: [
2214
+ {
2215
+ begin: /'/,
2216
+ end: /'/
2217
+ },
2218
+ {
2219
+ begin: /"/,
2220
+ end: /"/
2221
+ },
2222
+ { begin: /[^\s,{}[\]]+/ }
2223
+ ] }), r = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", p = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", _ = {
2224
+ className: "number",
2225
+ begin: "\\b" + r + a + o + p + "\\b"
2226
+ }, f = {
2227
+ end: ",",
2228
+ endsWithParent: !0,
2229
+ excludeEnd: !0,
2230
+ keywords: n,
2231
+ relevance: 0
2232
+ }, N = {
2233
+ begin: /\{/,
2234
+ end: /\}/,
2235
+ contains: [f],
2236
+ illegal: "\\n",
2237
+ relevance: 0
2238
+ }, h = {
2239
+ begin: "\\[",
2240
+ end: "\\]",
2241
+ contains: [f],
2242
+ illegal: "\\n",
2243
+ relevance: 0
2244
+ }, g = [
2245
+ s,
2246
+ {
2247
+ className: "meta",
2248
+ begin: "^---\\s*$",
2249
+ relevance: 10
2250
+ },
2251
+ {
2252
+ // multi line string
2253
+ // Blocks start with a | or > followed by a newline
2254
+ //
2255
+ // Indentation of subsequent lines must be the same to
2256
+ // be considered part of the block
2257
+ className: "string",
2258
+ begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"
2259
+ },
2260
+ {
2261
+ // Ruby/Rails erb
2262
+ begin: "<%[%=-]?",
2263
+ end: "[%-]?%>",
2264
+ subLanguage: "ruby",
2265
+ excludeBegin: !0,
2266
+ excludeEnd: !0,
2267
+ relevance: 0
2268
+ },
2269
+ {
2270
+ // named tags
2271
+ className: "type",
2272
+ begin: "!\\w+!" + t
2273
+ },
2274
+ // https://yaml.org/spec/1.2/spec.html#id2784064
2275
+ {
2276
+ // verbatim tags
2277
+ className: "type",
2278
+ begin: "!<" + t + ">"
2279
+ },
2280
+ {
2281
+ // primary tags
2282
+ className: "type",
2283
+ begin: "!" + t
2284
+ },
2285
+ {
2286
+ // secondary tags
2287
+ className: "type",
2288
+ begin: "!!" + t
2289
+ },
2290
+ {
2291
+ // fragment id &ref
2292
+ className: "meta",
2293
+ begin: "&" + e.UNDERSCORE_IDENT_RE + "$"
2294
+ },
2295
+ {
2296
+ // fragment reference *ref
2297
+ className: "meta",
2298
+ begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$"
2299
+ },
2300
+ {
2301
+ // array listing
2302
+ className: "bullet",
2303
+ // TODO: remove |$ hack when we have proper look-ahead support
2304
+ begin: "-(?=[ ]|$)",
2305
+ relevance: 0
2306
+ },
2307
+ e.HASH_COMMENT_MODE,
2308
+ {
2309
+ beginKeywords: n,
2310
+ keywords: { literal: n }
2311
+ },
2312
+ _,
2313
+ // numbers are any valid C-style number that
2314
+ // sit isolated from other words
2315
+ {
2316
+ className: "number",
2317
+ begin: e.C_NUMBER_RE + "\\b",
2318
+ relevance: 0
2319
+ },
2320
+ N,
2321
+ h,
2322
+ l
2323
+ ], A = [...g];
2324
+ return A.pop(), A.push(i), f.contains = A, {
2325
+ name: "YAML",
2326
+ case_insensitive: !0,
2327
+ aliases: ["yml"],
2328
+ contains: g
2329
+ };
2330
+ }
2331
+ function $t(e) {
2332
+ return {
2333
+ name: "Plain text",
2334
+ aliases: [
2335
+ "text",
2336
+ "txt"
2337
+ ],
2338
+ disableAutodetect: !0
2339
+ };
2340
+ }
2341
+ function Ut(e) {
2342
+ const n = e.regex, t = /[\p{XID_Start}_]\p{XID_Continue}*/u, s = [
2343
+ "and",
2344
+ "as",
2345
+ "assert",
2346
+ "async",
2347
+ "await",
2348
+ "break",
2349
+ "case",
2350
+ "class",
2351
+ "continue",
2352
+ "def",
2353
+ "del",
2354
+ "elif",
2355
+ "else",
2356
+ "except",
2357
+ "finally",
2358
+ "for",
2359
+ "from",
2360
+ "global",
2361
+ "if",
2362
+ "import",
2363
+ "in",
2364
+ "is",
2365
+ "lambda",
2366
+ "match",
2367
+ "nonlocal|10",
2368
+ "not",
2369
+ "or",
2370
+ "pass",
2371
+ "raise",
2372
+ "return",
2373
+ "try",
2374
+ "while",
2375
+ "with",
2376
+ "yield"
2377
+ ], r = {
2378
+ $pattern: /[A-Za-z]\w+|__\w+__/,
2379
+ keyword: s,
2380
+ built_in: [
2381
+ "__import__",
2382
+ "abs",
2383
+ "all",
2384
+ "any",
2385
+ "ascii",
2386
+ "bin",
2387
+ "bool",
2388
+ "breakpoint",
2389
+ "bytearray",
2390
+ "bytes",
2391
+ "callable",
2392
+ "chr",
2393
+ "classmethod",
2394
+ "compile",
2395
+ "complex",
2396
+ "delattr",
2397
+ "dict",
2398
+ "dir",
2399
+ "divmod",
2400
+ "enumerate",
2401
+ "eval",
2402
+ "exec",
2403
+ "filter",
2404
+ "float",
2405
+ "format",
2406
+ "frozenset",
2407
+ "getattr",
2408
+ "globals",
2409
+ "hasattr",
2410
+ "hash",
2411
+ "help",
2412
+ "hex",
2413
+ "id",
2414
+ "input",
2415
+ "int",
2416
+ "isinstance",
2417
+ "issubclass",
2418
+ "iter",
2419
+ "len",
2420
+ "list",
2421
+ "locals",
2422
+ "map",
2423
+ "max",
2424
+ "memoryview",
2425
+ "min",
2426
+ "next",
2427
+ "object",
2428
+ "oct",
2429
+ "open",
2430
+ "ord",
2431
+ "pow",
2432
+ "print",
2433
+ "property",
2434
+ "range",
2435
+ "repr",
2436
+ "reversed",
2437
+ "round",
2438
+ "set",
2439
+ "setattr",
2440
+ "slice",
2441
+ "sorted",
2442
+ "staticmethod",
2443
+ "str",
2444
+ "sum",
2445
+ "super",
2446
+ "tuple",
2447
+ "type",
2448
+ "vars",
2449
+ "zip"
2450
+ ],
2451
+ literal: [
2452
+ "__debug__",
2453
+ "Ellipsis",
2454
+ "False",
2455
+ "None",
2456
+ "NotImplemented",
2457
+ "True"
2458
+ ],
2459
+ type: [
2460
+ "Any",
2461
+ "Callable",
2462
+ "Coroutine",
2463
+ "Dict",
2464
+ "List",
2465
+ "Literal",
2466
+ "Generic",
2467
+ "Optional",
2468
+ "Sequence",
2469
+ "Set",
2470
+ "Tuple",
2471
+ "Type",
2472
+ "Union"
2473
+ ]
2474
+ }, a = {
2475
+ className: "meta",
2476
+ begin: /^(>>>|\.\.\.) /
2477
+ }, o = {
2478
+ className: "subst",
2479
+ begin: /\{/,
2480
+ end: /\}/,
2481
+ keywords: r,
2482
+ illegal: /#/
2483
+ }, p = {
2484
+ begin: /\{\{/,
2485
+ relevance: 0
2486
+ }, _ = {
2487
+ className: "string",
2488
+ contains: [e.BACKSLASH_ESCAPE],
2489
+ variants: [
2490
+ {
2491
+ begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
2492
+ end: /'''/,
2493
+ contains: [
2494
+ e.BACKSLASH_ESCAPE,
2495
+ a
2496
+ ],
2497
+ relevance: 10
2498
+ },
2499
+ {
2500
+ begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
2501
+ end: /"""/,
2502
+ contains: [
2503
+ e.BACKSLASH_ESCAPE,
2504
+ a
2505
+ ],
2506
+ relevance: 10
2507
+ },
2508
+ {
2509
+ begin: /([fF][rR]|[rR][fF]|[fF])'''/,
2510
+ end: /'''/,
2511
+ contains: [
2512
+ e.BACKSLASH_ESCAPE,
2513
+ a,
2514
+ p,
2515
+ o
2516
+ ]
2517
+ },
2518
+ {
2519
+ begin: /([fF][rR]|[rR][fF]|[fF])"""/,
2520
+ end: /"""/,
2521
+ contains: [
2522
+ e.BACKSLASH_ESCAPE,
2523
+ a,
2524
+ p,
2525
+ o
2526
+ ]
2527
+ },
2528
+ {
2529
+ begin: /([uU]|[rR])'/,
2530
+ end: /'/,
2531
+ relevance: 10
2532
+ },
2533
+ {
2534
+ begin: /([uU]|[rR])"/,
2535
+ end: /"/,
2536
+ relevance: 10
2537
+ },
2538
+ {
2539
+ begin: /([bB]|[bB][rR]|[rR][bB])'/,
2540
+ end: /'/
2541
+ },
2542
+ {
2543
+ begin: /([bB]|[bB][rR]|[rR][bB])"/,
2544
+ end: /"/
2545
+ },
2546
+ {
2547
+ begin: /([fF][rR]|[rR][fF]|[fF])'/,
2548
+ end: /'/,
2549
+ contains: [
2550
+ e.BACKSLASH_ESCAPE,
2551
+ p,
2552
+ o
2553
+ ]
2554
+ },
2555
+ {
2556
+ begin: /([fF][rR]|[rR][fF]|[fF])"/,
2557
+ end: /"/,
2558
+ contains: [
2559
+ e.BACKSLASH_ESCAPE,
2560
+ p,
2561
+ o
2562
+ ]
2563
+ },
2564
+ e.APOS_STRING_MODE,
2565
+ e.QUOTE_STRING_MODE
2566
+ ]
2567
+ }, f = "[0-9](_?[0-9])*", N = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`, h = `\\b|${s.join("|")}`, g = {
2568
+ className: "number",
2569
+ relevance: 0,
2570
+ variants: [
2571
+ // exponentfloat, pointfloat
2572
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
2573
+ // optionally imaginary
2574
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
2575
+ // Note: no leading \b because floats can start with a decimal point
2576
+ // and we don't want to mishandle e.g. `fn(.5)`,
2577
+ // no trailing \b for pointfloat because it can end with a decimal point
2578
+ // and we don't want to mishandle e.g. `0..hex()`; this should be safe
2579
+ // because both MUST contain a decimal point and so cannot be confused with
2580
+ // the interior part of an identifier
2581
+ {
2582
+ begin: `(\\b(${f})|(${N}))[eE][+-]?(${f})[jJ]?(?=${h})`
2583
+ },
2584
+ {
2585
+ begin: `(${N})[jJ]?`
2586
+ },
2587
+ // decinteger, bininteger, octinteger, hexinteger
2588
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
2589
+ // optionally "long" in Python 2
2590
+ // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
2591
+ // decinteger is optionally imaginary
2592
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
2593
+ {
2594
+ begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`
2595
+ },
2596
+ {
2597
+ begin: `\\b0[bB](_?[01])+[lL]?(?=${h})`
2598
+ },
2599
+ {
2600
+ begin: `\\b0[oO](_?[0-7])+[lL]?(?=${h})`
2601
+ },
2602
+ {
2603
+ begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`
2604
+ },
2605
+ // imagnumber (digitpart-based)
2606
+ // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
2607
+ {
2608
+ begin: `\\b(${f})[jJ](?=${h})`
2609
+ }
2610
+ ]
2611
+ }, A = {
2612
+ className: "comment",
2613
+ begin: n.lookahead(/# type:/),
2614
+ end: /$/,
2615
+ keywords: r,
2616
+ contains: [
2617
+ {
2618
+ // prevent keywords from coloring `type`
2619
+ begin: /# type:/
2620
+ },
2621
+ // comment within a datatype comment includes no keywords
2622
+ {
2623
+ begin: /#/,
2624
+ end: /\b\B/,
2625
+ endsWithParent: !0
2626
+ }
2627
+ ]
2628
+ }, S = {
2629
+ className: "params",
2630
+ variants: [
2631
+ // Exclude params in functions without params
2632
+ {
2633
+ className: "",
2634
+ begin: /\(\s*\)/,
2635
+ skip: !0
2636
+ },
2637
+ {
2638
+ begin: /\(/,
2639
+ end: /\)/,
2640
+ excludeBegin: !0,
2641
+ excludeEnd: !0,
2642
+ keywords: r,
2643
+ contains: [
2644
+ "self",
2645
+ a,
2646
+ g,
2647
+ _,
2648
+ e.HASH_COMMENT_MODE
2649
+ ]
2650
+ }
2651
+ ]
2652
+ };
2653
+ return o.contains = [
2654
+ _,
2655
+ g,
2656
+ a
2657
+ ], {
2658
+ name: "Python",
2659
+ aliases: [
2660
+ "py",
2661
+ "gyp",
2662
+ "ipython"
2663
+ ],
2664
+ unicodeRegex: !0,
2665
+ keywords: r,
2666
+ illegal: /(<\/|->|\?)|=>/,
2667
+ contains: [
2668
+ a,
2669
+ g,
2670
+ {
2671
+ // very common convention
2672
+ begin: /\bself\b/
2673
+ },
2674
+ {
2675
+ // eat "if" prior to string so that it won't accidentally be
2676
+ // labeled as an f-string
2677
+ beginKeywords: "if",
2678
+ relevance: 0
2679
+ },
2680
+ _,
2681
+ A,
2682
+ e.HASH_COMMENT_MODE,
2683
+ {
2684
+ match: [
2685
+ /\bdef/,
2686
+ /\s+/,
2687
+ t
2688
+ ],
2689
+ scope: {
2690
+ 1: "keyword",
2691
+ 3: "title.function"
2692
+ },
2693
+ contains: [S]
2694
+ },
2695
+ {
2696
+ variants: [
2697
+ {
2698
+ match: [
2699
+ /\bclass/,
2700
+ /\s+/,
2701
+ t,
2702
+ /\s*/,
2703
+ /\(\s*/,
2704
+ t,
2705
+ /\s*\)/
2706
+ ]
2707
+ },
2708
+ {
2709
+ match: [
2710
+ /\bclass/,
2711
+ /\s+/,
2712
+ t
2713
+ ]
2714
+ }
2715
+ ],
2716
+ scope: {
2717
+ 1: "keyword",
2718
+ 3: "title.class",
2719
+ 6: "title.class.inherited"
2720
+ }
2721
+ },
2722
+ {
2723
+ className: "meta",
2724
+ begin: /^[\t ]*@/,
2725
+ end: /(?=#)|$/,
2726
+ contains: [
2727
+ g,
2728
+ S,
2729
+ _
2730
+ ]
2731
+ }
2732
+ ]
2733
+ };
2734
+ }
2735
+ var re = "[0-9](_*[0-9])*", ye = `\\.(${re})`, ve = "[0-9a-fA-F](_*[0-9a-fA-F])*", nn = {
2736
+ className: "number",
2737
+ variants: [
2738
+ // DecimalFloatingPointLiteral
2739
+ // including ExponentPart
2740
+ { begin: `(\\b(${re})((${ye})|\\.)?|(${ye}))[eE][+-]?(${re})[fFdD]?\\b` },
2741
+ // excluding ExponentPart
2742
+ { begin: `\\b(${re})((${ye})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
2743
+ { begin: `(${ye})[fFdD]?\\b` },
2744
+ { begin: `\\b(${re})[fFdD]\\b` },
2745
+ // HexadecimalFloatingPointLiteral
2746
+ { begin: `\\b0[xX]((${ve})\\.?|(${ve})?\\.(${ve}))[pP][+-]?(${re})[fFdD]?\\b` },
2747
+ // DecimalIntegerLiteral
2748
+ { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
2749
+ // HexIntegerLiteral
2750
+ { begin: `\\b0[xX](${ve})[lL]?\\b` },
2751
+ // OctalIntegerLiteral
2752
+ { begin: "\\b0(_*[0-7])*[lL]?\\b" },
2753
+ // BinaryIntegerLiteral
2754
+ { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
2755
+ ],
2756
+ relevance: 0
2757
+ };
2758
+ function hn(e, n, t) {
2759
+ return t === -1 ? "" : e.replace(n, (s) => hn(e, n, t - 1));
2760
+ }
2761
+ function Pt(e) {
2762
+ const n = e.regex, t = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", s = t + hn("(?:<" + t + "~~~(?:\\s*,\\s*" + t + "~~~)*>)?", /~~~/g, 2), a = {
2763
+ keyword: [
2764
+ "synchronized",
2765
+ "abstract",
2766
+ "private",
2767
+ "var",
2768
+ "static",
2769
+ "if",
2770
+ "const ",
2771
+ "for",
2772
+ "while",
2773
+ "strictfp",
2774
+ "finally",
2775
+ "protected",
2776
+ "import",
2777
+ "native",
2778
+ "final",
2779
+ "void",
2780
+ "enum",
2781
+ "else",
2782
+ "break",
2783
+ "transient",
2784
+ "catch",
2785
+ "instanceof",
2786
+ "volatile",
2787
+ "case",
2788
+ "assert",
2789
+ "package",
2790
+ "default",
2791
+ "public",
2792
+ "try",
2793
+ "switch",
2794
+ "continue",
2795
+ "throws",
2796
+ "protected",
2797
+ "public",
2798
+ "private",
2799
+ "module",
2800
+ "requires",
2801
+ "exports",
2802
+ "do",
2803
+ "sealed",
2804
+ "yield",
2805
+ "permits"
2806
+ ],
2807
+ literal: [
2808
+ "false",
2809
+ "true",
2810
+ "null"
2811
+ ],
2812
+ type: [
2813
+ "char",
2814
+ "boolean",
2815
+ "long",
2816
+ "float",
2817
+ "int",
2818
+ "byte",
2819
+ "short",
2820
+ "double"
2821
+ ],
2822
+ built_in: [
2823
+ "super",
2824
+ "this"
2825
+ ]
2826
+ }, o = {
2827
+ className: "meta",
2828
+ begin: "@" + t,
2829
+ contains: [
2830
+ {
2831
+ begin: /\(/,
2832
+ end: /\)/,
2833
+ contains: ["self"]
2834
+ // allow nested () inside our annotation
2835
+ }
2836
+ ]
2837
+ }, p = {
2838
+ className: "params",
2839
+ begin: /\(/,
2840
+ end: /\)/,
2841
+ keywords: a,
2842
+ relevance: 0,
2843
+ contains: [e.C_BLOCK_COMMENT_MODE],
2844
+ endsParent: !0
2845
+ };
2846
+ return {
2847
+ name: "Java",
2848
+ aliases: ["jsp"],
2849
+ keywords: a,
2850
+ illegal: /<\/|#/,
2851
+ contains: [
2852
+ e.COMMENT(
2853
+ "/\\*\\*",
2854
+ "\\*/",
2855
+ {
2856
+ relevance: 0,
2857
+ contains: [
2858
+ {
2859
+ // eat up @'s in emails to prevent them to be recognized as doctags
2860
+ begin: /\w+@/,
2861
+ relevance: 0
2862
+ },
2863
+ {
2864
+ className: "doctag",
2865
+ begin: "@[A-Za-z]+"
2866
+ }
2867
+ ]
2868
+ }
2869
+ ),
2870
+ // relevance boost
2871
+ {
2872
+ begin: /import java\.[a-z]+\./,
2873
+ keywords: "import",
2874
+ relevance: 2
2875
+ },
2876
+ e.C_LINE_COMMENT_MODE,
2877
+ e.C_BLOCK_COMMENT_MODE,
2878
+ {
2879
+ begin: /"""/,
2880
+ end: /"""/,
2881
+ className: "string",
2882
+ contains: [e.BACKSLASH_ESCAPE]
2883
+ },
2884
+ e.APOS_STRING_MODE,
2885
+ e.QUOTE_STRING_MODE,
2886
+ {
2887
+ match: [
2888
+ /\b(?:class|interface|enum|extends|implements|new)/,
2889
+ /\s+/,
2890
+ t
2891
+ ],
2892
+ className: {
2893
+ 1: "keyword",
2894
+ 3: "title.class"
2895
+ }
2896
+ },
2897
+ {
2898
+ // Exceptions for hyphenated keywords
2899
+ match: /non-sealed/,
2900
+ scope: "keyword"
2901
+ },
2902
+ {
2903
+ begin: [
2904
+ n.concat(/(?!else)/, t),
2905
+ /\s+/,
2906
+ t,
2907
+ /\s+/,
2908
+ /=(?!=)/
2909
+ ],
2910
+ className: {
2911
+ 1: "type",
2912
+ 3: "variable",
2913
+ 5: "operator"
2914
+ }
2915
+ },
2916
+ {
2917
+ begin: [
2918
+ /record/,
2919
+ /\s+/,
2920
+ t
2921
+ ],
2922
+ className: {
2923
+ 1: "keyword",
2924
+ 3: "title.class"
2925
+ },
2926
+ contains: [
2927
+ p,
2928
+ e.C_LINE_COMMENT_MODE,
2929
+ e.C_BLOCK_COMMENT_MODE
2930
+ ]
2931
+ },
2932
+ {
2933
+ // Expression keywords prevent 'keyword Name(...)' from being
2934
+ // recognized as a function definition
2935
+ beginKeywords: "new throw return else",
2936
+ relevance: 0
2937
+ },
2938
+ {
2939
+ begin: [
2940
+ "(?:" + s + "\\s+)",
2941
+ e.UNDERSCORE_IDENT_RE,
2942
+ /\s*(?=\()/
2943
+ ],
2944
+ className: { 2: "title.function" },
2945
+ keywords: a,
2946
+ contains: [
2947
+ {
2948
+ className: "params",
2949
+ begin: /\(/,
2950
+ end: /\)/,
2951
+ keywords: a,
2952
+ relevance: 0,
2953
+ contains: [
2954
+ o,
2955
+ e.APOS_STRING_MODE,
2956
+ e.QUOTE_STRING_MODE,
2957
+ nn,
2958
+ e.C_BLOCK_COMMENT_MODE
2959
+ ]
2960
+ },
2961
+ e.C_LINE_COMMENT_MODE,
2962
+ e.C_BLOCK_COMMENT_MODE
2963
+ ]
2964
+ },
2965
+ nn,
2966
+ o
2967
+ ]
2968
+ };
2969
+ }
2970
+ function Ht(e) {
2971
+ const n = e.regex, t = {}, s = {
2972
+ begin: /\$\{/,
2973
+ end: /\}/,
2974
+ contains: [
2975
+ "self",
2976
+ {
2977
+ begin: /:-/,
2978
+ contains: [t]
2979
+ }
2980
+ // default values
2981
+ ]
2982
+ };
2983
+ Object.assign(t, {
2984
+ className: "variable",
2985
+ variants: [
2986
+ { begin: n.concat(
2987
+ /\$[\w\d#@][\w\d_]*/,
2988
+ // negative look-ahead tries to avoid matching patterns that are not
2989
+ // Perl at all like $ident$, @ident@, etc.
2990
+ "(?![\\w\\d])(?![$])"
2991
+ ) },
2992
+ s
2993
+ ]
2994
+ });
2995
+ const c = {
2996
+ className: "subst",
2997
+ begin: /\$\(/,
2998
+ end: /\)/,
2999
+ contains: [e.BACKSLASH_ESCAPE]
3000
+ }, l = {
3001
+ begin: /<<-?\s*(?=\w+)/,
3002
+ starts: { contains: [
3003
+ e.END_SAME_AS_BEGIN({
3004
+ begin: /(\w+)/,
3005
+ end: /(\w+)/,
3006
+ className: "string"
3007
+ })
3008
+ ] }
3009
+ }, i = {
3010
+ className: "string",
3011
+ begin: /"/,
3012
+ end: /"/,
3013
+ contains: [
3014
+ e.BACKSLASH_ESCAPE,
3015
+ t,
3016
+ c
3017
+ ]
3018
+ };
3019
+ c.contains.push(i);
3020
+ const r = {
3021
+ className: "",
3022
+ begin: /\\"/
3023
+ }, a = {
3024
+ className: "string",
3025
+ begin: /'/,
3026
+ end: /'/
3027
+ }, o = {
3028
+ begin: /\$?\(\(/,
3029
+ end: /\)\)/,
3030
+ contains: [
3031
+ {
3032
+ begin: /\d+#[0-9a-f]+/,
3033
+ className: "number"
3034
+ },
3035
+ e.NUMBER_MODE,
3036
+ t
3037
+ ]
3038
+ }, p = [
3039
+ "fish",
3040
+ "bash",
3041
+ "zsh",
3042
+ "sh",
3043
+ "csh",
3044
+ "ksh",
3045
+ "tcsh",
3046
+ "dash",
3047
+ "scsh"
3048
+ ], _ = e.SHEBANG({
3049
+ binary: `(${p.join("|")})`,
3050
+ relevance: 10
3051
+ }), f = {
3052
+ className: "function",
3053
+ begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
3054
+ returnBegin: !0,
3055
+ contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
3056
+ relevance: 0
3057
+ }, N = [
3058
+ "if",
3059
+ "then",
3060
+ "else",
3061
+ "elif",
3062
+ "fi",
3063
+ "for",
3064
+ "while",
3065
+ "in",
3066
+ "do",
3067
+ "done",
3068
+ "case",
3069
+ "esac",
3070
+ "function"
3071
+ ], h = [
3072
+ "true",
3073
+ "false"
3074
+ ], g = { match: /(\/[a-z._-]+)+/ }, A = [
3075
+ "break",
3076
+ "cd",
3077
+ "continue",
3078
+ "eval",
3079
+ "exec",
3080
+ "exit",
3081
+ "export",
3082
+ "getopts",
3083
+ "hash",
3084
+ "pwd",
3085
+ "readonly",
3086
+ "return",
3087
+ "shift",
3088
+ "test",
3089
+ "times",
3090
+ "trap",
3091
+ "umask",
3092
+ "unset"
3093
+ ], S = [
3094
+ "alias",
3095
+ "bind",
3096
+ "builtin",
3097
+ "caller",
3098
+ "command",
3099
+ "declare",
3100
+ "echo",
3101
+ "enable",
3102
+ "help",
3103
+ "let",
3104
+ "local",
3105
+ "logout",
3106
+ "mapfile",
3107
+ "printf",
3108
+ "read",
3109
+ "readarray",
3110
+ "source",
3111
+ "type",
3112
+ "typeset",
3113
+ "ulimit",
3114
+ "unalias"
3115
+ ], x = [
3116
+ "autoload",
3117
+ "bg",
3118
+ "bindkey",
3119
+ "bye",
3120
+ "cap",
3121
+ "chdir",
3122
+ "clone",
3123
+ "comparguments",
3124
+ "compcall",
3125
+ "compctl",
3126
+ "compdescribe",
3127
+ "compfiles",
3128
+ "compgroups",
3129
+ "compquote",
3130
+ "comptags",
3131
+ "comptry",
3132
+ "compvalues",
3133
+ "dirs",
3134
+ "disable",
3135
+ "disown",
3136
+ "echotc",
3137
+ "echoti",
3138
+ "emulate",
3139
+ "fc",
3140
+ "fg",
3141
+ "float",
3142
+ "functions",
3143
+ "getcap",
3144
+ "getln",
3145
+ "history",
3146
+ "integer",
3147
+ "jobs",
3148
+ "kill",
3149
+ "limit",
3150
+ "log",
3151
+ "noglob",
3152
+ "popd",
3153
+ "print",
3154
+ "pushd",
3155
+ "pushln",
3156
+ "rehash",
3157
+ "sched",
3158
+ "setcap",
3159
+ "setopt",
3160
+ "stat",
3161
+ "suspend",
3162
+ "ttyctl",
3163
+ "unfunction",
3164
+ "unhash",
3165
+ "unlimit",
3166
+ "unsetopt",
3167
+ "vared",
3168
+ "wait",
3169
+ "whence",
3170
+ "where",
3171
+ "which",
3172
+ "zcompile",
3173
+ "zformat",
3174
+ "zftp",
3175
+ "zle",
3176
+ "zmodload",
3177
+ "zparseopts",
3178
+ "zprof",
3179
+ "zpty",
3180
+ "zregexparse",
3181
+ "zsocket",
3182
+ "zstyle",
3183
+ "ztcp"
3184
+ ], y = [
3185
+ "chcon",
3186
+ "chgrp",
3187
+ "chown",
3188
+ "chmod",
3189
+ "cp",
3190
+ "dd",
3191
+ "df",
3192
+ "dir",
3193
+ "dircolors",
3194
+ "ln",
3195
+ "ls",
3196
+ "mkdir",
3197
+ "mkfifo",
3198
+ "mknod",
3199
+ "mktemp",
3200
+ "mv",
3201
+ "realpath",
3202
+ "rm",
3203
+ "rmdir",
3204
+ "shred",
3205
+ "sync",
3206
+ "touch",
3207
+ "truncate",
3208
+ "vdir",
3209
+ "b2sum",
3210
+ "base32",
3211
+ "base64",
3212
+ "cat",
3213
+ "cksum",
3214
+ "comm",
3215
+ "csplit",
3216
+ "cut",
3217
+ "expand",
3218
+ "fmt",
3219
+ "fold",
3220
+ "head",
3221
+ "join",
3222
+ "md5sum",
3223
+ "nl",
3224
+ "numfmt",
3225
+ "od",
3226
+ "paste",
3227
+ "ptx",
3228
+ "pr",
3229
+ "sha1sum",
3230
+ "sha224sum",
3231
+ "sha256sum",
3232
+ "sha384sum",
3233
+ "sha512sum",
3234
+ "shuf",
3235
+ "sort",
3236
+ "split",
3237
+ "sum",
3238
+ "tac",
3239
+ "tail",
3240
+ "tr",
3241
+ "tsort",
3242
+ "unexpand",
3243
+ "uniq",
3244
+ "wc",
3245
+ "arch",
3246
+ "basename",
3247
+ "chroot",
3248
+ "date",
3249
+ "dirname",
3250
+ "du",
3251
+ "echo",
3252
+ "env",
3253
+ "expr",
3254
+ "factor",
3255
+ // "false", // keyword literal already
3256
+ "groups",
3257
+ "hostid",
3258
+ "id",
3259
+ "link",
3260
+ "logname",
3261
+ "nice",
3262
+ "nohup",
3263
+ "nproc",
3264
+ "pathchk",
3265
+ "pinky",
3266
+ "printenv",
3267
+ "printf",
3268
+ "pwd",
3269
+ "readlink",
3270
+ "runcon",
3271
+ "seq",
3272
+ "sleep",
3273
+ "stat",
3274
+ "stdbuf",
3275
+ "stty",
3276
+ "tee",
3277
+ "test",
3278
+ "timeout",
3279
+ // "true", // keyword literal already
3280
+ "tty",
3281
+ "uname",
3282
+ "unlink",
3283
+ "uptime",
3284
+ "users",
3285
+ "who",
3286
+ "whoami",
3287
+ "yes"
3288
+ ];
3289
+ return {
3290
+ name: "Bash",
3291
+ aliases: ["sh"],
3292
+ keywords: {
3293
+ $pattern: /\b[a-z][a-z0-9._-]+\b/,
3294
+ keyword: N,
3295
+ literal: h,
3296
+ built_in: [
3297
+ ...A,
3298
+ ...S,
3299
+ // Shell modifiers
3300
+ "set",
3301
+ "shopt",
3302
+ ...x,
3303
+ ...y
3304
+ ]
3305
+ },
3306
+ contains: [
3307
+ _,
3308
+ // to catch known shells and boost relevancy
3309
+ e.SHEBANG(),
3310
+ // to catch unknown shells but still highlight the shebang
3311
+ f,
3312
+ o,
3313
+ e.HASH_COMMENT_MODE,
3314
+ l,
3315
+ g,
3316
+ i,
3317
+ r,
3318
+ a,
3319
+ t
3320
+ ]
3321
+ };
3322
+ }
3323
+ function zt(e) {
3324
+ const n = e.regex, t = e.COMMENT("--", "$"), s = {
3325
+ className: "string",
3326
+ variants: [
3327
+ {
3328
+ begin: /'/,
3329
+ end: /'/,
3330
+ contains: [{ begin: /''/ }]
3331
+ }
3332
+ ]
3333
+ }, c = {
3334
+ begin: /"/,
3335
+ end: /"/,
3336
+ contains: [{ begin: /""/ }]
3337
+ }, l = [
3338
+ "true",
3339
+ "false",
3340
+ // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
3341
+ // "null",
3342
+ "unknown"
3343
+ ], i = [
3344
+ "double precision",
3345
+ "large object",
3346
+ "with timezone",
3347
+ "without timezone"
3348
+ ], r = [
3349
+ "bigint",
3350
+ "binary",
3351
+ "blob",
3352
+ "boolean",
3353
+ "char",
3354
+ "character",
3355
+ "clob",
3356
+ "date",
3357
+ "dec",
3358
+ "decfloat",
3359
+ "decimal",
3360
+ "float",
3361
+ "int",
3362
+ "integer",
3363
+ "interval",
3364
+ "nchar",
3365
+ "nclob",
3366
+ "national",
3367
+ "numeric",
3368
+ "real",
3369
+ "row",
3370
+ "smallint",
3371
+ "time",
3372
+ "timestamp",
3373
+ "varchar",
3374
+ "varying",
3375
+ // modifier (character varying)
3376
+ "varbinary"
3377
+ ], a = [
3378
+ "add",
3379
+ "asc",
3380
+ "collation",
3381
+ "desc",
3382
+ "final",
3383
+ "first",
3384
+ "last",
3385
+ "view"
3386
+ ], o = [
3387
+ "abs",
3388
+ "acos",
3389
+ "all",
3390
+ "allocate",
3391
+ "alter",
3392
+ "and",
3393
+ "any",
3394
+ "are",
3395
+ "array",
3396
+ "array_agg",
3397
+ "array_max_cardinality",
3398
+ "as",
3399
+ "asensitive",
3400
+ "asin",
3401
+ "asymmetric",
3402
+ "at",
3403
+ "atan",
3404
+ "atomic",
3405
+ "authorization",
3406
+ "avg",
3407
+ "begin",
3408
+ "begin_frame",
3409
+ "begin_partition",
3410
+ "between",
3411
+ "bigint",
3412
+ "binary",
3413
+ "blob",
3414
+ "boolean",
3415
+ "both",
3416
+ "by",
3417
+ "call",
3418
+ "called",
3419
+ "cardinality",
3420
+ "cascaded",
3421
+ "case",
3422
+ "cast",
3423
+ "ceil",
3424
+ "ceiling",
3425
+ "char",
3426
+ "char_length",
3427
+ "character",
3428
+ "character_length",
3429
+ "check",
3430
+ "classifier",
3431
+ "clob",
3432
+ "close",
3433
+ "coalesce",
3434
+ "collate",
3435
+ "collect",
3436
+ "column",
3437
+ "commit",
3438
+ "condition",
3439
+ "connect",
3440
+ "constraint",
3441
+ "contains",
3442
+ "convert",
3443
+ "copy",
3444
+ "corr",
3445
+ "corresponding",
3446
+ "cos",
3447
+ "cosh",
3448
+ "count",
3449
+ "covar_pop",
3450
+ "covar_samp",
3451
+ "create",
3452
+ "cross",
3453
+ "cube",
3454
+ "cume_dist",
3455
+ "current",
3456
+ "current_catalog",
3457
+ "current_date",
3458
+ "current_default_transform_group",
3459
+ "current_path",
3460
+ "current_role",
3461
+ "current_row",
3462
+ "current_schema",
3463
+ "current_time",
3464
+ "current_timestamp",
3465
+ "current_path",
3466
+ "current_role",
3467
+ "current_transform_group_for_type",
3468
+ "current_user",
3469
+ "cursor",
3470
+ "cycle",
3471
+ "date",
3472
+ "day",
3473
+ "deallocate",
3474
+ "dec",
3475
+ "decimal",
3476
+ "decfloat",
3477
+ "declare",
3478
+ "default",
3479
+ "define",
3480
+ "delete",
3481
+ "dense_rank",
3482
+ "deref",
3483
+ "describe",
3484
+ "deterministic",
3485
+ "disconnect",
3486
+ "distinct",
3487
+ "double",
3488
+ "drop",
3489
+ "dynamic",
3490
+ "each",
3491
+ "element",
3492
+ "else",
3493
+ "empty",
3494
+ "end",
3495
+ "end_frame",
3496
+ "end_partition",
3497
+ "end-exec",
3498
+ "equals",
3499
+ "escape",
3500
+ "every",
3501
+ "except",
3502
+ "exec",
3503
+ "execute",
3504
+ "exists",
3505
+ "exp",
3506
+ "external",
3507
+ "extract",
3508
+ "false",
3509
+ "fetch",
3510
+ "filter",
3511
+ "first_value",
3512
+ "float",
3513
+ "floor",
3514
+ "for",
3515
+ "foreign",
3516
+ "frame_row",
3517
+ "free",
3518
+ "from",
3519
+ "full",
3520
+ "function",
3521
+ "fusion",
3522
+ "get",
3523
+ "global",
3524
+ "grant",
3525
+ "group",
3526
+ "grouping",
3527
+ "groups",
3528
+ "having",
3529
+ "hold",
3530
+ "hour",
3531
+ "identity",
3532
+ "in",
3533
+ "indicator",
3534
+ "initial",
3535
+ "inner",
3536
+ "inout",
3537
+ "insensitive",
3538
+ "insert",
3539
+ "int",
3540
+ "integer",
3541
+ "intersect",
3542
+ "intersection",
3543
+ "interval",
3544
+ "into",
3545
+ "is",
3546
+ "join",
3547
+ "json_array",
3548
+ "json_arrayagg",
3549
+ "json_exists",
3550
+ "json_object",
3551
+ "json_objectagg",
3552
+ "json_query",
3553
+ "json_table",
3554
+ "json_table_primitive",
3555
+ "json_value",
3556
+ "lag",
3557
+ "language",
3558
+ "large",
3559
+ "last_value",
3560
+ "lateral",
3561
+ "lead",
3562
+ "leading",
3563
+ "left",
3564
+ "like",
3565
+ "like_regex",
3566
+ "listagg",
3567
+ "ln",
3568
+ "local",
3569
+ "localtime",
3570
+ "localtimestamp",
3571
+ "log",
3572
+ "log10",
3573
+ "lower",
3574
+ "match",
3575
+ "match_number",
3576
+ "match_recognize",
3577
+ "matches",
3578
+ "max",
3579
+ "member",
3580
+ "merge",
3581
+ "method",
3582
+ "min",
3583
+ "minute",
3584
+ "mod",
3585
+ "modifies",
3586
+ "module",
3587
+ "month",
3588
+ "multiset",
3589
+ "national",
3590
+ "natural",
3591
+ "nchar",
3592
+ "nclob",
3593
+ "new",
3594
+ "no",
3595
+ "none",
3596
+ "normalize",
3597
+ "not",
3598
+ "nth_value",
3599
+ "ntile",
3600
+ "null",
3601
+ "nullif",
3602
+ "numeric",
3603
+ "octet_length",
3604
+ "occurrences_regex",
3605
+ "of",
3606
+ "offset",
3607
+ "old",
3608
+ "omit",
3609
+ "on",
3610
+ "one",
3611
+ "only",
3612
+ "open",
3613
+ "or",
3614
+ "order",
3615
+ "out",
3616
+ "outer",
3617
+ "over",
3618
+ "overlaps",
3619
+ "overlay",
3620
+ "parameter",
3621
+ "partition",
3622
+ "pattern",
3623
+ "per",
3624
+ "percent",
3625
+ "percent_rank",
3626
+ "percentile_cont",
3627
+ "percentile_disc",
3628
+ "period",
3629
+ "portion",
3630
+ "position",
3631
+ "position_regex",
3632
+ "power",
3633
+ "precedes",
3634
+ "precision",
3635
+ "prepare",
3636
+ "primary",
3637
+ "procedure",
3638
+ "ptf",
3639
+ "range",
3640
+ "rank",
3641
+ "reads",
3642
+ "real",
3643
+ "recursive",
3644
+ "ref",
3645
+ "references",
3646
+ "referencing",
3647
+ "regr_avgx",
3648
+ "regr_avgy",
3649
+ "regr_count",
3650
+ "regr_intercept",
3651
+ "regr_r2",
3652
+ "regr_slope",
3653
+ "regr_sxx",
3654
+ "regr_sxy",
3655
+ "regr_syy",
3656
+ "release",
3657
+ "result",
3658
+ "return",
3659
+ "returns",
3660
+ "revoke",
3661
+ "right",
3662
+ "rollback",
3663
+ "rollup",
3664
+ "row",
3665
+ "row_number",
3666
+ "rows",
3667
+ "running",
3668
+ "savepoint",
3669
+ "scope",
3670
+ "scroll",
3671
+ "search",
3672
+ "second",
3673
+ "seek",
3674
+ "select",
3675
+ "sensitive",
3676
+ "session_user",
3677
+ "set",
3678
+ "show",
3679
+ "similar",
3680
+ "sin",
3681
+ "sinh",
3682
+ "skip",
3683
+ "smallint",
3684
+ "some",
3685
+ "specific",
3686
+ "specifictype",
3687
+ "sql",
3688
+ "sqlexception",
3689
+ "sqlstate",
3690
+ "sqlwarning",
3691
+ "sqrt",
3692
+ "start",
3693
+ "static",
3694
+ "stddev_pop",
3695
+ "stddev_samp",
3696
+ "submultiset",
3697
+ "subset",
3698
+ "substring",
3699
+ "substring_regex",
3700
+ "succeeds",
3701
+ "sum",
3702
+ "symmetric",
3703
+ "system",
3704
+ "system_time",
3705
+ "system_user",
3706
+ "table",
3707
+ "tablesample",
3708
+ "tan",
3709
+ "tanh",
3710
+ "then",
3711
+ "time",
3712
+ "timestamp",
3713
+ "timezone_hour",
3714
+ "timezone_minute",
3715
+ "to",
3716
+ "trailing",
3717
+ "translate",
3718
+ "translate_regex",
3719
+ "translation",
3720
+ "treat",
3721
+ "trigger",
3722
+ "trim",
3723
+ "trim_array",
3724
+ "true",
3725
+ "truncate",
3726
+ "uescape",
3727
+ "union",
3728
+ "unique",
3729
+ "unknown",
3730
+ "unnest",
3731
+ "update",
3732
+ "upper",
3733
+ "user",
3734
+ "using",
3735
+ "value",
3736
+ "values",
3737
+ "value_of",
3738
+ "var_pop",
3739
+ "var_samp",
3740
+ "varbinary",
3741
+ "varchar",
3742
+ "varying",
3743
+ "versioning",
3744
+ "when",
3745
+ "whenever",
3746
+ "where",
3747
+ "width_bucket",
3748
+ "window",
3749
+ "with",
3750
+ "within",
3751
+ "without",
3752
+ "year"
3753
+ ], p = [
3754
+ "abs",
3755
+ "acos",
3756
+ "array_agg",
3757
+ "asin",
3758
+ "atan",
3759
+ "avg",
3760
+ "cast",
3761
+ "ceil",
3762
+ "ceiling",
3763
+ "coalesce",
3764
+ "corr",
3765
+ "cos",
3766
+ "cosh",
3767
+ "count",
3768
+ "covar_pop",
3769
+ "covar_samp",
3770
+ "cume_dist",
3771
+ "dense_rank",
3772
+ "deref",
3773
+ "element",
3774
+ "exp",
3775
+ "extract",
3776
+ "first_value",
3777
+ "floor",
3778
+ "json_array",
3779
+ "json_arrayagg",
3780
+ "json_exists",
3781
+ "json_object",
3782
+ "json_objectagg",
3783
+ "json_query",
3784
+ "json_table",
3785
+ "json_table_primitive",
3786
+ "json_value",
3787
+ "lag",
3788
+ "last_value",
3789
+ "lead",
3790
+ "listagg",
3791
+ "ln",
3792
+ "log",
3793
+ "log10",
3794
+ "lower",
3795
+ "max",
3796
+ "min",
3797
+ "mod",
3798
+ "nth_value",
3799
+ "ntile",
3800
+ "nullif",
3801
+ "percent_rank",
3802
+ "percentile_cont",
3803
+ "percentile_disc",
3804
+ "position",
3805
+ "position_regex",
3806
+ "power",
3807
+ "rank",
3808
+ "regr_avgx",
3809
+ "regr_avgy",
3810
+ "regr_count",
3811
+ "regr_intercept",
3812
+ "regr_r2",
3813
+ "regr_slope",
3814
+ "regr_sxx",
3815
+ "regr_sxy",
3816
+ "regr_syy",
3817
+ "row_number",
3818
+ "sin",
3819
+ "sinh",
3820
+ "sqrt",
3821
+ "stddev_pop",
3822
+ "stddev_samp",
3823
+ "substring",
3824
+ "substring_regex",
3825
+ "sum",
3826
+ "tan",
3827
+ "tanh",
3828
+ "translate",
3829
+ "translate_regex",
3830
+ "treat",
3831
+ "trim",
3832
+ "trim_array",
3833
+ "unnest",
3834
+ "upper",
3835
+ "value_of",
3836
+ "var_pop",
3837
+ "var_samp",
3838
+ "width_bucket"
3839
+ ], _ = [
3840
+ "current_catalog",
3841
+ "current_date",
3842
+ "current_default_transform_group",
3843
+ "current_path",
3844
+ "current_role",
3845
+ "current_schema",
3846
+ "current_transform_group_for_type",
3847
+ "current_user",
3848
+ "session_user",
3849
+ "system_time",
3850
+ "system_user",
3851
+ "current_time",
3852
+ "localtime",
3853
+ "current_timestamp",
3854
+ "localtimestamp"
3855
+ ], f = [
3856
+ "create table",
3857
+ "insert into",
3858
+ "primary key",
3859
+ "foreign key",
3860
+ "not null",
3861
+ "alter table",
3862
+ "add constraint",
3863
+ "grouping sets",
3864
+ "on overflow",
3865
+ "character set",
3866
+ "respect nulls",
3867
+ "ignore nulls",
3868
+ "nulls first",
3869
+ "nulls last",
3870
+ "depth first",
3871
+ "breadth first"
3872
+ ], N = p, h = [
3873
+ ...o,
3874
+ ...a
3875
+ ].filter((y) => !p.includes(y)), g = {
3876
+ className: "variable",
3877
+ begin: /@[a-z0-9]+/
3878
+ }, A = {
3879
+ className: "operator",
3880
+ begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
3881
+ relevance: 0
3882
+ }, S = {
3883
+ begin: n.concat(/\b/, n.either(...N), /\s*\(/),
3884
+ relevance: 0,
3885
+ keywords: { built_in: N }
3886
+ };
3887
+ function x(y, {
3888
+ exceptions: M,
3889
+ when: L
3890
+ } = {}) {
3891
+ const D = L;
3892
+ return M = M || [], y.map((k) => k.match(/\|\d+$/) || M.includes(k) ? k : D(k) ? `${k}|0` : k);
3893
+ }
3894
+ return {
3895
+ name: "SQL",
3896
+ case_insensitive: !0,
3897
+ // does not include {} or HTML tags `</`
3898
+ illegal: /[{}]|<\//,
3899
+ keywords: {
3900
+ $pattern: /\b[\w\.]+/,
3901
+ keyword: x(h, { when: (y) => y.length < 3 }),
3902
+ literal: l,
3903
+ type: r,
3904
+ built_in: _
3905
+ },
3906
+ contains: [
3907
+ {
3908
+ begin: n.either(...f),
3909
+ relevance: 0,
3910
+ keywords: {
3911
+ $pattern: /[\w\.]+/,
3912
+ keyword: h.concat(f),
3913
+ literal: l,
3914
+ type: r
3915
+ }
3916
+ },
3917
+ {
3918
+ className: "type",
3919
+ begin: n.either(...i)
3920
+ },
3921
+ S,
3922
+ g,
3923
+ s,
3924
+ c,
3925
+ e.C_NUMBER_MODE,
3926
+ e.C_BLOCK_COMMENT_MODE,
3927
+ t,
3928
+ A
3929
+ ]
3930
+ };
3931
+ }
3932
+ G.registerLanguage("xml", Ot);
3933
+ G.registerLanguage("javascript", It);
3934
+ G.registerLanguage("json", kt);
3935
+ G.registerLanguage("yaml", Bt);
3936
+ G.registerLanguage("plaintext", $t);
3937
+ G.registerLanguage("python", Ut);
3938
+ G.registerLanguage("java", Pt);
3939
+ G.registerLanguage("bash", Ht);
3940
+ G.registerLanguage("sql", zt);
3941
+ var m = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(m || {});
3942
+ const V = "<code-diff-modified>", Y = "</code-diff-modified>", Ft = V.replace("<", "&lt;").replace(">", "&gt;"), Gt = Y.replace("<", "&lt;").replace(">", "&gt;"), ae = (e) => e === void 0 ? m.EQUAL : e.added ? m.ADD : e.removed ? m.DELETE : m.EQUAL, Ae = (e, n, t = "word") => typeof e > "u" ? n : typeof n > "u" ? e : (t === "char" ? On : Ln)(e, n).filter((c) => ae(c) !== m.DELETE).map(
3943
+ (c) => ae(c) === m.ADD ? `${V}${c.value}${Y}` : c.value
3944
+ ).join(""), F = (e, n) => {
3945
+ if (!n.match(new RegExp(`(${V}|${Y})`, "g")))
3946
+ return G.highlight(n, { language: e }).value;
3947
+ let s = n;
3948
+ const c = n.replace(new RegExp(`(${V}|${Y})`, "g"), ""), l = document.createElement("div");
3949
+ l.innerHTML = G.highlight(c, { language: e }).value;
3950
+ let i = !1;
3951
+ const r = (a) => {
3952
+ a.childNodes.forEach((o) => {
3953
+ if (o.nodeType === Node.ELEMENT_NODE && r(o), o.nodeType === Node.TEXT_NODE) {
3954
+ if (!o.textContent)
3955
+ return;
3956
+ let p = o.textContent, _ = "";
3957
+ for (i && (_ = _ + V); p.length; ) {
3958
+ if (s.startsWith(V)) {
3959
+ s = s.slice(V.length), _ = _ + V, i = !0;
3960
+ continue;
3961
+ }
3962
+ if (s.startsWith(Y)) {
3963
+ s = s.slice(Y.length), _ = _ + Y, i = !1;
3964
+ continue;
3965
+ }
3966
+ const f = s.match(new RegExp(`(${V}|${Y})`)), N = f && f.index ? f.index : s.length, h = Math.min(N, p.length);
3967
+ _ = _ + s.substring(0, h), s = s.slice(h), p = p.slice(h);
3968
+ }
3969
+ i && (_ = _ + Y), o.textContent = _;
3970
+ }
3971
+ });
3972
+ };
3973
+ return r(l), l.innerHTML.replace(new RegExp(Ft, "g"), '<span class="x">').replace(new RegExp(Gt, "g"), "</span>");
3974
+ };
3975
+ function Kt(e, n, t = "plaintext", s = "word", c = 10) {
3976
+ var N;
3977
+ const l = () => ({ type: m.EMPTY }), i = (h, g, A) => ({ type: h, num: g, code: A }), r = tn(e, n);
3978
+ let a = 0, o = 0, p = !1;
3979
+ const _ = [];
3980
+ for (let h = 0; h < r.length; h++) {
3981
+ if (p) {
3982
+ p = !1;
3983
+ continue;
3984
+ }
3985
+ const [g, A] = [r[h], r[h + 1]], [S, x] = [ae(g), ae(A)], y = g.value.replace(/\n$/, "").split(`
3986
+ `);
3987
+ if (A === void 0) {
3988
+ for (const L of y) {
3989
+ let D = l(), k = l();
3990
+ const H = F(t, L);
3991
+ S === m.EQUAL && (a++, o++, D = i(m.EQUAL, a, H), k = i(m.EQUAL, o, H)), S === m.DELETE && (a++, D = i(m.DELETE, a, H), k = l()), S === m.ADD && (o++, D = l(), k = i(m.ADD, o, H)), _.push({ left: D, right: k });
3992
+ }
3993
+ break;
3994
+ }
3995
+ if (S === m.EQUAL)
3996
+ for (const L of y) {
3997
+ a++, o++;
3998
+ const D = F(t, L);
3999
+ _.push({
4000
+ left: i(m.EQUAL, a, D),
4001
+ right: i(m.EQUAL, o, D)
4002
+ });
4003
+ }
4004
+ const M = A.value.replace(/\n$/, "").split(`
4005
+ `);
4006
+ if (S === m.DELETE) {
4007
+ if (x === m.EQUAL)
4008
+ for (const L of y)
4009
+ a++, _.push({
4010
+ left: i(m.DELETE, a, F(t, L)),
4011
+ right: l()
4012
+ });
4013
+ if (x === m.ADD) {
4014
+ p = !0;
4015
+ const L = Math.max(g.count, A.count);
4016
+ for (let D = 0; D < L; D++) {
4017
+ D < g.count && a++, D < A.count && o++;
4018
+ const [k, H] = [y[D], M[D]], z = y.length === M.length ? Ae(H, k, s) : k, ne = y.length === M.length ? Ae(k, H, s) : H, te = D < g.count ? i(m.DELETE, a, F(t, z)) : l(), oe = D < A.count ? i(m.ADD, o, F(t, ne)) : l();
4019
+ _.push({ left: te, right: oe });
4020
+ }
4021
+ }
4022
+ }
4023
+ if (S === m.ADD)
4024
+ for (const L of y)
4025
+ o++, _.push({
4026
+ left: l(),
4027
+ right: i(m.ADD, o, F(t, L))
4028
+ });
4029
+ }
4030
+ if (e === n) {
4031
+ for (let h = 0; h < _.length; h++)
4032
+ _[h].fold = !1;
4033
+ return _;
4034
+ }
4035
+ for (let h = 0; h < _.length; h++) {
4036
+ const g = _[h];
4037
+ if (g.left.type === m.DELETE || g.right.type === m.ADD) {
4038
+ const [A, S] = [Math.max(h - c, 0), Math.min(h + c + 1, _.length)];
4039
+ for (let x = A; x < S; x++)
4040
+ _[x].fold = !1;
4041
+ }
4042
+ g.fold === void 0 && (g.fold = !0);
4043
+ }
4044
+ const f = [];
4045
+ for (let h = 0; h < _.length; h++) {
4046
+ const g = _[h];
4047
+ if (g.fold === !1) {
4048
+ f.push(g);
4049
+ continue;
4050
+ }
4051
+ g.fold === !0 && ((N = f[f.length - 1]) == null ? void 0 : N.fold) !== !0 && f.push(g);
4052
+ }
4053
+ return f;
4054
+ }
4055
+ function Wt(e, n, t = "plaintext", s = "word", c = 2) {
4056
+ var _;
4057
+ const l = tn(e, n);
4058
+ let i = 0, r = 0, a = !1;
4059
+ const o = [];
4060
+ for (let f = 0; f < l.length; f++) {
4061
+ if (a) {
4062
+ a = !1;
4063
+ continue;
4064
+ }
4065
+ const [N, h] = [l[f], l[f + 1]], [g, A] = [ae(N), ae(h)], S = N.value.replace(/\n$/, "").split(`
4066
+ `);
4067
+ if (h === void 0) {
4068
+ for (const y of S) {
4069
+ g === m.EQUAL && (i++, r++), g === m.DELETE && i++, g === m.ADD && r++;
4070
+ const M = F(t, y);
4071
+ o.push({
4072
+ type: g,
4073
+ code: M,
4074
+ addNum: g === m.DELETE ? void 0 : r,
4075
+ delNum: g === m.ADD ? void 0 : i
4076
+ });
4077
+ }
4078
+ break;
4079
+ }
4080
+ if (g === m.EQUAL)
4081
+ for (const y of S) {
4082
+ i++, r++;
4083
+ const M = F(t, y);
4084
+ o.push({ type: m.EQUAL, code: M, delNum: i, addNum: r });
4085
+ }
4086
+ const x = h.value.replace(/\n$/, "").split(`
4087
+ `);
4088
+ if (g === m.DELETE)
4089
+ if (A === m.ADD && S.length === x.length) {
4090
+ for (let y = 0; y < S.length; y++) {
4091
+ const M = S[y], L = x[y];
4092
+ i++;
4093
+ const D = F(t, Ae(L, M, s));
4094
+ o.push({ type: m.DELETE, code: D, delNum: i });
4095
+ }
4096
+ for (let y = 0; y < x.length; y++) {
4097
+ const M = S[y], L = x[y];
4098
+ r++;
4099
+ const D = F(t, Ae(M, L, s));
4100
+ o.push({ type: m.ADD, code: D, addNum: r });
4101
+ }
4102
+ a = !0;
4103
+ } else
4104
+ for (const y of S) {
4105
+ i++;
4106
+ const M = F(t, y);
4107
+ o.push({ type: m.DELETE, code: M, delNum: i });
4108
+ }
4109
+ if (g === m.ADD)
4110
+ for (const y of S) {
4111
+ r++;
4112
+ const M = F(t, y);
4113
+ o.push({ type: m.ADD, code: M, addNum: r });
4114
+ }
4115
+ }
4116
+ for (let f = 0; f < o.length; f++) {
4117
+ const N = o[f];
4118
+ if (N.type === m.DELETE || N.type === m.ADD) {
4119
+ const [h, g] = [Math.max(f - c, 0), Math.min(f + c + 1, o.length)];
4120
+ for (let A = h; A < g; A++)
4121
+ o[A].fold = !1;
4122
+ }
4123
+ N.fold === void 0 && (N.fold = !0);
4124
+ }
4125
+ if (e === n) {
4126
+ for (let f = 0; f < o.length; f++)
4127
+ o[f].fold = !1;
4128
+ return o;
4129
+ }
4130
+ const p = [];
4131
+ for (let f = 0; f < o.length; f++) {
4132
+ const N = o[f];
4133
+ if (N.fold === !1) {
4134
+ p.push(N);
4135
+ continue;
4136
+ }
4137
+ N.fold === !0 && (f === 0 || ((_ = p[p.length - 1]) == null ? void 0 : _.fold) !== !0) && p.push(N);
4138
+ }
4139
+ return p;
4140
+ }
4141
+ const Vt = /* @__PURE__ */ de({
4142
+ __name: "UnifiedLine",
4143
+ props: {
4144
+ line: null
4145
+ },
4146
+ setup(e) {
4147
+ return { __sfc: !0, props: e, getCodeMarker: (s) => s === m.DELETE ? "-" : s === m.ADD ? "+" : "", DiffType: m };
4148
+ }
4149
+ });
4150
+ function ge(e, n, t, s, c, l, i, r) {
4151
+ var a = typeof e == "function" ? e.options : e;
4152
+ n && (a.render = n, a.staticRenderFns = t, a._compiled = !0), s && (a.functional = !0), l && (a._scopeId = "data-v-" + l);
4153
+ var o;
4154
+ if (i ? (o = function(f) {
4155
+ f = f || // cached call
4156
+ this.$vnode && this.$vnode.ssrContext || // stateful
4157
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ < "u" && (f = __VUE_SSR_CONTEXT__), c && c.call(this, f), f && f._registeredComponents && f._registeredComponents.add(i);
4158
+ }, a._ssrRegister = o) : c && (o = r ? function() {
4159
+ c.call(
4160
+ this,
4161
+ (a.functional ? this.parent : this).$root.$options.shadowRoot
4162
+ );
4163
+ } : c), o)
4164
+ if (a.functional) {
4165
+ a._injectStyles = o;
4166
+ var p = a.render;
4167
+ a.render = function(N, h) {
4168
+ return o.call(h), p(N, h);
4169
+ };
4170
+ } else {
4171
+ var _ = a.beforeCreate;
4172
+ a.beforeCreate = _ ? [].concat(_, o) : [o];
4173
+ }
4174
+ return {
4175
+ exports: e,
4176
+ options: a
4177
+ };
4178
+ }
4179
+ var Yt = function() {
4180
+ var n = this, t = n._self._c, s = n._self._setupProxy;
4181
+ return n.line.fold ? t("tr", [t("td", { staticClass: "blob-num blob-num-empty empty-cell" }, [n._v(" > ")]), t("td", { staticClass: "blob-num blob-num-empty empty-cell" }, [n._v(" > ")]), t("td", { staticClass: "blob-code blob-code-empty empty-cell", attrs: { align: "left" } }, [n._v(" ⋯ ")])]) : t("tr", [t("td", { staticClass: "blob-num", class: {
4182
+ "blob-num-deletion": n.line.type === s.DiffType.DELETE,
4183
+ "blob-num-addition": n.line.type === s.DiffType.ADD,
4184
+ "blob-num-context": n.line.type === s.DiffType.EQUAL
4185
+ } }, [n._v(" " + n._s(n.line.delNum) + " ")]), t("td", { staticClass: "blob-num", class: {
4186
+ "blob-num-deletion": n.line.type === s.DiffType.DELETE,
4187
+ "blob-num-addition": n.line.type === s.DiffType.ADD,
4188
+ "blob-num-context": n.line.type === s.DiffType.EQUAL
4189
+ } }, [n._v(" " + n._s(n.line.addNum) + " ")]), t("td", { staticClass: "blob-code", class: {
4190
+ "blob-code-deletion": n.line.type === s.DiffType.DELETE,
4191
+ "blob-code-addition": n.line.type === s.DiffType.ADD,
4192
+ "blob-code-context": n.line.type === s.DiffType.EQUAL
4193
+ } }, [t("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": s.getCodeMarker(n.line.type) }, domProps: { innerHTML: n._s(n.line.code) } })])]);
4194
+ }, Zt = [], Qt = /* @__PURE__ */ ge(
4195
+ Vt,
4196
+ Yt,
4197
+ Zt,
4198
+ !1,
4199
+ null,
4200
+ null,
4201
+ null,
4202
+ null
4203
+ );
4204
+ const Xt = Qt.exports, qt = /* @__PURE__ */ de({
4205
+ __name: "UnifiedViewer",
4206
+ props: {
4207
+ diffChange: null
4208
+ },
4209
+ setup(e) {
4210
+ return { __sfc: !0, props: e, UnifiedLine: Xt };
4211
+ }
4212
+ });
4213
+ var jt = function() {
4214
+ var n = this, t = n._self._c, s = n._self._setupProxy;
4215
+ return t("div", { staticClass: "file" }, [t("table", { staticClass: "diff-table" }, [t("tbody", n._l(n.diffChange, function(c, l) {
4216
+ return t(s.UnifiedLine, { key: l, attrs: { line: c } });
4217
+ }), 1)])]);
4218
+ }, Jt = [], es = /* @__PURE__ */ ge(
4219
+ qt,
4220
+ jt,
4221
+ Jt,
4222
+ !1,
4223
+ null,
4224
+ "0a803843",
4225
+ null,
4226
+ null
4227
+ );
4228
+ const ns = es.exports, ts = /* @__PURE__ */ de({
4229
+ __name: "SplitLine",
4230
+ props: {
4231
+ splitLine: null
4232
+ },
4233
+ setup(e) {
4234
+ return { __sfc: !0, props: e, getCodeMarker: (s) => s === m.DELETE ? "-" : s === m.ADD ? "+" : "", DiffType: m };
4235
+ }
4236
+ });
4237
+ var ss = function() {
4238
+ var n = this, t = n._self._c, s = n._self._setupProxy;
4239
+ return n.splitLine.fold ? t("tr", [t("td", { staticClass: "blob-num blob-num-empty empty-cell", attrs: { colspan: "1" } }, [n._v(" > ")]), t("td", { staticClass: "blob-code blob-code-empty empty-cell", attrs: { colspan: "3", align: "left" } }, [n._v(" ⋯ ")])]) : t("tr", [n._l([n.splitLine.left, n.splitLine.right], function(c) {
4240
+ return [c.type === s.DiffType.EMPTY ? [t("td", { staticClass: "blob-num blob-num-empty empty-cell" }), t("td", { staticClass: "blob-code blob-code-empty empty-cell" })] : [t("td", { staticClass: "blob-num", class: {
4241
+ "blob-num-deletion": c.type === s.DiffType.DELETE,
4242
+ "blob-num-addition": c.type === s.DiffType.ADD,
4243
+ "blob-num-context": c.type === s.DiffType.EQUAL
4244
+ } }, [n._v(" " + n._s(c.num) + " ")]), t("td", { staticClass: "blob-code", class: {
4245
+ "blob-code-deletion": c.type === s.DiffType.DELETE,
4246
+ "blob-code-addition": c.type === s.DiffType.ADD,
4247
+ "blob-code-context": c.type === s.DiffType.EQUAL
4248
+ } }, [t("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": s.getCodeMarker(c.type) }, domProps: { innerHTML: n._s(c.code) } })])]];
4249
+ })], 2);
4250
+ }, is = [], rs = /* @__PURE__ */ ge(
4251
+ ts,
4252
+ ss,
4253
+ is,
4254
+ !1,
4255
+ null,
4256
+ null,
4257
+ null,
4258
+ null
4259
+ );
4260
+ const as = rs.exports, os = /* @__PURE__ */ de({
4261
+ __name: "SplitViewer",
4262
+ props: {
4263
+ diffChange: null
4264
+ },
4265
+ setup(e) {
4266
+ return { __sfc: !0, props: e, SplitLine: as };
4267
+ }
4268
+ });
4269
+ var cs = function() {
4270
+ var n = this, t = n._self._c, s = n._self._setupProxy;
4271
+ return t("div", { staticClass: "file" }, [t("table", { staticClass: "file-diff-split diff-table" }, [n._m(0), t("tbody", n._l(n.diffChange, function(c, l) {
4272
+ return t(s.SplitLine, { key: l, attrs: { "split-line": c } });
4273
+ }), 1)])]);
4274
+ }, ls = [function() {
4275
+ var e = this, n = e._self._c;
4276
+ return e._self._setupProxy, n("colgroup", [n("col", { attrs: { width: "44" } }), n("col"), n("col", { attrs: { width: "44" } }), n("col")]);
4277
+ }], us = /* @__PURE__ */ ge(
4278
+ os,
4279
+ cs,
4280
+ ls,
4281
+ !1,
4282
+ null,
4283
+ "75e3b51b",
4284
+ null,
4285
+ null
4286
+ );
4287
+ const fs = us.exports;
4288
+ const ds = /* @__PURE__ */ de({
4289
+ __name: "CodeDiff",
4290
+ props: {
4291
+ newString: null,
4292
+ oldString: null,
4293
+ language: { default: "plaintext" },
4294
+ context: { default: 10 },
4295
+ diffStyle: { default: "word" },
4296
+ outputFormat: { default: "line-by-line" },
4297
+ trim: { type: Boolean, default: !1 },
4298
+ noDiffLineFeed: { type: Boolean, default: !1 }
4299
+ },
4300
+ setup(e) {
4301
+ const n = e, t = Ee(() => n.outputFormat === "line-by-line"), s = Ee(() => {
4302
+ const i = n.trim ? n.oldString.trim() : n.oldString;
4303
+ return n.noDiffLineFeed ? i.replace(/(\r\n)/g, `
4304
+ `) : i;
4305
+ }), c = Ee(() => {
4306
+ const i = n.trim ? n.newString.trim() : n.newString;
4307
+ return n.noDiffLineFeed ? i.replace(/(\r\n)/g, `
4308
+ `) : i;
4309
+ }), l = Ee(
4310
+ () => t.value ? Wt(s.value, c.value, n.language, n.diffStyle, n.context) : Kt(s.value, c.value, n.language, n.diffStyle, n.context)
4311
+ );
4312
+ return { __sfc: !0, props: n, isUnifiedViewer: t, oldString: s, newString: c, diffChange: l, UnifiedViewer: ns, SplitViewer: fs };
4313
+ }
4314
+ });
4315
+ var gs = function() {
4316
+ var n = this, t = n._self._c, s = n._self._setupProxy;
4317
+ return t("div", { staticClass: "code-diff-view" }, [s.isUnifiedViewer ? t(s.UnifiedViewer, { attrs: { "diff-change": s.diffChange } }) : t(s.SplitViewer, { attrs: { "diff-change": s.diffChange } })], 1);
4318
+ }, ps = [], _s = /* @__PURE__ */ ge(
4319
+ ds,
4320
+ gs,
4321
+ ps,
4322
+ !1,
4323
+ null,
4324
+ null,
4325
+ null,
4326
+ null
4327
+ );
4328
+ const bs = _s.exports, hs = (e) => {
4329
+ e.component("CodeDiff", bs);
4330
+ }, ms = {
4331
+ install: hs,
4332
+ hljs: G
4333
+ };
4334
+ export {
4335
+ bs as CodeDiff,
4336
+ ms as default
4337
+ };