v-code-diff 1.13.0 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -5
- package/dist/v2/{index.cjs.js → index.cjs} +17 -17
- package/dist/v2/index.es.js +1119 -1097
- package/dist/v2/index.umd.js +17 -17
- package/dist/v2.7/{index.cjs.js → index.cjs} +14 -14
- package/dist/v2.7/index.es.js +625 -613
- package/dist/v2.7/index.umd.js +13 -13
- package/dist/v3/{index.cjs.js → index.cjs} +14 -14
- package/dist/v3/index.es.js +860 -840
- package/dist/v3/index.umd.js +15 -15
- package/package.json +21 -13
- package/scripts/perf-test.ts +40 -0
- package/scripts/postinstall.cjs +15 -18
- package/scripts/utils.cjs +4 -19
- package/src/CodeDiff.vue +7 -5
- package/src/split/SplitLine.vue +9 -5
- package/src/unified/UnifiedLine.vue +1 -1
- package/src/utils.ts +17 -0
- package/types/index.d.ts +3 -0
package/dist/v3/index.es.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--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: #1F2328;--color-diff-blob-addition-fg: #1F2328;--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: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--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: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--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: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--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: #1f883d;--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(31,35,40,.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-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px 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(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--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(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,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(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.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(31,35,40,.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-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.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(31,35,40,.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-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--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: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--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: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--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(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.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: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--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: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--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(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.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-scale-black: #1F2328;--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[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .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 .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 .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 .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .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 .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .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 .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .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 .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { defineComponent as me, openBlock as z, createElementBlock as W, createElementVNode as B,
|
|
2
|
+
import { defineComponent as me, openBlock as z, createElementBlock as W, createElementVNode as B, unref as x, normalizeClass as ve, toDisplayString as ee, createCommentVNode as ye, Fragment as pe, renderList as We, createBlock as we, computed as Ee, ref as xe, watch as Yn, normalizeStyle as Xn, createVNode as Le, renderSlot as rn } from "vue";
|
|
3
3
|
function ae() {
|
|
4
4
|
}
|
|
5
5
|
ae.prototype = {
|
|
6
6
|
diff: function(r, l) {
|
|
7
|
-
var f,
|
|
8
|
-
typeof
|
|
7
|
+
var f, g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = g.callback;
|
|
8
|
+
typeof g == "function" && (n = g, g = {}), this.options = g;
|
|
9
9
|
var t = this;
|
|
10
|
-
function i(
|
|
10
|
+
function i(y) {
|
|
11
11
|
return n ? (setTimeout(function() {
|
|
12
|
-
n(void 0,
|
|
13
|
-
}, 0), !0) :
|
|
12
|
+
n(void 0, y);
|
|
13
|
+
}, 0), !0) : y;
|
|
14
14
|
}
|
|
15
15
|
r = this.castInput(r), l = this.castInput(l), r = this.removeEmpty(this.tokenize(r)), l = this.removeEmpty(this.tokenize(l));
|
|
16
16
|
var s = l.length, o = r.length, a = 1, c = s + o;
|
|
17
|
-
|
|
18
|
-
var u = (f =
|
|
17
|
+
g.maxEditLength && (c = Math.min(c, g.maxEditLength));
|
|
18
|
+
var u = (f = g.timeout) !== null && f !== void 0 ? f : 1 / 0, h = Date.now() + u, p = [{
|
|
19
19
|
oldPos: -1,
|
|
20
20
|
lastComponent: void 0
|
|
21
|
-
}],
|
|
22
|
-
if (
|
|
21
|
+
}], d = this.extractCommon(p[0], l, r, 0);
|
|
22
|
+
if (p[0].oldPos + 1 >= o && d + 1 >= s)
|
|
23
23
|
return i([{
|
|
24
24
|
value: this.join(l),
|
|
25
25
|
count: l.length
|
|
26
26
|
}]);
|
|
27
|
-
var _ = -1 / 0,
|
|
27
|
+
var _ = -1 / 0, b = 1 / 0;
|
|
28
28
|
function E() {
|
|
29
|
-
for (var
|
|
30
|
-
var D = void 0, T =
|
|
31
|
-
T && (
|
|
29
|
+
for (var y = Math.max(_, -a); y <= Math.min(b, a); y += 2) {
|
|
30
|
+
var D = void 0, T = p[y - 1], M = p[y + 1];
|
|
31
|
+
T && (p[y - 1] = void 0);
|
|
32
32
|
var R = !1;
|
|
33
33
|
if (M) {
|
|
34
|
-
var L = M.oldPos -
|
|
34
|
+
var L = M.oldPos - y;
|
|
35
35
|
R = M && 0 <= L && L < s;
|
|
36
36
|
}
|
|
37
37
|
var O = T && T.oldPos + 1 < o;
|
|
38
38
|
if (!R && !O) {
|
|
39
|
-
|
|
39
|
+
p[y] = void 0;
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
|
-
if (!O || R && T.oldPos + 1 < M.oldPos ? D = t.addToPath(M, !0, void 0, 0) : D = t.addToPath(T, void 0, !0, 1),
|
|
43
|
-
return i(
|
|
44
|
-
|
|
42
|
+
if (!O || R && T.oldPos + 1 < M.oldPos ? D = t.addToPath(M, !0, void 0, 0) : D = t.addToPath(T, void 0, !0, 1), d = t.extractCommon(D, l, r, y), D.oldPos + 1 >= o && d + 1 >= s)
|
|
43
|
+
return i(Vn(t, D.lastComponent, l, r, t.useLongestToken));
|
|
44
|
+
p[y] = D, D.oldPos + 1 >= o && (b = Math.min(b, y - 1)), d + 1 >= s && (_ = Math.max(_, y + 1));
|
|
45
45
|
}
|
|
46
46
|
a++;
|
|
47
47
|
}
|
|
48
48
|
if (n)
|
|
49
|
-
(function
|
|
49
|
+
(function y() {
|
|
50
50
|
setTimeout(function() {
|
|
51
|
-
if (a > c || Date.now() >
|
|
51
|
+
if (a > c || Date.now() > h)
|
|
52
52
|
return n();
|
|
53
|
-
E() ||
|
|
53
|
+
E() || y();
|
|
54
54
|
}, 0);
|
|
55
55
|
})();
|
|
56
56
|
else
|
|
57
|
-
for (; a <= c && Date.now() <=
|
|
57
|
+
for (; a <= c && Date.now() <= h; ) {
|
|
58
58
|
var v = E();
|
|
59
59
|
if (v)
|
|
60
60
|
return v;
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
addToPath: function(r, l, f,
|
|
63
|
+
addToPath: function(r, l, f, g) {
|
|
64
64
|
var n = r.lastComponent;
|
|
65
65
|
return n && n.added === l && n.removed === f ? {
|
|
66
|
-
oldPos: r.oldPos +
|
|
66
|
+
oldPos: r.oldPos + g,
|
|
67
67
|
lastComponent: {
|
|
68
68
|
count: n.count + 1,
|
|
69
69
|
added: l,
|
|
@@ -71,7 +71,7 @@ ae.prototype = {
|
|
|
71
71
|
previousComponent: n.previousComponent
|
|
72
72
|
}
|
|
73
73
|
} : {
|
|
74
|
-
oldPos: r.oldPos +
|
|
74
|
+
oldPos: r.oldPos + g,
|
|
75
75
|
lastComponent: {
|
|
76
76
|
count: 1,
|
|
77
77
|
added: l,
|
|
@@ -80,8 +80,8 @@ ae.prototype = {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
},
|
|
83
|
-
extractCommon: function(r, l, f,
|
|
84
|
-
for (var n = l.length, t = f.length, i = r.oldPos, s = i -
|
|
83
|
+
extractCommon: function(r, l, f, g) {
|
|
84
|
+
for (var n = l.length, t = f.length, i = r.oldPos, s = i - g, o = 0; s + 1 < n && i + 1 < t && this.equals(l[s + 1], f[i + 1]); )
|
|
85
85
|
s++, i++, o++;
|
|
86
86
|
return o && (r.lastComponent = {
|
|
87
87
|
count: o,
|
|
@@ -106,7 +106,7 @@ ae.prototype = {
|
|
|
106
106
|
return r.join("");
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
function
|
|
109
|
+
function Vn(e, r, l, f, g) {
|
|
110
110
|
for (var n = [], t; r; )
|
|
111
111
|
n.push(r), t = r.previousComponent, delete r.previousComponent, r = t;
|
|
112
112
|
n.reverse();
|
|
@@ -114,29 +114,29 @@ function Yn(e, r, l, f, h) {
|
|
|
114
114
|
var c = n[i];
|
|
115
115
|
if (c.removed) {
|
|
116
116
|
if (c.value = e.join(f.slice(a, a + c.count)), a += c.count, i && n[i - 1].added) {
|
|
117
|
-
var
|
|
118
|
-
n[i - 1] = n[i], n[i] =
|
|
117
|
+
var h = n[i - 1];
|
|
118
|
+
n[i - 1] = n[i], n[i] = h;
|
|
119
119
|
}
|
|
120
120
|
} else {
|
|
121
|
-
if (!c.added &&
|
|
121
|
+
if (!c.added && g) {
|
|
122
122
|
var u = l.slice(o, o + c.count);
|
|
123
|
-
u = u.map(function(
|
|
124
|
-
var
|
|
125
|
-
return
|
|
123
|
+
u = u.map(function(d, _) {
|
|
124
|
+
var b = f[a + _];
|
|
125
|
+
return b.length > d.length ? b : d;
|
|
126
126
|
}), c.value = e.join(u);
|
|
127
127
|
} else
|
|
128
128
|
c.value = e.join(l.slice(o, o + c.count));
|
|
129
129
|
o += c.count, c.added || (a += c.count);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
return s > 1 && typeof
|
|
132
|
+
var p = n[s - 1];
|
|
133
|
+
return s > 1 && typeof p.value == "string" && (p.added || p.removed) && e.equals("", p.value) && (n[s - 2].value += p.value, n.pop()), n;
|
|
134
134
|
}
|
|
135
|
-
var
|
|
136
|
-
function
|
|
137
|
-
return
|
|
135
|
+
var jn = new ae();
|
|
136
|
+
function qn(e, r, l) {
|
|
137
|
+
return jn.diff(e, r, l);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Jn(e, r) {
|
|
140
140
|
if (typeof e == "function")
|
|
141
141
|
r.callback = e;
|
|
142
142
|
else if (e)
|
|
@@ -144,38 +144,38 @@ function jn(e, r) {
|
|
|
144
144
|
e.hasOwnProperty(l) && (r[l] = e[l]);
|
|
145
145
|
return r;
|
|
146
146
|
}
|
|
147
|
-
var sn = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, an = /\S/,
|
|
148
|
-
|
|
147
|
+
var sn = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, an = /\S/, Qe = new ae();
|
|
148
|
+
Qe.equals = function(e, r) {
|
|
149
149
|
return this.options.ignoreCase && (e = e.toLowerCase(), r = r.toLowerCase()), e === r || this.options.ignoreWhitespace && !an.test(e) && !an.test(r);
|
|
150
150
|
};
|
|
151
|
-
|
|
151
|
+
Qe.tokenize = function(e) {
|
|
152
152
|
for (var r = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), l = 0; l < r.length - 1; l++)
|
|
153
153
|
!r[l + 1] && r[l + 2] && sn.test(r[l]) && sn.test(r[l + 2]) && (r[l] += r[l + 2], r.splice(l + 1, 2), l--);
|
|
154
154
|
return r;
|
|
155
155
|
};
|
|
156
|
-
function
|
|
157
|
-
return l =
|
|
156
|
+
function et(e, r, l) {
|
|
157
|
+
return l = Jn(l, {
|
|
158
158
|
ignoreWhitespace: !0
|
|
159
|
-
}),
|
|
159
|
+
}), Qe.diff(e, r, l);
|
|
160
160
|
}
|
|
161
|
-
var
|
|
162
|
-
|
|
161
|
+
var vn = new ae();
|
|
162
|
+
vn.tokenize = function(e) {
|
|
163
163
|
this.options.stripTrailingCr && (e = e.replace(/\r\n/g, `
|
|
164
164
|
`));
|
|
165
165
|
var r = [], l = e.split(/(\n|\r\n)/);
|
|
166
166
|
l[l.length - 1] || l.pop();
|
|
167
167
|
for (var f = 0; f < l.length; f++) {
|
|
168
|
-
var
|
|
169
|
-
f % 2 && !this.options.newlineIsToken ? r[r.length - 1] +=
|
|
168
|
+
var g = l[f];
|
|
169
|
+
f % 2 && !this.options.newlineIsToken ? r[r.length - 1] += g : (this.options.ignoreWhitespace && (g = g.trim()), r.push(g));
|
|
170
170
|
}
|
|
171
171
|
return r;
|
|
172
172
|
};
|
|
173
|
-
var
|
|
174
|
-
|
|
173
|
+
var nt = new ae();
|
|
174
|
+
nt.tokenize = function(e) {
|
|
175
175
|
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
176
176
|
};
|
|
177
|
-
var
|
|
178
|
-
|
|
177
|
+
var tt = new ae();
|
|
178
|
+
tt.tokenize = function(e) {
|
|
179
179
|
return e.split(/([{}:;,]|\s+)/);
|
|
180
180
|
};
|
|
181
181
|
function Ie(e) {
|
|
@@ -186,28 +186,28 @@ function Ie(e) {
|
|
|
186
186
|
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
187
187
|
}, Ie(e);
|
|
188
188
|
}
|
|
189
|
-
var
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
var r = this.options, l = r.undefinedReplacement, f = r.stringifyReplacer,
|
|
189
|
+
var rt = Object.prototype.toString, Ae = new ae();
|
|
190
|
+
Ae.useLongestToken = !0;
|
|
191
|
+
Ae.tokenize = vn.tokenize;
|
|
192
|
+
Ae.castInput = function(e) {
|
|
193
|
+
var r = this.options, l = r.undefinedReplacement, f = r.stringifyReplacer, g = f === void 0 ? function(n, t) {
|
|
194
194
|
return typeof t == "undefined" ? l : t;
|
|
195
195
|
} : f;
|
|
196
|
-
return typeof e == "string" ? e : JSON.stringify(
|
|
196
|
+
return typeof e == "string" ? e : JSON.stringify(Ge(e, null, null, g), g, " ");
|
|
197
197
|
};
|
|
198
|
-
|
|
199
|
-
return ae.prototype.equals.call(
|
|
198
|
+
Ae.equals = function(e, r) {
|
|
199
|
+
return ae.prototype.equals.call(Ae, e.replace(/,([\r\n])/g, "$1"), r.replace(/,([\r\n])/g, "$1"));
|
|
200
200
|
};
|
|
201
|
-
function
|
|
202
|
-
r = r || [], l = l || [], f && (e = f(
|
|
201
|
+
function Ge(e, r, l, f, g) {
|
|
202
|
+
r = r || [], l = l || [], f && (e = f(g, e));
|
|
203
203
|
var n;
|
|
204
204
|
for (n = 0; n < r.length; n += 1)
|
|
205
205
|
if (r[n] === e)
|
|
206
206
|
return l[n];
|
|
207
207
|
var t;
|
|
208
|
-
if (
|
|
208
|
+
if (rt.call(e) === "[object Array]") {
|
|
209
209
|
for (r.push(e), t = new Array(e.length), l.push(t), n = 0; n < e.length; n += 1)
|
|
210
|
-
t[n] =
|
|
210
|
+
t[n] = Ge(e[n], r, l, f, g);
|
|
211
211
|
return r.pop(), l.pop(), t;
|
|
212
212
|
}
|
|
213
213
|
if (e && e.toJSON && (e = e.toJSON()), Ie(e) === "object" && e !== null) {
|
|
@@ -216,27 +216,27 @@ function ze(e, r, l, f, h) {
|
|
|
216
216
|
for (s in e)
|
|
217
217
|
e.hasOwnProperty(s) && i.push(s);
|
|
218
218
|
for (i.sort(), n = 0; n < i.length; n += 1)
|
|
219
|
-
s = i[n], t[s] =
|
|
219
|
+
s = i[n], t[s] = Ge(e[s], r, l, f, s);
|
|
220
220
|
r.pop(), l.pop();
|
|
221
221
|
} else
|
|
222
222
|
t = e;
|
|
223
223
|
return t;
|
|
224
224
|
}
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var Ke = new ae();
|
|
226
|
+
Ke.tokenize = function(e) {
|
|
227
227
|
return e.slice();
|
|
228
228
|
};
|
|
229
|
-
|
|
229
|
+
Ke.join = Ke.removeEmpty = function(e) {
|
|
230
230
|
return e;
|
|
231
231
|
};
|
|
232
|
-
function
|
|
232
|
+
function it(e) {
|
|
233
233
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
234
234
|
}
|
|
235
|
-
var
|
|
235
|
+
var yn = { exports: {} };
|
|
236
236
|
(function(e) {
|
|
237
237
|
var r = function() {
|
|
238
238
|
this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = 0.5, this.Match_Distance = 1e3, this.Patch_DeleteThreshold = 0.5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
|
|
239
|
-
}, l = -1, f = 1,
|
|
239
|
+
}, l = -1, f = 1, g = 0;
|
|
240
240
|
r.Diff = function(n, t) {
|
|
241
241
|
return [n, t];
|
|
242
242
|
}, r.prototype.diff_main = function(n, t, i, s) {
|
|
@@ -245,14 +245,14 @@ var En = { exports: {} };
|
|
|
245
245
|
if (n == null || t == null)
|
|
246
246
|
throw new Error("Null input. (diff_main)");
|
|
247
247
|
if (n == t)
|
|
248
|
-
return n ? [new r.Diff(
|
|
248
|
+
return n ? [new r.Diff(g, n)] : [];
|
|
249
249
|
typeof i == "undefined" && (i = !0);
|
|
250
250
|
var a = i, c = this.diff_commonPrefix(n, t), u = n.substring(0, c);
|
|
251
251
|
n = n.substring(c), t = t.substring(c), c = this.diff_commonSuffix(n, t);
|
|
252
|
-
var
|
|
252
|
+
var h = n.substring(n.length - c);
|
|
253
253
|
n = n.substring(0, n.length - c), t = t.substring(0, t.length - c);
|
|
254
|
-
var
|
|
255
|
-
return u &&
|
|
254
|
+
var p = this.diff_compute_(n, t, a, o);
|
|
255
|
+
return u && p.unshift(new r.Diff(g, u)), h && p.push(new r.Diff(g, h)), this.diff_cleanupMerge(p), p;
|
|
256
256
|
}, r.prototype.diff_compute_ = function(n, t, i, s) {
|
|
257
257
|
var o;
|
|
258
258
|
if (!n)
|
|
@@ -263,7 +263,7 @@ var En = { exports: {} };
|
|
|
263
263
|
if (u != -1)
|
|
264
264
|
return o = [
|
|
265
265
|
new r.Diff(f, a.substring(0, u)),
|
|
266
|
-
new r.Diff(
|
|
266
|
+
new r.Diff(g, c),
|
|
267
267
|
new r.Diff(
|
|
268
268
|
f,
|
|
269
269
|
a.substring(u + c.length)
|
|
@@ -274,12 +274,12 @@ var En = { exports: {} };
|
|
|
274
274
|
new r.Diff(l, n),
|
|
275
275
|
new r.Diff(f, t)
|
|
276
276
|
];
|
|
277
|
-
var
|
|
278
|
-
if (
|
|
279
|
-
var
|
|
277
|
+
var h = this.diff_halfMatch_(n, t);
|
|
278
|
+
if (h) {
|
|
279
|
+
var p = h[0], d = h[1], _ = h[2], b = h[3], E = h[4], v = this.diff_main(p, _, i, s), y = this.diff_main(d, b, i, s);
|
|
280
280
|
return v.concat(
|
|
281
|
-
[new r.Diff(
|
|
282
|
-
|
|
281
|
+
[new r.Diff(g, E)],
|
|
282
|
+
y
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
285
|
return i && n.length > 100 && t.length > 100 ? this.diff_lineMode_(n, t, s) : this.diff_bisect_(n, t, s);
|
|
@@ -287,67 +287,67 @@ var En = { exports: {} };
|
|
|
287
287
|
var s = this.diff_linesToChars_(n, t);
|
|
288
288
|
n = s.chars1, t = s.chars2;
|
|
289
289
|
var o = s.lineArray, a = this.diff_main(n, t, !1, i);
|
|
290
|
-
this.diff_charsToLines_(a, o), this.diff_cleanupSemantic(a), a.push(new r.Diff(
|
|
291
|
-
for (var c = 0, u = 0,
|
|
290
|
+
this.diff_charsToLines_(a, o), this.diff_cleanupSemantic(a), a.push(new r.Diff(g, ""));
|
|
291
|
+
for (var c = 0, u = 0, h = 0, p = "", d = ""; c < a.length; ) {
|
|
292
292
|
switch (a[c][0]) {
|
|
293
293
|
case f:
|
|
294
|
-
|
|
294
|
+
h++, d += a[c][1];
|
|
295
295
|
break;
|
|
296
296
|
case l:
|
|
297
|
-
u++,
|
|
297
|
+
u++, p += a[c][1];
|
|
298
298
|
break;
|
|
299
|
-
case
|
|
300
|
-
if (u >= 1 &&
|
|
299
|
+
case g:
|
|
300
|
+
if (u >= 1 && h >= 1) {
|
|
301
301
|
a.splice(
|
|
302
|
-
c - u -
|
|
303
|
-
u +
|
|
304
|
-
), c = c - u -
|
|
305
|
-
for (var _ = this.diff_main(
|
|
306
|
-
a.splice(c, 0, _[
|
|
302
|
+
c - u - h,
|
|
303
|
+
u + h
|
|
304
|
+
), c = c - u - h;
|
|
305
|
+
for (var _ = this.diff_main(p, d, !1, i), b = _.length - 1; b >= 0; b--)
|
|
306
|
+
a.splice(c, 0, _[b]);
|
|
307
307
|
c = c + _.length;
|
|
308
308
|
}
|
|
309
|
-
|
|
309
|
+
h = 0, u = 0, p = "", d = "";
|
|
310
310
|
break;
|
|
311
311
|
}
|
|
312
312
|
c++;
|
|
313
313
|
}
|
|
314
314
|
return a.pop(), a;
|
|
315
315
|
}, r.prototype.diff_bisect_ = function(n, t, i) {
|
|
316
|
-
for (var s = n.length, o = t.length, a = Math.ceil((s + o) / 2), c = a, u = 2 * a,
|
|
317
|
-
d
|
|
318
|
-
|
|
319
|
-
for (var _ = s - o,
|
|
316
|
+
for (var s = n.length, o = t.length, a = Math.ceil((s + o) / 2), c = a, u = 2 * a, h = new Array(u), p = new Array(u), d = 0; d < u; d++)
|
|
317
|
+
h[d] = -1, p[d] = -1;
|
|
318
|
+
h[c + 1] = 0, p[c + 1] = 0;
|
|
319
|
+
for (var _ = s - o, b = _ % 2 != 0, E = 0, v = 0, y = 0, D = 0, T = 0; T < a && !((/* @__PURE__ */ new Date()).getTime() > i); T++) {
|
|
320
320
|
for (var M = -T + E; M <= T - v; M += 2) {
|
|
321
321
|
var R = c + M, L;
|
|
322
|
-
M == -T || M != T &&
|
|
322
|
+
M == -T || M != T && h[R - 1] < h[R + 1] ? L = h[R + 1] : L = h[R - 1] + 1;
|
|
323
323
|
for (var O = L - M; L < s && O < o && n.charAt(L) == t.charAt(O); )
|
|
324
324
|
L++, O++;
|
|
325
|
-
if (
|
|
325
|
+
if (h[R] = L, L > s)
|
|
326
326
|
v += 2;
|
|
327
327
|
else if (O > o)
|
|
328
328
|
E += 2;
|
|
329
|
-
else if (
|
|
329
|
+
else if (b) {
|
|
330
330
|
var P = c + _ - M;
|
|
331
|
-
if (P >= 0 && P < u &&
|
|
332
|
-
var $ = s -
|
|
331
|
+
if (P >= 0 && P < u && p[P] != -1) {
|
|
332
|
+
var $ = s - p[P];
|
|
333
333
|
if (L >= $)
|
|
334
334
|
return this.diff_bisectSplit_(n, t, L, O, i);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
for (var K = -T +
|
|
338
|
+
for (var K = -T + y; K <= T - D; K += 2) {
|
|
339
339
|
var P = c + K, $;
|
|
340
|
-
K == -T || K != T &&
|
|
340
|
+
K == -T || K != T && p[P - 1] < p[P + 1] ? $ = p[P + 1] : $ = p[P - 1] + 1;
|
|
341
341
|
for (var Y = $ - K; $ < s && Y < o && n.charAt(s - $ - 1) == t.charAt(o - Y - 1); )
|
|
342
342
|
$++, Y++;
|
|
343
|
-
if (
|
|
343
|
+
if (p[P] = $, $ > s)
|
|
344
344
|
D += 2;
|
|
345
345
|
else if (Y > o)
|
|
346
|
-
|
|
347
|
-
else if (!
|
|
346
|
+
y += 2;
|
|
347
|
+
else if (!b) {
|
|
348
348
|
var R = c + _ - K;
|
|
349
|
-
if (R >= 0 && R < u &&
|
|
350
|
-
var L =
|
|
349
|
+
if (R >= 0 && R < u && h[R] != -1) {
|
|
350
|
+
var L = h[R], O = c + L - R;
|
|
351
351
|
if ($ = s - $, L >= $)
|
|
352
352
|
return this.diff_bisectSplit_(n, t, L, O, i);
|
|
353
353
|
}
|
|
@@ -359,19 +359,19 @@ var En = { exports: {} };
|
|
|
359
359
|
new r.Diff(f, t)
|
|
360
360
|
];
|
|
361
361
|
}, r.prototype.diff_bisectSplit_ = function(n, t, i, s, o) {
|
|
362
|
-
var a = n.substring(0, i), c = t.substring(0, s), u = n.substring(i),
|
|
363
|
-
return
|
|
362
|
+
var a = n.substring(0, i), c = t.substring(0, s), u = n.substring(i), h = t.substring(s), p = this.diff_main(a, c, !1, o), d = this.diff_main(u, h, !1, o);
|
|
363
|
+
return p.concat(d);
|
|
364
364
|
}, r.prototype.diff_linesToChars_ = function(n, t) {
|
|
365
365
|
var i = [], s = {};
|
|
366
366
|
i[0] = "";
|
|
367
|
-
function o(
|
|
368
|
-
for (var
|
|
369
|
-
_ =
|
|
370
|
-
`,
|
|
371
|
-
var E =
|
|
372
|
-
(s.hasOwnProperty ? s.hasOwnProperty(E) : s[E] !== void 0) ?
|
|
367
|
+
function o(h) {
|
|
368
|
+
for (var p = "", d = 0, _ = -1, b = i.length; _ < h.length - 1; ) {
|
|
369
|
+
_ = h.indexOf(`
|
|
370
|
+
`, d), _ == -1 && (_ = h.length - 1);
|
|
371
|
+
var E = h.substring(d, _ + 1);
|
|
372
|
+
(s.hasOwnProperty ? s.hasOwnProperty(E) : s[E] !== void 0) ? p += String.fromCharCode(s[E]) : (b == a && (E = h.substring(d), _ = h.length), p += String.fromCharCode(b), s[E] = b, i[b++] = E), d = _ + 1;
|
|
373
373
|
}
|
|
374
|
-
return
|
|
374
|
+
return p;
|
|
375
375
|
}
|
|
376
376
|
var a = 4e4, c = o(n);
|
|
377
377
|
a = 65535;
|
|
@@ -404,10 +404,10 @@ var En = { exports: {} };
|
|
|
404
404
|
if (n == t)
|
|
405
405
|
return o;
|
|
406
406
|
for (var a = 0, c = 1; ; ) {
|
|
407
|
-
var u = n.substring(o - c),
|
|
408
|
-
if (
|
|
407
|
+
var u = n.substring(o - c), h = t.indexOf(u);
|
|
408
|
+
if (h == -1)
|
|
409
409
|
return a;
|
|
410
|
-
c +=
|
|
410
|
+
c += h, (h == 0 || n.substring(o - c) == t.substring(0, c)) && (a = c, c++);
|
|
411
411
|
}
|
|
412
412
|
}, r.prototype.diff_halfMatch_ = function(n, t) {
|
|
413
413
|
if (this.Diff_Timeout <= 0)
|
|
@@ -416,16 +416,16 @@ var En = { exports: {} };
|
|
|
416
416
|
if (i.length < 4 || s.length * 2 < i.length)
|
|
417
417
|
return null;
|
|
418
418
|
var o = this;
|
|
419
|
-
function a(v,
|
|
420
|
-
for (var T = v.substring(D, D + Math.floor(v.length / 4)), M = -1, R = "", L, O, P, $; (M =
|
|
419
|
+
function a(v, y, D) {
|
|
420
|
+
for (var T = v.substring(D, D + Math.floor(v.length / 4)), M = -1, R = "", L, O, P, $; (M = y.indexOf(T, M + 1)) != -1; ) {
|
|
421
421
|
var K = o.diff_commonPrefix(
|
|
422
422
|
v.substring(D),
|
|
423
|
-
|
|
423
|
+
y.substring(M)
|
|
424
424
|
), Y = o.diff_commonSuffix(
|
|
425
425
|
v.substring(0, D),
|
|
426
|
-
|
|
426
|
+
y.substring(0, M)
|
|
427
427
|
);
|
|
428
|
-
R.length < Y + K && (R =
|
|
428
|
+
R.length < Y + K && (R = y.substring(M - Y, M) + y.substring(M, M + K), L = v.substring(0, D - Y), O = v.substring(D + K), P = y.substring(0, M - Y), $ = y.substring(M + K));
|
|
429
429
|
}
|
|
430
430
|
return R.length * 2 >= v.length ? [
|
|
431
431
|
L,
|
|
@@ -443,34 +443,34 @@ var En = { exports: {} };
|
|
|
443
443
|
i,
|
|
444
444
|
s,
|
|
445
445
|
Math.ceil(i.length / 2)
|
|
446
|
-
),
|
|
446
|
+
), h;
|
|
447
447
|
if (!c && !u)
|
|
448
448
|
return null;
|
|
449
|
-
u ? c ?
|
|
450
|
-
var
|
|
451
|
-
n.length > t.length ? (
|
|
452
|
-
var E =
|
|
453
|
-
return [
|
|
449
|
+
u ? c ? h = c[4].length > u[4].length ? c : u : h = u : h = c;
|
|
450
|
+
var p, d, _, b;
|
|
451
|
+
n.length > t.length ? (p = h[0], d = h[1], _ = h[2], b = h[3]) : (_ = h[0], b = h[1], p = h[2], d = h[3]);
|
|
452
|
+
var E = h[4];
|
|
453
|
+
return [p, d, _, b, E];
|
|
454
454
|
}, r.prototype.diff_cleanupSemantic = function(n) {
|
|
455
|
-
for (var t = !1, i = [], s = 0, o = null, a = 0, c = 0, u = 0,
|
|
456
|
-
n[a][0] ==
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
for (var t = !1, i = [], s = 0, o = null, a = 0, c = 0, u = 0, h = 0, p = 0; a < n.length; )
|
|
456
|
+
n[a][0] == g ? (i[s++] = a, c = h, u = p, h = 0, p = 0, o = n[a][1]) : (n[a][0] == f ? h += n[a][1].length : p += n[a][1].length, o && o.length <= Math.max(c, u) && o.length <= Math.max(
|
|
457
|
+
h,
|
|
458
|
+
p
|
|
459
459
|
) && (n.splice(
|
|
460
460
|
i[s - 1],
|
|
461
461
|
0,
|
|
462
462
|
new r.Diff(l, o)
|
|
463
|
-
), n[i[s - 1] + 1][0] = f, s--, s--, a = s > 0 ? i[s - 1] : -1, c = 0, u = 0,
|
|
463
|
+
), n[i[s - 1] + 1][0] = f, s--, s--, a = s > 0 ? i[s - 1] : -1, c = 0, u = 0, h = 0, p = 0, o = null, t = !0)), a++;
|
|
464
464
|
for (t && this.diff_cleanupMerge(n), this.diff_cleanupSemanticLossless(n), a = 1; a < n.length; ) {
|
|
465
465
|
if (n[a - 1][0] == l && n[a][0] == f) {
|
|
466
|
-
var
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
_.substring(0,
|
|
470
|
-
)), n[a - 1][1] =
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
)), n[a - 1][0] = f, n[a - 1][1] = _.substring(0, _.length - E), n[a + 1][0] = l, n[a + 1][1] =
|
|
466
|
+
var d = n[a - 1][1], _ = n[a][1], b = this.diff_commonOverlap_(d, _), E = this.diff_commonOverlap_(_, d);
|
|
467
|
+
b >= E ? (b >= d.length / 2 || b >= _.length / 2) && (n.splice(a, 0, new r.Diff(
|
|
468
|
+
g,
|
|
469
|
+
_.substring(0, b)
|
|
470
|
+
)), n[a - 1][1] = d.substring(0, d.length - b), n[a + 1][1] = _.substring(b), a++) : (E >= d.length / 2 || E >= _.length / 2) && (n.splice(a, 0, new r.Diff(
|
|
471
|
+
g,
|
|
472
|
+
d.substring(0, E)
|
|
473
|
+
)), n[a - 1][0] = f, n[a - 1][1] = _.substring(0, _.length - E), n[a + 1][0] = l, n[a + 1][1] = d.substring(E), a++), a++;
|
|
474
474
|
}
|
|
475
475
|
a++;
|
|
476
476
|
}
|
|
@@ -478,35 +478,35 @@ var En = { exports: {} };
|
|
|
478
478
|
function t(E, v) {
|
|
479
479
|
if (!E || !v)
|
|
480
480
|
return 6;
|
|
481
|
-
var
|
|
481
|
+
var y = E.charAt(E.length - 1), D = v.charAt(0), T = y.match(r.nonAlphaNumericRegex_), M = D.match(r.nonAlphaNumericRegex_), R = T && y.match(r.whitespaceRegex_), L = M && D.match(r.whitespaceRegex_), O = R && y.match(r.linebreakRegex_), P = L && D.match(r.linebreakRegex_), $ = O && E.match(r.blanklineEndRegex_), K = P && v.match(r.blanklineStartRegex_);
|
|
482
482
|
return $ || K ? 5 : O || P ? 4 : T && !R && L ? 3 : R || L ? 2 : T || M ? 1 : 0;
|
|
483
483
|
}
|
|
484
484
|
for (var i = 1; i < n.length - 1; ) {
|
|
485
|
-
if (n[i - 1][0] ==
|
|
485
|
+
if (n[i - 1][0] == g && n[i + 1][0] == g) {
|
|
486
486
|
var s = n[i - 1][1], o = n[i][1], a = n[i + 1][1], c = this.diff_commonSuffix(s, o);
|
|
487
487
|
if (c) {
|
|
488
488
|
var u = o.substring(o.length - c);
|
|
489
489
|
s = s.substring(0, s.length - c), o = u + o.substring(0, o.length - c), a = u + a;
|
|
490
490
|
}
|
|
491
|
-
for (var
|
|
491
|
+
for (var h = s, p = o, d = a, _ = t(s, o) + t(o, a); o.charAt(0) === a.charAt(0); ) {
|
|
492
492
|
s += o.charAt(0), o = o.substring(1) + a.charAt(0), a = a.substring(1);
|
|
493
|
-
var
|
|
494
|
-
|
|
493
|
+
var b = t(s, o) + t(o, a);
|
|
494
|
+
b >= _ && (_ = b, h = s, p = o, d = a);
|
|
495
495
|
}
|
|
496
|
-
n[i - 1][1] !=
|
|
496
|
+
n[i - 1][1] != h && (h ? n[i - 1][1] = h : (n.splice(i - 1, 1), i--), n[i][1] = p, d ? n[i + 1][1] = d : (n.splice(i + 1, 1), i--));
|
|
497
497
|
}
|
|
498
498
|
i++;
|
|
499
499
|
}
|
|
500
500
|
}, r.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, r.whitespaceRegex_ = /\s/, r.linebreakRegex_ = /[\r\n]/, r.blanklineEndRegex_ = /\n\r?\n$/, r.blanklineStartRegex_ = /^\r?\n\r?\n/, r.prototype.diff_cleanupEfficiency = function(n) {
|
|
501
|
-
for (var t = !1, i = [], s = 0, o = null, a = 0, c = !1, u = !1,
|
|
502
|
-
n[a][0] ==
|
|
501
|
+
for (var t = !1, i = [], s = 0, o = null, a = 0, c = !1, u = !1, h = !1, p = !1; a < n.length; )
|
|
502
|
+
n[a][0] == g ? (n[a][1].length < this.Diff_EditCost && (h || p) ? (i[s++] = a, c = h, u = p, o = n[a][1]) : (s = 0, o = null), h = p = !1) : (n[a][0] == l ? p = !0 : h = !0, o && (c && u && h && p || o.length < this.Diff_EditCost / 2 && c + u + h + p == 3) && (n.splice(
|
|
503
503
|
i[s - 1],
|
|
504
504
|
0,
|
|
505
505
|
new r.Diff(l, o)
|
|
506
|
-
), n[i[s - 1] + 1][0] = f, s--, o = null, c && u ? (
|
|
506
|
+
), n[i[s - 1] + 1][0] = f, s--, o = null, c && u ? (h = p = !0, s = 0) : (s--, a = s > 0 ? i[s - 1] : -1, h = p = !1), t = !0)), a++;
|
|
507
507
|
t && this.diff_cleanupMerge(n);
|
|
508
508
|
}, r.prototype.diff_cleanupMerge = function(n) {
|
|
509
|
-
n.push(new r.Diff(
|
|
509
|
+
n.push(new r.Diff(g, ""));
|
|
510
510
|
for (var t = 0, i = 0, s = 0, o = "", a = "", c; t < n.length; )
|
|
511
511
|
switch (n[t][0]) {
|
|
512
512
|
case f:
|
|
@@ -515,9 +515,9 @@ var En = { exports: {} };
|
|
|
515
515
|
case l:
|
|
516
516
|
i++, o += n[t][1], t++;
|
|
517
517
|
break;
|
|
518
|
-
case
|
|
519
|
-
i + s > 1 ? (i !== 0 && s !== 0 && (c = this.diff_commonPrefix(a, o), c !== 0 && (t - i - s > 0 && n[t - i - s - 1][0] ==
|
|
520
|
-
|
|
518
|
+
case g:
|
|
519
|
+
i + s > 1 ? (i !== 0 && s !== 0 && (c = this.diff_commonPrefix(a, o), c !== 0 && (t - i - s > 0 && n[t - i - s - 1][0] == g ? n[t - i - s - 1][1] += a.substring(0, c) : (n.splice(0, 0, new r.Diff(
|
|
520
|
+
g,
|
|
521
521
|
a.substring(0, c)
|
|
522
522
|
)), t++), a = a.substring(c), o = o.substring(c)), c = this.diff_commonSuffix(a, o), c !== 0 && (n[t][1] = a.substring(a.length - c) + n[t][1], a = a.substring(0, a.length - c), o = o.substring(0, o.length - c))), t -= i + s, n.splice(t, i + s), o.length && (n.splice(
|
|
523
523
|
t,
|
|
@@ -527,13 +527,13 @@ var En = { exports: {} };
|
|
|
527
527
|
t,
|
|
528
528
|
0,
|
|
529
529
|
new r.Diff(f, a)
|
|
530
|
-
), t++), t++) : t !== 0 && n[t - 1][0] ==
|
|
530
|
+
), t++), t++) : t !== 0 && n[t - 1][0] == g ? (n[t - 1][1] += n[t][1], n.splice(t, 1)) : t++, s = 0, i = 0, o = "", a = "";
|
|
531
531
|
break;
|
|
532
532
|
}
|
|
533
533
|
n[n.length - 1][1] === "" && n.pop();
|
|
534
534
|
var u = !1;
|
|
535
535
|
for (t = 1; t < n.length - 1; )
|
|
536
|
-
n[t - 1][0] ==
|
|
536
|
+
n[t - 1][0] == g && n[t + 1][0] == g && (n[t][1].substring(n[t][1].length - n[t - 1][1].length) == n[t - 1][1] ? (n[t][1] = n[t - 1][1] + n[t][1].substring(0, n[t][1].length - n[t - 1][1].length), n[t + 1][1] = n[t - 1][1] + n[t + 1][1], n.splice(t - 1, 1), u = !0) : n[t][1].substring(0, n[t + 1][1].length) == n[t + 1][1] && (n[t - 1][1] += n[t + 1][1], n[t][1] = n[t][1].substring(n[t + 1][1].length) + n[t + 1][1], n.splice(t + 1, 1), u = !0)), t++;
|
|
537
537
|
u && this.diff_cleanupMerge(n);
|
|
538
538
|
}, r.prototype.diff_xIndex = function(n, t) {
|
|
539
539
|
var i = 0, s = 0, o = 0, a = 0, c;
|
|
@@ -542,16 +542,16 @@ var En = { exports: {} };
|
|
|
542
542
|
return n.length != c && n[c][0] === l ? a : a + (t - o);
|
|
543
543
|
}, r.prototype.diff_prettyHtml = function(n) {
|
|
544
544
|
for (var t = [], i = /&/g, s = /</g, o = />/g, a = /\n/g, c = 0; c < n.length; c++) {
|
|
545
|
-
var u = n[c][0],
|
|
545
|
+
var u = n[c][0], h = n[c][1], p = h.replace(i, "&").replace(s, "<").replace(o, ">").replace(a, "¶<br>");
|
|
546
546
|
switch (u) {
|
|
547
547
|
case f:
|
|
548
|
-
t[c] = '<ins style="background:#e6ffe6;">' +
|
|
548
|
+
t[c] = '<ins style="background:#e6ffe6;">' + p + "</ins>";
|
|
549
549
|
break;
|
|
550
550
|
case l:
|
|
551
|
-
t[c] = '<del style="background:#ffe6e6;">' +
|
|
551
|
+
t[c] = '<del style="background:#ffe6e6;">' + p + "</del>";
|
|
552
552
|
break;
|
|
553
|
-
case
|
|
554
|
-
t[c] = "<span>" +
|
|
553
|
+
case g:
|
|
554
|
+
t[c] = "<span>" + p + "</span>";
|
|
555
555
|
break;
|
|
556
556
|
}
|
|
557
557
|
}
|
|
@@ -574,7 +574,7 @@ var En = { exports: {} };
|
|
|
574
574
|
case l:
|
|
575
575
|
s += c.length;
|
|
576
576
|
break;
|
|
577
|
-
case
|
|
577
|
+
case g:
|
|
578
578
|
t += Math.max(i, s), i = 0, s = 0;
|
|
579
579
|
break;
|
|
580
580
|
}
|
|
@@ -589,7 +589,7 @@ var En = { exports: {} };
|
|
|
589
589
|
case l:
|
|
590
590
|
t[i] = "-" + n[i][1].length;
|
|
591
591
|
break;
|
|
592
|
-
case
|
|
592
|
+
case g:
|
|
593
593
|
t[i] = "=" + n[i][1].length;
|
|
594
594
|
break;
|
|
595
595
|
}
|
|
@@ -601,17 +601,17 @@ var En = { exports: {} };
|
|
|
601
601
|
case "+":
|
|
602
602
|
try {
|
|
603
603
|
i[s++] = new r.Diff(f, decodeURI(u));
|
|
604
|
-
} catch (
|
|
604
|
+
} catch (d) {
|
|
605
605
|
throw new Error("Illegal escape in diff_fromDelta: " + u);
|
|
606
606
|
}
|
|
607
607
|
break;
|
|
608
608
|
case "-":
|
|
609
609
|
case "=":
|
|
610
|
-
var
|
|
611
|
-
if (isNaN(
|
|
610
|
+
var h = parseInt(u, 10);
|
|
611
|
+
if (isNaN(h) || h < 0)
|
|
612
612
|
throw new Error("Invalid number in diff_fromDelta: " + u);
|
|
613
|
-
var
|
|
614
|
-
a[c].charAt(0) == "=" ? i[s++] = new r.Diff(
|
|
613
|
+
var p = n.substring(o, o += h);
|
|
614
|
+
a[c].charAt(0) == "=" ? i[s++] = new r.Diff(g, p) : i[s++] = new r.Diff(l, p);
|
|
615
615
|
break;
|
|
616
616
|
default:
|
|
617
617
|
if (a[c])
|
|
@@ -635,17 +635,17 @@ var En = { exports: {} };
|
|
|
635
635
|
}
|
|
636
636
|
var c = this.Match_Threshold, u = n.indexOf(t, i);
|
|
637
637
|
u != -1 && (c = Math.min(a(0, u), c), u = n.lastIndexOf(t, i + t.length), u != -1 && (c = Math.min(a(0, u), c)));
|
|
638
|
-
var
|
|
638
|
+
var h = 1 << t.length - 1;
|
|
639
639
|
u = -1;
|
|
640
|
-
for (var
|
|
641
|
-
for (
|
|
642
|
-
a(E, i +
|
|
643
|
-
_ =
|
|
644
|
-
var v = Math.max(1, i -
|
|
645
|
-
D[
|
|
646
|
-
for (var T =
|
|
640
|
+
for (var p, d, _ = t.length + n.length, b, E = 0; E < t.length; E++) {
|
|
641
|
+
for (p = 0, d = _; p < d; )
|
|
642
|
+
a(E, i + d) <= c ? p = d : _ = d, d = Math.floor((_ - p) / 2 + p);
|
|
643
|
+
_ = d;
|
|
644
|
+
var v = Math.max(1, i - d + 1), y = Math.min(i + d, n.length) + t.length, D = Array(y + 2);
|
|
645
|
+
D[y + 1] = (1 << E) - 1;
|
|
646
|
+
for (var T = y; T >= v; T--) {
|
|
647
647
|
var M = s[n.charAt(T - 1)];
|
|
648
|
-
if (E === 0 ? D[T] = (D[T + 1] << 1 | 1) & M : D[T] = (D[T + 1] << 1 | 1) & M | ((
|
|
648
|
+
if (E === 0 ? D[T] = (D[T + 1] << 1 | 1) & M : D[T] = (D[T + 1] << 1 | 1) & M | ((b[T + 1] | b[T]) << 1 | 1) | b[T + 1], D[T] & h) {
|
|
649
649
|
var R = a(E, T - 1);
|
|
650
650
|
if (R <= c)
|
|
651
651
|
if (c = R, u = T - 1, u > i)
|
|
@@ -656,7 +656,7 @@ var En = { exports: {} };
|
|
|
656
656
|
}
|
|
657
657
|
if (a(E + 1, i) > c)
|
|
658
658
|
break;
|
|
659
|
-
|
|
659
|
+
b = D;
|
|
660
660
|
}
|
|
661
661
|
return u;
|
|
662
662
|
}, r.prototype.match_alphabet_ = function(n) {
|
|
@@ -676,12 +676,12 @@ var En = { exports: {} };
|
|
|
676
676
|
);
|
|
677
677
|
s += this.Patch_Margin;
|
|
678
678
|
var o = t.substring(n.start2 - s, n.start2);
|
|
679
|
-
o && n.diffs.unshift(new r.Diff(
|
|
679
|
+
o && n.diffs.unshift(new r.Diff(g, o));
|
|
680
680
|
var a = t.substring(
|
|
681
681
|
n.start2 + n.length1,
|
|
682
682
|
n.start2 + n.length1 + s
|
|
683
683
|
);
|
|
684
|
-
a && n.diffs.push(new r.Diff(
|
|
684
|
+
a && n.diffs.push(new r.Diff(g, a)), n.start1 -= o.length, n.start2 -= o.length, n.length1 += o.length + a.length, n.length2 += o.length + a.length;
|
|
685
685
|
}
|
|
686
686
|
}, r.prototype.patch_make = function(n, t, i) {
|
|
687
687
|
var s, o;
|
|
@@ -708,22 +708,22 @@ var En = { exports: {} };
|
|
|
708
708
|
throw new Error("Unknown call format to patch_make.");
|
|
709
709
|
if (o.length === 0)
|
|
710
710
|
return [];
|
|
711
|
-
for (var a = [], c = new r.patch_obj(), u = 0,
|
|
712
|
-
var E = o[
|
|
713
|
-
switch (!u && E !==
|
|
711
|
+
for (var a = [], c = new r.patch_obj(), u = 0, h = 0, p = 0, d = s, _ = s, b = 0; b < o.length; b++) {
|
|
712
|
+
var E = o[b][0], v = o[b][1];
|
|
713
|
+
switch (!u && E !== g && (c.start1 = h, c.start2 = p), E) {
|
|
714
714
|
case f:
|
|
715
|
-
c.diffs[u++] = o[
|
|
715
|
+
c.diffs[u++] = o[b], c.length2 += v.length, _ = _.substring(0, p) + v + _.substring(p);
|
|
716
716
|
break;
|
|
717
717
|
case l:
|
|
718
|
-
c.length1 += v.length, c.diffs[u++] = o[
|
|
718
|
+
c.length1 += v.length, c.diffs[u++] = o[b], _ = _.substring(0, p) + _.substring(p + v.length);
|
|
719
719
|
break;
|
|
720
|
-
case
|
|
721
|
-
v.length <= 2 * this.Patch_Margin && u && o.length !=
|
|
720
|
+
case g:
|
|
721
|
+
v.length <= 2 * this.Patch_Margin && u && o.length != b + 1 ? (c.diffs[u++] = o[b], c.length1 += v.length, c.length2 += v.length) : v.length >= 2 * this.Patch_Margin && u && (this.patch_addContext_(c, d), a.push(c), c = new r.patch_obj(), u = 0, d = _, h = p);
|
|
722
722
|
break;
|
|
723
723
|
}
|
|
724
|
-
E !== f && (
|
|
724
|
+
E !== f && (h += v.length), E !== l && (p += v.length);
|
|
725
725
|
}
|
|
726
|
-
return u && (this.patch_addContext_(c,
|
|
726
|
+
return u && (this.patch_addContext_(c, d), a.push(c)), a;
|
|
727
727
|
}, r.prototype.patch_deepCopy = function(n) {
|
|
728
728
|
for (var t = [], i = 0; i < n.length; i++) {
|
|
729
729
|
var s = n[i], o = new r.patch_obj();
|
|
@@ -740,34 +740,34 @@ var En = { exports: {} };
|
|
|
740
740
|
var i = this.patch_addPadding(n);
|
|
741
741
|
t = i + t + i, this.patch_splitMax(n);
|
|
742
742
|
for (var s = 0, o = [], a = 0; a < n.length; a++) {
|
|
743
|
-
var c = n[a].start2 + s, u = this.diff_text1(n[a].diffs),
|
|
744
|
-
if (u.length > this.Match_MaxBits ? (
|
|
743
|
+
var c = n[a].start2 + s, u = this.diff_text1(n[a].diffs), h, p = -1;
|
|
744
|
+
if (u.length > this.Match_MaxBits ? (h = this.match_main(
|
|
745
745
|
t,
|
|
746
746
|
u.substring(0, this.Match_MaxBits),
|
|
747
747
|
c
|
|
748
|
-
),
|
|
748
|
+
), h != -1 && (p = this.match_main(
|
|
749
749
|
t,
|
|
750
750
|
u.substring(u.length - this.Match_MaxBits),
|
|
751
751
|
c + u.length - this.Match_MaxBits
|
|
752
|
-
), (
|
|
752
|
+
), (p == -1 || h >= p) && (h = -1))) : h = this.match_main(t, u, c), h == -1)
|
|
753
753
|
o[a] = !1, s -= n[a].length2 - n[a].length1;
|
|
754
754
|
else {
|
|
755
|
-
o[a] = !0, s =
|
|
756
|
-
var
|
|
757
|
-
if (
|
|
758
|
-
t = t.substring(0,
|
|
755
|
+
o[a] = !0, s = h - c;
|
|
756
|
+
var d;
|
|
757
|
+
if (p == -1 ? d = t.substring(h, h + u.length) : d = t.substring(h, p + this.Match_MaxBits), u == d)
|
|
758
|
+
t = t.substring(0, h) + this.diff_text2(n[a].diffs) + t.substring(h + u.length);
|
|
759
759
|
else {
|
|
760
|
-
var _ = this.diff_main(u,
|
|
760
|
+
var _ = this.diff_main(u, d, !1);
|
|
761
761
|
if (u.length > this.Match_MaxBits && this.diff_levenshtein(_) / u.length > this.Patch_DeleteThreshold)
|
|
762
762
|
o[a] = !1;
|
|
763
763
|
else {
|
|
764
764
|
this.diff_cleanupSemanticLossless(_);
|
|
765
|
-
for (var
|
|
766
|
-
var
|
|
767
|
-
|
|
765
|
+
for (var b = 0, E, v = 0; v < n[a].diffs.length; v++) {
|
|
766
|
+
var y = n[a].diffs[v];
|
|
767
|
+
y[0] !== g && (E = this.diff_xIndex(_, b)), y[0] === f ? t = t.substring(0, h + E) + y[1] + t.substring(h + E) : y[0] === l && (t = t.substring(0, h + E) + t.substring(h + this.diff_xIndex(
|
|
768
768
|
_,
|
|
769
|
-
|
|
770
|
-
))),
|
|
769
|
+
b + y[1].length
|
|
770
|
+
))), y[0] !== l && (b += y[1].length);
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
}
|
|
@@ -780,14 +780,14 @@ var En = { exports: {} };
|
|
|
780
780
|
for (var s = 0; s < n.length; s++)
|
|
781
781
|
n[s].start1 += t, n[s].start2 += t;
|
|
782
782
|
var o = n[0], a = o.diffs;
|
|
783
|
-
if (a.length == 0 || a[0][0] !=
|
|
784
|
-
a.unshift(new r.Diff(
|
|
783
|
+
if (a.length == 0 || a[0][0] != g)
|
|
784
|
+
a.unshift(new r.Diff(g, i)), o.start1 -= t, o.start2 -= t, o.length1 += t, o.length2 += t;
|
|
785
785
|
else if (t > a[0][1].length) {
|
|
786
786
|
var c = t - a[0][1].length;
|
|
787
787
|
a[0][1] = i.substring(a[0][1].length) + a[0][1], o.start1 -= c, o.start2 -= c, o.length1 += c, o.length2 += c;
|
|
788
788
|
}
|
|
789
|
-
if (o = n[n.length - 1], a = o.diffs, a.length == 0 || a[a.length - 1][0] !=
|
|
790
|
-
a.push(new r.Diff(
|
|
789
|
+
if (o = n[n.length - 1], a = o.diffs, a.length == 0 || a[a.length - 1][0] != g)
|
|
790
|
+
a.push(new r.Diff(g, i)), o.length1 += t, o.length2 += t;
|
|
791
791
|
else if (t > a[a.length - 1][1].length) {
|
|
792
792
|
var c = t - a[a.length - 1][1].length;
|
|
793
793
|
a[a.length - 1][1] += i.substring(0, c), o.length1 += c, o.length2 += c;
|
|
@@ -799,17 +799,17 @@ var En = { exports: {} };
|
|
|
799
799
|
var s = n[i];
|
|
800
800
|
n.splice(i--, 1);
|
|
801
801
|
for (var o = s.start1, a = s.start2, c = ""; s.diffs.length !== 0; ) {
|
|
802
|
-
var u = new r.patch_obj(),
|
|
803
|
-
for (u.start1 = o - c.length, u.start2 = a - c.length, c !== "" && (u.length1 = u.length2 = c.length, u.diffs.push(new r.Diff(
|
|
804
|
-
var
|
|
805
|
-
|
|
802
|
+
var u = new r.patch_obj(), h = !0;
|
|
803
|
+
for (u.start1 = o - c.length, u.start2 = a - c.length, c !== "" && (u.length1 = u.length2 = c.length, u.diffs.push(new r.Diff(g, c))); s.diffs.length !== 0 && u.length1 < t - this.Patch_Margin; ) {
|
|
804
|
+
var p = s.diffs[0][0], d = s.diffs[0][1];
|
|
805
|
+
p === f ? (u.length2 += d.length, a += d.length, u.diffs.push(s.diffs.shift()), h = !1) : p === l && u.diffs.length == 1 && u.diffs[0][0] == g && d.length > 2 * t ? (u.length1 += d.length, o += d.length, h = !1, u.diffs.push(new r.Diff(p, d)), s.diffs.shift()) : (d = d.substring(
|
|
806
806
|
0,
|
|
807
807
|
t - u.length1 - this.Patch_Margin
|
|
808
|
-
), u.length1 +=
|
|
808
|
+
), u.length1 += d.length, o += d.length, p === g ? (u.length2 += d.length, a += d.length) : h = !1, u.diffs.push(new r.Diff(p, d)), d == s.diffs[0][1] ? s.diffs.shift() : s.diffs[0][1] = s.diffs[0][1].substring(d.length));
|
|
809
809
|
}
|
|
810
810
|
c = this.diff_text2(u.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
811
811
|
var _ = this.diff_text1(s.diffs).substring(0, this.Patch_Margin);
|
|
812
|
-
_ !== "" && (u.length1 += _.length, u.length2 += _.length, u.diffs.length !== 0 && u.diffs[u.diffs.length - 1][0] ===
|
|
812
|
+
_ !== "" && (u.length1 += _.length, u.length2 += _.length, u.diffs.length !== 0 && u.diffs[u.diffs.length - 1][0] === g ? u.diffs[u.diffs.length - 1][1] += _ : u.diffs.push(new r.Diff(g, _))), h || n.splice(++i, 0, u);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
}, r.prototype.patch_toText = function(n) {
|
|
@@ -829,20 +829,20 @@ var En = { exports: {} };
|
|
|
829
829
|
for (t.push(c), c.start1 = parseInt(a[1], 10), a[2] === "" ? (c.start1--, c.length1 = 1) : a[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(a[2], 10)), c.start2 = parseInt(a[3], 10), a[4] === "" ? (c.start2--, c.length2 = 1) : a[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(a[4], 10)), s++; s < i.length; ) {
|
|
830
830
|
var u = i[s].charAt(0);
|
|
831
831
|
try {
|
|
832
|
-
var
|
|
833
|
-
} catch (
|
|
834
|
-
throw new Error("Illegal escape in patch_fromText: " +
|
|
832
|
+
var h = decodeURI(i[s].substring(1));
|
|
833
|
+
} catch (p) {
|
|
834
|
+
throw new Error("Illegal escape in patch_fromText: " + h);
|
|
835
835
|
}
|
|
836
836
|
if (u == "-")
|
|
837
|
-
c.diffs.push(new r.Diff(l,
|
|
837
|
+
c.diffs.push(new r.Diff(l, h));
|
|
838
838
|
else if (u == "+")
|
|
839
|
-
c.diffs.push(new r.Diff(f,
|
|
839
|
+
c.diffs.push(new r.Diff(f, h));
|
|
840
840
|
else if (u == " ")
|
|
841
|
-
c.diffs.push(new r.Diff(
|
|
841
|
+
c.diffs.push(new r.Diff(g, h));
|
|
842
842
|
else {
|
|
843
843
|
if (u == "@")
|
|
844
844
|
break;
|
|
845
|
-
if (u !== "") throw new Error('Invalid patch mode "' + u + '" in: ' +
|
|
845
|
+
if (u !== "") throw new Error('Invalid patch mode "' + u + '" in: ' + h);
|
|
846
846
|
}
|
|
847
847
|
s++;
|
|
848
848
|
}
|
|
@@ -862,7 +862,7 @@ var En = { exports: {} };
|
|
|
862
862
|
case l:
|
|
863
863
|
s = "-";
|
|
864
864
|
break;
|
|
865
|
-
case
|
|
865
|
+
case g:
|
|
866
866
|
s = " ";
|
|
867
867
|
break;
|
|
868
868
|
}
|
|
@@ -870,17 +870,17 @@ var En = { exports: {} };
|
|
|
870
870
|
`;
|
|
871
871
|
}
|
|
872
872
|
return i.join("").replace(/%20/g, " ");
|
|
873
|
-
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT = f, e.exports.DIFF_EQUAL =
|
|
874
|
-
})(
|
|
875
|
-
var
|
|
876
|
-
function
|
|
873
|
+
}, e.exports = r, e.exports.diff_match_patch = r, e.exports.DIFF_DELETE = l, e.exports.DIFF_INSERT = f, e.exports.DIFF_EQUAL = g;
|
|
874
|
+
})(yn);
|
|
875
|
+
var Fe = yn.exports;
|
|
876
|
+
function wn(e) {
|
|
877
877
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
878
878
|
throw new Error("map is read-only");
|
|
879
879
|
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
880
880
|
throw new Error("set is read-only");
|
|
881
881
|
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((r) => {
|
|
882
882
|
const l = e[r], f = typeof l;
|
|
883
|
-
(f === "object" || f === "function") && !Object.isFrozen(l) &&
|
|
883
|
+
(f === "object" || f === "function") && !Object.isFrozen(l) && wn(l);
|
|
884
884
|
}), e;
|
|
885
885
|
}
|
|
886
886
|
class on {
|
|
@@ -894,7 +894,7 @@ class on {
|
|
|
894
894
|
this.isMatchIgnored = !0;
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function An(e) {
|
|
898
898
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
899
899
|
}
|
|
900
900
|
function le(e, ...r) {
|
|
@@ -902,24 +902,24 @@ function le(e, ...r) {
|
|
|
902
902
|
for (const f in e)
|
|
903
903
|
l[f] = e[f];
|
|
904
904
|
return r.forEach(function(f) {
|
|
905
|
-
for (const
|
|
906
|
-
l[
|
|
905
|
+
for (const g in f)
|
|
906
|
+
l[g] = f[g];
|
|
907
907
|
}), /** @type {T} */
|
|
908
908
|
l;
|
|
909
909
|
}
|
|
910
|
-
const
|
|
910
|
+
const st = "</span>", ln = (e) => !!e.scope, at = (e, { prefix: r }) => {
|
|
911
911
|
if (e.startsWith("language:"))
|
|
912
912
|
return e.replace("language:", "language-");
|
|
913
913
|
if (e.includes(".")) {
|
|
914
914
|
const l = e.split(".");
|
|
915
915
|
return [
|
|
916
916
|
`${r}${l.shift()}`,
|
|
917
|
-
...l.map((f,
|
|
917
|
+
...l.map((f, g) => `${f}${"_".repeat(g + 1)}`)
|
|
918
918
|
].join(" ");
|
|
919
919
|
}
|
|
920
920
|
return `${r}${e}`;
|
|
921
921
|
};
|
|
922
|
-
class
|
|
922
|
+
class ot {
|
|
923
923
|
/**
|
|
924
924
|
* Creates a new HTMLRenderer
|
|
925
925
|
*
|
|
@@ -934,7 +934,7 @@ class st {
|
|
|
934
934
|
*
|
|
935
935
|
* @param {string} text */
|
|
936
936
|
addText(r) {
|
|
937
|
-
this.buffer +=
|
|
937
|
+
this.buffer += An(r);
|
|
938
938
|
}
|
|
939
939
|
/**
|
|
940
940
|
* Adds a node open to the output stream (if needed)
|
|
@@ -942,7 +942,7 @@ class st {
|
|
|
942
942
|
* @param {Node} node */
|
|
943
943
|
openNode(r) {
|
|
944
944
|
if (!ln(r)) return;
|
|
945
|
-
const l =
|
|
945
|
+
const l = at(
|
|
946
946
|
r.scope,
|
|
947
947
|
{ prefix: this.classPrefix }
|
|
948
948
|
);
|
|
@@ -953,7 +953,7 @@ class st {
|
|
|
953
953
|
*
|
|
954
954
|
* @param {Node} node */
|
|
955
955
|
closeNode(r) {
|
|
956
|
-
ln(r) && (this.buffer +=
|
|
956
|
+
ln(r) && (this.buffer += st);
|
|
957
957
|
}
|
|
958
958
|
/**
|
|
959
959
|
* returns the accumulated buffer
|
|
@@ -974,7 +974,7 @@ const cn = (e = {}) => {
|
|
|
974
974
|
const r = { children: [] };
|
|
975
975
|
return Object.assign(r, e), r;
|
|
976
976
|
};
|
|
977
|
-
class
|
|
977
|
+
class Ze {
|
|
978
978
|
constructor() {
|
|
979
979
|
this.rootNode = cn(), this.stack = [this.rootNode];
|
|
980
980
|
}
|
|
@@ -1022,11 +1022,11 @@ class Qe {
|
|
|
1022
1022
|
*/
|
|
1023
1023
|
static _collapse(r) {
|
|
1024
1024
|
typeof r != "string" && r.children && (r.children.every((l) => typeof l == "string") ? r.children = [r.children.join("")] : r.children.forEach((l) => {
|
|
1025
|
-
|
|
1025
|
+
Ze._collapse(l);
|
|
1026
1026
|
}));
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
class
|
|
1029
|
+
class lt extends Ze {
|
|
1030
1030
|
/**
|
|
1031
1031
|
* @param {*} options
|
|
1032
1032
|
*/
|
|
@@ -1055,60 +1055,60 @@ class at extends Qe {
|
|
|
1055
1055
|
l && (f.scope = `language:${l}`), this.add(f);
|
|
1056
1056
|
}
|
|
1057
1057
|
toHTML() {
|
|
1058
|
-
return new
|
|
1058
|
+
return new ot(this, this.options).value();
|
|
1059
1059
|
}
|
|
1060
1060
|
finalize() {
|
|
1061
1061
|
return this.closeAllNodes(), !0;
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Ne(e) {
|
|
1065
1065
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function Nn(e) {
|
|
1068
1068
|
return fe("(?=", e, ")");
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function ct(e) {
|
|
1071
1071
|
return fe("(?:", e, ")*");
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function ut(e) {
|
|
1074
1074
|
return fe("(?:", e, ")?");
|
|
1075
1075
|
}
|
|
1076
1076
|
function fe(...e) {
|
|
1077
|
-
return e.map((l) =>
|
|
1077
|
+
return e.map((l) => Ne(l)).join("");
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function ft(e) {
|
|
1080
1080
|
const r = e[e.length - 1];
|
|
1081
1081
|
return typeof r == "object" && r.constructor === Object ? (e.splice(e.length - 1, 1), r) : {};
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return "(" + (
|
|
1083
|
+
function Ye(...e) {
|
|
1084
|
+
return "(" + (ft(e).capture ? "" : "?:") + e.map((f) => Ne(f)).join("|") + ")";
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function Mn(e) {
|
|
1087
1087
|
return new RegExp(e.toString() + "|").exec("").length - 1;
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function gt(e, r) {
|
|
1090
1090
|
const l = e && e.exec(r);
|
|
1091
1091
|
return l && l.index === 0;
|
|
1092
1092
|
}
|
|
1093
|
-
const
|
|
1094
|
-
function
|
|
1093
|
+
const ht = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1094
|
+
function Xe(e, { joinWith: r }) {
|
|
1095
1095
|
let l = 0;
|
|
1096
1096
|
return e.map((f) => {
|
|
1097
1097
|
l += 1;
|
|
1098
|
-
const
|
|
1099
|
-
let n =
|
|
1098
|
+
const g = l;
|
|
1099
|
+
let n = Ne(f), t = "";
|
|
1100
1100
|
for (; n.length > 0; ) {
|
|
1101
|
-
const i =
|
|
1101
|
+
const i = ht.exec(n);
|
|
1102
1102
|
if (!i) {
|
|
1103
1103
|
t += n;
|
|
1104
1104
|
break;
|
|
1105
1105
|
}
|
|
1106
|
-
t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) +
|
|
1106
|
+
t += n.substring(0, i.index), n = n.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? t += "\\" + String(Number(i[1]) + g) : (t += i[0], i[0] === "(" && l++);
|
|
1107
1107
|
}
|
|
1108
1108
|
return t;
|
|
1109
1109
|
}).map((f) => `(${f})`).join(r);
|
|
1110
1110
|
}
|
|
1111
|
-
const
|
|
1111
|
+
const dt = /\b\B/, Tn = "[a-zA-Z]\\w*", Ve = "[a-zA-Z_]\\w*", Dn = "\\b\\d+(\\.\\d+)?", Sn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Ln = "\\b(0b[01]+)", pt = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", _t = (e = {}) => {
|
|
1112
1112
|
const r = /^#![ ]*\//;
|
|
1113
1113
|
return e.binary && (e.begin = fe(
|
|
1114
1114
|
r,
|
|
@@ -1128,19 +1128,19 @@ const gt = /\b\B/, An = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", Mn = "\\b\\d+(\\.\
|
|
|
1128
1128
|
}, Me = {
|
|
1129
1129
|
begin: "\\\\[\\s\\S]",
|
|
1130
1130
|
relevance: 0
|
|
1131
|
-
},
|
|
1131
|
+
}, bt = {
|
|
1132
1132
|
scope: "string",
|
|
1133
1133
|
begin: "'",
|
|
1134
1134
|
end: "'",
|
|
1135
1135
|
illegal: "\\n",
|
|
1136
1136
|
contains: [Me]
|
|
1137
|
-
},
|
|
1137
|
+
}, mt = {
|
|
1138
1138
|
scope: "string",
|
|
1139
1139
|
begin: '"',
|
|
1140
1140
|
end: '"',
|
|
1141
1141
|
illegal: "\\n",
|
|
1142
1142
|
contains: [Me]
|
|
1143
|
-
},
|
|
1143
|
+
}, Et = {
|
|
1144
1144
|
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/
|
|
1145
1145
|
}, $e = function(e, r, l = {}) {
|
|
1146
1146
|
const f = le(
|
|
@@ -1161,7 +1161,7 @@ const gt = /\b\B/, An = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", Mn = "\\b\\d+(\\.\
|
|
|
1161
1161
|
excludeBegin: !0,
|
|
1162
1162
|
relevance: 0
|
|
1163
1163
|
});
|
|
1164
|
-
const
|
|
1164
|
+
const g = Ye(
|
|
1165
1165
|
// list of common 1 and 2 letter words in English
|
|
1166
1166
|
"I",
|
|
1167
1167
|
"a",
|
|
@@ -1201,26 +1201,26 @@ const gt = /\b\B/, An = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", Mn = "\\b\\d+(\\.\
|
|
|
1201
1201
|
/[ ]+/,
|
|
1202
1202
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
1203
1203
|
"(",
|
|
1204
|
-
|
|
1204
|
+
g,
|
|
1205
1205
|
/[.]?[:]?([.][ ]|[ ])/,
|
|
1206
1206
|
"){3}"
|
|
1207
1207
|
)
|
|
1208
1208
|
// look for 3 words in a row
|
|
1209
1209
|
}
|
|
1210
1210
|
), f;
|
|
1211
|
-
},
|
|
1211
|
+
}, vt = $e("//", "$"), yt = $e("/\\*", "\\*/"), wt = $e("#", "$"), At = {
|
|
1212
1212
|
scope: "number",
|
|
1213
|
-
begin:
|
|
1213
|
+
begin: Dn,
|
|
1214
1214
|
relevance: 0
|
|
1215
|
-
},
|
|
1215
|
+
}, Nt = {
|
|
1216
1216
|
scope: "number",
|
|
1217
|
-
begin:
|
|
1217
|
+
begin: Sn,
|
|
1218
1218
|
relevance: 0
|
|
1219
|
-
},
|
|
1219
|
+
}, Mt = {
|
|
1220
1220
|
scope: "number",
|
|
1221
|
-
begin:
|
|
1221
|
+
begin: Ln,
|
|
1222
1222
|
relevance: 0
|
|
1223
|
-
},
|
|
1223
|
+
}, Tt = {
|
|
1224
1224
|
scope: "regexp",
|
|
1225
1225
|
begin: /\/(?=[^/\n]*\/)/,
|
|
1226
1226
|
end: /\/[gimuy]*/,
|
|
@@ -1233,19 +1233,19 @@ const gt = /\b\B/, An = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", Mn = "\\b\\d+(\\.\
|
|
|
1233
1233
|
contains: [Me]
|
|
1234
1234
|
}
|
|
1235
1235
|
]
|
|
1236
|
-
},
|
|
1236
|
+
}, Dt = {
|
|
1237
1237
|
scope: "title",
|
|
1238
|
-
begin:
|
|
1238
|
+
begin: Tn,
|
|
1239
1239
|
relevance: 0
|
|
1240
|
-
},
|
|
1240
|
+
}, St = {
|
|
1241
1241
|
scope: "title",
|
|
1242
|
-
begin:
|
|
1242
|
+
begin: Ve,
|
|
1243
1243
|
relevance: 0
|
|
1244
|
-
},
|
|
1244
|
+
}, Lt = {
|
|
1245
1245
|
// excludes method names from keyword processing
|
|
1246
|
-
begin: "\\.\\s*" +
|
|
1246
|
+
begin: "\\.\\s*" + Ve,
|
|
1247
1247
|
relevance: 0
|
|
1248
|
-
},
|
|
1248
|
+
}, Rt = function(e) {
|
|
1249
1249
|
return Object.assign(
|
|
1250
1250
|
e,
|
|
1251
1251
|
{
|
|
@@ -1262,65 +1262,65 @@ const gt = /\b\B/, An = "[a-zA-Z]\\w*", Xe = "[a-zA-Z_]\\w*", Mn = "\\b\\d+(\\.\
|
|
|
1262
1262
|
};
|
|
1263
1263
|
var Re = /* @__PURE__ */ Object.freeze({
|
|
1264
1264
|
__proto__: null,
|
|
1265
|
-
APOS_STRING_MODE:
|
|
1265
|
+
APOS_STRING_MODE: bt,
|
|
1266
1266
|
BACKSLASH_ESCAPE: Me,
|
|
1267
|
-
BINARY_NUMBER_MODE:
|
|
1268
|
-
BINARY_NUMBER_RE:
|
|
1267
|
+
BINARY_NUMBER_MODE: Mt,
|
|
1268
|
+
BINARY_NUMBER_RE: Ln,
|
|
1269
1269
|
COMMENT: $e,
|
|
1270
|
-
C_BLOCK_COMMENT_MODE:
|
|
1271
|
-
C_LINE_COMMENT_MODE:
|
|
1272
|
-
C_NUMBER_MODE:
|
|
1273
|
-
C_NUMBER_RE:
|
|
1274
|
-
END_SAME_AS_BEGIN:
|
|
1275
|
-
HASH_COMMENT_MODE:
|
|
1276
|
-
IDENT_RE:
|
|
1277
|
-
MATCH_NOTHING_RE:
|
|
1278
|
-
METHOD_GUARD:
|
|
1279
|
-
NUMBER_MODE:
|
|
1280
|
-
NUMBER_RE:
|
|
1281
|
-
PHRASAL_WORDS_MODE:
|
|
1282
|
-
QUOTE_STRING_MODE:
|
|
1283
|
-
REGEXP_MODE:
|
|
1284
|
-
RE_STARTERS_RE:
|
|
1285
|
-
SHEBANG:
|
|
1286
|
-
TITLE_MODE:
|
|
1287
|
-
UNDERSCORE_IDENT_RE:
|
|
1288
|
-
UNDERSCORE_TITLE_MODE:
|
|
1270
|
+
C_BLOCK_COMMENT_MODE: yt,
|
|
1271
|
+
C_LINE_COMMENT_MODE: vt,
|
|
1272
|
+
C_NUMBER_MODE: Nt,
|
|
1273
|
+
C_NUMBER_RE: Sn,
|
|
1274
|
+
END_SAME_AS_BEGIN: Rt,
|
|
1275
|
+
HASH_COMMENT_MODE: wt,
|
|
1276
|
+
IDENT_RE: Tn,
|
|
1277
|
+
MATCH_NOTHING_RE: dt,
|
|
1278
|
+
METHOD_GUARD: Lt,
|
|
1279
|
+
NUMBER_MODE: At,
|
|
1280
|
+
NUMBER_RE: Dn,
|
|
1281
|
+
PHRASAL_WORDS_MODE: Et,
|
|
1282
|
+
QUOTE_STRING_MODE: mt,
|
|
1283
|
+
REGEXP_MODE: Tt,
|
|
1284
|
+
RE_STARTERS_RE: pt,
|
|
1285
|
+
SHEBANG: _t,
|
|
1286
|
+
TITLE_MODE: Dt,
|
|
1287
|
+
UNDERSCORE_IDENT_RE: Ve,
|
|
1288
|
+
UNDERSCORE_TITLE_MODE: St
|
|
1289
1289
|
});
|
|
1290
|
-
function
|
|
1290
|
+
function Ot(e, r) {
|
|
1291
1291
|
e.input[e.index - 1] === "." && r.ignoreMatch();
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function Ct(e, r) {
|
|
1294
1294
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
r && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
1296
|
+
function It(e, r) {
|
|
1297
|
+
r && 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));
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1300
|
-
Array.isArray(e.illegal) && (e.illegal =
|
|
1299
|
+
function kt(e, r) {
|
|
1300
|
+
Array.isArray(e.illegal) && (e.illegal = Ye(...e.illegal));
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function Bt(e, r) {
|
|
1303
1303
|
if (e.match) {
|
|
1304
1304
|
if (e.begin || e.end) throw new Error("begin & end are not supported with match");
|
|
1305
1305
|
e.begin = e.match, delete e.match;
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function $t(e, r) {
|
|
1309
1309
|
e.relevance === void 0 && (e.relevance = 1);
|
|
1310
1310
|
}
|
|
1311
|
-
const
|
|
1311
|
+
const Pt = (e, r) => {
|
|
1312
1312
|
if (!e.beforeMatch) return;
|
|
1313
1313
|
if (e.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
1314
1314
|
const l = Object.assign({}, e);
|
|
1315
1315
|
Object.keys(e).forEach((f) => {
|
|
1316
1316
|
delete e[f];
|
|
1317
|
-
}), e.keywords = l.keywords, e.begin = fe(l.beforeMatch,
|
|
1317
|
+
}), e.keywords = l.keywords, e.begin = fe(l.beforeMatch, Nn(l.begin)), e.starts = {
|
|
1318
1318
|
relevance: 0,
|
|
1319
1319
|
contains: [
|
|
1320
1320
|
Object.assign(l, { endsParent: !0 })
|
|
1321
1321
|
]
|
|
1322
1322
|
}, e.relevance = 0, delete l.beforeMatch;
|
|
1323
|
-
},
|
|
1323
|
+
}, Ut = [
|
|
1324
1324
|
"of",
|
|
1325
1325
|
"and",
|
|
1326
1326
|
"for",
|
|
@@ -1335,27 +1335,27 @@ const Bt = (e, r) => {
|
|
|
1335
1335
|
// common variable name
|
|
1336
1336
|
"value"
|
|
1337
1337
|
// common variable name
|
|
1338
|
-
],
|
|
1339
|
-
function
|
|
1338
|
+
], Ht = "keyword";
|
|
1339
|
+
function Rn(e, r, l = Ht) {
|
|
1340
1340
|
const f = /* @__PURE__ */ Object.create(null);
|
|
1341
|
-
return typeof e == "string" ?
|
|
1341
|
+
return typeof e == "string" ? g(l, e.split(" ")) : Array.isArray(e) ? g(l, e) : Object.keys(e).forEach(function(n) {
|
|
1342
1342
|
Object.assign(
|
|
1343
1343
|
f,
|
|
1344
|
-
|
|
1344
|
+
Rn(e[n], r, n)
|
|
1345
1345
|
);
|
|
1346
1346
|
}), f;
|
|
1347
|
-
function
|
|
1347
|
+
function g(n, t) {
|
|
1348
1348
|
r && (t = t.map((i) => i.toLowerCase())), t.forEach(function(i) {
|
|
1349
1349
|
const s = i.split("|");
|
|
1350
|
-
f[s[0]] = [n,
|
|
1350
|
+
f[s[0]] = [n, xt(s[0], s[1])];
|
|
1351
1351
|
});
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return r ? Number(r) :
|
|
1354
|
+
function xt(e, r) {
|
|
1355
|
+
return r ? Number(r) : Ft(e) ? 0 : 1;
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1358
|
-
return
|
|
1357
|
+
function Ft(e) {
|
|
1358
|
+
return Ut.includes(e.toLowerCase());
|
|
1359
1359
|
}
|
|
1360
1360
|
const un = {}, ue = (e) => {
|
|
1361
1361
|
console.error(e);
|
|
@@ -1364,41 +1364,41 @@ const un = {}, ue = (e) => {
|
|
|
1364
1364
|
}, he = (e, r) => {
|
|
1365
1365
|
un[`${e}/${r}`] || (console.log(`Deprecated as of ${e}. ${r}`), un[`${e}/${r}`] = !0);
|
|
1366
1366
|
}, ke = new Error();
|
|
1367
|
-
function
|
|
1367
|
+
function On(e, r, { key: l }) {
|
|
1368
1368
|
let f = 0;
|
|
1369
|
-
const
|
|
1369
|
+
const g = e[l], n = {}, t = {};
|
|
1370
1370
|
for (let i = 1; i <= r.length; i++)
|
|
1371
|
-
t[i + f] =
|
|
1371
|
+
t[i + f] = g[i], n[i + f] = !0, f += Mn(r[i - 1]);
|
|
1372
1372
|
e[l] = t, e[l]._emit = n, e[l]._multi = !0;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function zt(e) {
|
|
1375
1375
|
if (Array.isArray(e.begin)) {
|
|
1376
1376
|
if (e.skip || e.excludeBegin || e.returnBegin)
|
|
1377
1377
|
throw ue("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), ke;
|
|
1378
1378
|
if (typeof e.beginScope != "object" || e.beginScope === null)
|
|
1379
1379
|
throw ue("beginScope must be object"), ke;
|
|
1380
|
-
|
|
1380
|
+
On(e, e.begin, { key: "beginScope" }), e.begin = Xe(e.begin, { joinWith: "" });
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Gt(e) {
|
|
1384
1384
|
if (Array.isArray(e.end)) {
|
|
1385
1385
|
if (e.skip || e.excludeEnd || e.returnEnd)
|
|
1386
1386
|
throw ue("skip, excludeEnd, returnEnd not compatible with endScope: {}"), ke;
|
|
1387
1387
|
if (typeof e.endScope != "object" || e.endScope === null)
|
|
1388
1388
|
throw ue("endScope must be object"), ke;
|
|
1389
|
-
|
|
1389
|
+
On(e, e.end, { key: "endScope" }), e.end = Xe(e.end, { joinWith: "" });
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function Kt(e) {
|
|
1393
1393
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1395
|
+
function Wt(e) {
|
|
1396
|
+
Kt(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), zt(e), Gt(e);
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function Qt(e) {
|
|
1399
1399
|
function r(t, i) {
|
|
1400
1400
|
return new RegExp(
|
|
1401
|
-
|
|
1401
|
+
Ne(t),
|
|
1402
1402
|
"m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
1403
1403
|
);
|
|
1404
1404
|
}
|
|
@@ -1408,12 +1408,12 @@ function Kt(e) {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
// @ts-ignore
|
|
1410
1410
|
addRule(i, s) {
|
|
1411
|
-
s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt +=
|
|
1411
|
+
s.position = this.position++, this.matchIndexes[this.matchAt] = s, this.regexes.push([s, i]), this.matchAt += Mn(i) + 1;
|
|
1412
1412
|
}
|
|
1413
1413
|
compile() {
|
|
1414
1414
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1415
1415
|
const i = this.regexes.map((s) => s[1]);
|
|
1416
|
-
this.matcherRe = r(
|
|
1416
|
+
this.matcherRe = r(Xe(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1417
1417
|
}
|
|
1418
1418
|
/** @param {string} s */
|
|
1419
1419
|
exec(i) {
|
|
@@ -1457,7 +1457,7 @@ function Kt(e) {
|
|
|
1457
1457
|
return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function g(t) {
|
|
1461
1461
|
const i = new f();
|
|
1462
1462
|
return t.contains.forEach((s) => i.addRule(s.begin, { rule: s, type: "begin" })), t.terminatorEnd && i.addRule(t.terminatorEnd, { type: "end" }), t.illegal && i.addRule(t.illegal, { type: "illegal" }), i;
|
|
1463
1463
|
}
|
|
@@ -1468,33 +1468,33 @@ function Kt(e) {
|
|
|
1468
1468
|
);
|
|
1469
1469
|
if (t.isCompiled) return s;
|
|
1470
1470
|
[
|
|
1471
|
-
|
|
1471
|
+
Ct,
|
|
1472
1472
|
// do this early so compiler extensions generally don't have to worry about
|
|
1473
1473
|
// the distinction between match/begin
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1474
|
+
Bt,
|
|
1475
|
+
Wt,
|
|
1476
|
+
Pt
|
|
1477
1477
|
].forEach((a) => a(t, i)), e.compilerExtensions.forEach((a) => a(t, i)), t.__beforeBegin = null, [
|
|
1478
|
-
|
|
1478
|
+
It,
|
|
1479
1479
|
// do this later so compiler extensions that come earlier have access to the
|
|
1480
1480
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1481
|
-
|
|
1481
|
+
kt,
|
|
1482
1482
|
// default to 1 relevance if not specified
|
|
1483
|
-
|
|
1483
|
+
$t
|
|
1484
1484
|
].forEach((a) => a(t, i)), t.isCompiled = !0;
|
|
1485
1485
|
let o = null;
|
|
1486
|
-
return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), o = t.keywords.$pattern, delete t.keywords.$pattern), o = o || /\w+/, t.keywords && (t.keywords =
|
|
1486
|
+
return typeof t.keywords == "object" && t.keywords.$pattern && (t.keywords = Object.assign({}, t.keywords), o = t.keywords.$pattern, delete t.keywords.$pattern), o = o || /\w+/, t.keywords && (t.keywords = Rn(t.keywords, e.case_insensitive)), s.keywordPatternRe = r(o, !0), i && (t.begin || (t.begin = /\B|\b/), s.beginRe = r(s.begin), !t.end && !t.endsWithParent && (t.end = /\B|\b/), t.end && (s.endRe = r(s.end)), s.terminatorEnd = Ne(s.end) || "", t.endsWithParent && i.terminatorEnd && (s.terminatorEnd += (t.end ? "|" : "") + i.terminatorEnd)), t.illegal && (s.illegalRe = r(
|
|
1487
1487
|
/** @type {RegExp | string} */
|
|
1488
1488
|
t.illegal
|
|
1489
1489
|
)), t.contains || (t.contains = []), t.contains = [].concat(...t.contains.map(function(a) {
|
|
1490
|
-
return
|
|
1490
|
+
return Zt(a === "self" ? t : a);
|
|
1491
1491
|
})), t.contains.forEach(function(a) {
|
|
1492
1492
|
n(
|
|
1493
1493
|
/** @type Mode */
|
|
1494
1494
|
a,
|
|
1495
1495
|
s
|
|
1496
1496
|
);
|
|
1497
|
-
}), t.starts && n(t.starts, i), s.matcher =
|
|
1497
|
+
}), t.starts && n(t.starts, i), s.matcher = g(s), s;
|
|
1498
1498
|
}
|
|
1499
1499
|
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
|
|
1500
1500
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -1503,23 +1503,23 @@ function Kt(e) {
|
|
|
1503
1503
|
e
|
|
1504
1504
|
);
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return e ? e.endsWithParent ||
|
|
1506
|
+
function Cn(e) {
|
|
1507
|
+
return e ? e.endsWithParent || Cn(e.starts) : !1;
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function Zt(e) {
|
|
1510
1510
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(r) {
|
|
1511
1511
|
return le(e, { variants: null }, r);
|
|
1512
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
1512
|
+
})), e.cachedVariants ? e.cachedVariants : Cn(e) ? le(e, { starts: e.starts ? le(e.starts) : null }) : Object.isFrozen(e) ? le(e) : e;
|
|
1513
1513
|
}
|
|
1514
|
-
var
|
|
1515
|
-
class
|
|
1514
|
+
var Yt = "11.10.0";
|
|
1515
|
+
class Xt extends Error {
|
|
1516
1516
|
constructor(r, l) {
|
|
1517
1517
|
super(r), this.name = "HTMLInjectionError", this.html = l;
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
const
|
|
1520
|
+
const ze = An, gn = le, hn = Symbol("nomatch"), Vt = 7, In = function(e) {
|
|
1521
1521
|
const r = /* @__PURE__ */ Object.create(null), l = /* @__PURE__ */ Object.create(null), f = [];
|
|
1522
|
-
let
|
|
1522
|
+
let g = !0;
|
|
1523
1523
|
const n = "Could not find the language '{}', did you forget to load/include a language module?", t = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1524
1524
|
let i = {
|
|
1525
1525
|
ignoreUnescapedHTML: !1,
|
|
@@ -1531,25 +1531,25 @@ const Fe = wn, gn = le, hn = Symbol("nomatch"), Yt = 7, On = function(e) {
|
|
|
1531
1531
|
languages: null,
|
|
1532
1532
|
// beta configuration options, subject to change, welcome to discuss
|
|
1533
1533
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1534
|
-
__emitter:
|
|
1534
|
+
__emitter: lt
|
|
1535
1535
|
};
|
|
1536
|
-
function s(
|
|
1537
|
-
return i.noHighlightRe.test(
|
|
1536
|
+
function s(m) {
|
|
1537
|
+
return i.noHighlightRe.test(m);
|
|
1538
1538
|
}
|
|
1539
|
-
function o(
|
|
1540
|
-
let N =
|
|
1541
|
-
N +=
|
|
1539
|
+
function o(m) {
|
|
1540
|
+
let N = m.className + " ";
|
|
1541
|
+
N += m.parentNode ? m.parentNode.className : "";
|
|
1542
1542
|
const C = i.languageDetectRe.exec(N);
|
|
1543
1543
|
if (C) {
|
|
1544
1544
|
const U = L(C[1]);
|
|
1545
|
-
return U || (fn(n.replace("{}", C[1])), fn("Falling back to no-highlight mode for this block.",
|
|
1545
|
+
return U || (fn(n.replace("{}", C[1])), fn("Falling back to no-highlight mode for this block.", m)), U ? C[1] : "no-highlight";
|
|
1546
1546
|
}
|
|
1547
1547
|
return N.split(/\s+/).find((U) => s(U) || L(U));
|
|
1548
1548
|
}
|
|
1549
|
-
function a(
|
|
1549
|
+
function a(m, N, C) {
|
|
1550
1550
|
let U = "", G = "";
|
|
1551
|
-
typeof N == "object" ? (U =
|
|
1552
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), G =
|
|
1551
|
+
typeof N == "object" ? (U = m, C = N.ignoreIllegals, G = N.language) : (he("10.7.0", "highlight(lang, code, ...args) has been deprecated."), he("10.7.0", `Please use highlight(code, options) instead.
|
|
1552
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), G = m, U = N), C === void 0 && (C = !0);
|
|
1553
1553
|
const X = {
|
|
1554
1554
|
code: U,
|
|
1555
1555
|
language: G
|
|
@@ -1558,133 +1558,133 @@ https://github.com/highlightjs/highlight.js/issues/2277`), G = b, U = N), C ===
|
|
|
1558
1558
|
const J = X.result ? X.result : c(X.language, X.code, C);
|
|
1559
1559
|
return J.code = X.code, oe("after:highlight", J), J;
|
|
1560
1560
|
}
|
|
1561
|
-
function c(
|
|
1561
|
+
function c(m, N, C, U) {
|
|
1562
1562
|
const G = /* @__PURE__ */ Object.create(null);
|
|
1563
|
-
function X(
|
|
1564
|
-
return
|
|
1563
|
+
function X(w, S) {
|
|
1564
|
+
return w.keywords[S];
|
|
1565
1565
|
}
|
|
1566
1566
|
function J() {
|
|
1567
1567
|
if (!I.keywords) {
|
|
1568
1568
|
Q.addText(F);
|
|
1569
1569
|
return;
|
|
1570
1570
|
}
|
|
1571
|
-
let
|
|
1571
|
+
let w = 0;
|
|
1572
1572
|
I.keywordPatternRe.lastIndex = 0;
|
|
1573
1573
|
let S = I.keywordPatternRe.exec(F), k = "";
|
|
1574
1574
|
for (; S; ) {
|
|
1575
|
-
k += F.substring(
|
|
1575
|
+
k += F.substring(w, S.index);
|
|
1576
1576
|
const H = te.case_insensitive ? S[0].toLowerCase() : S[0], Z = X(I, H);
|
|
1577
1577
|
if (Z) {
|
|
1578
|
-
const [re,
|
|
1579
|
-
if (Q.addText(k), k = "", G[H] = (G[H] || 0) + 1, G[H] <=
|
|
1578
|
+
const [re, Qn] = Z;
|
|
1579
|
+
if (Q.addText(k), k = "", G[H] = (G[H] || 0) + 1, G[H] <= Vt && (Se += Qn), re.startsWith("_"))
|
|
1580
1580
|
k += S[0];
|
|
1581
1581
|
else {
|
|
1582
|
-
const
|
|
1583
|
-
ne(S[0],
|
|
1582
|
+
const Zn = te.classNameAliases[re] || re;
|
|
1583
|
+
ne(S[0], Zn);
|
|
1584
1584
|
}
|
|
1585
1585
|
} else
|
|
1586
1586
|
k += S[0];
|
|
1587
|
-
|
|
1587
|
+
w = I.keywordPatternRe.lastIndex, S = I.keywordPatternRe.exec(F);
|
|
1588
1588
|
}
|
|
1589
|
-
k += F.substring(
|
|
1589
|
+
k += F.substring(w), Q.addText(k);
|
|
1590
1590
|
}
|
|
1591
1591
|
function Te() {
|
|
1592
1592
|
if (F === "") return;
|
|
1593
|
-
let
|
|
1593
|
+
let w = null;
|
|
1594
1594
|
if (typeof I.subLanguage == "string") {
|
|
1595
1595
|
if (!r[I.subLanguage]) {
|
|
1596
1596
|
Q.addText(F);
|
|
1597
1597
|
return;
|
|
1598
1598
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1599
|
+
w = c(I.subLanguage, F, !0, tn[I.subLanguage]), tn[I.subLanguage] = /** @type {CompiledMode} */
|
|
1600
|
+
w._top;
|
|
1601
1601
|
} else
|
|
1602
|
-
|
|
1603
|
-
I.relevance > 0 && (Se +=
|
|
1602
|
+
w = h(F, I.subLanguage.length ? I.subLanguage : null);
|
|
1603
|
+
I.relevance > 0 && (Se += w.relevance), Q.__addSublanguage(w._emitter, w.language);
|
|
1604
1604
|
}
|
|
1605
1605
|
function V() {
|
|
1606
1606
|
I.subLanguage != null ? Te() : J(), F = "";
|
|
1607
1607
|
}
|
|
1608
|
-
function ne(
|
|
1609
|
-
|
|
1608
|
+
function ne(w, S) {
|
|
1609
|
+
w !== "" && (Q.startScope(S), Q.addText(w), Q.endScope());
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1611
|
+
function qe(w, S) {
|
|
1612
1612
|
let k = 1;
|
|
1613
1613
|
const H = S.length - 1;
|
|
1614
1614
|
for (; k <= H; ) {
|
|
1615
|
-
if (!
|
|
1615
|
+
if (!w._emit[k]) {
|
|
1616
1616
|
k++;
|
|
1617
1617
|
continue;
|
|
1618
1618
|
}
|
|
1619
|
-
const Z = te.classNameAliases[
|
|
1619
|
+
const Z = te.classNameAliases[w[k]] || w[k], re = S[k];
|
|
1620
1620
|
Z ? ne(re, Z) : (F = re, J(), F = ""), k++;
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1624
|
-
return
|
|
1623
|
+
function Je(w, S) {
|
|
1624
|
+
return w.scope && typeof w.scope == "string" && Q.openNode(te.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (ne(F, te.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), F = "") : w.beginScope._multi && (qe(w.beginScope, S), F = "")), I = Object.create(w, { parent: { value: I } }), I;
|
|
1625
1625
|
}
|
|
1626
|
-
function
|
|
1627
|
-
let H =
|
|
1626
|
+
function en(w, S, k) {
|
|
1627
|
+
let H = gt(w.endRe, k);
|
|
1628
1628
|
if (H) {
|
|
1629
|
-
if (
|
|
1630
|
-
const Z = new on(
|
|
1631
|
-
|
|
1629
|
+
if (w["on:end"]) {
|
|
1630
|
+
const Z = new on(w);
|
|
1631
|
+
w["on:end"](S, Z), Z.isMatchIgnored && (H = !1);
|
|
1632
1632
|
}
|
|
1633
1633
|
if (H) {
|
|
1634
|
-
for (;
|
|
1635
|
-
|
|
1636
|
-
return
|
|
1634
|
+
for (; w.endsParent && w.parent; )
|
|
1635
|
+
w = w.parent;
|
|
1636
|
+
return w;
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
|
-
if (
|
|
1640
|
-
return
|
|
1639
|
+
if (w.endsWithParent)
|
|
1640
|
+
return en(w.parent, S, k);
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1643
|
-
return I.matcher.regexIndex === 0 ? (F +=
|
|
1642
|
+
function Fn(w) {
|
|
1643
|
+
return I.matcher.regexIndex === 0 ? (F += w[0], 1) : (He = !0, 0);
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const S =
|
|
1645
|
+
function zn(w) {
|
|
1646
|
+
const S = w[0], k = w.rule, H = new on(k), Z = [k.__beforeBegin, k["on:begin"]];
|
|
1647
1647
|
for (const re of Z)
|
|
1648
|
-
if (re && (re(
|
|
1649
|
-
return
|
|
1650
|
-
return k.skip ? F += S : (k.excludeBegin && (F += S), V(), !k.returnBegin && !k.excludeBegin && (F = S)),
|
|
1648
|
+
if (re && (re(w, H), H.isMatchIgnored))
|
|
1649
|
+
return Fn(S);
|
|
1650
|
+
return k.skip ? F += S : (k.excludeBegin && (F += S), V(), !k.returnBegin && !k.excludeBegin && (F = S)), Je(k, w), k.returnBegin ? 0 : S.length;
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
const S =
|
|
1652
|
+
function Gn(w) {
|
|
1653
|
+
const S = w[0], k = N.substring(w.index), H = en(I, w, k);
|
|
1654
1654
|
if (!H)
|
|
1655
1655
|
return hn;
|
|
1656
1656
|
const Z = I;
|
|
1657
|
-
I.endScope && I.endScope._wrap ? (V(), ne(S, I.endScope._wrap)) : I.endScope && I.endScope._multi ? (V(),
|
|
1657
|
+
I.endScope && I.endScope._wrap ? (V(), ne(S, I.endScope._wrap)) : I.endScope && I.endScope._multi ? (V(), qe(I.endScope, w)) : Z.skip ? F += S : (Z.returnEnd || Z.excludeEnd || (F += S), V(), Z.excludeEnd && (F = S));
|
|
1658
1658
|
do
|
|
1659
1659
|
I.scope && Q.closeNode(), !I.skip && !I.subLanguage && (Se += I.relevance), I = I.parent;
|
|
1660
1660
|
while (I !== H.parent);
|
|
1661
|
-
return H.starts &&
|
|
1661
|
+
return H.starts && Je(H.starts, w), Z.returnEnd ? 0 : S.length;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
const
|
|
1663
|
+
function Kn() {
|
|
1664
|
+
const w = [];
|
|
1665
1665
|
for (let S = I; S !== te; S = S.parent)
|
|
1666
|
-
S.scope &&
|
|
1667
|
-
|
|
1666
|
+
S.scope && w.unshift(S.scope);
|
|
1667
|
+
w.forEach((S) => Q.openNode(S));
|
|
1668
1668
|
}
|
|
1669
1669
|
let De = {};
|
|
1670
|
-
function
|
|
1670
|
+
function nn(w, S) {
|
|
1671
1671
|
const k = S && S[0];
|
|
1672
|
-
if (F +=
|
|
1672
|
+
if (F += w, k == null)
|
|
1673
1673
|
return V(), 0;
|
|
1674
1674
|
if (De.type === "begin" && S.type === "end" && De.index === S.index && k === "") {
|
|
1675
|
-
if (F += N.slice(S.index, S.index + 1), !
|
|
1676
|
-
const H = new Error(`0 width match regex (${
|
|
1677
|
-
throw H.languageName =
|
|
1675
|
+
if (F += N.slice(S.index, S.index + 1), !g) {
|
|
1676
|
+
const H = new Error(`0 width match regex (${m})`);
|
|
1677
|
+
throw H.languageName = m, H.badRule = De.rule, H;
|
|
1678
1678
|
}
|
|
1679
1679
|
return 1;
|
|
1680
1680
|
}
|
|
1681
1681
|
if (De = S, S.type === "begin")
|
|
1682
|
-
return
|
|
1682
|
+
return zn(S);
|
|
1683
1683
|
if (S.type === "illegal" && !C) {
|
|
1684
1684
|
const H = new Error('Illegal lexeme "' + k + '" for mode "' + (I.scope || "<unnamed>") + '"');
|
|
1685
1685
|
throw H.mode = I, H;
|
|
1686
1686
|
} else if (S.type === "end") {
|
|
1687
|
-
const H =
|
|
1687
|
+
const H = Gn(S);
|
|
1688
1688
|
if (H !== hn)
|
|
1689
1689
|
return H;
|
|
1690
1690
|
}
|
|
@@ -1694,13 +1694,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), G = b, U = N), C ===
|
|
|
1694
1694
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1695
1695
|
return F += k, k.length;
|
|
1696
1696
|
}
|
|
1697
|
-
const te = L(
|
|
1697
|
+
const te = L(m);
|
|
1698
1698
|
if (!te)
|
|
1699
|
-
throw ue(n.replace("{}",
|
|
1700
|
-
const
|
|
1701
|
-
let Pe = "", I = U ||
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1699
|
+
throw ue(n.replace("{}", m)), new Error('Unknown language: "' + m + '"');
|
|
1700
|
+
const Wn = Qt(te);
|
|
1701
|
+
let Pe = "", I = U || Wn;
|
|
1702
|
+
const tn = {}, Q = new i.__emitter(i);
|
|
1703
|
+
Kn();
|
|
1704
1704
|
let F = "", Se = 0, ce = 0, Ue = 0, He = !1;
|
|
1705
1705
|
try {
|
|
1706
1706
|
if (te.__emitTokens)
|
|
@@ -1708,64 +1708,64 @@ https://github.com/highlightjs/highlight.js/issues/2277`), G = b, U = N), C ===
|
|
|
1708
1708
|
else {
|
|
1709
1709
|
for (I.matcher.considerAll(); ; ) {
|
|
1710
1710
|
Ue++, He ? He = !1 : I.matcher.considerAll(), I.matcher.lastIndex = ce;
|
|
1711
|
-
const
|
|
1712
|
-
if (!
|
|
1713
|
-
const S = N.substring(ce,
|
|
1714
|
-
ce =
|
|
1711
|
+
const w = I.matcher.exec(N);
|
|
1712
|
+
if (!w) break;
|
|
1713
|
+
const S = N.substring(ce, w.index), k = nn(S, w);
|
|
1714
|
+
ce = w.index + k;
|
|
1715
1715
|
}
|
|
1716
|
-
|
|
1716
|
+
nn(N.substring(ce));
|
|
1717
1717
|
}
|
|
1718
1718
|
return Q.finalize(), Pe = Q.toHTML(), {
|
|
1719
|
-
language:
|
|
1719
|
+
language: m,
|
|
1720
1720
|
value: Pe,
|
|
1721
1721
|
relevance: Se,
|
|
1722
1722
|
illegal: !1,
|
|
1723
1723
|
_emitter: Q,
|
|
1724
1724
|
_top: I
|
|
1725
1725
|
};
|
|
1726
|
-
} catch (
|
|
1727
|
-
if (
|
|
1726
|
+
} catch (w) {
|
|
1727
|
+
if (w.message && w.message.includes("Illegal"))
|
|
1728
1728
|
return {
|
|
1729
|
-
language:
|
|
1730
|
-
value:
|
|
1729
|
+
language: m,
|
|
1730
|
+
value: ze(N),
|
|
1731
1731
|
illegal: !0,
|
|
1732
1732
|
relevance: 0,
|
|
1733
1733
|
_illegalBy: {
|
|
1734
|
-
message:
|
|
1734
|
+
message: w.message,
|
|
1735
1735
|
index: ce,
|
|
1736
1736
|
context: N.slice(ce - 100, ce + 100),
|
|
1737
|
-
mode:
|
|
1737
|
+
mode: w.mode,
|
|
1738
1738
|
resultSoFar: Pe
|
|
1739
1739
|
},
|
|
1740
1740
|
_emitter: Q
|
|
1741
1741
|
};
|
|
1742
|
-
if (
|
|
1742
|
+
if (g)
|
|
1743
1743
|
return {
|
|
1744
|
-
language:
|
|
1745
|
-
value:
|
|
1744
|
+
language: m,
|
|
1745
|
+
value: ze(N),
|
|
1746
1746
|
illegal: !1,
|
|
1747
1747
|
relevance: 0,
|
|
1748
|
-
errorRaised:
|
|
1748
|
+
errorRaised: w,
|
|
1749
1749
|
_emitter: Q,
|
|
1750
1750
|
_top: I
|
|
1751
1751
|
};
|
|
1752
|
-
throw
|
|
1752
|
+
throw w;
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
function u(
|
|
1755
|
+
function u(m) {
|
|
1756
1756
|
const N = {
|
|
1757
|
-
value:
|
|
1757
|
+
value: ze(m),
|
|
1758
1758
|
illegal: !1,
|
|
1759
1759
|
relevance: 0,
|
|
1760
1760
|
_top: t,
|
|
1761
1761
|
_emitter: new i.__emitter(i)
|
|
1762
1762
|
};
|
|
1763
|
-
return N._emitter.addText(
|
|
1763
|
+
return N._emitter.addText(m), N;
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function h(m, N) {
|
|
1766
1766
|
N = N || i.languages || Object.keys(r);
|
|
1767
|
-
const C = u(
|
|
1768
|
-
(V) => c(V,
|
|
1767
|
+
const C = u(m), U = N.filter(L).filter(P).map(
|
|
1768
|
+
(V) => c(V, m, !1)
|
|
1769
1769
|
);
|
|
1770
1770
|
U.unshift(C);
|
|
1771
1771
|
const G = U.sort((V, ne) => {
|
|
@@ -1780,128 +1780,128 @@ https://github.com/highlightjs/highlight.js/issues/2277`), G = b, U = N), C ===
|
|
|
1780
1780
|
}), [X, J] = G, Te = X;
|
|
1781
1781
|
return Te.secondBest = J, Te;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function p(m, N, C) {
|
|
1784
1784
|
const U = N && l[N] || C;
|
|
1785
|
-
|
|
1785
|
+
m.classList.add("hljs"), m.classList.add(`language-${U}`);
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function d(m) {
|
|
1788
1788
|
let N = null;
|
|
1789
|
-
const C = o(
|
|
1789
|
+
const C = o(m);
|
|
1790
1790
|
if (s(C)) return;
|
|
1791
1791
|
if (oe(
|
|
1792
1792
|
"before:highlightElement",
|
|
1793
|
-
{ el:
|
|
1794
|
-
),
|
|
1795
|
-
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",
|
|
1793
|
+
{ el: m, language: C }
|
|
1794
|
+
), m.dataset.highlighted) {
|
|
1795
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", m);
|
|
1796
1796
|
return;
|
|
1797
1797
|
}
|
|
1798
|
-
if (
|
|
1799
|
-
throw new
|
|
1798
|
+
if (m.children.length > 0 && (i.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(m)), i.throwUnescapedHTML))
|
|
1799
|
+
throw new Xt(
|
|
1800
1800
|
"One of your code blocks includes unescaped HTML.",
|
|
1801
|
-
|
|
1801
|
+
m.innerHTML
|
|
1802
1802
|
);
|
|
1803
|
-
N =
|
|
1804
|
-
const U = N.textContent, G = C ? a(U, { language: C, ignoreIllegals: !0 }) :
|
|
1805
|
-
|
|
1803
|
+
N = m;
|
|
1804
|
+
const U = N.textContent, G = C ? a(U, { language: C, ignoreIllegals: !0 }) : h(U);
|
|
1805
|
+
m.innerHTML = G.value, m.dataset.highlighted = "yes", p(m, C, G.language), m.result = {
|
|
1806
1806
|
language: G.language,
|
|
1807
1807
|
// TODO: remove with version 11.0
|
|
1808
1808
|
re: G.relevance,
|
|
1809
1809
|
relevance: G.relevance
|
|
1810
|
-
}, G.secondBest && (
|
|
1810
|
+
}, G.secondBest && (m.secondBest = {
|
|
1811
1811
|
language: G.secondBest.language,
|
|
1812
1812
|
relevance: G.secondBest.relevance
|
|
1813
|
-
}), oe("after:highlightElement", { el:
|
|
1813
|
+
}), oe("after:highlightElement", { el: m, result: G, text: U });
|
|
1814
1814
|
}
|
|
1815
|
-
function _(
|
|
1816
|
-
i = gn(i,
|
|
1815
|
+
function _(m) {
|
|
1816
|
+
i = gn(i, m);
|
|
1817
1817
|
}
|
|
1818
|
-
const
|
|
1819
|
-
|
|
1818
|
+
const b = () => {
|
|
1819
|
+
y(), he("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1820
1820
|
};
|
|
1821
1821
|
function E() {
|
|
1822
|
-
|
|
1822
|
+
y(), he("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1823
1823
|
}
|
|
1824
1824
|
let v = !1;
|
|
1825
|
-
function
|
|
1825
|
+
function y() {
|
|
1826
1826
|
if (document.readyState === "loading") {
|
|
1827
1827
|
v = !0;
|
|
1828
1828
|
return;
|
|
1829
1829
|
}
|
|
1830
|
-
document.querySelectorAll(i.cssSelector).forEach(
|
|
1830
|
+
document.querySelectorAll(i.cssSelector).forEach(d);
|
|
1831
1831
|
}
|
|
1832
1832
|
function D() {
|
|
1833
|
-
v &&
|
|
1833
|
+
v && y();
|
|
1834
1834
|
}
|
|
1835
1835
|
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", D, !1);
|
|
1836
|
-
function T(
|
|
1836
|
+
function T(m, N) {
|
|
1837
1837
|
let C = null;
|
|
1838
1838
|
try {
|
|
1839
1839
|
C = N(e);
|
|
1840
1840
|
} catch (U) {
|
|
1841
|
-
if (ue("Language definition for '{}' could not be registered.".replace("{}",
|
|
1841
|
+
if (ue("Language definition for '{}' could not be registered.".replace("{}", m)), g)
|
|
1842
1842
|
ue(U);
|
|
1843
1843
|
else
|
|
1844
1844
|
throw U;
|
|
1845
1845
|
C = t;
|
|
1846
1846
|
}
|
|
1847
|
-
C.name || (C.name =
|
|
1847
|
+
C.name || (C.name = m), r[m] = C, C.rawDefinition = N.bind(null, e), C.aliases && O(C.aliases, { languageName: m });
|
|
1848
1848
|
}
|
|
1849
|
-
function M(
|
|
1850
|
-
delete r[
|
|
1849
|
+
function M(m) {
|
|
1850
|
+
delete r[m];
|
|
1851
1851
|
for (const N of Object.keys(l))
|
|
1852
|
-
l[N] ===
|
|
1852
|
+
l[N] === m && delete l[N];
|
|
1853
1853
|
}
|
|
1854
1854
|
function R() {
|
|
1855
1855
|
return Object.keys(r);
|
|
1856
1856
|
}
|
|
1857
|
-
function L(
|
|
1858
|
-
return
|
|
1857
|
+
function L(m) {
|
|
1858
|
+
return m = (m || "").toLowerCase(), r[m] || r[l[m]];
|
|
1859
1859
|
}
|
|
1860
|
-
function O(
|
|
1861
|
-
typeof
|
|
1860
|
+
function O(m, { languageName: N }) {
|
|
1861
|
+
typeof m == "string" && (m = [m]), m.forEach((C) => {
|
|
1862
1862
|
l[C.toLowerCase()] = N;
|
|
1863
1863
|
});
|
|
1864
1864
|
}
|
|
1865
|
-
function P(
|
|
1866
|
-
const N = L(
|
|
1865
|
+
function P(m) {
|
|
1866
|
+
const N = L(m);
|
|
1867
1867
|
return N && !N.disableAutodetect;
|
|
1868
1868
|
}
|
|
1869
|
-
function $(
|
|
1870
|
-
|
|
1871
|
-
|
|
1869
|
+
function $(m) {
|
|
1870
|
+
m["before:highlightBlock"] && !m["before:highlightElement"] && (m["before:highlightElement"] = (N) => {
|
|
1871
|
+
m["before:highlightBlock"](
|
|
1872
1872
|
Object.assign({ block: N.el }, N)
|
|
1873
1873
|
);
|
|
1874
|
-
}),
|
|
1875
|
-
|
|
1874
|
+
}), m["after:highlightBlock"] && !m["after:highlightElement"] && (m["after:highlightElement"] = (N) => {
|
|
1875
|
+
m["after:highlightBlock"](
|
|
1876
1876
|
Object.assign({ block: N.el }, N)
|
|
1877
1877
|
);
|
|
1878
1878
|
});
|
|
1879
1879
|
}
|
|
1880
|
-
function K(
|
|
1881
|
-
$(
|
|
1880
|
+
function K(m) {
|
|
1881
|
+
$(m), f.push(m);
|
|
1882
1882
|
}
|
|
1883
|
-
function Y(
|
|
1884
|
-
const N = f.indexOf(
|
|
1883
|
+
function Y(m) {
|
|
1884
|
+
const N = f.indexOf(m);
|
|
1885
1885
|
N !== -1 && f.splice(N, 1);
|
|
1886
1886
|
}
|
|
1887
|
-
function oe(
|
|
1888
|
-
const C =
|
|
1887
|
+
function oe(m, N) {
|
|
1888
|
+
const C = m;
|
|
1889
1889
|
f.forEach(function(U) {
|
|
1890
1890
|
U[C] && U[C](N);
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
1893
|
-
function ge(
|
|
1894
|
-
return he("10.7.0", "highlightBlock will be removed entirely in v12.0"), he("10.7.0", "Please use highlightElement now."),
|
|
1893
|
+
function ge(m) {
|
|
1894
|
+
return he("10.7.0", "highlightBlock will be removed entirely in v12.0"), he("10.7.0", "Please use highlightElement now."), d(m);
|
|
1895
1895
|
}
|
|
1896
1896
|
Object.assign(e, {
|
|
1897
1897
|
highlight: a,
|
|
1898
|
-
highlightAuto:
|
|
1899
|
-
highlightAll:
|
|
1900
|
-
highlightElement:
|
|
1898
|
+
highlightAuto: h,
|
|
1899
|
+
highlightAll: y,
|
|
1900
|
+
highlightElement: d,
|
|
1901
1901
|
// TODO: Remove with v12 API
|
|
1902
1902
|
highlightBlock: ge,
|
|
1903
1903
|
configure: _,
|
|
1904
|
-
initHighlighting:
|
|
1904
|
+
initHighlighting: b,
|
|
1905
1905
|
initHighlightingOnLoad: E,
|
|
1906
1906
|
registerLanguage: T,
|
|
1907
1907
|
unregisterLanguage: M,
|
|
@@ -1913,27 +1913,27 @@ https://github.com/highlightjs/highlight.js/issues/2277`), G = b, U = N), C ===
|
|
|
1913
1913
|
addPlugin: K,
|
|
1914
1914
|
removePlugin: Y
|
|
1915
1915
|
}), e.debugMode = function() {
|
|
1916
|
-
|
|
1916
|
+
g = !1;
|
|
1917
1917
|
}, e.safeMode = function() {
|
|
1918
|
-
|
|
1919
|
-
}, e.versionString =
|
|
1918
|
+
g = !0;
|
|
1919
|
+
}, e.versionString = Yt, e.regex = {
|
|
1920
1920
|
concat: fe,
|
|
1921
|
-
lookahead:
|
|
1922
|
-
either:
|
|
1923
|
-
optional:
|
|
1924
|
-
anyNumberOfTimes:
|
|
1921
|
+
lookahead: Nn,
|
|
1922
|
+
either: Ye,
|
|
1923
|
+
optional: ut,
|
|
1924
|
+
anyNumberOfTimes: ct
|
|
1925
1925
|
};
|
|
1926
|
-
for (const
|
|
1927
|
-
typeof Re[
|
|
1926
|
+
for (const m in Re)
|
|
1927
|
+
typeof Re[m] == "object" && wn(Re[m]);
|
|
1928
1928
|
return Object.assign(e, Re), e;
|
|
1929
|
-
}, _e =
|
|
1930
|
-
_e.newInstance = () =>
|
|
1931
|
-
var
|
|
1929
|
+
}, _e = In({});
|
|
1930
|
+
_e.newInstance = () => In({});
|
|
1931
|
+
var jt = _e;
|
|
1932
1932
|
_e.HighlightJS = _e;
|
|
1933
1933
|
_e.default = _e;
|
|
1934
|
-
const q = /* @__PURE__ */
|
|
1935
|
-
function
|
|
1936
|
-
const r = e.regex, l = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), f = /[\p{L}0-9._:-]+/u,
|
|
1934
|
+
const q = /* @__PURE__ */ it(jt);
|
|
1935
|
+
function qt(e) {
|
|
1936
|
+
const r = e.regex, l = r.concat(/[\p{L}_]/u, r.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), f = /[\p{L}0-9._:-]+/u, g = {
|
|
1937
1937
|
className: "symbol",
|
|
1938
1938
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1939
1939
|
}, n = {
|
|
@@ -1969,12 +1969,12 @@ function Vt(e) {
|
|
|
1969
1969
|
{
|
|
1970
1970
|
begin: /"/,
|
|
1971
1971
|
end: /"/,
|
|
1972
|
-
contains: [
|
|
1972
|
+
contains: [g]
|
|
1973
1973
|
},
|
|
1974
1974
|
{
|
|
1975
1975
|
begin: /'/,
|
|
1976
1976
|
end: /'/,
|
|
1977
|
-
contains: [
|
|
1977
|
+
contains: [g]
|
|
1978
1978
|
},
|
|
1979
1979
|
{ begin: /[^\s"'=<>`]+/ }
|
|
1980
1980
|
]
|
|
@@ -2039,7 +2039,7 @@ function Vt(e) {
|
|
|
2039
2039
|
end: /\]\]>/,
|
|
2040
2040
|
relevance: 10
|
|
2041
2041
|
},
|
|
2042
|
-
|
|
2042
|
+
g,
|
|
2043
2043
|
// xml processing instructions
|
|
2044
2044
|
{
|
|
2045
2045
|
className: "meta",
|
|
@@ -2148,7 +2148,7 @@ function Vt(e) {
|
|
|
2148
2148
|
]
|
|
2149
2149
|
};
|
|
2150
2150
|
}
|
|
2151
|
-
const dn = "[A-Za-z$_][0-9A-Za-z$_]*",
|
|
2151
|
+
const dn = "[A-Za-z$_][0-9A-Za-z$_]*", Jt = [
|
|
2152
2152
|
"as",
|
|
2153
2153
|
// for exports
|
|
2154
2154
|
"in",
|
|
@@ -2191,14 +2191,14 @@ const dn = "[A-Za-z$_][0-9A-Za-z$_]*", jt = [
|
|
|
2191
2191
|
"from",
|
|
2192
2192
|
"export",
|
|
2193
2193
|
"extends"
|
|
2194
|
-
],
|
|
2194
|
+
], er = [
|
|
2195
2195
|
"true",
|
|
2196
2196
|
"false",
|
|
2197
2197
|
"null",
|
|
2198
2198
|
"undefined",
|
|
2199
2199
|
"NaN",
|
|
2200
2200
|
"Infinity"
|
|
2201
|
-
],
|
|
2201
|
+
], kn = [
|
|
2202
2202
|
// Fundamental objects
|
|
2203
2203
|
"Object",
|
|
2204
2204
|
"Function",
|
|
@@ -2248,7 +2248,7 @@ const dn = "[A-Za-z$_][0-9A-Za-z$_]*", jt = [
|
|
|
2248
2248
|
"Intl",
|
|
2249
2249
|
// WebAssembly
|
|
2250
2250
|
"WebAssembly"
|
|
2251
|
-
],
|
|
2251
|
+
], Bn = [
|
|
2252
2252
|
"Error",
|
|
2253
2253
|
"EvalError",
|
|
2254
2254
|
"InternalError",
|
|
@@ -2257,7 +2257,7 @@ const dn = "[A-Za-z$_][0-9A-Za-z$_]*", jt = [
|
|
|
2257
2257
|
"SyntaxError",
|
|
2258
2258
|
"TypeError",
|
|
2259
2259
|
"URIError"
|
|
2260
|
-
],
|
|
2260
|
+
], $n = [
|
|
2261
2261
|
"setInterval",
|
|
2262
2262
|
"setTimeout",
|
|
2263
2263
|
"clearInterval",
|
|
@@ -2275,7 +2275,7 @@ const dn = "[A-Za-z$_][0-9A-Za-z$_]*", jt = [
|
|
|
2275
2275
|
"encodeURIComponent",
|
|
2276
2276
|
"escape",
|
|
2277
2277
|
"unescape"
|
|
2278
|
-
],
|
|
2278
|
+
], nr = [
|
|
2279
2279
|
"arguments",
|
|
2280
2280
|
"this",
|
|
2281
2281
|
"super",
|
|
@@ -2287,16 +2287,16 @@ const dn = "[A-Za-z$_][0-9A-Za-z$_]*", jt = [
|
|
|
2287
2287
|
"module",
|
|
2288
2288
|
"global"
|
|
2289
2289
|
// Node.js
|
|
2290
|
-
],
|
|
2290
|
+
], tr = [].concat(
|
|
2291
|
+
$n,
|
|
2291
2292
|
kn,
|
|
2292
|
-
|
|
2293
|
-
In
|
|
2293
|
+
Bn
|
|
2294
2294
|
);
|
|
2295
|
-
function
|
|
2295
|
+
function rr(e) {
|
|
2296
2296
|
const r = e.regex, l = (N, { after: C }) => {
|
|
2297
2297
|
const U = "</" + N[0].slice(1);
|
|
2298
2298
|
return N.input.indexOf(U, C) !== -1;
|
|
2299
|
-
}, f = dn,
|
|
2299
|
+
}, f = dn, g = {
|
|
2300
2300
|
begin: "<>",
|
|
2301
2301
|
end: "</>"
|
|
2302
2302
|
}, n = /<[A-Za-z0-9\\._:-]+\s*\/>/, t = {
|
|
@@ -2333,10 +2333,10 @@ function nr(e) {
|
|
|
2333
2333
|
}
|
|
2334
2334
|
}, i = {
|
|
2335
2335
|
$pattern: dn,
|
|
2336
|
-
keyword:
|
|
2337
|
-
literal:
|
|
2338
|
-
built_in:
|
|
2339
|
-
"variable.language":
|
|
2336
|
+
keyword: Jt,
|
|
2337
|
+
literal: er,
|
|
2338
|
+
built_in: tr,
|
|
2339
|
+
"variable.language": nr
|
|
2340
2340
|
}, s = "[0-9](_?[0-9])*", o = `\\.(${s})`, a = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2341
2341
|
className: "number",
|
|
2342
2342
|
variants: [
|
|
@@ -2361,7 +2361,7 @@ function nr(e) {
|
|
|
2361
2361
|
keywords: i,
|
|
2362
2362
|
contains: []
|
|
2363
2363
|
// defined later
|
|
2364
|
-
},
|
|
2364
|
+
}, h = {
|
|
2365
2365
|
begin: ".?html`",
|
|
2366
2366
|
end: "",
|
|
2367
2367
|
starts: {
|
|
@@ -2373,7 +2373,7 @@ function nr(e) {
|
|
|
2373
2373
|
],
|
|
2374
2374
|
subLanguage: "xml"
|
|
2375
2375
|
}
|
|
2376
|
-
},
|
|
2376
|
+
}, p = {
|
|
2377
2377
|
begin: ".?css`",
|
|
2378
2378
|
end: "",
|
|
2379
2379
|
starts: {
|
|
@@ -2385,7 +2385,7 @@ function nr(e) {
|
|
|
2385
2385
|
],
|
|
2386
2386
|
subLanguage: "css"
|
|
2387
2387
|
}
|
|
2388
|
-
},
|
|
2388
|
+
}, d = {
|
|
2389
2389
|
begin: ".?gql`",
|
|
2390
2390
|
end: "",
|
|
2391
2391
|
starts: {
|
|
@@ -2453,9 +2453,9 @@ function nr(e) {
|
|
|
2453
2453
|
}, v = [
|
|
2454
2454
|
e.APOS_STRING_MODE,
|
|
2455
2455
|
e.QUOTE_STRING_MODE,
|
|
2456
|
-
|
|
2457
|
-
g,
|
|
2456
|
+
h,
|
|
2458
2457
|
p,
|
|
2458
|
+
d,
|
|
2459
2459
|
_,
|
|
2460
2460
|
// Skip numbers when they are part of a variable name
|
|
2461
2461
|
{ match: /\$\d+/ },
|
|
@@ -2474,13 +2474,13 @@ function nr(e) {
|
|
|
2474
2474
|
"self"
|
|
2475
2475
|
].concat(v)
|
|
2476
2476
|
});
|
|
2477
|
-
const
|
|
2477
|
+
const y = [].concat(E, u.contains), D = y.concat([
|
|
2478
2478
|
// eat recursive parens in sub expressions
|
|
2479
2479
|
{
|
|
2480
2480
|
begin: /(\s*)\(/,
|
|
2481
2481
|
end: /\)/,
|
|
2482
2482
|
keywords: i,
|
|
2483
|
-
contains: ["self"].concat(
|
|
2483
|
+
contains: ["self"].concat(y)
|
|
2484
2484
|
}
|
|
2485
2485
|
]), T = {
|
|
2486
2486
|
className: "params",
|
|
@@ -2545,8 +2545,8 @@ function nr(e) {
|
|
|
2545
2545
|
keywords: {
|
|
2546
2546
|
_: [
|
|
2547
2547
|
// se we still get relevance credit for JS library classes
|
|
2548
|
-
...
|
|
2549
|
-
...
|
|
2548
|
+
...kn,
|
|
2549
|
+
...Bn
|
|
2550
2550
|
]
|
|
2551
2551
|
}
|
|
2552
2552
|
}, L = {
|
|
@@ -2591,7 +2591,7 @@ function nr(e) {
|
|
|
2591
2591
|
match: r.concat(
|
|
2592
2592
|
/\b/,
|
|
2593
2593
|
$([
|
|
2594
|
-
|
|
2594
|
+
...$n,
|
|
2595
2595
|
"super",
|
|
2596
2596
|
"import"
|
|
2597
2597
|
].map((N) => `${N}\\s*\\(`)),
|
|
@@ -2627,7 +2627,7 @@ function nr(e) {
|
|
|
2627
2627
|
},
|
|
2628
2628
|
T
|
|
2629
2629
|
]
|
|
2630
|
-
}, ge = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>",
|
|
2630
|
+
}, ge = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", m = {
|
|
2631
2631
|
match: [
|
|
2632
2632
|
/const|var|let/,
|
|
2633
2633
|
/\s+/,
|
|
@@ -2663,9 +2663,9 @@ function nr(e) {
|
|
|
2663
2663
|
L,
|
|
2664
2664
|
e.APOS_STRING_MODE,
|
|
2665
2665
|
e.QUOTE_STRING_MODE,
|
|
2666
|
-
|
|
2667
|
-
g,
|
|
2666
|
+
h,
|
|
2668
2667
|
p,
|
|
2668
|
+
d,
|
|
2669
2669
|
_,
|
|
2670
2670
|
E,
|
|
2671
2671
|
// Skip numbers when they are part of a variable name
|
|
@@ -2677,7 +2677,7 @@ function nr(e) {
|
|
|
2677
2677
|
begin: f + r.lookahead(":"),
|
|
2678
2678
|
relevance: 0
|
|
2679
2679
|
},
|
|
2680
|
-
|
|
2680
|
+
m,
|
|
2681
2681
|
{
|
|
2682
2682
|
// "value" container
|
|
2683
2683
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
@@ -2731,7 +2731,7 @@ function nr(e) {
|
|
|
2731
2731
|
{
|
|
2732
2732
|
// JSX
|
|
2733
2733
|
variants: [
|
|
2734
|
-
{ begin:
|
|
2734
|
+
{ begin: g.begin, end: g.end },
|
|
2735
2735
|
{ match: n },
|
|
2736
2736
|
{
|
|
2737
2737
|
begin: t.begin,
|
|
@@ -2801,7 +2801,7 @@ function nr(e) {
|
|
|
2801
2801
|
]
|
|
2802
2802
|
};
|
|
2803
2803
|
}
|
|
2804
|
-
function
|
|
2804
|
+
function ir(e) {
|
|
2805
2805
|
const r = {
|
|
2806
2806
|
className: "attr",
|
|
2807
2807
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -2814,7 +2814,7 @@ function tr(e) {
|
|
|
2814
2814
|
"true",
|
|
2815
2815
|
"false",
|
|
2816
2816
|
"null"
|
|
2817
|
-
],
|
|
2817
|
+
], g = {
|
|
2818
2818
|
scope: "literal",
|
|
2819
2819
|
beginKeywords: f.join(" ")
|
|
2820
2820
|
};
|
|
@@ -2828,7 +2828,7 @@ function tr(e) {
|
|
|
2828
2828
|
r,
|
|
2829
2829
|
l,
|
|
2830
2830
|
e.QUOTE_STRING_MODE,
|
|
2831
|
-
|
|
2831
|
+
g,
|
|
2832
2832
|
e.C_NUMBER_MODE,
|
|
2833
2833
|
e.C_LINE_COMMENT_MODE,
|
|
2834
2834
|
e.C_BLOCK_COMMENT_MODE
|
|
@@ -2836,7 +2836,7 @@ function tr(e) {
|
|
|
2836
2836
|
illegal: "\\S"
|
|
2837
2837
|
};
|
|
2838
2838
|
}
|
|
2839
|
-
function
|
|
2839
|
+
function sr(e) {
|
|
2840
2840
|
const r = "true false yes no null", l = "[\\w#;/?:@&=+$,.~*'()[\\]]+", f = {
|
|
2841
2841
|
className: "attr",
|
|
2842
2842
|
variants: [
|
|
@@ -2851,7 +2851,7 @@ function rr(e) {
|
|
|
2851
2851
|
begin: /'\w[\w :()\./-]*':(?=[ \t]|$)/
|
|
2852
2852
|
}
|
|
2853
2853
|
]
|
|
2854
|
-
},
|
|
2854
|
+
}, g = {
|
|
2855
2855
|
className: "template-variable",
|
|
2856
2856
|
variants: [
|
|
2857
2857
|
{
|
|
@@ -2881,7 +2881,7 @@ function rr(e) {
|
|
|
2881
2881
|
],
|
|
2882
2882
|
contains: [
|
|
2883
2883
|
e.BACKSLASH_ESCAPE,
|
|
2884
|
-
|
|
2884
|
+
g
|
|
2885
2885
|
]
|
|
2886
2886
|
}, t = e.inherit(n, { variants: [
|
|
2887
2887
|
{
|
|
@@ -2902,19 +2902,19 @@ function rr(e) {
|
|
|
2902
2902
|
excludeEnd: !0,
|
|
2903
2903
|
keywords: r,
|
|
2904
2904
|
relevance: 0
|
|
2905
|
-
},
|
|
2905
|
+
}, h = {
|
|
2906
2906
|
begin: /\{/,
|
|
2907
2907
|
end: /\}/,
|
|
2908
2908
|
contains: [u],
|
|
2909
2909
|
illegal: "\\n",
|
|
2910
2910
|
relevance: 0
|
|
2911
|
-
},
|
|
2911
|
+
}, p = {
|
|
2912
2912
|
begin: "\\[",
|
|
2913
2913
|
end: "\\]",
|
|
2914
2914
|
contains: [u],
|
|
2915
2915
|
illegal: "\\n",
|
|
2916
2916
|
relevance: 0
|
|
2917
|
-
},
|
|
2917
|
+
}, d = [
|
|
2918
2918
|
f,
|
|
2919
2919
|
{
|
|
2920
2920
|
className: "meta",
|
|
@@ -2990,18 +2990,18 @@ function rr(e) {
|
|
|
2990
2990
|
begin: e.C_NUMBER_RE + "\\b",
|
|
2991
2991
|
relevance: 0
|
|
2992
2992
|
},
|
|
2993
|
-
|
|
2994
|
-
|
|
2993
|
+
h,
|
|
2994
|
+
p,
|
|
2995
2995
|
n
|
|
2996
|
-
], _ = [...
|
|
2996
|
+
], _ = [...d];
|
|
2997
2997
|
return _.pop(), _.push(t), u.contains = _, {
|
|
2998
2998
|
name: "YAML",
|
|
2999
2999
|
case_insensitive: !0,
|
|
3000
3000
|
aliases: ["yml"],
|
|
3001
|
-
contains:
|
|
3001
|
+
contains: d
|
|
3002
3002
|
};
|
|
3003
3003
|
}
|
|
3004
|
-
function
|
|
3004
|
+
function ar(e) {
|
|
3005
3005
|
return {
|
|
3006
3006
|
name: "Plain text",
|
|
3007
3007
|
aliases: [
|
|
@@ -3011,7 +3011,7 @@ function ir(e) {
|
|
|
3011
3011
|
disableAutodetect: !0
|
|
3012
3012
|
};
|
|
3013
3013
|
}
|
|
3014
|
-
function
|
|
3014
|
+
function or(e) {
|
|
3015
3015
|
const r = e.regex, l = /[\p{XID_Start}_]\p{XID_Continue}*/u, f = [
|
|
3016
3016
|
"and",
|
|
3017
3017
|
"as",
|
|
@@ -3237,7 +3237,7 @@ function sr(e) {
|
|
|
3237
3237
|
e.APOS_STRING_MODE,
|
|
3238
3238
|
e.QUOTE_STRING_MODE
|
|
3239
3239
|
]
|
|
3240
|
-
}, u = "[0-9](_?[0-9])*",
|
|
3240
|
+
}, u = "[0-9](_?[0-9])*", h = `(\\b(${u}))?\\.(${u})|\\b(${u})\\.`, p = `\\b|${f.join("|")}`, d = {
|
|
3241
3241
|
className: "number",
|
|
3242
3242
|
relevance: 0,
|
|
3243
3243
|
variants: [
|
|
@@ -3252,10 +3252,10 @@ function sr(e) {
|
|
|
3252
3252
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
3253
3253
|
// the interior part of an identifier
|
|
3254
3254
|
{
|
|
3255
|
-
begin: `(\\b(${u})|(${
|
|
3255
|
+
begin: `(\\b(${u})|(${h}))[eE][+-]?(${u})[jJ]?(?=${p})`
|
|
3256
3256
|
},
|
|
3257
3257
|
{
|
|
3258
|
-
begin: `(${
|
|
3258
|
+
begin: `(${h})[jJ]?`
|
|
3259
3259
|
},
|
|
3260
3260
|
// decinteger, bininteger, octinteger, hexinteger
|
|
3261
3261
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
@@ -3264,21 +3264,21 @@ function sr(e) {
|
|
|
3264
3264
|
// decinteger is optionally imaginary
|
|
3265
3265
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3266
3266
|
{
|
|
3267
|
-
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${
|
|
3267
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`
|
|
3268
3268
|
},
|
|
3269
3269
|
{
|
|
3270
|
-
begin: `\\b0[bB](_?[01])+[lL]?(?=${
|
|
3270
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${p})`
|
|
3271
3271
|
},
|
|
3272
3272
|
{
|
|
3273
|
-
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${
|
|
3273
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${p})`
|
|
3274
3274
|
},
|
|
3275
3275
|
{
|
|
3276
|
-
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${
|
|
3276
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`
|
|
3277
3277
|
},
|
|
3278
3278
|
// imagnumber (digitpart-based)
|
|
3279
3279
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3280
3280
|
{
|
|
3281
|
-
begin: `\\b(${u})[jJ](?=${
|
|
3281
|
+
begin: `\\b(${u})[jJ](?=${p})`
|
|
3282
3282
|
}
|
|
3283
3283
|
]
|
|
3284
3284
|
}, _ = {
|
|
@@ -3298,7 +3298,7 @@ function sr(e) {
|
|
|
3298
3298
|
endsWithParent: !0
|
|
3299
3299
|
}
|
|
3300
3300
|
]
|
|
3301
|
-
},
|
|
3301
|
+
}, b = {
|
|
3302
3302
|
className: "params",
|
|
3303
3303
|
variants: [
|
|
3304
3304
|
// Exclude params in functions without params
|
|
@@ -3316,7 +3316,7 @@ function sr(e) {
|
|
|
3316
3316
|
contains: [
|
|
3317
3317
|
"self",
|
|
3318
3318
|
s,
|
|
3319
|
-
|
|
3319
|
+
d,
|
|
3320
3320
|
c,
|
|
3321
3321
|
e.HASH_COMMENT_MODE
|
|
3322
3322
|
]
|
|
@@ -3325,7 +3325,7 @@ function sr(e) {
|
|
|
3325
3325
|
};
|
|
3326
3326
|
return o.contains = [
|
|
3327
3327
|
c,
|
|
3328
|
-
|
|
3328
|
+
d,
|
|
3329
3329
|
s
|
|
3330
3330
|
], {
|
|
3331
3331
|
name: "Python",
|
|
@@ -3339,7 +3339,7 @@ function sr(e) {
|
|
|
3339
3339
|
illegal: /(<\/|\?)|=>/,
|
|
3340
3340
|
contains: [
|
|
3341
3341
|
s,
|
|
3342
|
-
|
|
3342
|
+
d,
|
|
3343
3343
|
{
|
|
3344
3344
|
// very common convention
|
|
3345
3345
|
scope: "variable.language",
|
|
@@ -3365,7 +3365,7 @@ function sr(e) {
|
|
|
3365
3365
|
1: "keyword",
|
|
3366
3366
|
3: "title.function"
|
|
3367
3367
|
},
|
|
3368
|
-
contains: [
|
|
3368
|
+
contains: [b]
|
|
3369
3369
|
},
|
|
3370
3370
|
{
|
|
3371
3371
|
variants: [
|
|
@@ -3399,8 +3399,8 @@ function sr(e) {
|
|
|
3399
3399
|
begin: /^[\t ]*@/,
|
|
3400
3400
|
end: /(?=#)|$/,
|
|
3401
3401
|
contains: [
|
|
3402
|
-
|
|
3403
|
-
|
|
3402
|
+
d,
|
|
3403
|
+
b,
|
|
3404
3404
|
c
|
|
3405
3405
|
]
|
|
3406
3406
|
}
|
|
@@ -3430,11 +3430,11 @@ var de = "[0-9](_*[0-9])*", Oe = `\\.(${de})`, Ce = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3430
3430
|
],
|
|
3431
3431
|
relevance: 0
|
|
3432
3432
|
};
|
|
3433
|
-
function
|
|
3434
|
-
return l === -1 ? "" : e.replace(r, (f) =>
|
|
3433
|
+
function Pn(e, r, l) {
|
|
3434
|
+
return l === -1 ? "" : e.replace(r, (f) => Pn(e, r, l - 1));
|
|
3435
3435
|
}
|
|
3436
|
-
function
|
|
3437
|
-
const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", f = l +
|
|
3436
|
+
function lr(e) {
|
|
3437
|
+
const r = e.regex, l = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", f = l + Pn("(?:<" + l + "~~~(?:\\s*,\\s*" + l + "~~~)*>)?", /~~~/g, 2), s = {
|
|
3438
3438
|
keyword: [
|
|
3439
3439
|
"synchronized",
|
|
3440
3440
|
"abstract",
|
|
@@ -3643,7 +3643,7 @@ function ar(e) {
|
|
|
3643
3643
|
]
|
|
3644
3644
|
};
|
|
3645
3645
|
}
|
|
3646
|
-
function
|
|
3646
|
+
function cr(e) {
|
|
3647
3647
|
const r = e.regex, l = {}, f = {
|
|
3648
3648
|
begin: /\$\{/,
|
|
3649
3649
|
end: /\}/,
|
|
@@ -3668,7 +3668,7 @@ function or(e) {
|
|
|
3668
3668
|
f
|
|
3669
3669
|
]
|
|
3670
3670
|
});
|
|
3671
|
-
const
|
|
3671
|
+
const g = {
|
|
3672
3672
|
className: "subst",
|
|
3673
3673
|
begin: /\$\(/,
|
|
3674
3674
|
end: /\)/,
|
|
@@ -3700,10 +3700,10 @@ function or(e) {
|
|
|
3700
3700
|
contains: [
|
|
3701
3701
|
e.BACKSLASH_ESCAPE,
|
|
3702
3702
|
l,
|
|
3703
|
-
|
|
3703
|
+
g
|
|
3704
3704
|
]
|
|
3705
3705
|
};
|
|
3706
|
-
|
|
3706
|
+
g.contains.push(i);
|
|
3707
3707
|
const s = {
|
|
3708
3708
|
match: /\\"/
|
|
3709
3709
|
}, o = {
|
|
@@ -3733,16 +3733,16 @@ function or(e) {
|
|
|
3733
3733
|
"tcsh",
|
|
3734
3734
|
"dash",
|
|
3735
3735
|
"scsh"
|
|
3736
|
-
],
|
|
3736
|
+
], h = e.SHEBANG({
|
|
3737
3737
|
binary: `(${u.join("|")})`,
|
|
3738
3738
|
relevance: 10
|
|
3739
|
-
}),
|
|
3739
|
+
}), p = {
|
|
3740
3740
|
className: "function",
|
|
3741
3741
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3742
3742
|
returnBegin: !0,
|
|
3743
3743
|
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
|
|
3744
3744
|
relevance: 0
|
|
3745
|
-
},
|
|
3745
|
+
}, d = [
|
|
3746
3746
|
"if",
|
|
3747
3747
|
"then",
|
|
3748
3748
|
"else",
|
|
@@ -3761,7 +3761,7 @@ function or(e) {
|
|
|
3761
3761
|
], _ = [
|
|
3762
3762
|
"true",
|
|
3763
3763
|
"false"
|
|
3764
|
-
],
|
|
3764
|
+
], b = { match: /(\/[a-z._-]+)+/ }, E = [
|
|
3765
3765
|
"break",
|
|
3766
3766
|
"cd",
|
|
3767
3767
|
"continue",
|
|
@@ -3803,7 +3803,7 @@ function or(e) {
|
|
|
3803
3803
|
"typeset",
|
|
3804
3804
|
"ulimit",
|
|
3805
3805
|
"unalias"
|
|
3806
|
-
],
|
|
3806
|
+
], y = [
|
|
3807
3807
|
"autoload",
|
|
3808
3808
|
"bg",
|
|
3809
3809
|
"bindkey",
|
|
@@ -3985,7 +3985,7 @@ function or(e) {
|
|
|
3985
3985
|
],
|
|
3986
3986
|
keywords: {
|
|
3987
3987
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3988
|
-
keyword:
|
|
3988
|
+
keyword: d,
|
|
3989
3989
|
literal: _,
|
|
3990
3990
|
built_in: [
|
|
3991
3991
|
...E,
|
|
@@ -3993,20 +3993,20 @@ function or(e) {
|
|
|
3993
3993
|
// Shell modifiers
|
|
3994
3994
|
"set",
|
|
3995
3995
|
"shopt",
|
|
3996
|
-
...
|
|
3996
|
+
...y,
|
|
3997
3997
|
...D
|
|
3998
3998
|
]
|
|
3999
3999
|
},
|
|
4000
4000
|
contains: [
|
|
4001
|
-
|
|
4001
|
+
h,
|
|
4002
4002
|
// to catch known shells and boost relevancy
|
|
4003
4003
|
e.SHEBANG(),
|
|
4004
4004
|
// to catch unknown shells but still highlight the shebang
|
|
4005
|
-
|
|
4005
|
+
p,
|
|
4006
4006
|
c,
|
|
4007
4007
|
n,
|
|
4008
4008
|
t,
|
|
4009
|
-
|
|
4009
|
+
b,
|
|
4010
4010
|
i,
|
|
4011
4011
|
s,
|
|
4012
4012
|
o,
|
|
@@ -4015,7 +4015,7 @@ function or(e) {
|
|
|
4015
4015
|
]
|
|
4016
4016
|
};
|
|
4017
4017
|
}
|
|
4018
|
-
function
|
|
4018
|
+
function ur(e) {
|
|
4019
4019
|
const r = e.regex, l = e.COMMENT("--", "$"), f = {
|
|
4020
4020
|
className: "string",
|
|
4021
4021
|
variants: [
|
|
@@ -4025,7 +4025,7 @@ function lr(e) {
|
|
|
4025
4025
|
contains: [{ begin: /''/ }]
|
|
4026
4026
|
}
|
|
4027
4027
|
]
|
|
4028
|
-
},
|
|
4028
|
+
}, g = {
|
|
4029
4029
|
begin: /"/,
|
|
4030
4030
|
end: /"/,
|
|
4031
4031
|
contains: [{ begin: /""/ }]
|
|
@@ -4564,27 +4564,27 @@ function lr(e) {
|
|
|
4564
4564
|
"nulls last",
|
|
4565
4565
|
"depth first",
|
|
4566
4566
|
"breadth first"
|
|
4567
|
-
],
|
|
4567
|
+
], h = a, p = [
|
|
4568
4568
|
...o,
|
|
4569
4569
|
...s
|
|
4570
|
-
].filter((v) => !a.includes(v)),
|
|
4570
|
+
].filter((v) => !a.includes(v)), d = {
|
|
4571
4571
|
className: "variable",
|
|
4572
4572
|
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4573
4573
|
}, _ = {
|
|
4574
4574
|
className: "operator",
|
|
4575
4575
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4576
4576
|
relevance: 0
|
|
4577
|
-
},
|
|
4578
|
-
begin: r.concat(/\b/, r.either(...
|
|
4577
|
+
}, b = {
|
|
4578
|
+
begin: r.concat(/\b/, r.either(...h), /\s*\(/),
|
|
4579
4579
|
relevance: 0,
|
|
4580
|
-
keywords: { built_in:
|
|
4580
|
+
keywords: { built_in: h }
|
|
4581
4581
|
};
|
|
4582
4582
|
function E(v, {
|
|
4583
|
-
exceptions:
|
|
4583
|
+
exceptions: y,
|
|
4584
4584
|
when: D
|
|
4585
4585
|
} = {}) {
|
|
4586
4586
|
const T = D;
|
|
4587
|
-
return
|
|
4587
|
+
return y = y || [], v.map((M) => M.match(/\|\d+$/) || y.includes(M) ? M : T(M) ? `${M}|0` : M);
|
|
4588
4588
|
}
|
|
4589
4589
|
return {
|
|
4590
4590
|
name: "SQL",
|
|
@@ -4593,7 +4593,7 @@ function lr(e) {
|
|
|
4593
4593
|
illegal: /[{}]|<\//,
|
|
4594
4594
|
keywords: {
|
|
4595
4595
|
$pattern: /\b[\w\.]+/,
|
|
4596
|
-
keyword: E(
|
|
4596
|
+
keyword: E(p, { when: (v) => v.length < 3 }),
|
|
4597
4597
|
literal: n,
|
|
4598
4598
|
type: i,
|
|
4599
4599
|
built_in: c
|
|
@@ -4604,7 +4604,7 @@ function lr(e) {
|
|
|
4604
4604
|
relevance: 0,
|
|
4605
4605
|
keywords: {
|
|
4606
4606
|
$pattern: /[\w\.]+/,
|
|
4607
|
-
keyword:
|
|
4607
|
+
keyword: p.concat(u),
|
|
4608
4608
|
literal: n,
|
|
4609
4609
|
type: i
|
|
4610
4610
|
}
|
|
@@ -4613,10 +4613,10 @@ function lr(e) {
|
|
|
4613
4613
|
className: "type",
|
|
4614
4614
|
begin: r.either(...t)
|
|
4615
4615
|
},
|
|
4616
|
-
|
|
4617
|
-
|
|
4616
|
+
b,
|
|
4617
|
+
d,
|
|
4618
4618
|
f,
|
|
4619
|
-
|
|
4619
|
+
g,
|
|
4620
4620
|
e.C_NUMBER_MODE,
|
|
4621
4621
|
e.C_BLOCK_COMMENT_MODE,
|
|
4622
4622
|
l,
|
|
@@ -4624,44 +4624,56 @@ function lr(e) {
|
|
|
4624
4624
|
]
|
|
4625
4625
|
};
|
|
4626
4626
|
}
|
|
4627
|
-
q.registerLanguage("xml",
|
|
4628
|
-
q.registerLanguage("javascript",
|
|
4629
|
-
q.registerLanguage("json",
|
|
4630
|
-
q.registerLanguage("yaml",
|
|
4631
|
-
q.registerLanguage("plaintext",
|
|
4632
|
-
q.registerLanguage("python",
|
|
4633
|
-
q.registerLanguage("java",
|
|
4634
|
-
q.registerLanguage("bash",
|
|
4635
|
-
q.registerLanguage("sql",
|
|
4627
|
+
q.registerLanguage("xml", qt);
|
|
4628
|
+
q.registerLanguage("javascript", rr);
|
|
4629
|
+
q.registerLanguage("json", ir);
|
|
4630
|
+
q.registerLanguage("yaml", sr);
|
|
4631
|
+
q.registerLanguage("plaintext", ar);
|
|
4632
|
+
q.registerLanguage("python", or);
|
|
4633
|
+
q.registerLanguage("java", lr);
|
|
4634
|
+
q.registerLanguage("bash", cr);
|
|
4635
|
+
q.registerLanguage("sql", ur);
|
|
4636
4636
|
var A = /* @__PURE__ */ ((e) => (e.EQUAL = "equal", e.DELETE = "removed", e.ADD = "added", e.EMPTY = "empty", e))(A || {});
|
|
4637
|
-
const ie = "<code-diff-modified>", se = "</code-diff-modified>",
|
|
4637
|
+
const ie = "<code-diff-modified>", se = "</code-diff-modified>", _n = ie.replace("<", "<").replace(">", ">"), bn = se.replace("<", "<").replace(">", ">");
|
|
4638
|
+
function fr(e) {
|
|
4639
|
+
const r = {
|
|
4640
|
+
"&": "&",
|
|
4641
|
+
"<": "<",
|
|
4642
|
+
">": ">",
|
|
4643
|
+
'"': """,
|
|
4644
|
+
"'": "'"
|
|
4645
|
+
};
|
|
4646
|
+
return e.replace(/[&<>"']/g, (l) => r[l]);
|
|
4647
|
+
}
|
|
4638
4648
|
function be(e) {
|
|
4639
4649
|
return e === void 0 ? A.EQUAL : e.added ? A.ADD : e.removed ? A.DELETE : A.EQUAL;
|
|
4640
4650
|
}
|
|
4641
4651
|
function Be(e, r, l = "word") {
|
|
4642
|
-
return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (l === "char" ?
|
|
4643
|
-
(
|
|
4652
|
+
return typeof e == "undefined" ? r : typeof r == "undefined" ? e : (l === "char" ? qn : et)(e, r).filter((g) => be(g) !== A.DELETE).map(
|
|
4653
|
+
(g) => be(g) === A.ADD ? `${ie}${g.value}${se}` : g.value
|
|
4644
4654
|
).join("");
|
|
4645
4655
|
}
|
|
4646
|
-
function
|
|
4647
|
-
const l = new
|
|
4656
|
+
function Un(e, r) {
|
|
4657
|
+
const l = new Fe.diff_match_patch(), f = l.diff_linesToChars_(e, r), g = f.chars1, n = f.chars2, t = f.lineArray, i = l.diff_main(g, n, !1);
|
|
4648
4658
|
return l.diff_charsToLines_(i, t), i.map((s) => {
|
|
4649
4659
|
const [o, a] = s;
|
|
4650
4660
|
return {
|
|
4651
4661
|
count: a.replace(/\n$/, "").split(`
|
|
4652
4662
|
`).length,
|
|
4653
4663
|
value: a,
|
|
4654
|
-
removed: o ===
|
|
4655
|
-
added: o ===
|
|
4664
|
+
removed: o === Fe.DIFF_DELETE,
|
|
4665
|
+
added: o === Fe.DIFF_INSERT
|
|
4656
4666
|
};
|
|
4657
4667
|
});
|
|
4658
4668
|
}
|
|
4659
4669
|
function j(e, r) {
|
|
4670
|
+
if (typeof document == "undefined")
|
|
4671
|
+
return fr(r).replace(new RegExp(_n, "g"), '<span class="x">').replace(new RegExp(bn, "g"), "</span>");
|
|
4660
4672
|
if (!r.match(new RegExp(`(${ie}|${se})`, "g")))
|
|
4661
4673
|
return q.highlight(r, { language: e }).value;
|
|
4662
4674
|
let f = r;
|
|
4663
|
-
const
|
|
4664
|
-
n.innerHTML = q.highlight(
|
|
4675
|
+
const g = r.replace(new RegExp(`(${ie}|${se})`, "g"), ""), n = document.createElement("div");
|
|
4676
|
+
n.innerHTML = q.highlight(g, { language: e }).value;
|
|
4665
4677
|
let t = !1;
|
|
4666
4678
|
const i = (s) => {
|
|
4667
4679
|
s.childNodes.forEach((o) => {
|
|
@@ -4678,23 +4690,23 @@ function j(e, r) {
|
|
|
4678
4690
|
f = f.slice(se.length), c = c + se, t = !1;
|
|
4679
4691
|
continue;
|
|
4680
4692
|
}
|
|
4681
|
-
const u = f.match(new RegExp(`(${ie}|${se})`)),
|
|
4682
|
-
c = c + f.substring(0,
|
|
4693
|
+
const u = f.match(new RegExp(`(${ie}|${se})`)), h = u && u.index ? u.index : f.length, p = Math.min(h, a.length);
|
|
4694
|
+
c = c + f.substring(0, p), f = f.slice(p), a = a.slice(p);
|
|
4683
4695
|
}
|
|
4684
4696
|
t && (c = c + se), o.textContent = c;
|
|
4685
4697
|
}
|
|
4686
4698
|
});
|
|
4687
4699
|
};
|
|
4688
|
-
return i(n), n.innerHTML.replace(new RegExp(
|
|
4700
|
+
return i(n), n.innerHTML.replace(new RegExp(_n, "g"), '<span class="x">').replace(new RegExp(bn, "g"), "</span>");
|
|
4689
4701
|
}
|
|
4690
|
-
function
|
|
4702
|
+
function Hn(e, r) {
|
|
4691
4703
|
const l = (s, o) => (s.match(new RegExp(o, "g")) || []).length, f = (s) => s.filter((o) => r == null ? void 0 : r.test(o)).length;
|
|
4692
|
-
let
|
|
4704
|
+
let g = 0, n = 0, t = 0, i = 0;
|
|
4693
4705
|
for (const s of e) {
|
|
4694
4706
|
if (s.added) {
|
|
4695
4707
|
const o = f(s.value.trim().split(`
|
|
4696
4708
|
`));
|
|
4697
|
-
|
|
4709
|
+
g += l(s.value.trim(), `
|
|
4698
4710
|
`) + 1 - o, t += o;
|
|
4699
4711
|
continue;
|
|
4700
4712
|
}
|
|
@@ -4707,32 +4719,32 @@ function Pn(e, r) {
|
|
|
4707
4719
|
}
|
|
4708
4720
|
}
|
|
4709
4721
|
return {
|
|
4710
|
-
additionsNum:
|
|
4722
|
+
additionsNum: g,
|
|
4711
4723
|
deletionsNum: n,
|
|
4712
4724
|
ignoreAdditionsNum: t,
|
|
4713
4725
|
ignoreDeletionsNum: i
|
|
4714
4726
|
};
|
|
4715
4727
|
}
|
|
4716
|
-
function
|
|
4717
|
-
const i = () => ({ type: A.EMPTY }), s = (E, v,
|
|
4718
|
-
let c = 0, u = 0,
|
|
4719
|
-
const
|
|
4720
|
-
changes:
|
|
4728
|
+
function gr(e, r, l = "plaintext", f = "word", g = !1, n = 10, t) {
|
|
4729
|
+
const i = () => ({ type: A.EMPTY }), s = (E, v, y) => ({ type: E, num: v, code: y }), o = Un(e, r), a = t ? new RegExp(t) : void 0;
|
|
4730
|
+
let c = 0, u = 0, h = !1;
|
|
4731
|
+
const p = [], d = {
|
|
4732
|
+
changes: p,
|
|
4721
4733
|
collector: [],
|
|
4722
|
-
stat:
|
|
4734
|
+
stat: Hn(o, a)
|
|
4723
4735
|
};
|
|
4724
4736
|
for (let E = 0; E < o.length; E++) {
|
|
4725
|
-
if (
|
|
4726
|
-
|
|
4737
|
+
if (h) {
|
|
4738
|
+
h = !1;
|
|
4727
4739
|
continue;
|
|
4728
4740
|
}
|
|
4729
|
-
const [v,
|
|
4741
|
+
const [v, y] = [o[E], o[E + 1]], [D, T] = [be(v), be(y)], M = v.value.replace(/\n$/, "").split(`
|
|
4730
4742
|
`);
|
|
4731
|
-
if (
|
|
4743
|
+
if (y === void 0) {
|
|
4732
4744
|
for (const L of M) {
|
|
4733
4745
|
let O = i(), P = i();
|
|
4734
4746
|
const $ = j(l, L);
|
|
4735
|
-
D === A.EQUAL && (c++, u++, O = s(A.EQUAL, c, $), P = s(A.EQUAL, u, $)), D === A.DELETE && (c++, O = s(A.DELETE, c, $), P = i()), D === A.ADD && (u++, O = i(), P = s(A.ADD, u, $)),
|
|
4747
|
+
D === A.EQUAL && (c++, u++, O = s(A.EQUAL, c, $), P = s(A.EQUAL, u, $)), D === A.DELETE && (c++, O = s(A.DELETE, c, $), P = i()), D === A.ADD && (u++, O = i(), P = s(A.ADD, u, $)), p.push({ left: O, right: P });
|
|
4736
4748
|
}
|
|
4737
4749
|
break;
|
|
4738
4750
|
}
|
|
@@ -4740,83 +4752,83 @@ function fr(e, r, l = "plaintext", f = "word", h = !1, n = 10, t) {
|
|
|
4740
4752
|
for (const L of M) {
|
|
4741
4753
|
c++, u++;
|
|
4742
4754
|
const O = j(l, L);
|
|
4743
|
-
|
|
4755
|
+
p.push({
|
|
4744
4756
|
left: s(A.EQUAL, c, O),
|
|
4745
4757
|
right: s(A.EQUAL, u, O)
|
|
4746
4758
|
});
|
|
4747
4759
|
}
|
|
4748
|
-
const R =
|
|
4760
|
+
const R = y.value.replace(/\n$/, "").split(`
|
|
4749
4761
|
`);
|
|
4750
4762
|
if (D === A.DELETE) {
|
|
4751
4763
|
if (T === A.EQUAL)
|
|
4752
4764
|
for (const L of M)
|
|
4753
|
-
c++,
|
|
4765
|
+
c++, p.push({
|
|
4754
4766
|
left: s(A.DELETE, c, j(l, L)),
|
|
4755
4767
|
right: i()
|
|
4756
4768
|
});
|
|
4757
4769
|
if (T === A.ADD) {
|
|
4758
|
-
|
|
4759
|
-
const L = Math.max(v.count,
|
|
4770
|
+
h = !0;
|
|
4771
|
+
const L = Math.max(v.count, y.count);
|
|
4760
4772
|
for (let O = 0; O < L; O++) {
|
|
4761
|
-
O < v.count && c++, O <
|
|
4762
|
-
const [P, $] = [M[O], R[O]], K =
|
|
4763
|
-
|
|
4773
|
+
O < v.count && c++, O < y.count && u++;
|
|
4774
|
+
const [P, $] = [M[O], R[O]], K = g || M.length === R.length, Y = K ? Be($, P, f) : P, oe = K ? Be(P, $, f) : $, ge = a != null && a.test(P) ? A.EQUAL : A.DELETE, m = a != null && a.test($) ? A.EQUAL : A.ADD, N = O < v.count ? s(ge, c, j(l, Y)) : i(), C = O < y.count ? s(m, u, j(l, oe)) : i();
|
|
4775
|
+
p.push({ left: N, right: C });
|
|
4764
4776
|
}
|
|
4765
4777
|
}
|
|
4766
4778
|
}
|
|
4767
4779
|
if (D === A.ADD)
|
|
4768
4780
|
for (const L of M)
|
|
4769
|
-
u++,
|
|
4781
|
+
u++, p.push({
|
|
4770
4782
|
left: i(),
|
|
4771
4783
|
right: s(A.ADD, u, j(l, L))
|
|
4772
4784
|
});
|
|
4773
4785
|
}
|
|
4774
4786
|
if (e === r) {
|
|
4775
|
-
for (let E = 0; E <
|
|
4776
|
-
|
|
4777
|
-
return
|
|
4787
|
+
for (let E = 0; E < p.length; E++)
|
|
4788
|
+
p[E].fold = !1;
|
|
4789
|
+
return d;
|
|
4778
4790
|
}
|
|
4779
|
-
for (let E = 0; E <
|
|
4780
|
-
const v =
|
|
4791
|
+
for (let E = 0; E < p.length; E++) {
|
|
4792
|
+
const v = p[E];
|
|
4781
4793
|
if (v.left.type === A.DELETE || v.right.type === A.ADD) {
|
|
4782
|
-
const [
|
|
4783
|
-
for (let T =
|
|
4784
|
-
|
|
4794
|
+
const [y, D] = [Math.max(E - n, 0), Math.min(E + n + 1, p.length)];
|
|
4795
|
+
for (let T = y; T < D; T++)
|
|
4796
|
+
p[T].fold = !1;
|
|
4785
4797
|
}
|
|
4786
4798
|
v.fold === void 0 && (v.fold = !0);
|
|
4787
4799
|
}
|
|
4788
4800
|
const _ = [];
|
|
4789
|
-
let
|
|
4790
|
-
for (let E = 0; E <
|
|
4791
|
-
const v =
|
|
4801
|
+
let b = [];
|
|
4802
|
+
for (let E = 0; E < p.length; E++) {
|
|
4803
|
+
const v = p[E];
|
|
4792
4804
|
if (v.fold === !1) {
|
|
4793
|
-
|
|
4794
|
-
lines:
|
|
4805
|
+
b.length && (b[0].hideIndex = d.collector.length, d.collector.push({
|
|
4806
|
+
lines: b,
|
|
4795
4807
|
fold: !0
|
|
4796
|
-
}),
|
|
4808
|
+
}), b = []), _.push(v);
|
|
4797
4809
|
continue;
|
|
4798
4810
|
}
|
|
4799
|
-
v.hide = !0,
|
|
4811
|
+
v.hide = !0, b.push(v), _.push(v);
|
|
4800
4812
|
}
|
|
4801
|
-
return
|
|
4802
|
-
lines:
|
|
4813
|
+
return b.length && (b[0].hideIndex = d.collector.length, d.collector.push({
|
|
4814
|
+
lines: b,
|
|
4803
4815
|
fold: !0
|
|
4804
|
-
}),
|
|
4816
|
+
}), b = []), d.changes = _, d;
|
|
4805
4817
|
}
|
|
4806
|
-
function
|
|
4807
|
-
const i =
|
|
4818
|
+
function hr(e, r, l = "plaintext", f = "word", g = !1, n = 10, t) {
|
|
4819
|
+
const i = Un(e, r), s = t ? new RegExp(t) : void 0;
|
|
4808
4820
|
let o = 0, a = 0, c = !1;
|
|
4809
|
-
const u = [],
|
|
4821
|
+
const u = [], h = {
|
|
4810
4822
|
changes: u,
|
|
4811
4823
|
collector: [],
|
|
4812
|
-
stat:
|
|
4824
|
+
stat: Hn(i, s)
|
|
4813
4825
|
};
|
|
4814
4826
|
for (let _ = 0; _ < i.length; _++) {
|
|
4815
4827
|
if (c) {
|
|
4816
4828
|
c = !1;
|
|
4817
4829
|
continue;
|
|
4818
4830
|
}
|
|
4819
|
-
const [
|
|
4831
|
+
const [b, E] = [i[_], i[_ + 1]], [v, y] = [be(b), be(E)], D = b.value.replace(/\n$/, "").split(`
|
|
4820
4832
|
`);
|
|
4821
4833
|
if (E === void 0) {
|
|
4822
4834
|
for (const M of D) {
|
|
@@ -4840,7 +4852,7 @@ function gr(e, r, l = "plaintext", f = "word", h = !1, n = 10, t) {
|
|
|
4840
4852
|
const T = E.value.replace(/\n$/, "").split(`
|
|
4841
4853
|
`);
|
|
4842
4854
|
if (v === A.DELETE)
|
|
4843
|
-
if (
|
|
4855
|
+
if (y === A.ADD && (D.length === T.length || g)) {
|
|
4844
4856
|
for (let M = 0; M < D.length; M++) {
|
|
4845
4857
|
const R = D[M], L = T[M];
|
|
4846
4858
|
o++;
|
|
@@ -4876,41 +4888,41 @@ function gr(e, r, l = "plaintext", f = "word", h = !1, n = 10, t) {
|
|
|
4876
4888
|
}
|
|
4877
4889
|
}
|
|
4878
4890
|
for (let _ = 0; _ < u.length; _++) {
|
|
4879
|
-
const
|
|
4880
|
-
if (
|
|
4891
|
+
const b = u[_];
|
|
4892
|
+
if (b.type === A.DELETE || b.type === A.ADD) {
|
|
4881
4893
|
const [E, v] = [Math.max(_ - n, 0), Math.min(_ + n + 1, u.length)];
|
|
4882
|
-
for (let
|
|
4883
|
-
u[
|
|
4894
|
+
for (let y = E; y < v; y++)
|
|
4895
|
+
u[y].fold = !1;
|
|
4884
4896
|
}
|
|
4885
|
-
|
|
4897
|
+
b.fold === void 0 && (b.fold = !0);
|
|
4886
4898
|
}
|
|
4887
4899
|
if (e === r) {
|
|
4888
4900
|
for (let _ = 0; _ < u.length; _++)
|
|
4889
4901
|
u[_].fold = !1;
|
|
4890
|
-
return
|
|
4902
|
+
return h;
|
|
4891
4903
|
}
|
|
4892
|
-
const
|
|
4893
|
-
let
|
|
4904
|
+
const p = [];
|
|
4905
|
+
let d = [];
|
|
4894
4906
|
for (let _ = 0; _ < u.length; _++) {
|
|
4895
|
-
const
|
|
4896
|
-
if (
|
|
4897
|
-
|
|
4898
|
-
lines:
|
|
4907
|
+
const b = u[_];
|
|
4908
|
+
if (b.fold === !1) {
|
|
4909
|
+
d.length && (d[0].hideIndex = h.collector.length, h.collector.push({
|
|
4910
|
+
lines: d,
|
|
4899
4911
|
fold: !0
|
|
4900
|
-
}),
|
|
4912
|
+
}), d = []), p.push(b);
|
|
4901
4913
|
continue;
|
|
4902
4914
|
}
|
|
4903
|
-
|
|
4915
|
+
b.type === "equal" && (b.hide = !0, d.push(b)), p.push(b);
|
|
4904
4916
|
}
|
|
4905
|
-
return
|
|
4906
|
-
lines:
|
|
4917
|
+
return d.length && (d[0].hideIndex = h.collector.length, h.collector.push({
|
|
4918
|
+
lines: d,
|
|
4907
4919
|
fold: !0
|
|
4908
|
-
}),
|
|
4920
|
+
}), d = []), h.changes = p, h;
|
|
4909
4921
|
}
|
|
4910
|
-
const
|
|
4922
|
+
const dr = { key: 0 }, pr = /* @__PURE__ */ B("td", {
|
|
4911
4923
|
class: "blob-code blob-code-hunk",
|
|
4912
4924
|
align: "left"
|
|
4913
|
-
}, " ⋯ ", -1),
|
|
4925
|
+
}, " ⋯ ", -1), _r = ["data-diff-change"], br = ["data-code-marker", "innerHTML"], mr = /* @__PURE__ */ me({
|
|
4914
4926
|
__name: "UnifiedLine",
|
|
4915
4927
|
props: {
|
|
4916
4928
|
line: {}
|
|
@@ -4918,50 +4930,53 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
4918
4930
|
emits: ["expand"],
|
|
4919
4931
|
setup(e, { emit: r }) {
|
|
4920
4932
|
const l = r;
|
|
4921
|
-
function f(
|
|
4922
|
-
return
|
|
4933
|
+
function f(g) {
|
|
4934
|
+
return g === A.DELETE ? "-" : g === A.ADD ? "+" : "";
|
|
4923
4935
|
}
|
|
4924
|
-
return (
|
|
4936
|
+
return (g, n) => g.line.hideIndex !== void 0 && g.line.hide ? (z(), W("tr", dr, [
|
|
4925
4937
|
B("td", {
|
|
4926
4938
|
class: "blob-num blob-num-hunk text-center",
|
|
4927
4939
|
colspan: "2",
|
|
4928
|
-
onClick: n[0] || (n[0] = (t) => l("expand",
|
|
4940
|
+
onClick: n[0] || (n[0] = (t) => l("expand", g.line))
|
|
4929
4941
|
}, " > "),
|
|
4930
|
-
|
|
4931
|
-
])) :
|
|
4942
|
+
pr
|
|
4943
|
+
])) : g.line.hide ? ye("", !0) : (z(), W("tr", {
|
|
4944
|
+
key: 1,
|
|
4945
|
+
"data-diff-change": g.line.type !== x(A).EQUAL ? "" : void 0
|
|
4946
|
+
}, [
|
|
4932
4947
|
B("td", {
|
|
4933
4948
|
class: ve(["blob-num", {
|
|
4934
|
-
"blob-num-deletion":
|
|
4935
|
-
"blob-num-addition":
|
|
4936
|
-
"blob-num-context":
|
|
4937
|
-
"blob-num-hunk":
|
|
4949
|
+
"blob-num-deletion": g.line.type === x(A).DELETE,
|
|
4950
|
+
"blob-num-addition": g.line.type === x(A).ADD,
|
|
4951
|
+
"blob-num-context": g.line.type === x(A).EQUAL,
|
|
4952
|
+
"blob-num-hunk": g.line.hide !== void 0
|
|
4938
4953
|
}])
|
|
4939
|
-
}, ee(
|
|
4954
|
+
}, ee(g.line.delNum), 3),
|
|
4940
4955
|
B("td", {
|
|
4941
4956
|
class: ve(["blob-num", {
|
|
4942
|
-
"blob-num-deletion":
|
|
4943
|
-
"blob-num-addition":
|
|
4944
|
-
"blob-num-context":
|
|
4945
|
-
"blob-num-hunk":
|
|
4957
|
+
"blob-num-deletion": g.line.type === x(A).DELETE,
|
|
4958
|
+
"blob-num-addition": g.line.type === x(A).ADD,
|
|
4959
|
+
"blob-num-context": g.line.type === x(A).EQUAL,
|
|
4960
|
+
"blob-num-hunk": g.line.hide !== void 0
|
|
4946
4961
|
}])
|
|
4947
|
-
}, ee(
|
|
4962
|
+
}, ee(g.line.addNum), 3),
|
|
4948
4963
|
B("td", {
|
|
4949
4964
|
class: ve(["blob-code", {
|
|
4950
|
-
"blob-code-deletion":
|
|
4951
|
-
"blob-code-addition":
|
|
4952
|
-
"blob-code-context":
|
|
4953
|
-
"blob-code-hunk":
|
|
4965
|
+
"blob-code-deletion": g.line.type === x(A).DELETE,
|
|
4966
|
+
"blob-code-addition": g.line.type === x(A).ADD,
|
|
4967
|
+
"blob-code-context": g.line.type === x(A).EQUAL,
|
|
4968
|
+
"blob-code-hunk": g.line.hide !== void 0
|
|
4954
4969
|
}])
|
|
4955
4970
|
}, [
|
|
4956
4971
|
B("span", {
|
|
4957
4972
|
class: "blob-code-inner blob-code-marker",
|
|
4958
|
-
"data-code-marker": f(
|
|
4959
|
-
innerHTML:
|
|
4960
|
-
}, null, 8,
|
|
4973
|
+
"data-code-marker": f(g.line.type),
|
|
4974
|
+
innerHTML: g.line.code
|
|
4975
|
+
}, null, 8, br)
|
|
4961
4976
|
], 2)
|
|
4962
|
-
]));
|
|
4977
|
+
], 8, _r));
|
|
4963
4978
|
}
|
|
4964
|
-
}),
|
|
4979
|
+
}), Er = { class: "diff-table" }, vr = /* @__PURE__ */ me({
|
|
4965
4980
|
__name: "UnifiedViewer",
|
|
4966
4981
|
props: {
|
|
4967
4982
|
diffChange: {}
|
|
@@ -4969,15 +4984,15 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
4969
4984
|
setup(e) {
|
|
4970
4985
|
const r = e;
|
|
4971
4986
|
function l({ hideIndex: f }) {
|
|
4972
|
-
f !== void 0 && r.diffChange.collector[f].lines.forEach((
|
|
4973
|
-
|
|
4987
|
+
f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
|
|
4988
|
+
g.hide = !1, g.fold = !1;
|
|
4974
4989
|
});
|
|
4975
4990
|
}
|
|
4976
|
-
return (f,
|
|
4991
|
+
return (f, g) => {
|
|
4977
4992
|
var n;
|
|
4978
|
-
return z(), W("table",
|
|
4993
|
+
return z(), W("table", Er, [
|
|
4979
4994
|
B("tbody", null, [
|
|
4980
|
-
(z(!0), W(pe, null,
|
|
4995
|
+
(z(!0), W(pe, null, We((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (z(), we(mr, {
|
|
4981
4996
|
key: i,
|
|
4982
4997
|
line: t,
|
|
4983
4998
|
onExpand: l
|
|
@@ -4986,11 +5001,11 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
4986
5001
|
]);
|
|
4987
5002
|
};
|
|
4988
5003
|
}
|
|
4989
|
-
}),
|
|
5004
|
+
}), yr = { key: 0 }, wr = /* @__PURE__ */ B("td", {
|
|
4990
5005
|
class: "blob-code blob-code-inner blob-code-hunk",
|
|
4991
5006
|
colspan: "3",
|
|
4992
5007
|
align: "left"
|
|
4993
|
-
}, " ⋯ ", -1),
|
|
5008
|
+
}, " ⋯ ", -1), Ar = ["data-diff-change"], Nr = /* @__PURE__ */ B("td", { class: "blob-num blob-num-empty empty-cell" }, null, -1), Mr = /* @__PURE__ */ B("td", { class: "blob-code blob-code-empty empty-cell" }, null, -1), Tr = ["onMousedown"], Dr = ["data-code-marker", "innerHTML"], Sr = /* @__PURE__ */ me({
|
|
4994
5009
|
__name: "SplitLine",
|
|
4995
5010
|
props: {
|
|
4996
5011
|
splitLine: {}
|
|
@@ -5001,25 +5016,28 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
5001
5016
|
function f(n) {
|
|
5002
5017
|
return n === A.DELETE ? "-" : n === A.ADD ? "+" : "";
|
|
5003
5018
|
}
|
|
5004
|
-
function
|
|
5005
|
-
const
|
|
5006
|
-
for (const
|
|
5007
|
-
|
|
5008
|
-
for (const
|
|
5009
|
-
|
|
5019
|
+
function g(n, t) {
|
|
5020
|
+
const i = n.currentTarget.closest(".file-diff-split"), s = i.querySelectorAll(".split-side-left"), o = i.querySelectorAll(".split-side-right");
|
|
5021
|
+
for (const a of o)
|
|
5022
|
+
a.classList.toggle("no-select", t === "left");
|
|
5023
|
+
for (const a of s)
|
|
5024
|
+
a.classList.toggle("no-select", t === "right");
|
|
5010
5025
|
}
|
|
5011
|
-
return (n, t) => n.splitLine.hideIndex !== void 0 && n.splitLine.hide ? (z(), W("tr",
|
|
5026
|
+
return (n, t) => n.splitLine.hideIndex !== void 0 && n.splitLine.hide ? (z(), W("tr", yr, [
|
|
5012
5027
|
B("td", {
|
|
5013
5028
|
class: "blob-num blob-num-hunk",
|
|
5014
5029
|
colspan: "1",
|
|
5015
5030
|
onClick: t[0] || (t[0] = (i) => l("expand", n.splitLine))
|
|
5016
5031
|
}, " > "),
|
|
5017
5032
|
wr
|
|
5018
|
-
])) : n.splitLine.hide ?
|
|
5019
|
-
|
|
5033
|
+
])) : n.splitLine.hide ? ye("", !0) : (z(), W("tr", {
|
|
5034
|
+
key: 1,
|
|
5035
|
+
"data-diff-change": n.splitLine.left.type === x(A).DELETE || n.splitLine.right.type === x(A).ADD ? "" : void 0
|
|
5036
|
+
}, [
|
|
5037
|
+
(z(!0), W(pe, null, We([n.splitLine.left, n.splitLine.right], (i, s) => (z(), W(pe, null, [
|
|
5020
5038
|
i.type === x(A).EMPTY ? (z(), W(pe, { key: 0 }, [
|
|
5021
5039
|
Nr,
|
|
5022
|
-
|
|
5040
|
+
Mr
|
|
5023
5041
|
], 64)) : (z(), W(pe, { key: 1 }, [
|
|
5024
5042
|
B("td", {
|
|
5025
5043
|
class: ve(["blob-num", {
|
|
@@ -5038,24 +5056,24 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
5038
5056
|
"split-side-left": s === 0,
|
|
5039
5057
|
"split-side-right": s === 1
|
|
5040
5058
|
}]),
|
|
5041
|
-
onMousedown: (o) =>
|
|
5059
|
+
onMousedown: (o) => g(o, s === 0 ? "left" : "right")
|
|
5042
5060
|
}, [
|
|
5043
5061
|
B("span", {
|
|
5044
5062
|
class: "blob-code-inner blob-code-marker",
|
|
5045
5063
|
"data-code-marker": f(i.type),
|
|
5046
5064
|
innerHTML: i.code
|
|
5047
|
-
}, null, 8,
|
|
5048
|
-
], 42,
|
|
5065
|
+
}, null, 8, Dr)
|
|
5066
|
+
], 42, Tr)
|
|
5049
5067
|
], 64))
|
|
5050
5068
|
], 64))), 256))
|
|
5051
|
-
]));
|
|
5069
|
+
], 8, Ar));
|
|
5052
5070
|
}
|
|
5053
|
-
}),
|
|
5071
|
+
}), Lr = { class: "file-diff-split diff-table" }, Rr = /* @__PURE__ */ B("colgroup", null, [
|
|
5054
5072
|
/* @__PURE__ */ B("col", { width: "44" }),
|
|
5055
5073
|
/* @__PURE__ */ B("col"),
|
|
5056
5074
|
/* @__PURE__ */ B("col", { width: "44" }),
|
|
5057
5075
|
/* @__PURE__ */ B("col")
|
|
5058
|
-
], -1),
|
|
5076
|
+
], -1), Or = /* @__PURE__ */ me({
|
|
5059
5077
|
__name: "SplitViewer",
|
|
5060
5078
|
props: {
|
|
5061
5079
|
diffChange: {}
|
|
@@ -5063,16 +5081,16 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
5063
5081
|
setup(e) {
|
|
5064
5082
|
const r = e;
|
|
5065
5083
|
function l({ hideIndex: f }) {
|
|
5066
|
-
f !== void 0 && r.diffChange.collector[f].lines.forEach((
|
|
5067
|
-
|
|
5084
|
+
f !== void 0 && r.diffChange.collector[f].lines.forEach((g) => {
|
|
5085
|
+
g.hide = !1, g.fold = !1;
|
|
5068
5086
|
});
|
|
5069
5087
|
}
|
|
5070
|
-
return (f,
|
|
5088
|
+
return (f, g) => {
|
|
5071
5089
|
var n;
|
|
5072
|
-
return z(), W("table",
|
|
5073
|
-
|
|
5090
|
+
return z(), W("table", Lr, [
|
|
5091
|
+
Rr,
|
|
5074
5092
|
B("tbody", null, [
|
|
5075
|
-
(z(!0), W(pe, null,
|
|
5093
|
+
(z(!0), W(pe, null, We((n = f.diffChange) == null ? void 0 : n.changes, (t, i) => (z(), we(Sr, {
|
|
5076
5094
|
key: i,
|
|
5077
5095
|
"split-line": t,
|
|
5078
5096
|
onExpand: l
|
|
@@ -5081,51 +5099,51 @@ const hr = { key: 0 }, dr = /* @__PURE__ */ B("td", {
|
|
|
5081
5099
|
]);
|
|
5082
5100
|
};
|
|
5083
5101
|
}
|
|
5084
|
-
}),
|
|
5102
|
+
}), je = (e, r) => {
|
|
5085
5103
|
const l = e.__vccOpts || e;
|
|
5086
|
-
for (const [f,
|
|
5087
|
-
l[f] =
|
|
5104
|
+
for (const [f, g] of r)
|
|
5105
|
+
l[f] = g;
|
|
5088
5106
|
return l;
|
|
5089
|
-
}, Or = {
|
|
5090
|
-
name: "DownArrowIcon"
|
|
5091
5107
|
}, Cr = {
|
|
5108
|
+
name: "DownArrowIcon"
|
|
5109
|
+
}, Ir = {
|
|
5092
5110
|
width: "1rem",
|
|
5093
5111
|
viewBox: "0 0 512 512",
|
|
5094
5112
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5095
|
-
},
|
|
5096
|
-
|
|
5113
|
+
}, kr = /* @__PURE__ */ B("path", { d: "M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z" }, null, -1), Br = [
|
|
5114
|
+
kr
|
|
5097
5115
|
];
|
|
5098
|
-
function
|
|
5099
|
-
return z(), W("svg",
|
|
5116
|
+
function $r(e, r, l, f, g, n) {
|
|
5117
|
+
return z(), W("svg", Ir, Br);
|
|
5100
5118
|
}
|
|
5101
|
-
const
|
|
5119
|
+
const mn = /* @__PURE__ */ je(Cr, [["render", $r]]), Pr = {
|
|
5102
5120
|
name: "UpArrowIcon"
|
|
5103
|
-
},
|
|
5121
|
+
}, Ur = {
|
|
5104
5122
|
width: "1rem",
|
|
5105
5123
|
viewBox: "0 0 512 512",
|
|
5106
5124
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5107
|
-
},
|
|
5108
|
-
|
|
5125
|
+
}, Hr = /* @__PURE__ */ B("path", { d: "M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z" }, null, -1), xr = [
|
|
5126
|
+
Hr
|
|
5109
5127
|
];
|
|
5110
|
-
function
|
|
5111
|
-
return z(), W("svg",
|
|
5128
|
+
function Fr(e, r, l, f, g, n) {
|
|
5129
|
+
return z(), W("svg", Ur, xr);
|
|
5112
5130
|
}
|
|
5113
|
-
const
|
|
5131
|
+
const En = /* @__PURE__ */ je(Pr, [["render", Fr]]), zr = ["theme"], Gr = {
|
|
5114
5132
|
key: 0,
|
|
5115
5133
|
class: "file-header"
|
|
5116
|
-
},
|
|
5134
|
+
}, Kr = {
|
|
5117
5135
|
key: 0,
|
|
5118
5136
|
class: "file-info"
|
|
5119
|
-
},
|
|
5137
|
+
}, Wr = { class: "info-left" }, Qr = { class: "info-left" }, Zr = { class: "diff-commandbar" }, Yr = {
|
|
5120
5138
|
key: 0,
|
|
5121
5139
|
class: "diff-stat"
|
|
5122
|
-
},
|
|
5140
|
+
}, Xr = { class: "diff-stat-added" }, Vr = { class: "diff-stat-deleted" }, jr = {
|
|
5123
5141
|
key: 1,
|
|
5124
5142
|
class: "file-info"
|
|
5125
|
-
},
|
|
5143
|
+
}, qr = { class: "info-left" }, Jr = { class: "info-right" }, ei = { style: { "margin-left": "20px" } }, ni = { class: "diff-commandbar" }, ti = {
|
|
5126
5144
|
key: 0,
|
|
5127
5145
|
class: "diff-stat"
|
|
5128
|
-
},
|
|
5146
|
+
}, ri = { class: "diff-stat-added" }, ii = { class: "diff-stat-deleted" }, xn = /* @__PURE__ */ me({
|
|
5129
5147
|
__name: "CodeDiff",
|
|
5130
5148
|
props: {
|
|
5131
5149
|
newString: {},
|
|
@@ -5147,138 +5165,140 @@ const bn = /* @__PURE__ */ Ve($r, [["render", xr]]), Fr = ["theme"], zr = {
|
|
|
5147
5165
|
},
|
|
5148
5166
|
emits: ["diff"],
|
|
5149
5167
|
setup(e, { emit: r }) {
|
|
5150
|
-
const l = e, f = r,
|
|
5151
|
-
let
|
|
5152
|
-
return
|
|
5153
|
-
`) :
|
|
5168
|
+
const l = e, f = r, g = Ee(() => l.outputFormat === "line-by-line"), n = Ee(() => {
|
|
5169
|
+
let d = l.oldString || "";
|
|
5170
|
+
return d = l.trim ? d.trim() : d, d = l.noDiffLineFeed ? d.replace(/(\r\n)/g, `
|
|
5171
|
+
`) : d, d;
|
|
5154
5172
|
}), t = Ee(() => {
|
|
5155
|
-
let
|
|
5156
|
-
return
|
|
5157
|
-
`) :
|
|
5173
|
+
let d = l.newString || "";
|
|
5174
|
+
return d = l.trim ? d.trim() : d, d = l.noDiffLineFeed ? d.replace(/(\r\n)/g, `
|
|
5175
|
+
`) : d, d;
|
|
5158
5176
|
}), i = Ee(
|
|
5159
|
-
() =>
|
|
5160
|
-
), s =
|
|
5161
|
-
function c() {
|
|
5162
|
-
const g = document.querySelectorAll(".blob-code-addition");
|
|
5163
|
-
a.value < g.length - 1 && (a.value++, d(g));
|
|
5164
|
-
}
|
|
5177
|
+
() => g.value ? hr(n.value, t.value, l.language, l.diffStyle, l.forceInlineComparison, l.context, l.ignoreMatchingLines) : gr(n.value, t.value, l.language, l.diffStyle, l.forceInlineComparison, l.context, l.ignoreMatchingLines)
|
|
5178
|
+
), s = xe(i.value), o = Ee(() => s.value.stat.additionsNum === 0 && s.value.stat.deletionsNum === 0), a = xe(-1), c = xe();
|
|
5165
5179
|
function u() {
|
|
5166
|
-
const
|
|
5167
|
-
a.value
|
|
5180
|
+
const d = c.value.querySelectorAll("[data-diff-change]");
|
|
5181
|
+
a.value < d.length - 1 && (a.value++, p(d));
|
|
5168
5182
|
}
|
|
5169
|
-
function
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
p && (p.classList.add("current-diff"), p.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
5183
|
+
function h() {
|
|
5184
|
+
const d = c.value.querySelectorAll("[data-diff-change]");
|
|
5185
|
+
a.value > 0 && (a.value--, p(d));
|
|
5173
5186
|
}
|
|
5174
|
-
|
|
5175
|
-
|
|
5187
|
+
function p(d) {
|
|
5188
|
+
c.value.querySelectorAll(".current-diff").forEach((b) => b.classList.remove("current-diff"));
|
|
5189
|
+
const _ = d[a.value];
|
|
5190
|
+
_ && (_.querySelectorAll(".blob-code").forEach((b) => b.classList.add("current-diff")), _.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
5191
|
+
}
|
|
5192
|
+
return Yn(() => l, () => {
|
|
5193
|
+
a.value = -1, s.value = i.value, f("diff", {
|
|
5176
5194
|
stat: {
|
|
5177
5195
|
isChanged: !o.value,
|
|
5178
5196
|
addNum: s.value.stat.additionsNum,
|
|
5179
5197
|
delNum: s.value.stat.deletionsNum
|
|
5180
5198
|
}
|
|
5181
5199
|
});
|
|
5182
|
-
}, { deep: !0, immediate: !0 }), (
|
|
5200
|
+
}, { deep: !0, immediate: !0 }), (d, _) => (z(), W("div", {
|
|
5201
|
+
ref_key: "root",
|
|
5202
|
+
ref: c,
|
|
5183
5203
|
class: "code-diff-view",
|
|
5184
|
-
theme:
|
|
5185
|
-
style:
|
|
5204
|
+
theme: d.theme,
|
|
5205
|
+
style: Xn({ maxHeight: d.maxHeight })
|
|
5186
5206
|
}, [
|
|
5187
|
-
|
|
5188
|
-
x(
|
|
5207
|
+
d.hideHeader ? ye("", !0) : (z(), W("div", Gr, [
|
|
5208
|
+
x(g) ? (z(), W("div", Kr, [
|
|
5189
5209
|
B("span", null, [
|
|
5190
|
-
B("div",
|
|
5191
|
-
B("div",
|
|
5210
|
+
B("div", Wr, ee(d.filename), 1),
|
|
5211
|
+
B("div", Qr, ee(d.newFilename), 1)
|
|
5192
5212
|
]),
|
|
5193
|
-
B("span",
|
|
5213
|
+
B("span", Zr, [
|
|
5194
5214
|
B("button", {
|
|
5195
5215
|
class: "command-item-button",
|
|
5196
5216
|
title: "Next Change",
|
|
5197
|
-
onClick:
|
|
5217
|
+
onClick: u
|
|
5198
5218
|
}, [
|
|
5199
|
-
Le(
|
|
5219
|
+
Le(mn)
|
|
5200
5220
|
]),
|
|
5201
5221
|
B("button", {
|
|
5202
5222
|
class: "command-item-button",
|
|
5203
5223
|
title: "Previous Change",
|
|
5204
|
-
onClick:
|
|
5224
|
+
onClick: h
|
|
5205
5225
|
}, [
|
|
5206
|
-
Le(
|
|
5226
|
+
Le(En)
|
|
5207
5227
|
])
|
|
5208
5228
|
]),
|
|
5209
|
-
|
|
5210
|
-
rn(
|
|
5229
|
+
d.hideStat ? ye("", !0) : (z(), W("span", Yr, [
|
|
5230
|
+
rn(d.$slots, "stat", {
|
|
5211
5231
|
stat: x(s).stat
|
|
5212
5232
|
}, () => [
|
|
5213
|
-
B("span",
|
|
5214
|
-
B("span",
|
|
5233
|
+
B("span", Xr, "+" + ee(x(s).stat.additionsNum) + " additions", 1),
|
|
5234
|
+
B("span", Vr, "-" + ee(x(s).stat.deletionsNum) + " deletions", 1)
|
|
5215
5235
|
])
|
|
5216
5236
|
]))
|
|
5217
|
-
])) : (z(), W("div",
|
|
5218
|
-
B("span",
|
|
5219
|
-
B("span",
|
|
5220
|
-
B("span",
|
|
5221
|
-
B("span",
|
|
5237
|
+
])) : (z(), W("div", jr, [
|
|
5238
|
+
B("span", qr, ee(d.filename), 1),
|
|
5239
|
+
B("span", Jr, [
|
|
5240
|
+
B("span", ei, ee(d.newFilename), 1),
|
|
5241
|
+
B("span", ni, [
|
|
5222
5242
|
B("button", {
|
|
5223
5243
|
class: "command-item-button",
|
|
5224
5244
|
title: "Next Change",
|
|
5225
|
-
onClick:
|
|
5245
|
+
onClick: u
|
|
5226
5246
|
}, [
|
|
5227
|
-
Le(
|
|
5247
|
+
Le(mn)
|
|
5228
5248
|
]),
|
|
5229
5249
|
B("button", {
|
|
5230
5250
|
class: "command-item-button",
|
|
5231
5251
|
title: "Previous Change",
|
|
5232
|
-
onClick:
|
|
5252
|
+
onClick: h
|
|
5233
5253
|
}, [
|
|
5234
|
-
Le(
|
|
5254
|
+
Le(En)
|
|
5235
5255
|
])
|
|
5236
5256
|
]),
|
|
5237
|
-
|
|
5238
|
-
rn(
|
|
5257
|
+
d.hideStat ? ye("", !0) : (z(), W("span", ti, [
|
|
5258
|
+
rn(d.$slots, "stat", {
|
|
5239
5259
|
stat: x(s).stat
|
|
5240
5260
|
}, () => [
|
|
5241
|
-
B("span",
|
|
5242
|
-
B("span",
|
|
5261
|
+
B("span", ri, "+" + ee(x(s).stat.additionsNum) + " additions", 1),
|
|
5262
|
+
B("span", ii, "-" + ee(x(s).stat.deletionsNum) + " deletions", 1)
|
|
5243
5263
|
])
|
|
5244
5264
|
]))
|
|
5245
5265
|
])
|
|
5246
5266
|
]))
|
|
5247
5267
|
])),
|
|
5248
|
-
x(
|
|
5268
|
+
x(g) ? (z(), we(vr, {
|
|
5249
5269
|
key: 1,
|
|
5250
5270
|
"diff-change": x(s)
|
|
5251
|
-
}, null, 8, ["diff-change"])) : (z(),
|
|
5271
|
+
}, null, 8, ["diff-change"])) : (z(), we(Or, {
|
|
5252
5272
|
key: 2,
|
|
5253
5273
|
"diff-change": x(s)
|
|
5254
5274
|
}, null, 8, ["diff-change"]))
|
|
5255
|
-
], 12,
|
|
5275
|
+
], 12, zr));
|
|
5256
5276
|
}
|
|
5257
|
-
}),
|
|
5277
|
+
}), si = /* @__PURE__ */ me({
|
|
5258
5278
|
__name: "CodeReader",
|
|
5259
5279
|
props: {
|
|
5260
5280
|
language: { default: "plaintext" },
|
|
5261
5281
|
text: {}
|
|
5262
5282
|
},
|
|
5263
5283
|
setup(e) {
|
|
5264
|
-
return (r, l) => (z(),
|
|
5284
|
+
return (r, l) => (z(), we(xn, {
|
|
5265
5285
|
"hide-header": "",
|
|
5266
5286
|
language: r.language,
|
|
5267
5287
|
"old-string": r.text,
|
|
5268
5288
|
"new-string": r.text
|
|
5269
5289
|
}, null, 8, ["language", "old-string", "new-string"]));
|
|
5270
5290
|
}
|
|
5271
|
-
}),
|
|
5272
|
-
function
|
|
5273
|
-
e.component("CodeDiff",
|
|
5291
|
+
}), ai = /* @__PURE__ */ je(si, [["__scopeId", "data-v-0c5adc58"]]);
|
|
5292
|
+
function oi(e) {
|
|
5293
|
+
e.component("CodeDiff", xn), e.component("CodeReader", ai);
|
|
5274
5294
|
}
|
|
5275
|
-
const
|
|
5276
|
-
install:
|
|
5295
|
+
const ci = {
|
|
5296
|
+
install: oi,
|
|
5277
5297
|
hljs: q
|
|
5278
5298
|
};
|
|
5279
5299
|
export {
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5300
|
+
xn as CodeDiff,
|
|
5301
|
+
ai as CodeReader,
|
|
5302
|
+
ci as default,
|
|
5283
5303
|
q as hljs
|
|
5284
5304
|
};
|