v-code-diff 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v2/index.cjs.js +17 -17
- package/dist/v2/index.es.js +1077 -953
- package/dist/v2/index.umd.js +17 -17
- package/dist/v2.7/index.cjs.js +18 -18
- package/dist/v2.7/index.es.js +1163 -1118
- package/dist/v2.7/index.umd.js +18 -18
- package/dist/v3/index.cjs.js +16 -16
- package/dist/v3/index.es.js +975 -901
- package/dist/v3/index.umd.js +17 -17
- package/package.json +1 -1
- package/src/CodeDiff.vue +47 -0
- package/src/icons/DownArrowIcon.vue +11 -0
- package/src/icons/UpArrowIcon.vue +11 -0
- package/src/style.scss +27 -2
package/dist/v2.7/index.es.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
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:#ffffff}.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{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 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 .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)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import
|
|
3
|
-
|
|
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:#ffffff}.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)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import Ln, { defineComponent as be, computed as he, ref as We, watch as On } from "vue";
|
|
3
|
+
Ln.util.warn;
|
|
4
4
|
function ne() {
|
|
5
5
|
}
|
|
6
6
|
ne.prototype = {
|
|
7
|
-
diff: function(e,
|
|
8
|
-
var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
9
|
-
typeof u == "function" && (
|
|
7
|
+
diff: function(e, s) {
|
|
8
|
+
var u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, h = u.callback;
|
|
9
|
+
typeof u == "function" && (h = u, u = {}), this.options = u;
|
|
10
10
|
var t = this;
|
|
11
|
-
function r(
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}, 0), !0) :
|
|
11
|
+
function r(_) {
|
|
12
|
+
return h ? (setTimeout(function() {
|
|
13
|
+
h(void 0, _);
|
|
14
|
+
}, 0), !0) : _;
|
|
15
15
|
}
|
|
16
|
-
e = this.castInput(e),
|
|
17
|
-
var i =
|
|
16
|
+
e = this.castInput(e), s = this.castInput(s), e = this.removeEmpty(this.tokenize(e)), s = this.removeEmpty(this.tokenize(s));
|
|
17
|
+
var i = s.length, a = e.length, o = 1, l = i + a;
|
|
18
18
|
u.maxEditLength && (l = Math.min(l, u.maxEditLength));
|
|
19
19
|
var c = [{
|
|
20
20
|
newPos: -1,
|
|
21
21
|
components: []
|
|
22
|
-
}], f = this.extractCommon(c[0],
|
|
23
|
-
if (c[0].newPos + 1 >= i && f + 1 >=
|
|
22
|
+
}], f = this.extractCommon(c[0], s, e, 0);
|
|
23
|
+
if (c[0].newPos + 1 >= i && f + 1 >= a)
|
|
24
24
|
return r([{
|
|
25
|
-
value: this.join(
|
|
26
|
-
count:
|
|
25
|
+
value: this.join(s),
|
|
26
|
+
count: s.length
|
|
27
27
|
}]);
|
|
28
|
-
function
|
|
29
|
-
for (var
|
|
30
|
-
var
|
|
31
|
-
v && (c[
|
|
32
|
-
var
|
|
33
|
-
if (!
|
|
34
|
-
c[
|
|
28
|
+
function g() {
|
|
29
|
+
for (var _ = -1 * o; _ <= o; _ += 2) {
|
|
30
|
+
var p = void 0, v = c[_ - 1], m = c[_ + 1], E = (m ? m.newPos : 0) - _;
|
|
31
|
+
v && (c[_ - 1] = void 0);
|
|
32
|
+
var A = v && v.newPos + 1 < i, S = m && 0 <= E && E < a;
|
|
33
|
+
if (!A && !S) {
|
|
34
|
+
c[_] = void 0;
|
|
35
35
|
continue;
|
|
36
36
|
}
|
|
37
|
-
if (!
|
|
38
|
-
return r(In(t,
|
|
39
|
-
c[
|
|
37
|
+
if (!A || S && v.newPos < m.newPos ? (p = kn(m), t.pushComponent(p.components, void 0, !0)) : (p = v, p.newPos++, t.pushComponent(p.components, !0, void 0)), E = t.extractCommon(p, s, e, _), p.newPos + 1 >= i && E + 1 >= a)
|
|
38
|
+
return r(In(t, p.components, s, e, t.useLongestToken));
|
|
39
|
+
c[_] = p;
|
|
40
40
|
}
|
|
41
41
|
o++;
|
|
42
42
|
}
|
|
43
|
-
if (
|
|
44
|
-
(function
|
|
43
|
+
if (h)
|
|
44
|
+
(function _() {
|
|
45
45
|
setTimeout(function() {
|
|
46
46
|
if (o > l)
|
|
47
|
-
return
|
|
48
|
-
|
|
47
|
+
return h();
|
|
48
|
+
g() || _();
|
|
49
49
|
}, 0);
|
|
50
50
|
})();
|
|
51
51
|
else
|
|
52
52
|
for (; o <= l; ) {
|
|
53
|
-
var d =
|
|
53
|
+
var d = g();
|
|
54
54
|
if (d)
|
|
55
55
|
return d;
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
pushComponent: function(e,
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
count:
|
|
62
|
-
added:
|
|
58
|
+
pushComponent: function(e, s, u) {
|
|
59
|
+
var h = e[e.length - 1];
|
|
60
|
+
h && h.added === s && h.removed === u ? e[e.length - 1] = {
|
|
61
|
+
count: h.count + 1,
|
|
62
|
+
added: s,
|
|
63
63
|
removed: u
|
|
64
64
|
} : e.push({
|
|
65
65
|
count: 1,
|
|
66
|
-
added:
|
|
66
|
+
added: s,
|
|
67
67
|
removed: u
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
|
-
extractCommon: function(e,
|
|
71
|
-
for (var t =
|
|
72
|
-
i++,
|
|
70
|
+
extractCommon: function(e, s, u, h) {
|
|
71
|
+
for (var t = s.length, r = u.length, i = e.newPos, a = i - h, o = 0; i + 1 < t && a + 1 < r && this.equals(s[i + 1], u[a + 1]); )
|
|
72
|
+
i++, a++, o++;
|
|
73
73
|
return o && e.components.push({
|
|
74
74
|
count: o
|
|
75
|
-
}), e.newPos = i,
|
|
75
|
+
}), e.newPos = i, a;
|
|
76
76
|
},
|
|
77
|
-
equals: function(e,
|
|
78
|
-
return this.options.comparator ? this.options.comparator(e,
|
|
77
|
+
equals: function(e, s) {
|
|
78
|
+
return this.options.comparator ? this.options.comparator(e, s) : e === s || this.options.ignoreCase && e.toLowerCase() === s.toLowerCase();
|
|
79
79
|
},
|
|
80
80
|
removeEmpty: function(e) {
|
|
81
|
-
for (var
|
|
82
|
-
e[u] &&
|
|
83
|
-
return
|
|
81
|
+
for (var s = [], u = 0; u < e.length; u++)
|
|
82
|
+
e[u] && s.push(e[u]);
|
|
83
|
+
return s;
|
|
84
84
|
},
|
|
85
85
|
castInput: function(e) {
|
|
86
86
|
return e;
|
|
@@ -92,24 +92,24 @@ ne.prototype = {
|
|
|
92
92
|
return e.join("");
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
function In(n, e,
|
|
96
|
-
for (var t = 0, r = e.length, i = 0,
|
|
95
|
+
function In(n, e, s, u, h) {
|
|
96
|
+
for (var t = 0, r = e.length, i = 0, a = 0; t < r; t++) {
|
|
97
97
|
var o = e[t];
|
|
98
98
|
if (o.removed) {
|
|
99
|
-
if (o.value = n.join(u.slice(
|
|
99
|
+
if (o.value = n.join(u.slice(a, a + o.count)), a += o.count, t && e[t - 1].added) {
|
|
100
100
|
var c = e[t - 1];
|
|
101
101
|
e[t - 1] = e[t], e[t] = c;
|
|
102
102
|
}
|
|
103
103
|
} else {
|
|
104
|
-
if (!o.added &&
|
|
105
|
-
var l =
|
|
106
|
-
l = l.map(function(
|
|
107
|
-
var
|
|
108
|
-
return
|
|
104
|
+
if (!o.added && h) {
|
|
105
|
+
var l = s.slice(i, i + o.count);
|
|
106
|
+
l = l.map(function(g, d) {
|
|
107
|
+
var _ = u[a + d];
|
|
108
|
+
return _.length > g.length ? _ : g;
|
|
109
109
|
}), o.value = n.join(l);
|
|
110
110
|
} else
|
|
111
|
-
o.value = n.join(
|
|
112
|
-
i += o.count, o.added || (
|
|
111
|
+
o.value = n.join(s.slice(i, i + o.count));
|
|
112
|
+
i += o.count, o.added || (a += o.count);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
var f = e[r - 1];
|
|
@@ -122,38 +122,38 @@ function kn(n) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
var Bn = new ne();
|
|
125
|
-
function $n(n, e,
|
|
126
|
-
return Bn.diff(n, e,
|
|
125
|
+
function $n(n, e, s) {
|
|
126
|
+
return Bn.diff(n, e, s);
|
|
127
127
|
}
|
|
128
128
|
function Un(n, e) {
|
|
129
129
|
if (typeof n == "function")
|
|
130
130
|
e.callback = n;
|
|
131
131
|
else if (n)
|
|
132
|
-
for (var
|
|
133
|
-
n.hasOwnProperty(
|
|
132
|
+
for (var s in n)
|
|
133
|
+
n.hasOwnProperty(s) && (e[s] = n[s]);
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
|
-
var
|
|
136
|
+
var Qe = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/, Ve = /\S/, Be = new ne();
|
|
137
137
|
Be.equals = function(n, e) {
|
|
138
|
-
return this.options.ignoreCase && (n = n.toLowerCase(), e = e.toLowerCase()), n === e || this.options.ignoreWhitespace && !
|
|
138
|
+
return this.options.ignoreCase && (n = n.toLowerCase(), e = e.toLowerCase()), n === e || this.options.ignoreWhitespace && !Ve.test(n) && !Ve.test(e);
|
|
139
139
|
};
|
|
140
140
|
Be.tokenize = function(n) {
|
|
141
|
-
for (var e = n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),
|
|
142
|
-
!e[
|
|
141
|
+
for (var e = n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), s = 0; s < e.length - 1; s++)
|
|
142
|
+
!e[s + 1] && e[s + 2] && Qe.test(e[s]) && Qe.test(e[s + 2]) && (e[s] += e[s + 2], e.splice(s + 1, 2), s--);
|
|
143
143
|
return e;
|
|
144
144
|
};
|
|
145
|
-
function Pn(n, e,
|
|
146
|
-
return
|
|
145
|
+
function Pn(n, e, s) {
|
|
146
|
+
return s = Un(s, {
|
|
147
147
|
ignoreWhitespace: !0
|
|
148
|
-
}), Be.diff(n, e,
|
|
148
|
+
}), Be.diff(n, e, s);
|
|
149
149
|
}
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
var e = [],
|
|
153
|
-
|
|
154
|
-
for (var u = 0; u <
|
|
155
|
-
var
|
|
156
|
-
u % 2 && !this.options.newlineIsToken ? e[e.length - 1] +=
|
|
150
|
+
var rn = new ne();
|
|
151
|
+
rn.tokenize = function(n) {
|
|
152
|
+
var e = [], s = n.split(/(\n|\r\n)/);
|
|
153
|
+
s[s.length - 1] || s.pop();
|
|
154
|
+
for (var u = 0; u < s.length; u++) {
|
|
155
|
+
var h = s[u];
|
|
156
|
+
u % 2 && !this.options.newlineIsToken ? e[e.length - 1] += h : (this.options.ignoreWhitespace && (h = h.trim()), e.push(h));
|
|
157
157
|
}
|
|
158
158
|
return e;
|
|
159
159
|
};
|
|
@@ -161,50 +161,50 @@ var xn = new ne();
|
|
|
161
161
|
xn.tokenize = function(n) {
|
|
162
162
|
return n.split(/(\S.+?[.!?])(?=\s+|$)/);
|
|
163
163
|
};
|
|
164
|
-
var
|
|
165
|
-
|
|
164
|
+
var Fn = new ne();
|
|
165
|
+
Fn.tokenize = function(n) {
|
|
166
166
|
return n.split(/([{}:;,]|\s+)/);
|
|
167
167
|
};
|
|
168
|
-
function
|
|
168
|
+
function Ne(n) {
|
|
169
169
|
"@babel/helpers - typeof";
|
|
170
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
170
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ne = function(e) {
|
|
171
171
|
return typeof e;
|
|
172
|
-
} :
|
|
172
|
+
} : Ne = function(e) {
|
|
173
173
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
174
|
-
},
|
|
174
|
+
}, Ne(n);
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
var e = this.options,
|
|
181
|
-
return typeof r == "undefined" ?
|
|
176
|
+
var Hn = Object.prototype.toString, de = new ne();
|
|
177
|
+
de.useLongestToken = !0;
|
|
178
|
+
de.tokenize = rn.tokenize;
|
|
179
|
+
de.castInput = function(n) {
|
|
180
|
+
var e = this.options, s = e.undefinedReplacement, u = e.stringifyReplacer, h = u === void 0 ? function(t, r) {
|
|
181
|
+
return typeof r == "undefined" ? s : r;
|
|
182
182
|
} : u;
|
|
183
|
-
return typeof n == "string" ? n : JSON.stringify(Ie(n, null, null,
|
|
183
|
+
return typeof n == "string" ? n : JSON.stringify(Ie(n, null, null, h), h, " ");
|
|
184
184
|
};
|
|
185
|
-
|
|
186
|
-
return ne.prototype.equals.call(
|
|
185
|
+
de.equals = function(n, e) {
|
|
186
|
+
return ne.prototype.equals.call(de, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
|
|
187
187
|
};
|
|
188
|
-
function Ie(n, e,
|
|
189
|
-
e = e || [],
|
|
188
|
+
function Ie(n, e, s, u, h) {
|
|
189
|
+
e = e || [], s = s || [], u && (n = u(h, n));
|
|
190
190
|
var t;
|
|
191
191
|
for (t = 0; t < e.length; t += 1)
|
|
192
192
|
if (e[t] === n)
|
|
193
|
-
return
|
|
193
|
+
return s[t];
|
|
194
194
|
var r;
|
|
195
|
-
if (
|
|
196
|
-
for (e.push(n), r = new Array(n.length),
|
|
197
|
-
r[t] = Ie(n[t], e,
|
|
198
|
-
return e.pop(),
|
|
195
|
+
if (Hn.call(n) === "[object Array]") {
|
|
196
|
+
for (e.push(n), r = new Array(n.length), s.push(r), t = 0; t < n.length; t += 1)
|
|
197
|
+
r[t] = Ie(n[t], e, s, u, h);
|
|
198
|
+
return e.pop(), s.pop(), r;
|
|
199
199
|
}
|
|
200
|
-
if (n && n.toJSON && (n = n.toJSON()),
|
|
201
|
-
e.push(n), r = {},
|
|
202
|
-
var i = [],
|
|
203
|
-
for (
|
|
204
|
-
n.hasOwnProperty(
|
|
200
|
+
if (n && n.toJSON && (n = n.toJSON()), Ne(n) === "object" && n !== null) {
|
|
201
|
+
e.push(n), r = {}, s.push(r);
|
|
202
|
+
var i = [], a;
|
|
203
|
+
for (a in n)
|
|
204
|
+
n.hasOwnProperty(a) && i.push(a);
|
|
205
205
|
for (i.sort(), t = 0; t < i.length; t += 1)
|
|
206
|
-
|
|
207
|
-
e.pop(),
|
|
206
|
+
a = i[t], r[a] = Ie(n[a], e, s, u, a);
|
|
207
|
+
e.pop(), s.pop();
|
|
208
208
|
} else
|
|
209
209
|
r = n;
|
|
210
210
|
return r;
|
|
@@ -219,144 +219,144 @@ ke.join = ke.removeEmpty = function(n) {
|
|
|
219
219
|
function zn(n) {
|
|
220
220
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var sn = { exports: {} };
|
|
223
223
|
(function(n) {
|
|
224
224
|
var e = function() {
|
|
225
225
|
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;
|
|
226
|
-
},
|
|
226
|
+
}, s = -1, u = 1, h = 0;
|
|
227
227
|
e.Diff = function(t, r) {
|
|
228
228
|
return [t, r];
|
|
229
|
-
}, e.prototype.diff_main = function(t, r, i,
|
|
230
|
-
typeof
|
|
231
|
-
var o =
|
|
229
|
+
}, e.prototype.diff_main = function(t, r, i, a) {
|
|
230
|
+
typeof a == "undefined" && (this.Diff_Timeout <= 0 ? a = Number.MAX_VALUE : a = (/* @__PURE__ */ new Date()).getTime() + this.Diff_Timeout * 1e3);
|
|
231
|
+
var o = a;
|
|
232
232
|
if (t == null || r == null)
|
|
233
233
|
throw new Error("Null input. (diff_main)");
|
|
234
234
|
if (t == r)
|
|
235
|
-
return t ? [new e.Diff(
|
|
235
|
+
return t ? [new e.Diff(h, t)] : [];
|
|
236
236
|
typeof i == "undefined" && (i = !0);
|
|
237
237
|
var l = i, c = this.diff_commonPrefix(t, r), f = t.substring(0, c);
|
|
238
238
|
t = t.substring(c), r = r.substring(c), c = this.diff_commonSuffix(t, r);
|
|
239
|
-
var
|
|
239
|
+
var g = t.substring(t.length - c);
|
|
240
240
|
t = t.substring(0, t.length - c), r = r.substring(0, r.length - c);
|
|
241
241
|
var d = this.diff_compute_(t, r, l, o);
|
|
242
|
-
return f && d.unshift(new e.Diff(
|
|
243
|
-
}, e.prototype.diff_compute_ = function(t, r, i,
|
|
242
|
+
return f && d.unshift(new e.Diff(h, f)), g && d.push(new e.Diff(h, g)), this.diff_cleanupMerge(d), d;
|
|
243
|
+
}, e.prototype.diff_compute_ = function(t, r, i, a) {
|
|
244
244
|
var o;
|
|
245
245
|
if (!t)
|
|
246
246
|
return [new e.Diff(u, r)];
|
|
247
247
|
if (!r)
|
|
248
|
-
return [new e.Diff(
|
|
248
|
+
return [new e.Diff(s, t)];
|
|
249
249
|
var l = t.length > r.length ? t : r, c = t.length > r.length ? r : t, f = l.indexOf(c);
|
|
250
250
|
if (f != -1)
|
|
251
251
|
return o = [
|
|
252
252
|
new e.Diff(u, l.substring(0, f)),
|
|
253
|
-
new e.Diff(
|
|
253
|
+
new e.Diff(h, c),
|
|
254
254
|
new e.Diff(
|
|
255
255
|
u,
|
|
256
256
|
l.substring(f + c.length)
|
|
257
257
|
)
|
|
258
|
-
], t.length > r.length && (o[0][0] = o[2][0] =
|
|
258
|
+
], t.length > r.length && (o[0][0] = o[2][0] = s), o;
|
|
259
259
|
if (c.length == 1)
|
|
260
260
|
return [
|
|
261
|
-
new e.Diff(
|
|
261
|
+
new e.Diff(s, t),
|
|
262
262
|
new e.Diff(u, r)
|
|
263
263
|
];
|
|
264
|
-
var
|
|
265
|
-
if (
|
|
266
|
-
var d =
|
|
267
|
-
return
|
|
268
|
-
[new e.Diff(
|
|
269
|
-
|
|
264
|
+
var g = this.diff_halfMatch_(t, r);
|
|
265
|
+
if (g) {
|
|
266
|
+
var d = g[0], _ = g[1], p = g[2], v = g[3], m = g[4], E = this.diff_main(d, p, i, a), A = this.diff_main(_, v, i, a);
|
|
267
|
+
return E.concat(
|
|
268
|
+
[new e.Diff(h, m)],
|
|
269
|
+
A
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
|
-
return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r,
|
|
272
|
+
return i && t.length > 100 && r.length > 100 ? this.diff_lineMode_(t, r, a) : this.diff_bisect_(t, r, a);
|
|
273
273
|
}, e.prototype.diff_lineMode_ = function(t, r, i) {
|
|
274
|
-
var
|
|
275
|
-
t =
|
|
276
|
-
var o =
|
|
277
|
-
this.diff_charsToLines_(l, o), this.diff_cleanupSemantic(l), l.push(new e.Diff(
|
|
278
|
-
for (var c = 0, f = 0,
|
|
274
|
+
var a = this.diff_linesToChars_(t, r);
|
|
275
|
+
t = a.chars1, r = a.chars2;
|
|
276
|
+
var o = a.lineArray, l = this.diff_main(t, r, !1, i);
|
|
277
|
+
this.diff_charsToLines_(l, o), this.diff_cleanupSemantic(l), l.push(new e.Diff(h, ""));
|
|
278
|
+
for (var c = 0, f = 0, g = 0, d = "", _ = ""; c < l.length; ) {
|
|
279
279
|
switch (l[c][0]) {
|
|
280
280
|
case u:
|
|
281
|
-
|
|
281
|
+
g++, _ += l[c][1];
|
|
282
282
|
break;
|
|
283
|
-
case
|
|
283
|
+
case s:
|
|
284
284
|
f++, d += l[c][1];
|
|
285
285
|
break;
|
|
286
|
-
case
|
|
287
|
-
if (f >= 1 &&
|
|
286
|
+
case h:
|
|
287
|
+
if (f >= 1 && g >= 1) {
|
|
288
288
|
l.splice(
|
|
289
|
-
c - f -
|
|
290
|
-
f +
|
|
291
|
-
), c = c - f -
|
|
292
|
-
for (var
|
|
293
|
-
l.splice(c, 0,
|
|
294
|
-
c = c +
|
|
289
|
+
c - f - g,
|
|
290
|
+
f + g
|
|
291
|
+
), c = c - f - g;
|
|
292
|
+
for (var p = this.diff_main(d, _, !1, i), v = p.length - 1; v >= 0; v--)
|
|
293
|
+
l.splice(c, 0, p[v]);
|
|
294
|
+
c = c + p.length;
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
g = 0, f = 0, d = "", _ = "";
|
|
297
297
|
break;
|
|
298
298
|
}
|
|
299
299
|
c++;
|
|
300
300
|
}
|
|
301
301
|
return l.pop(), l;
|
|
302
302
|
}, e.prototype.diff_bisect_ = function(t, r, i) {
|
|
303
|
-
for (var
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
for (var
|
|
307
|
-
for (var
|
|
308
|
-
var
|
|
309
|
-
|
|
310
|
-
for (var I =
|
|
311
|
-
|
|
312
|
-
if (
|
|
313
|
-
m += 2;
|
|
314
|
-
else if (I > o)
|
|
303
|
+
for (var a = t.length, o = r.length, l = Math.ceil((a + o) / 2), c = l, f = 2 * l, g = new Array(f), d = new Array(f), _ = 0; _ < f; _++)
|
|
304
|
+
g[_] = -1, d[_] = -1;
|
|
305
|
+
g[c + 1] = 0, d[c + 1] = 0;
|
|
306
|
+
for (var p = a - o, v = p % 2 != 0, m = 0, E = 0, A = 0, S = 0, D = 0; D < l && !((/* @__PURE__ */ new Date()).getTime() > i); D++) {
|
|
307
|
+
for (var N = -D + m; N <= D - E; N += 2) {
|
|
308
|
+
var R = c + N, C;
|
|
309
|
+
N == -D || N != D && g[R - 1] < g[R + 1] ? C = g[R + 1] : C = g[R - 1] + 1;
|
|
310
|
+
for (var I = C - N; C < a && I < o && t.charAt(C) == r.charAt(I); )
|
|
311
|
+
C++, I++;
|
|
312
|
+
if (g[R] = C, C > a)
|
|
315
313
|
E += 2;
|
|
314
|
+
else if (I > o)
|
|
315
|
+
m += 2;
|
|
316
316
|
else if (v) {
|
|
317
|
-
var $ = c +
|
|
317
|
+
var $ = c + p - N;
|
|
318
318
|
if ($ >= 0 && $ < f && d[$] != -1) {
|
|
319
|
-
var B =
|
|
320
|
-
if (
|
|
321
|
-
return this.diff_bisectSplit_(t, r,
|
|
319
|
+
var B = a - d[$];
|
|
320
|
+
if (C >= B)
|
|
321
|
+
return this.diff_bisectSplit_(t, r, C, I, i);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
for (var
|
|
326
|
-
var $ = c +
|
|
327
|
-
|
|
328
|
-
for (var K = B -
|
|
325
|
+
for (var H = -D + A; H <= D - S; H += 2) {
|
|
326
|
+
var $ = c + H, B;
|
|
327
|
+
H == -D || H != D && d[$ - 1] < d[$ + 1] ? B = d[$ + 1] : B = d[$ - 1] + 1;
|
|
328
|
+
for (var K = B - H; B < a && K < o && t.charAt(a - B - 1) == r.charAt(o - K - 1); )
|
|
329
329
|
B++, K++;
|
|
330
|
-
if (d[$] = B, B >
|
|
331
|
-
|
|
330
|
+
if (d[$] = B, B > a)
|
|
331
|
+
S += 2;
|
|
332
332
|
else if (K > o)
|
|
333
|
-
|
|
333
|
+
A += 2;
|
|
334
334
|
else if (!v) {
|
|
335
|
-
var
|
|
336
|
-
if (
|
|
337
|
-
var
|
|
338
|
-
if (B =
|
|
339
|
-
return this.diff_bisectSplit_(t, r,
|
|
335
|
+
var R = c + p - H;
|
|
336
|
+
if (R >= 0 && R < f && g[R] != -1) {
|
|
337
|
+
var C = g[R], I = c + C - R;
|
|
338
|
+
if (B = a - B, C >= B)
|
|
339
|
+
return this.diff_bisectSplit_(t, r, C, I, i);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
return [
|
|
345
|
-
new e.Diff(
|
|
345
|
+
new e.Diff(s, t),
|
|
346
346
|
new e.Diff(u, r)
|
|
347
347
|
];
|
|
348
|
-
}, e.prototype.diff_bisectSplit_ = function(t, r, i,
|
|
349
|
-
var l = t.substring(0, i), c = r.substring(0,
|
|
350
|
-
return d.concat(
|
|
348
|
+
}, e.prototype.diff_bisectSplit_ = function(t, r, i, a, o) {
|
|
349
|
+
var l = t.substring(0, i), c = r.substring(0, a), f = t.substring(i), g = r.substring(a), d = this.diff_main(l, c, !1, o), _ = this.diff_main(f, g, !1, o);
|
|
350
|
+
return d.concat(_);
|
|
351
351
|
}, e.prototype.diff_linesToChars_ = function(t, r) {
|
|
352
|
-
var i = [],
|
|
352
|
+
var i = [], a = {};
|
|
353
353
|
i[0] = "";
|
|
354
|
-
function o(
|
|
355
|
-
for (var d = "",
|
|
356
|
-
|
|
357
|
-
`,
|
|
358
|
-
var
|
|
359
|
-
(
|
|
354
|
+
function o(g) {
|
|
355
|
+
for (var d = "", _ = 0, p = -1, v = i.length; p < g.length - 1; ) {
|
|
356
|
+
p = g.indexOf(`
|
|
357
|
+
`, _), p == -1 && (p = g.length - 1);
|
|
358
|
+
var m = g.substring(_, p + 1);
|
|
359
|
+
(a.hasOwnProperty ? a.hasOwnProperty(m) : a[m] !== void 0) ? d += String.fromCharCode(a[m]) : (v == l && (m = g.substring(_), p = g.length), d += String.fromCharCode(v), a[m] = v, i[v++] = m), _ = p + 1;
|
|
360
360
|
}
|
|
361
361
|
return d;
|
|
362
362
|
}
|
|
@@ -366,178 +366,178 @@ var rn = { exports: {} };
|
|
|
366
366
|
return { chars1: c, chars2: f, lineArray: i };
|
|
367
367
|
}, e.prototype.diff_charsToLines_ = function(t, r) {
|
|
368
368
|
for (var i = 0; i < t.length; i++) {
|
|
369
|
-
for (var
|
|
370
|
-
o[l] = r[
|
|
369
|
+
for (var a = t[i][1], o = [], l = 0; l < a.length; l++)
|
|
370
|
+
o[l] = r[a.charCodeAt(l)];
|
|
371
371
|
t[i][1] = o.join("");
|
|
372
372
|
}
|
|
373
373
|
}, e.prototype.diff_commonPrefix = function(t, r) {
|
|
374
374
|
if (!t || !r || t.charAt(0) != r.charAt(0))
|
|
375
375
|
return 0;
|
|
376
|
-
for (var i = 0,
|
|
377
|
-
t.substring(l, o) == r.substring(l, o) ? (i = o, l = i) :
|
|
376
|
+
for (var i = 0, a = Math.min(t.length, r.length), o = a, l = 0; i < o; )
|
|
377
|
+
t.substring(l, o) == r.substring(l, o) ? (i = o, l = i) : a = o, o = Math.floor((a - i) / 2 + i);
|
|
378
378
|
return o;
|
|
379
379
|
}, e.prototype.diff_commonSuffix = function(t, r) {
|
|
380
380
|
if (!t || !r || t.charAt(t.length - 1) != r.charAt(r.length - 1))
|
|
381
381
|
return 0;
|
|
382
|
-
for (var i = 0,
|
|
383
|
-
t.substring(t.length - o, t.length - l) == r.substring(r.length - o, r.length - l) ? (i = o, l = i) :
|
|
382
|
+
for (var i = 0, a = Math.min(t.length, r.length), o = a, l = 0; i < o; )
|
|
383
|
+
t.substring(t.length - o, t.length - l) == r.substring(r.length - o, r.length - l) ? (i = o, l = i) : a = o, o = Math.floor((a - i) / 2 + i);
|
|
384
384
|
return o;
|
|
385
385
|
}, e.prototype.diff_commonOverlap_ = function(t, r) {
|
|
386
|
-
var i = t.length,
|
|
387
|
-
if (i == 0 ||
|
|
386
|
+
var i = t.length, a = r.length;
|
|
387
|
+
if (i == 0 || a == 0)
|
|
388
388
|
return 0;
|
|
389
|
-
i >
|
|
390
|
-
var o = Math.min(i,
|
|
389
|
+
i > a ? t = t.substring(i - a) : i < a && (r = r.substring(0, i));
|
|
390
|
+
var o = Math.min(i, a);
|
|
391
391
|
if (t == r)
|
|
392
392
|
return o;
|
|
393
393
|
for (var l = 0, c = 1; ; ) {
|
|
394
|
-
var f = t.substring(o - c),
|
|
395
|
-
if (
|
|
394
|
+
var f = t.substring(o - c), g = r.indexOf(f);
|
|
395
|
+
if (g == -1)
|
|
396
396
|
return l;
|
|
397
|
-
c +=
|
|
397
|
+
c += g, (g == 0 || t.substring(o - c) == r.substring(0, c)) && (l = c, c++);
|
|
398
398
|
}
|
|
399
399
|
}, e.prototype.diff_halfMatch_ = function(t, r) {
|
|
400
400
|
if (this.Diff_Timeout <= 0)
|
|
401
401
|
return null;
|
|
402
|
-
var i = t.length > r.length ? t : r,
|
|
403
|
-
if (i.length < 4 ||
|
|
402
|
+
var i = t.length > r.length ? t : r, a = t.length > r.length ? r : t;
|
|
403
|
+
if (i.length < 4 || a.length * 2 < i.length)
|
|
404
404
|
return null;
|
|
405
405
|
var o = this;
|
|
406
|
-
function l(
|
|
407
|
-
for (var
|
|
408
|
-
var
|
|
409
|
-
|
|
410
|
-
|
|
406
|
+
function l(E, A, S) {
|
|
407
|
+
for (var D = E.substring(S, S + Math.floor(E.length / 4)), N = -1, R = "", C, I, $, B; (N = A.indexOf(D, N + 1)) != -1; ) {
|
|
408
|
+
var H = o.diff_commonPrefix(
|
|
409
|
+
E.substring(S),
|
|
410
|
+
A.substring(N)
|
|
411
411
|
), K = o.diff_commonSuffix(
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
E.substring(0, S),
|
|
413
|
+
A.substring(0, N)
|
|
414
414
|
);
|
|
415
|
-
|
|
415
|
+
R.length < K + H && (R = A.substring(N - K, N) + A.substring(N, N + H), C = E.substring(0, S - K), I = E.substring(S + H), $ = A.substring(0, N - K), B = A.substring(N + H));
|
|
416
416
|
}
|
|
417
|
-
return
|
|
418
|
-
|
|
417
|
+
return R.length * 2 >= E.length ? [
|
|
418
|
+
C,
|
|
419
419
|
I,
|
|
420
420
|
$,
|
|
421
421
|
B,
|
|
422
|
-
|
|
422
|
+
R
|
|
423
423
|
] : null;
|
|
424
424
|
}
|
|
425
425
|
var c = l(
|
|
426
426
|
i,
|
|
427
|
-
|
|
427
|
+
a,
|
|
428
428
|
Math.ceil(i.length / 4)
|
|
429
429
|
), f = l(
|
|
430
430
|
i,
|
|
431
|
-
|
|
431
|
+
a,
|
|
432
432
|
Math.ceil(i.length / 2)
|
|
433
|
-
),
|
|
433
|
+
), g;
|
|
434
434
|
if (!c && !f)
|
|
435
435
|
return null;
|
|
436
|
-
f ? c ?
|
|
437
|
-
var d,
|
|
438
|
-
t.length > r.length ? (d =
|
|
439
|
-
var
|
|
440
|
-
return [d,
|
|
436
|
+
f ? c ? g = c[4].length > f[4].length ? c : f : g = f : g = c;
|
|
437
|
+
var d, _, p, v;
|
|
438
|
+
t.length > r.length ? (d = g[0], _ = g[1], p = g[2], v = g[3]) : (p = g[0], v = g[1], d = g[2], _ = g[3]);
|
|
439
|
+
var m = g[4];
|
|
440
|
+
return [d, _, p, v, m];
|
|
441
441
|
}, e.prototype.diff_cleanupSemantic = function(t) {
|
|
442
|
-
for (var r = !1, i = [],
|
|
443
|
-
t[l][0] ==
|
|
444
|
-
|
|
442
|
+
for (var r = !1, i = [], a = 0, o = null, l = 0, c = 0, f = 0, g = 0, d = 0; l < t.length; )
|
|
443
|
+
t[l][0] == h ? (i[a++] = l, c = g, f = d, g = 0, d = 0, o = t[l][1]) : (t[l][0] == u ? g += t[l][1].length : d += t[l][1].length, o && o.length <= Math.max(c, f) && o.length <= Math.max(
|
|
444
|
+
g,
|
|
445
445
|
d
|
|
446
446
|
) && (t.splice(
|
|
447
|
-
i[
|
|
447
|
+
i[a - 1],
|
|
448
448
|
0,
|
|
449
|
-
new e.Diff(
|
|
450
|
-
), t[i[
|
|
449
|
+
new e.Diff(s, o)
|
|
450
|
+
), t[i[a - 1] + 1][0] = u, a--, a--, l = a > 0 ? i[a - 1] : -1, c = 0, f = 0, g = 0, d = 0, o = null, r = !0)), l++;
|
|
451
451
|
for (r && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), l = 1; l < t.length; ) {
|
|
452
|
-
if (t[l - 1][0] ==
|
|
453
|
-
var
|
|
454
|
-
v >=
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
)), t[l - 1][1] =
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
)), t[l - 1][0] = u, t[l - 1][1] =
|
|
452
|
+
if (t[l - 1][0] == s && t[l][0] == u) {
|
|
453
|
+
var _ = t[l - 1][1], p = t[l][1], v = this.diff_commonOverlap_(_, p), m = this.diff_commonOverlap_(p, _);
|
|
454
|
+
v >= m ? (v >= _.length / 2 || v >= p.length / 2) && (t.splice(l, 0, new e.Diff(
|
|
455
|
+
h,
|
|
456
|
+
p.substring(0, v)
|
|
457
|
+
)), t[l - 1][1] = _.substring(0, _.length - v), t[l + 1][1] = p.substring(v), l++) : (m >= _.length / 2 || m >= p.length / 2) && (t.splice(l, 0, new e.Diff(
|
|
458
|
+
h,
|
|
459
|
+
_.substring(0, m)
|
|
460
|
+
)), t[l - 1][0] = u, t[l - 1][1] = p.substring(0, p.length - m), t[l + 1][0] = s, t[l + 1][1] = _.substring(m), l++), l++;
|
|
461
461
|
}
|
|
462
462
|
l++;
|
|
463
463
|
}
|
|
464
464
|
}, e.prototype.diff_cleanupSemanticLossless = function(t) {
|
|
465
|
-
function r(
|
|
466
|
-
if (!
|
|
465
|
+
function r(m, E) {
|
|
466
|
+
if (!m || !E)
|
|
467
467
|
return 6;
|
|
468
|
-
var
|
|
469
|
-
return B ||
|
|
468
|
+
var A = m.charAt(m.length - 1), S = E.charAt(0), D = A.match(e.nonAlphaNumericRegex_), N = S.match(e.nonAlphaNumericRegex_), R = D && A.match(e.whitespaceRegex_), C = N && S.match(e.whitespaceRegex_), I = R && A.match(e.linebreakRegex_), $ = C && S.match(e.linebreakRegex_), B = I && m.match(e.blanklineEndRegex_), H = $ && E.match(e.blanklineStartRegex_);
|
|
469
|
+
return B || H ? 5 : I || $ ? 4 : D && !R && C ? 3 : R || C ? 2 : D || N ? 1 : 0;
|
|
470
470
|
}
|
|
471
471
|
for (var i = 1; i < t.length - 1; ) {
|
|
472
|
-
if (t[i - 1][0] ==
|
|
473
|
-
var
|
|
472
|
+
if (t[i - 1][0] == h && t[i + 1][0] == h) {
|
|
473
|
+
var a = t[i - 1][1], o = t[i][1], l = t[i + 1][1], c = this.diff_commonSuffix(a, o);
|
|
474
474
|
if (c) {
|
|
475
475
|
var f = o.substring(o.length - c);
|
|
476
|
-
|
|
476
|
+
a = a.substring(0, a.length - c), o = f + o.substring(0, o.length - c), l = f + l;
|
|
477
477
|
}
|
|
478
|
-
for (var
|
|
479
|
-
|
|
480
|
-
var v = r(
|
|
481
|
-
v >=
|
|
478
|
+
for (var g = a, d = o, _ = l, p = r(a, o) + r(o, l); o.charAt(0) === l.charAt(0); ) {
|
|
479
|
+
a += o.charAt(0), o = o.substring(1) + l.charAt(0), l = l.substring(1);
|
|
480
|
+
var v = r(a, o) + r(o, l);
|
|
481
|
+
v >= p && (p = v, g = a, d = o, _ = l);
|
|
482
482
|
}
|
|
483
|
-
t[i - 1][1] !=
|
|
483
|
+
t[i - 1][1] != g && (g ? t[i - 1][1] = g : (t.splice(i - 1, 1), i--), t[i][1] = d, _ ? t[i + 1][1] = _ : (t.splice(i + 1, 1), i--));
|
|
484
484
|
}
|
|
485
485
|
i++;
|
|
486
486
|
}
|
|
487
487
|
}, 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) {
|
|
488
|
-
for (var r = !1, i = [],
|
|
489
|
-
t[l][0] ==
|
|
490
|
-
i[
|
|
488
|
+
for (var r = !1, i = [], a = 0, o = null, l = 0, c = !1, f = !1, g = !1, d = !1; l < t.length; )
|
|
489
|
+
t[l][0] == h ? (t[l][1].length < this.Diff_EditCost && (g || d) ? (i[a++] = l, c = g, f = d, o = t[l][1]) : (a = 0, o = null), g = d = !1) : (t[l][0] == s ? d = !0 : g = !0, o && (c && f && g && d || o.length < this.Diff_EditCost / 2 && c + f + g + d == 3) && (t.splice(
|
|
490
|
+
i[a - 1],
|
|
491
491
|
0,
|
|
492
|
-
new e.Diff(
|
|
493
|
-
), t[i[
|
|
492
|
+
new e.Diff(s, o)
|
|
493
|
+
), t[i[a - 1] + 1][0] = u, a--, o = null, c && f ? (g = d = !0, a = 0) : (a--, l = a > 0 ? i[a - 1] : -1, g = d = !1), r = !0)), l++;
|
|
494
494
|
r && this.diff_cleanupMerge(t);
|
|
495
495
|
}, e.prototype.diff_cleanupMerge = function(t) {
|
|
496
|
-
t.push(new e.Diff(
|
|
497
|
-
for (var r = 0, i = 0,
|
|
496
|
+
t.push(new e.Diff(h, ""));
|
|
497
|
+
for (var r = 0, i = 0, a = 0, o = "", l = "", c; r < t.length; )
|
|
498
498
|
switch (t[r][0]) {
|
|
499
499
|
case u:
|
|
500
|
-
|
|
500
|
+
a++, l += t[r][1], r++;
|
|
501
501
|
break;
|
|
502
|
-
case
|
|
502
|
+
case s:
|
|
503
503
|
i++, o += t[r][1], r++;
|
|
504
504
|
break;
|
|
505
|
-
case
|
|
506
|
-
i +
|
|
507
|
-
|
|
505
|
+
case h:
|
|
506
|
+
i + a > 1 ? (i !== 0 && a !== 0 && (c = this.diff_commonPrefix(l, o), c !== 0 && (r - i - a > 0 && t[r - i - a - 1][0] == h ? t[r - i - a - 1][1] += l.substring(0, c) : (t.splice(0, 0, new e.Diff(
|
|
507
|
+
h,
|
|
508
508
|
l.substring(0, c)
|
|
509
|
-
)), r++), l = l.substring(c), o = o.substring(c)), c = this.diff_commonSuffix(l, o), c !== 0 && (t[r][1] = l.substring(l.length - c) + t[r][1], l = l.substring(0, l.length - c), o = o.substring(0, o.length - c))), r -= i +
|
|
509
|
+
)), r++), l = l.substring(c), o = o.substring(c)), c = this.diff_commonSuffix(l, o), c !== 0 && (t[r][1] = l.substring(l.length - c) + t[r][1], l = l.substring(0, l.length - c), o = o.substring(0, o.length - c))), r -= i + a, t.splice(r, i + a), o.length && (t.splice(
|
|
510
510
|
r,
|
|
511
511
|
0,
|
|
512
|
-
new e.Diff(
|
|
512
|
+
new e.Diff(s, o)
|
|
513
513
|
), r++), l.length && (t.splice(
|
|
514
514
|
r,
|
|
515
515
|
0,
|
|
516
516
|
new e.Diff(u, l)
|
|
517
|
-
), r++), r++) : r !== 0 && t[r - 1][0] ==
|
|
517
|
+
), r++), r++) : r !== 0 && t[r - 1][0] == h ? (t[r - 1][1] += t[r][1], t.splice(r, 1)) : r++, a = 0, i = 0, o = "", l = "";
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
t[t.length - 1][1] === "" && t.pop();
|
|
521
521
|
var f = !1;
|
|
522
522
|
for (r = 1; r < t.length - 1; )
|
|
523
|
-
t[r - 1][0] ==
|
|
523
|
+
t[r - 1][0] == h && t[r + 1][0] == h && (t[r][1].substring(t[r][1].length - t[r - 1][1].length) == t[r - 1][1] ? (t[r][1] = t[r - 1][1] + t[r][1].substring(0, t[r][1].length - t[r - 1][1].length), t[r + 1][1] = t[r - 1][1] + t[r + 1][1], t.splice(r - 1, 1), f = !0) : t[r][1].substring(0, t[r + 1][1].length) == t[r + 1][1] && (t[r - 1][1] += t[r + 1][1], t[r][1] = t[r][1].substring(t[r + 1][1].length) + t[r + 1][1], t.splice(r + 1, 1), f = !0)), r++;
|
|
524
524
|
f && this.diff_cleanupMerge(t);
|
|
525
525
|
}, e.prototype.diff_xIndex = function(t, r) {
|
|
526
|
-
var i = 0,
|
|
527
|
-
for (c = 0; c < t.length && (t[c][0] !== u && (i += t[c][1].length), t[c][0] !==
|
|
528
|
-
o = i, l =
|
|
529
|
-
return t.length != c && t[c][0] ===
|
|
526
|
+
var i = 0, a = 0, o = 0, l = 0, c;
|
|
527
|
+
for (c = 0; c < t.length && (t[c][0] !== u && (i += t[c][1].length), t[c][0] !== s && (a += t[c][1].length), !(i > r)); c++)
|
|
528
|
+
o = i, l = a;
|
|
529
|
+
return t.length != c && t[c][0] === s ? l : l + (r - o);
|
|
530
530
|
}, e.prototype.diff_prettyHtml = function(t) {
|
|
531
|
-
for (var r = [], i = /&/g,
|
|
532
|
-
var f = t[c][0],
|
|
531
|
+
for (var r = [], i = /&/g, a = /</g, o = />/g, l = /\n/g, c = 0; c < t.length; c++) {
|
|
532
|
+
var f = t[c][0], g = t[c][1], d = g.replace(i, "&").replace(a, "<").replace(o, ">").replace(l, "¶<br>");
|
|
533
533
|
switch (f) {
|
|
534
534
|
case u:
|
|
535
535
|
r[c] = '<ins style="background:#e6ffe6;">' + d + "</ins>";
|
|
536
536
|
break;
|
|
537
|
-
case
|
|
537
|
+
case s:
|
|
538
538
|
r[c] = '<del style="background:#ffe6e6;">' + d + "</del>";
|
|
539
539
|
break;
|
|
540
|
-
case
|
|
540
|
+
case h:
|
|
541
541
|
r[c] = "<span>" + d + "</span>";
|
|
542
542
|
break;
|
|
543
543
|
}
|
|
@@ -549,56 +549,56 @@ var rn = { exports: {} };
|
|
|
549
549
|
return r.join("");
|
|
550
550
|
}, e.prototype.diff_text2 = function(t) {
|
|
551
551
|
for (var r = [], i = 0; i < t.length; i++)
|
|
552
|
-
t[i][0] !==
|
|
552
|
+
t[i][0] !== s && (r[i] = t[i][1]);
|
|
553
553
|
return r.join("");
|
|
554
554
|
}, e.prototype.diff_levenshtein = function(t) {
|
|
555
|
-
for (var r = 0, i = 0,
|
|
555
|
+
for (var r = 0, i = 0, a = 0, o = 0; o < t.length; o++) {
|
|
556
556
|
var l = t[o][0], c = t[o][1];
|
|
557
557
|
switch (l) {
|
|
558
558
|
case u:
|
|
559
559
|
i += c.length;
|
|
560
560
|
break;
|
|
561
|
-
case
|
|
562
|
-
|
|
561
|
+
case s:
|
|
562
|
+
a += c.length;
|
|
563
563
|
break;
|
|
564
|
-
case
|
|
565
|
-
r += Math.max(i,
|
|
564
|
+
case h:
|
|
565
|
+
r += Math.max(i, a), i = 0, a = 0;
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return r += Math.max(i,
|
|
569
|
+
return r += Math.max(i, a), r;
|
|
570
570
|
}, e.prototype.diff_toDelta = function(t) {
|
|
571
571
|
for (var r = [], i = 0; i < t.length; i++)
|
|
572
572
|
switch (t[i][0]) {
|
|
573
573
|
case u:
|
|
574
574
|
r[i] = "+" + encodeURI(t[i][1]);
|
|
575
575
|
break;
|
|
576
|
-
case
|
|
576
|
+
case s:
|
|
577
577
|
r[i] = "-" + t[i][1].length;
|
|
578
578
|
break;
|
|
579
|
-
case
|
|
579
|
+
case h:
|
|
580
580
|
r[i] = "=" + t[i][1].length;
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
return r.join(" ").replace(/%20/g, " ");
|
|
584
584
|
}, e.prototype.diff_fromDelta = function(t, r) {
|
|
585
|
-
for (var i = [],
|
|
585
|
+
for (var i = [], a = 0, o = 0, l = r.split(/\t/g), c = 0; c < l.length; c++) {
|
|
586
586
|
var f = l[c].substring(1);
|
|
587
587
|
switch (l[c].charAt(0)) {
|
|
588
588
|
case "+":
|
|
589
589
|
try {
|
|
590
|
-
i[
|
|
591
|
-
} catch (
|
|
590
|
+
i[a++] = new e.Diff(u, decodeURI(f));
|
|
591
|
+
} catch (_) {
|
|
592
592
|
throw new Error("Illegal escape in diff_fromDelta: " + f);
|
|
593
593
|
}
|
|
594
594
|
break;
|
|
595
595
|
case "-":
|
|
596
596
|
case "=":
|
|
597
|
-
var
|
|
598
|
-
if (isNaN(
|
|
597
|
+
var g = parseInt(f, 10);
|
|
598
|
+
if (isNaN(g) || g < 0)
|
|
599
599
|
throw new Error("Invalid number in diff_fromDelta: " + f);
|
|
600
|
-
var d = t.substring(o, o +=
|
|
601
|
-
l[c].charAt(0) == "=" ? i[
|
|
600
|
+
var d = t.substring(o, o += g);
|
|
601
|
+
l[c].charAt(0) == "=" ? i[a++] = new e.Diff(h, d) : i[a++] = new e.Diff(s, d);
|
|
602
602
|
break;
|
|
603
603
|
default:
|
|
604
604
|
if (l[c])
|
|
@@ -615,35 +615,35 @@ var rn = { exports: {} };
|
|
|
615
615
|
}, e.prototype.match_bitap_ = function(t, r, i) {
|
|
616
616
|
if (r.length > this.Match_MaxBits)
|
|
617
617
|
throw new Error("Pattern too long for this browser.");
|
|
618
|
-
var
|
|
619
|
-
function l(
|
|
620
|
-
var $ =
|
|
618
|
+
var a = this.match_alphabet_(r), o = this;
|
|
619
|
+
function l(C, I) {
|
|
620
|
+
var $ = C / r.length, B = Math.abs(i - I);
|
|
621
621
|
return o.Match_Distance ? $ + B / o.Match_Distance : B ? 1 : $;
|
|
622
622
|
}
|
|
623
623
|
var c = this.Match_Threshold, f = t.indexOf(r, i);
|
|
624
624
|
f != -1 && (c = Math.min(l(0, f), c), f = t.lastIndexOf(r, i + r.length), f != -1 && (c = Math.min(l(0, f), c)));
|
|
625
|
-
var
|
|
625
|
+
var g = 1 << r.length - 1;
|
|
626
626
|
f = -1;
|
|
627
|
-
for (var d,
|
|
628
|
-
for (d = 0,
|
|
629
|
-
l(
|
|
630
|
-
|
|
631
|
-
var
|
|
632
|
-
|
|
633
|
-
for (var
|
|
634
|
-
var
|
|
635
|
-
if (
|
|
636
|
-
var
|
|
637
|
-
if (
|
|
638
|
-
if (c =
|
|
639
|
-
|
|
627
|
+
for (var d, _, p = r.length + t.length, v, m = 0; m < r.length; m++) {
|
|
628
|
+
for (d = 0, _ = p; d < _; )
|
|
629
|
+
l(m, i + _) <= c ? d = _ : p = _, _ = Math.floor((p - d) / 2 + d);
|
|
630
|
+
p = _;
|
|
631
|
+
var E = Math.max(1, i - _ + 1), A = Math.min(i + _, t.length) + r.length, S = Array(A + 2);
|
|
632
|
+
S[A + 1] = (1 << m) - 1;
|
|
633
|
+
for (var D = A; D >= E; D--) {
|
|
634
|
+
var N = a[t.charAt(D - 1)];
|
|
635
|
+
if (m === 0 ? S[D] = (S[D + 1] << 1 | 1) & N : S[D] = (S[D + 1] << 1 | 1) & N | ((v[D + 1] | v[D]) << 1 | 1) | v[D + 1], S[D] & g) {
|
|
636
|
+
var R = l(m, D - 1);
|
|
637
|
+
if (R <= c)
|
|
638
|
+
if (c = R, f = D - 1, f > i)
|
|
639
|
+
E = Math.max(1, 2 * i - f);
|
|
640
640
|
else
|
|
641
641
|
break;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
if (l(
|
|
644
|
+
if (l(m + 1, i) > c)
|
|
645
645
|
break;
|
|
646
|
-
v =
|
|
646
|
+
v = S;
|
|
647
647
|
}
|
|
648
648
|
return f;
|
|
649
649
|
}, e.prototype.match_alphabet_ = function(t) {
|
|
@@ -656,68 +656,68 @@ var rn = { exports: {} };
|
|
|
656
656
|
if (r.length != 0) {
|
|
657
657
|
if (t.start2 === null)
|
|
658
658
|
throw Error("patch not initialized");
|
|
659
|
-
for (var i = r.substring(t.start2, t.start2 + t.length1),
|
|
660
|
-
|
|
661
|
-
t.start2 -
|
|
662
|
-
t.start2 + t.length1 +
|
|
659
|
+
for (var i = r.substring(t.start2, t.start2 + t.length1), a = 0; r.indexOf(i) != r.lastIndexOf(i) && i.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; )
|
|
660
|
+
a += this.Patch_Margin, i = r.substring(
|
|
661
|
+
t.start2 - a,
|
|
662
|
+
t.start2 + t.length1 + a
|
|
663
663
|
);
|
|
664
|
-
|
|
665
|
-
var o = r.substring(t.start2 -
|
|
666
|
-
o && t.diffs.unshift(new e.Diff(
|
|
664
|
+
a += this.Patch_Margin;
|
|
665
|
+
var o = r.substring(t.start2 - a, t.start2);
|
|
666
|
+
o && t.diffs.unshift(new e.Diff(h, o));
|
|
667
667
|
var l = r.substring(
|
|
668
668
|
t.start2 + t.length1,
|
|
669
|
-
t.start2 + t.length1 +
|
|
669
|
+
t.start2 + t.length1 + a
|
|
670
670
|
);
|
|
671
|
-
l && t.diffs.push(new e.Diff(
|
|
671
|
+
l && t.diffs.push(new e.Diff(h, l)), t.start1 -= o.length, t.start2 -= o.length, t.length1 += o.length + l.length, t.length2 += o.length + l.length;
|
|
672
672
|
}
|
|
673
673
|
}, e.prototype.patch_make = function(t, r, i) {
|
|
674
|
-
var
|
|
674
|
+
var a, o;
|
|
675
675
|
if (typeof t == "string" && typeof r == "string" && typeof i == "undefined")
|
|
676
|
-
|
|
676
|
+
a = /** @type {string} */
|
|
677
677
|
t, o = this.diff_main(
|
|
678
|
-
|
|
678
|
+
a,
|
|
679
679
|
/** @type {string} */
|
|
680
680
|
r,
|
|
681
681
|
!0
|
|
682
682
|
), o.length > 2 && (this.diff_cleanupSemantic(o), this.diff_cleanupEfficiency(o));
|
|
683
683
|
else if (t && typeof t == "object" && typeof r == "undefined" && typeof i == "undefined")
|
|
684
684
|
o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
685
|
-
t,
|
|
685
|
+
t, a = this.diff_text1(o);
|
|
686
686
|
else if (typeof t == "string" && r && typeof r == "object" && typeof i == "undefined")
|
|
687
|
-
|
|
687
|
+
a = /** @type {string} */
|
|
688
688
|
t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
689
689
|
r;
|
|
690
690
|
else if (typeof t == "string" && typeof r == "string" && i && typeof i == "object")
|
|
691
|
-
|
|
691
|
+
a = /** @type {string} */
|
|
692
692
|
t, o = /** @type {!Array.<!diff_match_patch.Diff>} */
|
|
693
693
|
i;
|
|
694
694
|
else
|
|
695
695
|
throw new Error("Unknown call format to patch_make.");
|
|
696
696
|
if (o.length === 0)
|
|
697
697
|
return [];
|
|
698
|
-
for (var l = [], c = new e.patch_obj(), f = 0,
|
|
699
|
-
var
|
|
700
|
-
switch (!f &&
|
|
698
|
+
for (var l = [], c = new e.patch_obj(), f = 0, g = 0, d = 0, _ = a, p = a, v = 0; v < o.length; v++) {
|
|
699
|
+
var m = o[v][0], E = o[v][1];
|
|
700
|
+
switch (!f && m !== h && (c.start1 = g, c.start2 = d), m) {
|
|
701
701
|
case u:
|
|
702
|
-
c.diffs[f++] = o[v], c.length2 +=
|
|
702
|
+
c.diffs[f++] = o[v], c.length2 += E.length, p = p.substring(0, d) + E + p.substring(d);
|
|
703
703
|
break;
|
|
704
|
-
case
|
|
705
|
-
c.length1 +=
|
|
704
|
+
case s:
|
|
705
|
+
c.length1 += E.length, c.diffs[f++] = o[v], p = p.substring(0, d) + p.substring(d + E.length);
|
|
706
706
|
break;
|
|
707
|
-
case
|
|
708
|
-
|
|
707
|
+
case h:
|
|
708
|
+
E.length <= 2 * this.Patch_Margin && f && o.length != v + 1 ? (c.diffs[f++] = o[v], c.length1 += E.length, c.length2 += E.length) : E.length >= 2 * this.Patch_Margin && f && (this.patch_addContext_(c, _), l.push(c), c = new e.patch_obj(), f = 0, _ = p, g = d);
|
|
709
709
|
break;
|
|
710
710
|
}
|
|
711
|
-
|
|
711
|
+
m !== u && (g += E.length), m !== s && (d += E.length);
|
|
712
712
|
}
|
|
713
|
-
return f && (this.patch_addContext_(c,
|
|
713
|
+
return f && (this.patch_addContext_(c, _), l.push(c)), l;
|
|
714
714
|
}, e.prototype.patch_deepCopy = function(t) {
|
|
715
715
|
for (var r = [], i = 0; i < t.length; i++) {
|
|
716
|
-
var
|
|
716
|
+
var a = t[i], o = new e.patch_obj();
|
|
717
717
|
o.diffs = [];
|
|
718
|
-
for (var l = 0; l <
|
|
719
|
-
o.diffs[l] = new e.Diff(
|
|
720
|
-
o.start1 =
|
|
718
|
+
for (var l = 0; l < a.diffs.length; l++)
|
|
719
|
+
o.diffs[l] = new e.Diff(a.diffs[l][0], a.diffs[l][1]);
|
|
720
|
+
o.start1 = a.start1, o.start2 = a.start2, o.length1 = a.length1, o.length2 = a.length2, r[i] = o;
|
|
721
721
|
}
|
|
722
722
|
return r;
|
|
723
723
|
}, e.prototype.patch_apply = function(t, r) {
|
|
@@ -726,35 +726,35 @@ var rn = { exports: {} };
|
|
|
726
726
|
t = this.patch_deepCopy(t);
|
|
727
727
|
var i = this.patch_addPadding(t);
|
|
728
728
|
r = i + r + i, this.patch_splitMax(t);
|
|
729
|
-
for (var
|
|
730
|
-
var c = t[l].start2 +
|
|
731
|
-
if (f.length > this.Match_MaxBits ? (
|
|
729
|
+
for (var a = 0, o = [], l = 0; l < t.length; l++) {
|
|
730
|
+
var c = t[l].start2 + a, f = this.diff_text1(t[l].diffs), g, d = -1;
|
|
731
|
+
if (f.length > this.Match_MaxBits ? (g = this.match_main(
|
|
732
732
|
r,
|
|
733
733
|
f.substring(0, this.Match_MaxBits),
|
|
734
734
|
c
|
|
735
|
-
),
|
|
735
|
+
), g != -1 && (d = this.match_main(
|
|
736
736
|
r,
|
|
737
737
|
f.substring(f.length - this.Match_MaxBits),
|
|
738
738
|
c + f.length - this.Match_MaxBits
|
|
739
|
-
), (d == -1 ||
|
|
740
|
-
o[l] = !1,
|
|
739
|
+
), (d == -1 || g >= d) && (g = -1))) : g = this.match_main(r, f, c), g == -1)
|
|
740
|
+
o[l] = !1, a -= t[l].length2 - t[l].length1;
|
|
741
741
|
else {
|
|
742
|
-
o[l] = !0,
|
|
743
|
-
var
|
|
744
|
-
if (d == -1 ?
|
|
745
|
-
r = r.substring(0,
|
|
742
|
+
o[l] = !0, a = g - c;
|
|
743
|
+
var _;
|
|
744
|
+
if (d == -1 ? _ = r.substring(g, g + f.length) : _ = r.substring(g, d + this.Match_MaxBits), f == _)
|
|
745
|
+
r = r.substring(0, g) + this.diff_text2(t[l].diffs) + r.substring(g + f.length);
|
|
746
746
|
else {
|
|
747
|
-
var
|
|
748
|
-
if (f.length > this.Match_MaxBits && this.diff_levenshtein(
|
|
747
|
+
var p = this.diff_main(f, _, !1);
|
|
748
|
+
if (f.length > this.Match_MaxBits && this.diff_levenshtein(p) / f.length > this.Patch_DeleteThreshold)
|
|
749
749
|
o[l] = !1;
|
|
750
750
|
else {
|
|
751
|
-
this.diff_cleanupSemanticLossless(
|
|
752
|
-
for (var v = 0,
|
|
753
|
-
var
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
v +
|
|
757
|
-
))),
|
|
751
|
+
this.diff_cleanupSemanticLossless(p);
|
|
752
|
+
for (var v = 0, m, E = 0; E < t[l].diffs.length; E++) {
|
|
753
|
+
var A = t[l].diffs[E];
|
|
754
|
+
A[0] !== h && (m = this.diff_xIndex(p, v)), A[0] === u ? r = r.substring(0, g + m) + A[1] + r.substring(g + m) : A[0] === s && (r = r.substring(0, g + m) + r.substring(g + this.diff_xIndex(
|
|
755
|
+
p,
|
|
756
|
+
v + A[1].length
|
|
757
|
+
))), A[0] !== s && (v += A[1].length);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
}
|
|
@@ -762,19 +762,19 @@ var rn = { exports: {} };
|
|
|
762
762
|
}
|
|
763
763
|
return r = r.substring(i.length, r.length - i.length), [r, o];
|
|
764
764
|
}, e.prototype.patch_addPadding = function(t) {
|
|
765
|
-
for (var r = this.Patch_Margin, i = "",
|
|
766
|
-
i += String.fromCharCode(
|
|
767
|
-
for (var
|
|
768
|
-
t[
|
|
765
|
+
for (var r = this.Patch_Margin, i = "", a = 1; a <= r; a++)
|
|
766
|
+
i += String.fromCharCode(a);
|
|
767
|
+
for (var a = 0; a < t.length; a++)
|
|
768
|
+
t[a].start1 += r, t[a].start2 += r;
|
|
769
769
|
var o = t[0], l = o.diffs;
|
|
770
|
-
if (l.length == 0 || l[0][0] !=
|
|
771
|
-
l.unshift(new e.Diff(
|
|
770
|
+
if (l.length == 0 || l[0][0] != h)
|
|
771
|
+
l.unshift(new e.Diff(h, i)), o.start1 -= r, o.start2 -= r, o.length1 += r, o.length2 += r;
|
|
772
772
|
else if (r > l[0][1].length) {
|
|
773
773
|
var c = r - l[0][1].length;
|
|
774
774
|
l[0][1] = i.substring(l[0][1].length) + l[0][1], o.start1 -= c, o.start2 -= c, o.length1 += c, o.length2 += c;
|
|
775
775
|
}
|
|
776
|
-
if (o = t[t.length - 1], l = o.diffs, l.length == 0 || l[l.length - 1][0] !=
|
|
777
|
-
l.push(new e.Diff(
|
|
776
|
+
if (o = t[t.length - 1], l = o.diffs, l.length == 0 || l[l.length - 1][0] != h)
|
|
777
|
+
l.push(new e.Diff(h, i)), o.length1 += r, o.length2 += r;
|
|
778
778
|
else if (r > l[l.length - 1][1].length) {
|
|
779
779
|
var c = r - l[l.length - 1][1].length;
|
|
780
780
|
l[l.length - 1][1] += i.substring(0, c), o.length1 += c, o.length2 += c;
|
|
@@ -783,20 +783,20 @@ var rn = { exports: {} };
|
|
|
783
783
|
}, e.prototype.patch_splitMax = function(t) {
|
|
784
784
|
for (var r = this.Match_MaxBits, i = 0; i < t.length; i++)
|
|
785
785
|
if (!(t[i].length1 <= r)) {
|
|
786
|
-
var
|
|
786
|
+
var a = t[i];
|
|
787
787
|
t.splice(i--, 1);
|
|
788
|
-
for (var o =
|
|
789
|
-
var f = new e.patch_obj(),
|
|
790
|
-
for (f.start1 = o - c.length, f.start2 = l - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new e.Diff(
|
|
791
|
-
var d =
|
|
792
|
-
d === u ? (f.length2 +=
|
|
788
|
+
for (var o = a.start1, l = a.start2, c = ""; a.diffs.length !== 0; ) {
|
|
789
|
+
var f = new e.patch_obj(), g = !0;
|
|
790
|
+
for (f.start1 = o - c.length, f.start2 = l - c.length, c !== "" && (f.length1 = f.length2 = c.length, f.diffs.push(new e.Diff(h, c))); a.diffs.length !== 0 && f.length1 < r - this.Patch_Margin; ) {
|
|
791
|
+
var d = a.diffs[0][0], _ = a.diffs[0][1];
|
|
792
|
+
d === u ? (f.length2 += _.length, l += _.length, f.diffs.push(a.diffs.shift()), g = !1) : d === s && f.diffs.length == 1 && f.diffs[0][0] == h && _.length > 2 * r ? (f.length1 += _.length, o += _.length, g = !1, f.diffs.push(new e.Diff(d, _)), a.diffs.shift()) : (_ = _.substring(
|
|
793
793
|
0,
|
|
794
794
|
r - f.length1 - this.Patch_Margin
|
|
795
|
-
), f.length1 +=
|
|
795
|
+
), f.length1 += _.length, o += _.length, d === h ? (f.length2 += _.length, l += _.length) : g = !1, f.diffs.push(new e.Diff(d, _)), _ == a.diffs[0][1] ? a.diffs.shift() : a.diffs[0][1] = a.diffs[0][1].substring(_.length));
|
|
796
796
|
}
|
|
797
797
|
c = this.diff_text2(f.diffs), c = c.substring(c.length - this.Patch_Margin);
|
|
798
|
-
var
|
|
799
|
-
|
|
798
|
+
var p = this.diff_text1(a.diffs).substring(0, this.Patch_Margin);
|
|
799
|
+
p !== "" && (f.length1 += p.length, f.length2 += p.length, f.diffs.length !== 0 && f.diffs[f.diffs.length - 1][0] === h ? f.diffs[f.diffs.length - 1][1] += p : f.diffs.push(new e.Diff(h, p))), g || t.splice(++i, 0, f);
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
}, e.prototype.patch_toText = function(t) {
|
|
@@ -808,31 +808,31 @@ var rn = { exports: {} };
|
|
|
808
808
|
if (!t)
|
|
809
809
|
return r;
|
|
810
810
|
for (var i = t.split(`
|
|
811
|
-
`),
|
|
812
|
-
var l = i[
|
|
811
|
+
`), a = 0, o = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; a < i.length; ) {
|
|
812
|
+
var l = i[a].match(o);
|
|
813
813
|
if (!l)
|
|
814
|
-
throw new Error("Invalid patch string: " + i[
|
|
814
|
+
throw new Error("Invalid patch string: " + i[a]);
|
|
815
815
|
var c = new e.patch_obj();
|
|
816
|
-
for (r.push(c), c.start1 = parseInt(l[1], 10), l[2] === "" ? (c.start1--, c.length1 = 1) : l[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(l[2], 10)), c.start2 = parseInt(l[3], 10), l[4] === "" ? (c.start2--, c.length2 = 1) : l[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(l[4], 10)),
|
|
817
|
-
var f = i[
|
|
816
|
+
for (r.push(c), c.start1 = parseInt(l[1], 10), l[2] === "" ? (c.start1--, c.length1 = 1) : l[2] == "0" ? c.length1 = 0 : (c.start1--, c.length1 = parseInt(l[2], 10)), c.start2 = parseInt(l[3], 10), l[4] === "" ? (c.start2--, c.length2 = 1) : l[4] == "0" ? c.length2 = 0 : (c.start2--, c.length2 = parseInt(l[4], 10)), a++; a < i.length; ) {
|
|
817
|
+
var f = i[a].charAt(0);
|
|
818
818
|
try {
|
|
819
|
-
var
|
|
819
|
+
var g = decodeURI(i[a].substring(1));
|
|
820
820
|
} catch (d) {
|
|
821
|
-
throw new Error("Illegal escape in patch_fromText: " +
|
|
821
|
+
throw new Error("Illegal escape in patch_fromText: " + g);
|
|
822
822
|
}
|
|
823
823
|
if (f == "-")
|
|
824
|
-
c.diffs.push(new e.Diff(
|
|
824
|
+
c.diffs.push(new e.Diff(s, g));
|
|
825
825
|
else if (f == "+")
|
|
826
|
-
c.diffs.push(new e.Diff(u,
|
|
826
|
+
c.diffs.push(new e.Diff(u, g));
|
|
827
827
|
else if (f == " ")
|
|
828
|
-
c.diffs.push(new e.Diff(
|
|
828
|
+
c.diffs.push(new e.Diff(h, g));
|
|
829
829
|
else {
|
|
830
830
|
if (f == "@")
|
|
831
831
|
break;
|
|
832
832
|
if (f !== "")
|
|
833
|
-
throw new Error('Invalid patch mode "' + f + '" in: ' +
|
|
833
|
+
throw new Error('Invalid patch mode "' + f + '" in: ' + g);
|
|
834
834
|
}
|
|
835
|
-
|
|
835
|
+
a++;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
return r;
|
|
@@ -842,36 +842,36 @@ var rn = { exports: {} };
|
|
|
842
842
|
var t, r;
|
|
843
843
|
this.length1 === 0 ? t = this.start1 + ",0" : this.length1 == 1 ? t = this.start1 + 1 : t = this.start1 + 1 + "," + this.length1, this.length2 === 0 ? r = this.start2 + ",0" : this.length2 == 1 ? r = this.start2 + 1 : r = this.start2 + 1 + "," + this.length2;
|
|
844
844
|
for (var i = ["@@ -" + t + " +" + r + ` @@
|
|
845
|
-
`],
|
|
845
|
+
`], a, o = 0; o < this.diffs.length; o++) {
|
|
846
846
|
switch (this.diffs[o][0]) {
|
|
847
847
|
case u:
|
|
848
|
-
|
|
848
|
+
a = "+";
|
|
849
849
|
break;
|
|
850
|
-
case
|
|
851
|
-
|
|
850
|
+
case s:
|
|
851
|
+
a = "-";
|
|
852
852
|
break;
|
|
853
|
-
case
|
|
854
|
-
|
|
853
|
+
case h:
|
|
854
|
+
a = " ";
|
|
855
855
|
break;
|
|
856
856
|
}
|
|
857
|
-
i[o + 1] =
|
|
857
|
+
i[o + 1] = a + encodeURI(this.diffs[o][1]) + `
|
|
858
858
|
`;
|
|
859
859
|
}
|
|
860
860
|
return i.join("").replace(/%20/g, " ");
|
|
861
|
-
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE =
|
|
862
|
-
})(
|
|
863
|
-
var Le =
|
|
864
|
-
function
|
|
861
|
+
}, n.exports = e, n.exports.diff_match_patch = e, n.exports.DIFF_DELETE = s, n.exports.DIFF_INSERT = u, n.exports.DIFF_EQUAL = h;
|
|
862
|
+
})(sn);
|
|
863
|
+
var Le = sn.exports;
|
|
864
|
+
function an(n) {
|
|
865
865
|
return n instanceof Map ? n.clear = n.delete = n.set = function() {
|
|
866
866
|
throw new Error("map is read-only");
|
|
867
867
|
} : n instanceof Set && (n.add = n.clear = n.delete = function() {
|
|
868
868
|
throw new Error("set is read-only");
|
|
869
869
|
}), Object.freeze(n), Object.getOwnPropertyNames(n).forEach((e) => {
|
|
870
|
-
const
|
|
871
|
-
(u === "object" || u === "function") && !Object.isFrozen(
|
|
870
|
+
const s = n[e], u = typeof s;
|
|
871
|
+
(u === "object" || u === "function") && !Object.isFrozen(s) && an(s);
|
|
872
872
|
}), n;
|
|
873
873
|
}
|
|
874
|
-
class
|
|
874
|
+
class Ze {
|
|
875
875
|
/**
|
|
876
876
|
* @param {CompiledMode} mode
|
|
877
877
|
*/
|
|
@@ -882,27 +882,27 @@ class Ve {
|
|
|
882
882
|
this.isMatchIgnored = !0;
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function on(n) {
|
|
886
886
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
887
887
|
}
|
|
888
888
|
function re(n, ...e) {
|
|
889
|
-
const
|
|
889
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
890
890
|
for (const u in n)
|
|
891
|
-
|
|
891
|
+
s[u] = n[u];
|
|
892
892
|
return e.forEach(function(u) {
|
|
893
|
-
for (const
|
|
894
|
-
|
|
893
|
+
for (const h in u)
|
|
894
|
+
s[h] = u[h];
|
|
895
895
|
}), /** @type {T} */
|
|
896
|
-
|
|
896
|
+
s;
|
|
897
897
|
}
|
|
898
|
-
const Gn = "</span>",
|
|
898
|
+
const Gn = "</span>", Ye = (n) => !!n.scope, Kn = (n, { prefix: e }) => {
|
|
899
899
|
if (n.startsWith("language:"))
|
|
900
900
|
return n.replace("language:", "language-");
|
|
901
901
|
if (n.includes(".")) {
|
|
902
|
-
const
|
|
902
|
+
const s = n.split(".");
|
|
903
903
|
return [
|
|
904
|
-
`${e}${
|
|
905
|
-
...
|
|
904
|
+
`${e}${s.shift()}`,
|
|
905
|
+
...s.map((u, h) => `${u}${"_".repeat(h + 1)}`)
|
|
906
906
|
].join(" ");
|
|
907
907
|
}
|
|
908
908
|
return `${e}${n}`;
|
|
@@ -914,35 +914,35 @@ class Wn {
|
|
|
914
914
|
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
915
915
|
* @param {{classPrefix: string}} options
|
|
916
916
|
*/
|
|
917
|
-
constructor(e,
|
|
918
|
-
this.buffer = "", this.classPrefix =
|
|
917
|
+
constructor(e, s) {
|
|
918
|
+
this.buffer = "", this.classPrefix = s.classPrefix, e.walk(this);
|
|
919
919
|
}
|
|
920
920
|
/**
|
|
921
921
|
* Adds texts to the output stream
|
|
922
922
|
*
|
|
923
923
|
* @param {string} text */
|
|
924
924
|
addText(e) {
|
|
925
|
-
this.buffer +=
|
|
925
|
+
this.buffer += on(e);
|
|
926
926
|
}
|
|
927
927
|
/**
|
|
928
928
|
* Adds a node open to the output stream (if needed)
|
|
929
929
|
*
|
|
930
930
|
* @param {Node} node */
|
|
931
931
|
openNode(e) {
|
|
932
|
-
if (!
|
|
932
|
+
if (!Ye(e))
|
|
933
933
|
return;
|
|
934
|
-
const
|
|
934
|
+
const s = Kn(
|
|
935
935
|
e.scope,
|
|
936
936
|
{ prefix: this.classPrefix }
|
|
937
937
|
);
|
|
938
|
-
this.span(
|
|
938
|
+
this.span(s);
|
|
939
939
|
}
|
|
940
940
|
/**
|
|
941
941
|
* Adds a node close to the output stream (if needed)
|
|
942
942
|
*
|
|
943
943
|
* @param {Node} node */
|
|
944
944
|
closeNode(e) {
|
|
945
|
-
|
|
945
|
+
Ye(e) && (this.buffer += Gn);
|
|
946
946
|
}
|
|
947
947
|
/**
|
|
948
948
|
* returns the accumulated buffer
|
|
@@ -959,13 +959,13 @@ class Wn {
|
|
|
959
959
|
this.buffer += `<span class="${e}">`;
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
const
|
|
962
|
+
const Xe = (n = {}) => {
|
|
963
963
|
const e = { children: [] };
|
|
964
964
|
return Object.assign(e, n), e;
|
|
965
965
|
};
|
|
966
966
|
class $e {
|
|
967
967
|
constructor() {
|
|
968
|
-
this.rootNode =
|
|
968
|
+
this.rootNode = Xe(), this.stack = [this.rootNode];
|
|
969
969
|
}
|
|
970
970
|
get top() {
|
|
971
971
|
return this.stack[this.stack.length - 1];
|
|
@@ -979,8 +979,8 @@ class $e {
|
|
|
979
979
|
}
|
|
980
980
|
/** @param {string} scope */
|
|
981
981
|
openNode(e) {
|
|
982
|
-
const
|
|
983
|
-
this.add(
|
|
982
|
+
const s = Xe({ scope: e });
|
|
983
|
+
this.add(s), this.stack.push(s);
|
|
984
984
|
}
|
|
985
985
|
closeNode() {
|
|
986
986
|
if (this.stack.length > 1)
|
|
@@ -1004,15 +1004,15 @@ class $e {
|
|
|
1004
1004
|
* @param {Renderer} builder
|
|
1005
1005
|
* @param {Node} node
|
|
1006
1006
|
*/
|
|
1007
|
-
static _walk(e,
|
|
1008
|
-
return typeof
|
|
1007
|
+
static _walk(e, s) {
|
|
1008
|
+
return typeof s == "string" ? e.addText(s) : s.children && (e.openNode(s), s.children.forEach((u) => this._walk(e, u)), e.closeNode(s)), e;
|
|
1009
1009
|
}
|
|
1010
1010
|
/**
|
|
1011
1011
|
* @param {Node} node
|
|
1012
1012
|
*/
|
|
1013
1013
|
static _collapse(e) {
|
|
1014
|
-
typeof e != "string" && e.children && (e.children.every((
|
|
1015
|
-
$e._collapse(
|
|
1014
|
+
typeof e != "string" && e.children && (e.children.every((s) => typeof s == "string") ? e.children = [e.children.join("")] : e.children.forEach((s) => {
|
|
1015
|
+
$e._collapse(s);
|
|
1016
1016
|
}));
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
@@ -1040,9 +1040,9 @@ class Qn extends $e {
|
|
|
1040
1040
|
* @param {Emitter & {root: DataNode}} emitter
|
|
1041
1041
|
* @param {string} name
|
|
1042
1042
|
*/
|
|
1043
|
-
__addSublanguage(e,
|
|
1043
|
+
__addSublanguage(e, s) {
|
|
1044
1044
|
const u = e.root;
|
|
1045
|
-
|
|
1045
|
+
s && (u.scope = `language:${s}`), this.add(u);
|
|
1046
1046
|
}
|
|
1047
1047
|
toHTML() {
|
|
1048
1048
|
return new Wn(this, this.options).value();
|
|
@@ -1051,10 +1051,10 @@ class Qn extends $e {
|
|
|
1051
1051
|
return this.closeAllNodes(), !0;
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function _e(n) {
|
|
1055
1055
|
return n ? typeof n == "string" ? n : n.source : null;
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function ln(n) {
|
|
1058
1058
|
return ae("(?=", n, ")");
|
|
1059
1059
|
}
|
|
1060
1060
|
function Vn(n) {
|
|
@@ -1064,41 +1064,41 @@ function Zn(n) {
|
|
|
1064
1064
|
return ae("(?:", n, ")?");
|
|
1065
1065
|
}
|
|
1066
1066
|
function ae(...n) {
|
|
1067
|
-
return n.map((
|
|
1067
|
+
return n.map((s) => _e(s)).join("");
|
|
1068
1068
|
}
|
|
1069
1069
|
function Yn(n) {
|
|
1070
1070
|
const e = n[n.length - 1];
|
|
1071
1071
|
return typeof e == "object" && e.constructor === Object ? (n.splice(n.length - 1, 1), e) : {};
|
|
1072
1072
|
}
|
|
1073
1073
|
function Ue(...n) {
|
|
1074
|
-
return "(" + (Yn(n).capture ? "" : "?:") + n.map((u) =>
|
|
1074
|
+
return "(" + (Yn(n).capture ? "" : "?:") + n.map((u) => _e(u)).join("|") + ")";
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function cn(n) {
|
|
1077
1077
|
return new RegExp(n.toString() + "|").exec("").length - 1;
|
|
1078
1078
|
}
|
|
1079
1079
|
function Xn(n, e) {
|
|
1080
|
-
const
|
|
1081
|
-
return
|
|
1080
|
+
const s = n && n.exec(e);
|
|
1081
|
+
return s && s.index === 0;
|
|
1082
1082
|
}
|
|
1083
1083
|
const jn = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
1084
1084
|
function Pe(n, { joinWith: e }) {
|
|
1085
|
-
let
|
|
1085
|
+
let s = 0;
|
|
1086
1086
|
return n.map((u) => {
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
let t =
|
|
1087
|
+
s += 1;
|
|
1088
|
+
const h = s;
|
|
1089
|
+
let t = _e(u), r = "";
|
|
1090
1090
|
for (; t.length > 0; ) {
|
|
1091
1091
|
const i = jn.exec(t);
|
|
1092
1092
|
if (!i) {
|
|
1093
1093
|
r += t;
|
|
1094
1094
|
break;
|
|
1095
1095
|
}
|
|
1096
|
-
r += t.substring(0, i.index), t = t.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? r += "\\" + String(Number(i[1]) +
|
|
1096
|
+
r += t.substring(0, i.index), t = t.substring(i.index + i[0].length), i[0][0] === "\\" && i[1] ? r += "\\" + String(Number(i[1]) + h) : (r += i[0], i[0] === "(" && s++);
|
|
1097
1097
|
}
|
|
1098
1098
|
return r;
|
|
1099
1099
|
}).map((u) => `(${u})`).join(e);
|
|
1100
1100
|
}
|
|
1101
|
-
const
|
|
1101
|
+
const qn = /\b\B/, un = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", fn = "\\b\\d+(\\.\\d+)?", gn = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", hn = "\\b(0b[01]+)", Jn = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", et = (n = {}) => {
|
|
1102
1102
|
const e = /^#![ ]*\//;
|
|
1103
1103
|
return n.binary && (n.begin = ae(
|
|
1104
1104
|
e,
|
|
@@ -1111,8 +1111,8 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1111
1111
|
end: /$/,
|
|
1112
1112
|
relevance: 0,
|
|
1113
1113
|
/** @type {ModeCallback} */
|
|
1114
|
-
"on:begin": (
|
|
1115
|
-
|
|
1114
|
+
"on:begin": (s, u) => {
|
|
1115
|
+
s.index !== 0 && u.ignoreMatch();
|
|
1116
1116
|
}
|
|
1117
1117
|
}, n);
|
|
1118
1118
|
}, pe = {
|
|
@@ -1132,7 +1132,7 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1132
1132
|
contains: [pe]
|
|
1133
1133
|
}, rt = {
|
|
1134
1134
|
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/
|
|
1135
|
-
},
|
|
1135
|
+
}, De = function(n, e, s = {}) {
|
|
1136
1136
|
const u = re(
|
|
1137
1137
|
{
|
|
1138
1138
|
scope: "comment",
|
|
@@ -1140,7 +1140,7 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1140
1140
|
end: e,
|
|
1141
1141
|
contains: []
|
|
1142
1142
|
},
|
|
1143
|
-
|
|
1143
|
+
s
|
|
1144
1144
|
);
|
|
1145
1145
|
u.contains.push({
|
|
1146
1146
|
scope: "doctag",
|
|
@@ -1151,7 +1151,7 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1151
1151
|
excludeBegin: !0,
|
|
1152
1152
|
relevance: 0
|
|
1153
1153
|
});
|
|
1154
|
-
const
|
|
1154
|
+
const h = Ue(
|
|
1155
1155
|
// list of common 1 and 2 letter words in English
|
|
1156
1156
|
"I",
|
|
1157
1157
|
"a",
|
|
@@ -1191,24 +1191,24 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1191
1191
|
/[ ]+/,
|
|
1192
1192
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
1193
1193
|
"(",
|
|
1194
|
-
|
|
1194
|
+
h,
|
|
1195
1195
|
/[.]?[:]?([.][ ]|[ ])/,
|
|
1196
1196
|
"){3}"
|
|
1197
1197
|
)
|
|
1198
1198
|
// look for 3 words in a row
|
|
1199
1199
|
}
|
|
1200
1200
|
), u;
|
|
1201
|
-
}, it =
|
|
1201
|
+
}, it = De("//", "$"), st = De("/\\*", "\\*/"), at = De("#", "$"), ot = {
|
|
1202
1202
|
scope: "number",
|
|
1203
|
-
begin:
|
|
1203
|
+
begin: fn,
|
|
1204
1204
|
relevance: 0
|
|
1205
1205
|
}, lt = {
|
|
1206
1206
|
scope: "number",
|
|
1207
|
-
begin:
|
|
1207
|
+
begin: gn,
|
|
1208
1208
|
relevance: 0
|
|
1209
1209
|
}, ct = {
|
|
1210
1210
|
scope: "number",
|
|
1211
|
-
begin:
|
|
1211
|
+
begin: hn,
|
|
1212
1212
|
relevance: 0
|
|
1213
1213
|
}, ut = {
|
|
1214
1214
|
scope: "regexp",
|
|
@@ -1225,7 +1225,7 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1225
1225
|
]
|
|
1226
1226
|
}, ft = {
|
|
1227
1227
|
scope: "title",
|
|
1228
|
-
begin:
|
|
1228
|
+
begin: un,
|
|
1229
1229
|
relevance: 0
|
|
1230
1230
|
}, gt = {
|
|
1231
1231
|
scope: "title",
|
|
@@ -1240,80 +1240,80 @@ const Jn = /\b\B/, cn = "[a-zA-Z]\\w*", xe = "[a-zA-Z_]\\w*", un = "\\b\\d+(\\.\
|
|
|
1240
1240
|
n,
|
|
1241
1241
|
{
|
|
1242
1242
|
/** @type {ModeCallback} */
|
|
1243
|
-
"on:begin": (e,
|
|
1244
|
-
|
|
1243
|
+
"on:begin": (e, s) => {
|
|
1244
|
+
s.data._beginMatch = e[1];
|
|
1245
1245
|
},
|
|
1246
1246
|
/** @type {ModeCallback} */
|
|
1247
|
-
"on:end": (e,
|
|
1248
|
-
|
|
1247
|
+
"on:end": (e, s) => {
|
|
1248
|
+
s.data._beginMatch !== e[1] && s.ignoreMatch();
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
1252
|
};
|
|
1253
|
-
var
|
|
1253
|
+
var we = /* @__PURE__ */ Object.freeze({
|
|
1254
1254
|
__proto__: null,
|
|
1255
1255
|
APOS_STRING_MODE: nt,
|
|
1256
1256
|
BACKSLASH_ESCAPE: pe,
|
|
1257
1257
|
BINARY_NUMBER_MODE: ct,
|
|
1258
|
-
BINARY_NUMBER_RE:
|
|
1259
|
-
COMMENT:
|
|
1258
|
+
BINARY_NUMBER_RE: hn,
|
|
1259
|
+
COMMENT: De,
|
|
1260
1260
|
C_BLOCK_COMMENT_MODE: st,
|
|
1261
1261
|
C_LINE_COMMENT_MODE: it,
|
|
1262
1262
|
C_NUMBER_MODE: lt,
|
|
1263
|
-
C_NUMBER_RE:
|
|
1263
|
+
C_NUMBER_RE: gn,
|
|
1264
1264
|
END_SAME_AS_BEGIN: dt,
|
|
1265
1265
|
HASH_COMMENT_MODE: at,
|
|
1266
|
-
IDENT_RE:
|
|
1267
|
-
MATCH_NOTHING_RE:
|
|
1266
|
+
IDENT_RE: un,
|
|
1267
|
+
MATCH_NOTHING_RE: qn,
|
|
1268
1268
|
METHOD_GUARD: ht,
|
|
1269
1269
|
NUMBER_MODE: ot,
|
|
1270
|
-
NUMBER_RE:
|
|
1270
|
+
NUMBER_RE: fn,
|
|
1271
1271
|
PHRASAL_WORDS_MODE: rt,
|
|
1272
1272
|
QUOTE_STRING_MODE: tt,
|
|
1273
1273
|
REGEXP_MODE: ut,
|
|
1274
|
-
RE_STARTERS_RE:
|
|
1274
|
+
RE_STARTERS_RE: Jn,
|
|
1275
1275
|
SHEBANG: et,
|
|
1276
1276
|
TITLE_MODE: ft,
|
|
1277
1277
|
UNDERSCORE_IDENT_RE: xe,
|
|
1278
1278
|
UNDERSCORE_TITLE_MODE: gt
|
|
1279
1279
|
});
|
|
1280
|
-
function
|
|
1280
|
+
function _t(n, e) {
|
|
1281
1281
|
n.input[n.index - 1] === "." && e.ignoreMatch();
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function pt(n, e) {
|
|
1284
1284
|
n.className !== void 0 && (n.scope = n.className, delete n.className);
|
|
1285
1285
|
}
|
|
1286
1286
|
function bt(n, e) {
|
|
1287
|
-
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin =
|
|
1287
|
+
e && n.beginKeywords && (n.begin = "\\b(" + n.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", n.__beforeBegin = _t, n.keywords = n.keywords || n.beginKeywords, delete n.beginKeywords, n.relevance === void 0 && (n.relevance = 0));
|
|
1288
1288
|
}
|
|
1289
1289
|
function vt(n, e) {
|
|
1290
1290
|
Array.isArray(n.illegal) && (n.illegal = Ue(...n.illegal));
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function mt(n, e) {
|
|
1293
1293
|
if (n.match) {
|
|
1294
1294
|
if (n.begin || n.end)
|
|
1295
1295
|
throw new Error("begin & end are not supported with match");
|
|
1296
1296
|
n.begin = n.match, delete n.match;
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function Et(n, e) {
|
|
1300
1300
|
n.relevance === void 0 && (n.relevance = 1);
|
|
1301
1301
|
}
|
|
1302
|
-
const
|
|
1302
|
+
const wt = (n, e) => {
|
|
1303
1303
|
if (!n.beforeMatch)
|
|
1304
1304
|
return;
|
|
1305
1305
|
if (n.starts)
|
|
1306
1306
|
throw new Error("beforeMatch cannot be used with starts");
|
|
1307
|
-
const
|
|
1307
|
+
const s = Object.assign({}, n);
|
|
1308
1308
|
Object.keys(n).forEach((u) => {
|
|
1309
1309
|
delete n[u];
|
|
1310
|
-
}), n.keywords =
|
|
1310
|
+
}), n.keywords = s.keywords, n.begin = ae(s.beforeMatch, ln(s.begin)), n.starts = {
|
|
1311
1311
|
relevance: 0,
|
|
1312
1312
|
contains: [
|
|
1313
|
-
Object.assign(
|
|
1313
|
+
Object.assign(s, { endsParent: !0 })
|
|
1314
1314
|
]
|
|
1315
|
-
}, n.relevance = 0, delete
|
|
1316
|
-
},
|
|
1315
|
+
}, n.relevance = 0, delete s.beforeMatch;
|
|
1316
|
+
}, yt = [
|
|
1317
1317
|
"of",
|
|
1318
1318
|
"and",
|
|
1319
1319
|
"for",
|
|
@@ -1328,41 +1328,41 @@ const yt = (n, e) => {
|
|
|
1328
1328
|
// common variable name
|
|
1329
1329
|
"value"
|
|
1330
1330
|
// common variable name
|
|
1331
|
-
],
|
|
1332
|
-
function
|
|
1331
|
+
], At = "keyword";
|
|
1332
|
+
function dn(n, e, s = At) {
|
|
1333
1333
|
const u = /* @__PURE__ */ Object.create(null);
|
|
1334
|
-
return typeof n == "string" ?
|
|
1334
|
+
return typeof n == "string" ? h(s, n.split(" ")) : Array.isArray(n) ? h(s, n) : Object.keys(n).forEach(function(t) {
|
|
1335
1335
|
Object.assign(
|
|
1336
1336
|
u,
|
|
1337
|
-
|
|
1337
|
+
dn(n[t], e, t)
|
|
1338
1338
|
);
|
|
1339
1339
|
}), u;
|
|
1340
|
-
function
|
|
1340
|
+
function h(t, r) {
|
|
1341
1341
|
e && (r = r.map((i) => i.toLowerCase())), r.forEach(function(i) {
|
|
1342
|
-
const
|
|
1343
|
-
u[
|
|
1342
|
+
const a = i.split("|");
|
|
1343
|
+
u[a[0]] = [t, Nt(a[0], a[1])];
|
|
1344
1344
|
});
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function Nt(n, e) {
|
|
1348
1348
|
return e ? Number(e) : Mt(n) ? 0 : 1;
|
|
1349
1349
|
}
|
|
1350
1350
|
function Mt(n) {
|
|
1351
|
-
return
|
|
1351
|
+
return yt.includes(n.toLowerCase());
|
|
1352
1352
|
}
|
|
1353
|
-
const
|
|
1353
|
+
const je = {}, se = (n) => {
|
|
1354
1354
|
console.error(n);
|
|
1355
|
-
},
|
|
1355
|
+
}, qe = (n, ...e) => {
|
|
1356
1356
|
console.log(`WARN: ${n}`, ...e);
|
|
1357
|
-
},
|
|
1358
|
-
|
|
1357
|
+
}, ce = (n, e) => {
|
|
1358
|
+
je[`${n}/${e}`] || (console.log(`Deprecated as of ${n}. ${e}`), je[`${n}/${e}`] = !0);
|
|
1359
1359
|
}, Me = new Error();
|
|
1360
|
-
function
|
|
1360
|
+
function _n(n, e, { key: s }) {
|
|
1361
1361
|
let u = 0;
|
|
1362
|
-
const
|
|
1362
|
+
const h = n[s], t = {}, r = {};
|
|
1363
1363
|
for (let i = 1; i <= e.length; i++)
|
|
1364
|
-
r[i + u] =
|
|
1365
|
-
n[
|
|
1364
|
+
r[i + u] = h[i], t[i + u] = !0, u += cn(e[i - 1]);
|
|
1365
|
+
n[s] = r, n[s]._emit = t, n[s]._multi = !0;
|
|
1366
1366
|
}
|
|
1367
1367
|
function Tt(n) {
|
|
1368
1368
|
if (Array.isArray(n.begin)) {
|
|
@@ -1370,52 +1370,52 @@ function Tt(n) {
|
|
|
1370
1370
|
throw se("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Me;
|
|
1371
1371
|
if (typeof n.beginScope != "object" || n.beginScope === null)
|
|
1372
1372
|
throw se("beginScope must be object"), Me;
|
|
1373
|
-
|
|
1373
|
+
_n(n, n.begin, { key: "beginScope" }), n.begin = Pe(n.begin, { joinWith: "" });
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function Dt(n) {
|
|
1377
1377
|
if (Array.isArray(n.end)) {
|
|
1378
1378
|
if (n.skip || n.excludeEnd || n.returnEnd)
|
|
1379
1379
|
throw se("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Me;
|
|
1380
1380
|
if (typeof n.endScope != "object" || n.endScope === null)
|
|
1381
1381
|
throw se("endScope must be object"), Me;
|
|
1382
|
-
|
|
1382
|
+
_n(n, n.end, { key: "endScope" }), n.end = Pe(n.end, { joinWith: "" });
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function St(n) {
|
|
1386
1386
|
n.scope && typeof n.scope == "object" && n.scope !== null && (n.beginScope = n.scope, delete n.scope);
|
|
1387
1387
|
}
|
|
1388
|
-
function Rt(n) {
|
|
1389
|
-
Dt(n), typeof n.beginScope == "string" && (n.beginScope = { _wrap: n.beginScope }), typeof n.endScope == "string" && (n.endScope = { _wrap: n.endScope }), Tt(n), St(n);
|
|
1390
|
-
}
|
|
1391
1388
|
function Ct(n) {
|
|
1389
|
+
St(n), typeof n.beginScope == "string" && (n.beginScope = { _wrap: n.beginScope }), typeof n.endScope == "string" && (n.endScope = { _wrap: n.endScope }), Tt(n), Dt(n);
|
|
1390
|
+
}
|
|
1391
|
+
function Rt(n) {
|
|
1392
1392
|
function e(r, i) {
|
|
1393
1393
|
return new RegExp(
|
|
1394
|
-
|
|
1394
|
+
_e(r),
|
|
1395
1395
|
"m" + (n.case_insensitive ? "i" : "") + (n.unicodeRegex ? "u" : "") + (i ? "g" : "")
|
|
1396
1396
|
);
|
|
1397
1397
|
}
|
|
1398
|
-
class
|
|
1398
|
+
class s {
|
|
1399
1399
|
constructor() {
|
|
1400
1400
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
1401
1401
|
}
|
|
1402
1402
|
// @ts-ignore
|
|
1403
|
-
addRule(i,
|
|
1404
|
-
|
|
1403
|
+
addRule(i, a) {
|
|
1404
|
+
a.position = this.position++, this.matchIndexes[this.matchAt] = a, this.regexes.push([a, i]), this.matchAt += cn(i) + 1;
|
|
1405
1405
|
}
|
|
1406
1406
|
compile() {
|
|
1407
1407
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
1408
|
-
const i = this.regexes.map((
|
|
1408
|
+
const i = this.regexes.map((a) => a[1]);
|
|
1409
1409
|
this.matcherRe = e(Pe(i, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
1410
1410
|
}
|
|
1411
1411
|
/** @param {string} s */
|
|
1412
1412
|
exec(i) {
|
|
1413
1413
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
1414
|
-
const
|
|
1415
|
-
if (!
|
|
1414
|
+
const a = this.matcherRe.exec(i);
|
|
1415
|
+
if (!a)
|
|
1416
1416
|
return null;
|
|
1417
|
-
const o =
|
|
1418
|
-
return
|
|
1417
|
+
const o = a.findIndex((c, f) => f > 0 && c !== void 0), l = this.matchIndexes[o];
|
|
1418
|
+
return a.splice(0, o), Object.assign(a, l);
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
1421
|
class u {
|
|
@@ -1426,8 +1426,8 @@ function Ct(n) {
|
|
|
1426
1426
|
getMatcher(i) {
|
|
1427
1427
|
if (this.multiRegexes[i])
|
|
1428
1428
|
return this.multiRegexes[i];
|
|
1429
|
-
const
|
|
1430
|
-
return this.rules.slice(i).forEach(([o, l]) =>
|
|
1429
|
+
const a = new s();
|
|
1430
|
+
return this.rules.slice(i).forEach(([o, l]) => a.addRule(o, l)), a.compile(), this.multiRegexes[i] = a, a;
|
|
1431
1431
|
}
|
|
1432
1432
|
resumingScanAtSamePosition() {
|
|
1433
1433
|
return this.regexIndex !== 0;
|
|
@@ -1436,14 +1436,14 @@ function Ct(n) {
|
|
|
1436
1436
|
this.regexIndex = 0;
|
|
1437
1437
|
}
|
|
1438
1438
|
// @ts-ignore
|
|
1439
|
-
addRule(i,
|
|
1440
|
-
this.rules.push([i,
|
|
1439
|
+
addRule(i, a) {
|
|
1440
|
+
this.rules.push([i, a]), a.type === "begin" && this.count++;
|
|
1441
1441
|
}
|
|
1442
1442
|
/** @param {string} s */
|
|
1443
1443
|
exec(i) {
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
let o =
|
|
1444
|
+
const a = this.getMatcher(this.regexIndex);
|
|
1445
|
+
a.lastIndex = this.lastIndex;
|
|
1446
|
+
let o = a.exec(i);
|
|
1447
1447
|
if (this.resumingScanAtSamePosition() && !(o && o.index === this.lastIndex)) {
|
|
1448
1448
|
const l = this.getMatcher(0);
|
|
1449
1449
|
l.lastIndex = this.lastIndex + 1, o = l.exec(i);
|
|
@@ -1451,34 +1451,34 @@ function Ct(n) {
|
|
|
1451
1451
|
return o && (this.regexIndex += o.position + 1, this.regexIndex === this.count && this.considerAll()), o;
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function h(r) {
|
|
1455
1455
|
const i = new u();
|
|
1456
|
-
return r.contains.forEach((
|
|
1456
|
+
return r.contains.forEach((a) => i.addRule(a.begin, { rule: a, type: "begin" })), r.terminatorEnd && i.addRule(r.terminatorEnd, { type: "end" }), r.illegal && i.addRule(r.illegal, { type: "illegal" }), i;
|
|
1457
1457
|
}
|
|
1458
1458
|
function t(r, i) {
|
|
1459
|
-
const
|
|
1459
|
+
const a = (
|
|
1460
1460
|
/** @type CompiledMode */
|
|
1461
1461
|
r
|
|
1462
1462
|
);
|
|
1463
1463
|
if (r.isCompiled)
|
|
1464
|
-
return
|
|
1464
|
+
return a;
|
|
1465
1465
|
[
|
|
1466
|
-
|
|
1466
|
+
pt,
|
|
1467
1467
|
// do this early so compiler extensions generally don't have to worry about
|
|
1468
1468
|
// the distinction between match/begin
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1469
|
+
mt,
|
|
1470
|
+
Ct,
|
|
1471
|
+
wt
|
|
1472
1472
|
].forEach((l) => l(r, i)), n.compilerExtensions.forEach((l) => l(r, i)), r.__beforeBegin = null, [
|
|
1473
1473
|
bt,
|
|
1474
1474
|
// do this later so compiler extensions that come earlier have access to the
|
|
1475
1475
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
1476
1476
|
vt,
|
|
1477
1477
|
// default to 1 relevance if not specified
|
|
1478
|
-
|
|
1478
|
+
Et
|
|
1479
1479
|
].forEach((l) => l(r, i)), r.isCompiled = !0;
|
|
1480
1480
|
let o = null;
|
|
1481
|
-
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords =
|
|
1481
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), o = r.keywords.$pattern, delete r.keywords.$pattern), o = o || /\w+/, r.keywords && (r.keywords = dn(r.keywords, n.case_insensitive)), a.keywordPatternRe = e(o, !0), i && (r.begin || (r.begin = /\B|\b/), a.beginRe = e(a.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (a.endRe = e(a.end)), a.terminatorEnd = _e(a.end) || "", r.endsWithParent && i.terminatorEnd && (a.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (a.illegalRe = e(
|
|
1482
1482
|
/** @type {RegExp | string} */
|
|
1483
1483
|
r.illegal
|
|
1484
1484
|
)), r.contains || (r.contains = []), r.contains = [].concat(...r.contains.map(function(l) {
|
|
@@ -1487,9 +1487,9 @@ function Ct(n) {
|
|
|
1487
1487
|
t(
|
|
1488
1488
|
/** @type Mode */
|
|
1489
1489
|
l,
|
|
1490
|
-
|
|
1490
|
+
a
|
|
1491
1491
|
);
|
|
1492
|
-
}), r.starts && t(r.starts, i),
|
|
1492
|
+
}), r.starts && t(r.starts, i), a.matcher = h(a), a;
|
|
1493
1493
|
}
|
|
1494
1494
|
if (n.compilerExtensions || (n.compilerExtensions = []), n.contains && n.contains.includes("self"))
|
|
1495
1495
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -1508,13 +1508,13 @@ function Lt(n) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
var Ot = "11.9.0";
|
|
1510
1510
|
class It extends Error {
|
|
1511
|
-
constructor(e,
|
|
1512
|
-
super(e), this.name = "HTMLInjectionError", this.html =
|
|
1511
|
+
constructor(e, s) {
|
|
1512
|
+
super(e), this.name = "HTMLInjectionError", this.html = s;
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
const Oe =
|
|
1516
|
-
const e = /* @__PURE__ */ Object.create(null),
|
|
1517
|
-
let
|
|
1515
|
+
const Oe = on, Je = re, en = Symbol("nomatch"), kt = 7, bn = function(n) {
|
|
1516
|
+
const e = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null), u = [];
|
|
1517
|
+
let h = !0;
|
|
1518
1518
|
const t = "Could not find the language '{}', did you forget to load/include a language module?", r = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
1519
1519
|
let i = {
|
|
1520
1520
|
ignoreUnescapedHTML: !1,
|
|
@@ -1528,264 +1528,264 @@ const Oe = an, Je = re, qe = Symbol("nomatch"), kt = 7, _n = function(n) {
|
|
|
1528
1528
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
1529
1529
|
__emitter: Qn
|
|
1530
1530
|
};
|
|
1531
|
-
function
|
|
1531
|
+
function a(b) {
|
|
1532
1532
|
return i.noHighlightRe.test(b);
|
|
1533
1533
|
}
|
|
1534
1534
|
function o(b) {
|
|
1535
|
-
let
|
|
1536
|
-
|
|
1537
|
-
const L = i.languageDetectRe.exec(
|
|
1535
|
+
let y = b.className + " ";
|
|
1536
|
+
y += b.parentNode ? b.parentNode.className : "";
|
|
1537
|
+
const L = i.languageDetectRe.exec(y);
|
|
1538
1538
|
if (L) {
|
|
1539
|
-
const U =
|
|
1540
|
-
return U || (
|
|
1539
|
+
const U = C(L[1]);
|
|
1540
|
+
return U || (qe(t.replace("{}", L[1])), qe("Falling back to no-highlight mode for this block.", b)), U ? L[1] : "no-highlight";
|
|
1541
1541
|
}
|
|
1542
|
-
return
|
|
1542
|
+
return y.split(/\s+/).find((U) => a(U) || C(U));
|
|
1543
1543
|
}
|
|
1544
|
-
function l(b,
|
|
1545
|
-
let U = "",
|
|
1546
|
-
typeof
|
|
1547
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
1544
|
+
function l(b, y, L) {
|
|
1545
|
+
let U = "", F = "";
|
|
1546
|
+
typeof y == "object" ? (U = b, L = y.ignoreIllegals, F = y.language) : (ce("10.7.0", "highlight(lang, code, ...args) has been deprecated."), ce("10.7.0", `Please use highlight(code, options) instead.
|
|
1547
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), F = b, U = y), L === void 0 && (L = !0);
|
|
1548
1548
|
const W = {
|
|
1549
1549
|
code: U,
|
|
1550
|
-
language:
|
|
1550
|
+
language: F
|
|
1551
1551
|
};
|
|
1552
1552
|
te("before:highlight", W);
|
|
1553
1553
|
const Y = W.result ? W.result : c(W.language, W.code, L);
|
|
1554
1554
|
return Y.code = W.code, te("after:highlight", Y), Y;
|
|
1555
1555
|
}
|
|
1556
|
-
function c(b,
|
|
1557
|
-
const
|
|
1558
|
-
function W(
|
|
1559
|
-
return
|
|
1556
|
+
function c(b, y, L, U) {
|
|
1557
|
+
const F = /* @__PURE__ */ Object.create(null);
|
|
1558
|
+
function W(w, M) {
|
|
1559
|
+
return w.keywords[M];
|
|
1560
1560
|
}
|
|
1561
1561
|
function Y() {
|
|
1562
1562
|
if (!O.keywords) {
|
|
1563
1563
|
z.addText(x);
|
|
1564
1564
|
return;
|
|
1565
1565
|
}
|
|
1566
|
-
let
|
|
1566
|
+
let w = 0;
|
|
1567
1567
|
O.keywordPatternRe.lastIndex = 0;
|
|
1568
1568
|
let M = O.keywordPatternRe.exec(x), k = "";
|
|
1569
1569
|
for (; M; ) {
|
|
1570
|
-
k += x.substring(
|
|
1570
|
+
k += x.substring(w, M.index);
|
|
1571
1571
|
const P = j.case_insensitive ? M[0].toLowerCase() : M[0], G = W(O, P);
|
|
1572
1572
|
if (G) {
|
|
1573
|
-
const [
|
|
1574
|
-
if (z.addText(k), k = "",
|
|
1573
|
+
const [q, Cn] = G;
|
|
1574
|
+
if (z.addText(k), k = "", F[P] = (F[P] || 0) + 1, F[P] <= kt && (Ee += Cn), q.startsWith("_"))
|
|
1575
1575
|
k += M[0];
|
|
1576
1576
|
else {
|
|
1577
|
-
const Rn = j.classNameAliases[
|
|
1577
|
+
const Rn = j.classNameAliases[q] || q;
|
|
1578
1578
|
X(M[0], Rn);
|
|
1579
1579
|
}
|
|
1580
1580
|
} else
|
|
1581
1581
|
k += M[0];
|
|
1582
|
-
|
|
1582
|
+
w = O.keywordPatternRe.lastIndex, M = O.keywordPatternRe.exec(x);
|
|
1583
1583
|
}
|
|
1584
|
-
k += x.substring(
|
|
1584
|
+
k += x.substring(w), z.addText(k);
|
|
1585
1585
|
}
|
|
1586
1586
|
function ve() {
|
|
1587
1587
|
if (x === "")
|
|
1588
1588
|
return;
|
|
1589
|
-
let
|
|
1589
|
+
let w = null;
|
|
1590
1590
|
if (typeof O.subLanguage == "string") {
|
|
1591
1591
|
if (!e[O.subLanguage]) {
|
|
1592
1592
|
z.addText(x);
|
|
1593
1593
|
return;
|
|
1594
1594
|
}
|
|
1595
|
-
|
|
1596
|
-
|
|
1595
|
+
w = c(O.subLanguage, x, !0, Ke[O.subLanguage]), Ke[O.subLanguage] = /** @type {CompiledMode} */
|
|
1596
|
+
w._top;
|
|
1597
1597
|
} else
|
|
1598
|
-
|
|
1599
|
-
O.relevance > 0 && (
|
|
1598
|
+
w = g(x, O.subLanguage.length ? O.subLanguage : null);
|
|
1599
|
+
O.relevance > 0 && (Ee += w.relevance), z.__addSublanguage(w._emitter, w.language);
|
|
1600
1600
|
}
|
|
1601
1601
|
function Q() {
|
|
1602
1602
|
O.subLanguage != null ? ve() : Y(), x = "";
|
|
1603
1603
|
}
|
|
1604
|
-
function X(
|
|
1605
|
-
|
|
1604
|
+
function X(w, M) {
|
|
1605
|
+
w !== "" && (z.startScope(M), z.addText(w), z.endScope());
|
|
1606
1606
|
}
|
|
1607
|
-
function
|
|
1607
|
+
function Fe(w, M) {
|
|
1608
1608
|
let k = 1;
|
|
1609
1609
|
const P = M.length - 1;
|
|
1610
1610
|
for (; k <= P; ) {
|
|
1611
|
-
if (!
|
|
1611
|
+
if (!w._emit[k]) {
|
|
1612
1612
|
k++;
|
|
1613
1613
|
continue;
|
|
1614
1614
|
}
|
|
1615
|
-
const G = j.classNameAliases[
|
|
1616
|
-
G ? X(
|
|
1615
|
+
const G = j.classNameAliases[w[k]] || w[k], q = M[k];
|
|
1616
|
+
G ? X(q, G) : (x = q, Y(), x = ""), k++;
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1620
|
-
return
|
|
1619
|
+
function He(w, M) {
|
|
1620
|
+
return w.scope && typeof w.scope == "string" && z.openNode(j.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (X(x, j.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), x = "") : w.beginScope._multi && (Fe(w.beginScope, M), x = "")), O = Object.create(w, { parent: { value: O } }), O;
|
|
1621
1621
|
}
|
|
1622
|
-
function ze(
|
|
1623
|
-
let P = Xn(
|
|
1622
|
+
function ze(w, M, k) {
|
|
1623
|
+
let P = Xn(w.endRe, k);
|
|
1624
1624
|
if (P) {
|
|
1625
|
-
if (
|
|
1626
|
-
const G = new
|
|
1627
|
-
|
|
1625
|
+
if (w["on:end"]) {
|
|
1626
|
+
const G = new Ze(w);
|
|
1627
|
+
w["on:end"](M, G), G.isMatchIgnored && (P = !1);
|
|
1628
1628
|
}
|
|
1629
1629
|
if (P) {
|
|
1630
|
-
for (;
|
|
1631
|
-
|
|
1632
|
-
return
|
|
1630
|
+
for (; w.endsParent && w.parent; )
|
|
1631
|
+
w = w.parent;
|
|
1632
|
+
return w;
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
|
-
if (
|
|
1636
|
-
return ze(
|
|
1635
|
+
if (w.endsWithParent)
|
|
1636
|
+
return ze(w.parent, M, k);
|
|
1637
1637
|
}
|
|
1638
|
-
function Nn(
|
|
1639
|
-
return O.matcher.regexIndex === 0 ? (x +=
|
|
1638
|
+
function Nn(w) {
|
|
1639
|
+
return O.matcher.regexIndex === 0 ? (x += w[0], 1) : (Re = !0, 0);
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1642
|
-
const M =
|
|
1643
|
-
for (const
|
|
1644
|
-
if (
|
|
1641
|
+
function Mn(w) {
|
|
1642
|
+
const M = w[0], k = w.rule, P = new Ze(k), G = [k.__beforeBegin, k["on:begin"]];
|
|
1643
|
+
for (const q of G)
|
|
1644
|
+
if (q && (q(w, P), P.isMatchIgnored))
|
|
1645
1645
|
return Nn(M);
|
|
1646
|
-
return k.skip ? x += M : (k.excludeBegin && (x += M), Q(), !k.returnBegin && !k.excludeBegin && (x = M)),
|
|
1646
|
+
return k.skip ? x += M : (k.excludeBegin && (x += M), Q(), !k.returnBegin && !k.excludeBegin && (x = M)), He(k, w), k.returnBegin ? 0 : M.length;
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1649
|
-
const M =
|
|
1648
|
+
function Tn(w) {
|
|
1649
|
+
const M = w[0], k = y.substring(w.index), P = ze(O, w, k);
|
|
1650
1650
|
if (!P)
|
|
1651
|
-
return
|
|
1651
|
+
return en;
|
|
1652
1652
|
const G = O;
|
|
1653
|
-
O.endScope && O.endScope._wrap ? (Q(), X(M, O.endScope._wrap)) : O.endScope && O.endScope._multi ? (Q(),
|
|
1653
|
+
O.endScope && O.endScope._wrap ? (Q(), X(M, O.endScope._wrap)) : O.endScope && O.endScope._multi ? (Q(), Fe(O.endScope, w)) : G.skip ? x += M : (G.returnEnd || G.excludeEnd || (x += M), Q(), G.excludeEnd && (x = M));
|
|
1654
1654
|
do
|
|
1655
|
-
O.scope && z.closeNode(), !O.skip && !O.subLanguage && (
|
|
1655
|
+
O.scope && z.closeNode(), !O.skip && !O.subLanguage && (Ee += O.relevance), O = O.parent;
|
|
1656
1656
|
while (O !== P.parent);
|
|
1657
|
-
return P.starts &&
|
|
1657
|
+
return P.starts && He(P.starts, w), G.returnEnd ? 0 : M.length;
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const
|
|
1659
|
+
function Dn() {
|
|
1660
|
+
const w = [];
|
|
1661
1661
|
for (let M = O; M !== j; M = M.parent)
|
|
1662
|
-
M.scope &&
|
|
1663
|
-
|
|
1662
|
+
M.scope && w.unshift(M.scope);
|
|
1663
|
+
w.forEach((M) => z.openNode(M));
|
|
1664
1664
|
}
|
|
1665
|
-
let
|
|
1666
|
-
function Ge(
|
|
1665
|
+
let me = {};
|
|
1666
|
+
function Ge(w, M) {
|
|
1667
1667
|
const k = M && M[0];
|
|
1668
|
-
if (x +=
|
|
1668
|
+
if (x += w, k == null)
|
|
1669
1669
|
return Q(), 0;
|
|
1670
|
-
if (
|
|
1671
|
-
if (x +=
|
|
1670
|
+
if (me.type === "begin" && M.type === "end" && me.index === M.index && k === "") {
|
|
1671
|
+
if (x += y.slice(M.index, M.index + 1), !h) {
|
|
1672
1672
|
const P = new Error(`0 width match regex (${b})`);
|
|
1673
|
-
throw P.languageName = b, P.badRule =
|
|
1673
|
+
throw P.languageName = b, P.badRule = me.rule, P;
|
|
1674
1674
|
}
|
|
1675
1675
|
return 1;
|
|
1676
1676
|
}
|
|
1677
|
-
if (
|
|
1678
|
-
return
|
|
1677
|
+
if (me = M, M.type === "begin")
|
|
1678
|
+
return Mn(M);
|
|
1679
1679
|
if (M.type === "illegal" && !L) {
|
|
1680
1680
|
const P = new Error('Illegal lexeme "' + k + '" for mode "' + (O.scope || "<unnamed>") + '"');
|
|
1681
1681
|
throw P.mode = O, P;
|
|
1682
1682
|
} else if (M.type === "end") {
|
|
1683
|
-
const P =
|
|
1684
|
-
if (P !==
|
|
1683
|
+
const P = Tn(M);
|
|
1684
|
+
if (P !== en)
|
|
1685
1685
|
return P;
|
|
1686
1686
|
}
|
|
1687
1687
|
if (M.type === "illegal" && k === "")
|
|
1688
1688
|
return 1;
|
|
1689
|
-
if (
|
|
1689
|
+
if (Ce > 1e5 && Ce > M.index * 3)
|
|
1690
1690
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
1691
1691
|
return x += k, k.length;
|
|
1692
1692
|
}
|
|
1693
|
-
const j =
|
|
1693
|
+
const j = C(b);
|
|
1694
1694
|
if (!j)
|
|
1695
1695
|
throw se(t.replace("{}", b)), new Error('Unknown language: "' + b + '"');
|
|
1696
|
-
const Sn =
|
|
1697
|
-
let
|
|
1696
|
+
const Sn = Rt(j);
|
|
1697
|
+
let Se = "", O = U || Sn;
|
|
1698
1698
|
const Ke = {}, z = new i.__emitter(i);
|
|
1699
|
-
|
|
1700
|
-
let x = "",
|
|
1699
|
+
Dn();
|
|
1700
|
+
let x = "", Ee = 0, ie = 0, Ce = 0, Re = !1;
|
|
1701
1701
|
try {
|
|
1702
1702
|
if (j.__emitTokens)
|
|
1703
|
-
j.__emitTokens(
|
|
1703
|
+
j.__emitTokens(y, z);
|
|
1704
1704
|
else {
|
|
1705
1705
|
for (O.matcher.considerAll(); ; ) {
|
|
1706
|
-
|
|
1707
|
-
const
|
|
1708
|
-
if (!
|
|
1706
|
+
Ce++, Re ? Re = !1 : O.matcher.considerAll(), O.matcher.lastIndex = ie;
|
|
1707
|
+
const w = O.matcher.exec(y);
|
|
1708
|
+
if (!w)
|
|
1709
1709
|
break;
|
|
1710
|
-
const M =
|
|
1711
|
-
ie =
|
|
1710
|
+
const M = y.substring(ie, w.index), k = Ge(M, w);
|
|
1711
|
+
ie = w.index + k;
|
|
1712
1712
|
}
|
|
1713
|
-
Ge(
|
|
1713
|
+
Ge(y.substring(ie));
|
|
1714
1714
|
}
|
|
1715
|
-
return z.finalize(),
|
|
1715
|
+
return z.finalize(), Se = z.toHTML(), {
|
|
1716
1716
|
language: b,
|
|
1717
|
-
value:
|
|
1718
|
-
relevance:
|
|
1717
|
+
value: Se,
|
|
1718
|
+
relevance: Ee,
|
|
1719
1719
|
illegal: !1,
|
|
1720
1720
|
_emitter: z,
|
|
1721
1721
|
_top: O
|
|
1722
1722
|
};
|
|
1723
|
-
} catch (
|
|
1724
|
-
if (
|
|
1723
|
+
} catch (w) {
|
|
1724
|
+
if (w.message && w.message.includes("Illegal"))
|
|
1725
1725
|
return {
|
|
1726
1726
|
language: b,
|
|
1727
|
-
value: Oe(
|
|
1727
|
+
value: Oe(y),
|
|
1728
1728
|
illegal: !0,
|
|
1729
1729
|
relevance: 0,
|
|
1730
1730
|
_illegalBy: {
|
|
1731
|
-
message:
|
|
1731
|
+
message: w.message,
|
|
1732
1732
|
index: ie,
|
|
1733
|
-
context:
|
|
1734
|
-
mode:
|
|
1735
|
-
resultSoFar:
|
|
1733
|
+
context: y.slice(ie - 100, ie + 100),
|
|
1734
|
+
mode: w.mode,
|
|
1735
|
+
resultSoFar: Se
|
|
1736
1736
|
},
|
|
1737
1737
|
_emitter: z
|
|
1738
1738
|
};
|
|
1739
|
-
if (
|
|
1739
|
+
if (h)
|
|
1740
1740
|
return {
|
|
1741
1741
|
language: b,
|
|
1742
|
-
value: Oe(
|
|
1742
|
+
value: Oe(y),
|
|
1743
1743
|
illegal: !1,
|
|
1744
1744
|
relevance: 0,
|
|
1745
|
-
errorRaised:
|
|
1745
|
+
errorRaised: w,
|
|
1746
1746
|
_emitter: z,
|
|
1747
1747
|
_top: O
|
|
1748
1748
|
};
|
|
1749
|
-
throw
|
|
1749
|
+
throw w;
|
|
1750
1750
|
}
|
|
1751
1751
|
}
|
|
1752
1752
|
function f(b) {
|
|
1753
|
-
const
|
|
1753
|
+
const y = {
|
|
1754
1754
|
value: Oe(b),
|
|
1755
1755
|
illegal: !1,
|
|
1756
1756
|
relevance: 0,
|
|
1757
1757
|
_top: r,
|
|
1758
1758
|
_emitter: new i.__emitter(i)
|
|
1759
1759
|
};
|
|
1760
|
-
return
|
|
1760
|
+
return y._emitter.addText(b), y;
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1763
|
-
|
|
1764
|
-
const L = f(b), U =
|
|
1762
|
+
function g(b, y) {
|
|
1763
|
+
y = y || i.languages || Object.keys(e);
|
|
1764
|
+
const L = f(b), U = y.filter(C).filter($).map(
|
|
1765
1765
|
(Q) => c(Q, b, !1)
|
|
1766
1766
|
);
|
|
1767
1767
|
U.unshift(L);
|
|
1768
|
-
const
|
|
1768
|
+
const F = U.sort((Q, X) => {
|
|
1769
1769
|
if (Q.relevance !== X.relevance)
|
|
1770
1770
|
return X.relevance - Q.relevance;
|
|
1771
1771
|
if (Q.language && X.language) {
|
|
1772
|
-
if (
|
|
1772
|
+
if (C(Q.language).supersetOf === X.language)
|
|
1773
1773
|
return 1;
|
|
1774
|
-
if (
|
|
1774
|
+
if (C(X.language).supersetOf === Q.language)
|
|
1775
1775
|
return -1;
|
|
1776
1776
|
}
|
|
1777
1777
|
return 0;
|
|
1778
|
-
}), [W, Y] =
|
|
1778
|
+
}), [W, Y] = F, ve = W;
|
|
1779
1779
|
return ve.secondBest = Y, ve;
|
|
1780
1780
|
}
|
|
1781
|
-
function d(b,
|
|
1782
|
-
const U =
|
|
1781
|
+
function d(b, y, L) {
|
|
1782
|
+
const U = y && s[y] || L;
|
|
1783
1783
|
b.classList.add("hljs"), b.classList.add(`language-${U}`);
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1786
|
-
let
|
|
1785
|
+
function _(b) {
|
|
1786
|
+
let y = null;
|
|
1787
1787
|
const L = o(b);
|
|
1788
|
-
if (
|
|
1788
|
+
if (a(L))
|
|
1789
1789
|
return;
|
|
1790
1790
|
if (te(
|
|
1791
1791
|
"before:highlightElement",
|
|
@@ -1799,140 +1799,140 @@ https://github.com/highlightjs/highlight.js/issues/2277`), H = b, U = w), L ===
|
|
|
1799
1799
|
"One of your code blocks includes unescaped HTML.",
|
|
1800
1800
|
b.innerHTML
|
|
1801
1801
|
);
|
|
1802
|
-
|
|
1803
|
-
const U =
|
|
1804
|
-
b.innerHTML =
|
|
1805
|
-
language:
|
|
1802
|
+
y = b;
|
|
1803
|
+
const U = y.textContent, F = L ? l(U, { language: L, ignoreIllegals: !0 }) : g(U);
|
|
1804
|
+
b.innerHTML = F.value, b.dataset.highlighted = "yes", d(b, L, F.language), b.result = {
|
|
1805
|
+
language: F.language,
|
|
1806
1806
|
// TODO: remove with version 11.0
|
|
1807
|
-
re:
|
|
1808
|
-
relevance:
|
|
1809
|
-
},
|
|
1810
|
-
language:
|
|
1811
|
-
relevance:
|
|
1812
|
-
}), te("after:highlightElement", { el: b, result:
|
|
1807
|
+
re: F.relevance,
|
|
1808
|
+
relevance: F.relevance
|
|
1809
|
+
}, F.secondBest && (b.secondBest = {
|
|
1810
|
+
language: F.secondBest.language,
|
|
1811
|
+
relevance: F.secondBest.relevance
|
|
1812
|
+
}), te("after:highlightElement", { el: b, result: F, text: U });
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function p(b) {
|
|
1815
1815
|
i = Je(i, b);
|
|
1816
1816
|
}
|
|
1817
1817
|
const v = () => {
|
|
1818
|
-
|
|
1818
|
+
A(), ce("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
1819
1819
|
};
|
|
1820
|
-
function
|
|
1821
|
-
|
|
1820
|
+
function m() {
|
|
1821
|
+
A(), ce("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
1822
1822
|
}
|
|
1823
|
-
let
|
|
1824
|
-
function
|
|
1823
|
+
let E = !1;
|
|
1824
|
+
function A() {
|
|
1825
1825
|
if (document.readyState === "loading") {
|
|
1826
|
-
|
|
1826
|
+
E = !0;
|
|
1827
1827
|
return;
|
|
1828
1828
|
}
|
|
1829
|
-
document.querySelectorAll(i.cssSelector).forEach(
|
|
1829
|
+
document.querySelectorAll(i.cssSelector).forEach(_);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
|
|
1831
|
+
function S() {
|
|
1832
|
+
E && A();
|
|
1833
1833
|
}
|
|
1834
|
-
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded",
|
|
1835
|
-
function
|
|
1834
|
+
typeof window != "undefined" && window.addEventListener && window.addEventListener("DOMContentLoaded", S, !1);
|
|
1835
|
+
function D(b, y) {
|
|
1836
1836
|
let L = null;
|
|
1837
1837
|
try {
|
|
1838
|
-
L =
|
|
1838
|
+
L = y(n);
|
|
1839
1839
|
} catch (U) {
|
|
1840
|
-
if (se("Language definition for '{}' could not be registered.".replace("{}", b)),
|
|
1840
|
+
if (se("Language definition for '{}' could not be registered.".replace("{}", b)), h)
|
|
1841
1841
|
se(U);
|
|
1842
1842
|
else
|
|
1843
1843
|
throw U;
|
|
1844
1844
|
L = r;
|
|
1845
1845
|
}
|
|
1846
|
-
L.name || (L.name = b), e[b] = L, L.rawDefinition =
|
|
1846
|
+
L.name || (L.name = b), e[b] = L, L.rawDefinition = y.bind(null, n), L.aliases && I(L.aliases, { languageName: b });
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function N(b) {
|
|
1849
1849
|
delete e[b];
|
|
1850
|
-
for (const
|
|
1851
|
-
|
|
1850
|
+
for (const y of Object.keys(s))
|
|
1851
|
+
s[y] === b && delete s[y];
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function R() {
|
|
1854
1854
|
return Object.keys(e);
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return b = (b || "").toLowerCase(), e[b] || e[
|
|
1856
|
+
function C(b) {
|
|
1857
|
+
return b = (b || "").toLowerCase(), e[b] || e[s[b]];
|
|
1858
1858
|
}
|
|
1859
|
-
function I(b, { languageName:
|
|
1859
|
+
function I(b, { languageName: y }) {
|
|
1860
1860
|
typeof b == "string" && (b = [b]), b.forEach((L) => {
|
|
1861
|
-
|
|
1861
|
+
s[L.toLowerCase()] = y;
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
1864
|
function $(b) {
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1865
|
+
const y = C(b);
|
|
1866
|
+
return y && !y.disableAutodetect;
|
|
1867
1867
|
}
|
|
1868
1868
|
function B(b) {
|
|
1869
|
-
b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (
|
|
1869
|
+
b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (y) => {
|
|
1870
1870
|
b["before:highlightBlock"](
|
|
1871
|
-
Object.assign({ block:
|
|
1871
|
+
Object.assign({ block: y.el }, y)
|
|
1872
1872
|
);
|
|
1873
|
-
}), b["after:highlightBlock"] && !b["after:highlightElement"] && (b["after:highlightElement"] = (
|
|
1873
|
+
}), b["after:highlightBlock"] && !b["after:highlightElement"] && (b["after:highlightElement"] = (y) => {
|
|
1874
1874
|
b["after:highlightBlock"](
|
|
1875
|
-
Object.assign({ block:
|
|
1875
|
+
Object.assign({ block: y.el }, y)
|
|
1876
1876
|
);
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1879
|
+
function H(b) {
|
|
1880
1880
|
B(b), u.push(b);
|
|
1881
1881
|
}
|
|
1882
1882
|
function K(b) {
|
|
1883
|
-
const
|
|
1884
|
-
|
|
1883
|
+
const y = u.indexOf(b);
|
|
1884
|
+
y !== -1 && u.splice(y, 1);
|
|
1885
1885
|
}
|
|
1886
|
-
function te(b,
|
|
1886
|
+
function te(b, y) {
|
|
1887
1887
|
const L = b;
|
|
1888
1888
|
u.forEach(function(U) {
|
|
1889
|
-
U[L] && U[L](
|
|
1889
|
+
U[L] && U[L](y);
|
|
1890
1890
|
});
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1893
|
-
return
|
|
1892
|
+
function le(b) {
|
|
1893
|
+
return ce("10.7.0", "highlightBlock will be removed entirely in v12.0"), ce("10.7.0", "Please use highlightElement now."), _(b);
|
|
1894
1894
|
}
|
|
1895
1895
|
Object.assign(n, {
|
|
1896
1896
|
highlight: l,
|
|
1897
|
-
highlightAuto:
|
|
1898
|
-
highlightAll:
|
|
1899
|
-
highlightElement:
|
|
1897
|
+
highlightAuto: g,
|
|
1898
|
+
highlightAll: A,
|
|
1899
|
+
highlightElement: _,
|
|
1900
1900
|
// TODO: Remove with v12 API
|
|
1901
|
-
highlightBlock:
|
|
1902
|
-
configure:
|
|
1901
|
+
highlightBlock: le,
|
|
1902
|
+
configure: p,
|
|
1903
1903
|
initHighlighting: v,
|
|
1904
|
-
initHighlightingOnLoad:
|
|
1905
|
-
registerLanguage:
|
|
1906
|
-
unregisterLanguage:
|
|
1907
|
-
listLanguages:
|
|
1908
|
-
getLanguage:
|
|
1904
|
+
initHighlightingOnLoad: m,
|
|
1905
|
+
registerLanguage: D,
|
|
1906
|
+
unregisterLanguage: N,
|
|
1907
|
+
listLanguages: R,
|
|
1908
|
+
getLanguage: C,
|
|
1909
1909
|
registerAliases: I,
|
|
1910
1910
|
autoDetection: $,
|
|
1911
1911
|
inherit: Je,
|
|
1912
|
-
addPlugin:
|
|
1912
|
+
addPlugin: H,
|
|
1913
1913
|
removePlugin: K
|
|
1914
1914
|
}), n.debugMode = function() {
|
|
1915
|
-
|
|
1915
|
+
h = !1;
|
|
1916
1916
|
}, n.safeMode = function() {
|
|
1917
|
-
|
|
1917
|
+
h = !0;
|
|
1918
1918
|
}, n.versionString = Ot, n.regex = {
|
|
1919
1919
|
concat: ae,
|
|
1920
|
-
lookahead:
|
|
1920
|
+
lookahead: ln,
|
|
1921
1921
|
either: Ue,
|
|
1922
1922
|
optional: Zn,
|
|
1923
1923
|
anyNumberOfTimes: Vn
|
|
1924
1924
|
};
|
|
1925
|
-
for (const b in
|
|
1926
|
-
typeof
|
|
1927
|
-
return Object.assign(n,
|
|
1928
|
-
},
|
|
1929
|
-
|
|
1930
|
-
var Bt =
|
|
1931
|
-
|
|
1932
|
-
|
|
1925
|
+
for (const b in we)
|
|
1926
|
+
typeof we[b] == "object" && an(we[b]);
|
|
1927
|
+
return Object.assign(n, we), n;
|
|
1928
|
+
}, fe = bn({});
|
|
1929
|
+
fe.newInstance = () => bn({});
|
|
1930
|
+
var Bt = fe;
|
|
1931
|
+
fe.HighlightJS = fe;
|
|
1932
|
+
fe.default = fe;
|
|
1933
1933
|
const Z = /* @__PURE__ */ zn(Bt);
|
|
1934
1934
|
function $t(n) {
|
|
1935
|
-
const e = n.regex,
|
|
1935
|
+
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, h = {
|
|
1936
1936
|
className: "symbol",
|
|
1937
1937
|
begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
|
|
1938
1938
|
}, t = {
|
|
@@ -1947,7 +1947,7 @@ function $t(n) {
|
|
|
1947
1947
|
}, r = n.inherit(t, {
|
|
1948
1948
|
begin: /\(/,
|
|
1949
1949
|
end: /\)/
|
|
1950
|
-
}), i = n.inherit(n.APOS_STRING_MODE, { className: "string" }),
|
|
1950
|
+
}), i = n.inherit(n.APOS_STRING_MODE, { className: "string" }), a = n.inherit(n.QUOTE_STRING_MODE, { className: "string" }), o = {
|
|
1951
1951
|
endsWithParent: !0,
|
|
1952
1952
|
illegal: /</,
|
|
1953
1953
|
relevance: 0,
|
|
@@ -1968,12 +1968,12 @@ function $t(n) {
|
|
|
1968
1968
|
{
|
|
1969
1969
|
begin: /"/,
|
|
1970
1970
|
end: /"/,
|
|
1971
|
-
contains: [
|
|
1971
|
+
contains: [h]
|
|
1972
1972
|
},
|
|
1973
1973
|
{
|
|
1974
1974
|
begin: /'/,
|
|
1975
1975
|
end: /'/,
|
|
1976
|
-
contains: [
|
|
1976
|
+
contains: [h]
|
|
1977
1977
|
},
|
|
1978
1978
|
{ begin: /[^\s"'=<>`]+/ }
|
|
1979
1979
|
]
|
|
@@ -2006,7 +2006,7 @@ function $t(n) {
|
|
|
2006
2006
|
relevance: 10,
|
|
2007
2007
|
contains: [
|
|
2008
2008
|
t,
|
|
2009
|
-
|
|
2009
|
+
a,
|
|
2010
2010
|
i,
|
|
2011
2011
|
r,
|
|
2012
2012
|
{
|
|
@@ -2020,7 +2020,7 @@ function $t(n) {
|
|
|
2020
2020
|
contains: [
|
|
2021
2021
|
t,
|
|
2022
2022
|
r,
|
|
2023
|
-
|
|
2023
|
+
a,
|
|
2024
2024
|
i
|
|
2025
2025
|
]
|
|
2026
2026
|
}
|
|
@@ -2038,7 +2038,7 @@ function $t(n) {
|
|
|
2038
2038
|
end: /\]\]>/,
|
|
2039
2039
|
relevance: 10
|
|
2040
2040
|
},
|
|
2041
|
-
|
|
2041
|
+
h,
|
|
2042
2042
|
// xml processing instructions
|
|
2043
2043
|
{
|
|
2044
2044
|
className: "meta",
|
|
@@ -2048,7 +2048,7 @@ function $t(n) {
|
|
|
2048
2048
|
begin: /<\?xml/,
|
|
2049
2049
|
relevance: 10,
|
|
2050
2050
|
contains: [
|
|
2051
|
-
|
|
2051
|
+
a
|
|
2052
2052
|
]
|
|
2053
2053
|
},
|
|
2054
2054
|
{
|
|
@@ -2104,7 +2104,7 @@ function $t(n) {
|
|
|
2104
2104
|
begin: e.concat(
|
|
2105
2105
|
/</,
|
|
2106
2106
|
e.lookahead(e.concat(
|
|
2107
|
-
|
|
2107
|
+
s,
|
|
2108
2108
|
// <tag/>
|
|
2109
2109
|
// <tag>
|
|
2110
2110
|
// <tag ...
|
|
@@ -2115,7 +2115,7 @@ function $t(n) {
|
|
|
2115
2115
|
contains: [
|
|
2116
2116
|
{
|
|
2117
2117
|
className: "name",
|
|
2118
|
-
begin:
|
|
2118
|
+
begin: s,
|
|
2119
2119
|
relevance: 0,
|
|
2120
2120
|
starts: o
|
|
2121
2121
|
}
|
|
@@ -2127,14 +2127,14 @@ function $t(n) {
|
|
|
2127
2127
|
begin: e.concat(
|
|
2128
2128
|
/<\//,
|
|
2129
2129
|
e.lookahead(e.concat(
|
|
2130
|
-
|
|
2130
|
+
s,
|
|
2131
2131
|
/>/
|
|
2132
2132
|
))
|
|
2133
2133
|
),
|
|
2134
2134
|
contains: [
|
|
2135
2135
|
{
|
|
2136
2136
|
className: "name",
|
|
2137
|
-
begin:
|
|
2137
|
+
begin: s,
|
|
2138
2138
|
relevance: 0
|
|
2139
2139
|
},
|
|
2140
2140
|
{
|
|
@@ -2147,7 +2147,7 @@ function $t(n) {
|
|
|
2147
2147
|
]
|
|
2148
2148
|
};
|
|
2149
2149
|
}
|
|
2150
|
-
const
|
|
2150
|
+
const nn = "[A-Za-z$_][0-9A-Za-z$_]*", Ut = [
|
|
2151
2151
|
"as",
|
|
2152
2152
|
// for exports
|
|
2153
2153
|
"in",
|
|
@@ -2197,7 +2197,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", Ut = [
|
|
|
2197
2197
|
"undefined",
|
|
2198
2198
|
"NaN",
|
|
2199
2199
|
"Infinity"
|
|
2200
|
-
],
|
|
2200
|
+
], vn = [
|
|
2201
2201
|
// Fundamental objects
|
|
2202
2202
|
"Object",
|
|
2203
2203
|
"Function",
|
|
@@ -2247,7 +2247,7 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", Ut = [
|
|
|
2247
2247
|
"Intl",
|
|
2248
2248
|
// WebAssembly
|
|
2249
2249
|
"WebAssembly"
|
|
2250
|
-
],
|
|
2250
|
+
], mn = [
|
|
2251
2251
|
"Error",
|
|
2252
2252
|
"EvalError",
|
|
2253
2253
|
"InternalError",
|
|
@@ -2286,16 +2286,16 @@ const en = "[A-Za-z$_][0-9A-Za-z$_]*", Ut = [
|
|
|
2286
2286
|
"module",
|
|
2287
2287
|
"global"
|
|
2288
2288
|
// Node.js
|
|
2289
|
-
],
|
|
2289
|
+
], Ft = [].concat(
|
|
2290
2290
|
En,
|
|
2291
|
-
|
|
2292
|
-
|
|
2291
|
+
vn,
|
|
2292
|
+
mn
|
|
2293
2293
|
);
|
|
2294
|
-
function
|
|
2295
|
-
const e = n.regex,
|
|
2296
|
-
const U = "</" +
|
|
2297
|
-
return
|
|
2298
|
-
}, u =
|
|
2294
|
+
function Ht(n) {
|
|
2295
|
+
const e = n.regex, s = (y, { after: L }) => {
|
|
2296
|
+
const U = "</" + y[0].slice(1);
|
|
2297
|
+
return y.input.indexOf(U, L) !== -1;
|
|
2298
|
+
}, u = nn, h = {
|
|
2299
2299
|
begin: "<>",
|
|
2300
2300
|
end: "</>"
|
|
2301
2301
|
}, t = /<[A-Za-z0-9\\._:-]+\s*\/>/, r = {
|
|
@@ -2305,22 +2305,22 @@ function Ft(n) {
|
|
|
2305
2305
|
* @param {RegExpMatchArray} match
|
|
2306
2306
|
* @param {CallbackResponse} response
|
|
2307
2307
|
*/
|
|
2308
|
-
isTrulyOpeningTag: (
|
|
2309
|
-
const U =
|
|
2308
|
+
isTrulyOpeningTag: (y, L) => {
|
|
2309
|
+
const U = y[0].length + y.index, F = y.input[U];
|
|
2310
2310
|
if (
|
|
2311
2311
|
// HTML should not include another raw `<` inside a tag
|
|
2312
2312
|
// nested type?
|
|
2313
2313
|
// `<Array<Array<number>>`, etc.
|
|
2314
|
-
|
|
2314
|
+
F === "<" || // the , gives away that this is not HTML
|
|
2315
2315
|
// `<T, A extends keyof T, V>`
|
|
2316
|
-
|
|
2316
|
+
F === ","
|
|
2317
2317
|
) {
|
|
2318
2318
|
L.ignoreMatch();
|
|
2319
2319
|
return;
|
|
2320
2320
|
}
|
|
2321
|
-
|
|
2321
|
+
F === ">" && (s(y, { after: U }) || L.ignoreMatch());
|
|
2322
2322
|
let W;
|
|
2323
|
-
const Y =
|
|
2323
|
+
const Y = y.input.substring(U);
|
|
2324
2324
|
if (W = Y.match(/^\s*=/)) {
|
|
2325
2325
|
L.ignoreMatch();
|
|
2326
2326
|
return;
|
|
@@ -2331,16 +2331,16 @@ function Ft(n) {
|
|
|
2331
2331
|
}
|
|
2332
2332
|
}
|
|
2333
2333
|
}, i = {
|
|
2334
|
-
$pattern:
|
|
2334
|
+
$pattern: nn,
|
|
2335
2335
|
keyword: Ut,
|
|
2336
2336
|
literal: Pt,
|
|
2337
|
-
built_in:
|
|
2337
|
+
built_in: Ft,
|
|
2338
2338
|
"variable.language": xt
|
|
2339
|
-
},
|
|
2339
|
+
}, a = "[0-9](_?[0-9])*", o = `\\.(${a})`, l = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", c = {
|
|
2340
2340
|
className: "number",
|
|
2341
2341
|
variants: [
|
|
2342
2342
|
// DecimalLiteral
|
|
2343
|
-
{ begin: `(\\b(${l})((${o})|\\.)?|(${o}))[eE][+-]?(${
|
|
2343
|
+
{ begin: `(\\b(${l})((${o})|\\.)?|(${o}))[eE][+-]?(${a})\\b` },
|
|
2344
2344
|
{ begin: `\\b(${l})\\b((${o})\\b|\\.)?|(${o})\\b` },
|
|
2345
2345
|
// DecimalBigIntegerLiteral
|
|
2346
2346
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
@@ -2360,7 +2360,7 @@ function Ft(n) {
|
|
|
2360
2360
|
keywords: i,
|
|
2361
2361
|
contains: []
|
|
2362
2362
|
// defined later
|
|
2363
|
-
},
|
|
2363
|
+
}, g = {
|
|
2364
2364
|
begin: "html`",
|
|
2365
2365
|
end: "",
|
|
2366
2366
|
starts: {
|
|
@@ -2384,7 +2384,7 @@ function Ft(n) {
|
|
|
2384
2384
|
],
|
|
2385
2385
|
subLanguage: "css"
|
|
2386
2386
|
}
|
|
2387
|
-
},
|
|
2387
|
+
}, _ = {
|
|
2388
2388
|
begin: "gql`",
|
|
2389
2389
|
end: "",
|
|
2390
2390
|
starts: {
|
|
@@ -2396,7 +2396,7 @@ function Ft(n) {
|
|
|
2396
2396
|
],
|
|
2397
2397
|
subLanguage: "graphql"
|
|
2398
2398
|
}
|
|
2399
|
-
},
|
|
2399
|
+
}, p = {
|
|
2400
2400
|
className: "string",
|
|
2401
2401
|
begin: "`",
|
|
2402
2402
|
end: "`",
|
|
@@ -2404,7 +2404,7 @@ function Ft(n) {
|
|
|
2404
2404
|
n.BACKSLASH_ESCAPE,
|
|
2405
2405
|
f
|
|
2406
2406
|
]
|
|
2407
|
-
},
|
|
2407
|
+
}, m = {
|
|
2408
2408
|
className: "comment",
|
|
2409
2409
|
variants: [
|
|
2410
2410
|
n.COMMENT(
|
|
@@ -2449,13 +2449,13 @@ function Ft(n) {
|
|
|
2449
2449
|
n.C_BLOCK_COMMENT_MODE,
|
|
2450
2450
|
n.C_LINE_COMMENT_MODE
|
|
2451
2451
|
]
|
|
2452
|
-
},
|
|
2452
|
+
}, E = [
|
|
2453
2453
|
n.APOS_STRING_MODE,
|
|
2454
2454
|
n.QUOTE_STRING_MODE,
|
|
2455
|
-
|
|
2455
|
+
g,
|
|
2456
2456
|
d,
|
|
2457
|
-
p,
|
|
2458
2457
|
_,
|
|
2458
|
+
p,
|
|
2459
2459
|
// Skip numbers when they are part of a variable name
|
|
2460
2460
|
{ match: /\$\d+/ },
|
|
2461
2461
|
c
|
|
@@ -2463,7 +2463,7 @@ function Ft(n) {
|
|
|
2463
2463
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
2464
2464
|
// hljs.REGEXP_MODE
|
|
2465
2465
|
];
|
|
2466
|
-
f.contains =
|
|
2466
|
+
f.contains = E.concat({
|
|
2467
2467
|
// we need to pair up {} inside our subst to prevent
|
|
2468
2468
|
// it from ending too early by matching another }
|
|
2469
2469
|
begin: /\{/,
|
|
@@ -2471,25 +2471,25 @@ function Ft(n) {
|
|
|
2471
2471
|
keywords: i,
|
|
2472
2472
|
contains: [
|
|
2473
2473
|
"self"
|
|
2474
|
-
].concat(
|
|
2474
|
+
].concat(E)
|
|
2475
2475
|
});
|
|
2476
|
-
const
|
|
2476
|
+
const A = [].concat(m, f.contains), S = A.concat([
|
|
2477
2477
|
// eat recursive parens in sub expressions
|
|
2478
2478
|
{
|
|
2479
2479
|
begin: /\(/,
|
|
2480
2480
|
end: /\)/,
|
|
2481
2481
|
keywords: i,
|
|
2482
|
-
contains: ["self"].concat(
|
|
2482
|
+
contains: ["self"].concat(A)
|
|
2483
2483
|
}
|
|
2484
|
-
]),
|
|
2484
|
+
]), D = {
|
|
2485
2485
|
className: "params",
|
|
2486
2486
|
begin: /\(/,
|
|
2487
2487
|
end: /\)/,
|
|
2488
2488
|
excludeBegin: !0,
|
|
2489
2489
|
excludeEnd: !0,
|
|
2490
2490
|
keywords: i,
|
|
2491
|
-
contains:
|
|
2492
|
-
},
|
|
2491
|
+
contains: S
|
|
2492
|
+
}, N = {
|
|
2493
2493
|
variants: [
|
|
2494
2494
|
// class Car extends vehicle
|
|
2495
2495
|
{
|
|
@@ -2522,7 +2522,7 @@ function Ft(n) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
2524
|
]
|
|
2525
|
-
},
|
|
2525
|
+
}, R = {
|
|
2526
2526
|
relevance: 0,
|
|
2527
2527
|
match: e.either(
|
|
2528
2528
|
// Hard coded exceptions
|
|
@@ -2542,11 +2542,11 @@ function Ft(n) {
|
|
|
2542
2542
|
keywords: {
|
|
2543
2543
|
_: [
|
|
2544
2544
|
// se we still get relevance credit for JS library classes
|
|
2545
|
-
...
|
|
2546
|
-
...
|
|
2545
|
+
...vn,
|
|
2546
|
+
...mn
|
|
2547
2547
|
]
|
|
2548
2548
|
}
|
|
2549
|
-
},
|
|
2549
|
+
}, C = {
|
|
2550
2550
|
label: "use_strict",
|
|
2551
2551
|
className: "meta",
|
|
2552
2552
|
relevance: 10,
|
|
@@ -2574,17 +2574,17 @@ function Ft(n) {
|
|
|
2574
2574
|
3: "title.function"
|
|
2575
2575
|
},
|
|
2576
2576
|
label: "func.def",
|
|
2577
|
-
contains: [
|
|
2577
|
+
contains: [D],
|
|
2578
2578
|
illegal: /%/
|
|
2579
2579
|
}, $ = {
|
|
2580
2580
|
relevance: 0,
|
|
2581
2581
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
2582
2582
|
className: "variable.constant"
|
|
2583
2583
|
};
|
|
2584
|
-
function B(
|
|
2585
|
-
return e.concat("(?!",
|
|
2584
|
+
function B(y) {
|
|
2585
|
+
return e.concat("(?!", y.join("|"), ")");
|
|
2586
2586
|
}
|
|
2587
|
-
const
|
|
2587
|
+
const H = {
|
|
2588
2588
|
match: e.concat(
|
|
2589
2589
|
/\b/,
|
|
2590
2590
|
B([
|
|
@@ -2622,9 +2622,9 @@ function Ft(n) {
|
|
|
2622
2622
|
// eat to avoid empty params
|
|
2623
2623
|
begin: /\(\)/
|
|
2624
2624
|
},
|
|
2625
|
-
|
|
2625
|
+
D
|
|
2626
2626
|
]
|
|
2627
|
-
},
|
|
2627
|
+
}, le = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + n.UNDERSCORE_IDENT_RE + ")\\s*=>", b = {
|
|
2628
2628
|
match: [
|
|
2629
2629
|
/const|var|let/,
|
|
2630
2630
|
/\s+/,
|
|
@@ -2633,7 +2633,7 @@ function Ft(n) {
|
|
|
2633
2633
|
/=\s*/,
|
|
2634
2634
|
/(async\s*)?/,
|
|
2635
2635
|
// async is optional
|
|
2636
|
-
e.lookahead(
|
|
2636
|
+
e.lookahead(le)
|
|
2637
2637
|
],
|
|
2638
2638
|
keywords: "async",
|
|
2639
2639
|
className: {
|
|
@@ -2641,7 +2641,7 @@ function Ft(n) {
|
|
|
2641
2641
|
3: "title.function"
|
|
2642
2642
|
},
|
|
2643
2643
|
contains: [
|
|
2644
|
-
|
|
2644
|
+
D
|
|
2645
2645
|
]
|
|
2646
2646
|
};
|
|
2647
2647
|
return {
|
|
@@ -2649,7 +2649,7 @@ function Ft(n) {
|
|
|
2649
2649
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
2650
2650
|
keywords: i,
|
|
2651
2651
|
// this will be extended by TypeScript
|
|
2652
|
-
exports: { PARAMS_CONTAINS:
|
|
2652
|
+
exports: { PARAMS_CONTAINS: S, CLASS_REFERENCE: R },
|
|
2653
2653
|
illegal: /#(?![$_A-z])/,
|
|
2654
2654
|
contains: [
|
|
2655
2655
|
n.SHEBANG({
|
|
@@ -2657,18 +2657,18 @@ function Ft(n) {
|
|
|
2657
2657
|
binary: "node",
|
|
2658
2658
|
relevance: 5
|
|
2659
2659
|
}),
|
|
2660
|
-
|
|
2660
|
+
C,
|
|
2661
2661
|
n.APOS_STRING_MODE,
|
|
2662
2662
|
n.QUOTE_STRING_MODE,
|
|
2663
|
-
|
|
2663
|
+
g,
|
|
2664
2664
|
d,
|
|
2665
|
-
p,
|
|
2666
2665
|
_,
|
|
2667
|
-
|
|
2666
|
+
p,
|
|
2667
|
+
m,
|
|
2668
2668
|
// Skip numbers when they are part of a variable name
|
|
2669
2669
|
{ match: /\$\d+/ },
|
|
2670
2670
|
c,
|
|
2671
|
-
|
|
2671
|
+
R,
|
|
2672
2672
|
{
|
|
2673
2673
|
className: "attr",
|
|
2674
2674
|
begin: u + e.lookahead(":"),
|
|
@@ -2681,14 +2681,14 @@ function Ft(n) {
|
|
|
2681
2681
|
keywords: "return throw case",
|
|
2682
2682
|
relevance: 0,
|
|
2683
2683
|
contains: [
|
|
2684
|
-
|
|
2684
|
+
m,
|
|
2685
2685
|
n.REGEXP_MODE,
|
|
2686
2686
|
{
|
|
2687
2687
|
className: "function",
|
|
2688
2688
|
// we have to count the parens to make sure we actually have the
|
|
2689
2689
|
// correct bounding ( ) before the =>. There could be any number of
|
|
2690
2690
|
// sub-expressions inside also surrounded by parens.
|
|
2691
|
-
begin:
|
|
2691
|
+
begin: le,
|
|
2692
2692
|
returnBegin: !0,
|
|
2693
2693
|
end: "\\s*=>",
|
|
2694
2694
|
contains: [
|
|
@@ -2710,7 +2710,7 @@ function Ft(n) {
|
|
|
2710
2710
|
excludeBegin: !0,
|
|
2711
2711
|
excludeEnd: !0,
|
|
2712
2712
|
keywords: i,
|
|
2713
|
-
contains:
|
|
2713
|
+
contains: S
|
|
2714
2714
|
}
|
|
2715
2715
|
]
|
|
2716
2716
|
}
|
|
@@ -2728,7 +2728,7 @@ function Ft(n) {
|
|
|
2728
2728
|
{
|
|
2729
2729
|
// JSX
|
|
2730
2730
|
variants: [
|
|
2731
|
-
{ begin:
|
|
2731
|
+
{ begin: h.begin, end: h.end },
|
|
2732
2732
|
{ match: t },
|
|
2733
2733
|
{
|
|
2734
2734
|
begin: r.begin,
|
|
@@ -2765,7 +2765,7 @@ function Ft(n) {
|
|
|
2765
2765
|
returnBegin: !0,
|
|
2766
2766
|
label: "func.def",
|
|
2767
2767
|
contains: [
|
|
2768
|
-
|
|
2768
|
+
D,
|
|
2769
2769
|
n.inherit(n.TITLE_MODE, { begin: u, className: "title.function" })
|
|
2770
2770
|
]
|
|
2771
2771
|
},
|
|
@@ -2785,11 +2785,11 @@ function Ft(n) {
|
|
|
2785
2785
|
{
|
|
2786
2786
|
match: [/\bconstructor(?=\s*\()/],
|
|
2787
2787
|
className: { 1: "title.function" },
|
|
2788
|
-
contains: [
|
|
2788
|
+
contains: [D]
|
|
2789
2789
|
},
|
|
2790
|
-
|
|
2790
|
+
H,
|
|
2791
2791
|
$,
|
|
2792
|
-
|
|
2792
|
+
N,
|
|
2793
2793
|
te,
|
|
2794
2794
|
{
|
|
2795
2795
|
match: /\$[(.]/
|
|
@@ -2803,7 +2803,7 @@ function zt(n) {
|
|
|
2803
2803
|
className: "attr",
|
|
2804
2804
|
begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
2805
2805
|
relevance: 1.01
|
|
2806
|
-
},
|
|
2806
|
+
}, s = {
|
|
2807
2807
|
match: /[{}[\],:]/,
|
|
2808
2808
|
className: "punctuation",
|
|
2809
2809
|
relevance: 0
|
|
@@ -2811,7 +2811,7 @@ function zt(n) {
|
|
|
2811
2811
|
"true",
|
|
2812
2812
|
"false",
|
|
2813
2813
|
"null"
|
|
2814
|
-
],
|
|
2814
|
+
], h = {
|
|
2815
2815
|
scope: "literal",
|
|
2816
2816
|
beginKeywords: u.join(" ")
|
|
2817
2817
|
};
|
|
@@ -2822,9 +2822,9 @@ function zt(n) {
|
|
|
2822
2822
|
},
|
|
2823
2823
|
contains: [
|
|
2824
2824
|
e,
|
|
2825
|
-
|
|
2825
|
+
s,
|
|
2826
2826
|
n.QUOTE_STRING_MODE,
|
|
2827
|
-
|
|
2827
|
+
h,
|
|
2828
2828
|
n.C_NUMBER_MODE,
|
|
2829
2829
|
n.C_LINE_COMMENT_MODE,
|
|
2830
2830
|
n.C_BLOCK_COMMENT_MODE
|
|
@@ -2833,7 +2833,7 @@ function zt(n) {
|
|
|
2833
2833
|
};
|
|
2834
2834
|
}
|
|
2835
2835
|
function Gt(n) {
|
|
2836
|
-
const e = "true false yes no null",
|
|
2836
|
+
const e = "true false yes no null", s = "[\\w#;/?:@&=+$,.~*'()[\\]]+", u = {
|
|
2837
2837
|
className: "attr",
|
|
2838
2838
|
variants: [
|
|
2839
2839
|
{ begin: "\\w[\\w :\\/.-]*:(?=[ ]|$)" },
|
|
@@ -2846,7 +2846,7 @@ function Gt(n) {
|
|
|
2846
2846
|
begin: "'\\w[\\w :\\/.-]*':(?=[ ]|$)"
|
|
2847
2847
|
}
|
|
2848
2848
|
]
|
|
2849
|
-
},
|
|
2849
|
+
}, h = {
|
|
2850
2850
|
className: "template-variable",
|
|
2851
2851
|
variants: [
|
|
2852
2852
|
{
|
|
@@ -2876,7 +2876,7 @@ function Gt(n) {
|
|
|
2876
2876
|
],
|
|
2877
2877
|
contains: [
|
|
2878
2878
|
n.BACKSLASH_ESCAPE,
|
|
2879
|
-
|
|
2879
|
+
h
|
|
2880
2880
|
]
|
|
2881
2881
|
}, r = n.inherit(t, { variants: [
|
|
2882
2882
|
{
|
|
@@ -2888,16 +2888,16 @@ function Gt(n) {
|
|
|
2888
2888
|
end: /"/
|
|
2889
2889
|
},
|
|
2890
2890
|
{ begin: /[^\s,{}[\]]+/ }
|
|
2891
|
-
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}",
|
|
2891
|
+
] }), i = "[0-9]{4}(-[0-9][0-9]){0,2}", a = "([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?", o = "(\\.[0-9]*)?", l = "([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?", c = {
|
|
2892
2892
|
className: "number",
|
|
2893
|
-
begin: "\\b" + i +
|
|
2893
|
+
begin: "\\b" + i + a + o + l + "\\b"
|
|
2894
2894
|
}, f = {
|
|
2895
2895
|
end: ",",
|
|
2896
2896
|
endsWithParent: !0,
|
|
2897
2897
|
excludeEnd: !0,
|
|
2898
2898
|
keywords: e,
|
|
2899
2899
|
relevance: 0
|
|
2900
|
-
},
|
|
2900
|
+
}, g = {
|
|
2901
2901
|
begin: /\{/,
|
|
2902
2902
|
end: /\}/,
|
|
2903
2903
|
contains: [f],
|
|
@@ -2909,7 +2909,7 @@ function Gt(n) {
|
|
|
2909
2909
|
contains: [f],
|
|
2910
2910
|
illegal: "\\n",
|
|
2911
2911
|
relevance: 0
|
|
2912
|
-
},
|
|
2912
|
+
}, _ = [
|
|
2913
2913
|
u,
|
|
2914
2914
|
{
|
|
2915
2915
|
className: "meta",
|
|
@@ -2937,23 +2937,23 @@ function Gt(n) {
|
|
|
2937
2937
|
{
|
|
2938
2938
|
// named tags
|
|
2939
2939
|
className: "type",
|
|
2940
|
-
begin: "!\\w+!" +
|
|
2940
|
+
begin: "!\\w+!" + s
|
|
2941
2941
|
},
|
|
2942
2942
|
// https://yaml.org/spec/1.2/spec.html#id2784064
|
|
2943
2943
|
{
|
|
2944
2944
|
// verbatim tags
|
|
2945
2945
|
className: "type",
|
|
2946
|
-
begin: "!<" +
|
|
2946
|
+
begin: "!<" + s + ">"
|
|
2947
2947
|
},
|
|
2948
2948
|
{
|
|
2949
2949
|
// primary tags
|
|
2950
2950
|
className: "type",
|
|
2951
|
-
begin: "!" +
|
|
2951
|
+
begin: "!" + s
|
|
2952
2952
|
},
|
|
2953
2953
|
{
|
|
2954
2954
|
// secondary tags
|
|
2955
2955
|
className: "type",
|
|
2956
|
-
begin: "!!" +
|
|
2956
|
+
begin: "!!" + s
|
|
2957
2957
|
},
|
|
2958
2958
|
{
|
|
2959
2959
|
// fragment id &ref
|
|
@@ -2985,15 +2985,15 @@ function Gt(n) {
|
|
|
2985
2985
|
begin: n.C_NUMBER_RE + "\\b",
|
|
2986
2986
|
relevance: 0
|
|
2987
2987
|
},
|
|
2988
|
-
|
|
2988
|
+
g,
|
|
2989
2989
|
d,
|
|
2990
2990
|
t
|
|
2991
|
-
],
|
|
2992
|
-
return
|
|
2991
|
+
], p = [..._];
|
|
2992
|
+
return p.pop(), p.push(r), f.contains = p, {
|
|
2993
2993
|
name: "YAML",
|
|
2994
2994
|
case_insensitive: !0,
|
|
2995
2995
|
aliases: ["yml"],
|
|
2996
|
-
contains:
|
|
2996
|
+
contains: _
|
|
2997
2997
|
};
|
|
2998
2998
|
}
|
|
2999
2999
|
function Kt(n) {
|
|
@@ -3007,7 +3007,7 @@ function Kt(n) {
|
|
|
3007
3007
|
};
|
|
3008
3008
|
}
|
|
3009
3009
|
function Wt(n) {
|
|
3010
|
-
const e = n.regex,
|
|
3010
|
+
const e = n.regex, s = /[\p{XID_Start}_]\p{XID_Continue}*/u, u = [
|
|
3011
3011
|
"and",
|
|
3012
3012
|
"as",
|
|
3013
3013
|
"assert",
|
|
@@ -3139,7 +3139,7 @@ function Wt(n) {
|
|
|
3139
3139
|
"Type",
|
|
3140
3140
|
"Union"
|
|
3141
3141
|
]
|
|
3142
|
-
},
|
|
3142
|
+
}, a = {
|
|
3143
3143
|
className: "meta",
|
|
3144
3144
|
begin: /^(>>>|\.\.\.) /
|
|
3145
3145
|
}, o = {
|
|
@@ -3160,7 +3160,7 @@ function Wt(n) {
|
|
|
3160
3160
|
end: /'''/,
|
|
3161
3161
|
contains: [
|
|
3162
3162
|
n.BACKSLASH_ESCAPE,
|
|
3163
|
-
|
|
3163
|
+
a
|
|
3164
3164
|
],
|
|
3165
3165
|
relevance: 10
|
|
3166
3166
|
},
|
|
@@ -3169,7 +3169,7 @@ function Wt(n) {
|
|
|
3169
3169
|
end: /"""/,
|
|
3170
3170
|
contains: [
|
|
3171
3171
|
n.BACKSLASH_ESCAPE,
|
|
3172
|
-
|
|
3172
|
+
a
|
|
3173
3173
|
],
|
|
3174
3174
|
relevance: 10
|
|
3175
3175
|
},
|
|
@@ -3178,7 +3178,7 @@ function Wt(n) {
|
|
|
3178
3178
|
end: /'''/,
|
|
3179
3179
|
contains: [
|
|
3180
3180
|
n.BACKSLASH_ESCAPE,
|
|
3181
|
-
|
|
3181
|
+
a,
|
|
3182
3182
|
l,
|
|
3183
3183
|
o
|
|
3184
3184
|
]
|
|
@@ -3188,7 +3188,7 @@ function Wt(n) {
|
|
|
3188
3188
|
end: /"""/,
|
|
3189
3189
|
contains: [
|
|
3190
3190
|
n.BACKSLASH_ESCAPE,
|
|
3191
|
-
|
|
3191
|
+
a,
|
|
3192
3192
|
l,
|
|
3193
3193
|
o
|
|
3194
3194
|
]
|
|
@@ -3232,7 +3232,7 @@ function Wt(n) {
|
|
|
3232
3232
|
n.APOS_STRING_MODE,
|
|
3233
3233
|
n.QUOTE_STRING_MODE
|
|
3234
3234
|
]
|
|
3235
|
-
}, f = "[0-9](_?[0-9])*",
|
|
3235
|
+
}, f = "[0-9](_?[0-9])*", g = `(\\b(${f}))?\\.(${f})|\\b(${f})\\.`, d = `\\b|${u.join("|")}`, _ = {
|
|
3236
3236
|
className: "number",
|
|
3237
3237
|
relevance: 0,
|
|
3238
3238
|
variants: [
|
|
@@ -3247,10 +3247,10 @@ function Wt(n) {
|
|
|
3247
3247
|
// because both MUST contain a decimal point and so cannot be confused with
|
|
3248
3248
|
// the interior part of an identifier
|
|
3249
3249
|
{
|
|
3250
|
-
begin: `(\\b(${f})|(${
|
|
3250
|
+
begin: `(\\b(${f})|(${g}))[eE][+-]?(${f})[jJ]?(?=${d})`
|
|
3251
3251
|
},
|
|
3252
3252
|
{
|
|
3253
|
-
begin: `(${
|
|
3253
|
+
begin: `(${g})[jJ]?`
|
|
3254
3254
|
},
|
|
3255
3255
|
// decinteger, bininteger, octinteger, hexinteger
|
|
3256
3256
|
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
@@ -3276,7 +3276,7 @@ function Wt(n) {
|
|
|
3276
3276
|
begin: `\\b(${f})[jJ](?=${d})`
|
|
3277
3277
|
}
|
|
3278
3278
|
]
|
|
3279
|
-
},
|
|
3279
|
+
}, p = {
|
|
3280
3280
|
className: "comment",
|
|
3281
3281
|
begin: e.lookahead(/# type:/),
|
|
3282
3282
|
end: /$/,
|
|
@@ -3310,8 +3310,8 @@ function Wt(n) {
|
|
|
3310
3310
|
keywords: i,
|
|
3311
3311
|
contains: [
|
|
3312
3312
|
"self",
|
|
3313
|
-
|
|
3314
|
-
|
|
3313
|
+
a,
|
|
3314
|
+
_,
|
|
3315
3315
|
c,
|
|
3316
3316
|
n.HASH_COMMENT_MODE
|
|
3317
3317
|
]
|
|
@@ -3320,8 +3320,8 @@ function Wt(n) {
|
|
|
3320
3320
|
};
|
|
3321
3321
|
return o.contains = [
|
|
3322
3322
|
c,
|
|
3323
|
-
|
|
3324
|
-
|
|
3323
|
+
_,
|
|
3324
|
+
a
|
|
3325
3325
|
], {
|
|
3326
3326
|
name: "Python",
|
|
3327
3327
|
aliases: [
|
|
@@ -3333,8 +3333,8 @@ function Wt(n) {
|
|
|
3333
3333
|
keywords: i,
|
|
3334
3334
|
illegal: /(<\/|\?)|=>/,
|
|
3335
3335
|
contains: [
|
|
3336
|
-
|
|
3337
|
-
|
|
3336
|
+
a,
|
|
3337
|
+
_,
|
|
3338
3338
|
{
|
|
3339
3339
|
// very common convention
|
|
3340
3340
|
begin: /\bself\b/
|
|
@@ -3346,13 +3346,13 @@ function Wt(n) {
|
|
|
3346
3346
|
relevance: 0
|
|
3347
3347
|
},
|
|
3348
3348
|
c,
|
|
3349
|
-
|
|
3349
|
+
p,
|
|
3350
3350
|
n.HASH_COMMENT_MODE,
|
|
3351
3351
|
{
|
|
3352
3352
|
match: [
|
|
3353
3353
|
/\bdef/,
|
|
3354
3354
|
/\s+/,
|
|
3355
|
-
|
|
3355
|
+
s
|
|
3356
3356
|
],
|
|
3357
3357
|
scope: {
|
|
3358
3358
|
1: "keyword",
|
|
@@ -3366,10 +3366,10 @@ function Wt(n) {
|
|
|
3366
3366
|
match: [
|
|
3367
3367
|
/\bclass/,
|
|
3368
3368
|
/\s+/,
|
|
3369
|
-
|
|
3369
|
+
s,
|
|
3370
3370
|
/\s*/,
|
|
3371
3371
|
/\(\s*/,
|
|
3372
|
-
|
|
3372
|
+
s,
|
|
3373
3373
|
/\s*\)/
|
|
3374
3374
|
]
|
|
3375
3375
|
},
|
|
@@ -3377,7 +3377,7 @@ function Wt(n) {
|
|
|
3377
3377
|
match: [
|
|
3378
3378
|
/\bclass/,
|
|
3379
3379
|
/\s+/,
|
|
3380
|
-
|
|
3380
|
+
s
|
|
3381
3381
|
]
|
|
3382
3382
|
}
|
|
3383
3383
|
],
|
|
@@ -3392,7 +3392,7 @@ function Wt(n) {
|
|
|
3392
3392
|
begin: /^[\t ]*@/,
|
|
3393
3393
|
end: /(?=#)|$/,
|
|
3394
3394
|
contains: [
|
|
3395
|
-
|
|
3395
|
+
_,
|
|
3396
3396
|
v,
|
|
3397
3397
|
c
|
|
3398
3398
|
]
|
|
@@ -3400,22 +3400,22 @@ function Wt(n) {
|
|
|
3400
3400
|
]
|
|
3401
3401
|
};
|
|
3402
3402
|
}
|
|
3403
|
-
var
|
|
3403
|
+
var ue = "[0-9](_*[0-9])*", ye = `\\.(${ue})`, Ae = "[0-9a-fA-F](_*[0-9a-fA-F])*", tn = {
|
|
3404
3404
|
className: "number",
|
|
3405
3405
|
variants: [
|
|
3406
3406
|
// DecimalFloatingPointLiteral
|
|
3407
3407
|
// including ExponentPart
|
|
3408
|
-
{ begin: `(\\b(${
|
|
3408
|
+
{ begin: `(\\b(${ue})((${ye})|\\.)?|(${ye}))[eE][+-]?(${ue})[fFdD]?\\b` },
|
|
3409
3409
|
// excluding ExponentPart
|
|
3410
|
-
{ begin: `\\b(${
|
|
3411
|
-
{ begin: `(${
|
|
3412
|
-
{ begin: `\\b(${
|
|
3410
|
+
{ begin: `\\b(${ue})((${ye})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
|
|
3411
|
+
{ begin: `(${ye})[fFdD]?\\b` },
|
|
3412
|
+
{ begin: `\\b(${ue})[fFdD]\\b` },
|
|
3413
3413
|
// HexadecimalFloatingPointLiteral
|
|
3414
|
-
{ begin: `\\b0[xX]((${
|
|
3414
|
+
{ begin: `\\b0[xX]((${Ae})\\.?|(${Ae})?\\.(${Ae}))[pP][+-]?(${ue})[fFdD]?\\b` },
|
|
3415
3415
|
// DecimalIntegerLiteral
|
|
3416
3416
|
{ begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
|
|
3417
3417
|
// HexIntegerLiteral
|
|
3418
|
-
{ begin: `\\b0[xX](${
|
|
3418
|
+
{ begin: `\\b0[xX](${Ae})[lL]?\\b` },
|
|
3419
3419
|
// OctalIntegerLiteral
|
|
3420
3420
|
{ begin: "\\b0(_*[0-7])*[lL]?\\b" },
|
|
3421
3421
|
// BinaryIntegerLiteral
|
|
@@ -3423,11 +3423,11 @@ var ce = "[0-9](_*[0-9])*", we = `\\.(${ce})`, Ne = "[0-9a-fA-F](_*[0-9a-fA-F])*
|
|
|
3423
3423
|
],
|
|
3424
3424
|
relevance: 0
|
|
3425
3425
|
};
|
|
3426
|
-
function
|
|
3427
|
-
return
|
|
3426
|
+
function wn(n, e, s) {
|
|
3427
|
+
return s === -1 ? "" : n.replace(e, (u) => wn(n, e, s - 1));
|
|
3428
3428
|
}
|
|
3429
3429
|
function Qt(n) {
|
|
3430
|
-
const e = n.regex,
|
|
3430
|
+
const e = n.regex, s = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", u = s + wn("(?:<" + s + "~~~(?:\\s*,\\s*" + s + "~~~)*>)?", /~~~/g, 2), a = {
|
|
3431
3431
|
keyword: [
|
|
3432
3432
|
"synchronized",
|
|
3433
3433
|
"abstract",
|
|
@@ -3493,7 +3493,7 @@ function Qt(n) {
|
|
|
3493
3493
|
]
|
|
3494
3494
|
}, o = {
|
|
3495
3495
|
className: "meta",
|
|
3496
|
-
begin: "@" +
|
|
3496
|
+
begin: "@" + s,
|
|
3497
3497
|
contains: [
|
|
3498
3498
|
{
|
|
3499
3499
|
begin: /\(/,
|
|
@@ -3506,7 +3506,7 @@ function Qt(n) {
|
|
|
3506
3506
|
className: "params",
|
|
3507
3507
|
begin: /\(/,
|
|
3508
3508
|
end: /\)/,
|
|
3509
|
-
keywords:
|
|
3509
|
+
keywords: a,
|
|
3510
3510
|
relevance: 0,
|
|
3511
3511
|
contains: [n.C_BLOCK_COMMENT_MODE],
|
|
3512
3512
|
endsParent: !0
|
|
@@ -3514,7 +3514,7 @@ function Qt(n) {
|
|
|
3514
3514
|
return {
|
|
3515
3515
|
name: "Java",
|
|
3516
3516
|
aliases: ["jsp"],
|
|
3517
|
-
keywords:
|
|
3517
|
+
keywords: a,
|
|
3518
3518
|
illegal: /<\/|#/,
|
|
3519
3519
|
contains: [
|
|
3520
3520
|
n.COMMENT(
|
|
@@ -3555,7 +3555,7 @@ function Qt(n) {
|
|
|
3555
3555
|
match: [
|
|
3556
3556
|
/\b(?:class|interface|enum|extends|implements|new)/,
|
|
3557
3557
|
/\s+/,
|
|
3558
|
-
|
|
3558
|
+
s
|
|
3559
3559
|
],
|
|
3560
3560
|
className: {
|
|
3561
3561
|
1: "keyword",
|
|
@@ -3569,9 +3569,9 @@ function Qt(n) {
|
|
|
3569
3569
|
},
|
|
3570
3570
|
{
|
|
3571
3571
|
begin: [
|
|
3572
|
-
e.concat(/(?!else)/,
|
|
3572
|
+
e.concat(/(?!else)/, s),
|
|
3573
3573
|
/\s+/,
|
|
3574
|
-
|
|
3574
|
+
s,
|
|
3575
3575
|
/\s+/,
|
|
3576
3576
|
/=(?!=)/
|
|
3577
3577
|
],
|
|
@@ -3585,7 +3585,7 @@ function Qt(n) {
|
|
|
3585
3585
|
begin: [
|
|
3586
3586
|
/record/,
|
|
3587
3587
|
/\s+/,
|
|
3588
|
-
|
|
3588
|
+
s
|
|
3589
3589
|
],
|
|
3590
3590
|
className: {
|
|
3591
3591
|
1: "keyword",
|
|
@@ -3610,19 +3610,19 @@ function Qt(n) {
|
|
|
3610
3610
|
/\s*(?=\()/
|
|
3611
3611
|
],
|
|
3612
3612
|
className: { 2: "title.function" },
|
|
3613
|
-
keywords:
|
|
3613
|
+
keywords: a,
|
|
3614
3614
|
contains: [
|
|
3615
3615
|
{
|
|
3616
3616
|
className: "params",
|
|
3617
3617
|
begin: /\(/,
|
|
3618
3618
|
end: /\)/,
|
|
3619
|
-
keywords:
|
|
3619
|
+
keywords: a,
|
|
3620
3620
|
relevance: 0,
|
|
3621
3621
|
contains: [
|
|
3622
3622
|
o,
|
|
3623
3623
|
n.APOS_STRING_MODE,
|
|
3624
3624
|
n.QUOTE_STRING_MODE,
|
|
3625
|
-
|
|
3625
|
+
tn,
|
|
3626
3626
|
n.C_BLOCK_COMMENT_MODE
|
|
3627
3627
|
]
|
|
3628
3628
|
},
|
|
@@ -3630,25 +3630,25 @@ function Qt(n) {
|
|
|
3630
3630
|
n.C_BLOCK_COMMENT_MODE
|
|
3631
3631
|
]
|
|
3632
3632
|
},
|
|
3633
|
-
|
|
3633
|
+
tn,
|
|
3634
3634
|
o
|
|
3635
3635
|
]
|
|
3636
3636
|
};
|
|
3637
3637
|
}
|
|
3638
3638
|
function Vt(n) {
|
|
3639
|
-
const e = n.regex,
|
|
3639
|
+
const e = n.regex, s = {}, u = {
|
|
3640
3640
|
begin: /\$\{/,
|
|
3641
3641
|
end: /\}/,
|
|
3642
3642
|
contains: [
|
|
3643
3643
|
"self",
|
|
3644
3644
|
{
|
|
3645
3645
|
begin: /:-/,
|
|
3646
|
-
contains: [
|
|
3646
|
+
contains: [s]
|
|
3647
3647
|
}
|
|
3648
3648
|
// default values
|
|
3649
3649
|
]
|
|
3650
3650
|
};
|
|
3651
|
-
Object.assign(
|
|
3651
|
+
Object.assign(s, {
|
|
3652
3652
|
className: "variable",
|
|
3653
3653
|
variants: [
|
|
3654
3654
|
{ begin: e.concat(
|
|
@@ -3660,7 +3660,7 @@ function Vt(n) {
|
|
|
3660
3660
|
u
|
|
3661
3661
|
]
|
|
3662
3662
|
});
|
|
3663
|
-
const
|
|
3663
|
+
const h = {
|
|
3664
3664
|
className: "subst",
|
|
3665
3665
|
begin: /\$\(/,
|
|
3666
3666
|
end: /\)/,
|
|
@@ -3680,14 +3680,14 @@ function Vt(n) {
|
|
|
3680
3680
|
end: /"/,
|
|
3681
3681
|
contains: [
|
|
3682
3682
|
n.BACKSLASH_ESCAPE,
|
|
3683
|
-
|
|
3684
|
-
|
|
3683
|
+
s,
|
|
3684
|
+
h
|
|
3685
3685
|
]
|
|
3686
3686
|
};
|
|
3687
|
-
|
|
3687
|
+
h.contains.push(r);
|
|
3688
3688
|
const i = {
|
|
3689
3689
|
match: /\\"/
|
|
3690
|
-
},
|
|
3690
|
+
}, a = {
|
|
3691
3691
|
className: "string",
|
|
3692
3692
|
begin: /'/,
|
|
3693
3693
|
end: /'/
|
|
@@ -3702,7 +3702,7 @@ function Vt(n) {
|
|
|
3702
3702
|
className: "number"
|
|
3703
3703
|
},
|
|
3704
3704
|
n.NUMBER_MODE,
|
|
3705
|
-
|
|
3705
|
+
s
|
|
3706
3706
|
]
|
|
3707
3707
|
}, c = [
|
|
3708
3708
|
"fish",
|
|
@@ -3717,7 +3717,7 @@ function Vt(n) {
|
|
|
3717
3717
|
], f = n.SHEBANG({
|
|
3718
3718
|
binary: `(${c.join("|")})`,
|
|
3719
3719
|
relevance: 10
|
|
3720
|
-
}),
|
|
3720
|
+
}), g = {
|
|
3721
3721
|
className: "function",
|
|
3722
3722
|
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
|
3723
3723
|
returnBegin: !0,
|
|
@@ -3739,10 +3739,10 @@ function Vt(n) {
|
|
|
3739
3739
|
"esac",
|
|
3740
3740
|
"function",
|
|
3741
3741
|
"select"
|
|
3742
|
-
],
|
|
3742
|
+
], _ = [
|
|
3743
3743
|
"true",
|
|
3744
3744
|
"false"
|
|
3745
|
-
],
|
|
3745
|
+
], p = { match: /(\/[a-z._-]+)+/ }, v = [
|
|
3746
3746
|
"break",
|
|
3747
3747
|
"cd",
|
|
3748
3748
|
"continue",
|
|
@@ -3761,7 +3761,7 @@ function Vt(n) {
|
|
|
3761
3761
|
"trap",
|
|
3762
3762
|
"umask",
|
|
3763
3763
|
"unset"
|
|
3764
|
-
],
|
|
3764
|
+
], m = [
|
|
3765
3765
|
"alias",
|
|
3766
3766
|
"bind",
|
|
3767
3767
|
"builtin",
|
|
@@ -3783,7 +3783,7 @@ function Vt(n) {
|
|
|
3783
3783
|
"typeset",
|
|
3784
3784
|
"ulimit",
|
|
3785
3785
|
"unalias"
|
|
3786
|
-
],
|
|
3786
|
+
], E = [
|
|
3787
3787
|
"autoload",
|
|
3788
3788
|
"bg",
|
|
3789
3789
|
"bindkey",
|
|
@@ -3852,7 +3852,7 @@ function Vt(n) {
|
|
|
3852
3852
|
"zsocket",
|
|
3853
3853
|
"zstyle",
|
|
3854
3854
|
"ztcp"
|
|
3855
|
-
],
|
|
3855
|
+
], A = [
|
|
3856
3856
|
"chcon",
|
|
3857
3857
|
"chgrp",
|
|
3858
3858
|
"chown",
|
|
@@ -3963,15 +3963,15 @@ function Vt(n) {
|
|
|
3963
3963
|
keywords: {
|
|
3964
3964
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
3965
3965
|
keyword: d,
|
|
3966
|
-
literal:
|
|
3966
|
+
literal: _,
|
|
3967
3967
|
built_in: [
|
|
3968
3968
|
...v,
|
|
3969
|
-
...
|
|
3969
|
+
...m,
|
|
3970
3970
|
// Shell modifiers
|
|
3971
3971
|
"set",
|
|
3972
3972
|
"shopt",
|
|
3973
|
-
...
|
|
3974
|
-
...
|
|
3973
|
+
...E,
|
|
3974
|
+
...A
|
|
3975
3975
|
]
|
|
3976
3976
|
},
|
|
3977
3977
|
contains: [
|
|
@@ -3979,21 +3979,21 @@ function Vt(n) {
|
|
|
3979
3979
|
// to catch known shells and boost relevancy
|
|
3980
3980
|
n.SHEBANG(),
|
|
3981
3981
|
// to catch unknown shells but still highlight the shebang
|
|
3982
|
-
|
|
3982
|
+
g,
|
|
3983
3983
|
l,
|
|
3984
3984
|
n.HASH_COMMENT_MODE,
|
|
3985
3985
|
t,
|
|
3986
|
-
|
|
3986
|
+
p,
|
|
3987
3987
|
r,
|
|
3988
3988
|
i,
|
|
3989
|
-
|
|
3989
|
+
a,
|
|
3990
3990
|
o,
|
|
3991
|
-
|
|
3991
|
+
s
|
|
3992
3992
|
]
|
|
3993
3993
|
};
|
|
3994
3994
|
}
|
|
3995
3995
|
function Zt(n) {
|
|
3996
|
-
const e = n.regex,
|
|
3996
|
+
const e = n.regex, s = n.COMMENT("--", "$"), u = {
|
|
3997
3997
|
className: "string",
|
|
3998
3998
|
variants: [
|
|
3999
3999
|
{
|
|
@@ -4002,7 +4002,7 @@ function Zt(n) {
|
|
|
4002
4002
|
contains: [{ begin: /''/ }]
|
|
4003
4003
|
}
|
|
4004
4004
|
]
|
|
4005
|
-
},
|
|
4005
|
+
}, h = {
|
|
4006
4006
|
begin: /"/,
|
|
4007
4007
|
end: /"/,
|
|
4008
4008
|
contains: [{ begin: /""/ }]
|
|
@@ -4046,7 +4046,7 @@ function Zt(n) {
|
|
|
4046
4046
|
"varying",
|
|
4047
4047
|
// modifier (character varying)
|
|
4048
4048
|
"varbinary"
|
|
4049
|
-
],
|
|
4049
|
+
], a = [
|
|
4050
4050
|
"add",
|
|
4051
4051
|
"asc",
|
|
4052
4052
|
"collation",
|
|
@@ -4541,27 +4541,27 @@ function Zt(n) {
|
|
|
4541
4541
|
"nulls last",
|
|
4542
4542
|
"depth first",
|
|
4543
4543
|
"breadth first"
|
|
4544
|
-
],
|
|
4544
|
+
], g = l, d = [
|
|
4545
4545
|
...o,
|
|
4546
|
-
...
|
|
4547
|
-
].filter((
|
|
4546
|
+
...a
|
|
4547
|
+
].filter((E) => !l.includes(E)), _ = {
|
|
4548
4548
|
className: "variable",
|
|
4549
4549
|
begin: /@[a-z0-9][a-z0-9_]*/
|
|
4550
|
-
},
|
|
4550
|
+
}, p = {
|
|
4551
4551
|
className: "operator",
|
|
4552
4552
|
begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
4553
4553
|
relevance: 0
|
|
4554
4554
|
}, v = {
|
|
4555
|
-
begin: e.concat(/\b/, e.either(...
|
|
4555
|
+
begin: e.concat(/\b/, e.either(...g), /\s*\(/),
|
|
4556
4556
|
relevance: 0,
|
|
4557
|
-
keywords: { built_in:
|
|
4557
|
+
keywords: { built_in: g }
|
|
4558
4558
|
};
|
|
4559
|
-
function E
|
|
4560
|
-
exceptions:
|
|
4561
|
-
when:
|
|
4559
|
+
function m(E, {
|
|
4560
|
+
exceptions: A,
|
|
4561
|
+
when: S
|
|
4562
4562
|
} = {}) {
|
|
4563
|
-
const
|
|
4564
|
-
return
|
|
4563
|
+
const D = S;
|
|
4564
|
+
return A = A || [], E.map((N) => N.match(/\|\d+$/) || A.includes(N) ? N : D(N) ? `${N}|0` : N);
|
|
4565
4565
|
}
|
|
4566
4566
|
return {
|
|
4567
4567
|
name: "SQL",
|
|
@@ -4570,7 +4570,7 @@ function Zt(n) {
|
|
|
4570
4570
|
illegal: /[{}]|<\//,
|
|
4571
4571
|
keywords: {
|
|
4572
4572
|
$pattern: /\b[\w\.]+/,
|
|
4573
|
-
keyword:
|
|
4573
|
+
keyword: m(d, { when: (E) => E.length < 3 }),
|
|
4574
4574
|
literal: t,
|
|
4575
4575
|
type: i,
|
|
4576
4576
|
built_in: c
|
|
@@ -4591,18 +4591,18 @@ function Zt(n) {
|
|
|
4591
4591
|
begin: e.either(...r)
|
|
4592
4592
|
},
|
|
4593
4593
|
v,
|
|
4594
|
-
|
|
4594
|
+
_,
|
|
4595
4595
|
u,
|
|
4596
|
-
|
|
4596
|
+
h,
|
|
4597
4597
|
n.C_NUMBER_MODE,
|
|
4598
4598
|
n.C_BLOCK_COMMENT_MODE,
|
|
4599
|
-
|
|
4600
|
-
|
|
4599
|
+
s,
|
|
4600
|
+
p
|
|
4601
4601
|
]
|
|
4602
4602
|
};
|
|
4603
4603
|
}
|
|
4604
4604
|
Z.registerLanguage("xml", $t);
|
|
4605
|
-
Z.registerLanguage("javascript",
|
|
4605
|
+
Z.registerLanguage("javascript", Ht);
|
|
4606
4606
|
Z.registerLanguage("json", zt);
|
|
4607
4607
|
Z.registerLanguage("yaml", Gt);
|
|
4608
4608
|
Z.registerLanguage("plaintext", Kt);
|
|
@@ -4611,19 +4611,19 @@ Z.registerLanguage("java", Qt);
|
|
|
4611
4611
|
Z.registerLanguage("bash", Vt);
|
|
4612
4612
|
Z.registerLanguage("sql", Zt);
|
|
4613
4613
|
var T = /* @__PURE__ */ ((n) => (n.EQUAL = "equal", n.DELETE = "removed", n.ADD = "added", n.EMPTY = "empty", n))(T || {});
|
|
4614
|
-
const
|
|
4615
|
-
function
|
|
4614
|
+
const J = "<code-diff-modified>", ee = "</code-diff-modified>", Yt = J.replace("<", "<").replace(">", ">"), Xt = ee.replace("<", "<").replace(">", ">");
|
|
4615
|
+
function ge(n) {
|
|
4616
4616
|
return n === void 0 ? T.EQUAL : n.added ? T.ADD : n.removed ? T.DELETE : T.EQUAL;
|
|
4617
4617
|
}
|
|
4618
|
-
function Te(n, e,
|
|
4619
|
-
return typeof n == "undefined" ? e : typeof e == "undefined" ? n : (
|
|
4620
|
-
(
|
|
4618
|
+
function Te(n, e, s = "word") {
|
|
4619
|
+
return typeof n == "undefined" ? e : typeof e == "undefined" ? n : (s === "char" ? $n : Pn)(n, e).filter((h) => ge(h) !== T.DELETE).map(
|
|
4620
|
+
(h) => ge(h) === T.ADD ? `${J}${h.value}${ee}` : h.value
|
|
4621
4621
|
).join("");
|
|
4622
4622
|
}
|
|
4623
4623
|
function yn(n, e) {
|
|
4624
|
-
const
|
|
4625
|
-
return
|
|
4626
|
-
const [o, l] =
|
|
4624
|
+
const s = new Le.diff_match_patch(), u = s.diff_linesToChars_(n, e), h = u.chars1, t = u.chars2, r = u.lineArray, i = s.diff_main(h, t, !1);
|
|
4625
|
+
return s.diff_charsToLines_(i, r), i.map((a) => {
|
|
4626
|
+
const [o, l] = a;
|
|
4627
4627
|
return {
|
|
4628
4628
|
count: l.replace(/\n$/, "").split(`
|
|
4629
4629
|
`).length,
|
|
@@ -4634,28 +4634,28 @@ function yn(n, e) {
|
|
|
4634
4634
|
});
|
|
4635
4635
|
}
|
|
4636
4636
|
function V(n, e) {
|
|
4637
|
-
if (!e.match(new RegExp(`(${
|
|
4637
|
+
if (!e.match(new RegExp(`(${J}|${ee})`, "g")))
|
|
4638
4638
|
return Z.highlight(e, { language: n }).value;
|
|
4639
4639
|
let u = e;
|
|
4640
|
-
const
|
|
4641
|
-
t.innerHTML = Z.highlight(
|
|
4640
|
+
const h = e.replace(new RegExp(`(${J}|${ee})`, "g"), ""), t = document.createElement("div");
|
|
4641
|
+
t.innerHTML = Z.highlight(h, { language: n }).value;
|
|
4642
4642
|
let r = !1;
|
|
4643
|
-
const i = (
|
|
4644
|
-
|
|
4643
|
+
const i = (a) => {
|
|
4644
|
+
a.childNodes.forEach((o) => {
|
|
4645
4645
|
if (o.nodeType === Node.ELEMENT_NODE && i(o), o.nodeType === Node.TEXT_NODE) {
|
|
4646
4646
|
if (!o.textContent)
|
|
4647
4647
|
return;
|
|
4648
4648
|
let l = o.textContent, c = "";
|
|
4649
|
-
for (r && (c = c +
|
|
4650
|
-
if (u.startsWith(
|
|
4651
|
-
u = u.slice(
|
|
4649
|
+
for (r && (c = c + J); l.length; ) {
|
|
4650
|
+
if (u.startsWith(J)) {
|
|
4651
|
+
u = u.slice(J.length), c = c + J, r = !0;
|
|
4652
4652
|
continue;
|
|
4653
4653
|
}
|
|
4654
4654
|
if (u.startsWith(ee)) {
|
|
4655
4655
|
u = u.slice(ee.length), c = c + ee, r = !1;
|
|
4656
4656
|
continue;
|
|
4657
4657
|
}
|
|
4658
|
-
const f = u.match(new RegExp(`(${
|
|
4658
|
+
const f = u.match(new RegExp(`(${J}|${ee})`)), g = f && f.index ? f.index : u.length, d = Math.min(g, l.length);
|
|
4659
4659
|
c = c + u.substring(0, d), u = u.slice(d), l = l.slice(d);
|
|
4660
4660
|
}
|
|
4661
4661
|
r && (c = c + ee), o.textContent = c;
|
|
@@ -4664,290 +4664,290 @@ function V(n, e) {
|
|
|
4664
4664
|
};
|
|
4665
4665
|
return i(t), t.innerHTML.replace(new RegExp(Yt, "g"), '<span class="x">').replace(new RegExp(Xt, "g"), "</span>");
|
|
4666
4666
|
}
|
|
4667
|
-
function
|
|
4668
|
-
const
|
|
4669
|
-
let
|
|
4670
|
-
for (const
|
|
4671
|
-
if (
|
|
4672
|
-
const o = u(
|
|
4667
|
+
function An(n, e) {
|
|
4668
|
+
const s = (a, o) => (a.match(new RegExp(o, "g")) || []).length, u = (a) => a.filter((o) => e == null ? void 0 : e.test(o)).length;
|
|
4669
|
+
let h = 0, t = 0, r = 0, i = 0;
|
|
4670
|
+
for (const a of n) {
|
|
4671
|
+
if (a.added) {
|
|
4672
|
+
const o = u(a.value.trim().split(`
|
|
4673
4673
|
`));
|
|
4674
|
-
|
|
4674
|
+
h += s(a.value.trim(), `
|
|
4675
4675
|
`) + 1 - o, r += o;
|
|
4676
4676
|
continue;
|
|
4677
4677
|
}
|
|
4678
|
-
if (
|
|
4679
|
-
const o = u(
|
|
4678
|
+
if (a.removed) {
|
|
4679
|
+
const o = u(a.value.trim().split(`
|
|
4680
4680
|
`));
|
|
4681
|
-
t += a
|
|
4681
|
+
t += s(a.value.trim(), `
|
|
4682
4682
|
`) + 1 - o, i += o;
|
|
4683
4683
|
continue;
|
|
4684
4684
|
}
|
|
4685
4685
|
}
|
|
4686
4686
|
return {
|
|
4687
|
-
additionsNum:
|
|
4687
|
+
additionsNum: h,
|
|
4688
4688
|
deletionsNum: t,
|
|
4689
4689
|
ignoreAdditionsNum: r,
|
|
4690
4690
|
ignoreDeletionsNum: i
|
|
4691
4691
|
};
|
|
4692
4692
|
}
|
|
4693
|
-
function jt(n, e,
|
|
4694
|
-
const i = () => ({ type: T.EMPTY }),
|
|
4695
|
-
let c = 0, f = 0,
|
|
4696
|
-
const d = [],
|
|
4693
|
+
function jt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
4694
|
+
const i = () => ({ type: T.EMPTY }), a = (m, E, A) => ({ type: m, num: E, code: A }), o = yn(n, e), l = r ? new RegExp(r) : void 0;
|
|
4695
|
+
let c = 0, f = 0, g = !1;
|
|
4696
|
+
const d = [], _ = {
|
|
4697
4697
|
changes: d,
|
|
4698
4698
|
collector: [],
|
|
4699
|
-
stat:
|
|
4699
|
+
stat: An(o, l)
|
|
4700
4700
|
};
|
|
4701
|
-
for (let
|
|
4702
|
-
if (
|
|
4703
|
-
|
|
4701
|
+
for (let m = 0; m < o.length; m++) {
|
|
4702
|
+
if (g) {
|
|
4703
|
+
g = !1;
|
|
4704
4704
|
continue;
|
|
4705
4705
|
}
|
|
4706
|
-
const [
|
|
4706
|
+
const [E, A] = [o[m], o[m + 1]], [S, D] = [ge(E), ge(A)], N = E.value.replace(/\n$/, "").split(`
|
|
4707
4707
|
`);
|
|
4708
|
-
if (
|
|
4709
|
-
for (const
|
|
4708
|
+
if (A === void 0) {
|
|
4709
|
+
for (const C of N) {
|
|
4710
4710
|
let I = i(), $ = i();
|
|
4711
|
-
const B = V(
|
|
4712
|
-
|
|
4711
|
+
const B = V(s, C);
|
|
4712
|
+
S === T.EQUAL && (c++, f++, I = a(T.EQUAL, c, B), $ = a(T.EQUAL, f, B)), S === T.DELETE && (c++, I = a(T.DELETE, c, B), $ = i()), S === T.ADD && (f++, I = i(), $ = a(T.ADD, f, B)), d.push({ left: I, right: $ });
|
|
4713
4713
|
}
|
|
4714
4714
|
break;
|
|
4715
4715
|
}
|
|
4716
|
-
if (
|
|
4717
|
-
for (const
|
|
4716
|
+
if (S === T.EQUAL)
|
|
4717
|
+
for (const C of N) {
|
|
4718
4718
|
c++, f++;
|
|
4719
|
-
const I = V(
|
|
4719
|
+
const I = V(s, C);
|
|
4720
4720
|
d.push({
|
|
4721
|
-
left:
|
|
4722
|
-
right:
|
|
4721
|
+
left: a(T.EQUAL, c, I),
|
|
4722
|
+
right: a(T.EQUAL, f, I)
|
|
4723
4723
|
});
|
|
4724
4724
|
}
|
|
4725
|
-
const
|
|
4725
|
+
const R = A.value.replace(/\n$/, "").split(`
|
|
4726
4726
|
`);
|
|
4727
|
-
if (
|
|
4728
|
-
if (
|
|
4729
|
-
for (const
|
|
4727
|
+
if (S === T.DELETE) {
|
|
4728
|
+
if (D === T.EQUAL)
|
|
4729
|
+
for (const C of N)
|
|
4730
4730
|
c++, d.push({
|
|
4731
|
-
left:
|
|
4731
|
+
left: a(T.DELETE, c, V(s, C)),
|
|
4732
4732
|
right: i()
|
|
4733
4733
|
});
|
|
4734
|
-
if (
|
|
4735
|
-
|
|
4736
|
-
const
|
|
4737
|
-
for (let I = 0; I <
|
|
4738
|
-
I <
|
|
4739
|
-
const [$, B] = [
|
|
4740
|
-
d.push({ left:
|
|
4734
|
+
if (D === T.ADD) {
|
|
4735
|
+
g = !0;
|
|
4736
|
+
const C = Math.max(E.count, A.count);
|
|
4737
|
+
for (let I = 0; I < C; I++) {
|
|
4738
|
+
I < E.count && c++, I < A.count && f++;
|
|
4739
|
+
const [$, B] = [N[I], R[I]], H = h || N.length === R.length, K = H ? Te(B, $, u) : $, te = H ? Te($, B, u) : B, le = l != null && l.test($) ? T.EQUAL : T.DELETE, b = l != null && l.test(B) ? T.EQUAL : T.ADD, y = I < E.count ? a(le, c, V(s, K)) : i(), L = I < A.count ? a(b, f, V(s, te)) : i();
|
|
4740
|
+
d.push({ left: y, right: L });
|
|
4741
4741
|
}
|
|
4742
4742
|
}
|
|
4743
4743
|
}
|
|
4744
|
-
if (
|
|
4745
|
-
for (const
|
|
4744
|
+
if (S === T.ADD)
|
|
4745
|
+
for (const C of N)
|
|
4746
4746
|
f++, d.push({
|
|
4747
4747
|
left: i(),
|
|
4748
|
-
right:
|
|
4748
|
+
right: a(T.ADD, f, V(s, C))
|
|
4749
4749
|
});
|
|
4750
4750
|
}
|
|
4751
4751
|
if (n === e) {
|
|
4752
|
-
for (let
|
|
4753
|
-
d[
|
|
4754
|
-
return
|
|
4752
|
+
for (let m = 0; m < d.length; m++)
|
|
4753
|
+
d[m].fold = !1;
|
|
4754
|
+
return _;
|
|
4755
4755
|
}
|
|
4756
|
-
for (let
|
|
4757
|
-
const
|
|
4758
|
-
if (
|
|
4759
|
-
const [
|
|
4760
|
-
for (let
|
|
4761
|
-
d[
|
|
4756
|
+
for (let m = 0; m < d.length; m++) {
|
|
4757
|
+
const E = d[m];
|
|
4758
|
+
if (E.left.type === T.DELETE || E.right.type === T.ADD) {
|
|
4759
|
+
const [A, S] = [Math.max(m - t, 0), Math.min(m + t + 1, d.length)];
|
|
4760
|
+
for (let D = A; D < S; D++)
|
|
4761
|
+
d[D].fold = !1;
|
|
4762
4762
|
}
|
|
4763
|
-
|
|
4763
|
+
E.fold === void 0 && (E.fold = !0);
|
|
4764
4764
|
}
|
|
4765
|
-
const
|
|
4765
|
+
const p = [];
|
|
4766
4766
|
let v = [];
|
|
4767
|
-
for (let
|
|
4768
|
-
const
|
|
4769
|
-
if (
|
|
4770
|
-
v.length && (v[0].hideIndex =
|
|
4767
|
+
for (let m = 0; m < d.length; m++) {
|
|
4768
|
+
const E = d[m];
|
|
4769
|
+
if (E.fold === !1) {
|
|
4770
|
+
v.length && (v[0].hideIndex = _.collector.length, _.collector.push({
|
|
4771
4771
|
lines: v,
|
|
4772
4772
|
fold: !0
|
|
4773
|
-
}), v = []),
|
|
4773
|
+
}), v = []), p.push(E);
|
|
4774
4774
|
continue;
|
|
4775
4775
|
}
|
|
4776
|
-
|
|
4776
|
+
E.hide = !0, v.push(E), p.push(E);
|
|
4777
4777
|
}
|
|
4778
|
-
return v.length && (v[0].hideIndex =
|
|
4778
|
+
return v.length && (v[0].hideIndex = _.collector.length, _.collector.push({
|
|
4779
4779
|
lines: v,
|
|
4780
4780
|
fold: !0
|
|
4781
|
-
}), v = []),
|
|
4781
|
+
}), v = []), _.changes = p, _;
|
|
4782
4782
|
}
|
|
4783
|
-
function
|
|
4784
|
-
const i = yn(n, e),
|
|
4783
|
+
function qt(n, e, s = "plaintext", u = "word", h = !1, t = 10, r) {
|
|
4784
|
+
const i = yn(n, e), a = r ? new RegExp(r) : void 0;
|
|
4785
4785
|
let o = 0, l = 0, c = !1;
|
|
4786
|
-
const f = [],
|
|
4786
|
+
const f = [], g = {
|
|
4787
4787
|
changes: f,
|
|
4788
4788
|
collector: [],
|
|
4789
|
-
stat:
|
|
4789
|
+
stat: An(i, a)
|
|
4790
4790
|
};
|
|
4791
|
-
for (let
|
|
4791
|
+
for (let p = 0; p < i.length; p++) {
|
|
4792
4792
|
if (c) {
|
|
4793
4793
|
c = !1;
|
|
4794
4794
|
continue;
|
|
4795
4795
|
}
|
|
4796
|
-
const [v,
|
|
4796
|
+
const [v, m] = [i[p], i[p + 1]], [E, A] = [ge(v), ge(m)], S = v.value.replace(/\n$/, "").split(`
|
|
4797
4797
|
`);
|
|
4798
|
-
if (
|
|
4799
|
-
for (const
|
|
4800
|
-
|
|
4801
|
-
const
|
|
4798
|
+
if (m === void 0) {
|
|
4799
|
+
for (const N of S) {
|
|
4800
|
+
E === T.EQUAL && (o++, l++), E === T.DELETE && o++, E === T.ADD && l++;
|
|
4801
|
+
const R = V(s, N);
|
|
4802
4802
|
f.push({
|
|
4803
|
-
type:
|
|
4804
|
-
code:
|
|
4805
|
-
addNum:
|
|
4806
|
-
delNum:
|
|
4803
|
+
type: E,
|
|
4804
|
+
code: R,
|
|
4805
|
+
addNum: E === T.DELETE ? void 0 : l,
|
|
4806
|
+
delNum: E === T.ADD ? void 0 : o
|
|
4807
4807
|
});
|
|
4808
4808
|
}
|
|
4809
4809
|
break;
|
|
4810
4810
|
}
|
|
4811
|
-
if (
|
|
4812
|
-
for (const
|
|
4811
|
+
if (E === T.EQUAL)
|
|
4812
|
+
for (const N of S) {
|
|
4813
4813
|
o++, l++;
|
|
4814
|
-
const
|
|
4815
|
-
f.push({ type: T.EQUAL, code:
|
|
4814
|
+
const R = V(s, N);
|
|
4815
|
+
f.push({ type: T.EQUAL, code: R, delNum: o, addNum: l });
|
|
4816
4816
|
}
|
|
4817
|
-
const
|
|
4817
|
+
const D = m.value.replace(/\n$/, "").split(`
|
|
4818
4818
|
`);
|
|
4819
|
-
if (
|
|
4820
|
-
if (
|
|
4821
|
-
for (let
|
|
4822
|
-
const
|
|
4819
|
+
if (E === T.DELETE)
|
|
4820
|
+
if (A === T.ADD && (S.length === D.length || h)) {
|
|
4821
|
+
for (let N = 0; N < S.length; N++) {
|
|
4822
|
+
const R = S[N], C = D[N];
|
|
4823
4823
|
o++;
|
|
4824
|
-
const I = V(
|
|
4824
|
+
const I = V(s, Te(C, R, u));
|
|
4825
4825
|
f.push({
|
|
4826
|
-
type:
|
|
4826
|
+
type: a != null && a.test(R) ? T.EQUAL : T.DELETE,
|
|
4827
4827
|
code: I,
|
|
4828
4828
|
delNum: o
|
|
4829
4829
|
});
|
|
4830
4830
|
}
|
|
4831
|
-
for (let
|
|
4832
|
-
const
|
|
4831
|
+
for (let N = 0; N < D.length; N++) {
|
|
4832
|
+
const R = S[N], C = D[N];
|
|
4833
4833
|
l++;
|
|
4834
|
-
const I = V(
|
|
4834
|
+
const I = V(s, Te(R, C, u));
|
|
4835
4835
|
f.push({
|
|
4836
|
-
type:
|
|
4836
|
+
type: a != null && a.test(C) ? T.EQUAL : T.ADD,
|
|
4837
4837
|
code: I,
|
|
4838
4838
|
addNum: l
|
|
4839
4839
|
});
|
|
4840
4840
|
}
|
|
4841
4841
|
c = !0;
|
|
4842
4842
|
} else
|
|
4843
|
-
for (const
|
|
4843
|
+
for (const N of S) {
|
|
4844
4844
|
o++;
|
|
4845
|
-
const
|
|
4846
|
-
f.push({ type: T.DELETE, code:
|
|
4845
|
+
const R = V(s, N);
|
|
4846
|
+
f.push({ type: T.DELETE, code: R, delNum: o });
|
|
4847
4847
|
}
|
|
4848
|
-
if (
|
|
4849
|
-
for (const
|
|
4848
|
+
if (E === T.ADD)
|
|
4849
|
+
for (const N of S) {
|
|
4850
4850
|
l++;
|
|
4851
|
-
const
|
|
4852
|
-
f.push({ type: T.ADD, code:
|
|
4851
|
+
const R = V(s, N);
|
|
4852
|
+
f.push({ type: T.ADD, code: R, addNum: l });
|
|
4853
4853
|
}
|
|
4854
4854
|
}
|
|
4855
|
-
for (let
|
|
4856
|
-
const v = f[
|
|
4855
|
+
for (let p = 0; p < f.length; p++) {
|
|
4856
|
+
const v = f[p];
|
|
4857
4857
|
if (v.type === T.DELETE || v.type === T.ADD) {
|
|
4858
|
-
const [
|
|
4859
|
-
for (let
|
|
4860
|
-
f[
|
|
4858
|
+
const [m, E] = [Math.max(p - t, 0), Math.min(p + t + 1, f.length)];
|
|
4859
|
+
for (let A = m; A < E; A++)
|
|
4860
|
+
f[A].fold = !1;
|
|
4861
4861
|
}
|
|
4862
4862
|
v.fold === void 0 && (v.fold = !0);
|
|
4863
4863
|
}
|
|
4864
4864
|
if (n === e) {
|
|
4865
|
-
for (let
|
|
4866
|
-
f[
|
|
4867
|
-
return
|
|
4865
|
+
for (let p = 0; p < f.length; p++)
|
|
4866
|
+
f[p].fold = !1;
|
|
4867
|
+
return g;
|
|
4868
4868
|
}
|
|
4869
4869
|
const d = [];
|
|
4870
|
-
let
|
|
4871
|
-
for (let
|
|
4872
|
-
const v = f[
|
|
4870
|
+
let _ = [];
|
|
4871
|
+
for (let p = 0; p < f.length; p++) {
|
|
4872
|
+
const v = f[p];
|
|
4873
4873
|
if (v.fold === !1) {
|
|
4874
|
-
|
|
4875
|
-
lines:
|
|
4874
|
+
_.length && (_[0].hideIndex = g.collector.length, g.collector.push({
|
|
4875
|
+
lines: _,
|
|
4876
4876
|
fold: !0
|
|
4877
|
-
}),
|
|
4877
|
+
}), _ = []), d.push(v);
|
|
4878
4878
|
continue;
|
|
4879
4879
|
}
|
|
4880
|
-
v.type === "equal" && (v.hide = !0,
|
|
4880
|
+
v.type === "equal" && (v.hide = !0, _.push(v)), d.push(v);
|
|
4881
4881
|
}
|
|
4882
|
-
return
|
|
4883
|
-
lines:
|
|
4882
|
+
return _.length && (_[0].hideIndex = g.collector.length, g.collector.push({
|
|
4883
|
+
lines: _,
|
|
4884
4884
|
fold: !0
|
|
4885
|
-
}),
|
|
4885
|
+
}), _ = []), g.changes = d, g;
|
|
4886
4886
|
}
|
|
4887
|
-
const
|
|
4887
|
+
const Jt = /* @__PURE__ */ be({
|
|
4888
4888
|
__name: "UnifiedLine",
|
|
4889
4889
|
props: {
|
|
4890
4890
|
line: null
|
|
4891
4891
|
},
|
|
4892
4892
|
emits: ["expand"],
|
|
4893
4893
|
setup(n, { emit: e }) {
|
|
4894
|
-
function
|
|
4894
|
+
function s(u) {
|
|
4895
4895
|
return u === T.DELETE ? "-" : u === T.ADD ? "+" : "";
|
|
4896
4896
|
}
|
|
4897
|
-
return { __sfc: !0, emit: e, getCodeMarker:
|
|
4897
|
+
return { __sfc: !0, emit: e, getCodeMarker: s, DiffType: T };
|
|
4898
4898
|
}
|
|
4899
4899
|
});
|
|
4900
|
-
function
|
|
4901
|
-
var
|
|
4902
|
-
e && (
|
|
4900
|
+
function oe(n, e, s, u, h, t, r, i) {
|
|
4901
|
+
var a = typeof n == "function" ? n.options : n;
|
|
4902
|
+
e && (a.render = e, a.staticRenderFns = s, a._compiled = !0), u && (a.functional = !0), t && (a._scopeId = "data-v-" + t);
|
|
4903
4903
|
var o;
|
|
4904
4904
|
if (r ? (o = function(f) {
|
|
4905
4905
|
f = f || // cached call
|
|
4906
4906
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
4907
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ != "undefined" && (f = __VUE_SSR_CONTEXT__),
|
|
4908
|
-
},
|
|
4909
|
-
|
|
4907
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ != "undefined" && (f = __VUE_SSR_CONTEXT__), h && h.call(this, f), f && f._registeredComponents && f._registeredComponents.add(r);
|
|
4908
|
+
}, a._ssrRegister = o) : h && (o = i ? function() {
|
|
4909
|
+
h.call(
|
|
4910
4910
|
this,
|
|
4911
|
-
(
|
|
4911
|
+
(a.functional ? this.parent : this).$root.$options.shadowRoot
|
|
4912
4912
|
);
|
|
4913
|
-
} :
|
|
4914
|
-
if (
|
|
4915
|
-
|
|
4916
|
-
var l =
|
|
4917
|
-
|
|
4918
|
-
return o.call(d), l(
|
|
4913
|
+
} : h), o)
|
|
4914
|
+
if (a.functional) {
|
|
4915
|
+
a._injectStyles = o;
|
|
4916
|
+
var l = a.render;
|
|
4917
|
+
a.render = function(g, d) {
|
|
4918
|
+
return o.call(d), l(g, d);
|
|
4919
4919
|
};
|
|
4920
4920
|
} else {
|
|
4921
|
-
var c =
|
|
4922
|
-
|
|
4921
|
+
var c = a.beforeCreate;
|
|
4922
|
+
a.beforeCreate = c ? [].concat(c, o) : [o];
|
|
4923
4923
|
}
|
|
4924
4924
|
return {
|
|
4925
4925
|
exports: n,
|
|
4926
|
-
options:
|
|
4926
|
+
options: a
|
|
4927
4927
|
};
|
|
4928
4928
|
}
|
|
4929
4929
|
var er = function() {
|
|
4930
|
-
var e = this,
|
|
4931
|
-
return e.line.hideIndex !== void 0 && e.line.hide ?
|
|
4930
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4931
|
+
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(h) {
|
|
4932
4932
|
return u.emit("expand", e.line);
|
|
4933
|
-
} } }, [e._v(" > ")]),
|
|
4933
|
+
} } }, [e._v(" > ")]), s("td", { staticClass: "blob-code blob-code-hunk", attrs: { align: "left" } }, [e._v(" ⋯ ")])]) : e.line.hide ? e._e() : s("tr", [s("td", { staticClass: "blob-num", class: {
|
|
4934
4934
|
"blob-num-deletion": e.line.type === u.DiffType.DELETE,
|
|
4935
4935
|
"blob-num-addition": e.line.type === u.DiffType.ADD,
|
|
4936
4936
|
"blob-num-context": e.line.type === u.DiffType.EQUAL,
|
|
4937
4937
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4938
|
-
} }, [e._v(" " + e._s(e.line.delNum) + " ")]),
|
|
4938
|
+
} }, [e._v(" " + e._s(e.line.delNum) + " ")]), s("td", { staticClass: "blob-num", class: {
|
|
4939
4939
|
"blob-num-deletion": e.line.type === u.DiffType.DELETE,
|
|
4940
4940
|
"blob-num-addition": e.line.type === u.DiffType.ADD,
|
|
4941
4941
|
"blob-num-context": e.line.type === u.DiffType.EQUAL,
|
|
4942
4942
|
"blob-num-hunk": e.line.hide !== void 0
|
|
4943
|
-
} }, [e._v(" " + e._s(e.line.addNum) + " ")]),
|
|
4943
|
+
} }, [e._v(" " + e._s(e.line.addNum) + " ")]), s("td", { staticClass: "blob-code", class: {
|
|
4944
4944
|
"blob-code-deletion": e.line.type === u.DiffType.DELETE,
|
|
4945
4945
|
"blob-code-addition": e.line.type === u.DiffType.ADD,
|
|
4946
4946
|
"blob-code-context": e.line.type === u.DiffType.EQUAL,
|
|
4947
4947
|
"blob-code-hunk": e.line.hide !== void 0
|
|
4948
|
-
} }, [
|
|
4949
|
-
}, nr = [], tr = /* @__PURE__ */
|
|
4950
|
-
|
|
4948
|
+
} }, [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) } })])]);
|
|
4949
|
+
}, nr = [], tr = /* @__PURE__ */ oe(
|
|
4950
|
+
Jt,
|
|
4951
4951
|
er,
|
|
4952
4952
|
nr,
|
|
4953
4953
|
!1,
|
|
@@ -4956,28 +4956,28 @@ var er = function() {
|
|
|
4956
4956
|
null,
|
|
4957
4957
|
null
|
|
4958
4958
|
);
|
|
4959
|
-
const rr = tr.exports, ir = /* @__PURE__ */
|
|
4959
|
+
const rr = tr.exports, ir = /* @__PURE__ */ be({
|
|
4960
4960
|
__name: "UnifiedViewer",
|
|
4961
4961
|
props: {
|
|
4962
4962
|
diffChange: null
|
|
4963
4963
|
},
|
|
4964
4964
|
setup(n) {
|
|
4965
4965
|
const e = n;
|
|
4966
|
-
function
|
|
4967
|
-
u !== void 0 && e.diffChange.collector[u].lines.forEach((
|
|
4968
|
-
|
|
4966
|
+
function s({ hideIndex: u }) {
|
|
4967
|
+
u !== void 0 && e.diffChange.collector[u].lines.forEach((h) => {
|
|
4968
|
+
h.hide = !1, h.fold = !1;
|
|
4969
4969
|
});
|
|
4970
4970
|
}
|
|
4971
|
-
return { __sfc: !0, props: e, expandHandler:
|
|
4971
|
+
return { __sfc: !0, props: e, expandHandler: s, UnifiedLine: rr };
|
|
4972
4972
|
}
|
|
4973
4973
|
});
|
|
4974
4974
|
var sr = function() {
|
|
4975
|
-
var
|
|
4976
|
-
var e = this,
|
|
4977
|
-
return
|
|
4978
|
-
return
|
|
4975
|
+
var h;
|
|
4976
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
4977
|
+
return s("table", { staticClass: "diff-table" }, [s("tbody", e._l((h = e.diffChange) == null ? void 0 : h.changes, function(t, r) {
|
|
4978
|
+
return s(u.UnifiedLine, { key: r, attrs: { line: t }, on: { expand: u.expandHandler } });
|
|
4979
4979
|
}), 1)]);
|
|
4980
|
-
}, ar = [], or = /* @__PURE__ */
|
|
4980
|
+
}, ar = [], or = /* @__PURE__ */ oe(
|
|
4981
4981
|
ir,
|
|
4982
4982
|
sr,
|
|
4983
4983
|
ar,
|
|
@@ -4987,49 +4987,49 @@ var sr = function() {
|
|
|
4987
4987
|
null,
|
|
4988
4988
|
null
|
|
4989
4989
|
);
|
|
4990
|
-
const lr = or.exports, cr = /* @__PURE__ */
|
|
4990
|
+
const lr = or.exports, cr = /* @__PURE__ */ be({
|
|
4991
4991
|
__name: "SplitLine",
|
|
4992
4992
|
props: {
|
|
4993
4993
|
splitLine: null
|
|
4994
4994
|
},
|
|
4995
4995
|
emits: ["expand"],
|
|
4996
4996
|
setup(n, { emit: e }) {
|
|
4997
|
-
function
|
|
4998
|
-
return
|
|
4997
|
+
function s(h) {
|
|
4998
|
+
return h === T.DELETE ? "-" : h === T.ADD ? "+" : "";
|
|
4999
4999
|
}
|
|
5000
|
-
function u(
|
|
5000
|
+
function u(h) {
|
|
5001
5001
|
window.getSelection().removeAllRanges();
|
|
5002
5002
|
const t = document.querySelectorAll(".file-diff-split .split-side-left"), r = document.querySelectorAll(".file-diff-split .split-side-right");
|
|
5003
5003
|
for (const i of r)
|
|
5004
|
-
i.classList.toggle("no-select",
|
|
5004
|
+
i.classList.toggle("no-select", h === "left");
|
|
5005
5005
|
for (const i of t)
|
|
5006
|
-
i.classList.toggle("no-select",
|
|
5006
|
+
i.classList.toggle("no-select", h === "right");
|
|
5007
5007
|
}
|
|
5008
|
-
return { __sfc: !0, emit: e, getCodeMarker:
|
|
5008
|
+
return { __sfc: !0, emit: e, getCodeMarker: s, onSplitLineMousedown: u, DiffType: T };
|
|
5009
5009
|
}
|
|
5010
5010
|
});
|
|
5011
5011
|
var ur = function() {
|
|
5012
|
-
var e = this,
|
|
5013
|
-
return e.splitLine.hideIndex !== void 0 && e.splitLine.hide ?
|
|
5012
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5013
|
+
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(h) {
|
|
5014
5014
|
return u.emit("expand", e.splitLine);
|
|
5015
|
-
} } }, [e._v(" > ")]),
|
|
5016
|
-
return [
|
|
5017
|
-
"blob-num-deletion":
|
|
5018
|
-
"blob-num-addition":
|
|
5019
|
-
"blob-num-context":
|
|
5015
|
+
} } }, [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", [e._l([e.splitLine.left, e.splitLine.right], function(h, t) {
|
|
5016
|
+
return [h.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: {
|
|
5017
|
+
"blob-num-deletion": h.type === u.DiffType.DELETE,
|
|
5018
|
+
"blob-num-addition": h.type === u.DiffType.ADD,
|
|
5019
|
+
"blob-num-context": h.type === u.DiffType.EQUAL,
|
|
5020
5020
|
"blob-num-hunk": e.splitLine.hide !== void 0
|
|
5021
|
-
} }, [e._v(" " + e._s(
|
|
5022
|
-
"blob-code-deletion":
|
|
5023
|
-
"blob-code-addition":
|
|
5024
|
-
"blob-code-context":
|
|
5021
|
+
} }, [e._v(" " + e._s(h.num) + " ")]), s("td", { staticClass: "blob-code", class: {
|
|
5022
|
+
"blob-code-deletion": h.type === u.DiffType.DELETE,
|
|
5023
|
+
"blob-code-addition": h.type === u.DiffType.ADD,
|
|
5024
|
+
"blob-code-context": h.type === u.DiffType.EQUAL,
|
|
5025
5025
|
"blob-code-hunk": e.splitLine.hide !== void 0,
|
|
5026
5026
|
"split-side-left": t === 0,
|
|
5027
5027
|
"split-side-right": t === 1
|
|
5028
5028
|
}, on: { mousedown: function(r) {
|
|
5029
5029
|
return u.onSplitLineMousedown(t === 0 ? "left" : "right");
|
|
5030
|
-
} } }, [
|
|
5030
|
+
} } }, [s("span", { staticClass: "blob-code-inner blob-code-marker", attrs: { "data-code-marker": u.getCodeMarker(h.type) }, domProps: { innerHTML: e._s(h.code) } })])]];
|
|
5031
5031
|
})], 2);
|
|
5032
|
-
}, fr = [], gr = /* @__PURE__ */
|
|
5032
|
+
}, fr = [], gr = /* @__PURE__ */ oe(
|
|
5033
5033
|
cr,
|
|
5034
5034
|
ur,
|
|
5035
5035
|
fr,
|
|
@@ -5039,42 +5039,74 @@ var ur = function() {
|
|
|
5039
5039
|
null,
|
|
5040
5040
|
null
|
|
5041
5041
|
);
|
|
5042
|
-
const hr = gr.exports, dr = /* @__PURE__ */
|
|
5042
|
+
const hr = gr.exports, dr = /* @__PURE__ */ be({
|
|
5043
5043
|
__name: "SplitViewer",
|
|
5044
5044
|
props: {
|
|
5045
5045
|
diffChange: null
|
|
5046
5046
|
},
|
|
5047
5047
|
setup(n) {
|
|
5048
5048
|
const e = n;
|
|
5049
|
-
function
|
|
5050
|
-
u !== void 0 && e.diffChange.collector[u].lines.forEach((
|
|
5051
|
-
|
|
5049
|
+
function s({ hideIndex: u }) {
|
|
5050
|
+
u !== void 0 && e.diffChange.collector[u].lines.forEach((h) => {
|
|
5051
|
+
h.hide = !1, h.fold = !1;
|
|
5052
5052
|
});
|
|
5053
5053
|
}
|
|
5054
|
-
return { __sfc: !0, props: e, expandHandler:
|
|
5054
|
+
return { __sfc: !0, props: e, expandHandler: s, SplitLine: hr };
|
|
5055
5055
|
}
|
|
5056
5056
|
});
|
|
5057
|
-
var
|
|
5058
|
-
var
|
|
5059
|
-
var e = this,
|
|
5060
|
-
return
|
|
5061
|
-
return
|
|
5057
|
+
var _r = function() {
|
|
5058
|
+
var h;
|
|
5059
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5060
|
+
return s("table", { staticClass: "file-diff-split diff-table" }, [e._m(0), s("tbody", e._l((h = e.diffChange) == null ? void 0 : h.changes, function(t, r) {
|
|
5061
|
+
return s(u.SplitLine, { key: r, attrs: { "split-line": t }, on: { expand: u.expandHandler } });
|
|
5062
5062
|
}), 1)]);
|
|
5063
|
-
},
|
|
5063
|
+
}, pr = [function() {
|
|
5064
5064
|
var n = this, e = n._self._c;
|
|
5065
5065
|
return n._self._setupProxy, e("colgroup", [e("col", { attrs: { width: "44" } }), e("col"), e("col", { attrs: { width: "44" } }), e("col")]);
|
|
5066
|
-
}], br = /* @__PURE__ */
|
|
5066
|
+
}], br = /* @__PURE__ */ oe(
|
|
5067
5067
|
dr,
|
|
5068
|
-
pr,
|
|
5069
5068
|
_r,
|
|
5069
|
+
pr,
|
|
5070
5070
|
!1,
|
|
5071
5071
|
null,
|
|
5072
5072
|
"829edc33",
|
|
5073
5073
|
null,
|
|
5074
5074
|
null
|
|
5075
5075
|
);
|
|
5076
|
-
const vr = br.exports
|
|
5077
|
-
|
|
5076
|
+
const vr = br.exports, mr = {
|
|
5077
|
+
name: "DownArrowIcon"
|
|
5078
|
+
};
|
|
5079
|
+
var Er = function() {
|
|
5080
|
+
var e = this, s = e._self._c;
|
|
5081
|
+
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" } })]);
|
|
5082
|
+
}, wr = [], yr = /* @__PURE__ */ oe(
|
|
5083
|
+
mr,
|
|
5084
|
+
Er,
|
|
5085
|
+
wr,
|
|
5086
|
+
!1,
|
|
5087
|
+
null,
|
|
5088
|
+
null,
|
|
5089
|
+
null,
|
|
5090
|
+
null
|
|
5091
|
+
);
|
|
5092
|
+
const Ar = yr.exports, Nr = {
|
|
5093
|
+
name: "UpArrowIcon"
|
|
5094
|
+
};
|
|
5095
|
+
var Mr = function() {
|
|
5096
|
+
var e = this, s = e._self._c;
|
|
5097
|
+
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" } })]);
|
|
5098
|
+
}, Tr = [], Dr = /* @__PURE__ */ oe(
|
|
5099
|
+
Nr,
|
|
5100
|
+
Mr,
|
|
5101
|
+
Tr,
|
|
5102
|
+
!1,
|
|
5103
|
+
null,
|
|
5104
|
+
null,
|
|
5105
|
+
null,
|
|
5106
|
+
null
|
|
5107
|
+
);
|
|
5108
|
+
const Sr = Dr.exports;
|
|
5109
|
+
const Cr = /* @__PURE__ */ be({
|
|
5078
5110
|
__name: "CodeDiff",
|
|
5079
5111
|
props: {
|
|
5080
5112
|
newString: null,
|
|
@@ -5096,55 +5128,68 @@ const Er = /* @__PURE__ */ _e({
|
|
|
5096
5128
|
},
|
|
5097
5129
|
emits: ["diff"],
|
|
5098
5130
|
setup(n, { emit: e }) {
|
|
5099
|
-
const
|
|
5100
|
-
let
|
|
5101
|
-
return
|
|
5102
|
-
`) :
|
|
5103
|
-
}), t =
|
|
5104
|
-
let
|
|
5105
|
-
return
|
|
5106
|
-
`) :
|
|
5107
|
-
}), r =
|
|
5108
|
-
() => u.value ?
|
|
5109
|
-
), i =
|
|
5110
|
-
|
|
5131
|
+
const s = n, u = he(() => s.outputFormat === "line-by-line"), h = he(() => {
|
|
5132
|
+
let g = s.oldString || "";
|
|
5133
|
+
return g = s.trim ? g.trim() : g, g = s.noDiffLineFeed ? g.replace(/(\r\n)/g, `
|
|
5134
|
+
`) : g, g;
|
|
5135
|
+
}), t = he(() => {
|
|
5136
|
+
let g = s.newString || "";
|
|
5137
|
+
return g = s.trim ? g.trim() : g, g = s.noDiffLineFeed ? g.replace(/(\r\n)/g, `
|
|
5138
|
+
`) : g, g;
|
|
5139
|
+
}), r = he(
|
|
5140
|
+
() => u.value ? qt(h.value, t.value, s.language, s.diffStyle, s.forceInlineComparison, s.context, s.ignoreMatchingLines) : jt(h.value, t.value, s.language, s.diffStyle, s.forceInlineComparison, s.context, s.ignoreMatchingLines)
|
|
5141
|
+
), i = We(r.value), a = he(() => i.value.stat.additionsNum === 0 && i.value.stat.deletionsNum === 0), o = We(-1);
|
|
5142
|
+
function l() {
|
|
5143
|
+
const g = document.querySelectorAll(".blob-code-addition");
|
|
5144
|
+
o.value < g.length - 1 && (o.value++, f(g));
|
|
5145
|
+
}
|
|
5146
|
+
function c() {
|
|
5147
|
+
const g = document.querySelectorAll(".blob-code-addition");
|
|
5148
|
+
o.value > 0 && (o.value--, f(g));
|
|
5149
|
+
}
|
|
5150
|
+
function f(g) {
|
|
5151
|
+
g.forEach((_) => _.classList.remove("current-diff"));
|
|
5152
|
+
const d = g[o.value];
|
|
5153
|
+
d && (d.classList.add("current-diff"), d.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
5154
|
+
}
|
|
5155
|
+
return On(() => s, () => {
|
|
5111
5156
|
i.value = r.value, e("diff", {
|
|
5112
5157
|
stat: {
|
|
5113
|
-
isChanged: !
|
|
5158
|
+
isChanged: !a.value,
|
|
5114
5159
|
addNum: i.value.stat.additionsNum,
|
|
5115
5160
|
delNum: i.value.stat.deletionsNum
|
|
5116
5161
|
}
|
|
5117
5162
|
});
|
|
5118
|
-
}, { deep: !0, immediate: !0 }), { __sfc: !0, props:
|
|
5163
|
+
}, { deep: !0, immediate: !0 }), { __sfc: !0, props: s, emits: e, isUnifiedViewer: u, oldString: h, newString: t, raw: r, diffChange: i, isNotChanged: a, currentDiffIndex: o, goToNextDiff: l, goToPrevDiff: c, updateCurrentDiffHighlight: f, UnifiedViewer: lr, SplitViewer: vr, DownArrowIcon: Ar, UpArrowIcon: Sr };
|
|
5119
5164
|
}
|
|
5120
5165
|
});
|
|
5121
|
-
var
|
|
5122
|
-
var e = this,
|
|
5123
|
-
return
|
|
5124
|
-
return [
|
|
5125
|
-
}, { stat: u.diffChange.stat })], 2)]) :
|
|
5126
|
-
return [
|
|
5127
|
-
}, { stat: u.diffChange.stat })], 2)])])]), u.isUnifiedViewer ?
|
|
5128
|
-
},
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5166
|
+
var Rr = function() {
|
|
5167
|
+
var e = this, s = e._self._c, u = e._self._setupProxy;
|
|
5168
|
+
return s("div", { 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
|
+
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
|
+
}, { 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
|
+
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
|
+
}, Lr = [], Or = /* @__PURE__ */ oe(
|
|
5174
|
+
Cr,
|
|
5175
|
+
Rr,
|
|
5176
|
+
Lr,
|
|
5132
5177
|
!1,
|
|
5133
5178
|
null,
|
|
5134
5179
|
null,
|
|
5135
5180
|
null,
|
|
5136
5181
|
null
|
|
5137
5182
|
);
|
|
5138
|
-
const
|
|
5139
|
-
function
|
|
5140
|
-
n.component("CodeDiff",
|
|
5183
|
+
const Ir = Or.exports;
|
|
5184
|
+
function kr(n) {
|
|
5185
|
+
n.component("CodeDiff", Ir);
|
|
5141
5186
|
}
|
|
5142
|
-
const
|
|
5143
|
-
install:
|
|
5187
|
+
const $r = {
|
|
5188
|
+
install: kr,
|
|
5144
5189
|
hljs: Z
|
|
5145
5190
|
};
|
|
5146
5191
|
export {
|
|
5147
|
-
|
|
5148
|
-
|
|
5192
|
+
Ir as CodeDiff,
|
|
5193
|
+
$r as default,
|
|
5149
5194
|
Z as hljs
|
|
5150
5195
|
};
|