v-code-diff 1.13.2 → 1.14.1
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 +51 -55
- package/dist/v2/index.cjs +28 -19
- package/dist/v2/index.es.js +1609 -1506
- package/dist/v2/index.umd.js +28 -19
- package/dist/v2.7/index.cjs +28 -19
- package/dist/v2.7/index.es.js +1434 -1377
- package/dist/v2.7/index.umd.js +28 -19
- package/dist/v3/index.cjs +28 -19
- package/dist/v3/index.es.js +1634 -1555
- package/dist/v3/index.umd.js +28 -19
- package/package.json +7 -2
- package/src/CodeDiff.vue +4 -4
- package/src/split/SplitViewer.vue +34 -2
- package/src/style.scss +18 -0
- package/src/types.ts +2 -0
- package/src/unified/UnifiedViewer.vue +34 -2
- package/src/utils.ts +153 -55
- package/types/index.d.ts +60 -12
package/dist/v2.7/index.es.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
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
|
|
3
|
-
|
|
4
|
-
function
|
|
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 .diff-table .load-more{padding:8px;text-align:center}.code-diff-view .diff-table .load-more-button{padding:4px 12px;color:var(--color-accent-fg);background:transparent;border:1px solid var(--color-border-default);border-radius:4px;cursor:pointer}.code-diff-view .diff-table .load-more-button:hover{background-color:var(--color-accent-muted)}.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 Un, { defineComponent as de, ref as Me, shallowRef as Pe, computed as X, watch as Ue } from "vue";
|
|
3
|
+
Un.util.warn;
|
|
4
|
+
function te() {
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
te.prototype = {
|
|
7
7
|
diff: function(e, s) {
|
|
8
|
-
var u,
|
|
9
|
-
typeof
|
|
10
|
-
var
|
|
11
|
-
function
|
|
8
|
+
var u, g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = g.callback;
|
|
9
|
+
typeof g == "function" && (t = g, g = {}), this.options = g;
|
|
10
|
+
var i = this;
|
|
11
|
+
function r(y) {
|
|
12
12
|
return t ? (setTimeout(function() {
|
|
13
13
|
t(void 0, y);
|
|
14
14
|
}, 0), !0) : y;
|
|
15
15
|
}
|
|
16
16
|
e = this.castInput(e), s = this.castInput(s), e = this.removeEmpty(this.tokenize(e)), s = this.removeEmpty(this.tokenize(s));
|
|
17
|
-
var a = s.length,
|
|
18
|
-
|
|
19
|
-
var f = (u =
|
|
17
|
+
var a = s.length, l = e.length, o = 1, c = a + l;
|
|
18
|
+
g.maxEditLength && (c = Math.min(c, g.maxEditLength));
|
|
19
|
+
var f = (u = g.timeout) !== null && u !== void 0 ? u : 1 / 0, d = Date.now() + f, h = [{
|
|
20
20
|
oldPos: -1,
|
|
21
21
|
lastComponent: void 0
|
|
22
|
-
}], p = this.extractCommon(
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
22
|
+
}], p = this.extractCommon(h[0], s, e, 0);
|
|
23
|
+
if (h[0].oldPos + 1 >= l && p + 1 >= a)
|
|
24
|
+
return r([{
|
|
25
25
|
value: this.join(s),
|
|
26
26
|
count: s.length
|
|
27
27
|
}]);
|
|
28
|
-
var _ = -1 / 0,
|
|
29
|
-
function
|
|
30
|
-
for (var y = Math.max(_, -
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
if (
|
|
35
|
-
var
|
|
36
|
-
|
|
28
|
+
var _ = -1 / 0, m = 1 / 0;
|
|
29
|
+
function v() {
|
|
30
|
+
for (var y = Math.max(_, -o); y <= Math.min(m, o); y += 2) {
|
|
31
|
+
var T = void 0, M = h[y - 1], D = h[y + 1];
|
|
32
|
+
M && (h[y - 1] = void 0);
|
|
33
|
+
var k = !1;
|
|
34
|
+
if (D) {
|
|
35
|
+
var N = D.oldPos - y;
|
|
36
|
+
k = D && 0 <= N && N < a;
|
|
37
37
|
}
|
|
38
|
-
var L =
|
|
39
|
-
if (!
|
|
40
|
-
|
|
38
|
+
var L = M && M.oldPos + 1 < l;
|
|
39
|
+
if (!k && !L) {
|
|
40
|
+
h[y] = void 0;
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
|
-
if (!L ||
|
|
44
|
-
return
|
|
45
|
-
|
|
43
|
+
if (!L || k && M.oldPos + 1 < D.oldPos ? T = i.addToPath(D, !0, void 0, 0) : T = i.addToPath(M, void 0, !0, 1), p = i.extractCommon(T, s, e, y), T.oldPos + 1 >= l && p + 1 >= a)
|
|
44
|
+
return r(Fn(i, T.lastComponent, s, e, i.useLongestToken));
|
|
45
|
+
h[y] = T, T.oldPos + 1 >= l && (m = Math.min(m, y - 1)), p + 1 >= a && (_ = Math.max(_, y + 1));
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
o++;
|
|
48
48
|
}
|
|
49
49
|
if (t)
|
|
50
50
|
(function y() {
|
|
51
51
|
setTimeout(function() {
|
|
52
|
-
if (
|
|
52
|
+
if (o > c || Date.now() > d)
|
|
53
53
|
return t();
|
|
54
|
-
|
|
54
|
+
v() || y();
|
|
55
55
|
}, 0);
|
|
56
56
|
})();
|
|
57
57
|
else
|
|
58
|
-
for (;
|
|
59
|
-
var E =
|
|
58
|
+
for (; o <= c && Date.now() <= d; ) {
|
|
59
|
+
var E = v();
|
|
60
60
|
if (E)
|
|
61
61
|
return E;
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
addToPath: function(e, s, u,
|
|
64
|
+
addToPath: function(e, s, u, g) {
|
|
65
65
|
var t = e.lastComponent;
|
|
66
66
|
return t && t.added === s && t.removed === u ? {
|
|
67
|
-
oldPos: e.oldPos +
|
|
67
|
+
oldPos: e.oldPos + g,
|
|
68
68
|
lastComponent: {
|
|
69
69
|
count: t.count + 1,
|
|
70
70
|
added: s,
|
|
@@ -72,7 +72,7 @@ ne.prototype = {
|
|
|
72
72
|
previousComponent: t.previousComponent
|
|
73
73
|
}
|
|
74
74
|
} : {
|
|
75
|
-
oldPos: e.oldPos +
|
|
75
|
+
oldPos: e.oldPos + g,
|
|
76
76
|
lastComponent: {
|
|
77
77
|
count: 1,
|
|
78
78
|
added: s,
|
|
@@ -81,13 +81,13 @@ ne.prototype = {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
},
|
|
84
|
-
extractCommon: function(e, s, u,
|
|
85
|
-
for (var t = s.length,
|
|
86
|
-
a++,
|
|
87
|
-
return
|
|
88
|
-
count:
|
|
84
|
+
extractCommon: function(e, s, u, g) {
|
|
85
|
+
for (var t = s.length, i = u.length, r = e.oldPos, a = r - g, l = 0; a + 1 < t && r + 1 < i && this.equals(s[a + 1], u[r + 1]); )
|
|
86
|
+
a++, r++, l++;
|
|
87
|
+
return l && (e.lastComponent = {
|
|
88
|
+
count: l,
|
|
89
89
|
previousComponent: e.lastComponent
|
|
90
|
-
}), e.oldPos =
|
|
90
|
+
}), e.oldPos = r, a;
|
|
91
91
|
},
|
|
92
92
|
equals: function(e, s) {
|
|
93
93
|
return this.options.comparator ? this.options.comparator(e, s) : e === s || this.options.ignoreCase && e.toLowerCase() === s.toLowerCase();
|
|
@@ -107,37 +107,37 @@ ne.prototype = {
|
|
|
107
107
|
return e.join("");
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
-
function
|
|
111
|
-
for (var t = [],
|
|
112
|
-
t.push(e),
|
|
110
|
+
function Fn(n, e, s, u, g) {
|
|
111
|
+
for (var t = [], i; e; )
|
|
112
|
+
t.push(e), i = e.previousComponent, delete e.previousComponent, e = i;
|
|
113
113
|
t.reverse();
|
|
114
|
-
for (var
|
|
115
|
-
var c = t[
|
|
114
|
+
for (var r = 0, a = t.length, l = 0, o = 0; r < a; r++) {
|
|
115
|
+
var c = t[r];
|
|
116
116
|
if (c.removed) {
|
|
117
|
-
if (c.value = n.join(u.slice(
|
|
118
|
-
var d = t[
|
|
119
|
-
t[
|
|
117
|
+
if (c.value = n.join(u.slice(o, o + c.count)), o += c.count, r && t[r - 1].added) {
|
|
118
|
+
var d = t[r - 1];
|
|
119
|
+
t[r - 1] = t[r], t[r] = d;
|
|
120
120
|
}
|
|
121
121
|
} else {
|
|
122
|
-
if (!c.added &&
|
|
123
|
-
var f = s.slice(
|
|
122
|
+
if (!c.added && g) {
|
|
123
|
+
var f = s.slice(l, l + c.count);
|
|
124
124
|
f = f.map(function(p, _) {
|
|
125
|
-
var
|
|
126
|
-
return
|
|
125
|
+
var m = u[o + _];
|
|
126
|
+
return m.length > p.length ? m : p;
|
|
127
127
|
}), c.value = n.join(f);
|
|
128
128
|
} else
|
|
129
|
-
c.value = n.join(s.slice(
|
|
130
|
-
|
|
129
|
+
c.value = n.join(s.slice(l, l + c.count));
|
|
130
|
+
l += c.count, c.added || (o += c.count);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
134
|
-
return a > 1 && typeof
|
|
133
|
+
var h = t[a - 1];
|
|
134
|
+
return a > 1 && typeof h.value == "string" && (h.added || h.removed) && n.equals("", h.value) && (t[a - 2].value += h.value, t.pop()), t;
|
|
135
135
|
}
|
|
136
|
-
var
|
|
137
|
-
function
|
|
138
|
-
return
|
|
136
|
+
var zn = new te();
|
|
137
|
+
function Hn(n, e, s) {
|
|
138
|
+
return zn.diff(n, e, s);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Gn(n, e) {
|
|
141
141
|
if (typeof n == "function")
|
|
142
142
|
e.callback = n;
|
|
143
143
|
else if (n)
|
|
@@ -145,38 +145,41 @@ function xn(n, e) {
|
|
|
145
145
|
n.hasOwnProperty(s) && (e[s] = n[s]);
|
|
146
146
|
return e;
|
|
147
147
|
}
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
return this.options.ignoreCase && (n = n.toLowerCase(), e = e.toLowerCase()), n === e || this.options.ignoreWhitespace && !
|
|
148
|
+
var je = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, qe = /\S/, Fe = new te();
|
|
149
|
+
Fe.equals = function(n, e) {
|
|
150
|
+
return this.options.ignoreCase && (n = n.toLowerCase(), e = e.toLowerCase()), n === e || this.options.ignoreWhitespace && !qe.test(n) && !qe.test(e);
|
|
151
151
|
};
|
|
152
|
-
|
|
152
|
+
Fe.tokenize = function(n) {
|
|
153
153
|
for (var e = n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), s = 0; s < e.length - 1; s++)
|
|
154
|
-
!e[s + 1] && e[s + 2] &&
|
|
154
|
+
!e[s + 1] && e[s + 2] && je.test(e[s]) && je.test(e[s + 2]) && (e[s] += e[s + 2], e.splice(s + 1, 2), s--);
|
|
155
155
|
return e;
|
|
156
156
|
};
|
|
157
|
-
function
|
|
158
|
-
return s =
|
|
157
|
+
function Kn(n, e, s) {
|
|
158
|
+
return s = Gn(s, {
|
|
159
159
|
ignoreWhitespace: !0
|
|
160
|
-
}),
|
|
160
|
+
}), Fe.diff(n, e, s);
|
|
161
161
|
}
|
|
162
|
-
var
|
|
163
|
-
|
|
162
|
+
var ze = new te();
|
|
163
|
+
ze.tokenize = function(n) {
|
|
164
164
|
this.options.stripTrailingCr && (n = n.replace(/\r\n/g, `
|
|
165
165
|
`));
|
|
166
166
|
var e = [], s = n.split(/(\n|\r\n)/);
|
|
167
167
|
s[s.length - 1] || s.pop();
|
|
168
168
|
for (var u = 0; u < s.length; u++) {
|
|
169
|
-
var
|
|
170
|
-
u % 2 && !this.options.newlineIsToken ? e[e.length - 1] +=
|
|
169
|
+
var g = s[u];
|
|
170
|
+
u % 2 && !this.options.newlineIsToken ? e[e.length - 1] += g : (this.options.ignoreWhitespace && (g = g.trim()), e.push(g));
|
|
171
171
|
}
|
|
172
172
|
return e;
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
function Wn(n, e, s) {
|
|
175
|
+
return ze.diff(n, e, s);
|
|
176
|
+
}
|
|
177
|
+
var Qn = new te();
|
|
178
|
+
Qn.tokenize = function(n) {
|
|
176
179
|
return n.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
177
180
|
};
|
|
178
|
-
var
|
|
179
|
-
|
|
181
|
+
var Zn = new te();
|
|
182
|
+
Zn.tokenize = function(n) {
|
|
180
183
|
return n.split(/([{}:;,]|\s+)/);
|
|
181
184
|
};
|
|
182
185
|
function Ne(n) {
|
|
@@ -187,421 +190,421 @@ function Ne(n) {
|
|
|
187
190
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
188
191
|
}, Ne(n);
|
|
189
192
|
}
|
|
190
|
-
var
|
|
193
|
+
var Yn = Object.prototype.toString, pe = new te();
|
|
191
194
|
pe.useLongestToken = !0;
|
|
192
|
-
pe.tokenize =
|
|
195
|
+
pe.tokenize = ze.tokenize;
|
|
193
196
|
pe.castInput = function(n) {
|
|
194
|
-
var e = this.options, s = e.undefinedReplacement, u = e.stringifyReplacer,
|
|
195
|
-
return typeof
|
|
197
|
+
var e = this.options, s = e.undefinedReplacement, u = e.stringifyReplacer, g = u === void 0 ? function(t, i) {
|
|
198
|
+
return typeof i == "undefined" ? s : i;
|
|
196
199
|
} : u;
|
|
197
|
-
return typeof n == "string" ? n : JSON.stringify(
|
|
200
|
+
return typeof n == "string" ? n : JSON.stringify(Ie(n, null, null, g), g, " ");
|
|
198
201
|
};
|
|
199
202
|
pe.equals = function(n, e) {
|
|
200
|
-
return
|
|
203
|
+
return te.prototype.equals.call(pe, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
|
|
201
204
|
};
|
|
202
|
-
function
|
|
203
|
-
e = e || [], s = s || [], u && (n = u(
|
|
205
|
+
function Ie(n, e, s, u, g) {
|
|
206
|
+
e = e || [], s = s || [], u && (n = u(g, n));
|
|
204
207
|
var t;
|
|
205
208
|
for (t = 0; t < e.length; t += 1)
|
|
206
209
|
if (e[t] === n)
|
|
207
210
|
return s[t];
|
|
208
|
-
var
|
|
209
|
-
if (
|
|
210
|
-
for (e.push(n),
|
|
211
|
-
|
|
212
|
-
return e.pop(), s.pop(),
|
|
211
|
+
var i;
|
|
212
|
+
if (Yn.call(n) === "[object Array]") {
|
|
213
|
+
for (e.push(n), i = new Array(n.length), s.push(i), t = 0; t < n.length; t += 1)
|
|
214
|
+
i[t] = Ie(n[t], e, s, u, g);
|
|
215
|
+
return e.pop(), s.pop(), i;
|
|
213
216
|
}
|
|
214
217
|
if (n && n.toJSON && (n = n.toJSON()), Ne(n) === "object" && n !== null) {
|
|
215
|
-
e.push(n),
|
|
216
|
-
var
|
|
218
|
+
e.push(n), i = {}, s.push(i);
|
|
219
|
+
var r = [], a;
|
|
217
220
|
for (a in n)
|
|
218
|
-
n.hasOwnProperty(a) &&
|
|
219
|
-
for (
|
|
220
|
-
a =
|
|
221
|
+
n.hasOwnProperty(a) && r.push(a);
|
|
222
|
+
for (r.sort(), t = 0; t < r.length; t += 1)
|
|
223
|
+
a = r[t], i[a] = Ie(n[a], e, s, u, a);
|
|
221
224
|
e.pop(), s.pop();
|
|
222
225
|
} else
|
|
223
|
-
|
|
224
|
-
return
|
|
226
|
+
i = n;
|
|
227
|
+
return i;
|
|
225
228
|
}
|
|
226
|
-
var
|
|
227
|
-
|
|
229
|
+
var ke = new te();
|
|
230
|
+
ke.tokenize = function(n) {
|
|
228
231
|
return n.slice();
|
|
229
232
|
};
|
|
230
|
-
|
|
233
|
+
ke.join = ke.removeEmpty = function(n) {
|
|
231
234
|
return n;
|
|
232
235
|
};
|
|
233
|
-
function
|
|
236
|
+
function Vn(n) {
|
|
234
237
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
235
238
|
}
|
|
236
|
-
var
|
|
239
|
+
var fn = { exports: {} };
|
|
237
240
|
(function(n) {
|
|
238
241
|
var e = function() {
|
|
239
242
|
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;
|
|
240
|
-
}, s = -1, u = 1,
|
|
241
|
-
e.Diff = function(t,
|
|
242
|
-
return [t,
|
|
243
|
-
}, e.prototype.diff_main = function(t,
|
|
243
|
+
}, s = -1, u = 1, g = 0;
|
|
244
|
+
e.Diff = function(t, i) {
|
|
245
|
+
return [t, i];
|
|
246
|
+
}, e.prototype.diff_main = function(t, i, r, a) {
|
|
244
247
|
typeof a == "undefined" && (this.Diff_Timeout <= 0 ? a = Number.MAX_VALUE : a = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
|
|
245
|
-
var
|
|
246
|
-
if (t == null ||
|
|
248
|
+
var l = a;
|
|
249
|
+
if (t == null || i == null)
|
|
247
250
|
throw new Error("Null input. (diff_main)");
|
|
248
|
-
if (t ==
|
|
249
|
-
return t ? [new e.Diff(
|
|
250
|
-
typeof
|
|
251
|
-
var
|
|
252
|
-
t = t.substring(c),
|
|
251
|
+
if (t == i)
|
|
252
|
+
return t ? [new e.Diff(g, t)] : [];
|
|
253
|
+
typeof r == "undefined" && (r = !0);
|
|
254
|
+
var o = r, c = this.diff_commonPrefix(t, i), f = t.substring(0, c);
|
|
255
|
+
t = t.substring(c), i = i.substring(c), c = this.diff_commonSuffix(t, i);
|
|
253
256
|
var d = t.substring(t.length - c);
|
|
254
|
-
t = t.substring(0, t.length - c),
|
|
255
|
-
var
|
|
256
|
-
return f &&
|
|
257
|
-
}, e.prototype.diff_compute_ = function(t,
|
|
258
|
-
var
|
|
257
|
+
t = t.substring(0, t.length - c), i = i.substring(0, i.length - c);
|
|
258
|
+
var h = this.diff_compute_(t, i, o, l);
|
|
259
|
+
return f && h.unshift(new e.Diff(g, f)), d && h.push(new e.Diff(g, d)), this.diff_cleanupMerge(h), h;
|
|
260
|
+
}, e.prototype.diff_compute_ = function(t, i, r, a) {
|
|
261
|
+
var l;
|
|
259
262
|
if (!t)
|
|
260
|
-
return [new e.Diff(u,
|
|
261
|
-
if (!
|
|
263
|
+
return [new e.Diff(u, i)];
|
|
264
|
+
if (!i)
|
|
262
265
|
return [new e.Diff(s, t)];
|
|
263
|
-
var
|
|
266
|
+
var o = t.length > i.length ? t : i, c = t.length > i.length ? i : t, f = o.indexOf(c);
|
|
264
267
|
if (f != -1)
|
|
265
|
-
return
|
|
266
|
-
new e.Diff(u,
|
|
267
|
-
new e.Diff(
|
|
268
|
+
return l = [
|
|
269
|
+
new e.Diff(u, o.substring(0, f)),
|
|
270
|
+
new e.Diff(g, c),
|
|
268
271
|
new e.Diff(
|
|
269
272
|
u,
|
|
270
|
-
|
|
273
|
+
o.substring(f + c.length)
|
|
271
274
|
)
|
|
272
|
-
], t.length >
|
|
275
|
+
], t.length > i.length && (l[0][0] = l[2][0] = s), l;
|
|
273
276
|
if (c.length == 1)
|
|
274
277
|
return [
|
|
275
278
|
new e.Diff(s, t),
|
|
276
|
-
new e.Diff(u,
|
|
279
|
+
new e.Diff(u, i)
|
|
277
280
|
];
|
|
278
|
-
var d = this.diff_halfMatch_(t,
|
|
281
|
+
var d = this.diff_halfMatch_(t, i);
|
|
279
282
|
if (d) {
|
|
280
|
-
var
|
|
283
|
+
var h = d[0], p = d[1], _ = d[2], m = d[3], v = d[4], E = this.diff_main(h, _, r, a), y = this.diff_main(p, m, r, a);
|
|
281
284
|
return E.concat(
|
|
282
|
-
[new e.Diff(
|
|
285
|
+
[new e.Diff(g, v)],
|
|
283
286
|
y
|
|
284
287
|
);
|
|
285
288
|
}
|
|
286
|
-
return
|
|
287
|
-
}, e.prototype.diff_lineMode_ = function(t,
|
|
288
|
-
var a = this.diff_linesToChars_(t,
|
|
289
|
-
t = a.chars1,
|
|
290
|
-
var
|
|
291
|
-
this.diff_charsToLines_(
|
|
292
|
-
for (var c = 0, f = 0, d = 0,
|
|
293
|
-
switch (
|
|
289
|
+
return r && t.length > 100 && i.length > 100 ? this.diff_lineMode_(t, i, a) : this.diff_bisect_(t, i, a);
|
|
290
|
+
}, e.prototype.diff_lineMode_ = function(t, i, r) {
|
|
291
|
+
var a = this.diff_linesToChars_(t, i);
|
|
292
|
+
t = a.chars1, i = a.chars2;
|
|
293
|
+
var l = a.lineArray, o = this.diff_main(t, i, !1, r);
|
|
294
|
+
this.diff_charsToLines_(o, l), this.diff_cleanupSemantic(o), o.push(new e.Diff(g, ""));
|
|
295
|
+
for (var c = 0, f = 0, d = 0, h = "", p = ""; c < o.length; ) {
|
|
296
|
+
switch (o[c][0]) {
|
|
294
297
|
case u:
|
|
295
|
-
d++, p +=
|
|
298
|
+
d++, p += o[c][1];
|
|
296
299
|
break;
|
|
297
300
|
case s:
|
|
298
|
-
f++,
|
|
301
|
+
f++, h += o[c][1];
|
|
299
302
|
break;
|
|
300
|
-
case
|
|
303
|
+
case g:
|
|
301
304
|
if (f >= 1 && d >= 1) {
|
|
302
|
-
|
|
305
|
+
o.splice(
|
|
303
306
|
c - f - d,
|
|
304
307
|
f + d
|
|
305
308
|
), c = c - f - d;
|
|
306
|
-
for (var _ = this.diff_main(
|
|
307
|
-
|
|
309
|
+
for (var _ = this.diff_main(h, p, !1, r), m = _.length - 1; m >= 0; m--)
|
|
310
|
+
o.splice(c, 0, _[m]);
|
|
308
311
|
c = c + _.length;
|
|
309
312
|
}
|
|
310
|
-
d = 0, f = 0,
|
|
313
|
+
d = 0, f = 0, h = "", p = "";
|
|
311
314
|
break;
|
|
312
315
|
}
|
|
313
316
|
c++;
|
|
314
317
|
}
|
|
315
|
-
return
|
|
316
|
-
}, e.prototype.diff_bisect_ = function(t,
|
|
317
|
-
for (var a = t.length,
|
|
318
|
-
d[p] = -1,
|
|
319
|
-
d[c + 1] = 0,
|
|
320
|
-
for (var _ = a -
|
|
321
|
-
for (var
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
for (var L =
|
|
325
|
-
|
|
326
|
-
if (d[
|
|
318
|
+
return o.pop(), o;
|
|
319
|
+
}, e.prototype.diff_bisect_ = function(t, i, r) {
|
|
320
|
+
for (var a = t.length, l = i.length, o = Math.ceil((a + l) / 2), c = o, f = 2 * o, d = new Array(f), h = new Array(f), p = 0; p < f; p++)
|
|
321
|
+
d[p] = -1, h[p] = -1;
|
|
322
|
+
d[c + 1] = 0, h[c + 1] = 0;
|
|
323
|
+
for (var _ = a - l, m = _ % 2 != 0, v = 0, E = 0, y = 0, T = 0, M = 0; M < o && !((/* @__PURE__ */ new Date()).getTime() > r); M++) {
|
|
324
|
+
for (var D = -M + v; D <= M - E; D += 2) {
|
|
325
|
+
var k = c + D, N;
|
|
326
|
+
D == -M || D != M && d[k - 1] < d[k + 1] ? N = d[k + 1] : N = d[k - 1] + 1;
|
|
327
|
+
for (var L = N - D; N < a && L < l && t.charAt(N) == i.charAt(L); )
|
|
328
|
+
N++, L++;
|
|
329
|
+
if (d[k] = N, N > a)
|
|
327
330
|
E += 2;
|
|
328
|
-
else if (L >
|
|
329
|
-
|
|
330
|
-
else if (
|
|
331
|
-
var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
334
|
-
if (
|
|
335
|
-
return this.diff_bisectSplit_(t,
|
|
331
|
+
else if (L > l)
|
|
332
|
+
v += 2;
|
|
333
|
+
else if (m) {
|
|
334
|
+
var B = c + _ - D;
|
|
335
|
+
if (B >= 0 && B < f && h[B] != -1) {
|
|
336
|
+
var x = a - h[B];
|
|
337
|
+
if (N >= x)
|
|
338
|
+
return this.diff_bisectSplit_(t, i, N, L, r);
|
|
336
339
|
}
|
|
337
340
|
}
|
|
338
341
|
}
|
|
339
|
-
for (var
|
|
340
|
-
var
|
|
341
|
-
|
|
342
|
-
for (var K =
|
|
343
|
-
|
|
344
|
-
if (
|
|
345
|
-
|
|
346
|
-
else if (K >
|
|
342
|
+
for (var z = -M + y; z <= M - T; z += 2) {
|
|
343
|
+
var B = c + z, x;
|
|
344
|
+
z == -M || z != M && h[B - 1] < h[B + 1] ? x = h[B + 1] : x = h[B - 1] + 1;
|
|
345
|
+
for (var K = x - z; x < a && K < l && t.charAt(a - x - 1) == i.charAt(l - K - 1); )
|
|
346
|
+
x++, K++;
|
|
347
|
+
if (h[B] = x, x > a)
|
|
348
|
+
T += 2;
|
|
349
|
+
else if (K > l)
|
|
347
350
|
y += 2;
|
|
348
|
-
else if (!
|
|
349
|
-
var
|
|
350
|
-
if (
|
|
351
|
-
var
|
|
352
|
-
if (
|
|
353
|
-
return this.diff_bisectSplit_(t,
|
|
351
|
+
else if (!m) {
|
|
352
|
+
var k = c + _ - z;
|
|
353
|
+
if (k >= 0 && k < f && d[k] != -1) {
|
|
354
|
+
var N = d[k], L = c + N - k;
|
|
355
|
+
if (x = a - x, N >= x)
|
|
356
|
+
return this.diff_bisectSplit_(t, i, N, L, r);
|
|
354
357
|
}
|
|
355
358
|
}
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
return [
|
|
359
362
|
new e.Diff(s, t),
|
|
360
|
-
new e.Diff(u,
|
|
363
|
+
new e.Diff(u, i)
|
|
361
364
|
];
|
|
362
|
-
}, e.prototype.diff_bisectSplit_ = function(t,
|
|
363
|
-
var
|
|
364
|
-
return
|
|
365
|
-
}, e.prototype.diff_linesToChars_ = function(t,
|
|
366
|
-
var
|
|
367
|
-
|
|
368
|
-
function
|
|
369
|
-
for (var
|
|
365
|
+
}, e.prototype.diff_bisectSplit_ = function(t, i, r, a, l) {
|
|
366
|
+
var o = t.substring(0, r), c = i.substring(0, a), f = t.substring(r), d = i.substring(a), h = this.diff_main(o, c, !1, l), p = this.diff_main(f, d, !1, l);
|
|
367
|
+
return h.concat(p);
|
|
368
|
+
}, e.prototype.diff_linesToChars_ = function(t, i) {
|
|
369
|
+
var r = [], a = {};
|
|
370
|
+
r[0] = "";
|
|
371
|
+
function l(d) {
|
|
372
|
+
for (var h = "", p = 0, _ = -1, m = r.length; _ < d.length - 1; ) {
|
|
370
373
|
_ = d.indexOf(`
|
|
371
374
|
`, p), _ == -1 && (_ = d.length - 1);
|
|
372
|
-
var
|
|
373
|
-
(a.hasOwnProperty ? a.hasOwnProperty(
|
|
375
|
+
var v = d.substring(p, _ + 1);
|
|
376
|
+
(a.hasOwnProperty ? a.hasOwnProperty(v) : a[v] !== void 0) ? h += String.fromCharCode(a[v]) : (m == o && (v = d.substring(p), _ = d.length), h += String.fromCharCode(m), a[v] = m, r[m++] = v), p = _ + 1;
|
|
374
377
|
}
|
|
375
|
-
return
|
|
378
|
+
return h;
|
|
376
379
|
}
|
|
377
|
-
var
|
|
378
|
-
|
|
379
|
-
var f =
|
|
380
|
-
return { chars1: c, chars2: f, lineArray:
|
|
381
|
-
}, e.prototype.diff_charsToLines_ = function(t,
|
|
382
|
-
for (var
|
|
383
|
-
for (var a = t[
|
|
384
|
-
o
|
|
385
|
-
t[
|
|
380
|
+
var o = 4e4, c = l(t);
|
|
381
|
+
o = 65535;
|
|
382
|
+
var f = l(i);
|
|
383
|
+
return { chars1: c, chars2: f, lineArray: r };
|
|
384
|
+
}, e.prototype.diff_charsToLines_ = function(t, i) {
|
|
385
|
+
for (var r = 0; r < t.length; r++) {
|
|
386
|
+
for (var a = t[r][1], l = [], o = 0; o < a.length; o++)
|
|
387
|
+
l[o] = i[a.charCodeAt(o)];
|
|
388
|
+
t[r][1] = l.join("");
|
|
386
389
|
}
|
|
387
|
-
}, e.prototype.diff_commonPrefix = function(t,
|
|
388
|
-
if (!t || !
|
|
390
|
+
}, e.prototype.diff_commonPrefix = function(t, i) {
|
|
391
|
+
if (!t || !i || t.charAt(0) != i.charAt(0))
|
|
389
392
|
return 0;
|
|
390
|
-
for (var
|
|
391
|
-
t.substring(
|
|
392
|
-
return
|
|
393
|
-
}, e.prototype.diff_commonSuffix = function(t,
|
|
394
|
-
if (!t || !
|
|
393
|
+
for (var r = 0, a = Math.min(t.length, i.length), l = a, o = 0; r < l; )
|
|
394
|
+
t.substring(o, l) == i.substring(o, l) ? (r = l, o = r) : a = l, l = Math.floor((a - r) / 2 + r);
|
|
395
|
+
return l;
|
|
396
|
+
}, e.prototype.diff_commonSuffix = function(t, i) {
|
|
397
|
+
if (!t || !i || t.charAt(t.length - 1) != i.charAt(i.length - 1))
|
|
395
398
|
return 0;
|
|
396
|
-
for (var
|
|
397
|
-
t.substring(t.length -
|
|
398
|
-
return
|
|
399
|
-
}, e.prototype.diff_commonOverlap_ = function(t,
|
|
400
|
-
var
|
|
401
|
-
if (
|
|
399
|
+
for (var r = 0, a = Math.min(t.length, i.length), l = a, o = 0; r < l; )
|
|
400
|
+
t.substring(t.length - l, t.length - o) == i.substring(i.length - l, i.length - o) ? (r = l, o = r) : a = l, l = Math.floor((a - r) / 2 + r);
|
|
401
|
+
return l;
|
|
402
|
+
}, e.prototype.diff_commonOverlap_ = function(t, i) {
|
|
403
|
+
var r = t.length, a = i.length;
|
|
404
|
+
if (r == 0 || a == 0)
|
|
402
405
|
return 0;
|
|
403
|
-
|
|
404
|
-
var
|
|
405
|
-
if (t ==
|
|
406
|
-
return
|
|
407
|
-
for (var
|
|
408
|
-
var f = t.substring(
|
|
406
|
+
r > a ? t = t.substring(r - a) : r < a && (i = i.substring(0, r));
|
|
407
|
+
var l = Math.min(r, a);
|
|
408
|
+
if (t == i)
|
|
409
|
+
return l;
|
|
410
|
+
for (var o = 0, c = 1; ; ) {
|
|
411
|
+
var f = t.substring(l - c), d = i.indexOf(f);
|
|
409
412
|
if (d == -1)
|
|
410
|
-
return
|
|
411
|
-
c += d, (d == 0 || t.substring(
|
|
413
|
+
return o;
|
|
414
|
+
c += d, (d == 0 || t.substring(l - c) == i.substring(0, c)) && (o = c, c++);
|
|
412
415
|
}
|
|
413
|
-
}, e.prototype.diff_halfMatch_ = function(t,
|
|
416
|
+
}, e.prototype.diff_halfMatch_ = function(t, i) {
|
|
414
417
|
if (this.Diff_Timeout <= 0)
|
|
415
418
|
return null;
|
|
416
|
-
var
|
|
417
|
-
if (
|
|
419
|
+
var r = t.length > i.length ? t : i, a = t.length > i.length ? i : t;
|
|
420
|
+
if (r.length < 4 || a.length * 2 < r.length)
|
|
418
421
|
return null;
|
|
419
|
-
var
|
|
420
|
-
function
|
|
421
|
-
for (var
|
|
422
|
-
var
|
|
423
|
-
E.substring(
|
|
424
|
-
y.substring(
|
|
425
|
-
), K =
|
|
426
|
-
E.substring(0,
|
|
427
|
-
y.substring(0,
|
|
422
|
+
var l = this;
|
|
423
|
+
function o(E, y, T) {
|
|
424
|
+
for (var M = E.substring(T, T + Math.floor(E.length / 4)), D = -1, k = "", N, L, B, x; (D = y.indexOf(M, D + 1)) != -1; ) {
|
|
425
|
+
var z = l.diff_commonPrefix(
|
|
426
|
+
E.substring(T),
|
|
427
|
+
y.substring(D)
|
|
428
|
+
), K = l.diff_commonSuffix(
|
|
429
|
+
E.substring(0, T),
|
|
430
|
+
y.substring(0, D)
|
|
428
431
|
);
|
|
429
|
-
|
|
432
|
+
k.length < K + z && (k = y.substring(D - K, D) + y.substring(D, D + z), N = E.substring(0, T - K), L = E.substring(T + z), B = y.substring(0, D - K), x = y.substring(D + z));
|
|
430
433
|
}
|
|
431
|
-
return
|
|
432
|
-
|
|
434
|
+
return k.length * 2 >= E.length ? [
|
|
435
|
+
N,
|
|
433
436
|
L,
|
|
434
|
-
$,
|
|
435
437
|
B,
|
|
436
|
-
|
|
438
|
+
x,
|
|
439
|
+
k
|
|
437
440
|
] : null;
|
|
438
441
|
}
|
|
439
|
-
var c =
|
|
440
|
-
|
|
442
|
+
var c = o(
|
|
443
|
+
r,
|
|
441
444
|
a,
|
|
442
|
-
Math.ceil(
|
|
443
|
-
), f =
|
|
444
|
-
|
|
445
|
+
Math.ceil(r.length / 4)
|
|
446
|
+
), f = o(
|
|
447
|
+
r,
|
|
445
448
|
a,
|
|
446
|
-
Math.ceil(
|
|
449
|
+
Math.ceil(r.length / 2)
|
|
447
450
|
), d;
|
|
448
451
|
if (!c && !f)
|
|
449
452
|
return null;
|
|
450
453
|
f ? c ? d = c[4].length > f[4].length ? c : f : d = f : d = c;
|
|
451
|
-
var
|
|
452
|
-
t.length >
|
|
453
|
-
var
|
|
454
|
-
return [
|
|
454
|
+
var h, p, _, m;
|
|
455
|
+
t.length > i.length ? (h = d[0], p = d[1], _ = d[2], m = d[3]) : (_ = d[0], m = d[1], h = d[2], p = d[3]);
|
|
456
|
+
var v = d[4];
|
|
457
|
+
return [h, p, _, m, v];
|
|
455
458
|
}, e.prototype.diff_cleanupSemantic = function(t) {
|
|
456
|
-
for (var
|
|
457
|
-
t[
|
|
459
|
+
for (var i = !1, r = [], a = 0, l = null, o = 0, c = 0, f = 0, d = 0, h = 0; o < t.length; )
|
|
460
|
+
t[o][0] == g ? (r[a++] = o, c = d, f = h, d = 0, h = 0, l = t[o][1]) : (t[o][0] == u ? d += t[o][1].length : h += t[o][1].length, l && l.length <= Math.max(c, f) && l.length <= Math.max(
|
|
458
461
|
d,
|
|
459
|
-
|
|
462
|
+
h
|
|
460
463
|
) && (t.splice(
|
|
461
|
-
|
|
464
|
+
r[a - 1],
|
|
462
465
|
0,
|
|
463
|
-
new e.Diff(s,
|
|
464
|
-
), t[
|
|
465
|
-
for (
|
|
466
|
-
if (t[
|
|
467
|
-
var p = t[
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
_.substring(0,
|
|
471
|
-
)), t[
|
|
472
|
-
|
|
473
|
-
p.substring(0,
|
|
474
|
-
)), t[
|
|
466
|
+
new e.Diff(s, l)
|
|
467
|
+
), t[r[a - 1] + 1][0] = u, a--, a--, o = a > 0 ? r[a - 1] : -1, c = 0, f = 0, d = 0, h = 0, l = null, i = !0)), o++;
|
|
468
|
+
for (i && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), o = 1; o < t.length; ) {
|
|
469
|
+
if (t[o - 1][0] == s && t[o][0] == u) {
|
|
470
|
+
var p = t[o - 1][1], _ = t[o][1], m = this.diff_commonOverlap_(p, _), v = this.diff_commonOverlap_(_, p);
|
|
471
|
+
m >= v ? (m >= p.length / 2 || m >= _.length / 2) && (t.splice(o, 0, new e.Diff(
|
|
472
|
+
g,
|
|
473
|
+
_.substring(0, m)
|
|
474
|
+
)), t[o - 1][1] = p.substring(0, p.length - m), t[o + 1][1] = _.substring(m), o++) : (v >= p.length / 2 || v >= _.length / 2) && (t.splice(o, 0, new e.Diff(
|
|
475
|
+
g,
|
|
476
|
+
p.substring(0, v)
|
|
477
|
+
)), t[o - 1][0] = u, t[o - 1][1] = _.substring(0, _.length - v), t[o + 1][0] = s, t[o + 1][1] = p.substring(v), o++), o++;
|
|
475
478
|
}
|
|
476
|
-
|
|
479
|
+
o++;
|
|
477
480
|
}
|
|
478
481
|
}, e.prototype.diff_cleanupSemanticLossless = function(t) {
|
|
479
|
-
function
|
|
480
|
-
if (!
|
|
482
|
+
function i(v, E) {
|
|
483
|
+
if (!v || !E)
|
|
481
484
|
return 6;
|
|
482
|
-
var y =
|
|
483
|
-
return
|
|
485
|
+
var y = v.charAt(v.length - 1), T = E.charAt(0), M = y.match(e.nonAlphaNumericRegex_), D = T.match(e.nonAlphaNumericRegex_), k = M && y.match(e.whitespaceRegex_), N = D && T.match(e.whitespaceRegex_), L = k && y.match(e.linebreakRegex_), B = N && T.match(e.linebreakRegex_), x = L && v.match(e.blanklineEndRegex_), z = B && E.match(e.blanklineStartRegex_);
|
|
486
|
+
return x || z ? 5 : L || B ? 4 : M && !k && N ? 3 : k || N ? 2 : M || D ? 1 : 0;
|
|
484
487
|
}
|
|
485
|
-
for (var
|
|
486
|
-
if (t[
|
|
487
|
-
var a = t[
|
|
488
|
+
for (var r = 1; r < t.length - 1; ) {
|
|
489
|
+
if (t[r - 1][0] == g && t[r + 1][0] == g) {
|
|
490
|
+
var a = t[r - 1][1], l = t[r][1], o = t[r + 1][1], c = this.diff_commonSuffix(a, l);
|
|
488
491
|
if (c) {
|
|
489
|
-
var f =
|
|
490
|
-
a = a.substring(0, a.length - c),
|
|
492
|
+
var f = l.substring(l.length - c);
|
|
493
|
+
a = a.substring(0, a.length - c), l = f + l.substring(0, l.length - c), o = f + o;
|
|
491
494
|
}
|
|
492
|
-
for (var d = a,
|
|
493
|
-
a +=
|
|
494
|
-
var
|
|
495
|
-
|
|
495
|
+
for (var d = a, h = l, p = o, _ = i(a, l) + i(l, o); l.charAt(0) === o.charAt(0); ) {
|
|
496
|
+
a += l.charAt(0), l = l.substring(1) + o.charAt(0), o = o.substring(1);
|
|
497
|
+
var m = i(a, l) + i(l, o);
|
|
498
|
+
m >= _ && (_ = m, d = a, h = l, p = o);
|
|
496
499
|
}
|
|
497
|
-
t[
|
|
500
|
+
t[r - 1][1] != d && (d ? t[r - 1][1] = d : (t.splice(r - 1, 1), r--), t[r][1] = h, p ? t[r + 1][1] = p : (t.splice(r + 1, 1), r--));
|
|
498
501
|
}
|
|
499
|
-
|
|
502
|
+
r++;
|
|
500
503
|
}
|
|
501
504
|
}, e.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, e.whitespaceRegex_ = /\s/, e.linebreakRegex_ = /[\r\n]/, e.blanklineEndRegex_ = /\n\r?\n$/, e.blanklineStartRegex_ = /^\r?\n\r?\n/, e.prototype.diff_cleanupEfficiency = function(t) {
|
|
502
|
-
for (var
|
|
503
|
-
t[
|
|
504
|
-
|
|
505
|
+
for (var i = !1, r = [], a = 0, l = null, o = 0, c = !1, f = !1, d = !1, h = !1; o < t.length; )
|
|
506
|
+
t[o][0] == g ? (t[o][1].length < this.Diff_EditCost && (d || h) ? (r[a++] = o, c = d, f = h, l = t[o][1]) : (a = 0, l = null), d = h = !1) : (t[o][0] == s ? h = !0 : d = !0, l && (c && f && d && h || l.length < this.Diff_EditCost / 2 && c + f + d + h == 3) && (t.splice(
|
|
507
|
+
r[a - 1],
|
|
505
508
|
0,
|
|
506
|
-
new e.Diff(s,
|
|
507
|
-
), t[
|
|
508
|
-
|
|
509
|
+
new e.Diff(s, l)
|
|
510
|
+
), t[r[a - 1] + 1][0] = u, a--, l = null, c && f ? (d = h = !0, a = 0) : (a--, o = a > 0 ? r[a - 1] : -1, d = h = !1), i = !0)), o++;
|
|
511
|
+
i && this.diff_cleanupMerge(t);
|
|
509
512
|
}, e.prototype.diff_cleanupMerge = function(t) {
|
|
510
|
-
t.push(new e.Diff(
|
|
511
|
-
for (var
|
|
512
|
-
switch (t[
|
|
513
|
+
t.push(new e.Diff(g, ""));
|
|
514
|
+
for (var i = 0, r = 0, a = 0, l = "", o = "", c; i < t.length; )
|
|
515
|
+
switch (t[i][0]) {
|
|
513
516
|
case u:
|
|
514
|
-
a++,
|
|
517
|
+
a++, o += t[i][1], i++;
|
|
515
518
|
break;
|
|
516
519
|
case s:
|
|
517
|
-
|
|
520
|
+
r++, l += t[i][1], i++;
|
|
518
521
|
break;
|
|
519
|
-
case
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
)),
|
|
524
|
-
|
|
522
|
+
case g:
|
|
523
|
+
r + a > 1 ? (r !== 0 && a !== 0 && (c = this.diff_commonPrefix(o, l), c !== 0 && (i - r - a > 0 && t[i - r - a - 1][0] == g ? t[i - r - a - 1][1] += o.substring(0, c) : (t.splice(0, 0, new e.Diff(
|
|
524
|
+
g,
|
|
525
|
+
o.substring(0, c)
|
|
526
|
+
)), i++), o = o.substring(c), l = l.substring(c)), c = this.diff_commonSuffix(o, l), c !== 0 && (t[i][1] = o.substring(o.length - c) + t[i][1], o = o.substring(0, o.length - c), l = l.substring(0, l.length - c))), i -= r + a, t.splice(i, r + a), l.length && (t.splice(
|
|
527
|
+
i,
|
|
525
528
|
0,
|
|
526
|
-
new e.Diff(s,
|
|
527
|
-
),
|
|
528
|
-
|
|
529
|
+
new e.Diff(s, l)
|
|
530
|
+
), i++), o.length && (t.splice(
|
|
531
|
+
i,
|
|
529
532
|
0,
|
|
530
|
-
new e.Diff(u,
|
|
531
|
-
),
|
|
533
|
+
new e.Diff(u, o)
|
|
534
|
+
), i++), i++) : i !== 0 && t[i - 1][0] == g ? (t[i - 1][1] += t[i][1], t.splice(i, 1)) : i++, a = 0, r = 0, l = "", o = "";
|
|
532
535
|
break;
|
|
533
536
|
}
|
|
534
537
|
t[t.length - 1][1] === "" && t.pop();
|
|
535
538
|
var f = !1;
|
|
536
|
-
for (
|
|
537
|
-
t[
|
|
539
|
+
for (i = 1; i < t.length - 1; )
|
|
540
|
+
t[i - 1][0] == g && t[i + 1][0] == g && (t[i][1].substring(t[i][1].length - t[i - 1][1].length) == t[i - 1][1] ? (t[i][1] = t[i - 1][1] + t[i][1].substring(0, t[i][1].length - t[i - 1][1].length), t[i + 1][1] = t[i - 1][1] + t[i + 1][1], t.splice(i - 1, 1), f = !0) : t[i][1].substring(0, t[i + 1][1].length) == t[i + 1][1] && (t[i - 1][1] += t[i + 1][1], t[i][1] = t[i][1].substring(t[i + 1][1].length) + t[i + 1][1], t.splice(i + 1, 1), f = !0)), i++;
|
|
538
541
|
f && this.diff_cleanupMerge(t);
|
|
539
|
-
}, e.prototype.diff_xIndex = function(t,
|
|
540
|
-
var
|
|
541
|
-
for (c = 0; c < t.length && (t[c][0] !== u && (
|
|
542
|
-
|
|
543
|
-
return t.length != c && t[c][0] === s ?
|
|
542
|
+
}, e.prototype.diff_xIndex = function(t, i) {
|
|
543
|
+
var r = 0, a = 0, l = 0, o = 0, c;
|
|
544
|
+
for (c = 0; c < t.length && (t[c][0] !== u && (r += t[c][1].length), t[c][0] !== s && (a += t[c][1].length), !(r > i)); c++)
|
|
545
|
+
l = r, o = a;
|
|
546
|
+
return t.length != c && t[c][0] === s ? o : o + (i - l);
|
|
544
547
|
}, e.prototype.diff_prettyHtml = function(t) {
|
|
545
|
-
for (var
|
|
546
|
-
var f = t[c][0], d = t[c][1],
|
|
548
|
+
for (var i = [], r = /&/g, a = /</g, l = />/g, o = /\n/g, c = 0; c < t.length; c++) {
|
|
549
|
+
var f = t[c][0], d = t[c][1], h = d.replace(r, "&").replace(a, "<").replace(l, ">").replace(o, "¶<br>");
|
|
547
550
|
switch (f) {
|
|
548
551
|
case u:
|
|
549
|
-
|
|
552
|
+
i[c] = '<ins style="background:#e6ffe6;">' + h + "</ins>";
|
|
550
553
|
break;
|
|
551
554
|
case s:
|
|
552
|
-
|
|
555
|
+
i[c] = '<del style="background:#ffe6e6;">' + h + "</del>";
|
|
553
556
|
break;
|
|
554
|
-
case
|
|
555
|
-
|
|
557
|
+
case g:
|
|
558
|
+
i[c] = "<span>" + h + "</span>";
|
|
556
559
|
break;
|
|
557
560
|
}
|
|
558
561
|
}
|
|
559
|
-
return
|
|
562
|
+
return i.join("");
|
|
560
563
|
}, e.prototype.diff_text1 = function(t) {
|
|
561
|
-
for (var
|
|
562
|
-
t[
|
|
563
|
-
return
|
|
564
|
+
for (var i = [], r = 0; r < t.length; r++)
|
|
565
|
+
t[r][0] !== u && (i[r] = t[r][1]);
|
|
566
|
+
return i.join("");
|
|
564
567
|
}, e.prototype.diff_text2 = function(t) {
|
|
565
|
-
for (var
|
|
566
|
-
t[
|
|
567
|
-
return
|
|
568
|
+
for (var i = [], r = 0; r < t.length; r++)
|
|
569
|
+
t[r][0] !== s && (i[r] = t[r][1]);
|
|
570
|
+
return i.join("");
|
|
568
571
|
}, e.prototype.diff_levenshtein = function(t) {
|
|
569
|
-
for (var
|
|
570
|
-
var
|
|
571
|
-
switch (
|
|
572
|
+
for (var i = 0, r = 0, a = 0, l = 0; l < t.length; l++) {
|
|
573
|
+
var o = t[l][0], c = t[l][1];
|
|
574
|
+
switch (o) {
|
|
572
575
|
case u:
|
|
573
|
-
|
|
576
|
+
r += c.length;
|
|
574
577
|
break;
|
|
575
578
|
case s:
|
|
576
579
|
a += c.length;
|
|
577
580
|
break;
|
|
578
|
-
case
|
|
579
|
-
|
|
581
|
+
case g:
|
|
582
|
+
i += Math.max(r, a), r = 0, a = 0;
|
|
580
583
|
break;
|
|
581
584
|
}
|
|
582
585
|
}
|
|
583
|
-
return
|
|
586
|
+
return i += Math.max(r, a), i;
|
|
584
587
|
}, e.prototype.diff_toDelta = function(t) {
|
|
585
|
-
for (var
|
|
586
|
-
switch (t[
|
|
588
|
+
for (var i = [], r = 0; r < t.length; r++)
|
|
589
|
+
switch (t[r][0]) {
|
|
587
590
|
case u:
|
|
588
|
-
r
|
|
591
|
+
i[r] = "+" + encodeURI(t[r][1]);
|
|
589
592
|
break;
|
|
590
593
|
case s:
|
|
591
|
-
r
|
|
594
|
+
i[r] = "-" + t[r][1].length;
|
|
592
595
|
break;
|
|
593
|
-
case
|
|
594
|
-
r
|
|
596
|
+
case g:
|
|
597
|
+
i[r] = "=" + t[r][1].length;
|
|
595
598
|
break;
|
|
596
599
|
}
|
|
597
|
-
return
|
|
598
|
-
}, e.prototype.diff_fromDelta = function(t,
|
|
599
|
-
for (var
|
|
600
|
-
var f =
|
|
601
|
-
switch (
|
|
600
|
+
return i.join(" ").replace(/%20/g, " ");
|
|
601
|
+
}, e.prototype.diff_fromDelta = function(t, i) {
|
|
602
|
+
for (var r = [], a = 0, l = 0, o = i.split(/\t/g), c = 0; c < o.length; c++) {
|
|
603
|
+
var f = o[c].substring(1);
|
|
604
|
+
switch (o[c].charAt(0)) {
|
|
602
605
|
case "+":
|
|
603
606
|
try {
|
|
604
|
-
|
|
607
|
+
r[a++] = new e.Diff(u, decodeURI(f));
|
|
605
608
|
} catch (p) {
|
|
606
609
|
throw new Error("Illegal escape in diff_fromDelta: " + f);
|
|
607
610
|
}
|
|
@@ -611,227 +614,227 @@ var on = { exports: {} };
|
|
|
611
614
|
var d = parseInt(f, 10);
|
|
612
615
|
if (isNaN(d) || d < 0)
|
|
613
616
|
throw new Error("Invalid number in diff_fromDelta: " + f);
|
|
614
|
-
var
|
|
615
|
-
|
|
617
|
+
var h = t.substring(l, l += d);
|
|
618
|
+
o[c].charAt(0) == "=" ? r[a++] = new e.Diff(g, h) : r[a++] = new e.Diff(s, h);
|
|
616
619
|
break;
|
|
617
620
|
default:
|
|
618
|
-
if (
|
|
619
|
-
throw new Error("Invalid diff operation in diff_fromDelta: " +
|
|
621
|
+
if (o[c])
|
|
622
|
+
throw new Error("Invalid diff operation in diff_fromDelta: " + o[c]);
|
|
620
623
|
}
|
|
621
624
|
}
|
|
622
|
-
if (
|
|
623
|
-
throw new Error("Delta length (" +
|
|
624
|
-
return
|
|
625
|
-
}, e.prototype.match_main = function(t,
|
|
626
|
-
if (t == null ||
|
|
625
|
+
if (l != t.length)
|
|
626
|
+
throw new Error("Delta length (" + l + ") does not equal source text length (" + t.length + ").");
|
|
627
|
+
return r;
|
|
628
|
+
}, e.prototype.match_main = function(t, i, r) {
|
|
629
|
+
if (t == null || i == null || r == null)
|
|
627
630
|
throw new Error("Null input. (match_main)");
|
|
628
|
-
return
|
|
629
|
-
}, e.prototype.match_bitap_ = function(t,
|
|
630
|
-
if (
|
|
631
|
+
return r = Math.max(0, Math.min(r, t.length)), t == i ? 0 : t.length ? t.substring(r, r + i.length) == i ? r : this.match_bitap_(t, i, r) : -1;
|
|
632
|
+
}, e.prototype.match_bitap_ = function(t, i, r) {
|
|
633
|
+
if (i.length > this.Match_MaxBits)
|
|
631
634
|
throw new Error("Pattern too long for this browser.");
|
|
632
|
-
var a = this.match_alphabet_(
|
|
633
|
-
function
|
|
634
|
-
var
|
|
635
|
-
return
|
|
635
|
+
var a = this.match_alphabet_(i), l = this;
|
|
636
|
+
function o(N, L) {
|
|
637
|
+
var B = N / i.length, x = Math.abs(r - L);
|
|
638
|
+
return l.Match_Distance ? B + x / l.Match_Distance : x ? 1 : B;
|
|
636
639
|
}
|
|
637
|
-
var c = this.Match_Threshold, f = t.indexOf(
|
|
638
|
-
f != -1 && (c = Math.min(
|
|
639
|
-
var d = 1 <<
|
|
640
|
+
var c = this.Match_Threshold, f = t.indexOf(i, r);
|
|
641
|
+
f != -1 && (c = Math.min(o(0, f), c), f = t.lastIndexOf(i, r + i.length), f != -1 && (c = Math.min(o(0, f), c)));
|
|
642
|
+
var d = 1 << i.length - 1;
|
|
640
643
|
f = -1;
|
|
641
|
-
for (var
|
|
642
|
-
for (
|
|
643
|
-
|
|
644
|
+
for (var h, p, _ = i.length + t.length, m, v = 0; v < i.length; v++) {
|
|
645
|
+
for (h = 0, p = _; h < p; )
|
|
646
|
+
o(v, r + p) <= c ? h = p : _ = p, p = Math.floor((_ - h) / 2 + h);
|
|
644
647
|
_ = p;
|
|
645
|
-
var E = Math.max(1,
|
|
646
|
-
|
|
647
|
-
for (var
|
|
648
|
-
var
|
|
649
|
-
if (
|
|
650
|
-
var
|
|
651
|
-
if (
|
|
652
|
-
if (c =
|
|
653
|
-
E = Math.max(1, 2 *
|
|
648
|
+
var E = Math.max(1, r - p + 1), y = Math.min(r + p, t.length) + i.length, T = Array(y + 2);
|
|
649
|
+
T[y + 1] = (1 << v) - 1;
|
|
650
|
+
for (var M = y; M >= E; M--) {
|
|
651
|
+
var D = a[t.charAt(M - 1)];
|
|
652
|
+
if (v === 0 ? T[M] = (T[M + 1] << 1 | 1) & D : T[M] = (T[M + 1] << 1 | 1) & D | ((m[M + 1] | m[M]) << 1 | 1) | m[M + 1], T[M] & d) {
|
|
653
|
+
var k = o(v, M - 1);
|
|
654
|
+
if (k <= c)
|
|
655
|
+
if (c = k, f = M - 1, f > r)
|
|
656
|
+
E = Math.max(1, 2 * r - f);
|
|
654
657
|
else
|
|
655
658
|
break;
|
|
656
659
|
}
|
|
657
660
|
}
|
|
658
|
-
if (
|
|
661
|
+
if (o(v + 1, r) > c)
|
|
659
662
|
break;
|
|
660
|
-
|
|
663
|
+
m = T;
|
|
661
664
|
}
|
|
662
665
|
return f;
|
|
663
666
|
}, e.prototype.match_alphabet_ = function(t) {
|
|
664
|
-
for (var
|
|
665
|
-
|
|
666
|
-
for (var
|
|
667
|
-
|
|
668
|
-
return
|
|
669
|
-
}, e.prototype.patch_addContext_ = function(t,
|
|
670
|
-
if (
|
|
667
|
+
for (var i = {}, r = 0; r < t.length; r++)
|
|
668
|
+
i[t.charAt(r)] = 0;
|
|
669
|
+
for (var r = 0; r < t.length; r++)
|
|
670
|
+
i[t.charAt(r)] |= 1 << t.length - r - 1;
|
|
671
|
+
return i;
|
|
672
|
+
}, e.prototype.patch_addContext_ = function(t, i) {
|
|
673
|
+
if (i.length != 0) {
|
|
671
674
|
if (t.start2 === null)
|
|
672
675
|
throw Error("patch not initialized");
|
|
673
|
-
for (var
|
|
674
|
-
a += this.Patch_Margin,
|
|
676
|
+
for (var r = i.substring(t.start2, t.start2 + t.length1), a = 0; i.indexOf(r) != i.lastIndexOf(r) && r.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; )
|
|
677
|
+
a += this.Patch_Margin, r = i.substring(
|
|
675
678
|
t.start2 - a,
|
|
676
679
|
t.start2 + t.length1 + a
|
|
677
680
|
);
|
|
678
681
|
a += this.Patch_Margin;
|
|
679
|
-
var
|
|
680
|
-
|
|
681
|
-
var
|
|
682
|
+
var l = i.substring(t.start2 - a, t.start2);
|
|
683
|
+
l && t.diffs.unshift(new e.Diff(g, l));
|
|
684
|
+
var o = i.substring(
|
|
682
685
|
t.start2 + t.length1,
|
|
683
686
|
t.start2 + t.length1 + a
|
|
684
687
|
);
|
|
685
|
-
|
|
688
|
+
o && t.diffs.push(new e.Diff(g, o)), t.start1 -= l.length, t.start2 -= l.length, t.length1 += l.length + o.length, t.length2 += l.length + o.length;
|
|
686
689
|
}
|
|
687
|
-
}, e.prototype.patch_make = function(t,
|
|
688
|
-
var a,
|
|
689
|
-
if (typeof t == "string" && typeof
|
|
690
|
+
}, e.prototype.patch_make = function(t, i, r) {
|
|
691
|
+
var a, l;
|
|
692
|
+
if (typeof t == "string" && typeof i == "string" && typeof r == "undefined")
|
|
690
693
|
a = /** @type {string} */
|
|
691
|
-
t,
|
|
694
|
+
t, l = this.diff_main(
|
|
692
695
|
a,
|
|
693
696
|
/** @type {string} */
|
|
694
|
-
|
|
697
|
+
i,
|
|
695
698
|
!0
|
|
696
|
-
),
|
|
697
|
-
else if (t && typeof t == "object" && typeof
|
|
698
|
-
|
|
699
|
-
t, a = this.diff_text1(
|
|
700
|
-
else if (typeof t == "string" &&
|
|
699
|
+
), l.length > 2 && (this.diff_cleanupSemantic(l), this.diff_cleanupEfficiency(l));
|
|
700
|
+
else if (t && typeof t == "object" && typeof i == "undefined" && typeof r == "undefined")
|
|
701
|
+
l = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
702
|
+
t, a = this.diff_text1(l);
|
|
703
|
+
else if (typeof t == "string" && i && typeof i == "object" && typeof r == "undefined")
|
|
701
704
|
a = /** @type {string} */
|
|
702
|
-
t,
|
|
703
|
-
r;
|
|
704
|
-
else if (typeof t == "string" && typeof r == "string" && i && typeof i == "object")
|
|
705
|
-
a = /** @type {string} */
|
|
706
|
-
t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
705
|
+
t, l = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
707
706
|
i;
|
|
707
|
+
else if (typeof t == "string" && typeof i == "string" && r && typeof r == "object")
|
|
708
|
+
a = /** @type {string} */
|
|
709
|
+
t, l = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
710
|
+
r;
|
|
708
711
|
else
|
|
709
712
|
throw new Error("Unknown call format to patch_make.");
|
|
710
|
-
if (
|
|
713
|
+
if (l.length === 0)
|
|
711
714
|
return [];
|
|
712
|
-
for (var
|
|
713
|
-
var
|
|
714
|
-
switch (!f &&
|
|
715
|
+
for (var o = [], c = new e.patch_obj(), f = 0, d = 0, h = 0, p = a, _ = a, m = 0; m < l.length; m++) {
|
|
716
|
+
var v = l[m][0], E = l[m][1];
|
|
717
|
+
switch (!f && v !== g && (c.start1 = d, c.start2 = h), v) {
|
|
715
718
|
case u:
|
|
716
|
-
c.diffs[f++] =
|
|
719
|
+
c.diffs[f++] = l[m], c.length2 += E.length, _ = _.substring(0, h) + E + _.substring(h);
|
|
717
720
|
break;
|
|
718
721
|
case s:
|
|
719
|
-
c.length1 += E.length, c.diffs[f++] =
|
|
722
|
+
c.length1 += E.length, c.diffs[f++] = l[m], _ = _.substring(0, h) + _.substring(h + E.length);
|
|
720
723
|
break;
|
|
721
|
-
case
|
|
722
|
-
E.length <= 2 * this.Patch_Margin && f &&
|
|
724
|
+
case g:
|
|
725
|
+
E.length <= 2 * this.Patch_Margin && f && l.length != m + 1 ? (c.diffs[f++] = l[m], c.length1 += E.length, c.length2 += E.length) : E.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, p), o.push(c), c = new e.patch_obj(), f = 0, p = _, d = h);
|
|
723
726
|
break;
|
|
724
727
|
}
|
|
725
|
-
|
|
728
|
+
v !== u && (d += E.length), v !== s && (h += E.length);
|
|
726
729
|
}
|
|
727
|
-
return f && (this.patch_addContext_(c, p),
|
|
730
|
+
return f && (this.patch_addContext_(c, p), o.push(c)), o;
|
|
728
731
|
}, e.prototype.patch_deepCopy = function(t) {
|
|
729
|
-
for (var
|
|
730
|
-
var a = t[
|
|
731
|
-
|
|
732
|
-
for (var
|
|
733
|
-
|
|
734
|
-
|
|
732
|
+
for (var i = [], r = 0; r < t.length; r++) {
|
|
733
|
+
var a = t[r], l = new e.patch_obj();
|
|
734
|
+
l.diffs = [];
|
|
735
|
+
for (var o = 0; o < a.diffs.length; o++)
|
|
736
|
+
l.diffs[o] = new e.Diff(a.diffs[o][0], a.diffs[o][1]);
|
|
737
|
+
l.start1 = a.start1, l.start2 = a.start2, l.length1 = a.length1, l.length2 = a.length2, i[r] = l;
|
|
735
738
|
}
|
|
736
|
-
return
|
|
737
|
-
}, e.prototype.patch_apply = function(t,
|
|
739
|
+
return i;
|
|
740
|
+
}, e.prototype.patch_apply = function(t, i) {
|
|
738
741
|
if (t.length == 0)
|
|
739
|
-
return [
|
|
742
|
+
return [i, []];
|
|
740
743
|
t = this.patch_deepCopy(t);
|
|
741
|
-
var
|
|
742
|
-
|
|
743
|
-
for (var a = 0,
|
|
744
|
-
var c = t[
|
|
744
|
+
var r = this.patch_addPadding(t);
|
|
745
|
+
i = r + i + r, this.patch_splitMax(t);
|
|
746
|
+
for (var a = 0, l = [], o = 0; o < t.length; o++) {
|
|
747
|
+
var c = t[o].start2 + a, f = this.diff_text1(t[o].diffs), d, h = -1;
|
|
745
748
|
if (f.length > this.Match_MaxBits ? (d = this.match_main(
|
|
746
|
-
|
|
749
|
+
i,
|
|
747
750
|
f.substring(0, this.Match_MaxBits),
|
|
748
751
|
c
|
|
749
|
-
), d != -1 && (
|
|
750
|
-
|
|
752
|
+
), d != -1 && (h = this.match_main(
|
|
753
|
+
i,
|
|
751
754
|
f.substring(f.length - this.Match_MaxBits),
|
|
752
755
|
c + f.length - this.Match_MaxBits
|
|
753
|
-
), (
|
|
754
|
-
o
|
|
756
|
+
), (h == -1 || d >= h) && (d = -1))) : d = this.match_main(i, f, c), d == -1)
|
|
757
|
+
l[o] = !1, a -= t[o].length2 - t[o].length1;
|
|
755
758
|
else {
|
|
756
|
-
o
|
|
759
|
+
l[o] = !0, a = d - c;
|
|
757
760
|
var p;
|
|
758
|
-
if (
|
|
759
|
-
|
|
761
|
+
if (h == -1 ? p = i.substring(d, d + f.length) : p = i.substring(d, h + this.Match_MaxBits), f == p)
|
|
762
|
+
i = i.substring(0, d) + this.diff_text2(t[o].diffs) + i.substring(d + f.length);
|
|
760
763
|
else {
|
|
761
764
|
var _ = this.diff_main(f, p, !1);
|
|
762
765
|
if (f.length > this.Match_MaxBits && this.diff_levenshtein(_) / f.length > this.Patch_DeleteThreshold)
|
|
763
|
-
o
|
|
766
|
+
l[o] = !1;
|
|
764
767
|
else {
|
|
765
768
|
this.diff_cleanupSemanticLossless(_);
|
|
766
|
-
for (var
|
|
767
|
-
var y = t[
|
|
768
|
-
y[0] !==
|
|
769
|
+
for (var m = 0, v, E = 0; E < t[o].diffs.length; E++) {
|
|
770
|
+
var y = t[o].diffs[E];
|
|
771
|
+
y[0] !== g && (v = this.diff_xIndex(_, m)), y[0] === u ? i = i.substring(0, d + v) + y[1] + i.substring(d + v) : y[0] === s && (i = i.substring(0, d + v) + i.substring(d + this.diff_xIndex(
|
|
769
772
|
_,
|
|
770
|
-
|
|
771
|
-
))), y[0] !== s && (
|
|
773
|
+
m + y[1].length
|
|
774
|
+
))), y[0] !== s && (m += y[1].length);
|
|
772
775
|
}
|
|
773
776
|
}
|
|
774
777
|
}
|
|
775
778
|
}
|
|
776
779
|
}
|
|
777
|
-
return
|
|
780
|
+
return i = i.substring(r.length, i.length - r.length), [i, l];
|
|
778
781
|
}, e.prototype.patch_addPadding = function(t) {
|
|
779
|
-
for (var
|
|
780
|
-
|
|
782
|
+
for (var i = this.Patch_Margin, r = "", a = 1; a <= i; a++)
|
|
783
|
+
r += String.fromCharCode(a);
|
|
781
784
|
for (var a = 0; a < t.length; a++)
|
|
782
|
-
t[a].start1 +=
|
|
783
|
-
var
|
|
784
|
-
if (
|
|
785
|
-
|
|
786
|
-
else if (
|
|
787
|
-
var c =
|
|
788
|
-
|
|
785
|
+
t[a].start1 += i, t[a].start2 += i;
|
|
786
|
+
var l = t[0], o = l.diffs;
|
|
787
|
+
if (o.length == 0 || o[0][0] != g)
|
|
788
|
+
o.unshift(new e.Diff(g, r)), l.start1 -= i, l.start2 -= i, l.length1 += i, l.length2 += i;
|
|
789
|
+
else if (i > o[0][1].length) {
|
|
790
|
+
var c = i - o[0][1].length;
|
|
791
|
+
o[0][1] = r.substring(o[0][1].length) + o[0][1], l.start1 -= c, l.start2 -= c, l.length1 += c, l.length2 += c;
|
|
789
792
|
}
|
|
790
|
-
if (
|
|
791
|
-
|
|
792
|
-
else if (
|
|
793
|
-
var c =
|
|
794
|
-
|
|
793
|
+
if (l = t[t.length - 1], o = l.diffs, o.length == 0 || o[o.length - 1][0] != g)
|
|
794
|
+
o.push(new e.Diff(g, r)), l.length1 += i, l.length2 += i;
|
|
795
|
+
else if (i > o[o.length - 1][1].length) {
|
|
796
|
+
var c = i - o[o.length - 1][1].length;
|
|
797
|
+
o[o.length - 1][1] += r.substring(0, c), l.length1 += c, l.length2 += c;
|
|
795
798
|
}
|
|
796
|
-
return
|
|
799
|
+
return r;
|
|
797
800
|
}, e.prototype.patch_splitMax = function(t) {
|
|
798
|
-
for (var
|
|
799
|
-
if (!(t[
|
|
800
|
-
var a = t[
|
|
801
|
-
t.splice(
|
|
802
|
-
for (var
|
|
801
|
+
for (var i = this.Match_MaxBits, r = 0; r < t.length; r++)
|
|
802
|
+
if (!(t[r].length1 <= i)) {
|
|
803
|
+
var a = t[r];
|
|
804
|
+
t.splice(r--, 1);
|
|
805
|
+
for (var l = a.start1, o = a.start2, c = ""; a.diffs.length !== 0; ) {
|
|
803
806
|
var f = new e.patch_obj(), d = !0;
|
|
804
|
-
for (f.start1 =
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
+
for (f.start1 = l - c.length, f.start2 = o - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new e.Diff(g, c))); a.diffs.length !== 0 && f.length1 < i - this.Patch_Margin; ) {
|
|
808
|
+
var h = a.diffs[0][0], p = a.diffs[0][1];
|
|
809
|
+
h === u ? (f.length2 += p.length, o += p.length, f.diffs.push(a.diffs.shift()), d = !1) : h === s && f.diffs.length == 1 && f.diffs[0][0] == g && p.length > 2 * i ? (f.length1 += p.length, l += p.length, d = !1, f.diffs.push(new e.Diff(h, p)), a.diffs.shift()) : (p = p.substring(
|
|
807
810
|
0,
|
|
808
|
-
|
|
809
|
-
), f.length1 += p.length,
|
|
811
|
+
i - f.length1 - this.Patch_Margin
|
|
812
|
+
), f.length1 += p.length, l += p.length, h === g ? (f.length2 += p.length, o += p.length) : d = !1, f.diffs.push(new e.Diff(h, p)), p == a.diffs[0][1] ? a.diffs.shift() : a.diffs[0][1] = a.diffs[0][1].substring(p.length));
|
|
810
813
|
}
|
|
811
814
|
c = this.diff_text2(f.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
812
815
|
var _ = this.diff_text1(a.diffs).substring(0, this.Patch_Margin);
|
|
813
|
-
_ !== "" && (f.length1 += _.length, f.length2 += _.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] ===
|
|
816
|
+
_ !== "" && (f.length1 += _.length, f.length2 += _.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === g ? f.diffs[f.diffs.length - 1][1] += _ : f.diffs.push(new e.Diff(g, _))), d || t.splice(++r, 0, f);
|
|
814
817
|
}
|
|
815
818
|
}
|
|
816
819
|
}, e.prototype.patch_toText = function(t) {
|
|
817
|
-
for (var
|
|
818
|
-
r
|
|
819
|
-
return
|
|
820
|
+
for (var i = [], r = 0; r < t.length; r++)
|
|
821
|
+
i[r] = t[r];
|
|
822
|
+
return i.join("");
|
|
820
823
|
}, e.prototype.patch_fromText = function(t) {
|
|
821
|
-
var
|
|
824
|
+
var i = [];
|
|
822
825
|
if (!t)
|
|
823
|
-
return
|
|
824
|
-
for (var
|
|
825
|
-
`), a = 0,
|
|
826
|
-
var
|
|
827
|
-
if (!
|
|
828
|
-
throw new Error("Invalid patch string: " +
|
|
826
|
+
return i;
|
|
827
|
+
for (var r = t.split(`
|
|
828
|
+
`), a = 0, l = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; a < r.length; ) {
|
|
829
|
+
var o = r[a].match(l);
|
|
830
|
+
if (!o)
|
|
831
|
+
throw new Error("Invalid patch string: " + r[a]);
|
|
829
832
|
var c = new e.patch_obj();
|
|
830
|
-
for (
|
|
831
|
-
var f =
|
|
833
|
+
for (i.push(c), c.start1 = parseInt(o[1], 10), o[2] === "" ? (c.start1--, c.length1 = 1) : o[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(o[2], 10)), c.start2 = parseInt(o[3], 10), o[4] === "" ? (c.start2--, c.length2 = 1) : o[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(o[4], 10)), a++; a < r.length; ) {
|
|
834
|
+
var f = r[a].charAt(0);
|
|
832
835
|
try {
|
|
833
|
-
var d = decodeURI(
|
|
834
|
-
} catch (
|
|
836
|
+
var d = decodeURI(r[a].substring(1));
|
|
837
|
+
} catch (h) {
|
|
835
838
|
throw new Error("Illegal escape in patch_fromText: " + d);
|
|
836
839
|
}
|
|
837
840
|
if (f == "-")
|
|
@@ -839,7 +842,7 @@ var on = { exports: {} };
|
|
|
839
842
|
else if (f == "+")
|
|
840
843
|
c.diffs.push(new e.Diff(u, d));
|
|
841
844
|
else if (f == " ")
|
|
842
|
-
c.diffs.push(new e.Diff(
|
|
845
|
+
c.diffs.push(new e.Diff(g, d));
|
|
843
846
|
else {
|
|
844
847
|
if (f == "@")
|
|
845
848
|
break;
|
|
@@ -848,43 +851,43 @@ var on = { exports: {} };
|
|
|
848
851
|
a++;
|
|
849
852
|
}
|
|
850
853
|
}
|
|
851
|
-
return
|
|
854
|
+
return i;
|
|
852
855
|
}, e.patch_obj = function() {
|
|
853
856
|
this.diffs = [], this.start1 = null, this.start2 = null, this.length1 = 0, this.length2 = 0;
|
|
854
857
|
}, e.patch_obj.prototype.toString = function() {
|
|
855
|
-
var t,
|
|
856
|
-
this.length1 === 0 ? t = this.start1 + ",0" : this.length1 == 1 ? t = this.start1 + 1 : t = this.start1 + 1 + "," + this.length1, this.length2 === 0 ?
|
|
857
|
-
for (var
|
|
858
|
-
`], a,
|
|
859
|
-
switch (this.diffs[
|
|
858
|
+
var t, i;
|
|
859
|
+
this.length1 === 0 ? t = this.start1 + ",0" : this.length1 == 1 ? t = this.start1 + 1 : t = this.start1 + 1 + "," + this.length1, this.length2 === 0 ? i = this.start2 + ",0" : this.length2 == 1 ? i = this.start2 + 1 : i = this.start2 + 1 + "," + this.length2;
|
|
860
|
+
for (var r = ["@@ -" + t + " +" + i + ` @@
|
|
861
|
+
`], a, l = 0; l < this.diffs.length; l++) {
|
|
862
|
+
switch (this.diffs[l][0]) {
|
|
860
863
|
case u:
|
|
861
864
|
a = "+";
|
|
862
865
|
break;
|
|
863
866
|
case s:
|
|
864
867
|
a = "-";
|
|
865
868
|
break;
|
|
866
|
-
case
|
|
869
|
+
case g:
|
|
867
870
|
a = " ";
|
|
868
871
|
break;
|
|
869
872
|
}
|
|
870
|
-
|
|
873
|
+
r[l + 1] = a + encodeURI(this.diffs[l][1]) + `
|
|
871
874
|
`;
|
|
872
875
|
}
|
|
873
|
-
return
|
|
874
|
-
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE = s, n.exports.DIFF_INSERT = u, n.exports.DIFF_EQUAL =
|
|
875
|
-
})(
|
|
876
|
-
var
|
|
877
|
-
function
|
|
876
|
+
return r.join("").replace(/%20/g, " ");
|
|
877
|
+
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE = s, n.exports.DIFF_INSERT = u, n.exports.DIFF_EQUAL = g;
|
|
878
|
+
})(fn);
|
|
879
|
+
var Re = fn.exports;
|
|
880
|
+
function gn(n) {
|
|
878
881
|
return n instanceof Map ? n.clear = n.delete = n.set = function() {
|
|
879
882
|
throw new Error("map is read-only");
|
|
880
883
|
} : n instanceof Set && (n.add = n.clear = n.delete = function() {
|
|
881
884
|
throw new Error("set is read-only");
|
|
882
885
|
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach((e) => {
|
|
883
886
|
const s = n[e], u = typeof s;
|
|
884
|
-
(u === "object" || u === "function") && !Object.isFrozen(s) &&
|
|
887
|
+
(u === "object" || u === "function") && !Object.isFrozen(s) && gn(s);
|
|
885
888
|
}), n;
|
|
886
889
|
}
|
|
887
|
-
class
|
|
890
|
+
class Je {
|
|
888
891
|
/**
|
|
889
892
|
* @param {CompiledMode} mode
|
|
890
893
|
*/
|
|
@@ -895,7 +898,7 @@ class Ye {
|
|
|
895
898
|
this.isMatchIgnored = !0;
|
|
896
899
|
}
|
|
897
900
|
}
|
|
898
|
-
function
|
|
901
|
+
function hn(n) {
|
|
899
902
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
900
903
|
}
|
|
901
904
|
function re(n, ...e) {
|
|
@@ -903,24 +906,24 @@ function re(n, ...e) {
|
|
|
903
906
|
for (const u in n)
|
|
904
907
|
s[u] = n[u];
|
|
905
908
|
return e.forEach(function(u) {
|
|
906
|
-
for (const
|
|
907
|
-
s[
|
|
909
|
+
for (const g in u)
|
|
910
|
+
s[g] = u[g];
|
|
908
911
|
}), /** @type {T} */
|
|
909
912
|
s;
|
|
910
913
|
}
|
|
911
|
-
const
|
|
914
|
+
const Xn = "</span>", en = (n) => !!n.scope, jn = (n, { prefix: e }) => {
|
|
912
915
|
if (n.startsWith("language:"))
|
|
913
916
|
return n.replace("language:", "language-");
|
|
914
917
|
if (n.includes(".")) {
|
|
915
918
|
const s = n.split(".");
|
|
916
919
|
return [
|
|
917
920
|
`${e}${s.shift()}`,
|
|
918
|
-
...s.map((u,
|
|
921
|
+
...s.map((u, g) => `${u}${"_".repeat(g + 1)}`)
|
|
919
922
|
].join(" ");
|
|
920
923
|
}
|
|
921
924
|
return `${e}${n}`;
|
|
922
925
|
};
|
|
923
|
-
class
|
|
926
|
+
class qn {
|
|
924
927
|
/**
|
|
925
928
|
* Creates a new HTMLRenderer
|
|
926
929
|
*
|
|
@@ -935,15 +938,15 @@ class Zn {
|
|
|
935
938
|
*
|
|
936
939
|
* @param {string} text */
|
|
937
940
|
addText(e) {
|
|
938
|
-
this.buffer +=
|
|
941
|
+
this.buffer += hn(e);
|
|
939
942
|
}
|
|
940
943
|
/**
|
|
941
944
|
* Adds a node open to the output stream (if needed)
|
|
942
945
|
*
|
|
943
946
|
* @param {Node} node */
|
|
944
947
|
openNode(e) {
|
|
945
|
-
if (!
|
|
946
|
-
const s =
|
|
948
|
+
if (!en(e)) return;
|
|
949
|
+
const s = jn(
|
|
947
950
|
e.scope,
|
|
948
951
|
{ prefix: this.classPrefix }
|
|
949
952
|
);
|
|
@@ -954,7 +957,7 @@ class Zn {
|
|
|
954
957
|
*
|
|
955
958
|
* @param {Node} node */
|
|
956
959
|
closeNode(e) {
|
|
957
|
-
|
|
960
|
+
en(e) && (this.buffer += Xn);
|
|
958
961
|
}
|
|
959
962
|
/**
|
|
960
963
|
* returns the accumulated buffer
|
|
@@ -971,13 +974,13 @@ class Zn {
|
|
|
971
974
|
this.buffer += `<span class="${e}">`;
|
|
972
975
|
}
|
|
973
976
|
}
|
|
974
|
-
const
|
|
977
|
+
const nn = (n = {}) => {
|
|
975
978
|
const e = { children: [] };
|
|
976
979
|
return Object.assign(e, n), e;
|
|
977
980
|
};
|
|
978
|
-
class
|
|
981
|
+
class He {
|
|
979
982
|
constructor() {
|
|
980
|
-
this.rootNode =
|
|
983
|
+
this.rootNode = nn(), this.stack = [this.rootNode];
|
|
981
984
|
}
|
|
982
985
|
get top() {
|
|
983
986
|
return this.stack[this.stack.length - 1];
|
|
@@ -991,7 +994,7 @@ class Pe {
|
|
|
991
994
|
}
|
|
992
995
|
/** @param {string} scope */
|
|
993
996
|
openNode(e) {
|
|
994
|
-
const s =
|
|
997
|
+
const s = nn({ scope: e });
|
|
995
998
|
this.add(s), this.stack.push(s);
|
|
996
999
|
}
|
|
997
1000
|
closeNode() {
|
|
@@ -1023,11 +1026,11 @@ class Pe {
|
|
|
1023
1026
|
*/
|
|
1024
1027
|
static _collapse(e) {
|
|
1025
1028
|
typeof e != "string" && e.children && (e.children.every((s) => typeof s == "string") ? e.children = [e.children.join("")] : e.children.forEach((s) => {
|
|
1026
|
-
|
|
1029
|
+
He._collapse(s);
|
|
1027
1030
|
}));
|
|
1028
1031
|
}
|
|
1029
1032
|
}
|
|
1030
|
-
class
|
|
1033
|
+
class Jn extends He {
|
|
1031
1034
|
/**
|
|
1032
1035
|
* @param {*} options
|
|
1033
1036
|
*/
|
|
@@ -1056,7 +1059,7 @@ class Yn extends Pe {
|
|
|
1056
1059
|
s && (u.scope = `language:${s}`), this.add(u);
|
|
1057
1060
|
}
|
|
1058
1061
|
toHTML() {
|
|
1059
|
-
return new
|
|
1062
|
+
return new qn(this, this.options).value();
|
|
1060
1063
|
}
|
|
1061
1064
|
finalize() {
|
|
1062
1065
|
return this.closeAllNodes(), !0;
|
|
@@ -1065,53 +1068,53 @@ class Yn extends Pe {
|
|
|
1065
1068
|
function _e(n) {
|
|
1066
1069
|
return n ? typeof n == "string" ? n : n.source : null;
|
|
1067
1070
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
1071
|
+
function dn(n) {
|
|
1072
|
+
return ce("(?=", n, ")");
|
|
1070
1073
|
}
|
|
1071
|
-
function
|
|
1072
|
-
return
|
|
1074
|
+
function et(n) {
|
|
1075
|
+
return ce("(?:", n, ")*");
|
|
1073
1076
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return
|
|
1077
|
+
function nt(n) {
|
|
1078
|
+
return ce("(?:", n, ")?");
|
|
1076
1079
|
}
|
|
1077
|
-
function
|
|
1080
|
+
function ce(...n) {
|
|
1078
1081
|
return n.map((s) => _e(s)).join("");
|
|
1079
1082
|
}
|
|
1080
|
-
function
|
|
1083
|
+
function tt(n) {
|
|
1081
1084
|
const e = n[n.length - 1];
|
|
1082
1085
|
return typeof e == "object" && e.constructor === Object ? (n.splice(n.length - 1, 1), e) : {};
|
|
1083
1086
|
}
|
|
1084
|
-
function
|
|
1085
|
-
return "(" + (
|
|
1087
|
+
function Ge(...n) {
|
|
1088
|
+
return "(" + (tt(n).capture ? "" : "?:") + n.map((u) => _e(u)).join("|") + ")";
|
|
1086
1089
|
}
|
|
1087
|
-
function
|
|
1090
|
+
function pn(n) {
|
|
1088
1091
|
return new RegExp(n.toString() + "|").exec("").length - 1;
|
|
1089
1092
|
}
|
|
1090
|
-
function
|
|
1093
|
+
function it(n, e) {
|
|
1091
1094
|
const s = n && n.exec(e);
|
|
1092
1095
|
return s && s.index === 0;
|
|
1093
1096
|
}
|
|
1094
|
-
const
|
|
1095
|
-
function
|
|
1097
|
+
const rt = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1098
|
+
function Ke(n, { joinWith: e }) {
|
|
1096
1099
|
let s = 0;
|
|
1097
1100
|
return n.map((u) => {
|
|
1098
1101
|
s += 1;
|
|
1099
|
-
const
|
|
1100
|
-
let t = _e(u),
|
|
1102
|
+
const g = s;
|
|
1103
|
+
let t = _e(u), i = "";
|
|
1101
1104
|
for (; t.length > 0; ) {
|
|
1102
|
-
const
|
|
1103
|
-
if (!
|
|
1104
|
-
|
|
1105
|
+
const r = rt.exec(t);
|
|
1106
|
+
if (!r) {
|
|
1107
|
+
i += t;
|
|
1105
1108
|
break;
|
|
1106
1109
|
}
|
|
1107
|
-
|
|
1110
|
+
i += t.substring(0, r.index), t = t.substring(r.index + r[0].length), r[0][0] === "\\" && r[1] ? i += "\\" + String(Number(r[1]) + g) : (i += r[0], r[0] === "(" && s++);
|
|
1108
1111
|
}
|
|
1109
|
-
return
|
|
1112
|
+
return i;
|
|
1110
1113
|
}).map((u) => `(${u})`).join(e);
|
|
1111
1114
|
}
|
|
1112
|
-
const
|
|
1115
|
+
const st = /\b\B/, _n = "[a-zA-Z]\\w*", We = "[a-zA-Z_]\\w*", bn = "\\b\\d+(\\.\\d+)?", vn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", mn = "\\b(0b[01]+)", at = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", ot = (n = {}) => {
|
|
1113
1116
|
const e = /^#![ ]*\//;
|
|
1114
|
-
return n.binary && (n.begin =
|
|
1117
|
+
return n.binary && (n.begin = ce(
|
|
1115
1118
|
e,
|
|
1116
1119
|
/.*\b/,
|
|
1117
1120
|
n.binary,
|
|
@@ -1129,19 +1132,19 @@ const et = /\b\B/, gn = "[a-zA-Z]\\w*", Fe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\
|
|
|
1129
1132
|
}, be = {
|
|
1130
1133
|
begin: "\\\\[\\s\\S]",
|
|
1131
1134
|
relevance: 0
|
|
1132
|
-
},
|
|
1135
|
+
}, lt = {
|
|
1133
1136
|
scope: "string",
|
|
1134
1137
|
begin: "'",
|
|
1135
1138
|
end: "'",
|
|
1136
1139
|
illegal: "\\n",
|
|
1137
1140
|
contains: [be]
|
|
1138
|
-
},
|
|
1141
|
+
}, ct = {
|
|
1139
1142
|
scope: "string",
|
|
1140
1143
|
begin: '"',
|
|
1141
1144
|
end: '"',
|
|
1142
1145
|
illegal: "\\n",
|
|
1143
1146
|
contains: [be]
|
|
1144
|
-
},
|
|
1147
|
+
}, ut = {
|
|
1145
1148
|
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/
|
|
1146
1149
|
}, De = function(n, e, s = {}) {
|
|
1147
1150
|
const u = re(
|
|
@@ -1162,7 +1165,7 @@ const et = /\b\B/, gn = "[a-zA-Z]\\w*", Fe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\
|
|
|
1162
1165
|
excludeBegin: !0,
|
|
1163
1166
|
relevance: 0
|
|
1164
1167
|
});
|
|
1165
|
-
const
|
|
1168
|
+
const g = Ge(
|
|
1166
1169
|
// list of common 1 and 2 letter words in English
|
|
1167
1170
|
"I",
|
|
1168
1171
|
"a",
|
|
@@ -1198,30 +1201,30 @@ const et = /\b\B/, gn = "[a-zA-Z]\\w*", Fe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\
|
|
|
1198
1201
|
//
|
|
1199
1202
|
// for a visual example please see:
|
|
1200
1203
|
// https://github.com/highlightjs/highlight.js/issues/2827
|
|
1201
|
-
begin:
|
|
1204
|
+
begin: ce(
|
|
1202
1205
|
/[ ]+/,
|
|
1203
1206
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
1204
1207
|
"(",
|
|
1205
|
-
|
|
1208
|
+
g,
|
|
1206
1209
|
/[.]?[:]?([.][ ]|[ ])/,
|
|
1207
1210
|
"){3}"
|
|
1208
1211
|
)
|
|
1209
1212
|
// look for 3 words in a row
|
|
1210
1213
|
}
|
|
1211
1214
|
), u;
|
|
1212
|
-
},
|
|
1215
|
+
}, ft = De("//", "$"), gt = De("/\\*", "\\*/"), ht = De("#", "$"), dt = {
|
|
1213
1216
|
scope: "number",
|
|
1214
|
-
begin:
|
|
1217
|
+
begin: bn,
|
|
1215
1218
|
relevance: 0
|
|
1216
|
-
},
|
|
1219
|
+
}, pt = {
|
|
1217
1220
|
scope: "number",
|
|
1218
|
-
begin:
|
|
1221
|
+
begin: vn,
|
|
1219
1222
|
relevance: 0
|
|
1220
|
-
},
|
|
1223
|
+
}, _t = {
|
|
1221
1224
|
scope: "number",
|
|
1222
|
-
begin:
|
|
1225
|
+
begin: mn,
|
|
1223
1226
|
relevance: 0
|
|
1224
|
-
},
|
|
1227
|
+
}, bt = {
|
|
1225
1228
|
scope: "regexp",
|
|
1226
1229
|
begin: /\/(?=[^/\n]*\/)/,
|
|
1227
1230
|
end: /\/[gimuy]*/,
|
|
@@ -1234,19 +1237,19 @@ const et = /\b\B/, gn = "[a-zA-Z]\\w*", Fe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\
|
|
|
1234
1237
|
contains: [be]
|
|
1235
1238
|
}
|
|
1236
1239
|
]
|
|
1237
|
-
},
|
|
1240
|
+
}, vt = {
|
|
1238
1241
|
scope: "title",
|
|
1239
|
-
begin:
|
|
1242
|
+
begin: _n,
|
|
1240
1243
|
relevance: 0
|
|
1241
|
-
},
|
|
1244
|
+
}, mt = {
|
|
1242
1245
|
scope: "title",
|
|
1243
|
-
begin:
|
|
1246
|
+
begin: We,
|
|
1244
1247
|
relevance: 0
|
|
1245
|
-
},
|
|
1248
|
+
}, Et = {
|
|
1246
1249
|
// excludes method names from keyword processing
|
|
1247
|
-
begin: "\\.\\s*" +
|
|
1250
|
+
begin: "\\.\\s*" + We,
|
|
1248
1251
|
relevance: 0
|
|
1249
|
-
},
|
|
1252
|
+
}, yt = function(n) {
|
|
1250
1253
|
return Object.assign(
|
|
1251
1254
|
n,
|
|
1252
1255
|
{
|
|
@@ -1263,65 +1266,65 @@ const et = /\b\B/, gn = "[a-zA-Z]\\w*", Fe = "[a-zA-Z_]\\w*", hn = "\\b\\d+(\\.\
|
|
|
1263
1266
|
};
|
|
1264
1267
|
var ye = /* @__PURE__ */ Object.freeze({
|
|
1265
1268
|
__proto__: null,
|
|
1266
|
-
APOS_STRING_MODE:
|
|
1269
|
+
APOS_STRING_MODE: lt,
|
|
1267
1270
|
BACKSLASH_ESCAPE: be,
|
|
1268
|
-
BINARY_NUMBER_MODE:
|
|
1269
|
-
BINARY_NUMBER_RE:
|
|
1271
|
+
BINARY_NUMBER_MODE: _t,
|
|
1272
|
+
BINARY_NUMBER_RE: mn,
|
|
1270
1273
|
COMMENT: De,
|
|
1271
|
-
C_BLOCK_COMMENT_MODE:
|
|
1272
|
-
C_LINE_COMMENT_MODE:
|
|
1273
|
-
C_NUMBER_MODE:
|
|
1274
|
-
C_NUMBER_RE:
|
|
1275
|
-
END_SAME_AS_BEGIN:
|
|
1276
|
-
HASH_COMMENT_MODE:
|
|
1277
|
-
IDENT_RE:
|
|
1278
|
-
MATCH_NOTHING_RE:
|
|
1279
|
-
METHOD_GUARD:
|
|
1280
|
-
NUMBER_MODE:
|
|
1281
|
-
NUMBER_RE:
|
|
1282
|
-
PHRASAL_WORDS_MODE:
|
|
1283
|
-
QUOTE_STRING_MODE:
|
|
1284
|
-
REGEXP_MODE:
|
|
1285
|
-
RE_STARTERS_RE:
|
|
1286
|
-
SHEBANG:
|
|
1287
|
-
TITLE_MODE:
|
|
1288
|
-
UNDERSCORE_IDENT_RE:
|
|
1289
|
-
UNDERSCORE_TITLE_MODE:
|
|
1274
|
+
C_BLOCK_COMMENT_MODE: gt,
|
|
1275
|
+
C_LINE_COMMENT_MODE: ft,
|
|
1276
|
+
C_NUMBER_MODE: pt,
|
|
1277
|
+
C_NUMBER_RE: vn,
|
|
1278
|
+
END_SAME_AS_BEGIN: yt,
|
|
1279
|
+
HASH_COMMENT_MODE: ht,
|
|
1280
|
+
IDENT_RE: _n,
|
|
1281
|
+
MATCH_NOTHING_RE: st,
|
|
1282
|
+
METHOD_GUARD: Et,
|
|
1283
|
+
NUMBER_MODE: dt,
|
|
1284
|
+
NUMBER_RE: bn,
|
|
1285
|
+
PHRASAL_WORDS_MODE: ut,
|
|
1286
|
+
QUOTE_STRING_MODE: ct,
|
|
1287
|
+
REGEXP_MODE: bt,
|
|
1288
|
+
RE_STARTERS_RE: at,
|
|
1289
|
+
SHEBANG: ot,
|
|
1290
|
+
TITLE_MODE: vt,
|
|
1291
|
+
UNDERSCORE_IDENT_RE: We,
|
|
1292
|
+
UNDERSCORE_TITLE_MODE: mt
|
|
1290
1293
|
});
|
|
1291
|
-
function
|
|
1294
|
+
function wt(n, e) {
|
|
1292
1295
|
n.input[n.index - 1] === "." && e.ignoreMatch();
|
|
1293
1296
|
}
|
|
1294
|
-
function
|
|
1297
|
+
function At(n, e) {
|
|
1295
1298
|
n.className !== void 0 && (n.scope = n.className, delete n.className);
|
|
1296
1299
|
}
|
|
1297
|
-
function
|
|
1298
|
-
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin =
|
|
1300
|
+
function Nt(n, e) {
|
|
1301
|
+
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin = wt, n.keywords = n.keywords || n.beginKeywords, delete n.beginKeywords, n.relevance === void 0 && (n.relevance = 0));
|
|
1299
1302
|
}
|
|
1300
|
-
function
|
|
1301
|
-
Array.isArray(n.illegal) && (n.illegal =
|
|
1303
|
+
function Mt(n, e) {
|
|
1304
|
+
Array.isArray(n.illegal) && (n.illegal = Ge(...n.illegal));
|
|
1302
1305
|
}
|
|
1303
|
-
function
|
|
1306
|
+
function Tt(n, e) {
|
|
1304
1307
|
if (n.match) {
|
|
1305
1308
|
if (n.begin || n.end) throw new Error("begin & end are not supported with match");
|
|
1306
1309
|
n.begin = n.match, delete n.match;
|
|
1307
1310
|
}
|
|
1308
1311
|
}
|
|
1309
|
-
function
|
|
1312
|
+
function Dt(n, e) {
|
|
1310
1313
|
n.relevance === void 0 && (n.relevance = 1);
|
|
1311
1314
|
}
|
|
1312
|
-
const
|
|
1315
|
+
const St = (n, e) => {
|
|
1313
1316
|
if (!n.beforeMatch) return;
|
|
1314
1317
|
if (n.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
1315
1318
|
const s = Object.assign({}, n);
|
|
1316
1319
|
Object.keys(n).forEach((u) => {
|
|
1317
1320
|
delete n[u];
|
|
1318
|
-
}), n.keywords = s.keywords, n.begin =
|
|
1321
|
+
}), n.keywords = s.keywords, n.begin = ce(s.beforeMatch, dn(s.begin)), n.starts = {
|
|
1319
1322
|
relevance: 0,
|
|
1320
1323
|
contains: [
|
|
1321
1324
|
Object.assign(s, { endsParent: !0 })
|
|
1322
1325
|
]
|
|
1323
1326
|
}, n.relevance = 0, delete s.beforeMatch;
|
|
1324
|
-
},
|
|
1327
|
+
}, Ct = [
|
|
1325
1328
|
"of",
|
|
1326
1329
|
"and",
|
|
1327
1330
|
"for",
|
|
@@ -1336,71 +1339,71 @@ const At = (n, e) => {
|
|
|
1336
1339
|
// common variable name
|
|
1337
1340
|
"value"
|
|
1338
1341
|
// common variable name
|
|
1339
|
-
],
|
|
1340
|
-
function
|
|
1342
|
+
], Lt = "keyword";
|
|
1343
|
+
function En(n, e, s = Lt) {
|
|
1341
1344
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1342
|
-
return typeof n == "string" ?
|
|
1345
|
+
return typeof n == "string" ? g(s, n.split(" ")) : Array.isArray(n) ? g(s, n) : Object.keys(n).forEach(function(t) {
|
|
1343
1346
|
Object.assign(
|
|
1344
1347
|
u,
|
|
1345
|
-
|
|
1348
|
+
En(n[t], e, t)
|
|
1346
1349
|
);
|
|
1347
1350
|
}), u;
|
|
1348
|
-
function
|
|
1349
|
-
e && (
|
|
1350
|
-
const a =
|
|
1351
|
-
u[a[0]] = [t,
|
|
1351
|
+
function g(t, i) {
|
|
1352
|
+
e && (i = i.map((r) => r.toLowerCase())), i.forEach(function(r) {
|
|
1353
|
+
const a = r.split("|");
|
|
1354
|
+
u[a[0]] = [t, Rt(a[0], a[1])];
|
|
1352
1355
|
});
|
|
1353
1356
|
}
|
|
1354
1357
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return e ? Number(e) :
|
|
1358
|
+
function Rt(n, e) {
|
|
1359
|
+
return e ? Number(e) : Ot(n) ? 0 : 1;
|
|
1357
1360
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return
|
|
1361
|
+
function Ot(n) {
|
|
1362
|
+
return Ct.includes(n.toLowerCase());
|
|
1360
1363
|
}
|
|
1361
|
-
const
|
|
1364
|
+
const tn = {}, le = (n) => {
|
|
1362
1365
|
console.error(n);
|
|
1363
|
-
},
|
|
1366
|
+
}, rn = (n, ...e) => {
|
|
1364
1367
|
console.log(`WARN: ${n}`, ...e);
|
|
1365
|
-
},
|
|
1366
|
-
|
|
1368
|
+
}, fe = (n, e) => {
|
|
1369
|
+
tn[`${n}/${e}`] || (console.log(`Deprecated as of ${n}. ${e}`), tn[`${n}/${e}`] = !0);
|
|
1367
1370
|
}, Te = new Error();
|
|
1368
|
-
function
|
|
1371
|
+
function yn(n, e, { key: s }) {
|
|
1369
1372
|
let u = 0;
|
|
1370
|
-
const
|
|
1371
|
-
for (let
|
|
1372
|
-
r
|
|
1373
|
-
n[s] =
|
|
1373
|
+
const g = n[s], t = {}, i = {};
|
|
1374
|
+
for (let r = 1; r <= e.length; r++)
|
|
1375
|
+
i[r + u] = g[r], t[r + u] = !0, u += pn(e[r - 1]);
|
|
1376
|
+
n[s] = i, n[s]._emit = t, n[s]._multi = !0;
|
|
1374
1377
|
}
|
|
1375
|
-
function
|
|
1378
|
+
function It(n) {
|
|
1376
1379
|
if (Array.isArray(n.begin)) {
|
|
1377
1380
|
if (n.skip || n.excludeBegin || n.returnBegin)
|
|
1378
|
-
throw
|
|
1381
|
+
throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Te;
|
|
1379
1382
|
if (typeof n.beginScope != "object" || n.beginScope === null)
|
|
1380
|
-
throw
|
|
1381
|
-
|
|
1383
|
+
throw le("beginScope must be object"), Te;
|
|
1384
|
+
yn(n, n.begin, { key: "beginScope" }), n.begin = Ke(n.begin, { joinWith: "" });
|
|
1382
1385
|
}
|
|
1383
1386
|
}
|
|
1384
|
-
function
|
|
1387
|
+
function kt(n) {
|
|
1385
1388
|
if (Array.isArray(n.end)) {
|
|
1386
1389
|
if (n.skip || n.excludeEnd || n.returnEnd)
|
|
1387
|
-
throw
|
|
1390
|
+
throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Te;
|
|
1388
1391
|
if (typeof n.endScope != "object" || n.endScope === null)
|
|
1389
|
-
throw
|
|
1390
|
-
|
|
1392
|
+
throw le("endScope must be object"), Te;
|
|
1393
|
+
yn(n, n.end, { key: "endScope" }), n.end = Ke(n.end, { joinWith: "" });
|
|
1391
1394
|
}
|
|
1392
1395
|
}
|
|
1393
|
-
function
|
|
1396
|
+
function Bt(n) {
|
|
1394
1397
|
n.scope && typeof n.scope == "object" && n.scope !== null && (n.beginScope = n.scope, delete n.scope);
|
|
1395
1398
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1399
|
+
function $t(n) {
|
|
1400
|
+
Bt(n), typeof n.beginScope == "string" && (n.beginScope = { _wrap: n.beginScope }), typeof n.endScope == "string" && (n.endScope = { _wrap: n.endScope }), It(n), kt(n);
|
|
1398
1401
|
}
|
|
1399
|
-
function
|
|
1400
|
-
function e(
|
|
1402
|
+
function xt(n) {
|
|
1403
|
+
function e(i, r) {
|
|
1401
1404
|
return new RegExp(
|
|
1402
|
-
_e(
|
|
1403
|
-
"m" + (n.case_insensitive ? "i" : "") + (n.unicodeRegex ? "u" : "") + (
|
|
1405
|
+
_e(i),
|
|
1406
|
+
"m" + (n.case_insensitive ? "i" : "") + (n.unicodeRegex ? "u" : "") + (r ? "g" : "")
|
|
1404
1407
|
);
|
|
1405
1408
|
}
|
|
1406
1409
|
class s {
|
|
@@ -1408,22 +1411,22 @@ function Ot(n) {
|
|
|
1408
1411
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
1409
1412
|
}
|
|
1410
1413
|
// @ts-ignore
|
|
1411
|
-
addRule(
|
|
1412
|
-
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a,
|
|
1414
|
+
addRule(r, a) {
|
|
1415
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, r]), this.matchAt += pn(r) + 1;
|
|
1413
1416
|
}
|
|
1414
1417
|
compile() {
|
|
1415
1418
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1416
|
-
const
|
|
1417
|
-
this.matcherRe = e(
|
|
1419
|
+
const r = this.regexes.map((a) => a[1]);
|
|
1420
|
+
this.matcherRe = e(Ke(r, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1418
1421
|
}
|
|
1419
1422
|
/** @param {string} s */
|
|
1420
|
-
exec(
|
|
1423
|
+
exec(r) {
|
|
1421
1424
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
1422
|
-
const a = this.matcherRe.exec(
|
|
1425
|
+
const a = this.matcherRe.exec(r);
|
|
1423
1426
|
if (!a)
|
|
1424
1427
|
return null;
|
|
1425
|
-
const
|
|
1426
|
-
return a.splice(0,
|
|
1428
|
+
const l = a.findIndex((c, f) => f > 0 && c !== void 0), o = this.matchIndexes[l];
|
|
1429
|
+
return a.splice(0, l), Object.assign(a, o);
|
|
1427
1430
|
}
|
|
1428
1431
|
}
|
|
1429
1432
|
class u {
|
|
@@ -1431,10 +1434,10 @@ function Ot(n) {
|
|
|
1431
1434
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
1432
1435
|
}
|
|
1433
1436
|
// @ts-ignore
|
|
1434
|
-
getMatcher(
|
|
1435
|
-
if (this.multiRegexes[
|
|
1437
|
+
getMatcher(r) {
|
|
1438
|
+
if (this.multiRegexes[r]) return this.multiRegexes[r];
|
|
1436
1439
|
const a = new s();
|
|
1437
|
-
return this.rules.slice(
|
|
1440
|
+
return this.rules.slice(r).forEach(([l, o]) => a.addRule(l, o)), a.compile(), this.multiRegexes[r] = a, a;
|
|
1438
1441
|
}
|
|
1439
1442
|
resumingScanAtSamePosition() {
|
|
1440
1443
|
return this.regexIndex !== 0;
|
|
@@ -1443,59 +1446,59 @@ function Ot(n) {
|
|
|
1443
1446
|
this.regexIndex = 0;
|
|
1444
1447
|
}
|
|
1445
1448
|
// @ts-ignore
|
|
1446
|
-
addRule(
|
|
1447
|
-
this.rules.push([
|
|
1449
|
+
addRule(r, a) {
|
|
1450
|
+
this.rules.push([r, a]), a.type === "begin" && this.count++;
|
|
1448
1451
|
}
|
|
1449
1452
|
/** @param {string} s */
|
|
1450
|
-
exec(
|
|
1453
|
+
exec(r) {
|
|
1451
1454
|
const a = this.getMatcher(this.regexIndex);
|
|
1452
1455
|
a.lastIndex = this.lastIndex;
|
|
1453
|
-
let
|
|
1454
|
-
if (this.resumingScanAtSamePosition() && !(
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1456
|
+
let l = a.exec(r);
|
|
1457
|
+
if (this.resumingScanAtSamePosition() && !(l && l.index === this.lastIndex)) {
|
|
1458
|
+
const o = this.getMatcher(0);
|
|
1459
|
+
o.lastIndex = this.lastIndex + 1, l = o.exec(r);
|
|
1457
1460
|
}
|
|
1458
|
-
return
|
|
1461
|
+
return l && (this.regexIndex += l.position + 1, this.regexIndex === this.count && this.considerAll()), l;
|
|
1459
1462
|
}
|
|
1460
1463
|
}
|
|
1461
|
-
function
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1464
|
+
function g(i) {
|
|
1465
|
+
const r = new u();
|
|
1466
|
+
return i.contains.forEach((a) => r.addRule(a.begin, { rule: a, type: "begin" })), i.terminatorEnd && r.addRule(i.terminatorEnd, { type: "end" }), i.illegal && r.addRule(i.illegal, { type: "illegal" }), r;
|
|
1464
1467
|
}
|
|
1465
|
-
function t(
|
|
1468
|
+
function t(i, r) {
|
|
1466
1469
|
const a = (
|
|
1467
1470
|
/** @type CompiledMode */
|
|
1468
|
-
|
|
1471
|
+
i
|
|
1469
1472
|
);
|
|
1470
|
-
if (
|
|
1473
|
+
if (i.isCompiled) return a;
|
|
1471
1474
|
[
|
|
1472
|
-
|
|
1475
|
+
At,
|
|
1473
1476
|
// do this early so compiler extensions generally don't have to worry about
|
|
1474
1477
|
// the distinction between match/begin
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
].forEach((
|
|
1479
|
-
|
|
1478
|
+
Tt,
|
|
1479
|
+
$t,
|
|
1480
|
+
St
|
|
1481
|
+
].forEach((o) => o(i, r)), n.compilerExtensions.forEach((o) => o(i, r)), i.__beforeBegin = null, [
|
|
1482
|
+
Nt,
|
|
1480
1483
|
// do this later so compiler extensions that come earlier have access to the
|
|
1481
1484
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1482
|
-
|
|
1485
|
+
Mt,
|
|
1483
1486
|
// default to 1 relevance if not specified
|
|
1484
|
-
|
|
1485
|
-
].forEach((
|
|
1486
|
-
let
|
|
1487
|
-
return typeof
|
|
1487
|
+
Dt
|
|
1488
|
+
].forEach((o) => o(i, r)), i.isCompiled = !0;
|
|
1489
|
+
let l = null;
|
|
1490
|
+
return typeof i.keywords == "object" && i.keywords.$pattern && (i.keywords = Object.assign({}, i.keywords), l = i.keywords.$pattern, delete i.keywords.$pattern), l = l || /\w+/, i.keywords && (i.keywords = En(i.keywords, n.case_insensitive)), a.keywordPatternRe = e(l, !0), r && (i.begin || (i.begin = /\B|\b/), a.beginRe = e(a.begin), !i.end && !i.endsWithParent && (i.end = /\B|\b/), i.end && (a.endRe = e(a.end)), a.terminatorEnd = _e(a.end) || "", i.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (i.end ? "|" : "") + r.terminatorEnd)), i.illegal && (a.illegalRe = e(
|
|
1488
1491
|
/** @type {RegExp | string} */
|
|
1489
|
-
|
|
1490
|
-
)),
|
|
1491
|
-
return
|
|
1492
|
-
})),
|
|
1492
|
+
i.illegal
|
|
1493
|
+
)), i.contains || (i.contains = []), i.contains = [].concat(...i.contains.map(function(o) {
|
|
1494
|
+
return Pt(o === "self" ? i : o);
|
|
1495
|
+
})), i.contains.forEach(function(o) {
|
|
1493
1496
|
t(
|
|
1494
1497
|
/** @type Mode */
|
|
1495
|
-
|
|
1498
|
+
o,
|
|
1496
1499
|
a
|
|
1497
1500
|
);
|
|
1498
|
-
}),
|
|
1501
|
+
}), i.starts && t(i.starts, r), a.matcher = g(a), a;
|
|
1499
1502
|
}
|
|
1500
1503
|
if (n.compilerExtensions || (n.compilerExtensions = []), n.contains && n.contains.includes("self"))
|
|
1501
1504
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -1504,25 +1507,25 @@ function Ot(n) {
|
|
|
1504
1507
|
n
|
|
1505
1508
|
);
|
|
1506
1509
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return n ? n.endsWithParent ||
|
|
1510
|
+
function wn(n) {
|
|
1511
|
+
return n ? n.endsWithParent || wn(n.starts) : !1;
|
|
1509
1512
|
}
|
|
1510
|
-
function
|
|
1513
|
+
function Pt(n) {
|
|
1511
1514
|
return n.variants && !n.cachedVariants && (n.cachedVariants = n.variants.map(function(e) {
|
|
1512
1515
|
return re(n, { variants: null }, e);
|
|
1513
|
-
})), n.cachedVariants ? n.cachedVariants :
|
|
1516
|
+
})), n.cachedVariants ? n.cachedVariants : wn(n) ? re(n, { starts: n.starts ? re(n.starts) : null }) : Object.isFrozen(n) ? re(n) : n;
|
|
1514
1517
|
}
|
|
1515
|
-
var
|
|
1516
|
-
class
|
|
1518
|
+
var Ut = "11.10.0";
|
|
1519
|
+
class Ft extends Error {
|
|
1517
1520
|
constructor(e, s) {
|
|
1518
1521
|
super(e), this.name = "HTMLInjectionError", this.html = s;
|
|
1519
1522
|
}
|
|
1520
1523
|
}
|
|
1521
|
-
const
|
|
1524
|
+
const Oe = hn, sn = re, an = Symbol("nomatch"), zt = 7, An = function(n) {
|
|
1522
1525
|
const e = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null), u = [];
|
|
1523
|
-
let
|
|
1524
|
-
const t = "Could not find the language '{}', did you forget to load/include a language module?",
|
|
1525
|
-
let
|
|
1526
|
+
let g = !0;
|
|
1527
|
+
const t = "Could not find the language '{}', did you forget to load/include a language module?", i = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1528
|
+
let r = {
|
|
1526
1529
|
ignoreUnescapedHTML: !1,
|
|
1527
1530
|
throwUnescapedHTML: !1,
|
|
1528
1531
|
noHighlightRe: /^(no-?highlight)$/i,
|
|
@@ -1532,278 +1535,278 @@ const Ie = cn, Je = re, en = Symbol("nomatch"), $t = 7, mn = function(n) {
|
|
|
1532
1535
|
languages: null,
|
|
1533
1536
|
// beta configuration options, subject to change, welcome to discuss
|
|
1534
1537
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1535
|
-
__emitter:
|
|
1538
|
+
__emitter: Jn
|
|
1536
1539
|
};
|
|
1537
1540
|
function a(b) {
|
|
1538
|
-
return
|
|
1541
|
+
return r.noHighlightRe.test(b);
|
|
1539
1542
|
}
|
|
1540
|
-
function
|
|
1543
|
+
function l(b) {
|
|
1541
1544
|
let A = b.className + " ";
|
|
1542
1545
|
A += b.parentNode ? b.parentNode.className : "";
|
|
1543
|
-
const
|
|
1544
|
-
if (
|
|
1545
|
-
const
|
|
1546
|
-
return
|
|
1546
|
+
const R = r.languageDetectRe.exec(A);
|
|
1547
|
+
if (R) {
|
|
1548
|
+
const $ = N(R[1]);
|
|
1549
|
+
return $ || (rn(t.replace("{}", R[1])), rn("Falling back to no-highlight mode for this block.", b)), $ ? R[1] : "no-highlight";
|
|
1547
1550
|
}
|
|
1548
|
-
return A.split(/\s+/).find((
|
|
1551
|
+
return A.split(/\s+/).find(($) => a($) || N($));
|
|
1549
1552
|
}
|
|
1550
|
-
function
|
|
1551
|
-
let
|
|
1552
|
-
typeof A == "object" ? (
|
|
1553
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), F = b,
|
|
1553
|
+
function o(b, A, R) {
|
|
1554
|
+
let $ = "", F = "";
|
|
1555
|
+
typeof A == "object" ? ($ = b, R = A.ignoreIllegals, F = A.language) : (fe("10.7.0", "highlight(lang, code, ...args) has been deprecated."), fe("10.7.0", `Please use highlight(code, options) instead.
|
|
1556
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), F = b, $ = A), R === void 0 && (R = !0);
|
|
1554
1557
|
const W = {
|
|
1555
|
-
code:
|
|
1558
|
+
code: $,
|
|
1556
1559
|
language: F
|
|
1557
1560
|
};
|
|
1558
|
-
|
|
1559
|
-
const V = W.result ? W.result : c(W.language, W.code,
|
|
1560
|
-
return V.code = W.code,
|
|
1561
|
+
ie("before:highlight", W);
|
|
1562
|
+
const V = W.result ? W.result : c(W.language, W.code, R);
|
|
1563
|
+
return V.code = W.code, ie("after:highlight", V), V;
|
|
1561
1564
|
}
|
|
1562
|
-
function c(b, A,
|
|
1565
|
+
function c(b, A, R, $) {
|
|
1563
1566
|
const F = /* @__PURE__ */ Object.create(null);
|
|
1564
|
-
function W(w,
|
|
1565
|
-
return w.keywords[
|
|
1567
|
+
function W(w, C) {
|
|
1568
|
+
return w.keywords[C];
|
|
1566
1569
|
}
|
|
1567
1570
|
function V() {
|
|
1568
|
-
if (!
|
|
1569
|
-
|
|
1571
|
+
if (!O.keywords) {
|
|
1572
|
+
H.addText(U);
|
|
1570
1573
|
return;
|
|
1571
1574
|
}
|
|
1572
1575
|
let w = 0;
|
|
1573
|
-
|
|
1574
|
-
let
|
|
1575
|
-
for (;
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1576
|
+
O.keywordPatternRe.lastIndex = 0;
|
|
1577
|
+
let C = O.keywordPatternRe.exec(U), I = "";
|
|
1578
|
+
for (; C; ) {
|
|
1579
|
+
I += U.substring(w, C.index);
|
|
1580
|
+
const P = q.case_insensitive ? C[0].toLowerCase() : C[0], G = W(O, P);
|
|
1578
1581
|
if (G) {
|
|
1579
|
-
const [
|
|
1580
|
-
if (
|
|
1581
|
-
|
|
1582
|
+
const [ne, xn] = G;
|
|
1583
|
+
if (H.addText(I), I = "", F[P] = (F[P] || 0) + 1, F[P] <= zt && (Ee += xn), ne.startsWith("_"))
|
|
1584
|
+
I += C[0];
|
|
1582
1585
|
else {
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1586
|
+
const Pn = q.classNameAliases[ne] || ne;
|
|
1587
|
+
j(C[0], Pn);
|
|
1585
1588
|
}
|
|
1586
1589
|
} else
|
|
1587
|
-
|
|
1588
|
-
w =
|
|
1590
|
+
I += C[0];
|
|
1591
|
+
w = O.keywordPatternRe.lastIndex, C = O.keywordPatternRe.exec(U);
|
|
1589
1592
|
}
|
|
1590
|
-
|
|
1593
|
+
I += U.substring(w), H.addText(I);
|
|
1591
1594
|
}
|
|
1592
1595
|
function ve() {
|
|
1593
|
-
if (
|
|
1596
|
+
if (U === "") return;
|
|
1594
1597
|
let w = null;
|
|
1595
|
-
if (typeof
|
|
1596
|
-
if (!e[
|
|
1597
|
-
|
|
1598
|
+
if (typeof O.subLanguage == "string") {
|
|
1599
|
+
if (!e[O.subLanguage]) {
|
|
1600
|
+
H.addText(U);
|
|
1598
1601
|
return;
|
|
1599
1602
|
}
|
|
1600
|
-
w = c(
|
|
1603
|
+
w = c(O.subLanguage, U, !0, Xe[O.subLanguage]), Xe[O.subLanguage] = /** @type {CompiledMode} */
|
|
1601
1604
|
w._top;
|
|
1602
1605
|
} else
|
|
1603
|
-
w = d(
|
|
1604
|
-
|
|
1606
|
+
w = d(U, O.subLanguage.length ? O.subLanguage : null);
|
|
1607
|
+
O.relevance > 0 && (Ee += w.relevance), H.__addSublanguage(w._emitter, w.language);
|
|
1605
1608
|
}
|
|
1606
1609
|
function Q() {
|
|
1607
|
-
|
|
1610
|
+
O.subLanguage != null ? ve() : V(), U = "";
|
|
1608
1611
|
}
|
|
1609
|
-
function
|
|
1610
|
-
w !== "" && (
|
|
1612
|
+
function j(w, C) {
|
|
1613
|
+
w !== "" && (H.startScope(C), H.addText(w), H.endScope());
|
|
1611
1614
|
}
|
|
1612
|
-
function
|
|
1613
|
-
let
|
|
1614
|
-
const
|
|
1615
|
-
for (;
|
|
1616
|
-
if (!w._emit[
|
|
1617
|
-
|
|
1615
|
+
function Qe(w, C) {
|
|
1616
|
+
let I = 1;
|
|
1617
|
+
const P = C.length - 1;
|
|
1618
|
+
for (; I <= P; ) {
|
|
1619
|
+
if (!w._emit[I]) {
|
|
1620
|
+
I++;
|
|
1618
1621
|
continue;
|
|
1619
1622
|
}
|
|
1620
|
-
const G =
|
|
1621
|
-
G ?
|
|
1623
|
+
const G = q.classNameAliases[w[I]] || w[I], ne = C[I];
|
|
1624
|
+
G ? j(ne, G) : (U = ne, V(), U = ""), I++;
|
|
1622
1625
|
}
|
|
1623
1626
|
}
|
|
1624
|
-
function
|
|
1625
|
-
return w.scope && typeof w.scope == "string" &&
|
|
1627
|
+
function Ze(w, C) {
|
|
1628
|
+
return w.scope && typeof w.scope == "string" && H.openNode(q.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (j(U, q.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), U = "") : w.beginScope._multi && (Qe(w.beginScope, C), U = "")), O = Object.create(w, { parent: { value: O } }), O;
|
|
1626
1629
|
}
|
|
1627
|
-
function
|
|
1628
|
-
let
|
|
1629
|
-
if (
|
|
1630
|
+
function Ye(w, C, I) {
|
|
1631
|
+
let P = it(w.endRe, I);
|
|
1632
|
+
if (P) {
|
|
1630
1633
|
if (w["on:end"]) {
|
|
1631
|
-
const G = new
|
|
1632
|
-
w["on:end"](
|
|
1634
|
+
const G = new Je(w);
|
|
1635
|
+
w["on:end"](C, G), G.isMatchIgnored && (P = !1);
|
|
1633
1636
|
}
|
|
1634
|
-
if (
|
|
1637
|
+
if (P) {
|
|
1635
1638
|
for (; w.endsParent && w.parent; )
|
|
1636
1639
|
w = w.parent;
|
|
1637
1640
|
return w;
|
|
1638
1641
|
}
|
|
1639
1642
|
}
|
|
1640
1643
|
if (w.endsWithParent)
|
|
1641
|
-
return
|
|
1644
|
+
return Ye(w.parent, C, I);
|
|
1642
1645
|
}
|
|
1643
|
-
function
|
|
1644
|
-
return
|
|
1646
|
+
function On(w) {
|
|
1647
|
+
return O.matcher.regexIndex === 0 ? (U += w[0], 1) : (Le = !0, 0);
|
|
1645
1648
|
}
|
|
1646
|
-
function
|
|
1647
|
-
const
|
|
1648
|
-
for (const
|
|
1649
|
-
if (
|
|
1650
|
-
return
|
|
1651
|
-
return
|
|
1649
|
+
function In(w) {
|
|
1650
|
+
const C = w[0], I = w.rule, P = new Je(I), G = [I.__beforeBegin, I["on:begin"]];
|
|
1651
|
+
for (const ne of G)
|
|
1652
|
+
if (ne && (ne(w, P), P.isMatchIgnored))
|
|
1653
|
+
return On(C);
|
|
1654
|
+
return I.skip ? U += C : (I.excludeBegin && (U += C), Q(), !I.returnBegin && !I.excludeBegin && (U = C)), Ze(I, w), I.returnBegin ? 0 : C.length;
|
|
1652
1655
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const
|
|
1655
|
-
if (!
|
|
1656
|
-
return
|
|
1657
|
-
const G =
|
|
1658
|
-
|
|
1656
|
+
function kn(w) {
|
|
1657
|
+
const C = w[0], I = A.substring(w.index), P = Ye(O, w, I);
|
|
1658
|
+
if (!P)
|
|
1659
|
+
return an;
|
|
1660
|
+
const G = O;
|
|
1661
|
+
O.endScope && O.endScope._wrap ? (Q(), j(C, O.endScope._wrap)) : O.endScope && O.endScope._multi ? (Q(), Qe(O.endScope, w)) : G.skip ? U += C : (G.returnEnd || G.excludeEnd || (U += C), Q(), G.excludeEnd && (U = C));
|
|
1659
1662
|
do
|
|
1660
|
-
|
|
1661
|
-
while (
|
|
1662
|
-
return
|
|
1663
|
+
O.scope && H.closeNode(), !O.skip && !O.subLanguage && (Ee += O.relevance), O = O.parent;
|
|
1664
|
+
while (O !== P.parent);
|
|
1665
|
+
return P.starts && Ze(P.starts, w), G.returnEnd ? 0 : C.length;
|
|
1663
1666
|
}
|
|
1664
|
-
function
|
|
1667
|
+
function Bn() {
|
|
1665
1668
|
const w = [];
|
|
1666
|
-
for (let
|
|
1667
|
-
|
|
1668
|
-
w.forEach((
|
|
1669
|
+
for (let C = O; C !== q; C = C.parent)
|
|
1670
|
+
C.scope && w.unshift(C.scope);
|
|
1671
|
+
w.forEach((C) => H.openNode(C));
|
|
1669
1672
|
}
|
|
1670
1673
|
let me = {};
|
|
1671
|
-
function
|
|
1672
|
-
const
|
|
1673
|
-
if (
|
|
1674
|
+
function Ve(w, C) {
|
|
1675
|
+
const I = C && C[0];
|
|
1676
|
+
if (U += w, I == null)
|
|
1674
1677
|
return Q(), 0;
|
|
1675
|
-
if (me.type === "begin" &&
|
|
1676
|
-
if (
|
|
1677
|
-
const
|
|
1678
|
-
throw
|
|
1678
|
+
if (me.type === "begin" && C.type === "end" && me.index === C.index && I === "") {
|
|
1679
|
+
if (U += A.slice(C.index, C.index + 1), !g) {
|
|
1680
|
+
const P = new Error(`0 width match regex (${b})`);
|
|
1681
|
+
throw P.languageName = b, P.badRule = me.rule, P;
|
|
1679
1682
|
}
|
|
1680
1683
|
return 1;
|
|
1681
1684
|
}
|
|
1682
|
-
if (me =
|
|
1683
|
-
return
|
|
1684
|
-
if (
|
|
1685
|
-
const
|
|
1686
|
-
throw
|
|
1687
|
-
} else if (
|
|
1688
|
-
const
|
|
1689
|
-
if (
|
|
1690
|
-
return
|
|
1685
|
+
if (me = C, C.type === "begin")
|
|
1686
|
+
return In(C);
|
|
1687
|
+
if (C.type === "illegal" && !R) {
|
|
1688
|
+
const P = new Error('Illegal lexeme "' + I + '" for mode "' + (O.scope || "<unnamed>") + '"');
|
|
1689
|
+
throw P.mode = O, P;
|
|
1690
|
+
} else if (C.type === "end") {
|
|
1691
|
+
const P = kn(C);
|
|
1692
|
+
if (P !== an)
|
|
1693
|
+
return P;
|
|
1691
1694
|
}
|
|
1692
|
-
if (
|
|
1695
|
+
if (C.type === "illegal" && I === "")
|
|
1693
1696
|
return 1;
|
|
1694
|
-
if (Ce > 1e5 && Ce >
|
|
1697
|
+
if (Ce > 1e5 && Ce > C.index * 3)
|
|
1695
1698
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1696
|
-
return
|
|
1699
|
+
return U += I, I.length;
|
|
1697
1700
|
}
|
|
1698
|
-
const
|
|
1699
|
-
if (!
|
|
1700
|
-
throw
|
|
1701
|
-
const
|
|
1702
|
-
let Se = "",
|
|
1703
|
-
const
|
|
1704
|
-
|
|
1705
|
-
let
|
|
1701
|
+
const q = N(b);
|
|
1702
|
+
if (!q)
|
|
1703
|
+
throw le(t.replace("{}", b)), new Error('Unknown language: "' + b + '"');
|
|
1704
|
+
const $n = xt(q);
|
|
1705
|
+
let Se = "", O = $ || $n;
|
|
1706
|
+
const Xe = {}, H = new r.__emitter(r);
|
|
1707
|
+
Bn();
|
|
1708
|
+
let U = "", Ee = 0, oe = 0, Ce = 0, Le = !1;
|
|
1706
1709
|
try {
|
|
1707
|
-
if (
|
|
1708
|
-
|
|
1710
|
+
if (q.__emitTokens)
|
|
1711
|
+
q.__emitTokens(A, H);
|
|
1709
1712
|
else {
|
|
1710
|
-
for (
|
|
1711
|
-
Ce++,
|
|
1712
|
-
const w =
|
|
1713
|
+
for (O.matcher.considerAll(); ; ) {
|
|
1714
|
+
Ce++, Le ? Le = !1 : O.matcher.considerAll(), O.matcher.lastIndex = oe;
|
|
1715
|
+
const w = O.matcher.exec(A);
|
|
1713
1716
|
if (!w) break;
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1717
|
+
const C = A.substring(oe, w.index), I = Ve(C, w);
|
|
1718
|
+
oe = w.index + I;
|
|
1716
1719
|
}
|
|
1717
|
-
|
|
1720
|
+
Ve(A.substring(oe));
|
|
1718
1721
|
}
|
|
1719
|
-
return
|
|
1722
|
+
return H.finalize(), Se = H.toHTML(), {
|
|
1720
1723
|
language: b,
|
|
1721
1724
|
value: Se,
|
|
1722
1725
|
relevance: Ee,
|
|
1723
1726
|
illegal: !1,
|
|
1724
|
-
_emitter:
|
|
1725
|
-
_top:
|
|
1727
|
+
_emitter: H,
|
|
1728
|
+
_top: O
|
|
1726
1729
|
};
|
|
1727
1730
|
} catch (w) {
|
|
1728
1731
|
if (w.message && w.message.includes("Illegal"))
|
|
1729
1732
|
return {
|
|
1730
1733
|
language: b,
|
|
1731
|
-
value:
|
|
1734
|
+
value: Oe(A),
|
|
1732
1735
|
illegal: !0,
|
|
1733
1736
|
relevance: 0,
|
|
1734
1737
|
_illegalBy: {
|
|
1735
1738
|
message: w.message,
|
|
1736
|
-
index:
|
|
1737
|
-
context: A.slice(
|
|
1739
|
+
index: oe,
|
|
1740
|
+
context: A.slice(oe - 100, oe + 100),
|
|
1738
1741
|
mode: w.mode,
|
|
1739
1742
|
resultSoFar: Se
|
|
1740
1743
|
},
|
|
1741
|
-
_emitter:
|
|
1744
|
+
_emitter: H
|
|
1742
1745
|
};
|
|
1743
|
-
if (
|
|
1746
|
+
if (g)
|
|
1744
1747
|
return {
|
|
1745
1748
|
language: b,
|
|
1746
|
-
value:
|
|
1749
|
+
value: Oe(A),
|
|
1747
1750
|
illegal: !1,
|
|
1748
1751
|
relevance: 0,
|
|
1749
1752
|
errorRaised: w,
|
|
1750
|
-
_emitter:
|
|
1751
|
-
_top:
|
|
1753
|
+
_emitter: H,
|
|
1754
|
+
_top: O
|
|
1752
1755
|
};
|
|
1753
1756
|
throw w;
|
|
1754
1757
|
}
|
|
1755
1758
|
}
|
|
1756
1759
|
function f(b) {
|
|
1757
1760
|
const A = {
|
|
1758
|
-
value:
|
|
1761
|
+
value: Oe(b),
|
|
1759
1762
|
illegal: !1,
|
|
1760
1763
|
relevance: 0,
|
|
1761
|
-
_top:
|
|
1762
|
-
_emitter: new
|
|
1764
|
+
_top: i,
|
|
1765
|
+
_emitter: new r.__emitter(r)
|
|
1763
1766
|
};
|
|
1764
1767
|
return A._emitter.addText(b), A;
|
|
1765
1768
|
}
|
|
1766
1769
|
function d(b, A) {
|
|
1767
|
-
A = A ||
|
|
1768
|
-
const
|
|
1770
|
+
A = A || r.languages || Object.keys(e);
|
|
1771
|
+
const R = f(b), $ = A.filter(N).filter(B).map(
|
|
1769
1772
|
(Q) => c(Q, b, !1)
|
|
1770
1773
|
);
|
|
1771
|
-
|
|
1772
|
-
const F =
|
|
1773
|
-
if (Q.relevance !==
|
|
1774
|
-
if (Q.language &&
|
|
1775
|
-
if (
|
|
1774
|
+
$.unshift(R);
|
|
1775
|
+
const F = $.sort((Q, j) => {
|
|
1776
|
+
if (Q.relevance !== j.relevance) return j.relevance - Q.relevance;
|
|
1777
|
+
if (Q.language && j.language) {
|
|
1778
|
+
if (N(Q.language).supersetOf === j.language)
|
|
1776
1779
|
return 1;
|
|
1777
|
-
if (
|
|
1780
|
+
if (N(j.language).supersetOf === Q.language)
|
|
1778
1781
|
return -1;
|
|
1779
1782
|
}
|
|
1780
1783
|
return 0;
|
|
1781
1784
|
}), [W, V] = F, ve = W;
|
|
1782
1785
|
return ve.secondBest = V, ve;
|
|
1783
1786
|
}
|
|
1784
|
-
function
|
|
1785
|
-
const
|
|
1786
|
-
b.classList.add("hljs"), b.classList.add(`language-${
|
|
1787
|
+
function h(b, A, R) {
|
|
1788
|
+
const $ = A && s[A] || R;
|
|
1789
|
+
b.classList.add("hljs"), b.classList.add(`language-${$}`);
|
|
1787
1790
|
}
|
|
1788
1791
|
function p(b) {
|
|
1789
1792
|
let A = null;
|
|
1790
|
-
const
|
|
1791
|
-
if (a(
|
|
1792
|
-
if (
|
|
1793
|
+
const R = l(b);
|
|
1794
|
+
if (a(R)) return;
|
|
1795
|
+
if (ie(
|
|
1793
1796
|
"before:highlightElement",
|
|
1794
|
-
{ el: b, language:
|
|
1797
|
+
{ el: b, language: R }
|
|
1795
1798
|
), b.dataset.highlighted) {
|
|
1796
1799
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", b);
|
|
1797
1800
|
return;
|
|
1798
1801
|
}
|
|
1799
|
-
if (b.children.length > 0 && (
|
|
1800
|
-
throw new
|
|
1802
|
+
if (b.children.length > 0 && (r.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(b)), r.throwUnescapedHTML))
|
|
1803
|
+
throw new Ft(
|
|
1801
1804
|
"One of your code blocks includes unescaped HTML.",
|
|
1802
1805
|
b.innerHTML
|
|
1803
1806
|
);
|
|
1804
1807
|
A = b;
|
|
1805
|
-
const
|
|
1806
|
-
b.innerHTML = F.value, b.dataset.highlighted = "yes",
|
|
1808
|
+
const $ = A.textContent, F = R ? o($, { language: R, ignoreIllegals: !0 }) : d($);
|
|
1809
|
+
b.innerHTML = F.value, b.dataset.highlighted = "yes", h(b, R, F.language), b.result = {
|
|
1807
1810
|
language: F.language,
|
|
1808
1811
|
// TODO: remove with version 11.0
|
|
1809
1812
|
re: F.relevance,
|
|
@@ -1811,16 +1814,16 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1811
1814
|
}, F.secondBest && (b.secondBest = {
|
|
1812
1815
|
language: F.secondBest.language,
|
|
1813
1816
|
relevance: F.secondBest.relevance
|
|
1814
|
-
}),
|
|
1817
|
+
}), ie("after:highlightElement", { el: b, result: F, text: $ });
|
|
1815
1818
|
}
|
|
1816
1819
|
function _(b) {
|
|
1817
|
-
|
|
1820
|
+
r = sn(r, b);
|
|
1818
1821
|
}
|
|
1819
|
-
const
|
|
1820
|
-
y(),
|
|
1822
|
+
const m = () => {
|
|
1823
|
+
y(), fe("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1821
1824
|
};
|
|
1822
|
-
function
|
|
1823
|
-
y(),
|
|
1825
|
+
function v() {
|
|
1826
|
+
y(), fe("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1824
1827
|
}
|
|
1825
1828
|
let E = !1;
|
|
1826
1829
|
function y() {
|
|
@@ -1828,46 +1831,46 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1828
1831
|
E = !0;
|
|
1829
1832
|
return;
|
|
1830
1833
|
}
|
|
1831
|
-
document.querySelectorAll(
|
|
1834
|
+
document.querySelectorAll(r.cssSelector).forEach(p);
|
|
1832
1835
|
}
|
|
1833
|
-
function
|
|
1836
|
+
function T() {
|
|
1834
1837
|
E && y();
|
|
1835
1838
|
}
|
|
1836
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1837
|
-
function
|
|
1838
|
-
let
|
|
1839
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", T, !1);
|
|
1840
|
+
function M(b, A) {
|
|
1841
|
+
let R = null;
|
|
1839
1842
|
try {
|
|
1840
|
-
|
|
1841
|
-
} catch (
|
|
1842
|
-
if (
|
|
1843
|
-
|
|
1843
|
+
R = A(n);
|
|
1844
|
+
} catch ($) {
|
|
1845
|
+
if (le("Language definition for '{}' could not be registered.".replace("{}", b)), g)
|
|
1846
|
+
le($);
|
|
1844
1847
|
else
|
|
1845
|
-
throw
|
|
1846
|
-
|
|
1848
|
+
throw $;
|
|
1849
|
+
R = i;
|
|
1847
1850
|
}
|
|
1848
|
-
|
|
1851
|
+
R.name || (R.name = b), e[b] = R, R.rawDefinition = A.bind(null, n), R.aliases && L(R.aliases, { languageName: b });
|
|
1849
1852
|
}
|
|
1850
|
-
function
|
|
1853
|
+
function D(b) {
|
|
1851
1854
|
delete e[b];
|
|
1852
1855
|
for (const A of Object.keys(s))
|
|
1853
1856
|
s[A] === b && delete s[A];
|
|
1854
1857
|
}
|
|
1855
|
-
function
|
|
1858
|
+
function k() {
|
|
1856
1859
|
return Object.keys(e);
|
|
1857
1860
|
}
|
|
1858
|
-
function
|
|
1861
|
+
function N(b) {
|
|
1859
1862
|
return b = (b || "").toLowerCase(), e[b] || e[s[b]];
|
|
1860
1863
|
}
|
|
1861
1864
|
function L(b, { languageName: A }) {
|
|
1862
|
-
typeof b == "string" && (b = [b]), b.forEach((
|
|
1863
|
-
s[
|
|
1865
|
+
typeof b == "string" && (b = [b]), b.forEach((R) => {
|
|
1866
|
+
s[R.toLowerCase()] = A;
|
|
1864
1867
|
});
|
|
1865
1868
|
}
|
|
1866
|
-
function
|
|
1867
|
-
const A =
|
|
1869
|
+
function B(b) {
|
|
1870
|
+
const A = N(b);
|
|
1868
1871
|
return A && !A.disableAutodetect;
|
|
1869
1872
|
}
|
|
1870
|
-
function
|
|
1873
|
+
function x(b) {
|
|
1871
1874
|
b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (A) => {
|
|
1872
1875
|
b["before:highlightBlock"](
|
|
1873
1876
|
Object.assign({ block: A.el }, A)
|
|
@@ -1878,63 +1881,63 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = b, P = A), O ===
|
|
|
1878
1881
|
);
|
|
1879
1882
|
});
|
|
1880
1883
|
}
|
|
1881
|
-
function
|
|
1882
|
-
|
|
1884
|
+
function z(b) {
|
|
1885
|
+
x(b), u.push(b);
|
|
1883
1886
|
}
|
|
1884
1887
|
function K(b) {
|
|
1885
1888
|
const A = u.indexOf(b);
|
|
1886
1889
|
A !== -1 && u.splice(A, 1);
|
|
1887
1890
|
}
|
|
1888
|
-
function
|
|
1889
|
-
const
|
|
1890
|
-
u.forEach(function(
|
|
1891
|
-
|
|
1891
|
+
function ie(b, A) {
|
|
1892
|
+
const R = b;
|
|
1893
|
+
u.forEach(function($) {
|
|
1894
|
+
$[R] && $[R](A);
|
|
1892
1895
|
});
|
|
1893
1896
|
}
|
|
1894
|
-
function
|
|
1895
|
-
return
|
|
1897
|
+
function ue(b) {
|
|
1898
|
+
return fe("10.7.0", "highlightBlock will be removed entirely in v12.0"), fe("10.7.0", "Please use highlightElement now."), p(b);
|
|
1896
1899
|
}
|
|
1897
1900
|
Object.assign(n, {
|
|
1898
|
-
highlight:
|
|
1901
|
+
highlight: o,
|
|
1899
1902
|
highlightAuto: d,
|
|
1900
1903
|
highlightAll: y,
|
|
1901
1904
|
highlightElement: p,
|
|
1902
1905
|
// TODO: Remove with v12 API
|
|
1903
|
-
highlightBlock:
|
|
1906
|
+
highlightBlock: ue,
|
|
1904
1907
|
configure: _,
|
|
1905
|
-
initHighlighting:
|
|
1906
|
-
initHighlightingOnLoad:
|
|
1907
|
-
registerLanguage:
|
|
1908
|
-
unregisterLanguage:
|
|
1909
|
-
listLanguages:
|
|
1910
|
-
getLanguage:
|
|
1908
|
+
initHighlighting: m,
|
|
1909
|
+
initHighlightingOnLoad: v,
|
|
1910
|
+
registerLanguage: M,
|
|
1911
|
+
unregisterLanguage: D,
|
|
1912
|
+
listLanguages: k,
|
|
1913
|
+
getLanguage: N,
|
|
1911
1914
|
registerAliases: L,
|
|
1912
|
-
autoDetection:
|
|
1913
|
-
inherit:
|
|
1914
|
-
addPlugin:
|
|
1915
|
+
autoDetection: B,
|
|
1916
|
+
inherit: sn,
|
|
1917
|
+
addPlugin: z,
|
|
1915
1918
|
removePlugin: K
|
|
1916
1919
|
}), n.debugMode = function() {
|
|
1917
|
-
|
|
1920
|
+
g = !1;
|
|
1918
1921
|
}, n.safeMode = function() {
|
|
1919
|
-
|
|
1920
|
-
}, n.versionString =
|
|
1921
|
-
concat:
|
|
1922
|
-
lookahead:
|
|
1923
|
-
either:
|
|
1924
|
-
optional:
|
|
1925
|
-
anyNumberOfTimes:
|
|
1922
|
+
g = !0;
|
|
1923
|
+
}, n.versionString = Ut, n.regex = {
|
|
1924
|
+
concat: ce,
|
|
1925
|
+
lookahead: dn,
|
|
1926
|
+
either: Ge,
|
|
1927
|
+
optional: nt,
|
|
1928
|
+
anyNumberOfTimes: et
|
|
1926
1929
|
};
|
|
1927
1930
|
for (const b in ye)
|
|
1928
|
-
typeof ye[b] == "object" &&
|
|
1931
|
+
typeof ye[b] == "object" && gn(ye[b]);
|
|
1929
1932
|
return Object.assign(n, ye), n;
|
|
1930
|
-
},
|
|
1931
|
-
|
|
1932
|
-
var
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
const Y = /* @__PURE__ */
|
|
1936
|
-
function
|
|
1937
|
-
const e = n.regex, s = e.concat(/[\p{L}_]/u, e.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u,
|
|
1933
|
+
}, he = An({});
|
|
1934
|
+
he.newInstance = () => An({});
|
|
1935
|
+
var Ht = he;
|
|
1936
|
+
he.HighlightJS = he;
|
|
1937
|
+
he.default = he;
|
|
1938
|
+
const Y = /* @__PURE__ */ Vn(Ht);
|
|
1939
|
+
function Gt(n) {
|
|
1940
|
+
const e = n.regex, s = e.concat(/[\p{L}_]/u, e.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), u = /[\p{L}0-9._:-]+/u, g = {
|
|
1938
1941
|
className: "symbol",
|
|
1939
1942
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1940
1943
|
}, t = {
|
|
@@ -1946,10 +1949,10 @@ function Ut(n) {
|
|
|
1946
1949
|
illegal: /\n/
|
|
1947
1950
|
}
|
|
1948
1951
|
]
|
|
1949
|
-
},
|
|
1952
|
+
}, i = n.inherit(t, {
|
|
1950
1953
|
begin: /\(/,
|
|
1951
1954
|
end: /\)/
|
|
1952
|
-
}),
|
|
1955
|
+
}), r = n.inherit(n.APOS_STRING_MODE, { className: "string" }), a = n.inherit(n.QUOTE_STRING_MODE, { className: "string" }), l = {
|
|
1953
1956
|
endsWithParent: !0,
|
|
1954
1957
|
illegal: /</,
|
|
1955
1958
|
relevance: 0,
|
|
@@ -1970,12 +1973,12 @@ function Ut(n) {
|
|
|
1970
1973
|
{
|
|
1971
1974
|
begin: /"/,
|
|
1972
1975
|
end: /"/,
|
|
1973
|
-
contains: [
|
|
1976
|
+
contains: [g]
|
|
1974
1977
|
},
|
|
1975
1978
|
{
|
|
1976
1979
|
begin: /'/,
|
|
1977
1980
|
end: /'/,
|
|
1978
|
-
contains: [
|
|
1981
|
+
contains: [g]
|
|
1979
1982
|
},
|
|
1980
1983
|
{ begin: /[^\s"'=<>`]+/ }
|
|
1981
1984
|
]
|
|
@@ -2009,8 +2012,8 @@ function Ut(n) {
|
|
|
2009
2012
|
contains: [
|
|
2010
2013
|
t,
|
|
2011
2014
|
a,
|
|
2012
|
-
i,
|
|
2013
2015
|
r,
|
|
2016
|
+
i,
|
|
2014
2017
|
{
|
|
2015
2018
|
begin: /\[/,
|
|
2016
2019
|
end: /\]/,
|
|
@@ -2021,9 +2024,9 @@ function Ut(n) {
|
|
|
2021
2024
|
end: />/,
|
|
2022
2025
|
contains: [
|
|
2023
2026
|
t,
|
|
2024
|
-
|
|
2027
|
+
i,
|
|
2025
2028
|
a,
|
|
2026
|
-
|
|
2029
|
+
r
|
|
2027
2030
|
]
|
|
2028
2031
|
}
|
|
2029
2032
|
]
|
|
@@ -2040,7 +2043,7 @@ function Ut(n) {
|
|
|
2040
2043
|
end: /\]\]>/,
|
|
2041
2044
|
relevance: 10
|
|
2042
2045
|
},
|
|
2043
|
-
|
|
2046
|
+
g,
|
|
2044
2047
|
// xml processing instructions
|
|
2045
2048
|
{
|
|
2046
2049
|
className: "meta",
|
|
@@ -2068,7 +2071,7 @@ function Ut(n) {
|
|
|
2068
2071
|
begin: /<style(?=\s|>)/,
|
|
2069
2072
|
end: />/,
|
|
2070
2073
|
keywords: { name: "style" },
|
|
2071
|
-
contains: [
|
|
2074
|
+
contains: [l],
|
|
2072
2075
|
starts: {
|
|
2073
2076
|
end: /<\/style>/,
|
|
2074
2077
|
returnEnd: !0,
|
|
@@ -2084,7 +2087,7 @@ function Ut(n) {
|
|
|
2084
2087
|
begin: /<script(?=\s|>)/,
|
|
2085
2088
|
end: />/,
|
|
2086
2089
|
keywords: { name: "script" },
|
|
2087
|
-
contains: [
|
|
2090
|
+
contains: [l],
|
|
2088
2091
|
starts: {
|
|
2089
2092
|
end: /<\/script>/,
|
|
2090
2093
|
returnEnd: !0,
|
|
@@ -2119,7 +2122,7 @@ function Ut(n) {
|
|
|
2119
2122
|
className: "name",
|
|
2120
2123
|
begin: s,
|
|
2121
2124
|
relevance: 0,
|
|
2122
|
-
starts:
|
|
2125
|
+
starts: l
|
|
2123
2126
|
}
|
|
2124
2127
|
]
|
|
2125
2128
|
},
|
|
@@ -2149,7 +2152,7 @@ function Ut(n) {
|
|
|
2149
2152
|
]
|
|
2150
2153
|
};
|
|
2151
2154
|
}
|
|
2152
|
-
const
|
|
2155
|
+
const on = "[A-Za-z$_][0-9A-Za-z$_]*", Kt = [
|
|
2153
2156
|
"as",
|
|
2154
2157
|
// for exports
|
|
2155
2158
|
"in",
|
|
@@ -2192,14 +2195,14 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
2192
2195
|
"from",
|
|
2193
2196
|
"export",
|
|
2194
2197
|
"extends"
|
|
2195
|
-
],
|
|
2198
|
+
], Wt = [
|
|
2196
2199
|
"true",
|
|
2197
2200
|
"false",
|
|
2198
2201
|
"null",
|
|
2199
2202
|
"undefined",
|
|
2200
2203
|
"NaN",
|
|
2201
2204
|
"Infinity"
|
|
2202
|
-
],
|
|
2205
|
+
], Nn = [
|
|
2203
2206
|
// Fundamental objects
|
|
2204
2207
|
"Object",
|
|
2205
2208
|
"Function",
|
|
@@ -2249,7 +2252,7 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
2249
2252
|
"Intl",
|
|
2250
2253
|
// WebAssembly
|
|
2251
2254
|
"WebAssembly"
|
|
2252
|
-
],
|
|
2255
|
+
], Mn = [
|
|
2253
2256
|
"Error",
|
|
2254
2257
|
"EvalError",
|
|
2255
2258
|
"InternalError",
|
|
@@ -2258,7 +2261,7 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
2258
2261
|
"SyntaxError",
|
|
2259
2262
|
"TypeError",
|
|
2260
2263
|
"URIError"
|
|
2261
|
-
],
|
|
2264
|
+
], Tn = [
|
|
2262
2265
|
"setInterval",
|
|
2263
2266
|
"setTimeout",
|
|
2264
2267
|
"clearInterval",
|
|
@@ -2276,7 +2279,7 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
2276
2279
|
"encodeURIComponent",
|
|
2277
2280
|
"escape",
|
|
2278
2281
|
"unescape"
|
|
2279
|
-
],
|
|
2282
|
+
], Qt = [
|
|
2280
2283
|
"arguments",
|
|
2281
2284
|
"this",
|
|
2282
2285
|
"super",
|
|
@@ -2288,27 +2291,27 @@ const nn = "[A-Za-z$_][0-9A-Za-z$_]*", xt = [
|
|
|
2288
2291
|
"module",
|
|
2289
2292
|
"global"
|
|
2290
2293
|
// Node.js
|
|
2291
|
-
],
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2294
|
+
], Zt = [].concat(
|
|
2295
|
+
Tn,
|
|
2296
|
+
Nn,
|
|
2297
|
+
Mn
|
|
2295
2298
|
);
|
|
2296
|
-
function
|
|
2297
|
-
const e = n.regex, s = (A, { after:
|
|
2298
|
-
const
|
|
2299
|
-
return A.input.indexOf(
|
|
2300
|
-
}, u =
|
|
2299
|
+
function Yt(n) {
|
|
2300
|
+
const e = n.regex, s = (A, { after: R }) => {
|
|
2301
|
+
const $ = "</" + A[0].slice(1);
|
|
2302
|
+
return A.input.indexOf($, R) !== -1;
|
|
2303
|
+
}, u = on, g = {
|
|
2301
2304
|
begin: "<>",
|
|
2302
2305
|
end: "</>"
|
|
2303
|
-
}, t = /<[A-Za-z0-9\\._:-]+\s*\/>/,
|
|
2306
|
+
}, t = /<[A-Za-z0-9\\._:-]+\s*\/>/, i = {
|
|
2304
2307
|
begin: /<[A-Za-z0-9\\._:-]+/,
|
|
2305
2308
|
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
|
2306
2309
|
/**
|
|
2307
2310
|
* @param {RegExpMatchArray} match
|
|
2308
2311
|
* @param {CallbackResponse} response
|
|
2309
2312
|
*/
|
|
2310
|
-
isTrulyOpeningTag: (A,
|
|
2311
|
-
const
|
|
2313
|
+
isTrulyOpeningTag: (A, R) => {
|
|
2314
|
+
const $ = A[0].length + A.index, F = A.input[$];
|
|
2312
2315
|
if (
|
|
2313
2316
|
// HTML should not include another raw `<` inside a tag
|
|
2314
2317
|
// nested type?
|
|
@@ -2317,33 +2320,33 @@ function Gt(n) {
|
|
|
2317
2320
|
// `<T, A extends keyof T, V>`
|
|
2318
2321
|
F === ","
|
|
2319
2322
|
) {
|
|
2320
|
-
|
|
2323
|
+
R.ignoreMatch();
|
|
2321
2324
|
return;
|
|
2322
2325
|
}
|
|
2323
|
-
F === ">" && (s(A, { after:
|
|
2326
|
+
F === ">" && (s(A, { after: $ }) || R.ignoreMatch());
|
|
2324
2327
|
let W;
|
|
2325
|
-
const V = A.input.substring(
|
|
2328
|
+
const V = A.input.substring($);
|
|
2326
2329
|
if (W = V.match(/^\s*=/)) {
|
|
2327
|
-
|
|
2330
|
+
R.ignoreMatch();
|
|
2328
2331
|
return;
|
|
2329
2332
|
}
|
|
2330
2333
|
if ((W = V.match(/^\s+extends\s+/)) && W.index === 0) {
|
|
2331
|
-
|
|
2334
|
+
R.ignoreMatch();
|
|
2332
2335
|
return;
|
|
2333
2336
|
}
|
|
2334
2337
|
}
|
|
2335
|
-
},
|
|
2336
|
-
$pattern:
|
|
2337
|
-
keyword:
|
|
2338
|
-
literal:
|
|
2339
|
-
built_in:
|
|
2340
|
-
"variable.language":
|
|
2341
|
-
}, a = "[0-9](_?[0-9])*",
|
|
2338
|
+
}, r = {
|
|
2339
|
+
$pattern: on,
|
|
2340
|
+
keyword: Kt,
|
|
2341
|
+
literal: Wt,
|
|
2342
|
+
built_in: Zt,
|
|
2343
|
+
"variable.language": Qt
|
|
2344
|
+
}, a = "[0-9](_?[0-9])*", l = `\\.(${a})`, o = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2342
2345
|
className: "number",
|
|
2343
2346
|
variants: [
|
|
2344
2347
|
// DecimalLiteral
|
|
2345
|
-
{ begin: `(\\b(${
|
|
2346
|
-
{ begin: `\\b(${
|
|
2348
|
+
{ begin: `(\\b(${o})((${l})|\\.)?|(${l}))[eE][+-]?(${a})\\b` },
|
|
2349
|
+
{ begin: `\\b(${o})\\b((${l})\\b|\\.)?|(${l})\\b` },
|
|
2347
2350
|
// DecimalBigIntegerLiteral
|
|
2348
2351
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
2349
2352
|
// NonDecimalIntegerLiteral
|
|
@@ -2359,7 +2362,7 @@ function Gt(n) {
|
|
|
2359
2362
|
className: "subst",
|
|
2360
2363
|
begin: "\\$\\{",
|
|
2361
2364
|
end: "\\}",
|
|
2362
|
-
keywords:
|
|
2365
|
+
keywords: r,
|
|
2363
2366
|
contains: []
|
|
2364
2367
|
// defined later
|
|
2365
2368
|
}, d = {
|
|
@@ -2374,7 +2377,7 @@ function Gt(n) {
|
|
|
2374
2377
|
],
|
|
2375
2378
|
subLanguage: "xml"
|
|
2376
2379
|
}
|
|
2377
|
-
},
|
|
2380
|
+
}, h = {
|
|
2378
2381
|
begin: ".?css`",
|
|
2379
2382
|
end: "",
|
|
2380
2383
|
starts: {
|
|
@@ -2406,7 +2409,7 @@ function Gt(n) {
|
|
|
2406
2409
|
n.BACKSLASH_ESCAPE,
|
|
2407
2410
|
f
|
|
2408
2411
|
]
|
|
2409
|
-
},
|
|
2412
|
+
}, v = {
|
|
2410
2413
|
className: "comment",
|
|
2411
2414
|
variants: [
|
|
2412
2415
|
n.COMMENT(
|
|
@@ -2455,7 +2458,7 @@ function Gt(n) {
|
|
|
2455
2458
|
n.APOS_STRING_MODE,
|
|
2456
2459
|
n.QUOTE_STRING_MODE,
|
|
2457
2460
|
d,
|
|
2458
|
-
|
|
2461
|
+
h,
|
|
2459
2462
|
p,
|
|
2460
2463
|
_,
|
|
2461
2464
|
// Skip numbers when they are part of a variable name
|
|
@@ -2470,20 +2473,20 @@ function Gt(n) {
|
|
|
2470
2473
|
// it from ending too early by matching another }
|
|
2471
2474
|
begin: /\{/,
|
|
2472
2475
|
end: /\}/,
|
|
2473
|
-
keywords:
|
|
2476
|
+
keywords: r,
|
|
2474
2477
|
contains: [
|
|
2475
2478
|
"self"
|
|
2476
2479
|
].concat(E)
|
|
2477
2480
|
});
|
|
2478
|
-
const y = [].concat(
|
|
2481
|
+
const y = [].concat(v, f.contains), T = y.concat([
|
|
2479
2482
|
// eat recursive parens in sub expressions
|
|
2480
2483
|
{
|
|
2481
2484
|
begin: /(\s*)\(/,
|
|
2482
2485
|
end: /\)/,
|
|
2483
|
-
keywords:
|
|
2486
|
+
keywords: r,
|
|
2484
2487
|
contains: ["self"].concat(y)
|
|
2485
2488
|
}
|
|
2486
|
-
]),
|
|
2489
|
+
]), M = {
|
|
2487
2490
|
className: "params",
|
|
2488
2491
|
// convert this to negative lookbehind in v12
|
|
2489
2492
|
begin: /(\s*)\(/,
|
|
@@ -2491,9 +2494,9 @@ function Gt(n) {
|
|
|
2491
2494
|
end: /\)/,
|
|
2492
2495
|
excludeBegin: !0,
|
|
2493
2496
|
excludeEnd: !0,
|
|
2494
|
-
keywords:
|
|
2495
|
-
contains:
|
|
2496
|
-
},
|
|
2497
|
+
keywords: r,
|
|
2498
|
+
contains: T
|
|
2499
|
+
}, D = {
|
|
2497
2500
|
variants: [
|
|
2498
2501
|
// class Car extends vehicle
|
|
2499
2502
|
{
|
|
@@ -2526,7 +2529,7 @@ function Gt(n) {
|
|
|
2526
2529
|
}
|
|
2527
2530
|
}
|
|
2528
2531
|
]
|
|
2529
|
-
},
|
|
2532
|
+
}, k = {
|
|
2530
2533
|
relevance: 0,
|
|
2531
2534
|
match: e.either(
|
|
2532
2535
|
// Hard coded exceptions
|
|
@@ -2546,11 +2549,11 @@ function Gt(n) {
|
|
|
2546
2549
|
keywords: {
|
|
2547
2550
|
_: [
|
|
2548
2551
|
// se we still get relevance credit for JS library classes
|
|
2549
|
-
...
|
|
2550
|
-
...
|
|
2552
|
+
...Nn,
|
|
2553
|
+
...Mn
|
|
2551
2554
|
]
|
|
2552
2555
|
}
|
|
2553
|
-
},
|
|
2556
|
+
}, N = {
|
|
2554
2557
|
label: "use_strict",
|
|
2555
2558
|
className: "meta",
|
|
2556
2559
|
relevance: 10,
|
|
@@ -2578,21 +2581,21 @@ function Gt(n) {
|
|
|
2578
2581
|
3: "title.function"
|
|
2579
2582
|
},
|
|
2580
2583
|
label: "func.def",
|
|
2581
|
-
contains: [
|
|
2584
|
+
contains: [M],
|
|
2582
2585
|
illegal: /%/
|
|
2583
|
-
},
|
|
2586
|
+
}, B = {
|
|
2584
2587
|
relevance: 0,
|
|
2585
2588
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2586
2589
|
className: "variable.constant"
|
|
2587
2590
|
};
|
|
2588
|
-
function
|
|
2591
|
+
function x(A) {
|
|
2589
2592
|
return e.concat("(?!", A.join("|"), ")");
|
|
2590
2593
|
}
|
|
2591
|
-
const
|
|
2594
|
+
const z = {
|
|
2592
2595
|
match: e.concat(
|
|
2593
2596
|
/\b/,
|
|
2594
|
-
|
|
2595
|
-
...
|
|
2597
|
+
x([
|
|
2598
|
+
...Tn,
|
|
2596
2599
|
"super",
|
|
2597
2600
|
"import"
|
|
2598
2601
|
].map((A) => `${A}\\s*\\(`)),
|
|
@@ -2610,7 +2613,7 @@ function Gt(n) {
|
|
|
2610
2613
|
keywords: "prototype",
|
|
2611
2614
|
className: "property",
|
|
2612
2615
|
relevance: 0
|
|
2613
|
-
},
|
|
2616
|
+
}, ie = {
|
|
2614
2617
|
match: [
|
|
2615
2618
|
/get|set/,
|
|
2616
2619
|
/\s+/,
|
|
@@ -2626,9 +2629,9 @@ function Gt(n) {
|
|
|
2626
2629
|
// eat to avoid empty params
|
|
2627
2630
|
begin: /\(\)/
|
|
2628
2631
|
},
|
|
2629
|
-
|
|
2632
|
+
M
|
|
2630
2633
|
]
|
|
2631
|
-
},
|
|
2634
|
+
}, ue = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + n.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
|
|
2632
2635
|
match: [
|
|
2633
2636
|
/const|var|let/,
|
|
2634
2637
|
/\s+/,
|
|
@@ -2637,7 +2640,7 @@ function Gt(n) {
|
|
|
2637
2640
|
/=\s*/,
|
|
2638
2641
|
/(async\s*)?/,
|
|
2639
2642
|
// async is optional
|
|
2640
|
-
e.lookahead(
|
|
2643
|
+
e.lookahead(ue)
|
|
2641
2644
|
],
|
|
2642
2645
|
keywords: "async",
|
|
2643
2646
|
className: {
|
|
@@ -2645,15 +2648,15 @@ function Gt(n) {
|
|
|
2645
2648
|
3: "title.function"
|
|
2646
2649
|
},
|
|
2647
2650
|
contains: [
|
|
2648
|
-
|
|
2651
|
+
M
|
|
2649
2652
|
]
|
|
2650
2653
|
};
|
|
2651
2654
|
return {
|
|
2652
2655
|
name: "JavaScript",
|
|
2653
2656
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2654
|
-
keywords:
|
|
2657
|
+
keywords: r,
|
|
2655
2658
|
// this will be extended by TypeScript
|
|
2656
|
-
exports: { PARAMS_CONTAINS:
|
|
2659
|
+
exports: { PARAMS_CONTAINS: T, CLASS_REFERENCE: k },
|
|
2657
2660
|
illegal: /#(?![$_A-z])/,
|
|
2658
2661
|
contains: [
|
|
2659
2662
|
n.SHEBANG({
|
|
@@ -2661,18 +2664,18 @@ function Gt(n) {
|
|
|
2661
2664
|
binary: "node",
|
|
2662
2665
|
relevance: 5
|
|
2663
2666
|
}),
|
|
2664
|
-
|
|
2667
|
+
N,
|
|
2665
2668
|
n.APOS_STRING_MODE,
|
|
2666
2669
|
n.QUOTE_STRING_MODE,
|
|
2667
2670
|
d,
|
|
2668
|
-
|
|
2671
|
+
h,
|
|
2669
2672
|
p,
|
|
2670
2673
|
_,
|
|
2671
|
-
|
|
2674
|
+
v,
|
|
2672
2675
|
// Skip numbers when they are part of a variable name
|
|
2673
2676
|
{ match: /\$\d+/ },
|
|
2674
2677
|
c,
|
|
2675
|
-
|
|
2678
|
+
k,
|
|
2676
2679
|
{
|
|
2677
2680
|
className: "attr",
|
|
2678
2681
|
begin: u + e.lookahead(":"),
|
|
@@ -2685,14 +2688,14 @@ function Gt(n) {
|
|
|
2685
2688
|
keywords: "return throw case",
|
|
2686
2689
|
relevance: 0,
|
|
2687
2690
|
contains: [
|
|
2688
|
-
|
|
2691
|
+
v,
|
|
2689
2692
|
n.REGEXP_MODE,
|
|
2690
2693
|
{
|
|
2691
2694
|
className: "function",
|
|
2692
2695
|
// we have to count the parens to make sure we actually have the
|
|
2693
2696
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2694
2697
|
// sub-expressions inside also surrounded by parens.
|
|
2695
|
-
begin:
|
|
2698
|
+
begin: ue,
|
|
2696
2699
|
returnBegin: !0,
|
|
2697
2700
|
end: "\\s*=>",
|
|
2698
2701
|
contains: [
|
|
@@ -2713,8 +2716,8 @@ function Gt(n) {
|
|
|
2713
2716
|
end: /\)/,
|
|
2714
2717
|
excludeBegin: !0,
|
|
2715
2718
|
excludeEnd: !0,
|
|
2716
|
-
keywords:
|
|
2717
|
-
contains:
|
|
2719
|
+
keywords: r,
|
|
2720
|
+
contains: T
|
|
2718
2721
|
}
|
|
2719
2722
|
]
|
|
2720
2723
|
}
|
|
@@ -2732,21 +2735,21 @@ function Gt(n) {
|
|
|
2732
2735
|
{
|
|
2733
2736
|
// JSX
|
|
2734
2737
|
variants: [
|
|
2735
|
-
{ begin:
|
|
2738
|
+
{ begin: g.begin, end: g.end },
|
|
2736
2739
|
{ match: t },
|
|
2737
2740
|
{
|
|
2738
|
-
begin:
|
|
2741
|
+
begin: i.begin,
|
|
2739
2742
|
// we carefully check the opening tag to see if it truly
|
|
2740
2743
|
// is a tag and not a false positive
|
|
2741
|
-
"on:begin":
|
|
2742
|
-
end:
|
|
2744
|
+
"on:begin": i.isTrulyOpeningTag,
|
|
2745
|
+
end: i.end
|
|
2743
2746
|
}
|
|
2744
2747
|
],
|
|
2745
2748
|
subLanguage: "xml",
|
|
2746
2749
|
contains: [
|
|
2747
2750
|
{
|
|
2748
|
-
begin:
|
|
2749
|
-
end:
|
|
2751
|
+
begin: i.begin,
|
|
2752
|
+
end: i.end,
|
|
2750
2753
|
skip: !0,
|
|
2751
2754
|
contains: ["self"]
|
|
2752
2755
|
}
|
|
@@ -2769,7 +2772,7 @@ function Gt(n) {
|
|
|
2769
2772
|
returnBegin: !0,
|
|
2770
2773
|
label: "func.def",
|
|
2771
2774
|
contains: [
|
|
2772
|
-
|
|
2775
|
+
M,
|
|
2773
2776
|
n.inherit(n.TITLE_MODE, { begin: u, className: "title.function" })
|
|
2774
2777
|
]
|
|
2775
2778
|
},
|
|
@@ -2789,12 +2792,12 @@ function Gt(n) {
|
|
|
2789
2792
|
{
|
|
2790
2793
|
match: [/\bconstructor(?=\s*\()/],
|
|
2791
2794
|
className: { 1: "title.function" },
|
|
2792
|
-
contains: [
|
|
2795
|
+
contains: [M]
|
|
2793
2796
|
},
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2797
|
+
z,
|
|
2798
|
+
B,
|
|
2799
|
+
D,
|
|
2800
|
+
ie,
|
|
2798
2801
|
{
|
|
2799
2802
|
match: /\$[(.]/
|
|
2800
2803
|
// relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
|
@@ -2802,7 +2805,7 @@ function Gt(n) {
|
|
|
2802
2805
|
]
|
|
2803
2806
|
};
|
|
2804
2807
|
}
|
|
2805
|
-
function
|
|
2808
|
+
function Vt(n) {
|
|
2806
2809
|
const e = {
|
|
2807
2810
|
className: "attr",
|
|
2808
2811
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -2815,7 +2818,7 @@ function Kt(n) {
|
|
|
2815
2818
|
"true",
|
|
2816
2819
|
"false",
|
|
2817
2820
|
"null"
|
|
2818
|
-
],
|
|
2821
|
+
], g = {
|
|
2819
2822
|
scope: "literal",
|
|
2820
2823
|
beginKeywords: u.join(" ")
|
|
2821
2824
|
};
|
|
@@ -2829,7 +2832,7 @@ function Kt(n) {
|
|
|
2829
2832
|
e,
|
|
2830
2833
|
s,
|
|
2831
2834
|
n.QUOTE_STRING_MODE,
|
|
2832
|
-
|
|
2835
|
+
g,
|
|
2833
2836
|
n.C_NUMBER_MODE,
|
|
2834
2837
|
n.C_LINE_COMMENT_MODE,
|
|
2835
2838
|
n.C_BLOCK_COMMENT_MODE
|
|
@@ -2837,7 +2840,7 @@ function Kt(n) {
|
|
|
2837
2840
|
illegal: "\\S"
|
|
2838
2841
|
};
|
|
2839
2842
|
}
|
|
2840
|
-
function
|
|
2843
|
+
function Xt(n) {
|
|
2841
2844
|
const e = "true false yes no null", s = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2842
2845
|
className: "attr",
|
|
2843
2846
|
variants: [
|
|
@@ -2852,7 +2855,7 @@ function Wt(n) {
|
|
|
2852
2855
|
begin: /'\w[\w :()\./-]*':(?=[ \t]|$)/
|
|
2853
2856
|
}
|
|
2854
2857
|
]
|
|
2855
|
-
},
|
|
2858
|
+
}, g = {
|
|
2856
2859
|
className: "template-variable",
|
|
2857
2860
|
variants: [
|
|
2858
2861
|
{
|
|
@@ -2882,9 +2885,9 @@ function Wt(n) {
|
|
|
2882
2885
|
],
|
|
2883
2886
|
contains: [
|
|
2884
2887
|
n.BACKSLASH_ESCAPE,
|
|
2885
|
-
|
|
2888
|
+
g
|
|
2886
2889
|
]
|
|
2887
|
-
},
|
|
2890
|
+
}, i = n.inherit(t, { variants: [
|
|
2888
2891
|
{
|
|
2889
2892
|
begin: /'/,
|
|
2890
2893
|
end: /'/
|
|
@@ -2909,7 +2912,7 @@ function Wt(n) {
|
|
|
2909
2912
|
contains: [f],
|
|
2910
2913
|
illegal: "\\n",
|
|
2911
2914
|
relevance: 0
|
|
2912
|
-
},
|
|
2915
|
+
}, h = {
|
|
2913
2916
|
begin: "\\[",
|
|
2914
2917
|
end: "\\]",
|
|
2915
2918
|
contains: [f],
|
|
@@ -2992,17 +2995,17 @@ function Wt(n) {
|
|
|
2992
2995
|
relevance: 0
|
|
2993
2996
|
},
|
|
2994
2997
|
d,
|
|
2995
|
-
|
|
2998
|
+
h,
|
|
2996
2999
|
t
|
|
2997
3000
|
], _ = [...p];
|
|
2998
|
-
return _.pop(), _.push(
|
|
3001
|
+
return _.pop(), _.push(i), f.contains = _, {
|
|
2999
3002
|
name: "YAML",
|
|
3000
3003
|
case_insensitive: !0,
|
|
3001
3004
|
aliases: ["yml"],
|
|
3002
3005
|
contains: p
|
|
3003
3006
|
};
|
|
3004
3007
|
}
|
|
3005
|
-
function
|
|
3008
|
+
function jt(n) {
|
|
3006
3009
|
return {
|
|
3007
3010
|
name: "Plain text",
|
|
3008
3011
|
aliases: [
|
|
@@ -3012,7 +3015,7 @@ function Qt(n) {
|
|
|
3012
3015
|
disableAutodetect: !0
|
|
3013
3016
|
};
|
|
3014
3017
|
}
|
|
3015
|
-
function
|
|
3018
|
+
function qt(n) {
|
|
3016
3019
|
const e = n.regex, s = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
3017
3020
|
"and",
|
|
3018
3021
|
"as",
|
|
@@ -3048,7 +3051,7 @@ function Zt(n) {
|
|
|
3048
3051
|
"while",
|
|
3049
3052
|
"with",
|
|
3050
3053
|
"yield"
|
|
3051
|
-
],
|
|
3054
|
+
], r = {
|
|
3052
3055
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
3053
3056
|
keyword: u,
|
|
3054
3057
|
built_in: [
|
|
@@ -3148,13 +3151,13 @@ function Zt(n) {
|
|
|
3148
3151
|
}, a = {
|
|
3149
3152
|
className: "meta",
|
|
3150
3153
|
begin: /^(>>>|\.\.\.) /
|
|
3151
|
-
},
|
|
3154
|
+
}, l = {
|
|
3152
3155
|
className: "subst",
|
|
3153
3156
|
begin: /\{/,
|
|
3154
3157
|
end: /\}/,
|
|
3155
|
-
keywords:
|
|
3158
|
+
keywords: r,
|
|
3156
3159
|
illegal: /#/
|
|
3157
|
-
},
|
|
3160
|
+
}, o = {
|
|
3158
3161
|
begin: /\{\{/,
|
|
3159
3162
|
relevance: 0
|
|
3160
3163
|
}, c = {
|
|
@@ -3185,8 +3188,8 @@ function Zt(n) {
|
|
|
3185
3188
|
contains: [
|
|
3186
3189
|
n.BACKSLASH_ESCAPE,
|
|
3187
3190
|
a,
|
|
3188
|
-
|
|
3189
|
-
|
|
3191
|
+
o,
|
|
3192
|
+
l
|
|
3190
3193
|
]
|
|
3191
3194
|
},
|
|
3192
3195
|
{
|
|
@@ -3195,8 +3198,8 @@ function Zt(n) {
|
|
|
3195
3198
|
contains: [
|
|
3196
3199
|
n.BACKSLASH_ESCAPE,
|
|
3197
3200
|
a,
|
|
3198
|
-
|
|
3199
|
-
|
|
3201
|
+
o,
|
|
3202
|
+
l
|
|
3200
3203
|
]
|
|
3201
3204
|
},
|
|
3202
3205
|
{
|
|
@@ -3222,8 +3225,8 @@ function Zt(n) {
|
|
|
3222
3225
|
end: /'/,
|
|
3223
3226
|
contains: [
|
|
3224
3227
|
n.BACKSLASH_ESCAPE,
|
|
3225
|
-
|
|
3226
|
-
|
|
3228
|
+
o,
|
|
3229
|
+
l
|
|
3227
3230
|
]
|
|
3228
3231
|
},
|
|
3229
3232
|
{
|
|
@@ -3231,14 +3234,14 @@ function Zt(n) {
|
|
|
3231
3234
|
end: /"/,
|
|
3232
3235
|
contains: [
|
|
3233
3236
|
n.BACKSLASH_ESCAPE,
|
|
3234
|
-
|
|
3235
|
-
|
|
3237
|
+
o,
|
|
3238
|
+
l
|
|
3236
3239
|
]
|
|
3237
3240
|
},
|
|
3238
3241
|
n.APOS_STRING_MODE,
|
|
3239
3242
|
n.QUOTE_STRING_MODE
|
|
3240
3243
|
]
|
|
3241
|
-
}, f = "[0-9](_?[0-9])*", d = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,
|
|
3244
|
+
}, f = "[0-9](_?[0-9])*", d = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`, h = `\\b|${u.join("|")}`, p = {
|
|
3242
3245
|
className: "number",
|
|
3243
3246
|
relevance: 0,
|
|
3244
3247
|
variants: [
|
|
@@ -3253,7 +3256,7 @@ function Zt(n) {
|
|
|
3253
3256
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
3254
3257
|
// the interior part of an identifier
|
|
3255
3258
|
{
|
|
3256
|
-
begin: `(\\b(${f})|(${d}))[eE][+-]?(${f})[jJ]?(?=${
|
|
3259
|
+
begin: `(\\b(${f})|(${d}))[eE][+-]?(${f})[jJ]?(?=${h})`
|
|
3257
3260
|
},
|
|
3258
3261
|
{
|
|
3259
3262
|
begin: `(${d})[jJ]?`
|
|
@@ -3265,28 +3268,28 @@ function Zt(n) {
|
|
|
3265
3268
|
// decinteger is optionally imaginary
|
|
3266
3269
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3267
3270
|
{
|
|
3268
|
-
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${
|
|
3271
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`
|
|
3269
3272
|
},
|
|
3270
3273
|
{
|
|
3271
|
-
begin: `\\b0[bB](_?[01])+[lL]?(?=${
|
|
3274
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${h})`
|
|
3272
3275
|
},
|
|
3273
3276
|
{
|
|
3274
|
-
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${
|
|
3277
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${h})`
|
|
3275
3278
|
},
|
|
3276
3279
|
{
|
|
3277
|
-
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${
|
|
3280
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`
|
|
3278
3281
|
},
|
|
3279
3282
|
// imagnumber (digitpart-based)
|
|
3280
3283
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
3281
3284
|
{
|
|
3282
|
-
begin: `\\b(${f})[jJ](?=${
|
|
3285
|
+
begin: `\\b(${f})[jJ](?=${h})`
|
|
3283
3286
|
}
|
|
3284
3287
|
]
|
|
3285
3288
|
}, _ = {
|
|
3286
3289
|
className: "comment",
|
|
3287
3290
|
begin: e.lookahead(/# type:/),
|
|
3288
3291
|
end: /$/,
|
|
3289
|
-
keywords:
|
|
3292
|
+
keywords: r,
|
|
3290
3293
|
contains: [
|
|
3291
3294
|
{
|
|
3292
3295
|
// prevent keywords from coloring `type`
|
|
@@ -3299,7 +3302,7 @@ function Zt(n) {
|
|
|
3299
3302
|
endsWithParent: !0
|
|
3300
3303
|
}
|
|
3301
3304
|
]
|
|
3302
|
-
},
|
|
3305
|
+
}, m = {
|
|
3303
3306
|
className: "params",
|
|
3304
3307
|
variants: [
|
|
3305
3308
|
// Exclude params in functions without params
|
|
@@ -3313,7 +3316,7 @@ function Zt(n) {
|
|
|
3313
3316
|
end: /\)/,
|
|
3314
3317
|
excludeBegin: !0,
|
|
3315
3318
|
excludeEnd: !0,
|
|
3316
|
-
keywords:
|
|
3319
|
+
keywords: r,
|
|
3317
3320
|
contains: [
|
|
3318
3321
|
"self",
|
|
3319
3322
|
a,
|
|
@@ -3324,7 +3327,7 @@ function Zt(n) {
|
|
|
3324
3327
|
}
|
|
3325
3328
|
]
|
|
3326
3329
|
};
|
|
3327
|
-
return
|
|
3330
|
+
return l.contains = [
|
|
3328
3331
|
c,
|
|
3329
3332
|
p,
|
|
3330
3333
|
a
|
|
@@ -3336,7 +3339,7 @@ function Zt(n) {
|
|
|
3336
3339
|
"ipython"
|
|
3337
3340
|
],
|
|
3338
3341
|
unicodeRegex: !0,
|
|
3339
|
-
keywords:
|
|
3342
|
+
keywords: r,
|
|
3340
3343
|
illegal: /(<\/|\?)|=>/,
|
|
3341
3344
|
contains: [
|
|
3342
3345
|
a,
|
|
@@ -3366,7 +3369,7 @@ function Zt(n) {
|
|
|
3366
3369
|
1: "keyword",
|
|
3367
3370
|
3: "title.function"
|
|
3368
3371
|
},
|
|
3369
|
-
contains: [
|
|
3372
|
+
contains: [m]
|
|
3370
3373
|
},
|
|
3371
3374
|
{
|
|
3372
3375
|
variants: [
|
|
@@ -3401,25 +3404,25 @@ function Zt(n) {
|
|
|
3401
3404
|
end: /(?=#)|$/,
|
|
3402
3405
|
contains: [
|
|
3403
3406
|
p,
|
|
3404
|
-
|
|
3407
|
+
m,
|
|
3405
3408
|
c
|
|
3406
3409
|
]
|
|
3407
3410
|
}
|
|
3408
3411
|
]
|
|
3409
3412
|
};
|
|
3410
3413
|
}
|
|
3411
|
-
var
|
|
3414
|
+
var ge = "[0-9](_*[0-9])*", we = `\\.(${ge})`, Ae = "[0-9a-fA-F](_*[0-9a-fA-F])*", ln = {
|
|
3412
3415
|
className: "number",
|
|
3413
3416
|
variants: [
|
|
3414
3417
|
// DecimalFloatingPointLiteral
|
|
3415
3418
|
// including ExponentPart
|
|
3416
|
-
{ begin: `(\\b(${
|
|
3419
|
+
{ begin: `(\\b(${ge})((${we})|\\.)?|(${we}))[eE][+-]?(${ge})[fFdD]?\\b` },
|
|
3417
3420
|
// excluding ExponentPart
|
|
3418
|
-
{ begin: `\\b(${
|
|
3421
|
+
{ begin: `\\b(${ge})((${we})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3419
3422
|
{ begin: `(${we})[fFdD]?\\b` },
|
|
3420
|
-
{ begin: `\\b(${
|
|
3423
|
+
{ begin: `\\b(${ge})[fFdD]\\b` },
|
|
3421
3424
|
// HexadecimalFloatingPointLiteral
|
|
3422
|
-
{ begin: `\\b0[xX]((${Ae})\\.?|(${Ae})?\\.(${Ae}))[pP][+-]?(${
|
|
3425
|
+
{ begin: `\\b0[xX]((${Ae})\\.?|(${Ae})?\\.(${Ae}))[pP][+-]?(${ge})[fFdD]?\\b` },
|
|
3423
3426
|
// DecimalIntegerLiteral
|
|
3424
3427
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
3425
3428
|
// HexIntegerLiteral
|
|
@@ -3431,11 +3434,11 @@ var ue = "[0-9](_*[0-9])*", we = `\\.(${ue})`, Ae = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3431
3434
|
],
|
|
3432
3435
|
relevance: 0
|
|
3433
3436
|
};
|
|
3434
|
-
function
|
|
3435
|
-
return s === -1 ? "" : n.replace(e, (u) =>
|
|
3437
|
+
function Dn(n, e, s) {
|
|
3438
|
+
return s === -1 ? "" : n.replace(e, (u) => Dn(n, e, s - 1));
|
|
3436
3439
|
}
|
|
3437
|
-
function
|
|
3438
|
-
const e = n.regex, s = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = s +
|
|
3440
|
+
function Jt(n) {
|
|
3441
|
+
const e = n.regex, s = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = s + Dn("(?:<" + s + "~~~(?:\\s*,\\s*" + s + "~~~)*>)?", /~~~/g, 2), a = {
|
|
3439
3442
|
keyword: [
|
|
3440
3443
|
"synchronized",
|
|
3441
3444
|
"abstract",
|
|
@@ -3500,7 +3503,7 @@ function Yt(n) {
|
|
|
3500
3503
|
"super",
|
|
3501
3504
|
"this"
|
|
3502
3505
|
]
|
|
3503
|
-
},
|
|
3506
|
+
}, l = {
|
|
3504
3507
|
className: "meta",
|
|
3505
3508
|
begin: "@" + s,
|
|
3506
3509
|
contains: [
|
|
@@ -3511,7 +3514,7 @@ function Yt(n) {
|
|
|
3511
3514
|
// allow nested () inside our annotation
|
|
3512
3515
|
}
|
|
3513
3516
|
]
|
|
3514
|
-
},
|
|
3517
|
+
}, o = {
|
|
3515
3518
|
className: "params",
|
|
3516
3519
|
begin: /\(/,
|
|
3517
3520
|
end: /\)/,
|
|
@@ -3601,7 +3604,7 @@ function Yt(n) {
|
|
|
3601
3604
|
3: "title.class"
|
|
3602
3605
|
},
|
|
3603
3606
|
contains: [
|
|
3604
|
-
|
|
3607
|
+
o,
|
|
3605
3608
|
n.C_LINE_COMMENT_MODE,
|
|
3606
3609
|
n.C_BLOCK_COMMENT_MODE
|
|
3607
3610
|
]
|
|
@@ -3628,10 +3631,10 @@ function Yt(n) {
|
|
|
3628
3631
|
keywords: a,
|
|
3629
3632
|
relevance: 0,
|
|
3630
3633
|
contains: [
|
|
3631
|
-
|
|
3634
|
+
l,
|
|
3632
3635
|
n.APOS_STRING_MODE,
|
|
3633
3636
|
n.QUOTE_STRING_MODE,
|
|
3634
|
-
|
|
3637
|
+
ln,
|
|
3635
3638
|
n.C_BLOCK_COMMENT_MODE
|
|
3636
3639
|
]
|
|
3637
3640
|
},
|
|
@@ -3639,12 +3642,12 @@ function Yt(n) {
|
|
|
3639
3642
|
n.C_BLOCK_COMMENT_MODE
|
|
3640
3643
|
]
|
|
3641
3644
|
},
|
|
3642
|
-
|
|
3643
|
-
|
|
3645
|
+
ln,
|
|
3646
|
+
l
|
|
3644
3647
|
]
|
|
3645
3648
|
};
|
|
3646
3649
|
}
|
|
3647
|
-
function
|
|
3650
|
+
function ei(n) {
|
|
3648
3651
|
const e = n.regex, s = {}, u = {
|
|
3649
3652
|
begin: /\$\{/,
|
|
3650
3653
|
end: /\}/,
|
|
@@ -3669,7 +3672,7 @@ function Vt(n) {
|
|
|
3669
3672
|
u
|
|
3670
3673
|
]
|
|
3671
3674
|
});
|
|
3672
|
-
const
|
|
3675
|
+
const g = {
|
|
3673
3676
|
className: "subst",
|
|
3674
3677
|
begin: /\$\(/,
|
|
3675
3678
|
end: /\)/,
|
|
@@ -3685,7 +3688,7 @@ function Vt(n) {
|
|
|
3685
3688
|
2: "comment"
|
|
3686
3689
|
}
|
|
3687
3690
|
}
|
|
3688
|
-
),
|
|
3691
|
+
), i = {
|
|
3689
3692
|
begin: /<<-?\s*(?=\w+)/,
|
|
3690
3693
|
starts: { contains: [
|
|
3691
3694
|
n.END_SAME_AS_BEGIN({
|
|
@@ -3694,24 +3697,24 @@ function Vt(n) {
|
|
|
3694
3697
|
className: "string"
|
|
3695
3698
|
})
|
|
3696
3699
|
] }
|
|
3697
|
-
},
|
|
3700
|
+
}, r = {
|
|
3698
3701
|
className: "string",
|
|
3699
3702
|
begin: /"/,
|
|
3700
3703
|
end: /"/,
|
|
3701
3704
|
contains: [
|
|
3702
3705
|
n.BACKSLASH_ESCAPE,
|
|
3703
3706
|
s,
|
|
3704
|
-
|
|
3707
|
+
g
|
|
3705
3708
|
]
|
|
3706
3709
|
};
|
|
3707
|
-
|
|
3710
|
+
g.contains.push(r);
|
|
3708
3711
|
const a = {
|
|
3709
3712
|
match: /\\"/
|
|
3710
|
-
},
|
|
3713
|
+
}, l = {
|
|
3711
3714
|
className: "string",
|
|
3712
3715
|
begin: /'/,
|
|
3713
3716
|
end: /'/
|
|
3714
|
-
},
|
|
3717
|
+
}, o = {
|
|
3715
3718
|
match: /\\'/
|
|
3716
3719
|
}, c = {
|
|
3717
3720
|
begin: /\$?\(\(/,
|
|
@@ -3737,7 +3740,7 @@ function Vt(n) {
|
|
|
3737
3740
|
], d = n.SHEBANG({
|
|
3738
3741
|
binary: `(${f.join("|")})`,
|
|
3739
3742
|
relevance: 10
|
|
3740
|
-
}),
|
|
3743
|
+
}), h = {
|
|
3741
3744
|
className: "function",
|
|
3742
3745
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3743
3746
|
returnBegin: !0,
|
|
@@ -3762,7 +3765,7 @@ function Vt(n) {
|
|
|
3762
3765
|
], _ = [
|
|
3763
3766
|
"true",
|
|
3764
3767
|
"false"
|
|
3765
|
-
],
|
|
3768
|
+
], m = { match: /(\/[a-z._-]+)+/ }, v = [
|
|
3766
3769
|
"break",
|
|
3767
3770
|
"cd",
|
|
3768
3771
|
"continue",
|
|
@@ -3873,7 +3876,7 @@ function Vt(n) {
|
|
|
3873
3876
|
"zsocket",
|
|
3874
3877
|
"zstyle",
|
|
3875
3878
|
"ztcp"
|
|
3876
|
-
],
|
|
3879
|
+
], T = [
|
|
3877
3880
|
"chcon",
|
|
3878
3881
|
"chgrp",
|
|
3879
3882
|
"chown",
|
|
@@ -3989,13 +3992,13 @@ function Vt(n) {
|
|
|
3989
3992
|
keyword: p,
|
|
3990
3993
|
literal: _,
|
|
3991
3994
|
built_in: [
|
|
3992
|
-
...
|
|
3995
|
+
...v,
|
|
3993
3996
|
...E,
|
|
3994
3997
|
// Shell modifiers
|
|
3995
3998
|
"set",
|
|
3996
3999
|
"shopt",
|
|
3997
4000
|
...y,
|
|
3998
|
-
...
|
|
4001
|
+
...T
|
|
3999
4002
|
]
|
|
4000
4003
|
},
|
|
4001
4004
|
contains: [
|
|
@@ -4003,20 +4006,20 @@ function Vt(n) {
|
|
|
4003
4006
|
// to catch known shells and boost relevancy
|
|
4004
4007
|
n.SHEBANG(),
|
|
4005
4008
|
// to catch unknown shells but still highlight the shebang
|
|
4006
|
-
|
|
4009
|
+
h,
|
|
4007
4010
|
c,
|
|
4008
4011
|
t,
|
|
4009
|
-
r,
|
|
4010
|
-
v,
|
|
4011
4012
|
i,
|
|
4013
|
+
m,
|
|
4014
|
+
r,
|
|
4012
4015
|
a,
|
|
4013
|
-
o,
|
|
4014
4016
|
l,
|
|
4017
|
+
o,
|
|
4015
4018
|
s
|
|
4016
4019
|
]
|
|
4017
4020
|
};
|
|
4018
4021
|
}
|
|
4019
|
-
function
|
|
4022
|
+
function ni(n) {
|
|
4020
4023
|
const e = n.regex, s = n.COMMENT("--", "$"), u = {
|
|
4021
4024
|
className: "string",
|
|
4022
4025
|
variants: [
|
|
@@ -4026,7 +4029,7 @@ function Xt(n) {
|
|
|
4026
4029
|
contains: [{ begin: /''/ }]
|
|
4027
4030
|
}
|
|
4028
4031
|
]
|
|
4029
|
-
},
|
|
4032
|
+
}, g = {
|
|
4030
4033
|
begin: /"/,
|
|
4031
4034
|
end: /"/,
|
|
4032
4035
|
contains: [{ begin: /""/ }]
|
|
@@ -4036,12 +4039,12 @@ function Xt(n) {
|
|
|
4036
4039
|
// Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
|
|
4037
4040
|
// "null",
|
|
4038
4041
|
"unknown"
|
|
4039
|
-
],
|
|
4042
|
+
], i = [
|
|
4040
4043
|
"double precision",
|
|
4041
4044
|
"large object",
|
|
4042
4045
|
"with timezone",
|
|
4043
4046
|
"without timezone"
|
|
4044
|
-
],
|
|
4047
|
+
], r = [
|
|
4045
4048
|
"bigint",
|
|
4046
4049
|
"binary",
|
|
4047
4050
|
"blob",
|
|
@@ -4079,7 +4082,7 @@ function Xt(n) {
|
|
|
4079
4082
|
"first",
|
|
4080
4083
|
"last",
|
|
4081
4084
|
"view"
|
|
4082
|
-
],
|
|
4085
|
+
], l = [
|
|
4083
4086
|
"abs",
|
|
4084
4087
|
"acos",
|
|
4085
4088
|
"all",
|
|
@@ -4446,7 +4449,7 @@ function Xt(n) {
|
|
|
4446
4449
|
"within",
|
|
4447
4450
|
"without",
|
|
4448
4451
|
"year"
|
|
4449
|
-
],
|
|
4452
|
+
], o = [
|
|
4450
4453
|
"abs",
|
|
4451
4454
|
"acos",
|
|
4452
4455
|
"array_agg",
|
|
@@ -4565,27 +4568,27 @@ function Xt(n) {
|
|
|
4565
4568
|
"nulls last",
|
|
4566
4569
|
"depth first",
|
|
4567
4570
|
"breadth first"
|
|
4568
|
-
], d =
|
|
4569
|
-
...
|
|
4571
|
+
], d = o, h = [
|
|
4572
|
+
...l,
|
|
4570
4573
|
...a
|
|
4571
|
-
].filter((E) => !
|
|
4574
|
+
].filter((E) => !o.includes(E)), p = {
|
|
4572
4575
|
className: "variable",
|
|
4573
4576
|
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4574
4577
|
}, _ = {
|
|
4575
4578
|
className: "operator",
|
|
4576
4579
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4577
4580
|
relevance: 0
|
|
4578
|
-
},
|
|
4581
|
+
}, m = {
|
|
4579
4582
|
begin: e.concat(/\b/, e.either(...d), /\s*\(/),
|
|
4580
4583
|
relevance: 0,
|
|
4581
4584
|
keywords: { built_in: d }
|
|
4582
4585
|
};
|
|
4583
|
-
function
|
|
4586
|
+
function v(E, {
|
|
4584
4587
|
exceptions: y,
|
|
4585
|
-
when:
|
|
4588
|
+
when: T
|
|
4586
4589
|
} = {}) {
|
|
4587
|
-
const
|
|
4588
|
-
return y = y || [], E.map((
|
|
4590
|
+
const M = T;
|
|
4591
|
+
return y = y || [], E.map((D) => D.match(/\|\d+$/) || y.includes(D) ? D : M(D) ? `${D}|0` : D);
|
|
4589
4592
|
}
|
|
4590
4593
|
return {
|
|
4591
4594
|
name: "SQL",
|
|
@@ -4594,9 +4597,9 @@ function Xt(n) {
|
|
|
4594
4597
|
illegal: /[{}]|<\//,
|
|
4595
4598
|
keywords: {
|
|
4596
4599
|
$pattern: /\b[\w\.]+/,
|
|
4597
|
-
keyword:
|
|
4600
|
+
keyword: v(h, { when: (E) => E.length < 3 }),
|
|
4598
4601
|
literal: t,
|
|
4599
|
-
type:
|
|
4602
|
+
type: r,
|
|
4600
4603
|
built_in: c
|
|
4601
4604
|
},
|
|
4602
4605
|
contains: [
|
|
@@ -4605,19 +4608,19 @@ function Xt(n) {
|
|
|
4605
4608
|
relevance: 0,
|
|
4606
4609
|
keywords: {
|
|
4607
4610
|
$pattern: /[\w\.]+/,
|
|
4608
|
-
keyword:
|
|
4611
|
+
keyword: h.concat(f),
|
|
4609
4612
|
literal: t,
|
|
4610
|
-
type:
|
|
4613
|
+
type: r
|
|
4611
4614
|
}
|
|
4612
4615
|
},
|
|
4613
4616
|
{
|
|
4614
4617
|
className: "type",
|
|
4615
|
-
begin: e.either(...
|
|
4618
|
+
begin: e.either(...i)
|
|
4616
4619
|
},
|
|
4617
|
-
|
|
4620
|
+
m,
|
|
4618
4621
|
p,
|
|
4619
4622
|
u,
|
|
4620
|
-
|
|
4623
|
+
g,
|
|
4621
4624
|
n.C_NUMBER_MODE,
|
|
4622
4625
|
n.C_BLOCK_COMMENT_MODE,
|
|
4623
4626
|
s,
|
|
@@ -4625,18 +4628,18 @@ function Xt(n) {
|
|
|
4625
4628
|
]
|
|
4626
4629
|
};
|
|
4627
4630
|
}
|
|
4628
|
-
Y.registerLanguage("xml",
|
|
4629
|
-
Y.registerLanguage("javascript",
|
|
4630
|
-
Y.registerLanguage("json",
|
|
4631
|
-
Y.registerLanguage("yaml",
|
|
4632
|
-
Y.registerLanguage("plaintext",
|
|
4633
|
-
Y.registerLanguage("python",
|
|
4634
|
-
Y.registerLanguage("java",
|
|
4635
|
-
Y.registerLanguage("bash",
|
|
4636
|
-
Y.registerLanguage("sql",
|
|
4631
|
+
Y.registerLanguage("xml", Gt);
|
|
4632
|
+
Y.registerLanguage("javascript", Yt);
|
|
4633
|
+
Y.registerLanguage("json", Vt);
|
|
4634
|
+
Y.registerLanguage("yaml", Xt);
|
|
4635
|
+
Y.registerLanguage("plaintext", jt);
|
|
4636
|
+
Y.registerLanguage("python", qt);
|
|
4637
|
+
Y.registerLanguage("java", Jt);
|
|
4638
|
+
Y.registerLanguage("bash", ei);
|
|
4639
|
+
Y.registerLanguage("sql", ni);
|
|
4637
4640
|
var S = /* @__PURE__ */ ((n) => (n.EQUAL = "equal", n.DELETE = "removed", n.ADD = "added", n.EMPTY = "empty", n))(S || {});
|
|
4638
|
-
const J = "<code-diff-modified>", ee = "</code-diff-modified>",
|
|
4639
|
-
function
|
|
4641
|
+
const J = "<code-diff-modified>", ee = "</code-diff-modified>", ti = 1e4, Z = 1e3, cn = J.replace("<", "<").replace(">", ">"), un = ee.replace("<", "<").replace(">", ">");
|
|
4642
|
+
function ii(n) {
|
|
4640
4643
|
const e = {
|
|
4641
4644
|
"&": "&",
|
|
4642
4645
|
"<": "<",
|
|
@@ -4646,281 +4649,317 @@ function jt(n) {
|
|
|
4646
4649
|
};
|
|
4647
4650
|
return n.replace(/[&<>"']/g, (s) => e[s]);
|
|
4648
4651
|
}
|
|
4649
|
-
function
|
|
4652
|
+
function se(n) {
|
|
4650
4653
|
return n === void 0 ? S.EQUAL : n.added ? S.ADD : n.removed ? S.DELETE : S.EQUAL;
|
|
4651
4654
|
}
|
|
4652
|
-
function
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
+
function Sn(n, e, s = "word", u = !1) {
|
|
4656
|
+
if (typeof n == "undefined" || typeof e == "undefined")
|
|
4657
|
+
return [n, e];
|
|
4658
|
+
if (!u && n.length + e.length > ti)
|
|
4659
|
+
return [n, e];
|
|
4660
|
+
const t = (s === "char" ? Hn : Kn)(n, e), i = t.filter((a) => se(a) !== S.ADD).map(
|
|
4661
|
+
(a) => se(a) === S.DELETE ? `${J}${a.value}${ee}` : a.value
|
|
4662
|
+
).join(""), r = t.filter((a) => se(a) !== S.DELETE).map(
|
|
4663
|
+
(a) => se(a) === S.ADD ? `${J}${a.value}${ee}` : a.value
|
|
4655
4664
|
).join("");
|
|
4665
|
+
return [i, r];
|
|
4656
4666
|
}
|
|
4657
|
-
function
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4667
|
+
function Cn(n, e) {
|
|
4668
|
+
if (n === e)
|
|
4669
|
+
return n ? [{ count: n.replace(/\n$/, "").split(`
|
|
4670
|
+
`).length, value: n }] : [];
|
|
4671
|
+
const s = n.endsWith(`
|
|
4672
|
+
`), u = e.endsWith(`
|
|
4673
|
+
`);
|
|
4674
|
+
s !== u && (s ? n = n.slice(0, -1) : e = e.slice(0, -1)), n && (n += `
|
|
4675
|
+
`), e && (e += `
|
|
4676
|
+
`);
|
|
4677
|
+
let g;
|
|
4678
|
+
if (n.length + e.length >= 1e5 && n.includes(`
|
|
4679
|
+
`) && e.includes(`
|
|
4680
|
+
`)) {
|
|
4681
|
+
const t = n ? n.replace(/\n$/, "").split(`
|
|
4682
|
+
`) : [], i = e ? e.replace(/\n$/, "").split(`
|
|
4683
|
+
`) : [], r = new Set(t), a = new Set(i), [l, o] = r.size < a.size ? [r, a] : [a, r];
|
|
4684
|
+
let c = 0;
|
|
4685
|
+
for (const p of l)
|
|
4686
|
+
o.has(p) && c++;
|
|
4687
|
+
const f = l.size ? c / l.size : 0, d = r.size >= 4e4 || r.size + a.size - c >= 65535, h = r.size + a.size - c * 2;
|
|
4688
|
+
f < 0.01 || d && h > 200 ? (g = [], n && g.push({ count: t.length, value: n, removed: !0 }), e && g.push({ count: i.length, value: e, added: !0 })) : d && (g = Wn(n, e));
|
|
4689
|
+
}
|
|
4690
|
+
if (!g) {
|
|
4691
|
+
const t = new Re.diff_match_patch(), i = t.diff_linesToChars_(n, e), r = i.chars1, a = i.chars2, l = i.lineArray, o = t.diff_main(r, a, !1);
|
|
4692
|
+
t.diff_charsToLines_(o, l), g = o.map((c) => {
|
|
4693
|
+
const [f, d] = c;
|
|
4694
|
+
return {
|
|
4695
|
+
count: d.replace(/\n$/, "").split(`
|
|
4663
4696
|
`).length,
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4697
|
+
value: d,
|
|
4698
|
+
removed: f === Re.DIFF_DELETE,
|
|
4699
|
+
added: f === Re.DIFF_INSERT
|
|
4700
|
+
};
|
|
4701
|
+
});
|
|
4702
|
+
}
|
|
4703
|
+
return s !== u && g.push({
|
|
4704
|
+
count: 1,
|
|
4705
|
+
value: "",
|
|
4706
|
+
removed: s,
|
|
4707
|
+
added: u
|
|
4708
|
+
}), g;
|
|
4669
4709
|
}
|
|
4670
|
-
function
|
|
4671
|
-
if (typeof document == "undefined")
|
|
4672
|
-
return
|
|
4710
|
+
function Be(n, e) {
|
|
4711
|
+
if (typeof document == "undefined" || n === "plaintext")
|
|
4712
|
+
return ii(e).replace(new RegExp(cn, "g"), '<span class="x">').replace(new RegExp(un, "g"), "</span>");
|
|
4673
4713
|
if (!e.match(new RegExp(`(${J}|${ee})`, "g")))
|
|
4674
4714
|
return Y.highlight(e, { language: n }).value;
|
|
4675
4715
|
let u = e;
|
|
4676
|
-
const
|
|
4677
|
-
t.innerHTML = Y.highlight(
|
|
4678
|
-
let
|
|
4679
|
-
const
|
|
4680
|
-
a.childNodes.forEach((
|
|
4681
|
-
if (
|
|
4682
|
-
if (!
|
|
4716
|
+
const g = e.replace(new RegExp(`(${J}|${ee})`, "g"), ""), t = document.createElement("div");
|
|
4717
|
+
t.innerHTML = Y.highlight(g, { language: n }).value;
|
|
4718
|
+
let i = !1;
|
|
4719
|
+
const r = (a) => {
|
|
4720
|
+
a.childNodes.forEach((l) => {
|
|
4721
|
+
if (l.nodeType === Node.ELEMENT_NODE && r(l), l.nodeType === Node.TEXT_NODE) {
|
|
4722
|
+
if (!l.textContent)
|
|
4683
4723
|
return;
|
|
4684
|
-
let
|
|
4685
|
-
for (
|
|
4724
|
+
let o = l.textContent, c = "";
|
|
4725
|
+
for (i && (c = c + J); o.length; ) {
|
|
4686
4726
|
if (u.startsWith(J)) {
|
|
4687
|
-
u = u.slice(J.length), c = c + J,
|
|
4727
|
+
u = u.slice(J.length), c = c + J, i = !0;
|
|
4688
4728
|
continue;
|
|
4689
4729
|
}
|
|
4690
4730
|
if (u.startsWith(ee)) {
|
|
4691
|
-
u = u.slice(ee.length), c = c + ee,
|
|
4731
|
+
u = u.slice(ee.length), c = c + ee, i = !1;
|
|
4692
4732
|
continue;
|
|
4693
4733
|
}
|
|
4694
|
-
const f = u.match(new RegExp(`(${J}|${ee})`)), d = f && f.index ? f.index : u.length,
|
|
4695
|
-
c = c + u.substring(0,
|
|
4734
|
+
const f = u.match(new RegExp(`(${J}|${ee})`)), d = f && f.index ? f.index : u.length, h = Math.min(d, o.length);
|
|
4735
|
+
c = c + u.substring(0, h), u = u.slice(h), o = o.slice(h);
|
|
4696
4736
|
}
|
|
4697
|
-
|
|
4737
|
+
i && (c = c + ee), l.textContent = c;
|
|
4698
4738
|
}
|
|
4699
4739
|
});
|
|
4700
4740
|
};
|
|
4701
|
-
return
|
|
4741
|
+
return r(t), t.innerHTML.replace(new RegExp(cn, "g"), '<span class="x">').replace(new RegExp(un, "g"), "</span>");
|
|
4742
|
+
}
|
|
4743
|
+
function $e(n, e) {
|
|
4744
|
+
n.highlighted || (n.code = Be(e, n.code), n.highlighted = !0);
|
|
4702
4745
|
}
|
|
4703
|
-
function
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4746
|
+
function xe(n, e) {
|
|
4747
|
+
if (n.highlighted)
|
|
4748
|
+
return;
|
|
4749
|
+
const s = n.left.code;
|
|
4750
|
+
s !== void 0 && (n.left.code = Be(e, s)), n.right.code !== void 0 && (n.right.code = n.left.type === S.EQUAL && n.right.type === S.EQUAL && n.right.code === s ? n.left.code : Be(e, n.right.code)), n.highlighted = !0;
|
|
4751
|
+
}
|
|
4752
|
+
function Ln(n, e) {
|
|
4753
|
+
var a, l;
|
|
4754
|
+
const s = (o, c) => (o.match(new RegExp(c, "g")) || []).length, u = (o) => o.filter((c) => e == null ? void 0 : e.test(c)).length;
|
|
4755
|
+
let g = 0, t = 0, i = 0, r = 0;
|
|
4756
|
+
for (const o of n) {
|
|
4757
|
+
if (o.added) {
|
|
4758
|
+
if (!e) {
|
|
4759
|
+
g += (a = o.count) != null ? a : 0;
|
|
4760
|
+
continue;
|
|
4761
|
+
}
|
|
4762
|
+
const c = u(o.value.trim().split(`
|
|
4709
4763
|
`));
|
|
4710
|
-
|
|
4711
|
-
`) + 1 -
|
|
4764
|
+
g += s(o.value.trim(), `
|
|
4765
|
+
`) + 1 - c, i += c;
|
|
4712
4766
|
continue;
|
|
4713
4767
|
}
|
|
4714
|
-
if (
|
|
4715
|
-
|
|
4768
|
+
if (o.removed) {
|
|
4769
|
+
if (!e) {
|
|
4770
|
+
t += (l = o.count) != null ? l : 0;
|
|
4771
|
+
continue;
|
|
4772
|
+
}
|
|
4773
|
+
const c = u(o.value.trim().split(`
|
|
4716
4774
|
`));
|
|
4717
|
-
t += s(
|
|
4718
|
-
`) + 1 -
|
|
4775
|
+
t += s(o.value.trim(), `
|
|
4776
|
+
`) + 1 - c, r += c;
|
|
4719
4777
|
continue;
|
|
4720
4778
|
}
|
|
4721
4779
|
}
|
|
4722
4780
|
return {
|
|
4723
|
-
additionsNum:
|
|
4781
|
+
additionsNum: g,
|
|
4724
4782
|
deletionsNum: t,
|
|
4725
|
-
ignoreAdditionsNum:
|
|
4726
|
-
ignoreDeletionsNum:
|
|
4783
|
+
ignoreAdditionsNum: i,
|
|
4784
|
+
ignoreDeletionsNum: r
|
|
4727
4785
|
};
|
|
4728
4786
|
}
|
|
4729
|
-
function
|
|
4730
|
-
const
|
|
4787
|
+
function ri(n, e, s = "plaintext", u = "word", g = !1, t = 10, i) {
|
|
4788
|
+
const r = () => ({ type: S.EMPTY }), a = (v, E, y) => ({ type: v, num: E, code: y }), l = Cn(n, e), o = i ? new RegExp(i) : void 0;
|
|
4731
4789
|
let c = 0, f = 0, d = !1;
|
|
4732
|
-
const
|
|
4733
|
-
changes:
|
|
4790
|
+
const h = [], p = {
|
|
4791
|
+
changes: h,
|
|
4734
4792
|
collector: [],
|
|
4735
|
-
stat:
|
|
4793
|
+
stat: Ln(l, o)
|
|
4736
4794
|
};
|
|
4737
|
-
for (let
|
|
4795
|
+
for (let v = 0; v < l.length; v++) {
|
|
4738
4796
|
if (d) {
|
|
4739
4797
|
d = !1;
|
|
4740
4798
|
continue;
|
|
4741
4799
|
}
|
|
4742
|
-
const [E, y] = [
|
|
4800
|
+
const [E, y] = [l[v], l[v + 1]], [T, M] = [se(E), se(y)], D = E.value.replace(/\n$/, "").split(`
|
|
4743
4801
|
`);
|
|
4744
4802
|
if (y === void 0) {
|
|
4745
|
-
for (const
|
|
4746
|
-
let L =
|
|
4747
|
-
|
|
4748
|
-
M === S.EQUAL && (c++, f++, L = a(S.EQUAL, c, B), $ = a(S.EQUAL, f, B)), M === S.DELETE && (c++, L = a(S.DELETE, c, B), $ = i()), M === S.ADD && (f++, L = i(), $ = a(S.ADD, f, B)), g.push({ left: L, right: $ });
|
|
4803
|
+
for (const N of D) {
|
|
4804
|
+
let L = r(), B = r();
|
|
4805
|
+
T === S.EQUAL && (c++, f++, L = a(S.EQUAL, c, N), B = a(S.EQUAL, f, N)), T === S.DELETE && (c++, L = a(S.DELETE, c, N), B = r()), T === S.ADD && (f++, L = r(), B = a(S.ADD, f, N)), h.push({ left: L, right: B });
|
|
4749
4806
|
}
|
|
4750
4807
|
break;
|
|
4751
4808
|
}
|
|
4752
|
-
if (
|
|
4753
|
-
for (const
|
|
4754
|
-
c++, f
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
left: a(S.EQUAL, c, L),
|
|
4758
|
-
right: a(S.EQUAL, f, L)
|
|
4809
|
+
if (T === S.EQUAL)
|
|
4810
|
+
for (const N of D)
|
|
4811
|
+
c++, f++, h.push({
|
|
4812
|
+
left: a(S.EQUAL, c, N),
|
|
4813
|
+
right: a(S.EQUAL, f, N)
|
|
4759
4814
|
});
|
|
4760
|
-
|
|
4761
|
-
const R = y.value.replace(/\n$/, "").split(`
|
|
4815
|
+
const k = y.value.replace(/\n$/, "").split(`
|
|
4762
4816
|
`);
|
|
4763
|
-
if (
|
|
4764
|
-
if (
|
|
4765
|
-
for (const
|
|
4766
|
-
c++,
|
|
4767
|
-
left: a(S.DELETE, c,
|
|
4768
|
-
right:
|
|
4817
|
+
if (T === S.DELETE) {
|
|
4818
|
+
if (M === S.EQUAL)
|
|
4819
|
+
for (const N of D)
|
|
4820
|
+
c++, h.push({
|
|
4821
|
+
left: a(S.DELETE, c, N),
|
|
4822
|
+
right: r()
|
|
4769
4823
|
});
|
|
4770
|
-
if (
|
|
4824
|
+
if (M === S.ADD) {
|
|
4771
4825
|
d = !0;
|
|
4772
|
-
const
|
|
4773
|
-
for (let L = 0; L <
|
|
4826
|
+
const N = Math.max(E.count, y.count);
|
|
4827
|
+
for (let L = 0; L < N; L++) {
|
|
4774
4828
|
L < E.count && c++, L < y.count && f++;
|
|
4775
|
-
const [
|
|
4776
|
-
|
|
4829
|
+
const [B, x] = [D[L], k[L]], z = g || D.length === k.length, [K, ie] = z ? Sn(B, x, u, g) : [B, x], ue = o != null && o.test(B) ? S.EQUAL : S.DELETE, b = o != null && o.test(x) ? S.EQUAL : S.ADD, A = L < E.count ? a(ue, c, K) : r(), R = L < y.count ? a(b, f, ie) : r();
|
|
4830
|
+
h.push({ left: A, right: R });
|
|
4777
4831
|
}
|
|
4778
4832
|
}
|
|
4779
4833
|
}
|
|
4780
|
-
if (
|
|
4781
|
-
for (const
|
|
4782
|
-
f++,
|
|
4783
|
-
left:
|
|
4784
|
-
right: a(S.ADD, f,
|
|
4834
|
+
if (T === S.ADD)
|
|
4835
|
+
for (const N of D)
|
|
4836
|
+
f++, h.push({
|
|
4837
|
+
left: r(),
|
|
4838
|
+
right: a(S.ADD, f, N)
|
|
4785
4839
|
});
|
|
4786
4840
|
}
|
|
4787
4841
|
if (n === e) {
|
|
4788
|
-
for (let
|
|
4789
|
-
|
|
4790
|
-
return p;
|
|
4842
|
+
for (let v = 0; v < h.length; v++)
|
|
4843
|
+
h[v].fold = !1;
|
|
4844
|
+
return h.slice(0, Z).forEach((v) => xe(v, s)), p;
|
|
4791
4845
|
}
|
|
4792
|
-
for (let
|
|
4793
|
-
const E =
|
|
4846
|
+
for (let v = 0; v < h.length; v++) {
|
|
4847
|
+
const E = h[v];
|
|
4794
4848
|
if (E.left.type === S.DELETE || E.right.type === S.ADD) {
|
|
4795
|
-
const [y,
|
|
4796
|
-
for (let
|
|
4797
|
-
|
|
4849
|
+
const [y, T] = [Math.max(v - t, 0), Math.min(v + t + 1, h.length)];
|
|
4850
|
+
for (let M = y; M < T; M++)
|
|
4851
|
+
h[M].fold = !1;
|
|
4798
4852
|
}
|
|
4799
4853
|
E.fold === void 0 && (E.fold = !0);
|
|
4800
4854
|
}
|
|
4801
4855
|
const _ = [];
|
|
4802
|
-
let
|
|
4803
|
-
for (let
|
|
4804
|
-
const E =
|
|
4856
|
+
let m = [];
|
|
4857
|
+
for (let v = 0; v < h.length; v++) {
|
|
4858
|
+
const E = h[v];
|
|
4805
4859
|
if (E.fold === !1) {
|
|
4806
|
-
|
|
4807
|
-
lines:
|
|
4860
|
+
m.length && (m[0].hideIndex = p.collector.length, p.collector.push({
|
|
4861
|
+
lines: m,
|
|
4808
4862
|
fold: !0
|
|
4809
|
-
}),
|
|
4863
|
+
}), m = []), _.push(E);
|
|
4810
4864
|
continue;
|
|
4811
4865
|
}
|
|
4812
|
-
E.hide = !0,
|
|
4866
|
+
E.hide = !0, m.push(E), _.push(E);
|
|
4813
4867
|
}
|
|
4814
|
-
return
|
|
4815
|
-
lines:
|
|
4868
|
+
return m.length && (m[0].hideIndex = p.collector.length, p.collector.push({
|
|
4869
|
+
lines: m,
|
|
4816
4870
|
fold: !0
|
|
4817
|
-
}),
|
|
4871
|
+
}), m = []), p.changes = _, p.changes.filter((v) => !v.hide).slice(0, Z).forEach((v) => xe(v, s)), p;
|
|
4818
4872
|
}
|
|
4819
|
-
function
|
|
4820
|
-
const
|
|
4821
|
-
let
|
|
4873
|
+
function si(n, e, s = "plaintext", u = "word", g = !1, t = 10, i) {
|
|
4874
|
+
const r = Cn(n, e), a = i ? new RegExp(i) : void 0;
|
|
4875
|
+
let l = 0, o = 0, c = !1;
|
|
4822
4876
|
const f = [], d = {
|
|
4823
4877
|
changes: f,
|
|
4824
4878
|
collector: [],
|
|
4825
|
-
stat:
|
|
4879
|
+
stat: Ln(r, a)
|
|
4826
4880
|
};
|
|
4827
|
-
for (let _ = 0; _ <
|
|
4881
|
+
for (let _ = 0; _ < r.length; _++) {
|
|
4828
4882
|
if (c) {
|
|
4829
4883
|
c = !1;
|
|
4830
4884
|
continue;
|
|
4831
4885
|
}
|
|
4832
|
-
const [
|
|
4886
|
+
const [m, v] = [r[_], r[_ + 1]], [E, y] = [se(m), se(v)], T = m.value.replace(/\n$/, "").split(`
|
|
4833
4887
|
`);
|
|
4834
|
-
if (
|
|
4835
|
-
for (const
|
|
4836
|
-
E === S.EQUAL && (
|
|
4837
|
-
const R = Z(s, N);
|
|
4838
|
-
f.push({
|
|
4888
|
+
if (v === void 0) {
|
|
4889
|
+
for (const D of T)
|
|
4890
|
+
E === S.EQUAL && (l++, o++), E === S.DELETE && l++, E === S.ADD && o++, f.push({
|
|
4839
4891
|
type: E,
|
|
4840
|
-
code:
|
|
4841
|
-
addNum: E === S.DELETE ? void 0 :
|
|
4842
|
-
delNum: E === S.ADD ? void 0 :
|
|
4892
|
+
code: D,
|
|
4893
|
+
addNum: E === S.DELETE ? void 0 : o,
|
|
4894
|
+
delNum: E === S.ADD ? void 0 : l
|
|
4843
4895
|
});
|
|
4844
|
-
}
|
|
4845
4896
|
break;
|
|
4846
4897
|
}
|
|
4847
4898
|
if (E === S.EQUAL)
|
|
4848
|
-
for (const
|
|
4849
|
-
o++, l
|
|
4850
|
-
|
|
4851
|
-
f.push({ type: S.EQUAL, code: R, delNum: o, addNum: l });
|
|
4852
|
-
}
|
|
4853
|
-
const T = m.value.replace(/\n$/, "").split(`
|
|
4899
|
+
for (const D of T)
|
|
4900
|
+
l++, o++, f.push({ type: S.EQUAL, code: D, delNum: l, addNum: o });
|
|
4901
|
+
const M = v.value.replace(/\n$/, "").split(`
|
|
4854
4902
|
`);
|
|
4855
4903
|
if (E === S.DELETE)
|
|
4856
|
-
if (y === S.ADD && (
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
delNum: o
|
|
4904
|
+
if (y === S.ADD && (T.length === M.length || g)) {
|
|
4905
|
+
const D = Math.max(T.length, M.length), k = Array.from({ length: D }, (N, L) => Sn(T[L], M[L], u, g));
|
|
4906
|
+
for (let N = 0; N < T.length; N++) {
|
|
4907
|
+
const L = T[N];
|
|
4908
|
+
l++, f.push({
|
|
4909
|
+
type: a != null && a.test(L) ? S.EQUAL : S.DELETE,
|
|
4910
|
+
code: k[N][0],
|
|
4911
|
+
delNum: l
|
|
4865
4912
|
});
|
|
4866
4913
|
}
|
|
4867
|
-
for (let N = 0; N <
|
|
4868
|
-
const
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
code: L,
|
|
4874
|
-
addNum: l
|
|
4914
|
+
for (let N = 0; N < M.length; N++) {
|
|
4915
|
+
const L = M[N];
|
|
4916
|
+
o++, f.push({
|
|
4917
|
+
type: a != null && a.test(L) ? S.EQUAL : S.ADD,
|
|
4918
|
+
code: k[N][1],
|
|
4919
|
+
addNum: o
|
|
4875
4920
|
});
|
|
4876
4921
|
}
|
|
4877
4922
|
c = !0;
|
|
4878
4923
|
} else
|
|
4879
|
-
for (const
|
|
4880
|
-
|
|
4881
|
-
const R = Z(s, N);
|
|
4882
|
-
f.push({ type: S.DELETE, code: R, delNum: o });
|
|
4883
|
-
}
|
|
4924
|
+
for (const D of T)
|
|
4925
|
+
l++, f.push({ type: S.DELETE, code: D, delNum: l });
|
|
4884
4926
|
if (E === S.ADD)
|
|
4885
|
-
for (const
|
|
4886
|
-
|
|
4887
|
-
const R = Z(s, N);
|
|
4888
|
-
f.push({ type: S.ADD, code: R, addNum: l });
|
|
4889
|
-
}
|
|
4927
|
+
for (const D of T)
|
|
4928
|
+
o++, f.push({ type: S.ADD, code: D, addNum: o });
|
|
4890
4929
|
}
|
|
4891
4930
|
for (let _ = 0; _ < f.length; _++) {
|
|
4892
|
-
const
|
|
4893
|
-
if (
|
|
4894
|
-
const [
|
|
4895
|
-
for (let y =
|
|
4931
|
+
const m = f[_];
|
|
4932
|
+
if (m.type === S.DELETE || m.type === S.ADD) {
|
|
4933
|
+
const [v, E] = [Math.max(_ - t, 0), Math.min(_ + t + 1, f.length)];
|
|
4934
|
+
for (let y = v; y < E; y++)
|
|
4896
4935
|
f[y].fold = !1;
|
|
4897
4936
|
}
|
|
4898
|
-
|
|
4937
|
+
m.fold === void 0 && (m.fold = !0);
|
|
4899
4938
|
}
|
|
4900
4939
|
if (n === e) {
|
|
4901
4940
|
for (let _ = 0; _ < f.length; _++)
|
|
4902
4941
|
f[_].fold = !1;
|
|
4903
|
-
return d;
|
|
4942
|
+
return f.slice(0, Z).forEach((_) => $e(_, s)), d;
|
|
4904
4943
|
}
|
|
4905
|
-
const
|
|
4944
|
+
const h = [];
|
|
4906
4945
|
let p = [];
|
|
4907
4946
|
for (let _ = 0; _ < f.length; _++) {
|
|
4908
|
-
const
|
|
4909
|
-
if (
|
|
4947
|
+
const m = f[_];
|
|
4948
|
+
if (m.fold === !1) {
|
|
4910
4949
|
p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
|
|
4911
4950
|
lines: p,
|
|
4912
4951
|
fold: !0
|
|
4913
|
-
}), p = []),
|
|
4952
|
+
}), p = []), h.push(m);
|
|
4914
4953
|
continue;
|
|
4915
4954
|
}
|
|
4916
|
-
|
|
4955
|
+
m.type === "equal" && (m.hide = !0, p.push(m)), h.push(m);
|
|
4917
4956
|
}
|
|
4918
4957
|
return p.length && (p[0].hideIndex = d.collector.length, d.collector.push({
|
|
4919
4958
|
lines: p,
|
|
4920
4959
|
fold: !0
|
|
4921
|
-
}), p = []), d.changes =
|
|
4960
|
+
}), p = []), d.changes = h, d.changes.filter((_) => !_.hide).slice(0, Z).forEach((_) => $e(_, s)), d;
|
|
4922
4961
|
}
|
|
4923
|
-
const
|
|
4962
|
+
const ai = /* @__PURE__ */ de({
|
|
4924
4963
|
__name: "UnifiedLine",
|
|
4925
4964
|
props: {
|
|
4926
4965
|
line: null
|
|
@@ -4933,16 +4972,16 @@ const er = /* @__PURE__ */ he({
|
|
|
4933
4972
|
return { __sfc: !0, emit: e, getCodeMarker: s, DiffType: S };
|
|
4934
4973
|
}
|
|
4935
4974
|
});
|
|
4936
|
-
function
|
|
4975
|
+
function ae(n, e, s, u, g, t, i, r) {
|
|
4937
4976
|
var a = typeof n == "function" ? n.options : n;
|
|
4938
4977
|
return e && (a.render = e, a.staticRenderFns = s, a._compiled = !0), t && (a._scopeId = "data-v-" + t), {
|
|
4939
4978
|
exports: n,
|
|
4940
4979
|
options: a
|
|
4941
4980
|
};
|
|
4942
4981
|
}
|
|
4943
|
-
var
|
|
4982
|
+
var oi = function() {
|
|
4944
4983
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4945
|
-
return e.line.hideIndex !== void 0 && e.line.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk text-center", attrs: { colspan: "2" }, on: { click: function(
|
|
4984
|
+
return e.line.hideIndex !== void 0 && e.line.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk text-center", attrs: { colspan: "2" }, on: { click: function(g) {
|
|
4946
4985
|
return u.emit("expand", e.line);
|
|
4947
4986
|
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-hunk", attrs: { align: "left" } }, [e._v(" ⋯ ")])]) : e.line.hide ? e._e() : s("tr", { attrs: { "data-diff-change": e.line.type !== u.DiffType.EQUAL ? "" : void 0 } }, [s("td", { staticClass: "blob-num", class: {
|
|
4948
4987
|
"blob-num-deletion": e.line.type === u.DiffType.DELETE,
|
|
@@ -4960,153 +4999,171 @@ var nr = function() {
|
|
|
4960
4999
|
"blob-code-context": e.line.type === u.DiffType.EQUAL,
|
|
4961
5000
|
"blob-code-hunk": e.line.hide !== void 0
|
|
4962
5001
|
} }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(e.line.type) }, domProps: { innerHTML: e._s(e.line.code) } })])]);
|
|
4963
|
-
},
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
5002
|
+
}, li = [], ci = /* @__PURE__ */ ae(
|
|
5003
|
+
ai,
|
|
5004
|
+
oi,
|
|
5005
|
+
li,
|
|
4967
5006
|
!1,
|
|
4968
5007
|
null,
|
|
4969
5008
|
null
|
|
4970
5009
|
);
|
|
4971
|
-
const
|
|
5010
|
+
const ui = ci.exports, fi = /* @__PURE__ */ de({
|
|
4972
5011
|
__name: "UnifiedViewer",
|
|
4973
5012
|
props: {
|
|
4974
|
-
diffChange: null
|
|
5013
|
+
diffChange: null,
|
|
5014
|
+
language: null
|
|
4975
5015
|
},
|
|
4976
5016
|
setup(n) {
|
|
4977
|
-
const e = n;
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
5017
|
+
const e = n, s = Me(Z), u = Pe(e.diffChange.changes.filter((o) => !o.hide || o.hideIndex !== void 0)), g = X(() => u.value.slice(0, s.value)), t = X(() => u.value.length - g.value.length), i = X(() => Math.min(t.value, Z));
|
|
5018
|
+
Ue(() => e.diffChange, (o) => {
|
|
5019
|
+
s.value = Z, u.value = o.changes.filter((c) => !c.hide || c.hideIndex !== void 0);
|
|
5020
|
+
});
|
|
5021
|
+
function r() {
|
|
5022
|
+
g.value.forEach((o) => $e(o, e.language));
|
|
5023
|
+
}
|
|
5024
|
+
function a({ hideIndex: o }) {
|
|
5025
|
+
o !== void 0 && (e.diffChange.collector[o].lines.forEach((c) => {
|
|
5026
|
+
c.hide = !1, c.fold = !1;
|
|
5027
|
+
}), u.value = e.diffChange.changes.filter((c) => !c.hide || c.hideIndex !== void 0), r());
|
|
5028
|
+
}
|
|
5029
|
+
function l() {
|
|
5030
|
+
s.value += Z, r();
|
|
4982
5031
|
}
|
|
4983
|
-
return { __sfc: !0, props: e,
|
|
5032
|
+
return { __sfc: !0, props: e, renderLimit: s, visibleChanges: u, renderedChanges: g, remainingLines: t, nextBatchSize: i, highlightRenderedChanges: r, expandHandler: a, loadMore: l, UnifiedLine: ui };
|
|
4984
5033
|
}
|
|
4985
5034
|
});
|
|
4986
|
-
var
|
|
4987
|
-
var h;
|
|
5035
|
+
var gi = function() {
|
|
4988
5036
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4989
|
-
return s("table", { staticClass: "diff-table" }, [s("tbody", e._l(
|
|
4990
|
-
return s(u.UnifiedLine, { key:
|
|
4991
|
-
}),
|
|
4992
|
-
},
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
5037
|
+
return s("table", { staticClass: "diff-table" }, [s("tbody", [e._l(u.renderedChanges, function(g, t) {
|
|
5038
|
+
return s(u.UnifiedLine, { key: t, attrs: { line: g }, on: { expand: u.expandHandler } });
|
|
5039
|
+
}), u.remainingLines ? s("tr", [s("td", { staticClass: "blob-code blob-code-hunk load-more", attrs: { colspan: "3" } }, [s("button", { staticClass: "load-more-button", attrs: { type: "button" }, on: { click: u.loadMore } }, [e._v(" Show next " + e._s(u.nextBatchSize) + " lines (" + e._s(u.remainingLines) + " remaining) ")])])]) : e._e()], 2)]);
|
|
5040
|
+
}, hi = [], di = /* @__PURE__ */ ae(
|
|
5041
|
+
fi,
|
|
5042
|
+
gi,
|
|
5043
|
+
hi,
|
|
4996
5044
|
!1,
|
|
4997
5045
|
null,
|
|
4998
|
-
"
|
|
5046
|
+
"93116a1c"
|
|
4999
5047
|
);
|
|
5000
|
-
const
|
|
5048
|
+
const pi = di.exports, _i = /* @__PURE__ */ de({
|
|
5001
5049
|
__name: "SplitLine",
|
|
5002
5050
|
props: {
|
|
5003
5051
|
splitLine: null
|
|
5004
5052
|
},
|
|
5005
5053
|
emits: ["expand"],
|
|
5006
5054
|
setup(n, { emit: e }) {
|
|
5007
|
-
function s(
|
|
5008
|
-
return
|
|
5055
|
+
function s(g) {
|
|
5056
|
+
return g === S.DELETE ? "-" : g === S.ADD ? "+" : "";
|
|
5009
5057
|
}
|
|
5010
|
-
function u(
|
|
5011
|
-
const
|
|
5012
|
-
for (const
|
|
5013
|
-
|
|
5014
|
-
for (const
|
|
5015
|
-
|
|
5058
|
+
function u(g, t) {
|
|
5059
|
+
const i = g.currentTarget.closest(".file-diff-split"), r = i.querySelectorAll(".split-side-left"), a = i.querySelectorAll(".split-side-right");
|
|
5060
|
+
for (const l of a)
|
|
5061
|
+
l.classList.toggle("no-select", t === "left");
|
|
5062
|
+
for (const l of r)
|
|
5063
|
+
l.classList.toggle("no-select", t === "right");
|
|
5016
5064
|
}
|
|
5017
5065
|
return { __sfc: !0, emit: e, getCodeMarker: s, onSplitLineMousedown: u, DiffType: S };
|
|
5018
5066
|
}
|
|
5019
5067
|
});
|
|
5020
|
-
var
|
|
5068
|
+
var bi = function() {
|
|
5021
5069
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5022
|
-
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk", attrs: { colspan: "1" }, on: { click: function(
|
|
5070
|
+
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ? s("tr", [s("td", { staticClass: "blob-num blob-num-hunk", attrs: { colspan: "1" }, on: { click: function(g) {
|
|
5023
5071
|
return u.emit("expand", e.splitLine);
|
|
5024
|
-
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-inner blob-code-hunk", attrs: { colspan: "3", align: "left" } }, [e._v(" ⋯ ")])]) : e.splitLine.hide ? e._e() : s("tr", { attrs: { "data-diff-change": e.splitLine.left.type === u.DiffType.DELETE || e.splitLine.right.type === u.DiffType.ADD ? "" : void 0 } }, [e._l([e.splitLine.left, e.splitLine.right], function(
|
|
5025
|
-
return [
|
|
5026
|
-
"blob-num-deletion":
|
|
5027
|
-
"blob-num-addition":
|
|
5028
|
-
"blob-num-context":
|
|
5072
|
+
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-inner blob-code-hunk", attrs: { colspan: "3", align: "left" } }, [e._v(" ⋯ ")])]) : e.splitLine.hide ? e._e() : s("tr", { attrs: { "data-diff-change": e.splitLine.left.type === u.DiffType.DELETE || e.splitLine.right.type === u.DiffType.ADD ? "" : void 0 } }, [e._l([e.splitLine.left, e.splitLine.right], function(g, t) {
|
|
5073
|
+
return [g.type === u.DiffType.EMPTY ? [s("td", { staticClass: "blob-num blob-num-empty empty-cell" }), s("td", { staticClass: "blob-code blob-code-empty empty-cell" })] : [s("td", { staticClass: "blob-num", class: {
|
|
5074
|
+
"blob-num-deletion": g.type === u.DiffType.DELETE,
|
|
5075
|
+
"blob-num-addition": g.type === u.DiffType.ADD,
|
|
5076
|
+
"blob-num-context": g.type === u.DiffType.EQUAL,
|
|
5029
5077
|
"blob-num-hunk": e.splitLine.hide !== void 0
|
|
5030
|
-
} }, [e._v(" " + e._s(
|
|
5031
|
-
"blob-code-deletion":
|
|
5032
|
-
"blob-code-addition":
|
|
5033
|
-
"blob-code-context":
|
|
5078
|
+
} }, [e._v(" " + e._s(g.num) + " ")]), s("td", { staticClass: "blob-code", class: {
|
|
5079
|
+
"blob-code-deletion": g.type === u.DiffType.DELETE,
|
|
5080
|
+
"blob-code-addition": g.type === u.DiffType.ADD,
|
|
5081
|
+
"blob-code-context": g.type === u.DiffType.EQUAL,
|
|
5034
5082
|
"blob-code-hunk": e.splitLine.hide !== void 0,
|
|
5035
5083
|
"split-side-left": t === 0,
|
|
5036
5084
|
"split-side-right": t === 1
|
|
5037
|
-
}, on: { mousedown: function(
|
|
5038
|
-
return u.onSplitLineMousedown(
|
|
5039
|
-
} } }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(
|
|
5085
|
+
}, on: { mousedown: function(i) {
|
|
5086
|
+
return u.onSplitLineMousedown(i, t === 0 ? "left" : "right");
|
|
5087
|
+
} } }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(g.type) }, domProps: { innerHTML: e._s(g.code) } })])]];
|
|
5040
5088
|
})], 2);
|
|
5041
|
-
},
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5089
|
+
}, vi = [], mi = /* @__PURE__ */ ae(
|
|
5090
|
+
_i,
|
|
5091
|
+
bi,
|
|
5092
|
+
vi,
|
|
5045
5093
|
!1,
|
|
5046
5094
|
null,
|
|
5047
5095
|
null
|
|
5048
5096
|
);
|
|
5049
|
-
const
|
|
5097
|
+
const Ei = mi.exports, yi = /* @__PURE__ */ de({
|
|
5050
5098
|
__name: "SplitViewer",
|
|
5051
5099
|
props: {
|
|
5052
|
-
diffChange: null
|
|
5100
|
+
diffChange: null,
|
|
5101
|
+
language: null
|
|
5053
5102
|
},
|
|
5054
5103
|
setup(n) {
|
|
5055
|
-
const e = n;
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5104
|
+
const e = n, s = Me(Z), u = Pe(e.diffChange.changes.filter((o) => !o.hide || o.hideIndex !== void 0)), g = X(() => u.value.slice(0, s.value)), t = X(() => u.value.length - g.value.length), i = X(() => Math.min(t.value, Z));
|
|
5105
|
+
Ue(() => e.diffChange, (o) => {
|
|
5106
|
+
s.value = Z, u.value = o.changes.filter((c) => !c.hide || c.hideIndex !== void 0);
|
|
5107
|
+
});
|
|
5108
|
+
function r() {
|
|
5109
|
+
g.value.forEach((o) => xe(o, e.language));
|
|
5110
|
+
}
|
|
5111
|
+
function a({ hideIndex: o }) {
|
|
5112
|
+
o !== void 0 && (e.diffChange.collector[o].lines.forEach((c) => {
|
|
5113
|
+
c.hide = !1, c.fold = !1;
|
|
5114
|
+
}), u.value = e.diffChange.changes.filter((c) => !c.hide || c.hideIndex !== void 0), r());
|
|
5115
|
+
}
|
|
5116
|
+
function l() {
|
|
5117
|
+
s.value += Z, r();
|
|
5060
5118
|
}
|
|
5061
|
-
return { __sfc: !0, props: e,
|
|
5119
|
+
return { __sfc: !0, props: e, renderLimit: s, visibleChanges: u, renderedChanges: g, remainingLines: t, nextBatchSize: i, highlightRenderedChanges: r, expandHandler: a, loadMore: l, SplitLine: Ei };
|
|
5062
5120
|
}
|
|
5063
5121
|
});
|
|
5064
|
-
var
|
|
5065
|
-
var h;
|
|
5122
|
+
var wi = function() {
|
|
5066
5123
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5067
|
-
return s("table", { staticClass: "file-diff-split diff-table" }, [e._m(0), s("tbody", e._l(
|
|
5068
|
-
return s(u.SplitLine, { key:
|
|
5069
|
-
}),
|
|
5070
|
-
},
|
|
5124
|
+
return s("table", { staticClass: "file-diff-split diff-table" }, [e._m(0), s("tbody", [e._l(u.renderedChanges, function(g, t) {
|
|
5125
|
+
return s(u.SplitLine, { key: t, attrs: { "split-line": g }, on: { expand: u.expandHandler } });
|
|
5126
|
+
}), u.remainingLines ? s("tr", [s("td", { staticClass: "blob-code blob-code-hunk load-more", attrs: { colspan: "4" } }, [s("button", { staticClass: "load-more-button", attrs: { type: "button" }, on: { click: u.loadMore } }, [e._v(" Show next " + e._s(u.nextBatchSize) + " lines (" + e._s(u.remainingLines) + " remaining) ")])])]) : e._e()], 2)]);
|
|
5127
|
+
}, Ai = [function() {
|
|
5071
5128
|
var n = this, e = n._self._c;
|
|
5072
5129
|
return n._self._setupProxy, e("colgroup", [e("col", { attrs: { width: "44" } }), e("col"), e("col", { attrs: { width: "44" } }), e("col")]);
|
|
5073
|
-
}],
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5130
|
+
}], Ni = /* @__PURE__ */ ae(
|
|
5131
|
+
yi,
|
|
5132
|
+
wi,
|
|
5133
|
+
Ai,
|
|
5077
5134
|
!1,
|
|
5078
5135
|
null,
|
|
5079
|
-
"
|
|
5136
|
+
"3854ede4"
|
|
5080
5137
|
);
|
|
5081
|
-
const
|
|
5138
|
+
const Mi = Ni.exports, Ti = {
|
|
5082
5139
|
name: "DownArrowIcon"
|
|
5083
5140
|
};
|
|
5084
|
-
var
|
|
5141
|
+
var Di = function() {
|
|
5085
5142
|
var e = this, s = e._self._c;
|
|
5086
5143
|
return s("svg", { attrs: { width: "1rem", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg" } }, [s("path", { attrs: { 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" } })]);
|
|
5087
|
-
},
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5144
|
+
}, Si = [], Ci = /* @__PURE__ */ ae(
|
|
5145
|
+
Ti,
|
|
5146
|
+
Di,
|
|
5147
|
+
Si,
|
|
5091
5148
|
!1,
|
|
5092
5149
|
null,
|
|
5093
5150
|
null
|
|
5094
5151
|
);
|
|
5095
|
-
const
|
|
5152
|
+
const Li = Ci.exports, Ri = {
|
|
5096
5153
|
name: "UpArrowIcon"
|
|
5097
5154
|
};
|
|
5098
|
-
var
|
|
5155
|
+
var Oi = function() {
|
|
5099
5156
|
var e = this, s = e._self._c;
|
|
5100
5157
|
return s("svg", { attrs: { width: "1rem", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg" } }, [s("path", { attrs: { 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" } })]);
|
|
5101
|
-
},
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5158
|
+
}, Ii = [], ki = /* @__PURE__ */ ae(
|
|
5159
|
+
Ri,
|
|
5160
|
+
Oi,
|
|
5161
|
+
Ii,
|
|
5105
5162
|
!1,
|
|
5106
5163
|
null,
|
|
5107
5164
|
null
|
|
5108
5165
|
);
|
|
5109
|
-
const
|
|
5166
|
+
const Bi = ki.exports, $i = /* @__PURE__ */ de({
|
|
5110
5167
|
__name: "CodeDiff",
|
|
5111
5168
|
props: {
|
|
5112
5169
|
newString: null,
|
|
@@ -5128,88 +5185,88 @@ const Cr = Sr.exports, Rr = /* @__PURE__ */ he({
|
|
|
5128
5185
|
},
|
|
5129
5186
|
emits: ["diff"],
|
|
5130
5187
|
setup(n, { emit: e }) {
|
|
5131
|
-
const s = n, u =
|
|
5132
|
-
let
|
|
5133
|
-
return
|
|
5134
|
-
`) :
|
|
5135
|
-
}), t =
|
|
5136
|
-
let
|
|
5137
|
-
return
|
|
5138
|
-
`) :
|
|
5139
|
-
}),
|
|
5140
|
-
() => u.value ?
|
|
5141
|
-
),
|
|
5188
|
+
const s = n, u = X(() => s.outputFormat === "line-by-line"), g = X(() => {
|
|
5189
|
+
let h = s.oldString || "";
|
|
5190
|
+
return h = s.trim ? h.trim() : h, h = s.noDiffLineFeed ? h.replace(/(\r\n)/g, `
|
|
5191
|
+
`) : h, h;
|
|
5192
|
+
}), t = X(() => {
|
|
5193
|
+
let h = s.newString || "";
|
|
5194
|
+
return h = s.trim ? h.trim() : h, h = s.noDiffLineFeed ? h.replace(/(\r\n)/g, `
|
|
5195
|
+
`) : h, h;
|
|
5196
|
+
}), i = X(
|
|
5197
|
+
() => u.value ? si(g.value, t.value, s.language, s.diffStyle, s.forceInlineComparison, s.context, s.ignoreMatchingLines) : ri(g.value, t.value, s.language, s.diffStyle, s.forceInlineComparison, s.context, s.ignoreMatchingLines)
|
|
5198
|
+
), r = Pe(i.value), a = X(() => r.value.stat.additionsNum === 0 && r.value.stat.deletionsNum === 0), l = Me(-1), o = Me();
|
|
5142
5199
|
function c() {
|
|
5143
|
-
const
|
|
5144
|
-
|
|
5200
|
+
const h = o.value.querySelectorAll("[data-diff-change]");
|
|
5201
|
+
l.value < h.length - 1 && (l.value++, d(h));
|
|
5145
5202
|
}
|
|
5146
5203
|
function f() {
|
|
5147
|
-
const
|
|
5148
|
-
|
|
5204
|
+
const h = o.value.querySelectorAll("[data-diff-change]");
|
|
5205
|
+
l.value > 0 && (l.value--, d(h));
|
|
5149
5206
|
}
|
|
5150
|
-
function d(
|
|
5151
|
-
|
|
5152
|
-
const p =
|
|
5207
|
+
function d(h) {
|
|
5208
|
+
o.value.querySelectorAll(".current-diff").forEach((_) => _.classList.remove("current-diff"));
|
|
5209
|
+
const p = h[l.value];
|
|
5153
5210
|
p && (p.querySelectorAll(".blob-code").forEach((_) => _.classList.add("current-diff")), p.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
5154
5211
|
}
|
|
5155
|
-
return
|
|
5156
|
-
|
|
5212
|
+
return Ue(() => s, () => {
|
|
5213
|
+
l.value = -1, r.value = i.value, e("diff", {
|
|
5157
5214
|
stat: {
|
|
5158
5215
|
isChanged: !a.value,
|
|
5159
|
-
addNum:
|
|
5160
|
-
delNum:
|
|
5216
|
+
addNum: r.value.stat.additionsNum,
|
|
5217
|
+
delNum: r.value.stat.deletionsNum
|
|
5161
5218
|
}
|
|
5162
5219
|
});
|
|
5163
|
-
}, { deep: !0, immediate: !0 }), { __sfc: !0, props: s, emits: e, isUnifiedViewer: u, oldString:
|
|
5220
|
+
}, { deep: !0, immediate: !0 }), { __sfc: !0, props: s, emits: e, isUnifiedViewer: u, oldString: g, newString: t, raw: i, diffChange: r, isNotChanged: a, currentDiffIndex: l, root: o, goToNextDiff: c, goToPrevDiff: f, updateCurrentDiffHighlight: d, UnifiedViewer: pi, SplitViewer: Mi, DownArrowIcon: Li, UpArrowIcon: Bi };
|
|
5164
5221
|
}
|
|
5165
5222
|
});
|
|
5166
|
-
var
|
|
5223
|
+
var xi = function() {
|
|
5167
5224
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5168
5225
|
return s("div", { ref: "root", staticClass: "code-diff-view", style: { maxHeight: e.maxHeight }, attrs: { theme: e.theme } }, [e.hideHeader ? e._e() : s("div", { staticClass: "file-header" }, [u.isUnifiedViewer ? s("div", { staticClass: "file-info" }, [s("span", [s("div", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("div", { staticClass: "info-left" }, [e._v(e._s(e.newFilename))])]), s("span", { staticClass: "diff-commandbar" }, [s("button", { staticClass: "command-item-button", attrs: { title: "Next Change" }, on: { click: u.goToNextDiff } }, [s(u.DownArrowIcon)], 1), s("button", { staticClass: "command-item-button", attrs: { title: "Previous Change" }, on: { click: u.goToPrevDiff } }, [s(u.UpArrowIcon)], 1)]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5169
5226
|
return [s("span", { staticClass: "diff-stat-added" }, [e._v("+" + e._s(u.diffChange.stat.additionsNum) + " additions")]), s("span", { staticClass: "diff-stat-deleted" }, [e._v("-" + e._s(u.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5170
5227
|
}, { stat: u.diffChange.stat })], 2)]) : s("div", { staticClass: "file-info" }, [s("span", { staticClass: "info-left" }, [e._v(e._s(e.filename))]), s("span", { staticClass: "info-right" }, [s("span", { staticStyle: { "margin-left": "20px" } }, [e._v(e._s(e.newFilename))]), s("span", { staticClass: "diff-commandbar" }, [s("button", { staticClass: "command-item-button", attrs: { title: "Next Change" }, on: { click: u.goToNextDiff } }, [s(u.DownArrowIcon)], 1), s("button", { staticClass: "command-item-button", attrs: { title: "Previous Change" }, on: { click: u.goToPrevDiff } }, [s(u.UpArrowIcon)], 1)]), e.hideStat ? e._e() : s("span", { staticClass: "diff-stat" }, [e._t("stat", function() {
|
|
5171
5228
|
return [s("span", { staticClass: "diff-stat-added" }, [e._v("+" + e._s(u.diffChange.stat.additionsNum) + " additions")]), s("span", { staticClass: "diff-stat-deleted" }, [e._v("-" + e._s(u.diffChange.stat.deletionsNum) + " deletions")])];
|
|
5172
|
-
}, { stat: u.diffChange.stat })], 2)])])]), u.isUnifiedViewer ? s(u.UnifiedViewer, { attrs: { "diff-change": u.diffChange } }) : s(u.SplitViewer, { attrs: { "diff-change": u.diffChange } })], 1);
|
|
5173
|
-
},
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5229
|
+
}, { stat: u.diffChange.stat })], 2)])])]), u.isUnifiedViewer ? s(u.UnifiedViewer, { attrs: { "diff-change": u.diffChange, language: e.language } }) : s(u.SplitViewer, { attrs: { "diff-change": u.diffChange, language: e.language } })], 1);
|
|
5230
|
+
}, Pi = [], Ui = /* @__PURE__ */ ae(
|
|
5231
|
+
$i,
|
|
5232
|
+
xi,
|
|
5233
|
+
Pi,
|
|
5177
5234
|
!1,
|
|
5178
5235
|
null,
|
|
5179
5236
|
null
|
|
5180
5237
|
);
|
|
5181
|
-
const
|
|
5238
|
+
const Rn = Ui.exports, Fi = /* @__PURE__ */ de({
|
|
5182
5239
|
__name: "CodeReader",
|
|
5183
5240
|
props: {
|
|
5184
5241
|
language: { default: "plaintext" },
|
|
5185
5242
|
text: null
|
|
5186
5243
|
},
|
|
5187
5244
|
setup(n) {
|
|
5188
|
-
return { __sfc: !0, CodeDiff:
|
|
5245
|
+
return { __sfc: !0, CodeDiff: Rn };
|
|
5189
5246
|
}
|
|
5190
5247
|
});
|
|
5191
|
-
var
|
|
5248
|
+
var zi = function() {
|
|
5192
5249
|
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5193
5250
|
return s(u.CodeDiff, { attrs: { "hide-header": "", language: e.language, "old-string": e.text, "new-string": e.text } });
|
|
5194
|
-
},
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5251
|
+
}, Hi = [], Gi = /* @__PURE__ */ ae(
|
|
5252
|
+
Fi,
|
|
5253
|
+
zi,
|
|
5254
|
+
Hi,
|
|
5198
5255
|
!1,
|
|
5199
5256
|
null,
|
|
5200
5257
|
"0c5adc58"
|
|
5201
5258
|
);
|
|
5202
|
-
const
|
|
5203
|
-
function
|
|
5204
|
-
n.component("CodeDiff",
|
|
5259
|
+
const Ki = Gi.exports;
|
|
5260
|
+
function Wi(n) {
|
|
5261
|
+
n.component("CodeDiff", Rn), n.component("CodeReader", Ki);
|
|
5205
5262
|
}
|
|
5206
|
-
const
|
|
5207
|
-
install:
|
|
5263
|
+
const Zi = {
|
|
5264
|
+
install: Wi,
|
|
5208
5265
|
hljs: Y
|
|
5209
5266
|
};
|
|
5210
5267
|
export {
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5268
|
+
Rn as CodeDiff,
|
|
5269
|
+
Ki as CodeReader,
|
|
5270
|
+
Zi as default,
|
|
5214
5271
|
Y as hljs
|
|
5215
5272
|
};
|