diff --git a/.eslintignore b/.eslintignore index 125f92a25..cc2f158aa 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ /public/js/semantic.dropdown.custom.js +/web_src/js/vendor/** diff --git a/.eslintrc b/.eslintrc index 4302886d7..a07802144 100644 --- a/.eslintrc +++ b/.eslintrc @@ -14,6 +14,7 @@ env: node: true globals: + __webpack_public_path__: true Clipboard: false CodeMirror: false Dropzone: false diff --git a/package-lock.json b/package-lock.json index 5f7211a01..463357a92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -639,6 +639,18 @@ "@babel/helper-plugin-utils": "^7.0.0" } }, + "@babel/plugin-transform-runtime": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.6.2.tgz", + "integrity": "sha512-cqULw/QB4yl73cS5Y0TZlQSjDvNkzDbu0FurTZyHlJpWE5T3PCMdnyV+xXoH1opr1ldyHODe3QAX3OMAii5NxA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/helper-plugin-utils": "^7.0.0", + "resolve": "^1.8.1", + "semver": "^5.5.1" + } + }, "@babel/plugin-transform-shorthand-properties": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", @@ -755,6 +767,15 @@ "semver": "^5.5.0" } }, + "@babel/runtime": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz", + "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, "@babel/template": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.0.tgz", @@ -834,9 +855,9 @@ "dev": true }, "@types/node": { - "version": "12.12.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.7.tgz", - "integrity": "sha512-E6Zn0rffhgd130zbCbAr/JdXfXkoOUFAKNs/rF8qnafSJ8KYaA/j3oz7dcwal+lYjLA7xvdd5J4wdYpCTlP8+w==", + "version": "12.12.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.8.tgz", + "integrity": "sha512-XLla8N+iyfjvsa0KKV+BP/iGSoTmwxsu5Ci5sM33z9TjohF72DEz95iNvD6pPmemvbQgxAv/909G73gUn8QR7w==", "dev": true }, "@types/unist": { @@ -1215,6 +1236,16 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -1766,9 +1797,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001009", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001009.tgz", - "integrity": "sha512-M3rEqHN6SaVjgo4bIik7HsGcWXsi+lI9WA0p51RPMFx5gXfduyOXWJrc0R4xBkSK1pgNf4CNgy5M+6H+WiEP8g==", + "version": "1.0.30001010", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001010.tgz", + "integrity": "sha512-RA5GH9YjFNea4ZQszdWgh2SC+dpLiRAg4VDQS2b5JRI45OxmbGrYocYHTa9x0bKMQUE7uvHkNPNffUr+pCxSGw==", "dev": true }, "caseless": { @@ -2106,7 +2137,8 @@ "confusing-browser-globals": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz", - "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==" + "integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==", + "dev": true }, "console-browserify": { "version": "1.2.0", @@ -2120,6 +2152,12 @@ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", @@ -2149,6 +2187,12 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "core-js": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.4.1.tgz", + "integrity": "sha512-KX/dnuY/J8FtEwbnrzmAjUYgLqtk+cxM86hfG60LGiW3MmltIc2yAmDgBgEkfm0blZhUrdr1Zd84J2Y14mLxzg==", + "dev": true + }, "core-js-compat": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.4.1.tgz", @@ -2195,6 +2239,16 @@ "resolve-from": "^3.0.0" } }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", @@ -2272,6 +2326,32 @@ "randomfill": "^1.0.3" } }, + "css-loader": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.2.0.tgz", + "integrity": "sha512-QTF3Ud5H7DaZotgdcJjGMvyDj5F3Pn1j/sC6VBEOVp94cbwqyIBdcs/quzj4MC1BKQSrTpQznegH/5giYbhnCQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.17", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.1.0", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.0.0", + "schema-utils": "^2.0.0" + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -2352,6 +2432,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -2444,6 +2525,23 @@ "dev": true, "requires": { "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "doctrine": { @@ -2651,6 +2749,7 @@ "version": "1.16.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.0.tgz", "integrity": "sha512-xdQnfykZ9JMEiasTAJZJdMWCQ1Vm00NBw79/AWi7ELfZuuPCSOMDZbT9mkOfSctVtfhb+sAAzrm+j//GjjLHLg==", + "dev": true, "requires": { "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", @@ -2668,6 +2767,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -2752,12 +2852,165 @@ "version": "14.0.0", "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.0.0.tgz", "integrity": "sha512-2IDHobw97upExLmsebhtfoD3NAKhV4H0CJWP3Uprd/uk+cHuWYOczPVxQ8PxLFUAw7o3Th1RAU8u1DoUpr+cMA==", + "dev": true, "requires": { "confusing-browser-globals": "^1.0.7", "object.assign": "^4.1.0", "object.entries": "^1.1.0" } }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "dev": true, + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.4.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.0", + "read-pkg-up": "^2.0.0", + "resolve": "^1.11.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "eslint-scope": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", @@ -3295,25 +3548,29 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true, "optional": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, "optional": true, "requires": { @@ -3323,13 +3580,15 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "optional": true, "requires": { @@ -3339,37 +3598,43 @@ }, "chownr": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "optional": true, "requires": { @@ -3378,25 +3643,29 @@ }, "deep-extend": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -3405,13 +3674,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -3427,7 +3698,8 @@ }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "optional": true, "requires": { @@ -3441,13 +3713,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "bundled": true, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "optional": true, "requires": { @@ -3456,7 +3730,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -3465,7 +3740,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -3475,19 +3751,22 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true, "optional": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "optional": true, "requires": { @@ -3496,13 +3775,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "optional": true, "requires": { @@ -3511,13 +3792,15 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true, "optional": true }, "minipass": { "version": "2.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, "optional": true, "requires": { @@ -3527,7 +3810,8 @@ }, "minizlib": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "dev": true, "optional": true, "requires": { @@ -3536,7 +3820,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "optional": true, "requires": { @@ -3545,13 +3830,15 @@ }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, "optional": true }, "needle": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "dev": true, "optional": true, "requires": { @@ -3562,7 +3849,8 @@ }, "node-pre-gyp": { "version": "0.12.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "dev": true, "optional": true, "requires": { @@ -3580,7 +3868,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -3590,13 +3879,15 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, "requires": { @@ -3606,7 +3897,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -3618,19 +3910,22 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "optional": true, "requires": { @@ -3639,19 +3934,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -3661,19 +3959,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "optional": true, "requires": { @@ -3685,7 +3986,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -3693,7 +3995,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -3708,7 +4011,8 @@ }, "rimraf": { "version": "2.6.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "optional": true, "requires": { @@ -3717,43 +4021,50 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.7.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "optional": true, "requires": { @@ -3764,7 +4075,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -3773,7 +4085,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "optional": true, "requires": { @@ -3782,13 +4095,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, "optional": true, "requires": { @@ -3803,13 +4118,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "optional": true, "requires": { @@ -3818,13 +4135,15 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true, "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true, "optional": true } @@ -3833,7 +4152,8 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, "functional-red-black-tree": { "version": "1.0.1", @@ -4006,6 +4326,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -4019,7 +4340,8 @@ "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true }, "has-value": { "version": "1.0.0", @@ -4222,6 +4544,15 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "icss-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", + "dev": true, + "requires": { + "postcss": "^7.0.14" + } + }, "ieee754": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", @@ -4459,7 +4790,8 @@ "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true }, "is-data-descriptor": { "version": "0.1.4", @@ -4484,7 +4816,8 @@ "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true }, "is-decimal": { "version": "1.0.3", @@ -4601,6 +4934,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, "requires": { "has": "^1.0.1" } @@ -4621,6 +4955,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, "requires": { "has-symbols": "^1.0.0" } @@ -4681,6 +5016,27 @@ "dev": true, "optional": true }, + "jest-worker": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", + "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -4852,21 +5208,21 @@ } }, "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", + "parse-json": "^2.2.0", + "pify": "^2.0.0", "strip-bom": "^3.0.0" }, "dependencies": { "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } } @@ -4956,6 +5312,14 @@ "dev": true, "requires": { "yallist": "^3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, "make-dir": { @@ -5108,30 +5472,137 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "camelcase": "^4.1.0" + "locate-path": "^2.0.0" } - } - } - }, - "merge2": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "braces": "^2.3.1", "define-property": "^2.0.2", @@ -5230,14 +5701,6 @@ "dev": true, "requires": { "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } } }, "minipass-collect": { @@ -5297,14 +5760,6 @@ "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } } }, "mississippi": { @@ -5587,12 +6042,14 @@ "object-inspect": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true }, "object-visit": { "version": "1.0.1", @@ -5607,6 +6064,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", @@ -5618,6 +6076,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "dev": true, "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.12.0", @@ -5634,6 +6093,18 @@ "isobject": "^3.0.1" } }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5795,13 +6266,12 @@ } }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "error-ex": "^1.2.0" } }, "parse-passwd": { @@ -5853,18 +6323,18 @@ "dev": true }, "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "^2.0.0" }, "dependencies": { "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } } @@ -6017,6 +6487,47 @@ "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", "dev": true }, + "postcss-modules-extract-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", + "dev": true, + "requires": { + "postcss": "^7.0.5" + } + }, + "postcss-modules-local-by-default": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz", + "integrity": "sha512-jM/V8eqM4oJ/22j0gx4jrp63GSvDH6v86OqyTHHUvk4/k1vceipZsaymiZ5PvocqZOl5SFHiFJqjs3la0wnfIQ==", + "dev": true, + "requires": { + "icss-utils": "^4.1.1", + "postcss": "^7.0.16", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.0" + } + }, + "postcss-modules-scope": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz", + "integrity": "sha512-91Rjps0JnmtUB0cujlc8KIKCsJXWjzuxGeT/+Q2i2HXKZ7nBUeF9YQTZZTNvHVoNYj1AthsjnGLtqDUE0Op79A==", + "dev": true, + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + } + }, + "postcss-modules-values": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", + "dev": true, + "requires": { + "icss-utils": "^4.0.0", + "postcss": "^7.0.6" + } + }, "postcss-reporter": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz", @@ -6064,12 +6575,12 @@ } }, "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "cssesc": "^3.0.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -6296,24 +6807,24 @@ } }, "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "^4.0.0", + "load-json-file": "^2.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "path-type": "^2.0.0" } }, "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "read-pkg": "^2.0.0" }, "dependencies": { "find-up": { @@ -6412,6 +6923,12 @@ "regenerate": "^1.4.0" } }, + "regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", + "dev": true + }, "regenerator-transform": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", @@ -6769,14 +7286,13 @@ "dev": true }, "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz", + "integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==", "dev": true, "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1" } }, "semver": { @@ -6786,9 +7302,9 @@ "dev": true }, "serialize-javascript": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", - "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.0.tgz", + "integrity": "sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ==", "dev": true }, "set-blocking": { @@ -7263,6 +7779,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "dev": true, "requires": { "define-properties": "^1.1.3", "function-bind": "^1.1.1" @@ -7272,6 +7789,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "dev": true, "requires": { "define-properties": "^1.1.3", "function-bind": "^1.1.1" @@ -7339,6 +7857,16 @@ "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", "dev": true }, + "style-loader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.0.0.tgz", + "integrity": "sha512-B0dOCFwv7/eY31a5PCieNwMgMhVGFe9w+rh7s/Bx8kfFkrth9zfTZquoYvdw8URgiqxObQKcpW51Ugz1HjfdZw==", + "dev": true, + "requires": { + "loader-utils": "^1.2.3", + "schema-utils": "^2.0.1" + } + }, "style-search": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", @@ -7456,6 +7984,17 @@ "picomatch": "^2.0.5" } }, + "postcss-selector-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "dev": true, + "requires": { + "dot-prop": "^4.1.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -7587,59 +8126,95 @@ } }, "terser-webpack-plugin": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz", - "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.2.1.tgz", + "integrity": "sha512-jwdauV5Al7zopR6OAYvIIRcxXCSvLjZjr7uZE8l2tIWb/ryrGN48sJftqGf5k9z09tWhajx53ldp0XPI080YnA==", "dev": true, "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.7.0", + "cacache": "^13.0.1", + "find-cache-dir": "^3.0.0", + "jest-worker": "^24.9.0", + "schema-utils": "^2.5.0", + "serialize-javascript": "^2.1.0", "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" + "terser": "^4.3.9", + "webpack-sources": "^1.4.3" }, "dependencies": { - "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "find-cache-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.1.0.tgz", + "integrity": "sha512-zw+EFiNBNPgI2NTrKkDd1xd7q0cs6wr/iWnr/oUkI0yF9K9GqQ+riIt4aiyFaaqpaWbxPrJXHI+QvmNUQbX+0Q==", "dev": true, "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" + "commondir": "^1.0.1", + "make-dir": "^3.0.0", + "pkg-dir": "^4.1.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", + "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "figgy-pudding": "^3.5.1" + "find-up": "^4.0.0" } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -8306,6 +8881,29 @@ "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", "dev": true }, + "cacache": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -8315,6 +8913,55 @@ "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "serialize-javascript": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "terser-webpack-plugin": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz", + "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.7.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + } } } }, @@ -8580,9 +9227,9 @@ "dev": true }, "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 469b5a2ea..1f379fe97 100644 --- a/package.json +++ b/package.json @@ -6,16 +6,20 @@ }, "devDependencies": { "@babel/core": "7.7.2", + "@babel/plugin-transform-runtime": "7.6.2", "@babel/preset-env": "7.7.1", + "@babel/runtime": "7.7.2", "autoprefixer": "9.7.1", "babel-loader": "8.0.6", "core-js": "3.4.1", + "css-loader": "3.2.0", "eslint": "6.6.0", "eslint-config-airbnb-base": "14.0.0", "eslint-plugin-import": "2.18.2", "less": "3.10.3", "less-plugin-clean-css": "1.5.1", "postcss-cli": "6.1.3", + "style-loader": "1.0.0", "stylelint": "11.1.1", "stylelint-config-standard": "19.0.0", "terser-webpack-plugin": "2.2.1", diff --git a/public/js/gitgraph.js b/public/js/gitgraph.js new file mode 100644 index 000000000..d4a9ac841 --- /dev/null +++ b/public/js/gitgraph.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,,,,,,,function(t,n,e){(t.exports=e(10)(!1)).push([t.i,"#git-graph-container, #rel-container {float:left;}\n#rel-container {max-width:30%; overflow-x:auto;}\n#git-graph-container {overflow-x:auto; width:100%}\n#git-graph-container li {list-style-type:none;height:20px;line-height:20px; white-space:nowrap;}\n#git-graph-container li .node-relation {font-family:'Bitstream Vera Sans Mono', 'Courier', monospace;}\n#git-graph-container li .author {color:#666666;}\n#git-graph-container li .time {color:#999999;font-size:80%}\n#git-graph-container li a {color:#000000;}\n#git-graph-container li a:hover {text-decoration:underline;}\n#git-graph-container li a em {color:#BB0000;border-bottom:1px dotted #BBBBBB;text-decoration:none;font-style:normal;}\n#rev-container {width:100%}\n#rev-list {margin:0;padding:0 5px 0 5px;min-width:95%}\n#graph-raw-list {margin:0px;}\n",""])},function(t,n,e){"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=function(t,n){var e=t[1]||"",i=t[3];if(!i)return e;if(n&&"function"==typeof btoa){var r=(a=i,c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot).concat(t," */")}));return[e].concat(o).concat([r]).join("\n")}var a,c,l;return[e].join("\n")}(n,t);return n[2]?"@media ".concat(n[2],"{").concat(e,"}"):e})).join("")},n.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;rj.length&&-1!==(x=s("*",E))&&-1===s("_",j)&&-1===s("/",j)&&-1===s("\\",j)&&i.splice(x+1,1)}for(R=j.length,o=0,l=0,P=0,M=-1;oM&&(j[o]="|",r="|")," "===r&&j[o+1]&&"_"===j[o+1]&&j[o-1]&&"|"===j[o-1]&&(j.splice(o,1),j[o]="/",r="/"),-1===_&&"/"===r&&j[o-1]&&"|"===j[o-1]&&i.splice(l,0,h()),("/"===r||"\\"===r)&&("/"!==r||-1!==u(N))&&-1!==(z=Math.max(s("|",j),s("*",j)))&&zC&&i.splice(C,i.length-C),o=0;o\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n var styles = listToStyles(list, options);\n addStylesToDom(styles, options);\n return function update(newList) {\n var mayRemove = [];\n\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n\n if (domStyle) {\n domStyle.refs--;\n mayRemove.push(domStyle);\n }\n }\n\n if (newList) {\n var newStyles = listToStyles(newList, options);\n addStylesToDom(newStyles, options);\n }\n\n for (var _i = 0; _i < mayRemove.length; _i++) {\n var _domStyle = mayRemove[_i];\n\n if (_domStyle.refs === 0) {\n for (var j = 0; j < _domStyle.parts.length; j++) {\n _domStyle.parts[j]();\n }\n\n delete stylesInDom[_domStyle.id];\n }\n }\n };\n};","/*\n * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD 3-Clause\n * Copyright (c) 2011, Terrence Lee \n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of the nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nexport default function gitGraph(canvas, rawGraphList, config) {\n if (!canvas.getContext) {\n return;\n }\n\n if (typeof config === 'undefined') {\n config = {\n unitSize: 20,\n lineWidth: 3,\n nodeRadius: 4\n };\n }\n\n const flows = [];\n const graphList = [];\n\n const ctx = canvas.getContext('2d');\n\n const devicePixelRatio = window.devicePixelRatio || 1;\n const backingStoreRatio = ctx.webkitBackingStorePixelRatio\n || ctx.mozBackingStorePixelRatio\n || ctx.msBackingStorePixelRatio\n || ctx.oBackingStorePixelRatio\n || ctx.backingStorePixelRatio || 1;\n\n const ratio = devicePixelRatio / backingStoreRatio;\n\n const init = function () {\n let maxWidth = 0;\n let i;\n const l = rawGraphList.length;\n let row;\n let midStr;\n\n for (i = 0; i < l; i++) {\n midStr = rawGraphList[i].replace(/\\s+/g, ' ').replace(/^\\s+|\\s+$/g, '');\n\n maxWidth = Math.max(midStr.replace(/(_|\\s)/g, '').length, maxWidth);\n\n row = midStr.split('');\n\n graphList.unshift(row);\n }\n\n const width = maxWidth * config.unitSize;\n const height = graphList.length * config.unitSize;\n\n canvas.width = width * ratio;\n canvas.height = height * ratio;\n\n canvas.style.width = `${width}px`;\n canvas.style.height = `${height}px`;\n\n ctx.lineWidth = config.lineWidth;\n ctx.lineJoin = 'round';\n ctx.lineCap = 'round';\n\n ctx.scale(ratio, ratio);\n };\n\n const genRandomStr = function () {\n const chars = '0123456789ABCDEF';\n const stringLength = 6;\n let randomString = '', rnum, i;\n for (i = 0; i < stringLength; i++) {\n rnum = Math.floor(Math.random() * chars.length);\n randomString += chars.substring(rnum, rnum + 1);\n }\n\n return randomString;\n };\n\n const findFlow = function (id) {\n let i = flows.length;\n\n while (i-- && flows[i].id !== id);\n\n return i;\n };\n\n const findColomn = function (symbol, row) {\n let i = row.length;\n\n while (i-- && row[i] !== symbol);\n\n return i;\n };\n\n const findBranchOut = function (row) {\n if (!row) {\n return -1;\n }\n\n let i = row.length;\n\n while (i--\n && !(row[i - 1] && row[i] === '/' && row[i - 1] === '|')\n && !(row[i - 2] && row[i] === '_' && row[i - 2] === '|'));\n\n return i;\n };\n\n const findLineBreak = function (row) {\n if (!row) {\n return -1;\n }\n\n let i = row.length;\n\n while (i--\n && !(row[i - 1] && row[i - 2] && row[i] === ' ' && row[i - 1] === '|' && row[i - 2] === '_'));\n\n return i;\n };\n\n const genNewFlow = function () {\n let newId;\n\n do {\n newId = genRandomStr();\n } while (findFlow(newId) !== -1);\n\n return { id: newId, color: `#${newId}` };\n };\n\n // Draw methods\n const drawLine = function (moveX, moveY, lineX, lineY, color) {\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(moveX, moveY);\n ctx.lineTo(lineX, lineY);\n ctx.stroke();\n };\n\n const drawLineRight = function (x, y, color) {\n drawLine(x, y + config.unitSize / 2, x + config.unitSize, y + config.unitSize / 2, color);\n };\n\n const drawLineUp = function (x, y, color) {\n drawLine(x, y + config.unitSize / 2, x, y - config.unitSize / 2, color);\n };\n\n const drawNode = function (x, y, color) {\n ctx.strokeStyle = color;\n\n drawLineUp(x, y, color);\n\n ctx.beginPath();\n ctx.arc(x, y, config.nodeRadius, 0, Math.PI * 2, true);\n ctx.fill();\n };\n\n const drawLineIn = function (x, y, color) {\n drawLine(x + config.unitSize, y + config.unitSize / 2, x, y - config.unitSize / 2, color);\n };\n\n const drawLineOut = function (x, y, color) {\n drawLine(x, y + config.unitSize / 2, x + config.unitSize, y - config.unitSize / 2, color);\n };\n\n const draw = function (graphList) {\n let colomn, colomnIndex, prevColomn, condenseIndex, breakIndex = -1;\n let x, y;\n let color;\n let nodePos;\n let tempFlow;\n let prevRowLength = 0;\n let flowSwapPos = -1;\n let lastLinePos;\n let i, l;\n let condenseCurrentLength, condensePrevLength = 0;\n\n let inlineIntersect = false;\n\n // initiate color array for first row\n for (i = 0, l = graphList[0].length; i < l; i++) {\n if (graphList[0][i] !== '_' && graphList[0][i] !== ' ') {\n flows.push(genNewFlow());\n }\n }\n\n y = (canvas.height / ratio) - config.unitSize * 0.5;\n\n // iterate\n for (i = 0, l = graphList.length; i < l; i++) {\n x = config.unitSize * 0.5;\n\n const currentRow = graphList[i];\n const nextRow = graphList[i + 1];\n const prevRow = graphList[i - 1];\n\n flowSwapPos = -1;\n\n condenseCurrentLength = currentRow.filter((val) => {\n return (val !== ' ' && val !== '_');\n }).length;\n\n // pre process begin\n // use last row for analysing\n if (prevRow) {\n if (!inlineIntersect) {\n // intersect might happen\n for (colomnIndex = 0; colomnIndex < prevRowLength; colomnIndex++) {\n if (prevRow[colomnIndex + 1]\n && (prevRow[colomnIndex] === '/' && prevRow[colomnIndex + 1] === '|')\n || ((prevRow[colomnIndex] === '_' && prevRow[colomnIndex + 1] === '|')\n && (prevRow[colomnIndex + 2] === '/'))) {\n flowSwapPos = colomnIndex;\n\n // swap two flow\n tempFlow = { id: flows[flowSwapPos].id, color: flows[flowSwapPos].color };\n\n flows[flowSwapPos].id = flows[flowSwapPos + 1].id;\n flows[flowSwapPos].color = flows[flowSwapPos + 1].color;\n\n flows[flowSwapPos + 1].id = tempFlow.id;\n flows[flowSwapPos + 1].color = tempFlow.color;\n }\n }\n }\n\n if (condensePrevLength < condenseCurrentLength\n && ((nodePos = findColomn('*', currentRow)) !== -1\n && (findColomn('_', currentRow) === -1))) {\n flows.splice(nodePos - 1, 0, genNewFlow());\n }\n\n if (prevRowLength > currentRow.length\n && (nodePos = findColomn('*', prevRow)) !== -1) {\n if (findColomn('_', currentRow) === -1\n && findColomn('/', currentRow) === -1\n && findColomn('\\\\', currentRow) === -1) {\n flows.splice(nodePos + 1, 1);\n }\n }\n } // done with the previous row\n\n prevRowLength = currentRow.length; // store for next round\n colomnIndex = 0; // reset index\n condenseIndex = 0;\n condensePrevLength = 0;\n breakIndex = -1; // reset break index\n while (colomnIndex < currentRow.length) {\n colomn = currentRow[colomnIndex];\n\n if (colomn !== ' ' && colomn !== '_') {\n ++condensePrevLength;\n }\n\n // check and fix line break in next row\n if (colomn === '/' && currentRow[colomnIndex - 1] && currentRow[colomnIndex - 1] === '|') {\n if ((breakIndex = findLineBreak(nextRow)) !== -1) {\n nextRow.splice(breakIndex, 1);\n }\n }\n // if line break found replace all '/' with '|' after breakIndex in previous row\n if (breakIndex !== -1 && colomn === '/' && colomnIndex > breakIndex) {\n currentRow[colomnIndex] = '|';\n colomn = '|';\n }\n\n if (colomn === ' '\n && currentRow[colomnIndex + 1]\n && currentRow[colomnIndex + 1] === '_'\n && currentRow[colomnIndex - 1]\n && currentRow[colomnIndex - 1] === '|') {\n currentRow.splice(colomnIndex, 1);\n\n currentRow[colomnIndex] = '/';\n colomn = '/';\n }\n\n // create new flow only when no intersect happened\n if (flowSwapPos === -1\n && colomn === '/'\n && currentRow[colomnIndex - 1]\n && currentRow[colomnIndex - 1] === '|') {\n flows.splice(condenseIndex, 0, genNewFlow());\n }\n\n // change \\ and / to | when it's in the last position of the whole row\n if (colomn === '/' || colomn === '\\\\') {\n if (!(colomn === '/' && findBranchOut(nextRow) === -1)) {\n if ((lastLinePos = Math.max(findColomn('|', currentRow),\n findColomn('*', currentRow))) !== -1\n && (lastLinePos < colomnIndex - 1)) {\n while (currentRow[++lastLinePos] === ' ');\n\n if (lastLinePos === colomnIndex) {\n currentRow[colomnIndex] = '|';\n }\n }\n }\n }\n\n if (colomn === '*'\n && prevRow\n && prevRow[condenseIndex + 1] === '\\\\') {\n flows.splice(condenseIndex + 1, 1);\n }\n\n if (colomn !== ' ') {\n ++condenseIndex;\n }\n\n ++colomnIndex;\n }\n\n condenseCurrentLength = currentRow.filter((val) => {\n return (val !== ' ' && val !== '_');\n }).length;\n\n // do some clean up\n if (flows.length > condenseCurrentLength) {\n flows.splice(condenseCurrentLength, flows.length - condenseCurrentLength);\n }\n\n colomnIndex = 0;\n\n // a little inline analysis and draw process\n while (colomnIndex < currentRow.length) {\n colomn = currentRow[colomnIndex];\n prevColomn = currentRow[colomnIndex - 1];\n\n if (currentRow[colomnIndex] === ' ') {\n currentRow.splice(colomnIndex, 1);\n x += config.unitSize;\n\n continue;\n }\n\n // inline interset\n if ((colomn === '_' || colomn === '/')\n && currentRow[colomnIndex - 1] === '|'\n && currentRow[colomnIndex - 2] === '_') {\n inlineIntersect = true;\n\n tempFlow = flows.splice(colomnIndex - 2, 1)[0];\n flows.splice(colomnIndex - 1, 0, tempFlow);\n currentRow.splice(colomnIndex - 2, 1);\n\n colomnIndex -= 1;\n } else {\n inlineIntersect = false;\n }\n\n color = flows[colomnIndex].color;\n\n switch (colomn) {\n case '_':\n drawLineRight(x, y, color);\n\n x += config.unitSize;\n break;\n\n case '*':\n drawNode(x, y, color);\n break;\n\n case '|':\n drawLineUp(x, y, color);\n break;\n\n case '/':\n if (prevColomn\n && (prevColomn === '/'\n || prevColomn === ' ')) {\n x -= config.unitSize;\n }\n\n drawLineOut(x, y, color);\n\n x += config.unitSize;\n break;\n\n case '\\\\':\n drawLineIn(x, y, color);\n break;\n }\n\n ++colomnIndex;\n }\n\n y -= config.unitSize;\n }\n };\n\n init();\n draw(graphList);\n}\n// @end-license\n","var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!./gitgraph.custom.css\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/public/js/index.js b/public/js/index.js index 6e51c20d9..eb5fddf57 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,2 +1,2 @@ -!function(e){var t={};function a(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(i,n,function(t){return e[t]}.bind(null,n));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){a(1),e.exports=a(2)},function(e,t){function a(e){return jQuery("
").text(e).html()}var i,n,o,r,s;function c(e){var t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("preview"),'"]')).click((function(){var a=$(this);$.post(a.data("url"),{_csrf:i,mode:"gfm",context:a.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(a){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(a),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})),w()}function l(){var e,t;0!==$(".edit.form").length&&(!function(e){var t=e.find(".tabular.menu");t.find(".item").tab();var a=t.find('.item[data-tab="'.concat(t.data("preview"),'"]'));a.length&&(o=a.data("preview-file-modes").split(","),a.click((function(){var a=$(this);$.post(a.data("url"),{_csrf:i,mode:"gfm",context:a.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(a){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(a),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})))}($(".edit.form")),e=$(".edit.form"),(t=e.find(".tabular.menu")).find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("diff"),'"]')).click((function(){var a=$(this);$.post(a.data("url"),{_csrf:i,context:a.data("context"),content:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(a){var i=e.find('.tab.segment[data-tab="'.concat(t.data("diff"),'"]'));i.html(a),emojify.run(i[0])}))})))}function d(e,t,a,n){return new Promise((function(o){$.ajax({type:"POST",url:e,data:{_csrf:i,action:t,issue_ids:a,id:n},success:o})}))}function u(){window.location.reload()}function h(e){e.each((function(){var e=this;e.addEventListener("paste",(function(t){!function(e,t){if(e.clipboardData){var a=e.clipboardData.items;if(void 0!==a)for(var i=0;i')).val(i.uuid);$(".files").append(o)}))}))}),!1)}))}function f(){var e;0!==$(".comment.form").length&&((e=$(".ui.select-branch")).find(".reference-list-menu").find(".item:not(.no-select)").click((function(){var t=$(this).data("id");$($(this).data("id-selector")).val(t),e.find(".ui .branch-name").text(t)})),e.find(".reference.column").click((function(){return e.find(".scrolling.reference-list-menu").css("display","none"),e.find(".reference .text").removeClass("black"),$($(this).data("target")).css("display","block"),$(this).find(".text").addClass("black"),!1})),c($(".comment.form")),h($(".comment.form textarea")),t("select-label","labels"),t("select-assignees","assignees"),t("select-assignees-modify","assignees"),i(".select-milestone","#milestone_id"),i(".select-assignee","#assignee_id"));function t(e,t){var a=$(".ui.".concat(t,".list")),i=a.find(".no-select"),n=$(".".concat(e," .menu")),o="update"===n.data("action"),r={};$(".".concat(e)).dropdown("setting","onHide",(function(){if(o="update"===n.data("action")){var e=[];Object.keys(r).forEach((function(t){var a=r[t],i=d(a["update-url"],a.action,a["issue-id"],t);e.push(i)})),Promise.all(e).then(u)}})),n.find(".item:not(.no-select)").click((function(){if("select-assignees-modify"===e)return $(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check")),d(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")),n.data("action","update"),!1;$(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":n.data("update-url"),action:"detach","issue-id":n.data("issue-id")})):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":n.data("update-url"),action:"attach","issue-id":n.data("issue-id")}));var t=[];return $(this).parent().find(".item").each((function(){$(this).hasClass("checked")?(t.push($(this).data("id")),$($(this).data("id-selector")).removeClass("hide")):$($(this).data("id-selector")).addClass("hide")})),0===t.length?i.removeClass("hide"):i.addClass("hide"),$($(this).parent().data("id")).val(t.join(",")),!1})),n.find(".no-select.item").click((function(){(o||"select-assignees-modify"===e)&&d(n.data("update-url"),"clear",n.data("issue-id"),"").then(u),$(this).parent().find(".item").each((function(){$(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")})),a.find(".item").each((function(){$(this).addClass("hide")})),i.removeClass("hide"),$($(this).parent().data("id")).val("")}))}function i(e,t){var i=$("".concat(e," .menu")),n=$(".ui".concat(e,".list")),o="update"===i.data("action");i.find(".item:not(.no-select)").click((function(){switch($(this).parent().find(".item").each((function(){$(this).removeClass("selected active")})),$(this).addClass("selected active"),o&&d(i.data("update-url"),"",i.data("issue-id"),$(this).data("id")).then(u),t){case"#milestone_id":n.find(".selected").html('')).val(t.uuid);s.append(a)})),this.on("removedfile",(function(e){e.name in l&&($("#".concat(l[e.name].uuid)).remove(),r.data("remove-url")&&r.data("csrf")&&!l[e.name].submitted&&$.post(r.data("remove-url"),{file:l[e.name].uuid,_csrf:r.data("csrf")}))})),this.on("submit",(function(){$.each(l,(function(e){l[e].submitted=!0}))})),this.on("reload",(function(){$.getJSON(a.data("attachment-url"),(function(e){var t=r.get(0).dropzone;t.removeAllFiles(!0),s.empty(),$.each(e,(function(){var e="".concat(r.data("upload-url"),"/").concat(this.uuid);t.emit("addedfile",this),t.emit("thumbnail",this,e),t.emit("complete",this),t.files.push(this),l[this.name]={submitted:!0,uuid:this.uuid},r.find("img[src='".concat(e,"']")).css("max-width","100%");var a=$('')).val(this.uuid);s.append(a)}))}))}))}}),r.get(0).dropzone.emit("reload")}var d=a.find(".ui.comment.form"),u=d.find(".tabular.menu");u.attr("data-write",a.data("write")),u.attr("data-preview",a.data("preview")),u.find(".write.item").attr("data-tab",a.data("write")),u.find(".preview.item").attr("data-tab",a.data("preview")),d.find(".write.segment").attr("data-tab",a.data("write")),d.find(".preview.segment").attr("data-tab",a.data("preview")),c(d),a.find(".cancel.button").click((function(){n.show(),a.hide(),r.get(0).dropzone.emit("reload")})),a.find(".save.button").click((function(){n.show(),a.hide();var o=s.find("[name=files]").map((function(){return $(this).val()})).get();$.post(a.data("update-url"),{_csrf:i,content:e.val(),context:a.data("context"),files:o},(function(e){0===e.length?n.html($("#no-content").html()):(n.html(e.content),emojify.run(n[0]),$("pre code",n[0]).each((function(){hljs.highlightBlock(this)})));var a=t.parent();a.find(".ui.small.images").length?""===e.attachments?a.find(".ui.small.images").parent().remove():a.find(".ui.small.images").html(e.attachments):""!==e.attachments&&(a.append('
'),a.find(".ui.small.images").html(e.attachments)),r.get(0).dropzone.emit("submit"),r.get(0).dropzone.emit("reload")}))}))}else e=t.find("textarea");return a.show(),n.hide(),0===e.val().length&&e.val(o.text()),e.focus(),!1})),$(".delete-comment").click((function(){var e=$(this);return window.confirm(e.data("locale"))&&$.post(e.data("url"),{_csrf:i}).success((function(){$("#".concat(e.data("comment-id"))).remove()})),!1}));var r=$("#status-button");$("#comment-form .edit_area").keyup((function(){0===$(this).val().length?r.text(r.data("status")):r.text(r.data("status-and-comment"))})),r.click((function(){$("#status").val(r.data("status-val")),$("#comment-form").submit()}));var s=$(".merge-button > button");s.on("click",(function(e){e.preventDefault(),$(".".concat($(this).data("do"),"-fields")).show(),$(this).parent().hide()})),$(".merge-button > .dropdown").dropdown({onChange:function(e,t,a){a.data("do")&&(s.find(".button-text").text(a.text()),s.data("do",a.data("do")))}}),$(".merge-cancel").on("click",(function(e){e.preventDefault(),$(this).closest(".form").hide(),s.parent().show()})),function e(t){var a="";t||(t=$(document),a=".reactions > "),t.find("".concat(a,"a.label")).popup({position:"bottom left",metadata:{content:"title",title:"none"}}),t.find(".select-reaction > .menu > .item, ".concat(a,"a.label")).on("click",(function(t){var a=this;if(t.preventDefault(),!$(this).hasClass("disabled")){var n=$(this).hasClass("item")?$(this).closest(".select-reaction").data("action-url"):$(this).data("action-url"),o="".concat(n,"/").concat($(this).hasClass("blue")?"unreact":"react");$.ajax({type:"POST",url:o,data:{_csrf:i,content:$(this).data("content")}}).done((function(t){if(t&&(t.html||t.empty)){var i=$(a).closest(".content"),n=i.find(".segment.reactions");if(!t.empty&&n.length>0&&n.remove(),!t.empty){n=$('
');var o=i.find(".segment.bottom:first");o.length>0?n.insertBefore(o):n.appendTo(i),n.html(t.html);for(var r=n.find(".has-emoji"),s=0;s0&&$(".diff-counter").each((function(){var e=$(this),t=e.find("span[data-line].add").data("line"),a=e.find("span[data-line].del").data("line"),i=parseFloat(t)/(parseFloat(t)+parseFloat(a))*100;e.find(".bar .add").css("width","".concat(i,"%"))})),$("#repo-clone-ssh").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-https").removeClass("blue"),localStorage.setItem("repo-clone-protocol","ssh")})),$("#repo-clone-https").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-ssh").removeClass("blue"),localStorage.setItem("repo-clone-protocol","https")})),$("#repo-clone-url").click((function(){$(this).select()}));var l=$(".repository.compare.pull");l.length>0&&(d(".choose.branch .dropdown"),l.find("button.show-form").on("click",(function(e){e.preventDefault(),l.find(".pullrequest-form").show(),$(this).parent().hide()}))),$(".repository.settings.branches").length>0&&(d(".protected-branches .dropdown"),$(".enable-protection, .enable-whitelist").change((function(){this.checked?$($(this).data("target")).removeClass("disabled"):$($(this).data("target")).addClass("disabled")})))}function d(e){var t=$(e);t.dropdown({fullTextSearch:!0,selectOnKeydown:!1,onChange:function(e,t,a){a.data("url")&&(window.location.href=a.data("url"))},message:{noResults:t.data("no-results")}})}}function m(e){var t=Math.floor(Math.random()*Math.floor(1e6));return e.attr("data-write",e.attr("data-write")+t),e.attr("data-preview",e.attr("data-preview")+t),e.find(".item").each((function(){var e=$(this).attr("data-tab")+t;$(this).attr("data-tab",e)})),e.parent().find("*[data-tab='write']").attr("data-tab","write".concat(t)),e.parent().find("*[data-tab='preview']").attr("data-tab","preview".concat(t)),c(e.parent(".form")),t}function v(){$(".access-mode.menu .item").click((function(){var e=$(this).parent();$.post(e.data("url"),{_csrf:i,uid:e.data("uid"),mode:$(this).data("value")})}))}function g(){$(".js-quick-pull-choice-option").change((function(){"commit-to-new-branch"===$(this).val()?($(".quick-pull-branch-name").show(),$(".quick-pull-branch-name input").prop("required",!0)):($(".quick-pull-branch-name").hide(),$(".quick-pull-branch-name input").prop("required",!1)),$("#commit-button").text($(this).attr("button_text"))}));var e=$("#file-name");e.keyup((function(e){var t,a,i=$(".breadcrumb span.section"),n=$(".breadcrumb div.divider");if(8===e.keyCode&&0===$(this).getCursorPosition()&&i.length>0&&(t=i.last().find("a").text(),$(this).val(t+$(this).val()),$(this)[0].setSelectionRange(t.length,t.length),i.last().remove(),n.last().remove()),191===e.keyCode){a=$(this).val().split("/");for(var o=0;o
'.concat(t,"")).insertBefore($(this)),$('
/
').insertBefore($(this))):$(this).val(t),$(this)[0].setSelectionRange(0,0)}a=[],$(".breadcrumb span.section").each((function(){var e=$(this);e.find("a").length?a.push(e.find("a").text()):a.push(e.text())})),$(this).val()&&a.push($(this).val()),$("#tree_path").val(a.join("/"))})).trigger("keyup");var t=$(".repository.editor textarea#edit_area");if(t.length){var a=t.data("markdown-file-exts").split(","),n=t.data("line-wrap-extensions").split(",");e.on("keyup",(function(){var c,l,d,u,h,f,p=e.val();d=u="";var m=/.+\.([^.]+)$/.exec(p);m&&(d=m[1],u=".".concat(d));var v=CodeMirror.findModeByExtension(d),g=$("a[data-tab=preview]");if(v?(c=v.mode,l=v.mime,f=c):f=d,g.length&&f&&o&&o.length&&o.indexOf(f)>=0?(h=g.data("url"),g.data("url",h.replace(/(.*)\/.*/i,"$1/".concat(c))),g.show()):g.hide(),!(a.indexOf(u)>=0&&function(e){return s&&(s.toTextArea(),s=null),!!r||(r=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,previewRender:function(t,a){return setTimeout((function(){$.post(e.data("url"),{_csrf:i,mode:"gfm",context:e.data("context"),text:t},(function(e){a.innerHTML='
'.concat(e,"
"),emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]}),!0)}(t))&&(s||function(e){return r&&(r.toTextArea(),r=null),!!s||((s=CodeMirror.fromTextArea(e[0],{lineNumbers:!0})).on("change",(function(t,a){e.val(t.getValue())})),!0)}(t))){c&&(s.setOption("mode",l),CodeMirror.autoLoadMode(s,c)),n.indexOf(u)>=0?s.setOption("lineWrapping",!0):s.setOption("lineWrapping",!1);var b=e.val();0!==b.length&&(b=(b=b.split("/"))[b.length-1],$.getJSON(e.data("ec-url-prefix")+b,(function(e){"tab"===e.indent_style?(s.setOption("indentWithTabs",!0),s.setOption("extraKeys",{})):(s.setOption("indentWithTabs",!1),s.setOption("extraKeys",{Tab:function(e){var t=Array(parseInt(e.getOption("indentUnit"))+1).join(" ");e.replaceSelection(t)}})),s.setOption("indentUnit",e.indent_size||4),s.setOption("tabSize",e.tab_width||4)})))}})).trigger("keyup");var c=$("#commit-button"),l=$(".ui.edit.form");c.prop("disabled",!0),l.areYouSure({silent:!0,dirtyClass:"dirty-file",fieldSelector:":input:not(.commit-form-wrapper :input)",change:function(){var e=$(this).hasClass("dirty-file");c.prop("disabled",!e)}}),c.click((function(e){0===t.val().length&&($("#edit-empty-content-modal").modal({onApprove:function(){$(".edit.form").submit()}}).modal("show"),e.preventDefault())}))}}function b(){$(".user.settings.profile").length>0&&$("#username").keyup((function(){var e=$("#name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()}))}function w(){$(".ui.button").keypress((function(e){13!==e.keyCode&&32!==e.keyCode||$(this).click()}))}function k(){$(".code-view .linenums").length>0&&($(document).on("click",".lines-num span",(function(e){var t=$(this),a=t.parent().siblings(".lines-code").find("ol.linenums > li");q(a,a.filter("[rel=".concat(t.attr("id"),"]")),e.shiftKey?a.filter(".active").eq(0):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()})),$(window).on("hashchange",(function(){var e,t=window.location.hash.match(/^#(L\d+)-(L\d+)$/),a=$(".code-view ol.linenums > li");if(t)return e=a.filter(".".concat(t[1])),q(a,e,a.filter(".".concat(t[2]))),void $("html, body").scrollTop(e.offset().top-200);(t=window.location.hash.match(/^#(L|n)(\d+)$/))&&(e=a.filter(".L".concat(t[2])),q(a,e),$("html, body").scrollTop(e.offset().top-200))})).trigger("hashchange")),$(".ui.fold-code").on("click",(function(e){var t=$(e.target);t.hasClass("fa-chevron-down")?$(e.target).parent().next().slideUp("fast",(function(){t.removeClass("fa-chevron-down").addClass("fa-chevron-right")})):$(e.target).parent().next().slideDown("fast",(function(){t.removeClass("fa-chevron-right").addClass("fa-chevron-down")}))})),$(".ui.blob-excerpt").on("click",(function(e){!function e(t){var a=$(t.target),i=a.parent().parent();$.get("".concat(a.data("url"),"?").concat(a.data("query"),"&anchor=").concat(a.data("anchor")),(function(t){i.replaceWith(t),$('[data-anchor="'.concat(a.data("anchor"),'"]')).on("click",(function(t){e(t)}))}))}(e)}))}function _(e){$.ajax({url:"".concat(n,"/user/u2f/sign"),type:"POST",headers:{"X-Csrf-Token":i},data:JSON.stringify(e),contentType:"application/json; charset=utf-8"}).done((function(e){window.location.replace(e)})).fail((function(){C(1)}))}function y(e){(function(e){if(!("errorCode"in e))return!1;if(0===e.errorCode)return!1;return C(e.errorCode),!0})(e)||$.ajax({url:"".concat(n,"/user/settings/security/u2f/register"),type:"POST",headers:{"X-Csrf-Token":i},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",success:function(){u()},fail:function(){C(1)}})}function C(e){var t={browser:$("#unsupported-browser"),1:$("#u2f-error-1"),2:$("#u2f-error-2"),3:$("#u2f-error-3"),4:$("#u2f-error-4"),5:$(".u2f-error-5")};t[e].removeClass("hide"),Object.keys(t).forEach((function(a){a!==e&&t[a].addClass("hide")})),$("#u2f-error").modal("show")}function x(){$.post("".concat(n,"/user/settings/security/u2f/request_register"),{_csrf:i,name:$("#nickname").val()}).success((function(e){$("#nickname").closest("div.field").removeClass("error"),$("#register-device").modal("show"),null===e.registeredKeys&&(e.registeredKeys=[]),u2fApi.register(e.appId,e.registerRequests,e.registeredKeys,30).then(y).catch((function(e){C(void 0!==e?e.metaData.code:1)}))})).fail((function(e){409===e.status&&$("#nickname").closest("div.field").addClass("error")}))}function S(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function q(e,t,a){if(e.removeClass("active"),a){var i,n=parseInt(t.attr("rel").substr(1)),o=parseInt(a.attr("rel").substr(1));if(n!==o){n>o&&(i=n,n=o,o=i);for(var r=[],s=n;s<=o;s++)r.push(".L".concat(s));return e.filter(r.join(",")).addClass("active"),void S("#L".concat(n,"-L").concat(o))}}t.addClass("active"),S("#".concat(t.attr("rel")))}function T(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var a=$(".delete.modal".concat(t));return a.find(".name").text(e.data("name")),a.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:i,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}function L(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var a=$(".addall.modal".concat(t));return a.find(".name").text(e.data("name")),a.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:i,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1),$.fn.getCursorPosition=function(){var e=$(this).get(0),t=0;if("selectionStart"in e)t=e.selectionStart;else if("selection"in document){e.focus();var a=document.selection.createRange(),i=document.selection.createRange().text.length;a.moveStart("character",-e.value.length),t=a.text.length-i}return t},$(document).ready((function(){if(i=$("meta[name=_csrf]").attr("content"),n=$("meta[name=_suburl]").attr("content"),$(".time-since").each((function(){$(this).addClass("poping up").attr("data-content",$(this).attr("title")).attr("data-variation","inverted tiny").attr("title","")})),$(".dropdown:not(.custom)").dropdown(),$(".jump.dropdown").dropdown({action:"hide",onShow:function(){$(".poping.up").popup("hide")}}),$(".slide.up.dropdown").dropdown({transition:"slide up"}),$(".upward.dropdown").dropdown({direction:"upward"}),$(".ui.accordion").accordion(),$(".ui.checkbox").checkbox(),$(".ui.progress").progress({showActivity:!1}),$(".poping.up").popup(),$(".top.menu .poping.up").popup({onShow:function(){if($(".top.menu .menu.transition").hasClass("visible"))return!1}}),$(".tabular.menu .item").tab(),$(".tabable.menu .item").tab(),$(".toggle.button").click((function(){$($(this).data("target")).slideToggle(100)})),$("tr[data-href]").click((function(){window.location=$(this).data("href")})),"undefined"!=typeof hljs)for(var e=[].slice.call(document.querySelectorAll("pre code")||[]),t=0;t0){var r={};new Dropzone("#dropzone",{url:o.data("upload-url"),headers:{"X-Csrf-Token":i},maxFiles:o.data("max-file"),maxFilesize:o.data("max-size"),acceptedFiles:"*/*"===o.data("accepts")?null:o.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:o.data("default-message"),dictInvalidFileType:o.data("invalid-input-type"),dictFileTooBig:o.data("file-too-big"),dictRemoveFile:o.data("remove-file"),init:function(){this.on("success",(function(e,t){r[e.name]=t.uuid;var a=$('')).val(t.uuid);$(".files").append(a)})),this.on("removedfile",(function(e){e.name in r&&$("#".concat(r[e.name])).remove(),o.data("remove-url")&&o.data("csrf")&&$.post(o.data("remove-url"),{file:r[e.name],_csrf:o.data("csrf")})}))}})}emojify.setConfig({img_dir:"".concat(n,"/vendor/plugins/emojify/images"),ignore_emoticons:!0});for(var s=document.getElementsByClassName("has-emoji"),c=0;c0&&(i="".concat(a,"-").concat(e[a])),void 0===e[a]?e[a]=1:e[a]+=1,(t=t.wrap('
'))).append(''))}))})),$(".issue-checkbox").click((function(){$(".issue-checkbox").children("input:checked").length>0?($("#issue-filters").addClass("hide"),$("#issue-actions").removeClass("hide")):($("#issue-filters").removeClass("hide"),$("#issue-actions").addClass("hide"))})),$(".issue-action").click((function(){var e=this.dataset.action,t=this.dataset.elementId,a=$(".issue-checkbox").children("input:checked").map((function(){return this.dataset.issueId})).get().join(),i=this.dataset.url;"0"===t&&"/assignee"===i.substr(-9)&&(t="",e="clear"),d(i,e,a,t).then((function(){"close"!==e&&"open"!==e||$('.issue-checkbox input[type="checkbox"]').each((function(e,t){t.checked=!1})),u()}))})),$('.issue-checkbox input[type="checkbox"]:checked').first().each((function(e,t){t.checked=!1,$(t).click()})),w(),$("#search-user-box").search({minCharacters:2,apiSettings:{url:"".concat(n,"/api/v1/users/search?q={query}"),onResponse:function(e){var t=[];return $.each(e.data,(function(e,i){var n=i.login;i.full_name&&i.full_name.length>0&&(n+=" (".concat(a(i.full_name),")")),t.push({title:n,image:i.avatar_url})})),{results:t}}},searchFields:["login","full_name"],showNoResults:!1}),(y=$("#search-team-box")).search({minCharacters:2,apiSettings:{url:"".concat(n,"/api/v1/orgs/").concat(y.data("org"),"/teams/search?q={query}"),headers:{"X-Csrf-Token":i},onResponse:function(e){var t=[];return $.each(e.data,(function(e,a){var i="".concat(a.name," (").concat(a.permission," access)");t.push({title:i})})),{results:t}}},searchFields:["name","description"],showNoResults:!1}),(S=$("#search-repo-box")).search({minCharacters:2,apiSettings:{url:"".concat(n,"/api/v1/repos/search?q={query}&uid=").concat(S.data("uid")),onResponse:function(e){var t=[];return $.each(e.data,(function(e,a){t.push({title:a.full_name.split("/")[1],description:a.full_name})})),{results:t}}},searchFields:["full_name"],showNoResults:!1}),f(),0!==$(".install").length&&(""===$("#db_host").val()&&($("#db_host").val("127.0.0.1:3306"),$("#db_user").val("gitea"),$("#db_name").val("gitea")),$("#db_type").change((function(){var e=$(this).val();if("SQLite3"===e)return $("#sql_settings").hide(),$("#pgsql_settings").hide(),$("#mysql_settings").hide(),$("#sqlite_settings").show(),void("SQLite3"===e&&"data/gitea_tidb"===$("#db_path").val()&&$("#db_path").val("data/gitea.db"));var t={MySQL:"127.0.0.1:3306",PostgreSQL:"127.0.0.1:5432",MSSQL:"127.0.0.1:1433"};$("#sqlite_settings").hide(),$("#sql_settings").show(),$("#pgsql_settings").toggle("PostgreSQL"===e),$("#mysql_settings").toggle("MySQL"===e),$.each(t,(function(a,i){if($("#db_host").val()===i)return $("#db_host").val(t[e]),!1}))})),$("#offline-mode input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("check"),$("#federated-avatar-lookup").checkbox("uncheck"))})),$("#disable-gravatar input").change((function(){$(this).is(":checked")?$("#federated-avatar-lookup").checkbox("uncheck"):$("#offline-mode").checkbox("uncheck")})),$("#federated-avatar-lookup input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("uncheck"),$("#offline-mode").checkbox("uncheck"))})),$("#enable-openid-signin input").change((function(){$(this).is(":checked")?$("#disable-registration input").is(":checked")||$("#enable-openid-signup").checkbox("check"):$("#enable-openid-signup").checkbox("uncheck")})),$("#disable-registration input").change((function(){$(this).is(":checked")?($("#enable-captcha").checkbox("uncheck"),$("#enable-openid-signup").checkbox("uncheck")):$("#enable-openid-signup").checkbox("check")})),$("#enable-captcha input").change((function(){$(this).is(":checked")&&$("#disable-registration").checkbox("uncheck")}))),p(),(q=function(){var e=$("#auth_username").val(),t=$("#clone_addr").val();!$("#mirror").is(":checked")&&e&&e.length>0&&void 0!==t&&(t.startsWith("https://github.com")||t.startsWith("http://github.com"))?$("#migrate_items").show():$("#migrate_items").hide()})(),$("#clone_addr").on("input",q),$("#auth_username").on("input",q),$("#mirror").on("change",q),function(){var e=$(".repository.wiki textarea#edit_area"),t=0,a=null;if(e.length>0){var n=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,previewRender:function(o,r){return setTimeout((function(){var s=function(){t=0,null!=a&&(clearTimeout(a),a=null),$.post(e.data("url"),{_csrf:i,mode:"gfm",context:e.data("context"),text:o},(function(e){r.innerHTML='
'.concat(e,"
"),emojify.run($(".editor-preview")[0]),$(r).find("pre code").each((function(e,t){hljs.highlightBlock(t)}))}))};n.isSideBySideActive()?(++t>10&&s(),null!=a&&(clearTimeout(a),a=null),a=setTimeout(s,600)):s()}),0),n.isSideBySideActive()?r.innerHTML:"Loading..."},renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|",{name:"code-inline",action:function(e){var t=e.codemirror,a=t.getSelection();if(t.replaceSelection("`".concat(a,"`")),!a){var i=t.getCursor();t.setCursor(i.line,i.ch-1)}t.focus()},className:"fa fa-angle-right",title:"Add Inline Code"},"code","quote","|",{name:"checkbox-empty",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [ ] ".concat(t.getSelection())),t.focus()},className:"fa fa-square-o",title:"Add Checkbox (empty)"},{name:"checkbox-checked",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [x] ".concat(t.getSelection())),t.focus()},className:"fa fa-check-square-o",title:"Add Checkbox (checked)"},"|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]});$(n.codemirror.getInputField()).addClass("js-quick-submit"),setTimeout((function(){var e=$('.repository.wiki.new .previewtabs a[data-tab="write"]'),a=$('.repository.wiki.new .previewtabs a[data-tab="preview"]'),i=$(".editor-toolbar"),n=$(".editor-toolbar a.fa-eye"),o=$(".editor-toolbar a.fa-columns");e.on("click",(function(){i.hasClass("disabled-for-preview")&&n.click()})),a.on("click",(function(){i.hasClass("disabled-for-preview")||n.click()})),n.on("click",(function(){setTimeout((function(){i.hasClass("disabled-for-preview")?(e.hasClass("active")&&e.removeClass("active"),a.hasClass("active")||a.addClass("active")):(e.hasClass("active")||e.addClass("active"),a.hasClass("active")&&a.removeClass("active"))}),0)})),o.on("click",(function(){t=10}))}),0)}}(),l(),g(),0!==$(".organization").length&&$(".organization.settings.options").length>0&&$("#org_name").keyup((function(){var e=$("#org-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("org-name").toString().toLowerCase()?e.show():e.hide()})),0!==$(".edit.githook").length&&CodeMirror.autoLoadMode(CodeMirror.fromTextArea($("#content")[0],{lineNumbers:!0,mode:"shell"}),"shell"),function(){if(0!==$(".new.webhook").length){$(".events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").show()})),$(".non-events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").hide()}));var e=function(){var e="POST"===$("#http_method").val();$("#content_type").parent().parent()[e?"show":"hide"]()};e(),$("#http_method").change((function(){e()})),$("#test-delivery").click((function(){var e=$(this);e.addClass("loading disabled"),$.post(e.data("link"),{_csrf:i}).done(setTimeout((function(){window.location.href=e.data("redirect")}),5e3))}))}}(),function(){if(0!==$(".admin").length){if(($(".admin.new.user").length>0||$(".admin.edit.user").length>0)&&$("#login_type").change((function(){"0"===$(this).val().substring(0,1)?($("#login_name").removeAttr("required"),$(".non-local").hide(),$(".local").show(),$("#user_name").focus(),"required"===$(this).data("password")&&$("#password").attr("required","required")):($("#login_name").attr("required","required"),$(".non-local").show(),$(".local").hide(),$("#login_name").focus(),$("#password").removeAttr("required"))})),$(".admin.new.authentication").length>0&&($("#auth_type").change((function(){$(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size").hide(),$(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]").removeAttr("required"),$(".binddnrequired").removeClass("required");var e=$(this).val();switch(e){case"2":$(".ldap").show(),$(".binddnrequired input, .ldap div.required:not(.dldap) input").attr("required","required"),$(".binddnrequired").addClass("required");break;case"3":$(".smtp").show(),$(".has-tls").show(),$(".smtp div.required input, .has-tls").attr("required","required");break;case"4":$(".pam").show(),$(".pam input").attr("required","required");break;case"5":$(".dldap").show(),$(".dldap div.required:not(.ldap) input").attr("required","required");break;case"6":$(".oauth2").show(),$(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input").attr("required","required"),r()}"2"!==e&&"5"!==e||n(),"2"===e&&o()})),$("#auth_type").change(),$("#security_protocol").change(n),$("#use_paged_search").change(o),$("#oauth2_provider").change(r),$("#oauth2_use_custom_url").change(s)),$(".admin.edit.authentication").length>0){var e=$("#auth_type").val();"2"===e||"5"===e?($("#security_protocol").change(n),"2"===e&&$("#use_paged_search").change(o)):"6"===e&&($("#oauth2_provider").change(r),$("#oauth2_use_custom_url").change(s),r())}if($(".admin.notice")){var t=$("#detail-modal");$(".view-detail").click((function(){return t.find(".content p").text($(this).data("content")),t.modal("show"),!1}));var a=$(".select.table .ui.checkbox");$(".select.action").click((function(){switch($(this).data("action")){case"select-all":a.checkbox("check");break;case"deselect-all":a.checkbox("uncheck");break;case"inverse":a.checkbox("toggle")}})),$("#delete-selection").click((function(){var e=$(this);e.addClass("loading disabled");var t=[];a.each((function(){$(this).checkbox("is checked")&&t.push($(this).data("id"))})),$.post(e.data("link"),{_csrf:i,ids:t}).done((function(){window.location.href=e.data("redirect")}))}))}}function n(){$("#security_protocol").val()>0?$(".has-tls").show():$(".has-tls").hide()}function o(){$("#use_paged_search").prop("checked")?$(".search-page-size").show().find("input").attr("required","required"):$(".search-page-size").hide().find("input").removeAttr("required")}function r(){switch($(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url").hide(),$(".open_id_connect_auto_discovery_url input[required]").removeAttr("required"),$("#oauth2_provider").val()){case"github":case"gitlab":case"gitea":$(".oauth2_use_custom_url").show();break;case"openidConnect":$(".open_id_connect_auto_discovery_url input").attr("required","required"),$(".open_id_connect_auto_discovery_url").show()}s()}function s(){var e=$("#oauth2_provider").val();if($(".oauth2_use_custom_url_field").hide(),$(".oauth2_use_custom_url_field input[required]").removeAttr("required"),$("#oauth2_use_custom_url").is(":checked"))switch($("#oauth2_token_url").val()||$("#oauth2_token_url").val($("#".concat(e,"_token_url")).val()),$("#oauth2_auth_url").val()||$("#oauth2_auth_url").val($("#".concat(e,"_auth_url")).val()),$("#oauth2_profile_url").val()||$("#oauth2_profile_url").val($("#".concat(e,"_profile_url")).val()),$("#oauth2_email_url").val()||$("#oauth2_email_url").val($("#".concat(e,"_email_url")).val()),e){case"github":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url").show();break;case"gitea":case"gitlab":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url").show(),$("#oauth2_email_url").val("")}}}(),k(),function(){var e=document.getElementById("app");if(!e)return;Vue.component("repo-search",{delimiters:["${","}"],props:{searchLimit:{type:Number,default:10},suburl:{type:String,required:!0},uid:{type:Number,required:!0},organizations:{type:Array,default:[]},isOrganization:{type:Boolean,default:!0},canCreateOrganization:{type:Boolean,default:!1},organizationsTotalCount:{type:Number,default:0},moreReposLink:{type:String,default:""}},data:function(){return{tab:"repos",repos:[],reposTotalCount:0,reposFilter:"all",searchQuery:"",isLoading:!1,repoTypes:{all:{count:0,searchMode:""},forks:{count:0,searchMode:"fork"},mirrors:{count:0,searchMode:"mirror"},sources:{count:0,searchMode:"source"},collaborative:{count:0,searchMode:"collaborative"}}}},computed:{showMoreReposLink:function(){return this.repos.length>0&&this.repos.length'.concat(n[r],"
")).insertBefore(o);F.css("display","none"),R.show()}})).fail((function(t){if(422===t.status)if(t.responseJSON.invalidTopics.length>0){I.formatPrompt=t.responseJSON.message;var a=t.responseJSON.invalidTopics,i=z.children("a.ui.label");e.split(",").forEach((function(e,t){for(var n=0;n]*>?/gm,""),i=!1,n=[];if(z.find("div.label.visible.topic,a.label.visible").each((function(e,t){n.push(t.dataset.value)})),e.topics){for(var o=!1,r=0;r0&&!i?(t.success=!0,t.results.unshift({description:a,"data-value":a})):a.length>0&&i&&t.results.sort((function(e,t){return e.description.toLowerCase()===a.toLowerCase()?-1:t.description.toLowerCase()===a.toLowerCase()?1:e.description>t.description?-1:e.description').concat(a(n.repository.full_name),""),value:n.id})})),t},cache:!1},fullTextSearch:!0}),$(".menu a.label-filter-item").each((function(){$(this).click((function(e){if(e.altKey){e.preventDefault();var t=$(this).attr("href"),a=$(this).data("label-id"),i="labels=(-?[0-9]+%2c)*(".concat(a,")(%2c-?[0-9]+)*&");window.location=t.replace(new RegExp(i),"labels=$1-$2$3&")}}))})),$(".menu .ui.dropdown.label-filter").keydown((function(e){if(e.altKey&&13===e.keyCode){var t=$(".menu .ui.dropdown.label-filter .menu .item.selected");if(t.length>0){var a=$(t[0]),i=a.attr("href"),n=a.data("label-id"),o="labels=(-?[0-9]+%2c)*(".concat(n,")(%2c-?[0-9]+)*&");window.location=i.replace(new RegExp(o),"labels=$1-$2$3&")}}}))}(),$(".title_wip_desc > a").click((function(e){e.preventDefault();var t=$("#issue_title");t.focus();var a=t.val().trim().toUpperCase();for(var i in wipPrefixes)if(a.startsWith(wipPrefixes[i].toUpperCase()))return;t.val("".concat(wipPrefixes[0]," ").concat(t.val()))})),$(".show-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).removeClass("hide"),$("#code-preview-".concat(t)).removeClass("hide"),$("#hide-outdated-".concat(t)).removeClass("hide")})),$(".hide-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).addClass("hide"),$("#code-preview-".concat(t)).addClass("hide"),$("#show-outdated-".concat(t)).removeClass("hide")})),$("button.comment-form-reply").on("click",(function(e){e.preventDefault(),$(this).hide();var t=$(this).parent().find(".comment-form");t.removeClass("hide"),m(t.find(".menu"))})),0!==$(".repository.pull.diff").length&&($(".diff-detail-box.ui.sticky").sticky(),$(".btn-review").on("click",(function(e){e.preventDefault(),$(this).closest(".dropdown").find(".menu").toggle("visible")})).closest(".dropdown").find(".link.close").on("click",(function(e){e.preventDefault(),$(this).closest(".menu").toggle("visible")})),$(".code-view .lines-code,.code-view .lines-num").on("mouseenter",(function(){var e=$(this).closest("td");$(this).closest("tr").addClass(e.hasClass("lines-num-old")||e.hasClass("lines-code-old")?"focus-lines-old":"focus-lines-new")})).on("mouseleave",(function(){$(this).closest("tr").removeClass("focus-lines-new focus-lines-old")})),$(".add-code-comment").on("click",(function(e){if(!$(e.target).hasClass("btn-add-single")){e.preventDefault();var t=$(this).closest(".code-diff").hasClass("code-diff-split"),a=$(this).data("side"),i=$(this).data("idx"),n=$(this).data("path"),o=$("#pull_review_add_comment").html(),r=$(this).closest("tr"),s=r.next();s.hasClass("add-comment")||(s=$(''.concat(t?'':'',"")),r.after(s));var c=s.find(".add-comment-".concat(a)),l=c.find(".comment-code-cloud");0===l.length&&(c.html(o),m((l=c.find(".comment-code-cloud")).find(".menu")),c.find("input[name='line']").val(i),c.find("input[name='side']").val("left"===a?"previous":"proposed"),c.find("input[name='path']").val(n)),l.find("textarea").focus()}}))),function e(){var t=$("#repo_migrating");if($("#repo_migrating_failed").hide(),t){var a=t.attr("repo");if(void 0===a)return;$.ajax({type:"GET",url:"".concat(n,"/").concat(a,"/status"),data:{_csrf:i},complete:function(t){if(200===t.status&&t.responseJSON)return 0===t.responseJSON.status?void window.location.reload():void setTimeout((function(){e()}),2e3);$("#repo_migrating_progress").hide(),$("#repo_migrating_failed").show()}})}}(),function(){var e=$("#repo_template"),t=function(){var t=$("#template_units"),a=$("#non_template");""!==e.val()?(t.show(),a.hide()):(t.hide(),a.show())};e.change(t),t();var i=function(){$("#repo_template_search").dropdown({apiSettings:{url:"".concat(n,"/api/v1/repos/search?q={query}&template=true&priority_owner_id=").concat($("#uid").val()),onResponse:function(e){var t={success:!0,results:[]};return t.results.push({name:"",value:""}),$.each(e.data,(function(e,i){t.results.push({name:a(i.full_name),value:i.id})})),t},cache:!1},fullTextSearch:!0})};$("#uid").change(i),i()}(),$("#repo-clone-url").length>0)switch(localStorage.getItem("repo-clone-protocol")){case"ssh":0===$("#repo-clone-ssh").click().length&&$("#repo-clone-https").click();break;default:$("#repo-clone-https").click()}var J,H={"div.user.settings":b,"div.repository.settings.collaboration":v};for(J in H)if($(J).length>0){H[J]();break}var V=$("#clone_addr");V.change((function(){var e=$("#repo_name");V.val().length>0&&0===e.val().length&&e.val(V.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3])}))})),$((function(){0===$(".user.signin").length&&$("form:not(.ignore-dirty)").areYouSure(),$("#ssh-key-content").on("change paste keyup",(function(){var e=$(this).val().split(" "),t=$("#ssh-key-title");""===t.val()&&3===e.length&&""!==e[2]&&t.val(e[2])}))})),window.timeAddManual=function(){$(".mini.modal").modal({duration:200,onApprove:function(){$("#add_time_manual_form").submit()}}).modal("show")},window.toggleStopwatch=function(){$("#toggle_stopwatch_form").submit()},window.cancelStopwatch=function(){$("#cancel_stopwatch_form").submit()},window.initHeatmap=function(e,t,a){var i=document.getElementById(e);if(i){(a=a||{}).contributions=a.contributions||"contributions",a.no_contributions=a.no_contributions||"No contributions";var n=["${","}"];Vue.component("activity-heatmap",{delimiters:n,props:{user:{type:String,required:!0},suburl:{type:String,required:!0},locale:{type:Object,required:!0}},data:function(){return{isLoading:!0,colorRange:[],endDate:null,values:[],totalContributions:0}},mounted:function(){this.colorRange=[this.getColor(0),this.getColor(1),this.getColor(2),this.getColor(3),this.getColor(4),this.getColor(5)],this.endDate=new Date,this.loadHeatmap(this.user)},methods:{loadHeatmap:function(e){var t=this;$.get("".concat(this.suburl,"/api/v1/users/").concat(e,"/heatmap"),(function(e){for(var a=[],i=0;i

total contributions in the last 12 months

'}),new Vue({delimiters:n,el:i,data:{suburl:document.querySelector("meta[name=_suburl]").content,heatmapUser:t,locale:a}})}},$(".commit-button").click((function(e){e.preventDefault(),$(this).parent().find(".commit-body").toggle()})),window.toggleDeadlineForm=function(){$("#deadlineForm").fadeToggle(150)},window.setDeadline=function(){var e=$("#deadlineDate").val();window.updateDeadline(e)},window.updateDeadline=function(e){$("#deadline-err-invalid-date").hide(),$("#deadline-loader").addClass("loading");var t=null;if(""!==e){var a=Date.parse(e);if(Number.isNaN(a))return $("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show(),!1;t=new Date(a)}$.ajax("".concat($("#update-issue-deadline-form").attr("action"),"/deadline"),{data:JSON.stringify({due_date:t}),headers:{"X-Csrf-Token":i,"X-Remote":!0},contentType:"application/json",type:"POST",success:function(){u()},error:function(){$("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show()}})},window.deleteDependencyModal=function(e,t){$(".remove-dependency").modal({closable:!1,duration:200,onApprove:function(){$("#removeDependencyID").val(e),$("#dependencyType").val(t),$("#removeDependencyForm").submit()}}).modal("show")},window.cancelCodeComment=function(e){var t=$(e).closest("form");t.length>0&&t.hasClass("comment-form")?(t.addClass("hide"),t.parent().find("button.comment-form-reply").show()):t.closest(".comment-code-cloud").remove()},window.onOAuthLoginClick=function(){var e=$("#oauth2-login-loader"),t=$("#oauth2-login-navigator");t.hide(),e.removeClass("disabled"),setTimeout((function(){e.addClass("disabled"),t.show()}),5e3)}},function(e,t){$((function(){var e=[];document.getElementById("graph-canvas")&&($("#graph-raw-list li span.node-relation").each((function(){e.push($(this).text())})),gitGraph(document.getElementById("graph-canvas"),e))}))}]); +!function(e){function t(t){for(var n,i,o=t[0],r=t[1],c=0,l=[];c=0;--o){var r=this.tryEntries[o],c=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var s=a.call(r,"catchLoc"),l=a.call(r,"finallyLoc");if(s&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var i=a.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,a){return this.delegate={iterator:T(e),resultName:n,nextLoc:a},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=a}catch(e){Function("r","regeneratorRuntime = r")(a)}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],a=!0,i=!1,o=void 0;try{for(var r,c=e[Symbol.iterator]();!(a=(r=c.next()).done)&&(n.push(r.value),!t||n.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";n.r(t);n(3);var a,i,o,r,c,s=n(0),l=n.n(s),d=n(1),u=n.n(d);function h(e){return jQuery("
").text(e).html()}function f(e){var t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("preview"),'"]')).click((function(){var n=$(this);$.post(n.data("url"),{_csrf:a,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var a=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));a.html(n),emojify.run(a[0]),$("pre code",a[0]).each((function(){hljs.highlightBlock(this)}))}))})),x()}function p(){var e,t;0!==$(".edit.form").length&&(!function(e){var t=e.find(".tabular.menu");t.find(".item").tab();var n=t.find('.item[data-tab="'.concat(t.data("preview"),'"]'));n.length&&(o=n.data("preview-file-modes").split(","),n.click((function(){var n=$(this);$.post(n.data("url"),{_csrf:a,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var a=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));a.html(n),emojify.run(a[0]),$("pre code",a[0]).each((function(){hljs.highlightBlock(this)}))}))})))}($(".edit.form")),e=$(".edit.form"),(t=e.find(".tabular.menu")).find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("diff"),'"]')).click((function(){var n=$(this);$.post(n.data("url"),{_csrf:a,context:n.data("context"),content:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var a=e.find('.tab.segment[data-tab="'.concat(t.data("diff"),'"]'));a.html(n),emojify.run(a[0])}))})))}function m(e,t,n,i){return new Promise((function(o){$.ajax({type:"POST",url:e,data:{_csrf:a,action:t,issue_ids:n,id:i},success:o})}))}function v(){window.location.reload()}function g(e){e.each((function(){var e=this;e.addEventListener("paste",(function(t){!function(e,t){if(e.clipboardData){var n=e.clipboardData.items;if(void 0!==n)for(var a=0;a')).val(a.uuid);$(".files").append(o)}))}))}),!1)}))}function b(){var e;0!==$(".comment.form").length&&((e=$(".ui.select-branch")).find(".reference-list-menu").find(".item:not(.no-select)").click((function(){var t=$(this).data("id");$($(this).data("id-selector")).val(t),e.find(".ui .branch-name").text(t)})),e.find(".reference.column").click((function(){return e.find(".scrolling.reference-list-menu").css("display","none"),e.find(".reference .text").removeClass("black"),$($(this).data("target")).css("display","block"),$(this).find(".text").addClass("black"),!1})),f($(".comment.form")),g($(".comment.form textarea")),t("select-label","labels"),t("select-assignees","assignees"),t("select-assignees-modify","assignees"),n(".select-milestone","#milestone_id"),n(".select-assignee","#assignee_id"));function t(e,t){var n=$(".ui.".concat(t,".list")),a=n.find(".no-select"),i=$(".".concat(e," .menu")),o="update"===i.data("action"),r={};$(".".concat(e)).dropdown("setting","onHide",(function(){if(o="update"===i.data("action")){var e=[];Object.keys(r).forEach((function(t){var n=r[t],a=m(n["update-url"],n.action,n["issue-id"],t);e.push(a)})),Promise.all(e).then(v)}})),i.find(".item:not(.no-select)").click((function(){if("select-assignees-modify"===e)return $(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check")),m(i.data("update-url"),"",i.data("issue-id"),$(this).data("id")),i.data("action","update"),!1;$(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":i.data("update-url"),action:"detach","issue-id":i.data("issue-id")})):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":i.data("update-url"),action:"attach","issue-id":i.data("issue-id")}));var t=[];return $(this).parent().find(".item").each((function(){$(this).hasClass("checked")?(t.push($(this).data("id")),$($(this).data("id-selector")).removeClass("hide")):$($(this).data("id-selector")).addClass("hide")})),0===t.length?a.removeClass("hide"):a.addClass("hide"),$($(this).parent().data("id")).val(t.join(",")),!1})),i.find(".no-select.item").click((function(){(o||"select-assignees-modify"===e)&&m(i.data("update-url"),"clear",i.data("issue-id"),"").then(v),$(this).parent().find(".item").each((function(){$(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")})),n.find(".item").each((function(){$(this).addClass("hide")})),a.removeClass("hide"),$($(this).parent().data("id")).val("")}))}function n(e,t){var n=$("".concat(e," .menu")),a=$(".ui".concat(e,".list")),i="update"===n.data("action");n.find(".item:not(.no-select)").click((function(){switch($(this).parent().find(".item").each((function(){$(this).removeClass("selected active")})),$(this).addClass("selected active"),i&&m(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")).then(v),t){case"#milestone_id":a.find(".selected").html('')).val(t.uuid);c.append(n)})),this.on("removedfile",(function(e){e.name in s&&($("#".concat(s[e.name].uuid)).remove(),r.data("remove-url")&&r.data("csrf")&&!s[e.name].submitted&&$.post(r.data("remove-url"),{file:s[e.name].uuid,_csrf:r.data("csrf")}))})),this.on("submit",(function(){$.each(s,(function(e){s[e].submitted=!0}))})),this.on("reload",(function(){$.getJSON(n.data("attachment-url"),(function(e){var t=r.get(0).dropzone;t.removeAllFiles(!0),c.empty(),$.each(e,(function(){var e="".concat(r.data("upload-url"),"/").concat(this.uuid);t.emit("addedfile",this),t.emit("thumbnail",this,e),t.emit("complete",this),t.files.push(this),s[this.name]={submitted:!0,uuid:this.uuid},r.find("img[src='".concat(e,"']")).css("max-width","100%");var n=$('')).val(this.uuid);c.append(n)}))}))}))}}),r.get(0).dropzone.emit("reload")}var l=n.find(".ui.comment.form"),d=l.find(".tabular.menu");d.attr("data-write",n.data("write")),d.attr("data-preview",n.data("preview")),d.find(".write.item").attr("data-tab",n.data("write")),d.find(".preview.item").attr("data-tab",n.data("preview")),l.find(".write.segment").attr("data-tab",n.data("write")),l.find(".preview.segment").attr("data-tab",n.data("preview")),f(l),n.find(".cancel.button").click((function(){i.show(),n.hide(),r.get(0).dropzone.emit("reload")})),n.find(".save.button").click((function(){i.show(),n.hide();var o=c.find("[name=files]").map((function(){return $(this).val()})).get();$.post(n.data("update-url"),{_csrf:a,content:e.val(),context:n.data("context"),files:o},(function(e){0===e.length?i.html($("#no-content").html()):(i.html(e.content),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)})));var n=t.parent();n.find(".ui.small.images").length?""===e.attachments?n.find(".ui.small.images").parent().remove():n.find(".ui.small.images").html(e.attachments):""!==e.attachments&&(n.append('
'),n.find(".ui.small.images").html(e.attachments)),r.get(0).dropzone.emit("submit"),r.get(0).dropzone.emit("reload")}))}))}else e=t.find("textarea");return n.show(),i.hide(),0===e.val().length&&e.val(o.text()),e.focus(),!1})),$(".delete-comment").click((function(){var e=$(this);return window.confirm(e.data("locale"))&&$.post(e.data("url"),{_csrf:a}).success((function(){$("#".concat(e.data("comment-id"))).remove()})),!1}));var r=$("#status-button");$("#comment-form .edit_area").keyup((function(){0===$(this).val().length?r.text(r.data("status")):r.text(r.data("status-and-comment"))})),r.click((function(){$("#status").val(r.data("status-val")),$("#comment-form").submit()}));var c=$(".merge-button > button");c.on("click",(function(e){e.preventDefault(),$(".".concat($(this).data("do"),"-fields")).show(),$(this).parent().hide()})),$(".merge-button > .dropdown").dropdown({onChange:function(e,t,n){n.data("do")&&(c.find(".button-text").text(n.text()),c.data("do",n.data("do")))}}),$(".merge-cancel").on("click",(function(e){e.preventDefault(),$(this).closest(".form").hide(),c.parent().show()})),function e(t){var n="";t||(t=$(document),n=".reactions > "),t.find("".concat(n,"a.label")).popup({position:"bottom left",metadata:{content:"title",title:"none"}}),t.find(".select-reaction > .menu > .item, ".concat(n,"a.label")).on("click",(function(t){var n=this;if(t.preventDefault(),!$(this).hasClass("disabled")){var i=$(this).hasClass("item")?$(this).closest(".select-reaction").data("action-url"):$(this).data("action-url"),o="".concat(i,"/").concat($(this).hasClass("blue")?"unreact":"react");$.ajax({type:"POST",url:o,data:{_csrf:a,content:$(this).data("content")}}).done((function(t){if(t&&(t.html||t.empty)){var a=$(n).closest(".content"),i=a.find(".segment.reactions");if(!t.empty&&i.length>0&&i.remove(),!t.empty){i=$('
');var o=a.find(".segment.bottom:first");o.length>0?i.insertBefore(o):i.appendTo(a),i.html(t.html);for(var r=i.find(".has-emoji"),c=0;c0&&$(".diff-counter").each((function(){var e=$(this),t=e.find("span[data-line].add").data("line"),n=e.find("span[data-line].del").data("line"),a=parseFloat(t)/(parseFloat(t)+parseFloat(n))*100;e.find(".bar .add").css("width","".concat(a,"%"))})),$("#repo-clone-ssh").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-https").removeClass("blue"),localStorage.setItem("repo-clone-protocol","ssh")})),$("#repo-clone-https").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-ssh").removeClass("blue"),localStorage.setItem("repo-clone-protocol","https")})),$("#repo-clone-url").click((function(){$(this).select()}));var s=$(".repository.compare.pull");s.length>0&&(l(".choose.branch .dropdown"),s.find("button.show-form").on("click",(function(e){e.preventDefault(),s.find(".pullrequest-form").show(),$(this).parent().hide()}))),$(".repository.settings.branches").length>0&&(l(".protected-branches .dropdown"),$(".enable-protection, .enable-whitelist").change((function(){this.checked?$($(this).data("target")).removeClass("disabled"):$($(this).data("target")).addClass("disabled")})))}function l(e){var t=$(e);t.dropdown({fullTextSearch:!0,selectOnKeydown:!1,onChange:function(e,t,n){n.data("url")&&(window.location.href=n.data("url"))},message:{noResults:t.data("no-results")}})}}function y(e){var t=Math.floor(Math.random()*Math.floor(1e6));return e.attr("data-write",e.attr("data-write")+t),e.attr("data-preview",e.attr("data-preview")+t),e.find(".item").each((function(){var e=$(this).attr("data-tab")+t;$(this).attr("data-tab",e)})),e.parent().find("*[data-tab='write']").attr("data-tab","write".concat(t)),e.parent().find("*[data-tab='preview']").attr("data-tab","preview".concat(t)),f(e.parent(".form")),t}function k(){$(".access-mode.menu .item").click((function(){var e=$(this).parent();$.post(e.data("url"),{_csrf:a,uid:e.data("uid"),mode:$(this).data("value")})}))}function _(){$(".js-quick-pull-choice-option").change((function(){"commit-to-new-branch"===$(this).val()?($(".quick-pull-branch-name").show(),$(".quick-pull-branch-name input").prop("required",!0)):($(".quick-pull-branch-name").hide(),$(".quick-pull-branch-name input").prop("required",!1)),$("#commit-button").text($(this).attr("button_text"))}));var e=$("#file-name");e.keyup((function(e){var t,n,a=$(".breadcrumb span.section"),i=$(".breadcrumb div.divider");if(8===e.keyCode&&0===$(this).getCursorPosition()&&a.length>0&&(t=a.last().find("a").text(),$(this).val(t+$(this).val()),$(this)[0].setSelectionRange(t.length,t.length),a.last().remove(),i.last().remove()),191===e.keyCode){n=$(this).val().split("/");for(var o=0;o
'.concat(t,"")).insertBefore($(this)),$('
/
').insertBefore($(this))):$(this).val(t),$(this)[0].setSelectionRange(0,0)}n=[],$(".breadcrumb span.section").each((function(){var e=$(this);e.find("a").length?n.push(e.find("a").text()):n.push(e.text())})),$(this).val()&&n.push($(this).val()),$("#tree_path").val(n.join("/"))})).trigger("keyup");var t=$(".repository.editor textarea#edit_area");if(t.length){var n=t.data("markdown-file-exts").split(","),i=t.data("line-wrap-extensions").split(",");e.on("keyup",(function(){var s,l,d,u,h,f,p=e.val();d=u="";var m=/.+\.([^.]+)$/.exec(p);m&&(d=m[1],u=".".concat(d));var v=CodeMirror.findModeByExtension(d),g=$("a[data-tab=preview]");if(v?(s=v.mode,l=v.mime,f=s):f=d,g.length&&f&&o&&o.length&&o.indexOf(f)>=0?(h=g.data("url"),g.data("url",h.replace(/(.*)\/.*/i,"$1/".concat(s))),g.show()):g.hide(),!(n.indexOf(u)>=0&&function(e){return c&&(c.toTextArea(),c=null),!!r||(r=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,previewRender:function(t,n){return setTimeout((function(){$.post(e.data("url"),{_csrf:a,mode:"gfm",context:e.data("context"),text:t},(function(e){n.innerHTML='
'.concat(e,"
"),emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]}),!0)}(t))&&(c||function(e){return r&&(r.toTextArea(),r=null),!!c||((c=CodeMirror.fromTextArea(e[0],{lineNumbers:!0})).on("change",(function(t,n){e.val(t.getValue())})),!0)}(t))){s&&(c.setOption("mode",l),CodeMirror.autoLoadMode(c,s)),i.indexOf(u)>=0?c.setOption("lineWrapping",!0):c.setOption("lineWrapping",!1);var b=e.val();0!==b.length&&(b=(b=b.split("/"))[b.length-1],$.getJSON(e.data("ec-url-prefix")+b,(function(e){"tab"===e.indent_style?(c.setOption("indentWithTabs",!0),c.setOption("extraKeys",{})):(c.setOption("indentWithTabs",!1),c.setOption("extraKeys",{Tab:function(e){var t=Array(parseInt(e.getOption("indentUnit"))+1).join(" ");e.replaceSelection(t)}})),c.setOption("indentUnit",e.indent_size||4),c.setOption("tabSize",e.tab_width||4)})))}})).trigger("keyup");var s=$("#commit-button"),l=$(".ui.edit.form");s.prop("disabled",!0),l.areYouSure({silent:!0,dirtyClass:"dirty-file",fieldSelector:":input:not(.commit-form-wrapper :input)",change:function(){var e=$(this).hasClass("dirty-file");s.prop("disabled",!e)}}),s.click((function(e){0===t.val().length&&($("#edit-empty-content-modal").modal({onApprove:function(){$(".edit.form").submit()}}).modal("show"),e.preventDefault())}))}}function C(){$(".user.settings.profile").length>0&&$("#username").keyup((function(){var e=$("#name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()}))}function x(){$(".ui.button").keypress((function(e){13!==e.keyCode&&32!==e.keyCode||$(this).click()}))}function S(){$(".code-view .linenums").length>0&&($(document).on("click",".lines-num span",(function(e){var t=$(this),n=t.parent().siblings(".lines-code").find("ol.linenums > li");A(n,n.filter("[rel=".concat(t.attr("id"),"]")),e.shiftKey?n.filter(".active").eq(0):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()})),$(window).on("hashchange",(function(){var e,t=window.location.hash.match(/^#(L\d+)-(L\d+)$/),n=$(".code-view ol.linenums > li");if(t)return e=n.filter(".".concat(t[1])),A(n,e,n.filter(".".concat(t[2]))),void $("html, body").scrollTop(e.offset().top-200);(t=window.location.hash.match(/^#(L|n)(\d+)$/))&&(e=n.filter(".L".concat(t[2])),A(n,e),$("html, body").scrollTop(e.offset().top-200))})).trigger("hashchange")),$(".ui.fold-code").on("click",(function(e){var t=$(e.target);t.hasClass("fa-chevron-down")?$(e.target).parent().next().slideUp("fast",(function(){t.removeClass("fa-chevron-down").addClass("fa-chevron-right")})):$(e.target).parent().next().slideDown("fast",(function(){t.removeClass("fa-chevron-right").addClass("fa-chevron-down")}))})),$(".ui.blob-excerpt").on("click",(function(e){!function e(t){var n=$(t.target),a=n.parent().parent();$.get("".concat(n.data("url"),"?").concat(n.data("query"),"&anchor=").concat(n.data("anchor")),(function(t){a.replaceWith(t),$('[data-anchor="'.concat(n.data("anchor"),'"]')).on("click",(function(t){e(t)}))}))}(e)}))}function q(e){$.ajax({url:"".concat(i,"/user/u2f/sign"),type:"POST",headers:{"X-Csrf-Token":a},data:JSON.stringify(e),contentType:"application/json; charset=utf-8"}).done((function(e){window.location.replace(e)})).fail((function(){L(1)}))}function T(e){(function(e){if(!("errorCode"in e))return!1;if(0===e.errorCode)return!1;return L(e.errorCode),!0})(e)||$.ajax({url:"".concat(i,"/user/settings/security/u2f/register"),type:"POST",headers:{"X-Csrf-Token":a},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",success:function(){v()},fail:function(){L(1)}})}function L(e){var t={browser:$("#unsupported-browser"),1:$("#u2f-error-1"),2:$("#u2f-error-2"),3:$("#u2f-error-3"),4:$("#u2f-error-4"),5:$(".u2f-error-5")};t[e].removeClass("hide"),Object.keys(t).forEach((function(n){n!==e&&t[n].addClass("hide")})),$("#u2f-error").modal("show")}function O(){$.post("".concat(i,"/user/settings/security/u2f/request_register"),{_csrf:a,name:$("#nickname").val()}).success((function(e){$("#nickname").closest("div.field").removeClass("error"),$("#register-device").modal("show"),null===e.registeredKeys&&(e.registeredKeys=[]),u2fApi.register(e.appId,e.registerRequests,e.registeredKeys,30).then(T).catch((function(e){L(void 0!==e?e.metaData.code:1)}))})).fail((function(e){409===e.status&&$("#nickname").closest("div.field").addClass("error")}))}function j(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function A(e,t,n){if(e.removeClass("active"),n){var a,i=parseInt(t.attr("rel").substr(1)),o=parseInt(n.attr("rel").substr(1));if(i!==o){i>o&&(a=i,i=o,o=a);for(var r=[],c=i;c<=o;c++)r.push(".L".concat(c));return e.filter(r.join(",")).addClass("active"),void j("#L".concat(i,"-L").concat(o))}}t.addClass("active"),j("#".concat(t.attr("rel")))}function D(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var n=$(".delete.modal".concat(t));return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:a,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}function F(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var n=$(".addall.modal".concat(t));return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:a,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}$((function(){var e,t,a,i,o;return l.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=document.getElementById("graph-canvas")){r.next=3;break}return r.abrupt("return");case 3:return r.next=5,l.a.awrap(Promise.all([n.e(0).then(n.bind(null,12)),n.e(0).then(n.t.bind(null,13,7))]));case 5:t=r.sent,a=u()(t,1),i=a[0].default,o=[],$("#graph-raw-list li span.node-relation").each((function(){o.push($(this).text())})),i(e,o);case 11:case"end":return r.stop()}}))})),"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1),$.fn.getCursorPosition=function(){var e=$(this).get(0),t=0;if("selectionStart"in e)t=e.selectionStart;else if("selection"in document){e.focus();var n=document.selection.createRange(),a=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t=n.text.length-a}return t},$(document).ready((function(){if(a=$("meta[name=_csrf]").attr("content"),i=$("meta[name=_suburl]").attr("content"),$(".time-since").each((function(){$(this).addClass("poping up").attr("data-content",$(this).attr("title")).attr("data-variation","inverted tiny").attr("title","")})),$(".dropdown:not(.custom)").dropdown(),$(".jump.dropdown").dropdown({action:"hide",onShow:function(){$(".poping.up").popup("hide")}}),$(".slide.up.dropdown").dropdown({transition:"slide up"}),$(".upward.dropdown").dropdown({direction:"upward"}),$(".ui.accordion").accordion(),$(".ui.checkbox").checkbox(),$(".ui.progress").progress({showActivity:!1}),$(".poping.up").popup(),$(".top.menu .poping.up").popup({onShow:function(){if($(".top.menu .menu.transition").hasClass("visible"))return!1}}),$(".tabular.menu .item").tab(),$(".tabable.menu .item").tab(),$(".toggle.button").click((function(){$($(this).data("target")).slideToggle(100)})),$("tr[data-href]").click((function(){window.location=$(this).data("href")})),"undefined"!=typeof hljs)for(var e=[].slice.call(document.querySelectorAll("pre code")||[]),t=0;t0){var o={};new Dropzone("#dropzone",{url:n.data("upload-url"),headers:{"X-Csrf-Token":a},maxFiles:n.data("max-file"),maxFilesize:n.data("max-size"),acceptedFiles:"*/*"===n.data("accepts")?null:n.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:n.data("default-message"),dictInvalidFileType:n.data("invalid-input-type"),dictFileTooBig:n.data("file-too-big"),dictRemoveFile:n.data("remove-file"),init:function(){this.on("success",(function(e,t){o[e.name]=t.uuid;var n=$('')).val(t.uuid);$(".files").append(n)})),this.on("removedfile",(function(e){e.name in o&&$("#".concat(o[e.name])).remove(),n.data("remove-url")&&n.data("csrf")&&$.post(n.data("remove-url"),{file:o[e.name],_csrf:n.data("csrf")})}))}})}emojify.setConfig({img_dir:"".concat(i,"/vendor/plugins/emojify/images"),ignore_emoticons:!0});for(var r=document.getElementsByClassName("has-emoji"),c=0;c0&&(a="".concat(n,"-").concat(e[n])),void 0===e[n]?e[n]=1:e[n]+=1,(t=t.wrap('
'))).append(''))}))})),$(".issue-checkbox").click((function(){$(".issue-checkbox").children("input:checked").length>0?($("#issue-filters").addClass("hide"),$("#issue-actions").removeClass("hide")):($("#issue-filters").removeClass("hide"),$("#issue-actions").addClass("hide"))})),$(".issue-action").click((function(){var e=this.dataset.action,t=this.dataset.elementId,n=$(".issue-checkbox").children("input:checked").map((function(){return this.dataset.issueId})).get().join(),a=this.dataset.url;"0"===t&&"/assignee"===a.substr(-9)&&(t="",e="clear"),m(a,e,n,t).then((function(){"close"!==e&&"open"!==e||$('.issue-checkbox input[type="checkbox"]').each((function(e,t){t.checked=!1})),v()}))})),$('.issue-checkbox input[type="checkbox"]:checked').first().each((function(e,t){t.checked=!1,$(t).click()})),x(),$("#search-user-box").search({minCharacters:2,apiSettings:{url:"".concat(i,"/api/v1/users/search?q={query}"),onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){var a=n.login;n.full_name&&n.full_name.length>0&&(a+=" (".concat(h(n.full_name),")")),t.push({title:a,image:n.avatar_url})})),{results:t}}},searchFields:["login","full_name"],showNoResults:!1}),(l=$("#search-team-box")).search({minCharacters:2,apiSettings:{url:"".concat(i,"/api/v1/orgs/").concat(l.data("org"),"/teams/search?q={query}"),headers:{"X-Csrf-Token":a},onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){var a="".concat(n.name," (").concat(n.permission," access)");t.push({title:a})})),{results:t}}},searchFields:["name","description"],showNoResults:!1}),(d=$("#search-repo-box")).search({minCharacters:2,apiSettings:{url:"".concat(i,"/api/v1/repos/search?q={query}&uid=").concat(d.data("uid")),onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){t.push({title:n.full_name.split("/")[1],description:n.full_name})})),{results:t}}},searchFields:["full_name"],showNoResults:!1}),b(),0!==$(".install").length&&(""===$("#db_host").val()&&($("#db_host").val("127.0.0.1:3306"),$("#db_user").val("gitea"),$("#db_name").val("gitea")),$("#db_type").change((function(){var e=$(this).val();if("SQLite3"===e)return $("#sql_settings").hide(),$("#pgsql_settings").hide(),$("#mysql_settings").hide(),$("#sqlite_settings").show(),void("SQLite3"===e&&"data/gitea_tidb"===$("#db_path").val()&&$("#db_path").val("data/gitea.db"));var t={MySQL:"127.0.0.1:3306",PostgreSQL:"127.0.0.1:5432",MSSQL:"127.0.0.1:1433"};$("#sqlite_settings").hide(),$("#sql_settings").show(),$("#pgsql_settings").toggle("PostgreSQL"===e),$("#mysql_settings").toggle("MySQL"===e),$.each(t,(function(n,a){if($("#db_host").val()===a)return $("#db_host").val(t[e]),!1}))})),$("#offline-mode input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("check"),$("#federated-avatar-lookup").checkbox("uncheck"))})),$("#disable-gravatar input").change((function(){$(this).is(":checked")?$("#federated-avatar-lookup").checkbox("uncheck"):$("#offline-mode").checkbox("uncheck")})),$("#federated-avatar-lookup input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("uncheck"),$("#offline-mode").checkbox("uncheck"))})),$("#enable-openid-signin input").change((function(){$(this).is(":checked")?$("#disable-registration input").is(":checked")||$("#enable-openid-signup").checkbox("check"):$("#enable-openid-signup").checkbox("uncheck")})),$("#disable-registration input").change((function(){$(this).is(":checked")?($("#enable-captcha").checkbox("uncheck"),$("#enable-openid-signup").checkbox("uncheck")):$("#enable-openid-signup").checkbox("check")})),$("#enable-captcha input").change((function(){$(this).is(":checked")&&$("#disable-registration").checkbox("uncheck")}))),w(),(u=function(){var e=$("#auth_username").val(),t=$("#clone_addr").val();!$("#mirror").is(":checked")&&e&&e.length>0&&void 0!==t&&(t.startsWith("https://github.com")||t.startsWith("http://github.com"))?$("#migrate_items").show():$("#migrate_items").hide()})(),$("#clone_addr").on("input",u),$("#auth_username").on("input",u),$("#mirror").on("change",u),function(){var e=$(".repository.wiki textarea#edit_area"),t=0,n=null;if(e.length>0){var i=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,previewRender:function(o,r){return setTimeout((function(){var c=function(){t=0,null!=n&&(clearTimeout(n),n=null),$.post(e.data("url"),{_csrf:a,mode:"gfm",context:e.data("context"),text:o},(function(e){r.innerHTML='
'.concat(e,"
"),emojify.run($(".editor-preview")[0]),$(r).find("pre code").each((function(e,t){hljs.highlightBlock(t)}))}))};i.isSideBySideActive()?(++t>10&&c(),null!=n&&(clearTimeout(n),n=null),n=setTimeout(c,600)):c()}),0),i.isSideBySideActive()?r.innerHTML:"Loading..."},renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|",{name:"code-inline",action:function(e){var t=e.codemirror,n=t.getSelection();if(t.replaceSelection("`".concat(n,"`")),!n){var a=t.getCursor();t.setCursor(a.line,a.ch-1)}t.focus()},className:"fa fa-angle-right",title:"Add Inline Code"},"code","quote","|",{name:"checkbox-empty",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [ ] ".concat(t.getSelection())),t.focus()},className:"fa fa-square-o",title:"Add Checkbox (empty)"},{name:"checkbox-checked",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [x] ".concat(t.getSelection())),t.focus()},className:"fa fa-check-square-o",title:"Add Checkbox (checked)"},"|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]});$(i.codemirror.getInputField()).addClass("js-quick-submit"),setTimeout((function(){var e=$('.repository.wiki.new .previewtabs a[data-tab="write"]'),n=$('.repository.wiki.new .previewtabs a[data-tab="preview"]'),a=$(".editor-toolbar"),i=$(".editor-toolbar a.fa-eye"),o=$(".editor-toolbar a.fa-columns");e.on("click",(function(){a.hasClass("disabled-for-preview")&&i.click()})),n.on("click",(function(){a.hasClass("disabled-for-preview")||i.click()})),i.on("click",(function(){setTimeout((function(){a.hasClass("disabled-for-preview")?(e.hasClass("active")&&e.removeClass("active"),n.hasClass("active")||n.addClass("active")):(e.hasClass("active")||e.addClass("active"),n.hasClass("active")&&n.removeClass("active"))}),0)})),o.on("click",(function(){t=10}))}),0)}}(),p(),_(),0!==$(".organization").length&&$(".organization.settings.options").length>0&&$("#org_name").keyup((function(){var e=$("#org-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("org-name").toString().toLowerCase()?e.show():e.hide()})),0!==$(".edit.githook").length&&CodeMirror.autoLoadMode(CodeMirror.fromTextArea($("#content")[0],{lineNumbers:!0,mode:"shell"}),"shell"),function(){if(0!==$(".new.webhook").length){$(".events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").show()})),$(".non-events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").hide()}));var e=function(){var e="POST"===$("#http_method").val();$("#content_type").parent().parent()[e?"show":"hide"]()};e(),$("#http_method").change((function(){e()})),$("#test-delivery").click((function(){var e=$(this);e.addClass("loading disabled"),$.post(e.data("link"),{_csrf:a}).done(setTimeout((function(){window.location.href=e.data("redirect")}),5e3))}))}}(),function(){if(0!==$(".admin").length){if(($(".admin.new.user").length>0||$(".admin.edit.user").length>0)&&$("#login_type").change((function(){"0"===$(this).val().substring(0,1)?($("#login_name").removeAttr("required"),$(".non-local").hide(),$(".local").show(),$("#user_name").focus(),"required"===$(this).data("password")&&$("#password").attr("required","required")):($("#login_name").attr("required","required"),$(".non-local").show(),$(".local").hide(),$("#login_name").focus(),$("#password").removeAttr("required"))})),$(".admin.new.authentication").length>0&&($("#auth_type").change((function(){$(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size").hide(),$(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]").removeAttr("required"),$(".binddnrequired").removeClass("required");var e=$(this).val();switch(e){case"2":$(".ldap").show(),$(".binddnrequired input, .ldap div.required:not(.dldap) input").attr("required","required"),$(".binddnrequired").addClass("required");break;case"3":$(".smtp").show(),$(".has-tls").show(),$(".smtp div.required input, .has-tls").attr("required","required");break;case"4":$(".pam").show(),$(".pam input").attr("required","required");break;case"5":$(".dldap").show(),$(".dldap div.required:not(.ldap) input").attr("required","required");break;case"6":$(".oauth2").show(),$(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input").attr("required","required"),r()}"2"!==e&&"5"!==e||i(),"2"===e&&o()})),$("#auth_type").change(),$("#security_protocol").change(i),$("#use_paged_search").change(o),$("#oauth2_provider").change(r),$("#oauth2_use_custom_url").change(c)),$(".admin.edit.authentication").length>0){var e=$("#auth_type").val();"2"===e||"5"===e?($("#security_protocol").change(i),"2"===e&&$("#use_paged_search").change(o)):"6"===e&&($("#oauth2_provider").change(r),$("#oauth2_use_custom_url").change(c),r())}if($(".admin.notice")){var t=$("#detail-modal");$(".view-detail").click((function(){return t.find(".content p").text($(this).data("content")),t.modal("show"),!1}));var n=$(".select.table .ui.checkbox");$(".select.action").click((function(){switch($(this).data("action")){case"select-all":n.checkbox("check");break;case"deselect-all":n.checkbox("uncheck");break;case"inverse":n.checkbox("toggle")}})),$("#delete-selection").click((function(){var e=$(this);e.addClass("loading disabled");var t=[];n.each((function(){$(this).checkbox("is checked")&&t.push($(this).data("id"))})),$.post(e.data("link"),{_csrf:a,ids:t}).done((function(){window.location.href=e.data("redirect")}))}))}}function i(){$("#security_protocol").val()>0?$(".has-tls").show():$(".has-tls").hide()}function o(){$("#use_paged_search").prop("checked")?$(".search-page-size").show().find("input").attr("required","required"):$(".search-page-size").hide().find("input").removeAttr("required")}function r(){switch($(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url").hide(),$(".open_id_connect_auto_discovery_url input[required]").removeAttr("required"),$("#oauth2_provider").val()){case"github":case"gitlab":case"gitea":$(".oauth2_use_custom_url").show();break;case"openidConnect":$(".open_id_connect_auto_discovery_url input").attr("required","required"),$(".open_id_connect_auto_discovery_url").show()}c()}function c(){var e=$("#oauth2_provider").val();if($(".oauth2_use_custom_url_field").hide(),$(".oauth2_use_custom_url_field input[required]").removeAttr("required"),$("#oauth2_use_custom_url").is(":checked"))switch($("#oauth2_token_url").val()||$("#oauth2_token_url").val($("#".concat(e,"_token_url")).val()),$("#oauth2_auth_url").val()||$("#oauth2_auth_url").val($("#".concat(e,"_auth_url")).val()),$("#oauth2_profile_url").val()||$("#oauth2_profile_url").val($("#".concat(e,"_profile_url")).val()),$("#oauth2_email_url").val()||$("#oauth2_email_url").val($("#".concat(e,"_email_url")).val()),e){case"github":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url").show();break;case"gitea":case"gitlab":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url").show(),$("#oauth2_email_url").val("")}}}(),S(),function(){var e=document.getElementById("app");if(!e)return;Vue.component("repo-search",{delimiters:["${","}"],props:{searchLimit:{type:Number,default:10},suburl:{type:String,required:!0},uid:{type:Number,required:!0},organizations:{type:Array,default:[]},isOrganization:{type:Boolean,default:!0},canCreateOrganization:{type:Boolean,default:!1},organizationsTotalCount:{type:Number,default:0},moreReposLink:{type:String,default:""}},data:function(){return{tab:"repos",repos:[],reposTotalCount:0,reposFilter:"all",searchQuery:"",isLoading:!1,repoTypes:{all:{count:0,searchMode:""},forks:{count:0,searchMode:"fork"},mirrors:{count:0,searchMode:"mirror"},sources:{count:0,searchMode:"source"},collaborative:{count:0,searchMode:"collaborative"}}}},computed:{showMoreReposLink:function(){return this.repos.length>0&&this.repos.length'.concat(i[r],"
")).insertBefore(o);A.css("display","none"),N.show()}})).fail((function(t){if(422===t.status)if(t.responseJSON.invalidTopics.length>0){z.formatPrompt=t.responseJSON.message;var n=t.responseJSON.invalidTopics,a=E.children("a.ui.label");e.split(",").forEach((function(e,t){for(var i=0;i]*>?/gm,""),a=!1,i=[];if(E.find("div.label.visible.topic,a.label.visible").each((function(e,t){i.push(t.dataset.value)})),e.topics){for(var o=!1,r=0;r0&&!a?(t.success=!0,t.results.unshift({description:n,"data-value":n})):n.length>0&&a&&t.results.sort((function(e,t){return e.description.toLowerCase()===n.toLowerCase()?-1:t.description.toLowerCase()===n.toLowerCase()?1:e.description>t.description?-1:e.description').concat(h(a.repository.full_name),""),value:a.id})})),t},cache:!1},fullTextSearch:!0}),$(".menu a.label-filter-item").each((function(){$(this).click((function(e){if(e.altKey){e.preventDefault();var t=$(this).attr("href"),n=$(this).data("label-id"),a="labels=(-?[0-9]+%2c)*(".concat(n,")(%2c-?[0-9]+)*&");window.location=t.replace(new RegExp(a),"labels=$1-$2$3&")}}))})),$(".menu .ui.dropdown.label-filter").keydown((function(e){if(e.altKey&&13===e.keyCode){var t=$(".menu .ui.dropdown.label-filter .menu .item.selected");if(t.length>0){var n=$(t[0]),a=n.attr("href"),i=n.data("label-id"),o="labels=(-?[0-9]+%2c)*(".concat(i,")(%2c-?[0-9]+)*&");window.location=a.replace(new RegExp(o),"labels=$1-$2$3&")}}}))}(),$(".title_wip_desc > a").click((function(e){e.preventDefault();var t=$("#issue_title");t.focus();var n=t.val().trim().toUpperCase();for(var a in wipPrefixes)if(n.startsWith(wipPrefixes[a].toUpperCase()))return;t.val("".concat(wipPrefixes[0]," ").concat(t.val()))})),$(".show-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).removeClass("hide"),$("#code-preview-".concat(t)).removeClass("hide"),$("#hide-outdated-".concat(t)).removeClass("hide")})),$(".hide-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).addClass("hide"),$("#code-preview-".concat(t)).addClass("hide"),$("#show-outdated-".concat(t)).removeClass("hide")})),$("button.comment-form-reply").on("click",(function(e){e.preventDefault(),$(this).hide();var t=$(this).parent().find(".comment-form");t.removeClass("hide"),y(t.find(".menu"))})),0!==$(".repository.pull.diff").length&&($(".diff-detail-box.ui.sticky").sticky(),$(".btn-review").on("click",(function(e){e.preventDefault(),$(this).closest(".dropdown").find(".menu").toggle("visible")})).closest(".dropdown").find(".link.close").on("click",(function(e){e.preventDefault(),$(this).closest(".menu").toggle("visible")})),$(".code-view .lines-code,.code-view .lines-num").on("mouseenter",(function(){var e=$(this).closest("td");$(this).closest("tr").addClass(e.hasClass("lines-num-old")||e.hasClass("lines-code-old")?"focus-lines-old":"focus-lines-new")})).on("mouseleave",(function(){$(this).closest("tr").removeClass("focus-lines-new focus-lines-old")})),$(".add-code-comment").on("click",(function(e){if(!$(e.target).hasClass("btn-add-single")){e.preventDefault();var t=$(this).closest(".code-diff").hasClass("code-diff-split"),n=$(this).data("side"),a=$(this).data("idx"),i=$(this).data("path"),o=$("#pull_review_add_comment").html(),r=$(this).closest("tr"),c=r.next();c.hasClass("add-comment")||(c=$(''.concat(t?'':'',"")),r.after(c));var s=c.find(".add-comment-".concat(n)),l=s.find(".comment-code-cloud");0===l.length&&(s.html(o),y((l=s.find(".comment-code-cloud")).find(".menu")),s.find("input[name='line']").val(a),s.find("input[name='side']").val("left"===n?"previous":"proposed"),s.find("input[name='path']").val(i)),l.find("textarea").focus()}}))),function e(){var t=$("#repo_migrating");if($("#repo_migrating_failed").hide(),t){var n=t.attr("repo");if(void 0===n)return;$.ajax({type:"GET",url:"".concat(i,"/").concat(n,"/status"),data:{_csrf:a},complete:function(t){if(200===t.status&&t.responseJSON)return 0===t.responseJSON.status?void window.location.reload():void setTimeout((function(){e()}),2e3);$("#repo_migrating_progress").hide(),$("#repo_migrating_failed").show()}})}}(),function(){var e=$("#repo_template"),t=function(){var t=$("#template_units"),n=$("#non_template");""!==e.val()?(t.show(),n.hide()):(t.hide(),n.show())};e.change(t),t();var n=function(){$("#repo_template_search").dropdown({apiSettings:{url:"".concat(i,"/api/v1/repos/search?q={query}&template=true&priority_owner_id=").concat($("#uid").val()),onResponse:function(e){var t={success:!0,results:[]};return t.results.push({name:"",value:""}),$.each(e.data,(function(e,n){t.results.push({name:h(n.full_name),value:n.id})})),t},cache:!1},fullTextSearch:!0})};$("#uid").change(n),n()}(),$("#repo-clone-url").length>0)switch(localStorage.getItem("repo-clone-protocol")){case"ssh":0===$("#repo-clone-ssh").click().length&&$("#repo-clone-https").click();break;default:$("#repo-clone-https").click()}var J,H={"div.user.settings":C,"div.repository.settings.collaboration":k};for(J in H)if($(J).length>0){H[J]();break}var V=$("#clone_addr");V.change((function(){var e=$("#repo_name");V.val().length>0&&0===e.val().length&&e.val(V.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3])}))})),$((function(){0===$(".user.signin").length&&$("form:not(.ignore-dirty)").areYouSure(),$("#ssh-key-content").on("change paste keyup",(function(){var e=$(this).val().split(" "),t=$("#ssh-key-title");""===t.val()&&3===e.length&&""!==e[2]&&t.val(e[2])}))})),window.timeAddManual=function(){$(".mini.modal").modal({duration:200,onApprove:function(){$("#add_time_manual_form").submit()}}).modal("show")},window.toggleStopwatch=function(){$("#toggle_stopwatch_form").submit()},window.cancelStopwatch=function(){$("#cancel_stopwatch_form").submit()},window.initHeatmap=function(e,t,n){var a=document.getElementById(e);if(a){(n=n||{}).contributions=n.contributions||"contributions",n.no_contributions=n.no_contributions||"No contributions";var i=["${","}"];Vue.component("activity-heatmap",{delimiters:i,props:{user:{type:String,required:!0},suburl:{type:String,required:!0},locale:{type:Object,required:!0}},data:function(){return{isLoading:!0,colorRange:[],endDate:null,values:[],totalContributions:0}},mounted:function(){this.colorRange=[this.getColor(0),this.getColor(1),this.getColor(2),this.getColor(3),this.getColor(4),this.getColor(5)],this.endDate=new Date,this.loadHeatmap(this.user)},methods:{loadHeatmap:function(e){var t=this;$.get("".concat(this.suburl,"/api/v1/users/").concat(e,"/heatmap"),(function(e){for(var n=[],a=0;a

total contributions in the last 12 months

'}),new Vue({delimiters:i,el:a,data:{suburl:document.querySelector("meta[name=_suburl]").content,heatmapUser:t,locale:n}})}},$(".commit-button").click((function(e){e.preventDefault(),$(this).parent().find(".commit-body").toggle()})),window.toggleDeadlineForm=function(){$("#deadlineForm").fadeToggle(150)},window.setDeadline=function(){var e=$("#deadlineDate").val();window.updateDeadline(e)},window.updateDeadline=function(e){$("#deadline-err-invalid-date").hide(),$("#deadline-loader").addClass("loading");var t=null;if(""!==e){var n=Date.parse(e);if(Number.isNaN(n))return $("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show(),!1;t=new Date(n)}$.ajax("".concat($("#update-issue-deadline-form").attr("action"),"/deadline"),{data:JSON.stringify({due_date:t}),headers:{"X-Csrf-Token":a,"X-Remote":!0},contentType:"application/json",type:"POST",success:function(){v()},error:function(){$("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show()}})},window.deleteDependencyModal=function(e,t){$(".remove-dependency").modal({closable:!1,duration:200,onApprove:function(){$("#removeDependencyID").val(e),$("#dependencyType").val(t),$("#removeDependencyForm").submit()}}).modal("show")},window.cancelCodeComment=function(e){var t=$(e).closest("form");t.length>0&&t.hasClass("comment-form")?(t.addClass("hide"),t.parent().find("button.comment-form-reply").show()):t.closest(".comment-code-cloud").remove()},window.onOAuthLoginClick=function(){var e=$("#oauth2-login-loader"),t=$("#oauth2-login-navigator");t.hide(),e.removeClass("disabled"),setTimeout((function(){e.addClass("disabled"),t.show()}),5e3)}}]); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/public/js/index.js.map b/public/js/index.js.map index 861d6d680..b0f2ca699 100644 --- a/public/js/index.js.map +++ b/public/js/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./web_src/js/index.js","webpack:///./web_src/js/draw.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","htmlEncode","text","jQuery","html","csrf","suburl","previewFileModes","simpleMDEditor","codeMirrorEditor","initCommentPreviewTab","$form","$tabMenu","find","tab","data","click","$this","$","this","post","_csrf","context","val","$previewPanel","emojify","run","each","hljs","highlightBlock","buttonsClickOnEnter","initEditForm","length","$previewTab","split","initEditPreviewTab","content","$diffPreviewPanel","updateIssuesMeta","url","action","issueIds","elementId","Promise","resolve","ajax","type","issue_ids","id","success","reload","window","location","initImagePaste","target","field","addEventListener","event","pasteEvent","callback","clipboardData","items","indexOf","blob","getAsFile","preventDefault","stopPropagation","retrieveImageFromClipboardAsBlob","img","substr","lastIndexOf","selectionStart","startPos","endPos","selectionEnd","substring","insertAtCursor","file","xhr","XMLHttpRequest","onload","status","responseText","open","setRequestHeader","formData","FormData","append","send","uploadFile","res","JSON","parse","oldval","newval","replace","replaceAndKeepCursor","uuid","input","initCommentForm","$selectBranch","selectedValue","css","removeClass","addClass","initListSubmits","selectItem","selector","outerSelector","$list","$noSelect","$listMenu","hasLabelUpdateAction","labels","dropdown","promises","keys","forEach","label","promise","push","all","then","hasClass","listIds","parent","join","select_id","input_id","$menu","hasUpdateAction","initRepository","$data","searchTerm","noResults","canCreateBranch","menuVisible","active","branch","tag","selected","remove","Vue","delimiters","el","beforeMount","vm","$el","getAttribute","document","body","contains","set","watch","visible","focusSearchField","computed","filteredItems","filter","item","toLowerCase","showCreateNewBranch","showNoResults","methods","prev","getSelected","href","createNewBranch","$refs","newBranchForm","submit","nextTick","searchField","focus","j","getSelectedIndexInFiltered","scrollToActive","Array","isArray","cont","scrollContainer","offsetTop","scrollTop","clientHeight","keydown","keyCode","initFilterSearchDropdown","keyup","$prompt","toString","show","hide","change","checked","$newLabelPanel","minicolors","color_hex","modal","onApprove","$datepicker","datetimepicker","lang","inline","timepicker","startDate","formatDate","onSelectDate","ct","dateFormat","$issueTitle","$editInput","editTitleToggle","toggle","title","$textarea","$segment","next","$editContentZone","$renderContent","$rawContent","issuesTribute","attach","emojiTribute","$dropzone","$files","filenameDict","dropzone","headers","maxFiles","maxFilesize","acceptedFiles","addRemoveLinks","dictDefaultMessage","dictInvalidFileType","dictFileTooBig","dictRemoveFile","init","on","submitted","getJSON","drop","removeAllFiles","empty","imgSrc","emit","files","$editContentForm","attr","$attachments","map","$content","attachments","confirm","$statusButton","$mergeButton","e","onChange","_text","_value","$choice","closest","initReactionSelector","reactions","popup","position","metadata","actionURL","done","resp","react","insertBefore","appendTo","hasEmoji","$item","addLine","delLine","addPercent","parseFloat","localStorage","setItem","select","$repoComparePull","$dropdown","fullTextSearch","selectOnKeydown","message","assingMenuAttributes","menu","Math","floor","random","initRepositoryCollaboration","uid","initEditor","prop","$editFilename","parts","$section","$divider","getCursorPosition","last","setSelectionRange","element","trigger","$editArea","markdownFileExts","lineWrapExtensions","spec","extension","extWithDot","dataUrl","apiCall","exec","info","CodeMirror","findModeByExtension","previewLink","mime","toTextArea","SimpleMDE","autoDownloadFontAwesome","forceSync","renderingConfig","singleLineBreaks","indentWithTabs","tabSize","spellChecker","previewRender","plainText","preview","setTimeout","innerHTML","toolbar","setSimpleMDE","fromTextArea","lineNumbers","cm","_change","getValue","setCodeMirror","setOption","autoLoadMode","editorconfig","indent_style","Tab","spaces","parseInt","getOption","replaceSelection","indent_size","tab_width","$commitButton","$editForm","areYouSure","silent","dirtyClass","fieldSelector","dirty","initUserSettings","keypress","initCodeView","$select","siblings","selectRange","shiftKey","eq","getSelection","removeAllRanges","selection","$first","hash","match","offset","top","$foldButton","slideUp","slideDown","insertBlobExcerpt","$blob","$row","replaceWith","u2fSigned","stringify","contentType","fail","u2fError","u2fRegistered","errorCode","checkError","errorType","u2fErrors","browser","1","2","3","4","5","u2fRegisterRequest","req","registeredKeys","u2fApi","register","appId","registerRequests","catch","reason","undefined","metaData","code","changeHash","history","pushState","$from","a","b","classes","showDeletePopup","dialog","closable","redirect","showAddAllPopup","Dropzone","autoDiscover","fn","pos","Sel","createRange","SelLength","moveStart","ready","onShow","transition","direction","accordion","checkbox","progress","showActivity","slideToggle","nodes","slice","querySelectorAll","setConfig","img_dir","ignore_emoticons","getElementsByClassName","childNodes","nodeName","$searchTeamBox","$searchRepoBox","toggleMigrations","isExpanded","mgrBtn","editDiv","viewDiv","saveBtn","topicDropdown","topicForm","topicPrompts","hidePrompt","prompts","clipboard","Clipboard","clearSelection","setAttribute","node","encodeURIComponent","wrap","children","dataset","issueIDs","issueId","_","first","search","minCharacters","apiSettings","onResponse","response","_i","login","full_name","image","avatar_url","results","searchFields","permission","description","dbType","dbDefaults","MySQL","PostgreSQL","MSSQL","_type","defaultHost","is","authUserName","cloneAddr","startsWith","sideBySideChanges","sideBySideTimeout","simplemde","render","clearTimeout","isSideBySideActive","codemirror","cursorPos","getCursor","setCursor","line","ch","className","getInputField","$bEdit","$bPrev","$toolbar","$bPreview","$bSideBySide","initWikiForm","updateContentType","initWebhook","removeAttr","authType","onOAuth2Change","onSecurityProtocolChange","onUsePagedSearchChange","onOAuth2UseCustomURLChange","$detailModal","$checkboxes","ids","provider","initAdmin","getElementById","component","props","searchLimit","Number","default","String","required","organizations","isOrganization","Boolean","canCreateOrganization","organizationsTotalCount","moreReposLink","repos","reposTotalCount","reposFilter","searchQuery","isLoading","repoTypes","count","searchMode","forks","mirrors","sources","collaborative","showMoreReposLink","searchURL","repoTypeCount","mounted","searchRepos","self","changeTab","changeReposFilter","showRepo","repo","owner","mirror","fork","searchedMode","searchedURL","searchedQuery","result","_textStatus","request","getResponseHeader","always","repoClass","private","querySelector","initVueApp","ctrlKey","altKey","metaKey","countPrompt","formatPrompt","topics","_data","responseJSON","topicArray","invalidTopics","topicLables","index","form","allowAdditions","forceSelection","fields","saveRemoteData","duration","variation","blue","basic","throttle","cache","formattedResponse","query","urlData","trim","found_query","current_topics","found","topic_name","unshift","sort","onLabelCreate","contents","onAdd","addedValue","_addedText","$addedChoice","settings","rules","validateTopic","_values","regExp","identifier","prompt","ensureSupport","sign","challenge","err","allowMultiple","repolink","repoId","crossRepoSearch","issueSearchUrl","filteredResponse","currIssueId","issue","number","repository","regStr","RegExp","selectedItems","initIssueList","toUpperCase","wipPrefixes","sticky","isSplit","side","idx","path","tr","ntr","after","td","commentCloud","initRepoStatusChecker","migrating","repo_name","complete","$repoTemplate","checkTemplate","$templateUnits","$nonTemplate","changeOwner","_r","initTemplateSearch","getItem","routes","$cloneAddr","$repoName","arrays","$title","timeAddManual","toggleStopwatch","cancelStopwatch","initHeatmap","appElementId","heatmapUser","locale","contributions","no_contributions","vueDelimeters","user","colorRange","endDate","values","totalContributions","getColor","Date","loadHeatmap","userName","chartRawData","chartData","date","timestamp","createElement","appendChild","color","getComputedStyle","backgroundColor","removeChild","template","toggleDeadlineForm","fadeToggle","setDeadline","deadline","updateDeadline","deadlineString","realDeadline","newDate","isNaN","due_date","error","deleteDependencyModal","cancelCodeComment","btn","onOAuthLoginClick","oauthLoader","oauthNav","graphList","gitGraph"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,G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AClCrF,EAAE,8BAA8B4K,WAKtC3I,OAAOypB,sBAAwB,SAAU5pB,EAAIF,GAC3C5B,EAAE,sBACCmL,MAAM,CACL6N,UAAU,EACVqL,SAAU,IACVjZ,UAHK,WAIHpL,EAAE,uBAAuBK,IAAIyB,GAC7B9B,EAAE,mBAAmBK,IAAIuB,GACzB5B,EAAE,yBAAyBwJ,YAE5B2B,MAAM,SAwEblJ,OAAO0pB,kBAAoB,SAAUC,GACnC,IAAM5H,EAAOhkB,EAAE4rB,GAAK1c,QAAQ,QACxB8U,EAAKljB,OAAS,GAAKkjB,EAAKvd,SAAS,iBACnCud,EAAK1e,SAAS,QACd0e,EAAKrd,SAAShH,KAAK,6BAA6BiL,QAEhDoZ,EAAK9U,QAAQ,uBAAuBvH,UAGxC1F,OAAO4pB,kBAAoB,WACzB,IAAMC,EAAc9rB,EAAE,wBAChB+rB,EAAW/rB,EAAE,2BAEnB+rB,EAASlhB,OACTihB,EAAYzmB,YAAY,YAExBmO,YAAW,WAGTsY,EAAYxmB,SAAS,YACrBymB,EAASnhB,SACR,O,cC/yGL5K,GAAE,WACA,IAAMgsB,EAAY,GAEb7jB,SAAS8X,eAAe,kBAI7BjgB,EAAE,yCAAyCS,MAAK,WAC9CurB,EAAU1lB,KAAKtG,EAAEC,MAAMjB,WAGzBitB,SAAS9jB,SAAS8X,eAAe,gBAAiB+L","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* globals wipPrefixes, issuesTribute, emojiTribute */\n/* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */\n/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */\n\nfunction htmlEncode(text) {\n return jQuery('
').text(text).html();\n}\n\nlet csrf;\nlet suburl;\nlet previewFileModes;\nlet simpleMDEditor;\nlet codeMirrorEditor;\n\n// Disable Dropzone auto-discover because it's manually initialized\nif (typeof (Dropzone) !== 'undefined') {\n Dropzone.autoDiscover = false;\n}\n\nfunction initCommentPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n\n buttonsClickOnEnter();\n}\n\nfunction initEditPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n const $previewTab = $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`);\n if ($previewTab.length) {\n previewFileModes = $previewTab.data('preview-file-modes').split(',');\n $previewTab.click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n }\n}\n\nfunction initEditDiffTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('diff')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n context: $this.data('context'),\n content: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $diffPreviewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('diff')}\"]`);\n $diffPreviewPanel.html(data);\n emojify.run($diffPreviewPanel[0]);\n });\n });\n}\n\n\nfunction initEditForm() {\n if ($('.edit.form').length === 0) {\n return;\n }\n\n initEditPreviewTab($('.edit.form'));\n initEditDiffTab($('.edit.form'));\n}\n\nfunction initBranchSelector() {\n const $selectBranch = $('.ui.select-branch');\n const $branchMenu = $selectBranch.find('.reference-list-menu');\n $branchMenu.find('.item:not(.no-select)').click(function () {\n const selectedValue = $(this).data('id');\n $($(this).data('id-selector')).val(selectedValue);\n $selectBranch.find('.ui .branch-name').text(selectedValue);\n });\n $selectBranch.find('.reference.column').click(function () {\n $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none');\n $selectBranch.find('.reference .text').removeClass('black');\n $($(this).data('target')).css('display', 'block');\n $(this).find('.text').addClass('black');\n return false;\n });\n}\n\nfunction updateIssuesMeta(url, action, issueIds, elementId) {\n return new Promise(((resolve) => {\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n action,\n issue_ids: issueIds,\n id: elementId\n },\n success: resolve\n });\n }));\n}\n\nfunction initRepoStatusChecker() {\n const migrating = $('#repo_migrating');\n $('#repo_migrating_failed').hide();\n if (migrating) {\n const repo_name = migrating.attr('repo');\n if (typeof repo_name === 'undefined') {\n return;\n }\n $.ajax({\n type: 'GET',\n url: `${suburl}/${repo_name}/status`,\n data: {\n _csrf: csrf,\n },\n complete(xhr) {\n if (xhr.status === 200) {\n if (xhr.responseJSON) {\n if (xhr.responseJSON.status === 0) {\n window.location.reload();\n return;\n }\n\n setTimeout(() => {\n initRepoStatusChecker();\n }, 2000);\n return;\n }\n }\n $('#repo_migrating_progress').hide();\n $('#repo_migrating_failed').show();\n }\n });\n }\n}\n\nfunction initReactionSelector(parent) {\n let reactions = '';\n if (!parent) {\n parent = $(document);\n reactions = '.reactions > ';\n }\n\n parent.find(`${reactions}a.label`).popup({ position: 'bottom left', metadata: { content: 'title', title: 'none' } });\n\n parent.find(`.select-reaction > .menu > .item, ${reactions}a.label`).on('click', function (e) {\n const vm = this;\n e.preventDefault();\n\n if ($(this).hasClass('disabled')) return;\n\n const actionURL = $(this).hasClass('item')\n ? $(this).closest('.select-reaction').data('action-url')\n : $(this).data('action-url');\n const url = `${actionURL}/${$(this).hasClass('blue') ? 'unreact' : 'react'}`;\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n content: $(this).data('content')\n }\n }).done((resp) => {\n if (resp && (resp.html || resp.empty)) {\n const content = $(vm).closest('.content');\n let react = content.find('.segment.reactions');\n if (!resp.empty && react.length > 0) {\n react.remove();\n }\n if (!resp.empty) {\n react = $('
');\n const attachments = content.find('.segment.bottom:first');\n if (attachments.length > 0) {\n react.insertBefore(attachments);\n } else {\n react.appendTo(content);\n }\n react.html(resp.html);\n const hasEmoji = react.find('.has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji.get(i));\n }\n react.find('.dropdown').dropdown();\n initReactionSelector(react);\n }\n }\n });\n });\n}\n\nfunction insertAtCursor(field, value) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.substring(0, startPos)\n + value\n + field.value.substring(endPos, field.value.length);\n field.selectionStart = startPos + value.length;\n field.selectionEnd = startPos + value.length;\n } else {\n field.value += value;\n }\n}\n\nfunction replaceAndKeepCursor(field, oldval, newval) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.replace(oldval, newval);\n field.selectionStart = startPos + newval.length - oldval.length;\n field.selectionEnd = endPos + newval.length - oldval.length;\n } else {\n field.value = field.value.replace(oldval, newval);\n }\n}\n\nfunction retrieveImageFromClipboardAsBlob(pasteEvent, callback) {\n if (!pasteEvent.clipboardData) {\n return;\n }\n\n const { items } = pasteEvent.clipboardData;\n if (typeof items === 'undefined') {\n return;\n }\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].type.indexOf('image') === -1) continue;\n const blob = items[i].getAsFile();\n\n if (typeof (callback) === 'function') {\n pasteEvent.preventDefault();\n pasteEvent.stopPropagation();\n callback(blob);\n }\n }\n}\n\nfunction uploadFile(file, callback) {\n const xhr = new XMLHttpRequest();\n\n xhr.onload = function () {\n if (xhr.status === 200) {\n callback(xhr.responseText);\n }\n };\n\n xhr.open('post', `${suburl}/attachments`, true);\n xhr.setRequestHeader('X-Csrf-Token', csrf);\n const formData = new FormData();\n formData.append('file', file, file.name);\n xhr.send(formData);\n}\n\nfunction reload() {\n window.location.reload();\n}\n\nfunction initImagePaste(target) {\n target.each(function () {\n const field = this;\n field.addEventListener('paste', (event) => {\n retrieveImageFromClipboardAsBlob(event, (img) => {\n const name = img.name.substr(0, img.name.lastIndexOf('.'));\n insertAtCursor(field, `![${name}]()`);\n uploadFile(img, (res) => {\n const data = JSON.parse(res);\n replaceAndKeepCursor(field, `![${name}]()`, `![${name}](${suburl}/attachments/${data.uuid})`);\n const input = $(``).val(data.uuid);\n $('.files').append(input);\n });\n });\n }, false);\n });\n}\n\nfunction initCommentForm() {\n if ($('.comment.form').length === 0) {\n return;\n }\n\n initBranchSelector();\n initCommentPreviewTab($('.comment.form'));\n initImagePaste($('.comment.form textarea'));\n\n // Listsubmit\n function initListSubmits(selector, outerSelector) {\n const $list = $(`.ui.${outerSelector}.list`);\n const $noSelect = $list.find('.no-select');\n const $listMenu = $(`.${selector} .menu`);\n let hasLabelUpdateAction = $listMenu.data('action') === 'update';\n const labels = {};\n\n $(`.${selector}`).dropdown('setting', 'onHide', () => {\n hasLabelUpdateAction = $listMenu.data('action') === 'update'; // Update the var\n if (hasLabelUpdateAction) {\n const promises = [];\n Object.keys(labels).forEach((elementId) => {\n const label = labels[elementId];\n const promise = updateIssuesMeta(\n label['update-url'],\n label.action,\n label['issue-id'],\n elementId\n );\n promises.push(promise);\n });\n Promise.all(promises).then(reload);\n }\n });\n\n $listMenu.find('.item:not(.no-select)').click(function () {\n // we don't need the action attribute when updating assignees\n if (selector === 'select-assignees-modify') {\n // UI magic. We need to do this here, otherwise it would destroy the functionality of\n // adding/removing labels\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n }\n\n updateIssuesMeta(\n $listMenu.data('update-url'),\n '',\n $listMenu.data('issue-id'),\n $(this).data('id')\n );\n $listMenu.data('action', 'update'); // Update to reload the page when we updated items\n return false;\n }\n\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'detach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'attach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n }\n\n const listIds = [];\n $(this).parent().find('.item').each(function () {\n if ($(this).hasClass('checked')) {\n listIds.push($(this).data('id'));\n $($(this).data('id-selector')).removeClass('hide');\n } else {\n $($(this).data('id-selector')).addClass('hide');\n }\n });\n if (listIds.length === 0) {\n $noSelect.removeClass('hide');\n } else {\n $noSelect.addClass('hide');\n }\n $($(this).parent().data('id')).val(listIds.join(','));\n return false;\n });\n $listMenu.find('.no-select.item').click(function () {\n if (hasLabelUpdateAction || selector === 'select-assignees-modify') {\n updateIssuesMeta(\n $listMenu.data('update-url'),\n 'clear',\n $listMenu.data('issue-id'),\n ''\n ).then(reload);\n }\n\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n });\n\n $list.find('.item').each(function () {\n $(this).addClass('hide');\n });\n $noSelect.removeClass('hide');\n $($(this).parent().data('id')).val('');\n });\n }\n\n // Init labels and assignees\n initListSubmits('select-label', 'labels');\n initListSubmits('select-assignees', 'assignees');\n initListSubmits('select-assignees-modify', 'assignees');\n\n function selectItem(select_id, input_id) {\n const $menu = $(`${select_id} .menu`);\n const $list = $(`.ui${select_id}.list`);\n const hasUpdateAction = $menu.data('action') === 'update';\n\n $menu.find('.item:not(.no-select)').click(function () {\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('selected active');\n });\n\n $(this).addClass('selected active');\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n switch (input_id) {\n case '#milestone_id':\n $list.find('.selected').html(`${\n htmlEncode($(this).text())}`);\n break;\n case '#assignee_id':\n $list.find('.selected').html(``\n + `${\n htmlEncode($(this).text())}`);\n }\n $(`.ui${select_id}.list .no-select`).addClass('hide');\n $(input_id).val($(this).data('id'));\n });\n $menu.find('.no-select.item').click(function () {\n $(this).parent().find('.item:not(.no-select)').each(function () {\n $(this).removeClass('selected active');\n });\n\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n\n $list.find('.selected').html('');\n $list.find('.no-select').removeClass('hide');\n $(input_id).val('');\n });\n }\n\n // Milestone and assignee\n selectItem('.select-milestone', '#milestone_id');\n selectItem('.select-assignee', '#assignee_id');\n}\n\nfunction initInstall() {\n if ($('.install').length === 0) {\n return;\n }\n\n if ($('#db_host').val() === '') {\n $('#db_host').val('127.0.0.1:3306');\n $('#db_user').val('gitea');\n $('#db_name').val('gitea');\n }\n\n // Database type change detection.\n $('#db_type').change(function () {\n const sqliteDefault = 'data/gitea.db';\n const tidbDefault = 'data/gitea_tidb';\n\n const dbType = $(this).val();\n if (dbType === 'SQLite3') {\n $('#sql_settings').hide();\n $('#pgsql_settings').hide();\n $('#mysql_settings').hide();\n $('#sqlite_settings').show();\n\n if (dbType === 'SQLite3' && $('#db_path').val() === tidbDefault) {\n $('#db_path').val(sqliteDefault);\n }\n return;\n }\n\n const dbDefaults = {\n MySQL: '127.0.0.1:3306',\n PostgreSQL: '127.0.0.1:5432',\n MSSQL: '127.0.0.1:1433'\n };\n\n $('#sqlite_settings').hide();\n $('#sql_settings').show();\n\n $('#pgsql_settings').toggle(dbType === 'PostgreSQL');\n $('#mysql_settings').toggle(dbType === 'MySQL');\n $.each(dbDefaults, (_type, defaultHost) => {\n if ($('#db_host').val() === defaultHost) {\n $('#db_host').val(dbDefaults[dbType]);\n return false;\n }\n });\n });\n\n // TODO: better handling of exclusive relations.\n $('#offline-mode input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('check');\n $('#federated-avatar-lookup').checkbox('uncheck');\n }\n });\n $('#disable-gravatar input').change(function () {\n if ($(this).is(':checked')) {\n $('#federated-avatar-lookup').checkbox('uncheck');\n } else {\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#federated-avatar-lookup input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('uncheck');\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#enable-openid-signin input').change(function () {\n if ($(this).is(':checked')) {\n if (!$('#disable-registration input').is(':checked')) {\n $('#enable-openid-signup').checkbox('check');\n }\n } else {\n $('#enable-openid-signup').checkbox('uncheck');\n }\n });\n $('#disable-registration input').change(function () {\n if ($(this).is(':checked')) {\n $('#enable-captcha').checkbox('uncheck');\n $('#enable-openid-signup').checkbox('uncheck');\n } else {\n $('#enable-openid-signup').checkbox('check');\n }\n });\n $('#enable-captcha input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-registration').checkbox('uncheck');\n }\n });\n}\n\nfunction initRepository() {\n if ($('.repository').length === 0) {\n return;\n }\n\n function initFilterSearchDropdown(selector) {\n const $dropdown = $(selector);\n $dropdown.dropdown({\n fullTextSearch: true,\n selectOnKeydown: false,\n onChange(_text, _value, $choice) {\n if ($choice.data('url')) {\n window.location.href = $choice.data('url');\n }\n },\n message: { noResults: $dropdown.data('no-results') }\n });\n }\n\n // File list and commits\n if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) {\n initFilterBranchTagDropdown('.choose.reference .dropdown');\n }\n\n // Wiki\n if ($('.repository.wiki.view').length > 0) {\n initFilterSearchDropdown('.choose.page .dropdown');\n }\n\n // Options\n if ($('.repository.settings.options').length > 0) {\n $('#repo_name').keyup(function () {\n const $prompt = $('#repo-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n\n // Enable or select internal/external wiki system and issue tracker.\n $('.enable-system').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).addClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled');\n }\n });\n $('.enable-system-radio').change(function () {\n if (this.value === 'false') {\n $($(this).data('target')).addClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');\n } else if (this.value === 'true') {\n $($(this).data('target')).removeClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');\n }\n });\n }\n\n // Labels\n if ($('.repository.labels').length > 0) {\n // Create label\n const $newLabelPanel = $('.new-label.segment');\n $('.new-label.button').click(() => {\n $newLabelPanel.show();\n });\n $('.new-label.segment .cancel').click(() => {\n $newLabelPanel.hide();\n });\n\n $('.color-picker').each(function () {\n $(this).minicolors();\n });\n $('.precolors .color').click(function () {\n const color_hex = $(this).data('color-hex');\n $('.color-picker').val(color_hex);\n $('.minicolors-swatch-color').css('background-color', color_hex);\n });\n $('.edit-label-button').click(function () {\n $('#label-modal-id').val($(this).data('id'));\n $('.edit-label .new-label-input').val($(this).data('title'));\n $('.edit-label .new-label-desc-input').val($(this).data('description'));\n $('.edit-label .color-picker').val($(this).data('color'));\n $('.minicolors-swatch-color').css('background-color', $(this).data('color'));\n $('.edit-label.modal').modal({\n onApprove() {\n $('.edit-label.form').submit();\n }\n }).modal('show');\n return false;\n });\n }\n\n // Milestones\n if ($('.repository.new.milestone').length > 0) {\n const $datepicker = $('.milestone.datepicker');\n $datepicker.datetimepicker({\n lang: $datepicker.data('lang'),\n inline: true,\n timepicker: false,\n startDate: $datepicker.data('start-date'),\n formatDate: 'Y-m-d',\n onSelectDate(ct) {\n $('#deadline').val(ct.dateFormat('Y-m-d'));\n }\n });\n $('#clear-date').click(() => {\n $('#deadline').val('');\n return false;\n });\n }\n\n // Issues\n if ($('.repository.view.issue').length > 0) {\n // Edit issue title\n const $issueTitle = $('#issue-title');\n const $editInput = $('#edit-title-input input');\n const editTitleToggle = function () {\n $issueTitle.toggle();\n $('.not-in-edit').toggle();\n $('#edit-title-input').toggle();\n $('.in-edit').toggle();\n $editInput.focus();\n return false;\n };\n $('#edit-title').click(editTitleToggle);\n $('#cancel-edit-title').click(editTitleToggle);\n $('#save-edit-title').click(editTitleToggle).click(function () {\n if ($editInput.val().length === 0 || $editInput.val() === $issueTitle.text()) {\n $editInput.val($issueTitle.text());\n return false;\n }\n\n $.post($(this).data('update-url'), {\n _csrf: csrf,\n title: $editInput.val()\n },\n (data) => {\n $editInput.val(data.title);\n $issueTitle.text(data.title);\n reload();\n });\n return false;\n });\n\n // Edit issue or comment content\n $('.edit-content').click(function () {\n const $segment = $(this).parent().parent().parent()\n .next();\n const $editContentZone = $segment.find('.edit-content-zone');\n const $renderContent = $segment.find('.render-content');\n const $rawContent = $segment.find('.raw-content');\n let $textarea;\n\n // Setup new form\n if ($editContentZone.html().length === 0) {\n $editContentZone.html($('#edit-content-form').html());\n $textarea = $editContentZone.find('textarea');\n issuesTribute.attach($textarea.get());\n emojiTribute.attach($textarea.get());\n\n const $dropzone = $editContentZone.find('.dropzone');\n $dropzone.data('saved', false);\n const $files = $editContentZone.find('.comment-files');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n $dropzone.dropzone({\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = {\n uuid: data.uuid,\n submitted: false\n };\n const input = $(``).val(data.uuid);\n $files.append(input);\n });\n this.on('removedfile', (file) => {\n if (!(file.name in filenameDict)) {\n return;\n }\n $(`#${filenameDict[file.name].uuid}`).remove();\n if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name].uuid,\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n this.on('submit', () => {\n $.each(filenameDict, (name) => {\n filenameDict[name].submitted = true;\n });\n });\n this.on('reload', () => {\n $.getJSON($editContentZone.data('attachment-url'), (data) => {\n const drop = $dropzone.get(0).dropzone;\n drop.removeAllFiles(true);\n $files.empty();\n $.each(data, function () {\n const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`;\n drop.emit('addedfile', this);\n drop.emit('thumbnail', this, imgSrc);\n drop.emit('complete', this);\n drop.files.push(this);\n filenameDict[this.name] = {\n submitted: true,\n uuid: this.uuid\n };\n $dropzone.find(`img[src='${imgSrc}']`).css('max-width', '100%');\n const input = $(``).val(this.uuid);\n $files.append(input);\n });\n });\n });\n }\n });\n $dropzone.get(0).dropzone.emit('reload');\n }\n // Give new write/preview data-tab name to distinguish from others\n const $editContentForm = $editContentZone.find('.ui.comment.form');\n const $tabMenu = $editContentForm.find('.tabular.menu');\n $tabMenu.attr('data-write', $editContentZone.data('write'));\n $tabMenu.attr('data-preview', $editContentZone.data('preview'));\n $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write'));\n $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview'));\n $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write'));\n $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview'));\n\n initCommentPreviewTab($editContentForm);\n\n $editContentZone.find('.cancel.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n $dropzone.get(0).dropzone.emit('reload');\n });\n $editContentZone.find('.save.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n const $attachments = $files.find('[name=files]').map(function () {\n return $(this).val();\n }).get();\n $.post($editContentZone.data('update-url'), {\n _csrf: csrf,\n content: $textarea.val(),\n context: $editContentZone.data('context'),\n files: $attachments\n }, (data) => {\n if (data.length === 0) {\n $renderContent.html($('#no-content').html());\n } else {\n $renderContent.html(data.content);\n emojify.run($renderContent[0]);\n $('pre code', $renderContent[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n const $content = $segment.parent();\n if (!$content.find('.ui.small.images').length) {\n if (data.attachments !== '') {\n $content.append(\n '
'\n );\n $content.find('.ui.small.images').html(data.attachments);\n }\n } else if (data.attachments === '') {\n $content.find('.ui.small.images').parent().remove();\n } else {\n $content.find('.ui.small.images').html(data.attachments);\n }\n $dropzone.get(0).dropzone.emit('submit');\n $dropzone.get(0).dropzone.emit('reload');\n });\n });\n } else {\n $textarea = $segment.find('textarea');\n }\n\n // Show write/preview tab and copy raw content as needed\n $editContentZone.show();\n $renderContent.hide();\n if ($textarea.val().length === 0) {\n $textarea.val($rawContent.text());\n }\n $textarea.focus();\n return false;\n });\n\n // Delete comment\n $('.delete-comment').click(function () {\n const $this = $(this);\n if (window.confirm($this.data('locale'))) {\n $.post($this.data('url'), {\n _csrf: csrf\n }).success(() => {\n $(`#${$this.data('comment-id')}`).remove();\n });\n }\n return false;\n });\n\n // Change status\n const $statusButton = $('#status-button');\n $('#comment-form .edit_area').keyup(function () {\n if ($(this).val().length === 0) {\n $statusButton.text($statusButton.data('status'));\n } else {\n $statusButton.text($statusButton.data('status-and-comment'));\n }\n });\n $statusButton.click(() => {\n $('#status').val($statusButton.data('status-val'));\n $('#comment-form').submit();\n });\n\n // Pull Request merge button\n const $mergeButton = $('.merge-button > button');\n $mergeButton.on('click', function (e) {\n e.preventDefault();\n $(`.${$(this).data('do')}-fields`).show();\n $(this).parent().hide();\n });\n $('.merge-button > .dropdown').dropdown({\n onChange(_text, _value, $choice) {\n if ($choice.data('do')) {\n $mergeButton.find('.button-text').text($choice.text());\n $mergeButton.data('do', $choice.data('do'));\n }\n }\n });\n $('.merge-cancel').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.form').hide();\n $mergeButton.parent().show();\n });\n\n initReactionSelector();\n }\n\n // Diff\n if ($('.repository.diff').length > 0) {\n $('.diff-counter').each(function () {\n const $item = $(this);\n const addLine = $item.find('span[data-line].add').data('line');\n const delLine = $item.find('span[data-line].del').data('line');\n const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100;\n $item.find('.bar .add').css('width', `${addPercent}%`);\n });\n }\n\n // Quick start and repository home\n $('#repo-clone-ssh').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-https').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'ssh');\n });\n $('#repo-clone-https').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-ssh').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'https');\n });\n $('#repo-clone-url').click(function () {\n $(this).select();\n });\n\n // Pull request\n const $repoComparePull = $('.repository.compare.pull');\n if ($repoComparePull.length > 0) {\n initFilterSearchDropdown('.choose.branch .dropdown');\n // show pull request form\n $repoComparePull.find('button.show-form').on('click', function (e) {\n e.preventDefault();\n $repoComparePull.find('.pullrequest-form').show();\n $(this).parent().hide();\n });\n }\n\n // Branches\n if ($('.repository.settings.branches').length > 0) {\n initFilterSearchDropdown('.protected-branches .dropdown');\n $('.enable-protection, .enable-whitelist').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n }\n });\n }\n}\n\nfunction initMigration() {\n const toggleMigrations = function () {\n const authUserName = $('#auth_username').val();\n const cloneAddr = $('#clone_addr').val();\n if (!$('#mirror').is(':checked') && (authUserName && authUserName.length > 0)\n && (cloneAddr !== undefined && (cloneAddr.startsWith('https://github.com') || cloneAddr.startsWith('http://github.com')))) {\n $('#migrate_items').show();\n } else {\n $('#migrate_items').hide();\n }\n };\n\n toggleMigrations();\n\n $('#clone_addr').on('input', toggleMigrations);\n $('#auth_username').on('input', toggleMigrations);\n $('#mirror').on('change', toggleMigrations);\n}\n\nfunction initPullRequestReview() {\n $('.show-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).removeClass('hide');\n $(`#code-preview-${id}`).removeClass('hide');\n $(`#hide-outdated-${id}`).removeClass('hide');\n });\n\n $('.hide-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).addClass('hide');\n $(`#code-preview-${id}`).addClass('hide');\n $(`#show-outdated-${id}`).removeClass('hide');\n });\n\n $('button.comment-form-reply').on('click', function (e) {\n e.preventDefault();\n $(this).hide();\n const form = $(this).parent().find('.comment-form');\n form.removeClass('hide');\n assingMenuAttributes(form.find('.menu'));\n });\n // The following part is only for diff views\n if ($('.repository.pull.diff').length === 0) {\n return;\n }\n\n $('.diff-detail-box.ui.sticky').sticky();\n\n $('.btn-review').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n }).closest('.dropdown').find('.link.close')\n .on('click', function (e) {\n e.preventDefault();\n $(this).closest('.menu').toggle('visible');\n });\n\n $('.code-view .lines-code,.code-view .lines-num')\n .on('mouseenter', function () {\n const parent = $(this).closest('td');\n $(this).closest('tr').addClass(\n parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old')\n ? 'focus-lines-old' : 'focus-lines-new'\n );\n })\n .on('mouseleave', function () {\n $(this).closest('tr').removeClass('focus-lines-new focus-lines-old');\n });\n $('.add-code-comment').on('click', function (e) {\n // https://github.com/go-gitea/gitea/issues/4745\n if ($(e.target).hasClass('btn-add-single')) {\n return;\n }\n e.preventDefault();\n const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split');\n const side = $(this).data('side');\n const idx = $(this).data('idx');\n const path = $(this).data('path');\n const form = $('#pull_review_add_comment').html();\n const tr = $(this).closest('tr');\n let ntr = tr.next();\n if (!ntr.hasClass('add-comment')) {\n ntr = $(`${\n isSplit ? ''\n : ''\n }`);\n tr.after(ntr);\n }\n const td = ntr.find(`.add-comment-${side}`);\n let commentCloud = td.find('.comment-code-cloud');\n if (commentCloud.length === 0) {\n td.html(form);\n commentCloud = td.find('.comment-code-cloud');\n assingMenuAttributes(commentCloud.find('.menu'));\n\n td.find(\"input[name='line']\").val(idx);\n td.find(\"input[name='side']\").val(side === 'left' ? 'previous' : 'proposed');\n td.find(\"input[name='path']\").val(path);\n }\n commentCloud.find('textarea').focus();\n });\n}\n\nfunction assingMenuAttributes(menu) {\n const id = Math.floor(Math.random() * Math.floor(1000000));\n menu.attr('data-write', menu.attr('data-write') + id);\n menu.attr('data-preview', menu.attr('data-preview') + id);\n menu.find('.item').each(function () {\n const tab = $(this).attr('data-tab') + id;\n $(this).attr('data-tab', tab);\n });\n menu.parent().find(\"*[data-tab='write']\").attr('data-tab', `write${id}`);\n menu.parent().find(\"*[data-tab='preview']\").attr('data-tab', `preview${id}`);\n initCommentPreviewTab(menu.parent('.form'));\n return id;\n}\n\nfunction initRepositoryCollaboration() {\n // Change collaborator access mode\n $('.access-mode.menu .item').click(function () {\n const $menu = $(this).parent();\n $.post($menu.data('url'), {\n _csrf: csrf,\n uid: $menu.data('uid'),\n mode: $(this).data('value')\n });\n });\n}\n\nfunction initTeamSettings() {\n // Change team access mode\n $('.organization.new.team input[name=permission]').change(() => {\n const val = $('input[name=permission]:checked', '.organization.new.team').val();\n if (val === 'admin') {\n $('.organization.new.team .team-units').hide();\n } else {\n $('.organization.new.team .team-units').show();\n }\n });\n}\n\nfunction initWikiForm() {\n const $editArea = $('.repository.wiki textarea#edit_area');\n let sideBySideChanges = 0;\n let sideBySideTimeout = null;\n if ($editArea.length > 0) {\n const simplemde = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n const render = function () {\n sideBySideChanges = 0;\n if (sideBySideTimeout != null) {\n clearTimeout(sideBySideTimeout);\n sideBySideTimeout = null;\n }\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `
${data}
`;\n emojify.run($('.editor-preview')[0]);\n $(preview).find('pre code').each((_, e) => {\n hljs.highlightBlock(e);\n });\n });\n };\n if (!simplemde.isSideBySideActive()) {\n render();\n } else {\n // delay preview by keystroke counting\n sideBySideChanges++;\n if (sideBySideChanges > 10) {\n render();\n }\n // or delay preview by timeout\n if (sideBySideTimeout != null) {\n clearTimeout(sideBySideTimeout);\n sideBySideTimeout = null;\n }\n sideBySideTimeout = setTimeout(render, 600);\n }\n }, 0);\n if (!simplemde.isSideBySideActive()) {\n return 'Loading...';\n }\n return preview.innerHTML;\n },\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n {\n name: 'code-inline',\n action(e) {\n const cm = e.codemirror;\n const selection = cm.getSelection();\n cm.replaceSelection(`\\`${selection}\\``);\n if (!selection) {\n const cursorPos = cm.getCursor();\n cm.setCursor(cursorPos.line, cursorPos.ch - 1);\n }\n cm.focus();\n },\n className: 'fa fa-angle-right',\n title: 'Add Inline Code',\n }, 'code', 'quote', '|', {\n name: 'checkbox-empty',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [ ] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-square-o',\n title: 'Add Checkbox (empty)',\n },\n {\n name: 'checkbox-checked',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [x] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-check-square-o',\n title: 'Add Checkbox (checked)',\n }, '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n $(simplemde.codemirror.getInputField()).addClass('js-quick-submit');\n\n setTimeout(() => {\n const $bEdit = $('.repository.wiki.new .previewtabs a[data-tab=\"write\"]');\n const $bPrev = $('.repository.wiki.new .previewtabs a[data-tab=\"preview\"]');\n const $toolbar = $('.editor-toolbar');\n const $bPreview = $('.editor-toolbar a.fa-eye');\n const $bSideBySide = $('.editor-toolbar a.fa-columns');\n $bEdit.on('click', () => {\n if ($toolbar.hasClass('disabled-for-preview')) {\n $bPreview.click();\n }\n });\n $bPrev.on('click', () => {\n if (!$toolbar.hasClass('disabled-for-preview')) {\n $bPreview.click();\n }\n });\n $bPreview.on('click', () => {\n setTimeout(() => {\n if ($toolbar.hasClass('disabled-for-preview')) {\n if ($bEdit.hasClass('active')) {\n $bEdit.removeClass('active');\n }\n if (!$bPrev.hasClass('active')) {\n $bPrev.addClass('active');\n }\n } else {\n if (!$bEdit.hasClass('active')) {\n $bEdit.addClass('active');\n }\n if ($bPrev.hasClass('active')) {\n $bPrev.removeClass('active');\n }\n }\n }, 0);\n });\n $bSideBySide.on('click', () => {\n sideBySideChanges = 10;\n });\n }, 0);\n }\n}\n\n// Adding function to get the cursor position in a text field to jQuery object.\n$.fn.getCursorPosition = function () {\n const el = $(this).get(0);\n let pos = 0;\n if ('selectionStart' in el) {\n pos = el.selectionStart;\n } else if ('selection' in document) {\n el.focus();\n const Sel = document.selection.createRange();\n const SelLength = document.selection.createRange().text.length;\n Sel.moveStart('character', -el.value.length);\n pos = Sel.text.length - SelLength;\n }\n return pos;\n};\n\nfunction setSimpleMDE($editArea) {\n if (codeMirrorEditor) {\n codeMirrorEditor.toTextArea();\n codeMirrorEditor = null;\n }\n\n if (simpleMDEditor) {\n return true;\n }\n\n simpleMDEditor = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `
${data}
`;\n emojify.run($('.editor-preview')[0]);\n });\n }, 0);\n\n return 'Loading...';\n },\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n 'code', 'quote', '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n\n return true;\n}\n\nfunction setCodeMirror($editArea) {\n if (simpleMDEditor) {\n simpleMDEditor.toTextArea();\n simpleMDEditor = null;\n }\n\n if (codeMirrorEditor) {\n return true;\n }\n\n codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], {\n lineNumbers: true\n });\n codeMirrorEditor.on('change', (cm, _change) => {\n $editArea.val(cm.getValue());\n });\n\n return true;\n}\n\nfunction initEditor() {\n $('.js-quick-pull-choice-option').change(function () {\n if ($(this).val() === 'commit-to-new-branch') {\n $('.quick-pull-branch-name').show();\n $('.quick-pull-branch-name input').prop('required', true);\n } else {\n $('.quick-pull-branch-name').hide();\n $('.quick-pull-branch-name input').prop('required', false);\n }\n $('#commit-button').text($(this).attr('button_text'));\n });\n\n const $editFilename = $('#file-name');\n $editFilename.keyup(function (e) {\n const $section = $('.breadcrumb span.section');\n const $divider = $('.breadcrumb div.divider');\n let value;\n let parts;\n\n if (e.keyCode === 8) {\n if ($(this).getCursorPosition() === 0) {\n if ($section.length > 0) {\n value = $section.last().find('a').text();\n $(this).val(value + $(this).val());\n $(this)[0].setSelectionRange(value.length, value.length);\n $section.last().remove();\n $divider.last().remove();\n }\n }\n }\n if (e.keyCode === 191) {\n parts = $(this).val().split('/');\n for (let i = 0; i < parts.length; ++i) {\n value = parts[i];\n if (i < parts.length - 1) {\n if (value.length) {\n $(`${value}`).insertBefore($(this));\n $('
/
').insertBefore($(this));\n }\n } else {\n $(this).val(value);\n }\n $(this)[0].setSelectionRange(0, 0);\n }\n }\n parts = [];\n $('.breadcrumb span.section').each(function () {\n const element = $(this);\n if (element.find('a').length) {\n parts.push(element.find('a').text());\n } else {\n parts.push(element.text());\n }\n });\n if ($(this).val()) parts.push($(this).val());\n $('#tree_path').val(parts.join('/'));\n }).trigger('keyup');\n\n const $editArea = $('.repository.editor textarea#edit_area');\n if (!$editArea.length) return;\n\n const markdownFileExts = $editArea.data('markdown-file-exts').split(',');\n const lineWrapExtensions = $editArea.data('line-wrap-extensions').split(',');\n\n $editFilename.on('keyup', () => {\n const val = $editFilename.val();\n let mode, spec, extension, extWithDot, dataUrl, apiCall;\n\n extension = extWithDot = '';\n const m = /.+\\.([^.]+)$/.exec(val);\n if (m) {\n extension = m[1];\n extWithDot = `.${extension}`;\n }\n\n const info = CodeMirror.findModeByExtension(extension);\n const previewLink = $('a[data-tab=preview]');\n if (info) {\n mode = info.mode;\n spec = info.mime;\n apiCall = mode;\n } else {\n apiCall = extension;\n }\n\n if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) {\n dataUrl = previewLink.data('url');\n previewLink.data('url', dataUrl.replace(/(.*)\\/.*/i, `$1/${mode}`));\n previewLink.show();\n } else {\n previewLink.hide();\n }\n\n // If this file is a Markdown extensions, we will load that editor and return\n if (markdownFileExts.indexOf(extWithDot) >= 0) {\n if (setSimpleMDE($editArea)) {\n return;\n }\n }\n\n // Else we are going to use CodeMirror\n if (!codeMirrorEditor && !setCodeMirror($editArea)) {\n return;\n }\n\n if (mode) {\n codeMirrorEditor.setOption('mode', spec);\n CodeMirror.autoLoadMode(codeMirrorEditor, mode);\n }\n\n if (lineWrapExtensions.indexOf(extWithDot) >= 0) {\n codeMirrorEditor.setOption('lineWrapping', true);\n } else {\n codeMirrorEditor.setOption('lineWrapping', false);\n }\n\n // get the filename without any folder\n let value = $editFilename.val();\n if (value.length === 0) {\n return;\n }\n value = value.split('/');\n value = value[value.length - 1];\n\n $.getJSON($editFilename.data('ec-url-prefix') + value, (editorconfig) => {\n if (editorconfig.indent_style === 'tab') {\n codeMirrorEditor.setOption('indentWithTabs', true);\n codeMirrorEditor.setOption('extraKeys', {});\n } else {\n codeMirrorEditor.setOption('indentWithTabs', false);\n // required because CodeMirror doesn't seems to use spaces correctly for {\"indentWithTabs\": false}:\n // - https://github.com/codemirror/CodeMirror/issues/988\n // - https://codemirror.net/doc/manual.html#keymaps\n codeMirrorEditor.setOption('extraKeys', {\n Tab(cm) {\n const spaces = Array(parseInt(cm.getOption('indentUnit')) + 1).join(' ');\n cm.replaceSelection(spaces);\n }\n });\n }\n codeMirrorEditor.setOption('indentUnit', editorconfig.indent_size || 4);\n codeMirrorEditor.setOption('tabSize', editorconfig.tab_width || 4);\n });\n }).trigger('keyup');\n\n // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage\n // to enable or disable the commit button\n const $commitButton = $('#commit-button');\n const $editForm = $('.ui.edit.form');\n const dirtyFileClass = 'dirty-file';\n\n // Disabling the button at the start\n $commitButton.prop('disabled', true);\n\n // Registering a custom listener for the file path and the file content\n $editForm.areYouSure({\n silent: true,\n dirtyClass: dirtyFileClass,\n fieldSelector: ':input:not(.commit-form-wrapper :input)',\n change() {\n const dirty = $(this).hasClass(dirtyFileClass);\n $commitButton.prop('disabled', !dirty);\n }\n });\n\n $commitButton.click((event) => {\n // A modal which asks if an empty file should be committed\n if ($editArea.val().length === 0) {\n $('#edit-empty-content-modal').modal({\n onApprove() {\n $('.edit.form').submit();\n }\n }).modal('show');\n event.preventDefault();\n }\n });\n}\n\nfunction initOrganization() {\n if ($('.organization').length === 0) {\n return;\n }\n\n // Options\n if ($('.organization.settings.options').length > 0) {\n $('#org_name').keyup(function () {\n const $prompt = $('#org-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('org-name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initUserSettings() {\n // Options\n if ($('.user.settings.profile').length > 0) {\n $('#username').keyup(function () {\n const $prompt = $('#name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initGithook() {\n if ($('.edit.githook').length === 0) {\n return;\n }\n\n CodeMirror.autoLoadMode(CodeMirror.fromTextArea($('#content')[0], {\n lineNumbers: true,\n mode: 'shell'\n }), 'shell');\n}\n\nfunction initWebhook() {\n if ($('.new.webhook').length === 0) {\n return;\n }\n\n $('.events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').show();\n }\n });\n $('.non-events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').hide();\n }\n });\n\n const updateContentType = function () {\n const visible = $('#http_method').val() === 'POST';\n $('#content_type').parent().parent()[visible ? 'show' : 'hide']();\n };\n updateContentType();\n $('#http_method').change(() => {\n updateContentType();\n });\n\n // Test delivery\n $('#test-delivery').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n $.post($this.data('link'), {\n _csrf: csrf\n }).done(\n setTimeout(() => {\n window.location.href = $this.data('redirect');\n }, 5000)\n );\n });\n}\n\nfunction initAdmin() {\n if ($('.admin').length === 0) {\n return;\n }\n\n // New user\n if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) {\n $('#login_type').change(function () {\n if ($(this).val().substring(0, 1) === '0') {\n $('#login_name').removeAttr('required');\n $('.non-local').hide();\n $('.local').show();\n $('#user_name').focus();\n\n if ($(this).data('password') === 'required') {\n $('#password').attr('required', 'required');\n }\n } else {\n $('#login_name').attr('required', 'required');\n $('.non-local').show();\n $('.local').hide();\n $('#login_name').focus();\n\n $('#password').removeAttr('required');\n }\n });\n }\n\n function onSecurityProtocolChange() {\n if ($('#security_protocol').val() > 0) {\n $('.has-tls').show();\n } else {\n $('.has-tls').hide();\n }\n }\n\n function onUsePagedSearchChange() {\n if ($('#use_paged_search').prop('checked')) {\n $('.search-page-size').show()\n .find('input').attr('required', 'required');\n } else {\n $('.search-page-size').hide()\n .find('input').removeAttr('required');\n }\n }\n\n function onOAuth2Change() {\n $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide();\n $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required');\n\n const provider = $('#oauth2_provider').val();\n switch (provider) {\n case 'github':\n case 'gitlab':\n case 'gitea':\n $('.oauth2_use_custom_url').show();\n break;\n case 'openidConnect':\n $('.open_id_connect_auto_discovery_url input').attr('required', 'required');\n $('.open_id_connect_auto_discovery_url').show();\n break;\n }\n onOAuth2UseCustomURLChange();\n }\n\n function onOAuth2UseCustomURLChange() {\n const provider = $('#oauth2_provider').val();\n $('.oauth2_use_custom_url_field').hide();\n $('.oauth2_use_custom_url_field input[required]').removeAttr('required');\n\n if ($('#oauth2_use_custom_url').is(':checked')) {\n if (!$('#oauth2_token_url').val()) {\n $('#oauth2_token_url').val($(`#${provider}_token_url`).val());\n }\n if (!$('#oauth2_auth_url').val()) {\n $('#oauth2_auth_url').val($(`#${provider}_auth_url`).val());\n }\n if (!$('#oauth2_profile_url').val()) {\n $('#oauth2_profile_url').val($(`#${provider}_profile_url`).val());\n }\n if (!$('#oauth2_email_url').val()) {\n $('#oauth2_email_url').val($(`#${provider}_email_url`).val());\n }\n switch (provider) {\n case 'github':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show();\n break;\n case 'gitea':\n case 'gitlab':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show();\n $('#oauth2_email_url').val('');\n break;\n }\n }\n }\n\n // New authentication\n if ($('.admin.new.authentication').length > 0) {\n $('#auth_type').change(function () {\n $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide();\n\n $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required');\n $('.binddnrequired').removeClass('required');\n\n const authType = $(this).val();\n switch (authType) {\n case '2': // LDAP\n $('.ldap').show();\n $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required');\n $('.binddnrequired').addClass('required');\n break;\n case '3': // SMTP\n $('.smtp').show();\n $('.has-tls').show();\n $('.smtp div.required input, .has-tls').attr('required', 'required');\n break;\n case '4': // PAM\n $('.pam').show();\n $('.pam input').attr('required', 'required');\n break;\n case '5': // LDAP\n $('.dldap').show();\n $('.dldap div.required:not(.ldap) input').attr('required', 'required');\n break;\n case '6': // OAuth2\n $('.oauth2').show();\n $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required');\n onOAuth2Change();\n break;\n }\n if (authType === '2' || authType === '5') {\n onSecurityProtocolChange();\n }\n if (authType === '2') {\n onUsePagedSearchChange();\n }\n });\n $('#auth_type').change();\n $('#security_protocol').change(onSecurityProtocolChange);\n $('#use_paged_search').change(onUsePagedSearchChange);\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n }\n // Edit authentication\n if ($('.admin.edit.authentication').length > 0) {\n const authType = $('#auth_type').val();\n if (authType === '2' || authType === '5') {\n $('#security_protocol').change(onSecurityProtocolChange);\n if (authType === '2') {\n $('#use_paged_search').change(onUsePagedSearchChange);\n }\n } else if (authType === '6') {\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n onOAuth2Change();\n }\n }\n\n // Notice\n if ($('.admin.notice')) {\n const $detailModal = $('#detail-modal');\n\n // Attach view detail modals\n $('.view-detail').click(function () {\n $detailModal.find('.content p').text($(this).data('content'));\n $detailModal.modal('show');\n return false;\n });\n\n // Select actions\n const $checkboxes = $('.select.table .ui.checkbox');\n $('.select.action').click(function () {\n switch ($(this).data('action')) {\n case 'select-all':\n $checkboxes.checkbox('check');\n break;\n case 'deselect-all':\n $checkboxes.checkbox('uncheck');\n break;\n case 'inverse':\n $checkboxes.checkbox('toggle');\n break;\n }\n });\n $('#delete-selection').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n const ids = [];\n $checkboxes.each(function () {\n if ($(this).checkbox('is checked')) {\n ids.push($(this).data('id'));\n }\n });\n $.post($this.data('link'), {\n _csrf: csrf,\n ids\n }).done(() => {\n window.location.href = $this.data('redirect');\n });\n });\n }\n}\n\nfunction buttonsClickOnEnter() {\n $('.ui.button').keypress(function (e) {\n if (e.keyCode === 13 || e.keyCode === 32) { // enter key or space bar\n $(this).click();\n }\n });\n}\n\nfunction searchUsers() {\n const $searchUserBox = $('#search-user-box');\n $searchUserBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/users/search?q={query}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n let title = item.login;\n if (item.full_name && item.full_name.length > 0) {\n title += ` (${htmlEncode(item.full_name)})`;\n }\n items.push({\n title,\n image: item.avatar_url\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['login', 'full_name'],\n showNoResults: false\n });\n}\n\nfunction searchTeams() {\n const $searchTeamBox = $('#search-team-box');\n $searchTeamBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/orgs/${$searchTeamBox.data('org')}/teams/search?q={query}`,\n headers: { 'X-Csrf-Token': csrf },\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n const title = `${item.name} (${item.permission} access)`;\n items.push({\n title,\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['name', 'description'],\n showNoResults: false\n });\n}\n\nfunction searchRepositories() {\n const $searchRepoBox = $('#search-repo-box');\n $searchRepoBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&uid=${$searchRepoBox.data('uid')}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n items.push({\n title: item.full_name.split('/')[1],\n description: item.full_name\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['full_name'],\n showNoResults: false\n });\n}\n\nfunction initCodeView() {\n if ($('.code-view .linenums').length > 0) {\n $(document).on('click', '.lines-num span', function (e) {\n const $select = $(this);\n const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li');\n selectRange($list, $list.filter(`[rel=${$select.attr('id')}]`), (e.shiftKey ? $list.filter('.active').eq(0) : null));\n deSelect();\n });\n\n $(window).on('hashchange', () => {\n let m = window.location.hash.match(/^#(L\\d+)-(L\\d+)$/);\n const $list = $('.code-view ol.linenums > li');\n let $first;\n if (m) {\n $first = $list.filter(`.${m[1]}`);\n selectRange($list, $first, $list.filter(`.${m[2]}`));\n $('html, body').scrollTop($first.offset().top - 200);\n return;\n }\n m = window.location.hash.match(/^#(L|n)(\\d+)$/);\n if (m) {\n $first = $list.filter(`.L${m[2]}`);\n selectRange($list, $first);\n $('html, body').scrollTop($first.offset().top - 200);\n }\n }).trigger('hashchange');\n }\n $('.ui.fold-code').on('click', (e) => {\n const $foldButton = $(e.target);\n if ($foldButton.hasClass('fa-chevron-down')) {\n $(e.target).parent().next().slideUp('fast', () => {\n $foldButton.removeClass('fa-chevron-down').addClass('fa-chevron-right');\n });\n } else {\n $(e.target).parent().next().slideDown('fast', () => {\n $foldButton.removeClass('fa-chevron-right').addClass('fa-chevron-down');\n });\n }\n });\n function insertBlobExcerpt(e) {\n const $blob = $(e.target);\n const $row = $blob.parent().parent();\n $.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => {\n $row.replaceWith(blob);\n $(`[data-anchor=\"${$blob.data('anchor')}\"]`).on('click', (e) => { insertBlobExcerpt(e); });\n });\n }\n $('.ui.blob-excerpt').on('click', (e) => { insertBlobExcerpt(e); });\n}\n\nfunction initU2FAuth() {\n if ($('#wait-for-key').length === 0) {\n return;\n }\n u2fApi.ensureSupport()\n .then(() => {\n $.getJSON(`${suburl}/user/u2f/challenge`).success((req) => {\n u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)\n .then(u2fSigned)\n .catch((err) => {\n if (err === undefined) {\n u2fError(1);\n return;\n }\n u2fError(err.metaData.code);\n });\n });\n }).catch(() => {\n // Fallback in case browser do not support U2F\n window.location.href = `${suburl}/user/two_factor`;\n });\n}\nfunction u2fSigned(resp) {\n $.ajax({\n url: `${suburl}/user/u2f/sign`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n }).done((res) => {\n window.location.replace(res);\n }).fail(() => {\n u2fError(1);\n });\n}\n\nfunction u2fRegistered(resp) {\n if (checkError(resp)) {\n return;\n }\n $.ajax({\n url: `${suburl}/user/settings/security/u2f/register`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n success() {\n reload();\n },\n fail() {\n u2fError(1);\n }\n });\n}\n\nfunction checkError(resp) {\n if (!('errorCode' in resp)) {\n return false;\n }\n if (resp.errorCode === 0) {\n return false;\n }\n u2fError(resp.errorCode);\n return true;\n}\n\n\nfunction u2fError(errorType) {\n const u2fErrors = {\n browser: $('#unsupported-browser'),\n 1: $('#u2f-error-1'),\n 2: $('#u2f-error-2'),\n 3: $('#u2f-error-3'),\n 4: $('#u2f-error-4'),\n 5: $('.u2f-error-5')\n };\n u2fErrors[errorType].removeClass('hide');\n\n Object.keys(u2fErrors).forEach((type) => {\n if (type !== errorType) {\n u2fErrors[type].addClass('hide');\n }\n });\n $('#u2f-error').modal('show');\n}\n\nfunction initU2FRegister() {\n $('#register-device').modal({ allowMultiple: false });\n $('#u2f-error').modal({ allowMultiple: false });\n $('#register-security-key').on('click', (e) => {\n e.preventDefault();\n u2fApi.ensureSupport()\n .then(u2fRegisterRequest)\n .catch(() => {\n u2fError('browser');\n });\n });\n}\n\nfunction u2fRegisterRequest() {\n $.post(`${suburl}/user/settings/security/u2f/request_register`, {\n _csrf: csrf,\n name: $('#nickname').val()\n }).success((req) => {\n $('#nickname').closest('div.field').removeClass('error');\n $('#register-device').modal('show');\n if (req.registeredKeys === null) {\n req.registeredKeys = [];\n }\n u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30)\n .then(u2fRegistered)\n .catch((reason) => {\n if (reason === undefined) {\n u2fError(1);\n return;\n }\n u2fError(reason.metaData.code);\n });\n }).fail((xhr) => {\n if (xhr.status === 409) {\n $('#nickname').closest('div.field').addClass('error');\n }\n });\n}\n\nfunction initWipTitle() {\n $('.title_wip_desc > a').click((e) => {\n e.preventDefault();\n\n const $issueTitle = $('#issue_title');\n $issueTitle.focus();\n const value = $issueTitle.val().trim().toUpperCase();\n\n for (const i in wipPrefixes) {\n if (value.startsWith(wipPrefixes[i].toUpperCase())) {\n return;\n }\n }\n\n $issueTitle.val(`${wipPrefixes[0]} ${$issueTitle.val()}`);\n });\n}\n\nfunction initTemplateSearch() {\n const $repoTemplate = $('#repo_template');\n const checkTemplate = function () {\n const $templateUnits = $('#template_units');\n const $nonTemplate = $('#non_template');\n if ($repoTemplate.val() !== '') {\n $templateUnits.show();\n $nonTemplate.hide();\n } else {\n $templateUnits.hide();\n $nonTemplate.show();\n }\n };\n $repoTemplate.change(checkTemplate);\n checkTemplate();\n\n const changeOwner = function () {\n $('#repo_template_search')\n .dropdown({\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&template=true&priority_owner_id=${$('#uid').val()}`,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n filteredResponse.results.push({\n name: '',\n value: ''\n });\n // Parse the response from the api to work with our dropdown\n $.each(response.data, (_r, repo) => {\n filteredResponse.results.push({\n name: htmlEncode(repo.full_name),\n value: repo.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n };\n $('#uid').change(changeOwner);\n changeOwner();\n}\n\n$(document).ready(() => {\n csrf = $('meta[name=_csrf]').attr('content');\n suburl = $('meta[name=_suburl]').attr('content');\n\n // Show exact time\n $('.time-since').each(function () {\n $(this)\n .addClass('poping up')\n .attr('data-content', $(this).attr('title'))\n .attr('data-variation', 'inverted tiny')\n .attr('title', '');\n });\n\n // Semantic UI modules.\n $('.dropdown:not(.custom)').dropdown();\n $('.jump.dropdown').dropdown({\n action: 'hide',\n onShow() {\n $('.poping.up').popup('hide');\n }\n });\n $('.slide.up.dropdown').dropdown({\n transition: 'slide up'\n });\n $('.upward.dropdown').dropdown({\n direction: 'upward'\n });\n $('.ui.accordion').accordion();\n $('.ui.checkbox').checkbox();\n $('.ui.progress').progress({\n showActivity: false\n });\n $('.poping.up').popup();\n $('.top.menu .poping.up').popup({\n onShow() {\n if ($('.top.menu .menu.transition').hasClass('visible')) {\n return false;\n }\n }\n });\n $('.tabular.menu .item').tab();\n $('.tabable.menu .item').tab();\n\n $('.toggle.button').click(function () {\n $($(this).data('target')).slideToggle(100);\n });\n\n // make table element clickable like a link\n $('tr[data-href]').click(function () {\n window.location = $(this).data('href');\n });\n\n // Highlight JS\n if (typeof hljs !== 'undefined') {\n const nodes = [].slice.call(document.querySelectorAll('pre code') || []);\n for (let i = 0; i < nodes.length; i++) {\n hljs.highlightBlock(nodes[i]);\n }\n }\n\n // Dropzone\n const $dropzone = $('#dropzone');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n\n new Dropzone('#dropzone', {\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = data.uuid;\n const input = $(``).val(data.uuid);\n $('.files').append(input);\n });\n this.on('removedfile', (file) => {\n if (file.name in filenameDict) {\n $(`#${filenameDict[file.name]}`).remove();\n }\n if ($dropzone.data('remove-url') && $dropzone.data('csrf')) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name],\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n },\n });\n }\n\n // Emojify\n emojify.setConfig({\n img_dir: `${suburl}/vendor/plugins/emojify/images`,\n ignore_emoticons: true\n });\n const hasEmoji = document.getElementsByClassName('has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji[i]);\n for (let j = 0; j < hasEmoji[i].childNodes.length; j++) {\n if (hasEmoji[i].childNodes[j].nodeName === 'A') {\n emojify.run(hasEmoji[i].childNodes[j]);\n }\n }\n }\n\n // Clipboard JS\n const clipboard = new Clipboard('.clipboard');\n clipboard.on('success', (e) => {\n e.clearSelection();\n\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n clipboard.on('error', (e) => {\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n // Helpers.\n $('.delete-button').click(showDeletePopup);\n $('.add-all-button').click(showAddAllPopup);\n\n $('.delete-branch-button').click(showDeletePopup);\n\n $('.undo-button').click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n });\n $('.show-panel.button').click(function () {\n $($(this).data('panel')).show();\n });\n $('.show-modal.button').click(function () {\n $($(this).data('modal')).modal('show');\n });\n $('.delete-post.button').click(function () {\n const $this = $(this);\n $.post($this.data('request-url'), {\n _csrf: csrf\n }).done(() => {\n window.location.href = $this.data('done-url');\n });\n });\n\n // Set anchor.\n $('.markdown').each(function () {\n const headers = {};\n $(this).find('h1, h2, h3, h4, h5, h6').each(function () {\n let node = $(this);\n const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w\\- ]/g, '').replace(/[ ]/g, '-'));\n let name = val;\n if (headers[val] > 0) {\n name = `${val}-${headers[val]}`;\n }\n if (headers[val] === undefined) {\n headers[val] = 1;\n } else {\n headers[val] += 1;\n }\n node = node.wrap(`
`);\n node.append(``);\n });\n });\n\n $('.issue-checkbox').click(() => {\n const numChecked = $('.issue-checkbox').children('input:checked').length;\n if (numChecked > 0) {\n $('#issue-filters').addClass('hide');\n $('#issue-actions').removeClass('hide');\n } else {\n $('#issue-filters').removeClass('hide');\n $('#issue-actions').addClass('hide');\n }\n });\n\n $('.issue-action').click(function () {\n let { action } = this.dataset;\n let { elementId } = this.dataset;\n const issueIDs = $('.issue-checkbox').children('input:checked').map(function () {\n return this.dataset.issueId;\n }).get().join();\n const { url } = this.dataset;\n if (elementId === '0' && url.substr(-9) === '/assignee') {\n elementId = '';\n action = 'clear';\n }\n updateIssuesMeta(url, action, issueIDs, elementId).then(() => {\n // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload\n if (action === 'close' || action === 'open') {\n // uncheck all checkboxes\n $('.issue-checkbox input[type=\"checkbox\"]').each((_, e) => { e.checked = false; });\n }\n reload();\n });\n });\n\n // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload\n // trigger ckecked event, if checkboxes are checked on load\n $('.issue-checkbox input[type=\"checkbox\"]:checked').first().each((_, e) => {\n e.checked = false;\n $(e).click();\n });\n\n buttonsClickOnEnter();\n searchUsers();\n searchTeams();\n searchRepositories();\n\n initCommentForm();\n initInstall();\n initRepository();\n initMigration();\n initWikiForm();\n initEditForm();\n initEditor();\n initOrganization();\n initGithook();\n initWebhook();\n initAdmin();\n initCodeView();\n initVueApp();\n initTeamSettings();\n initCtrlEnterSubmit();\n initNavbarContentToggle();\n initTopicbar();\n initU2FAuth();\n initU2FRegister();\n initIssueList();\n initWipTitle();\n initPullRequestReview();\n initRepoStatusChecker();\n initTemplateSearch();\n\n // Repo clone url.\n if ($('#repo-clone-url').length > 0) {\n switch (localStorage.getItem('repo-clone-protocol')) {\n case 'ssh':\n if ($('#repo-clone-ssh').click().length === 0) {\n $('#repo-clone-https').click();\n }\n break;\n default:\n $('#repo-clone-https').click();\n break;\n }\n }\n\n const routes = {\n 'div.user.settings': initUserSettings,\n 'div.repository.settings.collaboration': initRepositoryCollaboration\n };\n\n let selector;\n for (selector in routes) {\n if ($(selector).length > 0) {\n routes[selector]();\n break;\n }\n }\n\n const $cloneAddr = $('#clone_addr');\n $cloneAddr.change(() => {\n const $repoName = $('#repo_name');\n if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank\n $repoName.val($cloneAddr.val().match(/^(.*\\/)?((.+?)(\\.git)?)$/)[3]);\n }\n });\n});\n\nfunction changeHash(hash) {\n if (window.history.pushState) {\n window.history.pushState(null, null, hash);\n } else {\n window.location.hash = hash;\n }\n}\n\nfunction deSelect() {\n if (window.getSelection) {\n window.getSelection().removeAllRanges();\n } else {\n document.selection.empty();\n }\n}\n\nfunction selectRange($list, $select, $from) {\n $list.removeClass('active');\n if ($from) {\n let a = parseInt($select.attr('rel').substr(1));\n let b = parseInt($from.attr('rel').substr(1));\n let c;\n if (a !== b) {\n if (a > b) {\n c = a;\n a = b;\n b = c;\n }\n const classes = [];\n for (let i = a; i <= b; i++) {\n classes.push(`.L${i}`);\n }\n $list.filter(classes.join(',')).addClass('active');\n changeHash(`#L${a}-L${b}`);\n return;\n }\n }\n $select.addClass('active');\n changeHash(`#${$select.attr('rel')}`);\n}\n\n$(() => {\n // Warn users that try to leave a page after entering data into a form.\n // Except on sign-in pages, and for forms marked as 'ignore-dirty'.\n if ($('.user.signin').length === 0) {\n $('form:not(.ignore-dirty)').areYouSure();\n }\n\n // Parse SSH Key\n $('#ssh-key-content').on('change paste keyup', function () {\n const arrays = $(this).val().split(' ');\n const $title = $('#ssh-key-title');\n if ($title.val() === '' && arrays.length === 3 && arrays[2] !== '') {\n $title.val(arrays[2]);\n }\n });\n});\n\nfunction showDeletePopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.delete.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction showAddAllPopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.addall.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction initVueComponents() {\n const vueDelimeters = ['${', '}'];\n\n Vue.component('repo-search', {\n delimiters: vueDelimeters,\n\n props: {\n searchLimit: {\n type: Number,\n default: 10\n },\n suburl: {\n type: String,\n required: true\n },\n uid: {\n type: Number,\n required: true\n },\n organizations: {\n type: Array,\n default: []\n },\n isOrganization: {\n type: Boolean,\n default: true\n },\n canCreateOrganization: {\n type: Boolean,\n default: false\n },\n organizationsTotalCount: {\n type: Number,\n default: 0\n },\n moreReposLink: {\n type: String,\n default: ''\n }\n },\n\n data() {\n return {\n tab: 'repos',\n repos: [],\n reposTotalCount: 0,\n reposFilter: 'all',\n searchQuery: '',\n isLoading: false,\n repoTypes: {\n all: {\n count: 0,\n searchMode: '',\n },\n forks: {\n count: 0,\n searchMode: 'fork',\n },\n mirrors: {\n count: 0,\n searchMode: 'mirror',\n },\n sources: {\n count: 0,\n searchMode: 'source',\n },\n collaborative: {\n count: 0,\n searchMode: 'collaborative',\n },\n }\n };\n },\n\n computed: {\n showMoreReposLink() {\n return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;\n },\n searchURL() {\n return `${this.suburl}/api/v1/repos/search?sort=updated&order=desc&uid=${this.uid}&q=${this.searchQuery\n }&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode\n }${this.reposFilter !== 'all' ? '&exclusive=1' : ''}`;\n },\n repoTypeCount() {\n return this.repoTypes[this.reposFilter].count;\n }\n },\n\n mounted() {\n this.searchRepos(this.reposFilter);\n\n const self = this;\n Vue.nextTick(() => {\n self.$refs.search.focus();\n });\n },\n\n methods: {\n changeTab(t) {\n this.tab = t;\n },\n\n changeReposFilter(filter) {\n this.reposFilter = filter;\n this.repos = [];\n this.repoTypes[filter].count = 0;\n this.searchRepos(filter);\n },\n\n showRepo(repo, filter) {\n switch (filter) {\n case 'sources':\n return repo.owner.id === this.uid && !repo.mirror && !repo.fork;\n case 'forks':\n return repo.owner.id === this.uid && !repo.mirror && repo.fork;\n case 'mirrors':\n return repo.mirror;\n case 'collaborative':\n return repo.owner.id !== this.uid && !repo.mirror;\n default:\n return true;\n }\n },\n\n searchRepos(reposFilter) {\n const self = this;\n\n this.isLoading = true;\n\n const searchedMode = this.repoTypes[reposFilter].searchMode;\n const searchedURL = this.searchURL;\n const searchedQuery = this.searchQuery;\n\n $.getJSON(searchedURL, (result, _textStatus, request) => {\n if (searchedURL === self.searchURL) {\n self.repos = result.data;\n const count = request.getResponseHeader('X-Total-Count');\n if (searchedQuery === '' && searchedMode === '') {\n self.reposTotalCount = count;\n }\n self.repoTypes[reposFilter].count = count;\n }\n }).always(() => {\n if (searchedURL === self.searchURL) {\n self.isLoading = false;\n }\n });\n },\n\n repoClass(repo) {\n if (repo.fork) {\n return 'octicon octicon-repo-forked';\n } if (repo.mirror) {\n return 'octicon octicon-repo-clone';\n } if (repo.private) {\n return 'octicon octicon-lock';\n }\n return 'octicon octicon-repo';\n }\n }\n });\n}\n\nfunction initCtrlEnterSubmit() {\n $('.js-quick-submit').keydown(function (e) {\n if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode === 13 || e.keyCode === 10)) {\n $(this).closest('form').submit();\n }\n });\n}\n\nfunction initVueApp() {\n const el = document.getElementById('app');\n if (!el) {\n return;\n }\n\n initVueComponents();\n\n new Vue({\n delimiters: ['${', '}'],\n el,\n data: {\n searchLimit: document.querySelector('meta[name=_search_limit]').content,\n suburl: document.querySelector('meta[name=_suburl]').content,\n uid: document.querySelector('meta[name=_context_uid]').content,\n },\n });\n}\n\nwindow.timeAddManual = function () {\n $('.mini.modal')\n .modal({\n duration: 200,\n onApprove() {\n $('#add_time_manual_form').submit();\n }\n }).modal('show');\n};\n\nwindow.toggleStopwatch = function () {\n $('#toggle_stopwatch_form').submit();\n};\nwindow.cancelStopwatch = function () {\n $('#cancel_stopwatch_form').submit();\n};\n\nwindow.initHeatmap = function (appElementId, heatmapUser, locale) {\n const el = document.getElementById(appElementId);\n if (!el) {\n return;\n }\n\n locale = locale || {};\n\n locale.contributions = locale.contributions || 'contributions';\n locale.no_contributions = locale.no_contributions || 'No contributions';\n\n const vueDelimeters = ['${', '}'];\n\n Vue.component('activity-heatmap', {\n delimiters: vueDelimeters,\n\n props: {\n user: {\n type: String,\n required: true\n },\n suburl: {\n type: String,\n required: true\n },\n locale: {\n type: Object,\n required: true\n }\n },\n\n data() {\n return {\n isLoading: true,\n colorRange: [],\n endDate: null,\n values: [],\n totalContributions: 0,\n };\n },\n\n mounted() {\n this.colorRange = [\n this.getColor(0),\n this.getColor(1),\n this.getColor(2),\n this.getColor(3),\n this.getColor(4),\n this.getColor(5)\n ];\n this.endDate = new Date();\n this.loadHeatmap(this.user);\n },\n\n methods: {\n loadHeatmap(userName) {\n const self = this;\n $.get(`${this.suburl}/api/v1/users/${userName}/heatmap`, (chartRawData) => {\n const chartData = [];\n for (let i = 0; i < chartRawData.length; i++) {\n self.totalContributions += chartRawData[i].contributions;\n chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions };\n }\n self.values = chartData;\n self.isLoading = false;\n });\n },\n\n getColor(idx) {\n const el = document.createElement('div');\n el.className = `heatmap-color-${idx}`;\n document.body.appendChild(el);\n\n const color = getComputedStyle(el).backgroundColor;\n\n document.body.removeChild(el);\n\n return color;\n }\n },\n\n template: '

total contributions in the last 12 months

'\n });\n\n new Vue({\n delimiters: vueDelimeters,\n el,\n\n data: {\n suburl: document.querySelector('meta[name=_suburl]').content,\n heatmapUser,\n locale\n },\n });\n};\n\nfunction initFilterBranchTagDropdown(selector) {\n $(selector).each(function () {\n const $dropdown = $(this);\n const $data = $dropdown.find('.data');\n const data = {\n items: [],\n mode: $data.data('mode'),\n searchTerm: '',\n noResults: '',\n canCreateBranch: false,\n menuVisible: false,\n active: 0\n };\n $data.find('.item').each(function () {\n data.items.push({\n name: $(this).text(),\n url: $(this).data('url'),\n branch: $(this).hasClass('branch'),\n tag: $(this).hasClass('tag'),\n selected: $(this).hasClass('selected')\n });\n });\n $data.remove();\n new Vue({\n delimiters: ['${', '}'],\n el: this,\n data,\n\n beforeMount() {\n const vm = this;\n\n this.noResults = vm.$el.getAttribute('data-no-results');\n this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true';\n\n document.body.addEventListener('click', (event) => {\n if (vm.$el.contains(event.target)) {\n return;\n }\n if (vm.menuVisible) {\n Vue.set(vm, 'menuVisible', false);\n }\n });\n },\n\n watch: {\n menuVisible(visible) {\n if (visible) {\n this.focusSearchField();\n }\n }\n },\n\n computed: {\n filteredItems() {\n const vm = this;\n\n const items = vm.items.filter((item) => {\n return ((vm.mode === 'branches' && item.branch) || (vm.mode === 'tags' && item.tag))\n && (!vm.searchTerm || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0);\n });\n\n vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1);\n\n return items;\n },\n showNoResults() {\n return this.filteredItems.length === 0 && !this.showCreateNewBranch;\n },\n showCreateNewBranch() {\n const vm = this;\n if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') {\n return false;\n }\n\n return vm.items.filter((item) => item.name.toLowerCase() === vm.searchTerm.toLowerCase()).length === 0;\n }\n },\n\n methods: {\n selectItem(item) {\n const prev = this.getSelected();\n if (prev !== null) {\n prev.selected = false;\n }\n item.selected = true;\n window.location.href = item.url;\n },\n createNewBranch() {\n if (!this.showCreateNewBranch) {\n return;\n }\n this.$refs.newBranchForm.submit();\n },\n focusSearchField() {\n const vm = this;\n Vue.nextTick(() => {\n vm.$refs.searchField.focus();\n });\n },\n getSelected() {\n for (let i = 0, j = this.items.length; i < j; ++i) {\n if (this.items[i].selected) return this.items[i];\n }\n return null;\n },\n getSelectedIndexInFiltered() {\n for (let i = 0, j = this.filteredItems.length; i < j; ++i) {\n if (this.filteredItems[i].selected) return i;\n }\n return -1;\n },\n scrollToActive() {\n let el = this.$refs[`listItem${this.active}`];\n if (!el || el.length === 0) {\n return;\n }\n if (Array.isArray(el)) {\n el = el[0];\n }\n\n const cont = this.$refs.scrollContainer;\n\n if (el.offsetTop < cont.scrollTop) {\n cont.scrollTop = el.offsetTop;\n } else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) {\n cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight;\n }\n },\n keydown(event) {\n const vm = this;\n if (event.keyCode === 40) {\n // arrow down\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) {\n return;\n }\n vm.active++;\n vm.scrollToActive();\n }\n if (event.keyCode === 38) {\n // arrow up\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active <= 0) {\n return;\n }\n vm.active--;\n vm.scrollToActive();\n }\n if (event.keyCode === 13) {\n // enter\n event.preventDefault();\n\n if (vm.active >= vm.filteredItems.length) {\n vm.createNewBranch();\n } else if (vm.active >= 0) {\n vm.selectItem(vm.filteredItems[vm.active]);\n }\n }\n if (event.keyCode === 27) {\n // escape\n event.preventDefault();\n vm.menuVisible = false;\n }\n }\n }\n });\n });\n}\n\n$('.commit-button').click(function (e) {\n e.preventDefault();\n $(this).parent().find('.commit-body').toggle();\n});\n\nfunction initNavbarContentToggle() {\n const content = $('#navbar');\n const toggle = $('#navbar-expand-toggle');\n let isExpanded = false;\n toggle.click(() => {\n isExpanded = !isExpanded;\n if (isExpanded) {\n content.addClass('shown');\n toggle.addClass('active');\n } else {\n content.removeClass('shown');\n toggle.removeClass('active');\n }\n });\n}\n\nfunction initTopicbar() {\n const mgrBtn = $('#manage_topic');\n const editDiv = $('#topic_edit');\n const viewDiv = $('#repo-topics');\n const saveBtn = $('#save_topic');\n const topicDropdown = $('#topic_edit .dropdown');\n const topicForm = $('#topic_edit.ui.form');\n const topicPrompts = getPrompts();\n\n mgrBtn.click(() => {\n viewDiv.hide();\n editDiv.css('display', ''); // show Semantic UI Grid\n });\n\n function getPrompts() {\n const hidePrompt = $('div.hide#validate_prompt');\n const prompts = {\n countPrompt: hidePrompt.children('#count_prompt').text(),\n formatPrompt: hidePrompt.children('#format_prompt').text()\n };\n hidePrompt.remove();\n return prompts;\n }\n\n saveBtn.click(() => {\n const topics = $('input[name=topics]').val();\n\n $.post(saveBtn.data('link'), {\n _csrf: csrf,\n topics\n }, (_data, _textStatus, xhr) => {\n if (xhr.responseJSON.status === 'ok') {\n viewDiv.children('.topic').remove();\n if (topics.length) {\n const topicArray = topics.split(',');\n\n const last = viewDiv.children('a').last();\n for (let i = 0; i < topicArray.length; i++) {\n $(`
${topicArray[i]}
`).insertBefore(last);\n }\n }\n editDiv.css('display', 'none');\n viewDiv.show();\n }\n }).fail((xhr) => {\n if (xhr.status === 422) {\n if (xhr.responseJSON.invalidTopics.length > 0) {\n topicPrompts.formatPrompt = xhr.responseJSON.message;\n\n const { invalidTopics } = xhr.responseJSON;\n const topicLables = topicDropdown.children('a.ui.label');\n\n topics.split(',').forEach((value, index) => {\n for (let i = 0; i < invalidTopics.length; i++) {\n if (invalidTopics[i] === value) {\n topicLables.eq(index).removeClass('green').addClass('red');\n }\n }\n });\n } else {\n topicPrompts.countPrompt = xhr.responseJSON.message;\n }\n }\n }).always(() => {\n topicForm.form('validate form');\n });\n });\n\n topicDropdown.dropdown({\n allowAdditions: true,\n forceSelection: false,\n fields: { name: 'description', value: 'data-value' },\n saveRemoteData: false,\n label: {\n transition: 'horizontal flip',\n duration: 200,\n variation: false,\n blue: true,\n basic: true,\n },\n className: {\n label: 'ui small label'\n },\n apiSettings: {\n url: `${suburl}/api/v1/topics/search?q={query}`,\n throttle: 500,\n cache: false,\n onResponse(res) {\n const formattedResponse = {\n success: false,\n results: [],\n };\n const stripTags = function (text) {\n return text.replace(/<[^>]*>?/gm, '');\n };\n\n const query = stripTags(this.urlData.query.trim());\n let found_query = false;\n const current_topics = [];\n topicDropdown.find('div.label.visible.topic,a.label.visible').each((_, e) => { current_topics.push(e.dataset.value); });\n\n if (res.topics) {\n let found = false;\n for (let i = 0; i < res.topics.length; i++) {\n // skip currently added tags\n if (current_topics.indexOf(res.topics[i].topic_name) !== -1) {\n continue;\n }\n\n if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()) {\n found_query = true;\n }\n formattedResponse.results.push({ description: res.topics[i].topic_name, 'data-value': res.topics[i].topic_name });\n found = true;\n }\n formattedResponse.success = found;\n }\n\n if (query.length > 0 && !found_query) {\n formattedResponse.success = true;\n formattedResponse.results.unshift({ description: query, 'data-value': query });\n } else if (query.length > 0 && found_query) {\n formattedResponse.results.sort((a, b) => {\n if (a.description.toLowerCase() === query.toLowerCase()) return -1;\n if (b.description.toLowerCase() === query.toLowerCase()) return 1;\n if (a.description > b.description) return -1;\n if (a.description < b.description) return 1;\n return 0;\n });\n }\n\n\n return formattedResponse;\n },\n },\n onLabelCreate(value) {\n value = value.toLowerCase().trim();\n this.attr('data-value', value).contents().first().replaceWith(value);\n return $(this);\n },\n onAdd(addedValue, _addedText, $addedChoice) {\n addedValue = addedValue.toLowerCase().trim();\n $($addedChoice).attr('data-value', addedValue);\n $($addedChoice).attr('data-text', addedValue);\n }\n });\n\n $.fn.form.settings.rules.validateTopic = function (_values, regExp) {\n const topics = topicDropdown.children('a.ui.label');\n const status = topics.length === 0 || topics.last().attr('data-value').match(regExp);\n if (!status) {\n topics.last().removeClass('green').addClass('red');\n }\n return status && topicDropdown.children('a.ui.label.red').length === 0;\n };\n\n topicForm.form({\n on: 'change',\n inline: true,\n fields: {\n topics: {\n identifier: 'topics',\n rules: [\n {\n type: 'validateTopic',\n value: /^[a-z0-9][a-z0-9-]{1,35}$/,\n prompt: topicPrompts.formatPrompt\n },\n {\n type: 'maxCount[25]',\n prompt: topicPrompts.countPrompt\n }\n ]\n },\n }\n });\n}\n\nwindow.toggleDeadlineForm = function () {\n $('#deadlineForm').fadeToggle(150);\n};\n\nwindow.setDeadline = function () {\n const deadline = $('#deadlineDate').val();\n window.updateDeadline(deadline);\n};\n\nwindow.updateDeadline = function (deadlineString) {\n $('#deadline-err-invalid-date').hide();\n $('#deadline-loader').addClass('loading');\n\n let realDeadline = null;\n if (deadlineString !== '') {\n const newDate = Date.parse(deadlineString);\n\n if (Number.isNaN(newDate)) {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n return false;\n }\n realDeadline = new Date(newDate);\n }\n\n $.ajax(`${$('#update-issue-deadline-form').attr('action')}/deadline`, {\n data: JSON.stringify({\n due_date: realDeadline,\n }),\n headers: {\n 'X-Csrf-Token': csrf,\n 'X-Remote': true,\n },\n contentType: 'application/json',\n type: 'POST',\n success() {\n reload();\n },\n error() {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n }\n });\n};\n\nwindow.deleteDependencyModal = function (id, type) {\n $('.remove-dependency')\n .modal({\n closable: false,\n duration: 200,\n onApprove() {\n $('#removeDependencyID').val(id);\n $('#dependencyType').val(type);\n $('#removeDependencyForm').submit();\n }\n }).modal('show');\n};\n\nfunction initIssueList() {\n const repolink = $('#repolink').val();\n const repoId = $('#repoId').val();\n const crossRepoSearch = $('#crossRepoSearch').val();\n let issueSearchUrl = `${suburl}/api/v1/repos/${repolink}/issues?q={query}`;\n if (crossRepoSearch === 'true') {\n issueSearchUrl = `${suburl}/api/v1/repos/issues/search?q={query}&priority_repo_id=${repoId}`;\n }\n $('#new-dependency-drop-list')\n .dropdown({\n apiSettings: {\n url: issueSearchUrl,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n const currIssueId = $('#new-dependency-drop-list').data('issue-id');\n // Parse the response from the api to work with our dropdown\n $.each(response, (_i, issue) => {\n // Don't list current issue in the dependency list.\n if (issue.id === currIssueId) {\n return;\n }\n filteredResponse.results.push({\n name: `#${issue.number} ${htmlEncode(issue.title)\n }
${htmlEncode(issue.repository.full_name)}
`,\n value: issue.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n\n $('.menu a.label-filter-item').each(function () {\n $(this).click(function (e) {\n if (e.altKey) {\n e.preventDefault();\n\n const href = $(this).attr('href');\n const id = $(this).data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n });\n });\n\n $('.menu .ui.dropdown.label-filter').keydown((e) => {\n if (e.altKey && e.keyCode === 13) {\n const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected');\n\n if (selectedItems.length > 0) {\n const item = $(selectedItems[0]);\n\n const href = item.attr('href');\n const id = item.data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n }\n });\n}\nwindow.cancelCodeComment = function (btn) {\n const form = $(btn).closest('form');\n if (form.length > 0 && form.hasClass('comment-form')) {\n form.addClass('hide');\n form.parent().find('button.comment-form-reply').show();\n } else {\n form.closest('.comment-code-cloud').remove();\n }\n};\nwindow.onOAuthLoginClick = function () {\n const oauthLoader = $('#oauth2-login-loader');\n const oauthNav = $('#oauth2-login-navigator');\n\n oauthNav.hide();\n oauthLoader.removeClass('disabled');\n\n setTimeout(() => {\n // recover previous content to let user try again\n // usually redirection will be performed before this action\n oauthLoader.addClass('disabled');\n oauthNav.show();\n }, 5000);\n};\n","/* globals gitGraph */\n\n$(() => {\n const graphList = [];\n\n if (!document.getElementById('graph-canvas')) {\n return;\n }\n\n $('#graph-raw-list li span.node-relation').each(function () {\n graphList.push($(this).text());\n });\n\n gitGraph(document.getElementById('graph-canvas'), graphList);\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./web_src/js/publicPath.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./web_src/js/index.js","webpack:///./web_src/js/gitGraph.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","1","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","arrayWithHoles","iterableToArrayLimit","nonIterableRest","arr","currentScript","url","URL","__webpack_public_path__","pathname","replace","querySelector","getAttribute","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","obj","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","previousPromise","callInvokeWithMethodAndArg","invoke","result","__await","then","unwrapped","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","toString","keys","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","Array","isArray","_arr","_n","_d","_e","_s","_i","csrf","suburl","previewFileModes","simpleMDEditor","codeMirrorEditor","htmlEncode","text","jQuery","html","initCommentPreviewTab","$form","$tabMenu","find","tab","click","$this","$","post","_csrf","val","$previewPanel","emojify","run","each","hljs","highlightBlock","buttonsClickOnEnter","initEditForm","$previewTab","split","initEditPreviewTab","content","$diffPreviewPanel","updateIssuesMeta","action","issueIds","elementId","ajax","issue_ids","id","success","reload","location","initImagePaste","field","addEventListener","pasteEvent","callback","clipboardData","items","indexOf","blob","getAsFile","preventDefault","stopPropagation","retrieveImageFromClipboardAsBlob","img","substr","lastIndexOf","selectionStart","startPos","endPos","selectionEnd","substring","insertAtCursor","file","xhr","XMLHttpRequest","status","responseText","open","setRequestHeader","formData","FormData","append","send","uploadFile","res","JSON","parse","oldval","newval","replaceAndKeepCursor","uuid","input","initCommentForm","$selectBranch","selectedValue","css","removeClass","addClass","initListSubmits","selectItem","selector","outerSelector","$list","$noSelect","$listMenu","hasLabelUpdateAction","labels","dropdown","label","hasClass","listIds","parent","join","select_id","input_id","$menu","hasUpdateAction","initRepository","$data","searchTerm","noResults","canCreateBranch","menuVisible","active","branch","tag","selected","remove","Vue","delimiters","el","beforeMount","vm","$el","body","contains","set","watch","visible","focusSearchField","computed","filteredItems","filter","item","toLowerCase","showCreateNewBranch","showNoResults","methods","getSelected","href","createNewBranch","$refs","newBranchForm","submit","nextTick","searchField","focus","j","getSelectedIndexInFiltered","scrollToActive","cont","scrollContainer","offsetTop","scrollTop","clientHeight","keydown","keyCode","initFilterSearchDropdown","keyup","$prompt","show","hide","change","checked","$newLabelPanel","minicolors","color_hex","modal","onApprove","$datepicker","datetimepicker","lang","inline","timepicker","startDate","formatDate","onSelectDate","ct","dateFormat","$issueTitle","$editInput","editTitleToggle","toggle","title","$textarea","$segment","$editContentZone","$renderContent","$rawContent","issuesTribute","attach","emojiTribute","$dropzone","$files","filenameDict","dropzone","headers","maxFiles","maxFilesize","acceptedFiles","addRemoveLinks","dictDefaultMessage","dictInvalidFileType","dictFileTooBig","dictRemoveFile","init","on","submitted","getJSON","drop","removeAllFiles","empty","imgSrc","emit","files","$editContentForm","attr","$attachments","map","$content","attachments","confirm","$statusButton","$mergeButton","onChange","_text","_value","$choice","closest","initReactionSelector","reactions","popup","position","metadata","actionURL","resp","react","insertBefore","appendTo","hasEmoji","$item","addLine","delLine","addPercent","parseFloat","localStorage","setItem","select","$repoComparePull","$dropdown","fullTextSearch","selectOnKeydown","assingMenuAttributes","menu","Math","floor","random","initRepositoryCollaboration","uid","initEditor","prop","$editFilename","parts","$section","$divider","getCursorPosition","last","setSelectionRange","element","trigger","$editArea","markdownFileExts","lineWrapExtensions","spec","extension","extWithDot","dataUrl","apiCall","exec","CodeMirror","findModeByExtension","previewLink","mime","toTextArea","SimpleMDE","autoDownloadFontAwesome","forceSync","renderingConfig","singleLineBreaks","indentWithTabs","tabSize","spellChecker","previewRender","plainText","preview","innerHTML","toolbar","setSimpleMDE","fromTextArea","lineNumbers","cm","_change","getValue","setCodeMirror","setOption","autoLoadMode","editorconfig","indent_style","Tab","spaces","parseInt","getOption","replaceSelection","indent_size","tab_width","$commitButton","$editForm","areYouSure","silent","dirtyClass","fieldSelector","dirty","initUserSettings","keypress","initCodeView","$select","siblings","selectRange","shiftKey","eq","getSelection","removeAllRanges","selection","$first","hash","match","offset","top","$foldButton","slideUp","slideDown","insertBlobExcerpt","$blob","$row","replaceWith","u2fSigned","stringify","contentType","fail","u2fError","u2fRegistered","errorCode","checkError","u2fErrors","browser","2","3","4","5","u2fRegisterRequest","req","registeredKeys","u2fApi","register","appId","registerRequests","catch","reason","metaData","code","changeHash","history","pushState","$from","a","b","classes","showDeletePopup","dialog","closable","redirect","showAddAllPopup","graphCanvas","getElementById","gitGraph","default","graphList","Dropzone","autoDiscover","pos","Sel","createRange","SelLength","moveStart","ready","onShow","transition","direction","accordion","checkbox","progress","showActivity","slideToggle","nodes","querySelectorAll","setConfig","img_dir","ignore_emoticons","getElementsByClassName","childNodes","nodeName","$searchTeamBox","$searchRepoBox","toggleMigrations","isExpanded","mgrBtn","editDiv","viewDiv","saveBtn","topicDropdown","topicForm","topicPrompts","hidePrompt","prompts","clipboard","Clipboard","clearSelection","node","encodeURIComponent","children","dataset","issueIDs","issueId","_","first","search","minCharacters","apiSettings","onResponse","response","login","full_name","image","avatar_url","results","searchFields","permission","description","dbType","dbDefaults","MySQL","PostgreSQL","MSSQL","_type","defaultHost","is","authUserName","cloneAddr","startsWith","sideBySideChanges","sideBySideTimeout","simplemde","render","isSideBySideActive","codemirror","cursorPos","getCursor","setCursor","line","ch","className","getInputField","$bEdit","$bPrev","$toolbar","$bPreview","$bSideBySide","initWikiForm","updateContentType","initWebhook","removeAttr","authType","onOAuth2Change","onSecurityProtocolChange","onUsePagedSearchChange","onOAuth2UseCustomURLChange","$detailModal","$checkboxes","ids","provider","initAdmin","component","props","searchLimit","Number","String","required","organizations","isOrganization","Boolean","canCreateOrganization","organizationsTotalCount","moreReposLink","repos","reposTotalCount","reposFilter","searchQuery","isLoading","repoTypes","count","searchMode","forks","mirrors","sources","collaborative","showMoreReposLink","searchURL","repoTypeCount","mounted","searchRepos","changeTab","changeReposFilter","showRepo","repo","owner","mirror","fork","searchedMode","searchedURL","searchedQuery","_textStatus","getResponseHeader","always","repoClass","private","initVueApp","ctrlKey","altKey","metaKey","countPrompt","formatPrompt","topics","_data","responseJSON","topicArray","invalidTopics","topicLables","index","form","allowAdditions","forceSelection","fields","saveRemoteData","duration","variation","blue","basic","throttle","cache","formattedResponse","query","urlData","trim","found_query","current_topics","found","topic_name","unshift","sort","onLabelCreate","contents","onAdd","addedValue","_addedText","$addedChoice","settings","rules","validateTopic","_values","regExp","identifier","prompt","ensureSupport","sign","challenge","allowMultiple","repolink","repoId","crossRepoSearch","issueSearchUrl","filteredResponse","currIssueId","issue","number","repository","regStr","RegExp","selectedItems","initIssueList","toUpperCase","wipPrefixes","sticky","isSplit","side","idx","path","tr","ntr","after","td","commentCloud","initRepoStatusChecker","migrating","repo_name","$repoTemplate","checkTemplate","$templateUnits","$nonTemplate","changeOwner","_r","initTemplateSearch","getItem","routes","$cloneAddr","$repoName","arrays","$title","timeAddManual","toggleStopwatch","cancelStopwatch","initHeatmap","appElementId","heatmapUser","locale","contributions","no_contributions","vueDelimeters","user","colorRange","endDate","totalContributions","getColor","Date","loadHeatmap","userName","chartRawData","chartData","date","timestamp","color","getComputedStyle","backgroundColor","removeChild","template","toggleDeadlineForm","fadeToggle","setDeadline","deadline","updateDeadline","deadlineString","realDeadline","newDate","due_date","deleteDependencyModal","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AMC,EAAc9oB,EAAE,wBAChB+oB,EAAW/oB,EAAE,2BAEnB+oB,EAAS3f,OACT0f,EAAYrkB,YAAY,YAExBlQ,YAAW,WAGTu0B,EAAYpkB,SAAS,YACrBqkB,EAAS5f,SACR","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"0\":\"gitgraph\"}[chunkId]||chunkId) + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = require(\"regenerator-runtime\");\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","/* This sets up webpack's chunk loading to load resources from the same\n directory where it loaded index.js from. This file must be imported\n before any lazy-loading is being attempted. */\n\nif (document.currentScript && document.currentScript.src) {\n const url = new URL(document.currentScript.src);\n __webpack_public_path__ = `${url.pathname.replace(/\\/[^/]*$/, '')}/`;\n} else {\n // compat: IE11\n const script = document.querySelector('script[src*=\"/index.js\"]');\n __webpack_public_path__ = `${script.getAttribute('src').replace(/\\/[^/]*$/, '')}/`;\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","/* globals wipPrefixes, issuesTribute, emojiTribute */\n/* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */\n/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */\n\nimport './publicPath';\nimport './gitGraph';\n\nfunction htmlEncode(text) {\n return jQuery('
').text(text).html();\n}\n\nlet csrf;\nlet suburl;\nlet previewFileModes;\nlet simpleMDEditor;\nlet codeMirrorEditor;\n\n// Disable Dropzone auto-discover because it's manually initialized\nif (typeof (Dropzone) !== 'undefined') {\n Dropzone.autoDiscover = false;\n}\n\nfunction initCommentPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n\n buttonsClickOnEnter();\n}\n\nfunction initEditPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n const $previewTab = $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`);\n if ($previewTab.length) {\n previewFileModes = $previewTab.data('preview-file-modes').split(',');\n $previewTab.click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n }\n}\n\nfunction initEditDiffTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('diff')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n context: $this.data('context'),\n content: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $diffPreviewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('diff')}\"]`);\n $diffPreviewPanel.html(data);\n emojify.run($diffPreviewPanel[0]);\n });\n });\n}\n\n\nfunction initEditForm() {\n if ($('.edit.form').length === 0) {\n return;\n }\n\n initEditPreviewTab($('.edit.form'));\n initEditDiffTab($('.edit.form'));\n}\n\nfunction initBranchSelector() {\n const $selectBranch = $('.ui.select-branch');\n const $branchMenu = $selectBranch.find('.reference-list-menu');\n $branchMenu.find('.item:not(.no-select)').click(function () {\n const selectedValue = $(this).data('id');\n $($(this).data('id-selector')).val(selectedValue);\n $selectBranch.find('.ui .branch-name').text(selectedValue);\n });\n $selectBranch.find('.reference.column').click(function () {\n $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none');\n $selectBranch.find('.reference .text').removeClass('black');\n $($(this).data('target')).css('display', 'block');\n $(this).find('.text').addClass('black');\n return false;\n });\n}\n\nfunction updateIssuesMeta(url, action, issueIds, elementId) {\n return new Promise(((resolve) => {\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n action,\n issue_ids: issueIds,\n id: elementId\n },\n success: resolve\n });\n }));\n}\n\nfunction initRepoStatusChecker() {\n const migrating = $('#repo_migrating');\n $('#repo_migrating_failed').hide();\n if (migrating) {\n const repo_name = migrating.attr('repo');\n if (typeof repo_name === 'undefined') {\n return;\n }\n $.ajax({\n type: 'GET',\n url: `${suburl}/${repo_name}/status`,\n data: {\n _csrf: csrf,\n },\n complete(xhr) {\n if (xhr.status === 200) {\n if (xhr.responseJSON) {\n if (xhr.responseJSON.status === 0) {\n window.location.reload();\n return;\n }\n\n setTimeout(() => {\n initRepoStatusChecker();\n }, 2000);\n return;\n }\n }\n $('#repo_migrating_progress').hide();\n $('#repo_migrating_failed').show();\n }\n });\n }\n}\n\nfunction initReactionSelector(parent) {\n let reactions = '';\n if (!parent) {\n parent = $(document);\n reactions = '.reactions > ';\n }\n\n parent.find(`${reactions}a.label`).popup({ position: 'bottom left', metadata: { content: 'title', title: 'none' } });\n\n parent.find(`.select-reaction > .menu > .item, ${reactions}a.label`).on('click', function (e) {\n const vm = this;\n e.preventDefault();\n\n if ($(this).hasClass('disabled')) return;\n\n const actionURL = $(this).hasClass('item')\n ? $(this).closest('.select-reaction').data('action-url')\n : $(this).data('action-url');\n const url = `${actionURL}/${$(this).hasClass('blue') ? 'unreact' : 'react'}`;\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n content: $(this).data('content')\n }\n }).done((resp) => {\n if (resp && (resp.html || resp.empty)) {\n const content = $(vm).closest('.content');\n let react = content.find('.segment.reactions');\n if (!resp.empty && react.length > 0) {\n react.remove();\n }\n if (!resp.empty) {\n react = $('
');\n const attachments = content.find('.segment.bottom:first');\n if (attachments.length > 0) {\n react.insertBefore(attachments);\n } else {\n react.appendTo(content);\n }\n react.html(resp.html);\n const hasEmoji = react.find('.has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji.get(i));\n }\n react.find('.dropdown').dropdown();\n initReactionSelector(react);\n }\n }\n });\n });\n}\n\nfunction insertAtCursor(field, value) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.substring(0, startPos)\n + value\n + field.value.substring(endPos, field.value.length);\n field.selectionStart = startPos + value.length;\n field.selectionEnd = startPos + value.length;\n } else {\n field.value += value;\n }\n}\n\nfunction replaceAndKeepCursor(field, oldval, newval) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.replace(oldval, newval);\n field.selectionStart = startPos + newval.length - oldval.length;\n field.selectionEnd = endPos + newval.length - oldval.length;\n } else {\n field.value = field.value.replace(oldval, newval);\n }\n}\n\nfunction retrieveImageFromClipboardAsBlob(pasteEvent, callback) {\n if (!pasteEvent.clipboardData) {\n return;\n }\n\n const { items } = pasteEvent.clipboardData;\n if (typeof items === 'undefined') {\n return;\n }\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].type.indexOf('image') === -1) continue;\n const blob = items[i].getAsFile();\n\n if (typeof (callback) === 'function') {\n pasteEvent.preventDefault();\n pasteEvent.stopPropagation();\n callback(blob);\n }\n }\n}\n\nfunction uploadFile(file, callback) {\n const xhr = new XMLHttpRequest();\n\n xhr.onload = function () {\n if (xhr.status === 200) {\n callback(xhr.responseText);\n }\n };\n\n xhr.open('post', `${suburl}/attachments`, true);\n xhr.setRequestHeader('X-Csrf-Token', csrf);\n const formData = new FormData();\n formData.append('file', file, file.name);\n xhr.send(formData);\n}\n\nfunction reload() {\n window.location.reload();\n}\n\nfunction initImagePaste(target) {\n target.each(function () {\n const field = this;\n field.addEventListener('paste', (event) => {\n retrieveImageFromClipboardAsBlob(event, (img) => {\n const name = img.name.substr(0, img.name.lastIndexOf('.'));\n insertAtCursor(field, `![${name}]()`);\n uploadFile(img, (res) => {\n const data = JSON.parse(res);\n replaceAndKeepCursor(field, `![${name}]()`, `![${name}](${suburl}/attachments/${data.uuid})`);\n const input = $(``).val(data.uuid);\n $('.files').append(input);\n });\n });\n }, false);\n });\n}\n\nfunction initCommentForm() {\n if ($('.comment.form').length === 0) {\n return;\n }\n\n initBranchSelector();\n initCommentPreviewTab($('.comment.form'));\n initImagePaste($('.comment.form textarea'));\n\n // Listsubmit\n function initListSubmits(selector, outerSelector) {\n const $list = $(`.ui.${outerSelector}.list`);\n const $noSelect = $list.find('.no-select');\n const $listMenu = $(`.${selector} .menu`);\n let hasLabelUpdateAction = $listMenu.data('action') === 'update';\n const labels = {};\n\n $(`.${selector}`).dropdown('setting', 'onHide', () => {\n hasLabelUpdateAction = $listMenu.data('action') === 'update'; // Update the var\n if (hasLabelUpdateAction) {\n const promises = [];\n Object.keys(labels).forEach((elementId) => {\n const label = labels[elementId];\n const promise = updateIssuesMeta(\n label['update-url'],\n label.action,\n label['issue-id'],\n elementId\n );\n promises.push(promise);\n });\n Promise.all(promises).then(reload);\n }\n });\n\n $listMenu.find('.item:not(.no-select)').click(function () {\n // we don't need the action attribute when updating assignees\n if (selector === 'select-assignees-modify') {\n // UI magic. We need to do this here, otherwise it would destroy the functionality of\n // adding/removing labels\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n }\n\n updateIssuesMeta(\n $listMenu.data('update-url'),\n '',\n $listMenu.data('issue-id'),\n $(this).data('id')\n );\n $listMenu.data('action', 'update'); // Update to reload the page when we updated items\n return false;\n }\n\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'detach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'attach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n }\n\n const listIds = [];\n $(this).parent().find('.item').each(function () {\n if ($(this).hasClass('checked')) {\n listIds.push($(this).data('id'));\n $($(this).data('id-selector')).removeClass('hide');\n } else {\n $($(this).data('id-selector')).addClass('hide');\n }\n });\n if (listIds.length === 0) {\n $noSelect.removeClass('hide');\n } else {\n $noSelect.addClass('hide');\n }\n $($(this).parent().data('id')).val(listIds.join(','));\n return false;\n });\n $listMenu.find('.no-select.item').click(function () {\n if (hasLabelUpdateAction || selector === 'select-assignees-modify') {\n updateIssuesMeta(\n $listMenu.data('update-url'),\n 'clear',\n $listMenu.data('issue-id'),\n ''\n ).then(reload);\n }\n\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n });\n\n $list.find('.item').each(function () {\n $(this).addClass('hide');\n });\n $noSelect.removeClass('hide');\n $($(this).parent().data('id')).val('');\n });\n }\n\n // Init labels and assignees\n initListSubmits('select-label', 'labels');\n initListSubmits('select-assignees', 'assignees');\n initListSubmits('select-assignees-modify', 'assignees');\n\n function selectItem(select_id, input_id) {\n const $menu = $(`${select_id} .menu`);\n const $list = $(`.ui${select_id}.list`);\n const hasUpdateAction = $menu.data('action') === 'update';\n\n $menu.find('.item:not(.no-select)').click(function () {\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('selected active');\n });\n\n $(this).addClass('selected active');\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n switch (input_id) {\n case '#milestone_id':\n $list.find('.selected').html(`${\n htmlEncode($(this).text())}`);\n break;\n case '#assignee_id':\n $list.find('.selected').html(``\n + `${\n htmlEncode($(this).text())}`);\n }\n $(`.ui${select_id}.list .no-select`).addClass('hide');\n $(input_id).val($(this).data('id'));\n });\n $menu.find('.no-select.item').click(function () {\n $(this).parent().find('.item:not(.no-select)').each(function () {\n $(this).removeClass('selected active');\n });\n\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n\n $list.find('.selected').html('');\n $list.find('.no-select').removeClass('hide');\n $(input_id).val('');\n });\n }\n\n // Milestone and assignee\n selectItem('.select-milestone', '#milestone_id');\n selectItem('.select-assignee', '#assignee_id');\n}\n\nfunction initInstall() {\n if ($('.install').length === 0) {\n return;\n }\n\n if ($('#db_host').val() === '') {\n $('#db_host').val('127.0.0.1:3306');\n $('#db_user').val('gitea');\n $('#db_name').val('gitea');\n }\n\n // Database type change detection.\n $('#db_type').change(function () {\n const sqliteDefault = 'data/gitea.db';\n const tidbDefault = 'data/gitea_tidb';\n\n const dbType = $(this).val();\n if (dbType === 'SQLite3') {\n $('#sql_settings').hide();\n $('#pgsql_settings').hide();\n $('#mysql_settings').hide();\n $('#sqlite_settings').show();\n\n if (dbType === 'SQLite3' && $('#db_path').val() === tidbDefault) {\n $('#db_path').val(sqliteDefault);\n }\n return;\n }\n\n const dbDefaults = {\n MySQL: '127.0.0.1:3306',\n PostgreSQL: '127.0.0.1:5432',\n MSSQL: '127.0.0.1:1433'\n };\n\n $('#sqlite_settings').hide();\n $('#sql_settings').show();\n\n $('#pgsql_settings').toggle(dbType === 'PostgreSQL');\n $('#mysql_settings').toggle(dbType === 'MySQL');\n $.each(dbDefaults, (_type, defaultHost) => {\n if ($('#db_host').val() === defaultHost) {\n $('#db_host').val(dbDefaults[dbType]);\n return false;\n }\n });\n });\n\n // TODO: better handling of exclusive relations.\n $('#offline-mode input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('check');\n $('#federated-avatar-lookup').checkbox('uncheck');\n }\n });\n $('#disable-gravatar input').change(function () {\n if ($(this).is(':checked')) {\n $('#federated-avatar-lookup').checkbox('uncheck');\n } else {\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#federated-avatar-lookup input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('uncheck');\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#enable-openid-signin input').change(function () {\n if ($(this).is(':checked')) {\n if (!$('#disable-registration input').is(':checked')) {\n $('#enable-openid-signup').checkbox('check');\n }\n } else {\n $('#enable-openid-signup').checkbox('uncheck');\n }\n });\n $('#disable-registration input').change(function () {\n if ($(this).is(':checked')) {\n $('#enable-captcha').checkbox('uncheck');\n $('#enable-openid-signup').checkbox('uncheck');\n } else {\n $('#enable-openid-signup').checkbox('check');\n }\n });\n $('#enable-captcha input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-registration').checkbox('uncheck');\n }\n });\n}\n\nfunction initRepository() {\n if ($('.repository').length === 0) {\n return;\n }\n\n function initFilterSearchDropdown(selector) {\n const $dropdown = $(selector);\n $dropdown.dropdown({\n fullTextSearch: true,\n selectOnKeydown: false,\n onChange(_text, _value, $choice) {\n if ($choice.data('url')) {\n window.location.href = $choice.data('url');\n }\n },\n message: { noResults: $dropdown.data('no-results') }\n });\n }\n\n // File list and commits\n if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) {\n initFilterBranchTagDropdown('.choose.reference .dropdown');\n }\n\n // Wiki\n if ($('.repository.wiki.view').length > 0) {\n initFilterSearchDropdown('.choose.page .dropdown');\n }\n\n // Options\n if ($('.repository.settings.options').length > 0) {\n $('#repo_name').keyup(function () {\n const $prompt = $('#repo-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n\n // Enable or select internal/external wiki system and issue tracker.\n $('.enable-system').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).addClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled');\n }\n });\n $('.enable-system-radio').change(function () {\n if (this.value === 'false') {\n $($(this).data('target')).addClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');\n } else if (this.value === 'true') {\n $($(this).data('target')).removeClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');\n }\n });\n }\n\n // Labels\n if ($('.repository.labels').length > 0) {\n // Create label\n const $newLabelPanel = $('.new-label.segment');\n $('.new-label.button').click(() => {\n $newLabelPanel.show();\n });\n $('.new-label.segment .cancel').click(() => {\n $newLabelPanel.hide();\n });\n\n $('.color-picker').each(function () {\n $(this).minicolors();\n });\n $('.precolors .color').click(function () {\n const color_hex = $(this).data('color-hex');\n $('.color-picker').val(color_hex);\n $('.minicolors-swatch-color').css('background-color', color_hex);\n });\n $('.edit-label-button').click(function () {\n $('#label-modal-id').val($(this).data('id'));\n $('.edit-label .new-label-input').val($(this).data('title'));\n $('.edit-label .new-label-desc-input').val($(this).data('description'));\n $('.edit-label .color-picker').val($(this).data('color'));\n $('.minicolors-swatch-color').css('background-color', $(this).data('color'));\n $('.edit-label.modal').modal({\n onApprove() {\n $('.edit-label.form').submit();\n }\n }).modal('show');\n return false;\n });\n }\n\n // Milestones\n if ($('.repository.new.milestone').length > 0) {\n const $datepicker = $('.milestone.datepicker');\n $datepicker.datetimepicker({\n lang: $datepicker.data('lang'),\n inline: true,\n timepicker: false,\n startDate: $datepicker.data('start-date'),\n formatDate: 'Y-m-d',\n onSelectDate(ct) {\n $('#deadline').val(ct.dateFormat('Y-m-d'));\n }\n });\n $('#clear-date').click(() => {\n $('#deadline').val('');\n return false;\n });\n }\n\n // Issues\n if ($('.repository.view.issue').length > 0) {\n // Edit issue title\n const $issueTitle = $('#issue-title');\n const $editInput = $('#edit-title-input input');\n const editTitleToggle = function () {\n $issueTitle.toggle();\n $('.not-in-edit').toggle();\n $('#edit-title-input').toggle();\n $('.in-edit').toggle();\n $editInput.focus();\n return false;\n };\n $('#edit-title').click(editTitleToggle);\n $('#cancel-edit-title').click(editTitleToggle);\n $('#save-edit-title').click(editTitleToggle).click(function () {\n if ($editInput.val().length === 0 || $editInput.val() === $issueTitle.text()) {\n $editInput.val($issueTitle.text());\n return false;\n }\n\n $.post($(this).data('update-url'), {\n _csrf: csrf,\n title: $editInput.val()\n },\n (data) => {\n $editInput.val(data.title);\n $issueTitle.text(data.title);\n reload();\n });\n return false;\n });\n\n // Edit issue or comment content\n $('.edit-content').click(function () {\n const $segment = $(this).parent().parent().parent()\n .next();\n const $editContentZone = $segment.find('.edit-content-zone');\n const $renderContent = $segment.find('.render-content');\n const $rawContent = $segment.find('.raw-content');\n let $textarea;\n\n // Setup new form\n if ($editContentZone.html().length === 0) {\n $editContentZone.html($('#edit-content-form').html());\n $textarea = $editContentZone.find('textarea');\n issuesTribute.attach($textarea.get());\n emojiTribute.attach($textarea.get());\n\n const $dropzone = $editContentZone.find('.dropzone');\n $dropzone.data('saved', false);\n const $files = $editContentZone.find('.comment-files');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n $dropzone.dropzone({\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = {\n uuid: data.uuid,\n submitted: false\n };\n const input = $(``).val(data.uuid);\n $files.append(input);\n });\n this.on('removedfile', (file) => {\n if (!(file.name in filenameDict)) {\n return;\n }\n $(`#${filenameDict[file.name].uuid}`).remove();\n if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name].uuid,\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n this.on('submit', () => {\n $.each(filenameDict, (name) => {\n filenameDict[name].submitted = true;\n });\n });\n this.on('reload', () => {\n $.getJSON($editContentZone.data('attachment-url'), (data) => {\n const drop = $dropzone.get(0).dropzone;\n drop.removeAllFiles(true);\n $files.empty();\n $.each(data, function () {\n const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`;\n drop.emit('addedfile', this);\n drop.emit('thumbnail', this, imgSrc);\n drop.emit('complete', this);\n drop.files.push(this);\n filenameDict[this.name] = {\n submitted: true,\n uuid: this.uuid\n };\n $dropzone.find(`img[src='${imgSrc}']`).css('max-width', '100%');\n const input = $(``).val(this.uuid);\n $files.append(input);\n });\n });\n });\n }\n });\n $dropzone.get(0).dropzone.emit('reload');\n }\n // Give new write/preview data-tab name to distinguish from others\n const $editContentForm = $editContentZone.find('.ui.comment.form');\n const $tabMenu = $editContentForm.find('.tabular.menu');\n $tabMenu.attr('data-write', $editContentZone.data('write'));\n $tabMenu.attr('data-preview', $editContentZone.data('preview'));\n $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write'));\n $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview'));\n $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write'));\n $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview'));\n\n initCommentPreviewTab($editContentForm);\n\n $editContentZone.find('.cancel.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n $dropzone.get(0).dropzone.emit('reload');\n });\n $editContentZone.find('.save.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n const $attachments = $files.find('[name=files]').map(function () {\n return $(this).val();\n }).get();\n $.post($editContentZone.data('update-url'), {\n _csrf: csrf,\n content: $textarea.val(),\n context: $editContentZone.data('context'),\n files: $attachments\n }, (data) => {\n if (data.length === 0) {\n $renderContent.html($('#no-content').html());\n } else {\n $renderContent.html(data.content);\n emojify.run($renderContent[0]);\n $('pre code', $renderContent[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n const $content = $segment.parent();\n if (!$content.find('.ui.small.images').length) {\n if (data.attachments !== '') {\n $content.append(\n '
'\n );\n $content.find('.ui.small.images').html(data.attachments);\n }\n } else if (data.attachments === '') {\n $content.find('.ui.small.images').parent().remove();\n } else {\n $content.find('.ui.small.images').html(data.attachments);\n }\n $dropzone.get(0).dropzone.emit('submit');\n $dropzone.get(0).dropzone.emit('reload');\n });\n });\n } else {\n $textarea = $segment.find('textarea');\n }\n\n // Show write/preview tab and copy raw content as needed\n $editContentZone.show();\n $renderContent.hide();\n if ($textarea.val().length === 0) {\n $textarea.val($rawContent.text());\n }\n $textarea.focus();\n return false;\n });\n\n // Delete comment\n $('.delete-comment').click(function () {\n const $this = $(this);\n if (window.confirm($this.data('locale'))) {\n $.post($this.data('url'), {\n _csrf: csrf\n }).success(() => {\n $(`#${$this.data('comment-id')}`).remove();\n });\n }\n return false;\n });\n\n // Change status\n const $statusButton = $('#status-button');\n $('#comment-form .edit_area').keyup(function () {\n if ($(this).val().length === 0) {\n $statusButton.text($statusButton.data('status'));\n } else {\n $statusButton.text($statusButton.data('status-and-comment'));\n }\n });\n $statusButton.click(() => {\n $('#status').val($statusButton.data('status-val'));\n $('#comment-form').submit();\n });\n\n // Pull Request merge button\n const $mergeButton = $('.merge-button > button');\n $mergeButton.on('click', function (e) {\n e.preventDefault();\n $(`.${$(this).data('do')}-fields`).show();\n $(this).parent().hide();\n });\n $('.merge-button > .dropdown').dropdown({\n onChange(_text, _value, $choice) {\n if ($choice.data('do')) {\n $mergeButton.find('.button-text').text($choice.text());\n $mergeButton.data('do', $choice.data('do'));\n }\n }\n });\n $('.merge-cancel').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.form').hide();\n $mergeButton.parent().show();\n });\n\n initReactionSelector();\n }\n\n // Diff\n if ($('.repository.diff').length > 0) {\n $('.diff-counter').each(function () {\n const $item = $(this);\n const addLine = $item.find('span[data-line].add').data('line');\n const delLine = $item.find('span[data-line].del').data('line');\n const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100;\n $item.find('.bar .add').css('width', `${addPercent}%`);\n });\n }\n\n // Quick start and repository home\n $('#repo-clone-ssh').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-https').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'ssh');\n });\n $('#repo-clone-https').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-ssh').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'https');\n });\n $('#repo-clone-url').click(function () {\n $(this).select();\n });\n\n // Pull request\n const $repoComparePull = $('.repository.compare.pull');\n if ($repoComparePull.length > 0) {\n initFilterSearchDropdown('.choose.branch .dropdown');\n // show pull request form\n $repoComparePull.find('button.show-form').on('click', function (e) {\n e.preventDefault();\n $repoComparePull.find('.pullrequest-form').show();\n $(this).parent().hide();\n });\n }\n\n // Branches\n if ($('.repository.settings.branches').length > 0) {\n initFilterSearchDropdown('.protected-branches .dropdown');\n $('.enable-protection, .enable-whitelist').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n }\n });\n }\n}\n\nfunction initMigration() {\n const toggleMigrations = function () {\n const authUserName = $('#auth_username').val();\n const cloneAddr = $('#clone_addr').val();\n if (!$('#mirror').is(':checked') && (authUserName && authUserName.length > 0)\n && (cloneAddr !== undefined && (cloneAddr.startsWith('https://github.com') || cloneAddr.startsWith('http://github.com')))) {\n $('#migrate_items').show();\n } else {\n $('#migrate_items').hide();\n }\n };\n\n toggleMigrations();\n\n $('#clone_addr').on('input', toggleMigrations);\n $('#auth_username').on('input', toggleMigrations);\n $('#mirror').on('change', toggleMigrations);\n}\n\nfunction initPullRequestReview() {\n $('.show-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).removeClass('hide');\n $(`#code-preview-${id}`).removeClass('hide');\n $(`#hide-outdated-${id}`).removeClass('hide');\n });\n\n $('.hide-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).addClass('hide');\n $(`#code-preview-${id}`).addClass('hide');\n $(`#show-outdated-${id}`).removeClass('hide');\n });\n\n $('button.comment-form-reply').on('click', function (e) {\n e.preventDefault();\n $(this).hide();\n const form = $(this).parent().find('.comment-form');\n form.removeClass('hide');\n assingMenuAttributes(form.find('.menu'));\n });\n // The following part is only for diff views\n if ($('.repository.pull.diff').length === 0) {\n return;\n }\n\n $('.diff-detail-box.ui.sticky').sticky();\n\n $('.btn-review').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n }).closest('.dropdown').find('.link.close')\n .on('click', function (e) {\n e.preventDefault();\n $(this).closest('.menu').toggle('visible');\n });\n\n $('.code-view .lines-code,.code-view .lines-num')\n .on('mouseenter', function () {\n const parent = $(this).closest('td');\n $(this).closest('tr').addClass(\n parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old')\n ? 'focus-lines-old' : 'focus-lines-new'\n );\n })\n .on('mouseleave', function () {\n $(this).closest('tr').removeClass('focus-lines-new focus-lines-old');\n });\n $('.add-code-comment').on('click', function (e) {\n // https://github.com/go-gitea/gitea/issues/4745\n if ($(e.target).hasClass('btn-add-single')) {\n return;\n }\n e.preventDefault();\n const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split');\n const side = $(this).data('side');\n const idx = $(this).data('idx');\n const path = $(this).data('path');\n const form = $('#pull_review_add_comment').html();\n const tr = $(this).closest('tr');\n let ntr = tr.next();\n if (!ntr.hasClass('add-comment')) {\n ntr = $(`${\n isSplit ? ''\n : ''\n }`);\n tr.after(ntr);\n }\n const td = ntr.find(`.add-comment-${side}`);\n let commentCloud = td.find('.comment-code-cloud');\n if (commentCloud.length === 0) {\n td.html(form);\n commentCloud = td.find('.comment-code-cloud');\n assingMenuAttributes(commentCloud.find('.menu'));\n\n td.find(\"input[name='line']\").val(idx);\n td.find(\"input[name='side']\").val(side === 'left' ? 'previous' : 'proposed');\n td.find(\"input[name='path']\").val(path);\n }\n commentCloud.find('textarea').focus();\n });\n}\n\nfunction assingMenuAttributes(menu) {\n const id = Math.floor(Math.random() * Math.floor(1000000));\n menu.attr('data-write', menu.attr('data-write') + id);\n menu.attr('data-preview', menu.attr('data-preview') + id);\n menu.find('.item').each(function () {\n const tab = $(this).attr('data-tab') + id;\n $(this).attr('data-tab', tab);\n });\n menu.parent().find(\"*[data-tab='write']\").attr('data-tab', `write${id}`);\n menu.parent().find(\"*[data-tab='preview']\").attr('data-tab', `preview${id}`);\n initCommentPreviewTab(menu.parent('.form'));\n return id;\n}\n\nfunction initRepositoryCollaboration() {\n // Change collaborator access mode\n $('.access-mode.menu .item').click(function () {\n const $menu = $(this).parent();\n $.post($menu.data('url'), {\n _csrf: csrf,\n uid: $menu.data('uid'),\n mode: $(this).data('value')\n });\n });\n}\n\nfunction initTeamSettings() {\n // Change team access mode\n $('.organization.new.team input[name=permission]').change(() => {\n const val = $('input[name=permission]:checked', '.organization.new.team').val();\n if (val === 'admin') {\n $('.organization.new.team .team-units').hide();\n } else {\n $('.organization.new.team .team-units').show();\n }\n });\n}\n\nfunction initWikiForm() {\n const $editArea = $('.repository.wiki textarea#edit_area');\n let sideBySideChanges = 0;\n let sideBySideTimeout = null;\n if ($editArea.length > 0) {\n const simplemde = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n const render = function () {\n sideBySideChanges = 0;\n if (sideBySideTimeout != null) {\n clearTimeout(sideBySideTimeout);\n sideBySideTimeout = null;\n }\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `
${data}
`;\n emojify.run($('.editor-preview')[0]);\n $(preview).find('pre code').each((_, e) => {\n hljs.highlightBlock(e);\n });\n });\n };\n if (!simplemde.isSideBySideActive()) {\n render();\n } else {\n // delay preview by keystroke counting\n sideBySideChanges++;\n if (sideBySideChanges > 10) {\n render();\n }\n // or delay preview by timeout\n if (sideBySideTimeout != null) {\n clearTimeout(sideBySideTimeout);\n sideBySideTimeout = null;\n }\n sideBySideTimeout = setTimeout(render, 600);\n }\n }, 0);\n if (!simplemde.isSideBySideActive()) {\n return 'Loading...';\n }\n return preview.innerHTML;\n },\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n {\n name: 'code-inline',\n action(e) {\n const cm = e.codemirror;\n const selection = cm.getSelection();\n cm.replaceSelection(`\\`${selection}\\``);\n if (!selection) {\n const cursorPos = cm.getCursor();\n cm.setCursor(cursorPos.line, cursorPos.ch - 1);\n }\n cm.focus();\n },\n className: 'fa fa-angle-right',\n title: 'Add Inline Code',\n }, 'code', 'quote', '|', {\n name: 'checkbox-empty',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [ ] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-square-o',\n title: 'Add Checkbox (empty)',\n },\n {\n name: 'checkbox-checked',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [x] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-check-square-o',\n title: 'Add Checkbox (checked)',\n }, '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n $(simplemde.codemirror.getInputField()).addClass('js-quick-submit');\n\n setTimeout(() => {\n const $bEdit = $('.repository.wiki.new .previewtabs a[data-tab=\"write\"]');\n const $bPrev = $('.repository.wiki.new .previewtabs a[data-tab=\"preview\"]');\n const $toolbar = $('.editor-toolbar');\n const $bPreview = $('.editor-toolbar a.fa-eye');\n const $bSideBySide = $('.editor-toolbar a.fa-columns');\n $bEdit.on('click', () => {\n if ($toolbar.hasClass('disabled-for-preview')) {\n $bPreview.click();\n }\n });\n $bPrev.on('click', () => {\n if (!$toolbar.hasClass('disabled-for-preview')) {\n $bPreview.click();\n }\n });\n $bPreview.on('click', () => {\n setTimeout(() => {\n if ($toolbar.hasClass('disabled-for-preview')) {\n if ($bEdit.hasClass('active')) {\n $bEdit.removeClass('active');\n }\n if (!$bPrev.hasClass('active')) {\n $bPrev.addClass('active');\n }\n } else {\n if (!$bEdit.hasClass('active')) {\n $bEdit.addClass('active');\n }\n if ($bPrev.hasClass('active')) {\n $bPrev.removeClass('active');\n }\n }\n }, 0);\n });\n $bSideBySide.on('click', () => {\n sideBySideChanges = 10;\n });\n }, 0);\n }\n}\n\n// Adding function to get the cursor position in a text field to jQuery object.\n$.fn.getCursorPosition = function () {\n const el = $(this).get(0);\n let pos = 0;\n if ('selectionStart' in el) {\n pos = el.selectionStart;\n } else if ('selection' in document) {\n el.focus();\n const Sel = document.selection.createRange();\n const SelLength = document.selection.createRange().text.length;\n Sel.moveStart('character', -el.value.length);\n pos = Sel.text.length - SelLength;\n }\n return pos;\n};\n\nfunction setSimpleMDE($editArea) {\n if (codeMirrorEditor) {\n codeMirrorEditor.toTextArea();\n codeMirrorEditor = null;\n }\n\n if (simpleMDEditor) {\n return true;\n }\n\n simpleMDEditor = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `
${data}
`;\n emojify.run($('.editor-preview')[0]);\n });\n }, 0);\n\n return 'Loading...';\n },\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n 'code', 'quote', '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n\n return true;\n}\n\nfunction setCodeMirror($editArea) {\n if (simpleMDEditor) {\n simpleMDEditor.toTextArea();\n simpleMDEditor = null;\n }\n\n if (codeMirrorEditor) {\n return true;\n }\n\n codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], {\n lineNumbers: true\n });\n codeMirrorEditor.on('change', (cm, _change) => {\n $editArea.val(cm.getValue());\n });\n\n return true;\n}\n\nfunction initEditor() {\n $('.js-quick-pull-choice-option').change(function () {\n if ($(this).val() === 'commit-to-new-branch') {\n $('.quick-pull-branch-name').show();\n $('.quick-pull-branch-name input').prop('required', true);\n } else {\n $('.quick-pull-branch-name').hide();\n $('.quick-pull-branch-name input').prop('required', false);\n }\n $('#commit-button').text($(this).attr('button_text'));\n });\n\n const $editFilename = $('#file-name');\n $editFilename.keyup(function (e) {\n const $section = $('.breadcrumb span.section');\n const $divider = $('.breadcrumb div.divider');\n let value;\n let parts;\n\n if (e.keyCode === 8) {\n if ($(this).getCursorPosition() === 0) {\n if ($section.length > 0) {\n value = $section.last().find('a').text();\n $(this).val(value + $(this).val());\n $(this)[0].setSelectionRange(value.length, value.length);\n $section.last().remove();\n $divider.last().remove();\n }\n }\n }\n if (e.keyCode === 191) {\n parts = $(this).val().split('/');\n for (let i = 0; i < parts.length; ++i) {\n value = parts[i];\n if (i < parts.length - 1) {\n if (value.length) {\n $(`${value}`).insertBefore($(this));\n $('
/
').insertBefore($(this));\n }\n } else {\n $(this).val(value);\n }\n $(this)[0].setSelectionRange(0, 0);\n }\n }\n parts = [];\n $('.breadcrumb span.section').each(function () {\n const element = $(this);\n if (element.find('a').length) {\n parts.push(element.find('a').text());\n } else {\n parts.push(element.text());\n }\n });\n if ($(this).val()) parts.push($(this).val());\n $('#tree_path').val(parts.join('/'));\n }).trigger('keyup');\n\n const $editArea = $('.repository.editor textarea#edit_area');\n if (!$editArea.length) return;\n\n const markdownFileExts = $editArea.data('markdown-file-exts').split(',');\n const lineWrapExtensions = $editArea.data('line-wrap-extensions').split(',');\n\n $editFilename.on('keyup', () => {\n const val = $editFilename.val();\n let mode, spec, extension, extWithDot, dataUrl, apiCall;\n\n extension = extWithDot = '';\n const m = /.+\\.([^.]+)$/.exec(val);\n if (m) {\n extension = m[1];\n extWithDot = `.${extension}`;\n }\n\n const info = CodeMirror.findModeByExtension(extension);\n const previewLink = $('a[data-tab=preview]');\n if (info) {\n mode = info.mode;\n spec = info.mime;\n apiCall = mode;\n } else {\n apiCall = extension;\n }\n\n if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) {\n dataUrl = previewLink.data('url');\n previewLink.data('url', dataUrl.replace(/(.*)\\/.*/i, `$1/${mode}`));\n previewLink.show();\n } else {\n previewLink.hide();\n }\n\n // If this file is a Markdown extensions, we will load that editor and return\n if (markdownFileExts.indexOf(extWithDot) >= 0) {\n if (setSimpleMDE($editArea)) {\n return;\n }\n }\n\n // Else we are going to use CodeMirror\n if (!codeMirrorEditor && !setCodeMirror($editArea)) {\n return;\n }\n\n if (mode) {\n codeMirrorEditor.setOption('mode', spec);\n CodeMirror.autoLoadMode(codeMirrorEditor, mode);\n }\n\n if (lineWrapExtensions.indexOf(extWithDot) >= 0) {\n codeMirrorEditor.setOption('lineWrapping', true);\n } else {\n codeMirrorEditor.setOption('lineWrapping', false);\n }\n\n // get the filename without any folder\n let value = $editFilename.val();\n if (value.length === 0) {\n return;\n }\n value = value.split('/');\n value = value[value.length - 1];\n\n $.getJSON($editFilename.data('ec-url-prefix') + value, (editorconfig) => {\n if (editorconfig.indent_style === 'tab') {\n codeMirrorEditor.setOption('indentWithTabs', true);\n codeMirrorEditor.setOption('extraKeys', {});\n } else {\n codeMirrorEditor.setOption('indentWithTabs', false);\n // required because CodeMirror doesn't seems to use spaces correctly for {\"indentWithTabs\": false}:\n // - https://github.com/codemirror/CodeMirror/issues/988\n // - https://codemirror.net/doc/manual.html#keymaps\n codeMirrorEditor.setOption('extraKeys', {\n Tab(cm) {\n const spaces = Array(parseInt(cm.getOption('indentUnit')) + 1).join(' ');\n cm.replaceSelection(spaces);\n }\n });\n }\n codeMirrorEditor.setOption('indentUnit', editorconfig.indent_size || 4);\n codeMirrorEditor.setOption('tabSize', editorconfig.tab_width || 4);\n });\n }).trigger('keyup');\n\n // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage\n // to enable or disable the commit button\n const $commitButton = $('#commit-button');\n const $editForm = $('.ui.edit.form');\n const dirtyFileClass = 'dirty-file';\n\n // Disabling the button at the start\n $commitButton.prop('disabled', true);\n\n // Registering a custom listener for the file path and the file content\n $editForm.areYouSure({\n silent: true,\n dirtyClass: dirtyFileClass,\n fieldSelector: ':input:not(.commit-form-wrapper :input)',\n change() {\n const dirty = $(this).hasClass(dirtyFileClass);\n $commitButton.prop('disabled', !dirty);\n }\n });\n\n $commitButton.click((event) => {\n // A modal which asks if an empty file should be committed\n if ($editArea.val().length === 0) {\n $('#edit-empty-content-modal').modal({\n onApprove() {\n $('.edit.form').submit();\n }\n }).modal('show');\n event.preventDefault();\n }\n });\n}\n\nfunction initOrganization() {\n if ($('.organization').length === 0) {\n return;\n }\n\n // Options\n if ($('.organization.settings.options').length > 0) {\n $('#org_name').keyup(function () {\n const $prompt = $('#org-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('org-name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initUserSettings() {\n // Options\n if ($('.user.settings.profile').length > 0) {\n $('#username').keyup(function () {\n const $prompt = $('#name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initGithook() {\n if ($('.edit.githook').length === 0) {\n return;\n }\n\n CodeMirror.autoLoadMode(CodeMirror.fromTextArea($('#content')[0], {\n lineNumbers: true,\n mode: 'shell'\n }), 'shell');\n}\n\nfunction initWebhook() {\n if ($('.new.webhook').length === 0) {\n return;\n }\n\n $('.events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').show();\n }\n });\n $('.non-events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').hide();\n }\n });\n\n const updateContentType = function () {\n const visible = $('#http_method').val() === 'POST';\n $('#content_type').parent().parent()[visible ? 'show' : 'hide']();\n };\n updateContentType();\n $('#http_method').change(() => {\n updateContentType();\n });\n\n // Test delivery\n $('#test-delivery').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n $.post($this.data('link'), {\n _csrf: csrf\n }).done(\n setTimeout(() => {\n window.location.href = $this.data('redirect');\n }, 5000)\n );\n });\n}\n\nfunction initAdmin() {\n if ($('.admin').length === 0) {\n return;\n }\n\n // New user\n if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) {\n $('#login_type').change(function () {\n if ($(this).val().substring(0, 1) === '0') {\n $('#login_name').removeAttr('required');\n $('.non-local').hide();\n $('.local').show();\n $('#user_name').focus();\n\n if ($(this).data('password') === 'required') {\n $('#password').attr('required', 'required');\n }\n } else {\n $('#login_name').attr('required', 'required');\n $('.non-local').show();\n $('.local').hide();\n $('#login_name').focus();\n\n $('#password').removeAttr('required');\n }\n });\n }\n\n function onSecurityProtocolChange() {\n if ($('#security_protocol').val() > 0) {\n $('.has-tls').show();\n } else {\n $('.has-tls').hide();\n }\n }\n\n function onUsePagedSearchChange() {\n if ($('#use_paged_search').prop('checked')) {\n $('.search-page-size').show()\n .find('input').attr('required', 'required');\n } else {\n $('.search-page-size').hide()\n .find('input').removeAttr('required');\n }\n }\n\n function onOAuth2Change() {\n $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide();\n $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required');\n\n const provider = $('#oauth2_provider').val();\n switch (provider) {\n case 'github':\n case 'gitlab':\n case 'gitea':\n $('.oauth2_use_custom_url').show();\n break;\n case 'openidConnect':\n $('.open_id_connect_auto_discovery_url input').attr('required', 'required');\n $('.open_id_connect_auto_discovery_url').show();\n break;\n }\n onOAuth2UseCustomURLChange();\n }\n\n function onOAuth2UseCustomURLChange() {\n const provider = $('#oauth2_provider').val();\n $('.oauth2_use_custom_url_field').hide();\n $('.oauth2_use_custom_url_field input[required]').removeAttr('required');\n\n if ($('#oauth2_use_custom_url').is(':checked')) {\n if (!$('#oauth2_token_url').val()) {\n $('#oauth2_token_url').val($(`#${provider}_token_url`).val());\n }\n if (!$('#oauth2_auth_url').val()) {\n $('#oauth2_auth_url').val($(`#${provider}_auth_url`).val());\n }\n if (!$('#oauth2_profile_url').val()) {\n $('#oauth2_profile_url').val($(`#${provider}_profile_url`).val());\n }\n if (!$('#oauth2_email_url').val()) {\n $('#oauth2_email_url').val($(`#${provider}_email_url`).val());\n }\n switch (provider) {\n case 'github':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show();\n break;\n case 'gitea':\n case 'gitlab':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show();\n $('#oauth2_email_url').val('');\n break;\n }\n }\n }\n\n // New authentication\n if ($('.admin.new.authentication').length > 0) {\n $('#auth_type').change(function () {\n $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide();\n\n $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required');\n $('.binddnrequired').removeClass('required');\n\n const authType = $(this).val();\n switch (authType) {\n case '2': // LDAP\n $('.ldap').show();\n $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required');\n $('.binddnrequired').addClass('required');\n break;\n case '3': // SMTP\n $('.smtp').show();\n $('.has-tls').show();\n $('.smtp div.required input, .has-tls').attr('required', 'required');\n break;\n case '4': // PAM\n $('.pam').show();\n $('.pam input').attr('required', 'required');\n break;\n case '5': // LDAP\n $('.dldap').show();\n $('.dldap div.required:not(.ldap) input').attr('required', 'required');\n break;\n case '6': // OAuth2\n $('.oauth2').show();\n $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required');\n onOAuth2Change();\n break;\n }\n if (authType === '2' || authType === '5') {\n onSecurityProtocolChange();\n }\n if (authType === '2') {\n onUsePagedSearchChange();\n }\n });\n $('#auth_type').change();\n $('#security_protocol').change(onSecurityProtocolChange);\n $('#use_paged_search').change(onUsePagedSearchChange);\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n }\n // Edit authentication\n if ($('.admin.edit.authentication').length > 0) {\n const authType = $('#auth_type').val();\n if (authType === '2' || authType === '5') {\n $('#security_protocol').change(onSecurityProtocolChange);\n if (authType === '2') {\n $('#use_paged_search').change(onUsePagedSearchChange);\n }\n } else if (authType === '6') {\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n onOAuth2Change();\n }\n }\n\n // Notice\n if ($('.admin.notice')) {\n const $detailModal = $('#detail-modal');\n\n // Attach view detail modals\n $('.view-detail').click(function () {\n $detailModal.find('.content p').text($(this).data('content'));\n $detailModal.modal('show');\n return false;\n });\n\n // Select actions\n const $checkboxes = $('.select.table .ui.checkbox');\n $('.select.action').click(function () {\n switch ($(this).data('action')) {\n case 'select-all':\n $checkboxes.checkbox('check');\n break;\n case 'deselect-all':\n $checkboxes.checkbox('uncheck');\n break;\n case 'inverse':\n $checkboxes.checkbox('toggle');\n break;\n }\n });\n $('#delete-selection').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n const ids = [];\n $checkboxes.each(function () {\n if ($(this).checkbox('is checked')) {\n ids.push($(this).data('id'));\n }\n });\n $.post($this.data('link'), {\n _csrf: csrf,\n ids\n }).done(() => {\n window.location.href = $this.data('redirect');\n });\n });\n }\n}\n\nfunction buttonsClickOnEnter() {\n $('.ui.button').keypress(function (e) {\n if (e.keyCode === 13 || e.keyCode === 32) { // enter key or space bar\n $(this).click();\n }\n });\n}\n\nfunction searchUsers() {\n const $searchUserBox = $('#search-user-box');\n $searchUserBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/users/search?q={query}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n let title = item.login;\n if (item.full_name && item.full_name.length > 0) {\n title += ` (${htmlEncode(item.full_name)})`;\n }\n items.push({\n title,\n image: item.avatar_url\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['login', 'full_name'],\n showNoResults: false\n });\n}\n\nfunction searchTeams() {\n const $searchTeamBox = $('#search-team-box');\n $searchTeamBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/orgs/${$searchTeamBox.data('org')}/teams/search?q={query}`,\n headers: { 'X-Csrf-Token': csrf },\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n const title = `${item.name} (${item.permission} access)`;\n items.push({\n title,\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['name', 'description'],\n showNoResults: false\n });\n}\n\nfunction searchRepositories() {\n const $searchRepoBox = $('#search-repo-box');\n $searchRepoBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&uid=${$searchRepoBox.data('uid')}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n items.push({\n title: item.full_name.split('/')[1],\n description: item.full_name\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['full_name'],\n showNoResults: false\n });\n}\n\nfunction initCodeView() {\n if ($('.code-view .linenums').length > 0) {\n $(document).on('click', '.lines-num span', function (e) {\n const $select = $(this);\n const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li');\n selectRange($list, $list.filter(`[rel=${$select.attr('id')}]`), (e.shiftKey ? $list.filter('.active').eq(0) : null));\n deSelect();\n });\n\n $(window).on('hashchange', () => {\n let m = window.location.hash.match(/^#(L\\d+)-(L\\d+)$/);\n const $list = $('.code-view ol.linenums > li');\n let $first;\n if (m) {\n $first = $list.filter(`.${m[1]}`);\n selectRange($list, $first, $list.filter(`.${m[2]}`));\n $('html, body').scrollTop($first.offset().top - 200);\n return;\n }\n m = window.location.hash.match(/^#(L|n)(\\d+)$/);\n if (m) {\n $first = $list.filter(`.L${m[2]}`);\n selectRange($list, $first);\n $('html, body').scrollTop($first.offset().top - 200);\n }\n }).trigger('hashchange');\n }\n $('.ui.fold-code').on('click', (e) => {\n const $foldButton = $(e.target);\n if ($foldButton.hasClass('fa-chevron-down')) {\n $(e.target).parent().next().slideUp('fast', () => {\n $foldButton.removeClass('fa-chevron-down').addClass('fa-chevron-right');\n });\n } else {\n $(e.target).parent().next().slideDown('fast', () => {\n $foldButton.removeClass('fa-chevron-right').addClass('fa-chevron-down');\n });\n }\n });\n function insertBlobExcerpt(e) {\n const $blob = $(e.target);\n const $row = $blob.parent().parent();\n $.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => {\n $row.replaceWith(blob);\n $(`[data-anchor=\"${$blob.data('anchor')}\"]`).on('click', (e) => { insertBlobExcerpt(e); });\n });\n }\n $('.ui.blob-excerpt').on('click', (e) => { insertBlobExcerpt(e); });\n}\n\nfunction initU2FAuth() {\n if ($('#wait-for-key').length === 0) {\n return;\n }\n u2fApi.ensureSupport()\n .then(() => {\n $.getJSON(`${suburl}/user/u2f/challenge`).success((req) => {\n u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)\n .then(u2fSigned)\n .catch((err) => {\n if (err === undefined) {\n u2fError(1);\n return;\n }\n u2fError(err.metaData.code);\n });\n });\n }).catch(() => {\n // Fallback in case browser do not support U2F\n window.location.href = `${suburl}/user/two_factor`;\n });\n}\nfunction u2fSigned(resp) {\n $.ajax({\n url: `${suburl}/user/u2f/sign`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n }).done((res) => {\n window.location.replace(res);\n }).fail(() => {\n u2fError(1);\n });\n}\n\nfunction u2fRegistered(resp) {\n if (checkError(resp)) {\n return;\n }\n $.ajax({\n url: `${suburl}/user/settings/security/u2f/register`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n success() {\n reload();\n },\n fail() {\n u2fError(1);\n }\n });\n}\n\nfunction checkError(resp) {\n if (!('errorCode' in resp)) {\n return false;\n }\n if (resp.errorCode === 0) {\n return false;\n }\n u2fError(resp.errorCode);\n return true;\n}\n\n\nfunction u2fError(errorType) {\n const u2fErrors = {\n browser: $('#unsupported-browser'),\n 1: $('#u2f-error-1'),\n 2: $('#u2f-error-2'),\n 3: $('#u2f-error-3'),\n 4: $('#u2f-error-4'),\n 5: $('.u2f-error-5')\n };\n u2fErrors[errorType].removeClass('hide');\n\n Object.keys(u2fErrors).forEach((type) => {\n if (type !== errorType) {\n u2fErrors[type].addClass('hide');\n }\n });\n $('#u2f-error').modal('show');\n}\n\nfunction initU2FRegister() {\n $('#register-device').modal({ allowMultiple: false });\n $('#u2f-error').modal({ allowMultiple: false });\n $('#register-security-key').on('click', (e) => {\n e.preventDefault();\n u2fApi.ensureSupport()\n .then(u2fRegisterRequest)\n .catch(() => {\n u2fError('browser');\n });\n });\n}\n\nfunction u2fRegisterRequest() {\n $.post(`${suburl}/user/settings/security/u2f/request_register`, {\n _csrf: csrf,\n name: $('#nickname').val()\n }).success((req) => {\n $('#nickname').closest('div.field').removeClass('error');\n $('#register-device').modal('show');\n if (req.registeredKeys === null) {\n req.registeredKeys = [];\n }\n u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30)\n .then(u2fRegistered)\n .catch((reason) => {\n if (reason === undefined) {\n u2fError(1);\n return;\n }\n u2fError(reason.metaData.code);\n });\n }).fail((xhr) => {\n if (xhr.status === 409) {\n $('#nickname').closest('div.field').addClass('error');\n }\n });\n}\n\nfunction initWipTitle() {\n $('.title_wip_desc > a').click((e) => {\n e.preventDefault();\n\n const $issueTitle = $('#issue_title');\n $issueTitle.focus();\n const value = $issueTitle.val().trim().toUpperCase();\n\n for (const i in wipPrefixes) {\n if (value.startsWith(wipPrefixes[i].toUpperCase())) {\n return;\n }\n }\n\n $issueTitle.val(`${wipPrefixes[0]} ${$issueTitle.val()}`);\n });\n}\n\nfunction initTemplateSearch() {\n const $repoTemplate = $('#repo_template');\n const checkTemplate = function () {\n const $templateUnits = $('#template_units');\n const $nonTemplate = $('#non_template');\n if ($repoTemplate.val() !== '') {\n $templateUnits.show();\n $nonTemplate.hide();\n } else {\n $templateUnits.hide();\n $nonTemplate.show();\n }\n };\n $repoTemplate.change(checkTemplate);\n checkTemplate();\n\n const changeOwner = function () {\n $('#repo_template_search')\n .dropdown({\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&template=true&priority_owner_id=${$('#uid').val()}`,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n filteredResponse.results.push({\n name: '',\n value: ''\n });\n // Parse the response from the api to work with our dropdown\n $.each(response.data, (_r, repo) => {\n filteredResponse.results.push({\n name: htmlEncode(repo.full_name),\n value: repo.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n };\n $('#uid').change(changeOwner);\n changeOwner();\n}\n\n$(document).ready(() => {\n csrf = $('meta[name=_csrf]').attr('content');\n suburl = $('meta[name=_suburl]').attr('content');\n\n // Show exact time\n $('.time-since').each(function () {\n $(this)\n .addClass('poping up')\n .attr('data-content', $(this).attr('title'))\n .attr('data-variation', 'inverted tiny')\n .attr('title', '');\n });\n\n // Semantic UI modules.\n $('.dropdown:not(.custom)').dropdown();\n $('.jump.dropdown').dropdown({\n action: 'hide',\n onShow() {\n $('.poping.up').popup('hide');\n }\n });\n $('.slide.up.dropdown').dropdown({\n transition: 'slide up'\n });\n $('.upward.dropdown').dropdown({\n direction: 'upward'\n });\n $('.ui.accordion').accordion();\n $('.ui.checkbox').checkbox();\n $('.ui.progress').progress({\n showActivity: false\n });\n $('.poping.up').popup();\n $('.top.menu .poping.up').popup({\n onShow() {\n if ($('.top.menu .menu.transition').hasClass('visible')) {\n return false;\n }\n }\n });\n $('.tabular.menu .item').tab();\n $('.tabable.menu .item').tab();\n\n $('.toggle.button').click(function () {\n $($(this).data('target')).slideToggle(100);\n });\n\n // make table element clickable like a link\n $('tr[data-href]').click(function () {\n window.location = $(this).data('href');\n });\n\n // Highlight JS\n if (typeof hljs !== 'undefined') {\n const nodes = [].slice.call(document.querySelectorAll('pre code') || []);\n for (let i = 0; i < nodes.length; i++) {\n hljs.highlightBlock(nodes[i]);\n }\n }\n\n // Dropzone\n const $dropzone = $('#dropzone');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n\n new Dropzone('#dropzone', {\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = data.uuid;\n const input = $(``).val(data.uuid);\n $('.files').append(input);\n });\n this.on('removedfile', (file) => {\n if (file.name in filenameDict) {\n $(`#${filenameDict[file.name]}`).remove();\n }\n if ($dropzone.data('remove-url') && $dropzone.data('csrf')) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name],\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n },\n });\n }\n\n // Emojify\n emojify.setConfig({\n img_dir: `${suburl}/vendor/plugins/emojify/images`,\n ignore_emoticons: true\n });\n const hasEmoji = document.getElementsByClassName('has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji[i]);\n for (let j = 0; j < hasEmoji[i].childNodes.length; j++) {\n if (hasEmoji[i].childNodes[j].nodeName === 'A') {\n emojify.run(hasEmoji[i].childNodes[j]);\n }\n }\n }\n\n // Clipboard JS\n const clipboard = new Clipboard('.clipboard');\n clipboard.on('success', (e) => {\n e.clearSelection();\n\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n clipboard.on('error', (e) => {\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n // Helpers.\n $('.delete-button').click(showDeletePopup);\n $('.add-all-button').click(showAddAllPopup);\n\n $('.delete-branch-button').click(showDeletePopup);\n\n $('.undo-button').click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n });\n $('.show-panel.button').click(function () {\n $($(this).data('panel')).show();\n });\n $('.show-modal.button').click(function () {\n $($(this).data('modal')).modal('show');\n });\n $('.delete-post.button').click(function () {\n const $this = $(this);\n $.post($this.data('request-url'), {\n _csrf: csrf\n }).done(() => {\n window.location.href = $this.data('done-url');\n });\n });\n\n // Set anchor.\n $('.markdown').each(function () {\n const headers = {};\n $(this).find('h1, h2, h3, h4, h5, h6').each(function () {\n let node = $(this);\n const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w\\- ]/g, '').replace(/[ ]/g, '-'));\n let name = val;\n if (headers[val] > 0) {\n name = `${val}-${headers[val]}`;\n }\n if (headers[val] === undefined) {\n headers[val] = 1;\n } else {\n headers[val] += 1;\n }\n node = node.wrap(`
`);\n node.append(``);\n });\n });\n\n $('.issue-checkbox').click(() => {\n const numChecked = $('.issue-checkbox').children('input:checked').length;\n if (numChecked > 0) {\n $('#issue-filters').addClass('hide');\n $('#issue-actions').removeClass('hide');\n } else {\n $('#issue-filters').removeClass('hide');\n $('#issue-actions').addClass('hide');\n }\n });\n\n $('.issue-action').click(function () {\n let { action } = this.dataset;\n let { elementId } = this.dataset;\n const issueIDs = $('.issue-checkbox').children('input:checked').map(function () {\n return this.dataset.issueId;\n }).get().join();\n const { url } = this.dataset;\n if (elementId === '0' && url.substr(-9) === '/assignee') {\n elementId = '';\n action = 'clear';\n }\n updateIssuesMeta(url, action, issueIDs, elementId).then(() => {\n // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload\n if (action === 'close' || action === 'open') {\n // uncheck all checkboxes\n $('.issue-checkbox input[type=\"checkbox\"]').each((_, e) => { e.checked = false; });\n }\n reload();\n });\n });\n\n // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload\n // trigger ckecked event, if checkboxes are checked on load\n $('.issue-checkbox input[type=\"checkbox\"]:checked').first().each((_, e) => {\n e.checked = false;\n $(e).click();\n });\n\n buttonsClickOnEnter();\n searchUsers();\n searchTeams();\n searchRepositories();\n\n initCommentForm();\n initInstall();\n initRepository();\n initMigration();\n initWikiForm();\n initEditForm();\n initEditor();\n initOrganization();\n initGithook();\n initWebhook();\n initAdmin();\n initCodeView();\n initVueApp();\n initTeamSettings();\n initCtrlEnterSubmit();\n initNavbarContentToggle();\n initTopicbar();\n initU2FAuth();\n initU2FRegister();\n initIssueList();\n initWipTitle();\n initPullRequestReview();\n initRepoStatusChecker();\n initTemplateSearch();\n\n // Repo clone url.\n if ($('#repo-clone-url').length > 0) {\n switch (localStorage.getItem('repo-clone-protocol')) {\n case 'ssh':\n if ($('#repo-clone-ssh').click().length === 0) {\n $('#repo-clone-https').click();\n }\n break;\n default:\n $('#repo-clone-https').click();\n break;\n }\n }\n\n const routes = {\n 'div.user.settings': initUserSettings,\n 'div.repository.settings.collaboration': initRepositoryCollaboration\n };\n\n let selector;\n for (selector in routes) {\n if ($(selector).length > 0) {\n routes[selector]();\n break;\n }\n }\n\n const $cloneAddr = $('#clone_addr');\n $cloneAddr.change(() => {\n const $repoName = $('#repo_name');\n if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank\n $repoName.val($cloneAddr.val().match(/^(.*\\/)?((.+?)(\\.git)?)$/)[3]);\n }\n });\n});\n\nfunction changeHash(hash) {\n if (window.history.pushState) {\n window.history.pushState(null, null, hash);\n } else {\n window.location.hash = hash;\n }\n}\n\nfunction deSelect() {\n if (window.getSelection) {\n window.getSelection().removeAllRanges();\n } else {\n document.selection.empty();\n }\n}\n\nfunction selectRange($list, $select, $from) {\n $list.removeClass('active');\n if ($from) {\n let a = parseInt($select.attr('rel').substr(1));\n let b = parseInt($from.attr('rel').substr(1));\n let c;\n if (a !== b) {\n if (a > b) {\n c = a;\n a = b;\n b = c;\n }\n const classes = [];\n for (let i = a; i <= b; i++) {\n classes.push(`.L${i}`);\n }\n $list.filter(classes.join(',')).addClass('active');\n changeHash(`#L${a}-L${b}`);\n return;\n }\n }\n $select.addClass('active');\n changeHash(`#${$select.attr('rel')}`);\n}\n\n$(() => {\n // Warn users that try to leave a page after entering data into a form.\n // Except on sign-in pages, and for forms marked as 'ignore-dirty'.\n if ($('.user.signin').length === 0) {\n $('form:not(.ignore-dirty)').areYouSure();\n }\n\n // Parse SSH Key\n $('#ssh-key-content').on('change paste keyup', function () {\n const arrays = $(this).val().split(' ');\n const $title = $('#ssh-key-title');\n if ($title.val() === '' && arrays.length === 3 && arrays[2] !== '') {\n $title.val(arrays[2]);\n }\n });\n});\n\nfunction showDeletePopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.delete.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction showAddAllPopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.addall.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction initVueComponents() {\n const vueDelimeters = ['${', '}'];\n\n Vue.component('repo-search', {\n delimiters: vueDelimeters,\n\n props: {\n searchLimit: {\n type: Number,\n default: 10\n },\n suburl: {\n type: String,\n required: true\n },\n uid: {\n type: Number,\n required: true\n },\n organizations: {\n type: Array,\n default: []\n },\n isOrganization: {\n type: Boolean,\n default: true\n },\n canCreateOrganization: {\n type: Boolean,\n default: false\n },\n organizationsTotalCount: {\n type: Number,\n default: 0\n },\n moreReposLink: {\n type: String,\n default: ''\n }\n },\n\n data() {\n return {\n tab: 'repos',\n repos: [],\n reposTotalCount: 0,\n reposFilter: 'all',\n searchQuery: '',\n isLoading: false,\n repoTypes: {\n all: {\n count: 0,\n searchMode: '',\n },\n forks: {\n count: 0,\n searchMode: 'fork',\n },\n mirrors: {\n count: 0,\n searchMode: 'mirror',\n },\n sources: {\n count: 0,\n searchMode: 'source',\n },\n collaborative: {\n count: 0,\n searchMode: 'collaborative',\n },\n }\n };\n },\n\n computed: {\n showMoreReposLink() {\n return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;\n },\n searchURL() {\n return `${this.suburl}/api/v1/repos/search?sort=updated&order=desc&uid=${this.uid}&q=${this.searchQuery\n }&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode\n }${this.reposFilter !== 'all' ? '&exclusive=1' : ''}`;\n },\n repoTypeCount() {\n return this.repoTypes[this.reposFilter].count;\n }\n },\n\n mounted() {\n this.searchRepos(this.reposFilter);\n\n const self = this;\n Vue.nextTick(() => {\n self.$refs.search.focus();\n });\n },\n\n methods: {\n changeTab(t) {\n this.tab = t;\n },\n\n changeReposFilter(filter) {\n this.reposFilter = filter;\n this.repos = [];\n this.repoTypes[filter].count = 0;\n this.searchRepos(filter);\n },\n\n showRepo(repo, filter) {\n switch (filter) {\n case 'sources':\n return repo.owner.id === this.uid && !repo.mirror && !repo.fork;\n case 'forks':\n return repo.owner.id === this.uid && !repo.mirror && repo.fork;\n case 'mirrors':\n return repo.mirror;\n case 'collaborative':\n return repo.owner.id !== this.uid && !repo.mirror;\n default:\n return true;\n }\n },\n\n searchRepos(reposFilter) {\n const self = this;\n\n this.isLoading = true;\n\n const searchedMode = this.repoTypes[reposFilter].searchMode;\n const searchedURL = this.searchURL;\n const searchedQuery = this.searchQuery;\n\n $.getJSON(searchedURL, (result, _textStatus, request) => {\n if (searchedURL === self.searchURL) {\n self.repos = result.data;\n const count = request.getResponseHeader('X-Total-Count');\n if (searchedQuery === '' && searchedMode === '') {\n self.reposTotalCount = count;\n }\n self.repoTypes[reposFilter].count = count;\n }\n }).always(() => {\n if (searchedURL === self.searchURL) {\n self.isLoading = false;\n }\n });\n },\n\n repoClass(repo) {\n if (repo.fork) {\n return 'octicon octicon-repo-forked';\n } if (repo.mirror) {\n return 'octicon octicon-repo-clone';\n } if (repo.private) {\n return 'octicon octicon-lock';\n }\n return 'octicon octicon-repo';\n }\n }\n });\n}\n\nfunction initCtrlEnterSubmit() {\n $('.js-quick-submit').keydown(function (e) {\n if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode === 13 || e.keyCode === 10)) {\n $(this).closest('form').submit();\n }\n });\n}\n\nfunction initVueApp() {\n const el = document.getElementById('app');\n if (!el) {\n return;\n }\n\n initVueComponents();\n\n new Vue({\n delimiters: ['${', '}'],\n el,\n data: {\n searchLimit: document.querySelector('meta[name=_search_limit]').content,\n suburl: document.querySelector('meta[name=_suburl]').content,\n uid: document.querySelector('meta[name=_context_uid]').content,\n },\n });\n}\n\nwindow.timeAddManual = function () {\n $('.mini.modal')\n .modal({\n duration: 200,\n onApprove() {\n $('#add_time_manual_form').submit();\n }\n }).modal('show');\n};\n\nwindow.toggleStopwatch = function () {\n $('#toggle_stopwatch_form').submit();\n};\nwindow.cancelStopwatch = function () {\n $('#cancel_stopwatch_form').submit();\n};\n\nwindow.initHeatmap = function (appElementId, heatmapUser, locale) {\n const el = document.getElementById(appElementId);\n if (!el) {\n return;\n }\n\n locale = locale || {};\n\n locale.contributions = locale.contributions || 'contributions';\n locale.no_contributions = locale.no_contributions || 'No contributions';\n\n const vueDelimeters = ['${', '}'];\n\n Vue.component('activity-heatmap', {\n delimiters: vueDelimeters,\n\n props: {\n user: {\n type: String,\n required: true\n },\n suburl: {\n type: String,\n required: true\n },\n locale: {\n type: Object,\n required: true\n }\n },\n\n data() {\n return {\n isLoading: true,\n colorRange: [],\n endDate: null,\n values: [],\n totalContributions: 0,\n };\n },\n\n mounted() {\n this.colorRange = [\n this.getColor(0),\n this.getColor(1),\n this.getColor(2),\n this.getColor(3),\n this.getColor(4),\n this.getColor(5)\n ];\n this.endDate = new Date();\n this.loadHeatmap(this.user);\n },\n\n methods: {\n loadHeatmap(userName) {\n const self = this;\n $.get(`${this.suburl}/api/v1/users/${userName}/heatmap`, (chartRawData) => {\n const chartData = [];\n for (let i = 0; i < chartRawData.length; i++) {\n self.totalContributions += chartRawData[i].contributions;\n chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions };\n }\n self.values = chartData;\n self.isLoading = false;\n });\n },\n\n getColor(idx) {\n const el = document.createElement('div');\n el.className = `heatmap-color-${idx}`;\n document.body.appendChild(el);\n\n const color = getComputedStyle(el).backgroundColor;\n\n document.body.removeChild(el);\n\n return color;\n }\n },\n\n template: '

total contributions in the last 12 months

'\n });\n\n new Vue({\n delimiters: vueDelimeters,\n el,\n\n data: {\n suburl: document.querySelector('meta[name=_suburl]').content,\n heatmapUser,\n locale\n },\n });\n};\n\nfunction initFilterBranchTagDropdown(selector) {\n $(selector).each(function () {\n const $dropdown = $(this);\n const $data = $dropdown.find('.data');\n const data = {\n items: [],\n mode: $data.data('mode'),\n searchTerm: '',\n noResults: '',\n canCreateBranch: false,\n menuVisible: false,\n active: 0\n };\n $data.find('.item').each(function () {\n data.items.push({\n name: $(this).text(),\n url: $(this).data('url'),\n branch: $(this).hasClass('branch'),\n tag: $(this).hasClass('tag'),\n selected: $(this).hasClass('selected')\n });\n });\n $data.remove();\n new Vue({\n delimiters: ['${', '}'],\n el: this,\n data,\n\n beforeMount() {\n const vm = this;\n\n this.noResults = vm.$el.getAttribute('data-no-results');\n this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true';\n\n document.body.addEventListener('click', (event) => {\n if (vm.$el.contains(event.target)) {\n return;\n }\n if (vm.menuVisible) {\n Vue.set(vm, 'menuVisible', false);\n }\n });\n },\n\n watch: {\n menuVisible(visible) {\n if (visible) {\n this.focusSearchField();\n }\n }\n },\n\n computed: {\n filteredItems() {\n const vm = this;\n\n const items = vm.items.filter((item) => {\n return ((vm.mode === 'branches' && item.branch) || (vm.mode === 'tags' && item.tag))\n && (!vm.searchTerm || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0);\n });\n\n vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1);\n\n return items;\n },\n showNoResults() {\n return this.filteredItems.length === 0 && !this.showCreateNewBranch;\n },\n showCreateNewBranch() {\n const vm = this;\n if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') {\n return false;\n }\n\n return vm.items.filter((item) => item.name.toLowerCase() === vm.searchTerm.toLowerCase()).length === 0;\n }\n },\n\n methods: {\n selectItem(item) {\n const prev = this.getSelected();\n if (prev !== null) {\n prev.selected = false;\n }\n item.selected = true;\n window.location.href = item.url;\n },\n createNewBranch() {\n if (!this.showCreateNewBranch) {\n return;\n }\n this.$refs.newBranchForm.submit();\n },\n focusSearchField() {\n const vm = this;\n Vue.nextTick(() => {\n vm.$refs.searchField.focus();\n });\n },\n getSelected() {\n for (let i = 0, j = this.items.length; i < j; ++i) {\n if (this.items[i].selected) return this.items[i];\n }\n return null;\n },\n getSelectedIndexInFiltered() {\n for (let i = 0, j = this.filteredItems.length; i < j; ++i) {\n if (this.filteredItems[i].selected) return i;\n }\n return -1;\n },\n scrollToActive() {\n let el = this.$refs[`listItem${this.active}`];\n if (!el || el.length === 0) {\n return;\n }\n if (Array.isArray(el)) {\n el = el[0];\n }\n\n const cont = this.$refs.scrollContainer;\n\n if (el.offsetTop < cont.scrollTop) {\n cont.scrollTop = el.offsetTop;\n } else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) {\n cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight;\n }\n },\n keydown(event) {\n const vm = this;\n if (event.keyCode === 40) {\n // arrow down\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) {\n return;\n }\n vm.active++;\n vm.scrollToActive();\n }\n if (event.keyCode === 38) {\n // arrow up\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active <= 0) {\n return;\n }\n vm.active--;\n vm.scrollToActive();\n }\n if (event.keyCode === 13) {\n // enter\n event.preventDefault();\n\n if (vm.active >= vm.filteredItems.length) {\n vm.createNewBranch();\n } else if (vm.active >= 0) {\n vm.selectItem(vm.filteredItems[vm.active]);\n }\n }\n if (event.keyCode === 27) {\n // escape\n event.preventDefault();\n vm.menuVisible = false;\n }\n }\n }\n });\n });\n}\n\n$('.commit-button').click(function (e) {\n e.preventDefault();\n $(this).parent().find('.commit-body').toggle();\n});\n\nfunction initNavbarContentToggle() {\n const content = $('#navbar');\n const toggle = $('#navbar-expand-toggle');\n let isExpanded = false;\n toggle.click(() => {\n isExpanded = !isExpanded;\n if (isExpanded) {\n content.addClass('shown');\n toggle.addClass('active');\n } else {\n content.removeClass('shown');\n toggle.removeClass('active');\n }\n });\n}\n\nfunction initTopicbar() {\n const mgrBtn = $('#manage_topic');\n const editDiv = $('#topic_edit');\n const viewDiv = $('#repo-topics');\n const saveBtn = $('#save_topic');\n const topicDropdown = $('#topic_edit .dropdown');\n const topicForm = $('#topic_edit.ui.form');\n const topicPrompts = getPrompts();\n\n mgrBtn.click(() => {\n viewDiv.hide();\n editDiv.css('display', ''); // show Semantic UI Grid\n });\n\n function getPrompts() {\n const hidePrompt = $('div.hide#validate_prompt');\n const prompts = {\n countPrompt: hidePrompt.children('#count_prompt').text(),\n formatPrompt: hidePrompt.children('#format_prompt').text()\n };\n hidePrompt.remove();\n return prompts;\n }\n\n saveBtn.click(() => {\n const topics = $('input[name=topics]').val();\n\n $.post(saveBtn.data('link'), {\n _csrf: csrf,\n topics\n }, (_data, _textStatus, xhr) => {\n if (xhr.responseJSON.status === 'ok') {\n viewDiv.children('.topic').remove();\n if (topics.length) {\n const topicArray = topics.split(',');\n\n const last = viewDiv.children('a').last();\n for (let i = 0; i < topicArray.length; i++) {\n $(`
${topicArray[i]}
`).insertBefore(last);\n }\n }\n editDiv.css('display', 'none');\n viewDiv.show();\n }\n }).fail((xhr) => {\n if (xhr.status === 422) {\n if (xhr.responseJSON.invalidTopics.length > 0) {\n topicPrompts.formatPrompt = xhr.responseJSON.message;\n\n const { invalidTopics } = xhr.responseJSON;\n const topicLables = topicDropdown.children('a.ui.label');\n\n topics.split(',').forEach((value, index) => {\n for (let i = 0; i < invalidTopics.length; i++) {\n if (invalidTopics[i] === value) {\n topicLables.eq(index).removeClass('green').addClass('red');\n }\n }\n });\n } else {\n topicPrompts.countPrompt = xhr.responseJSON.message;\n }\n }\n }).always(() => {\n topicForm.form('validate form');\n });\n });\n\n topicDropdown.dropdown({\n allowAdditions: true,\n forceSelection: false,\n fields: { name: 'description', value: 'data-value' },\n saveRemoteData: false,\n label: {\n transition: 'horizontal flip',\n duration: 200,\n variation: false,\n blue: true,\n basic: true,\n },\n className: {\n label: 'ui small label'\n },\n apiSettings: {\n url: `${suburl}/api/v1/topics/search?q={query}`,\n throttle: 500,\n cache: false,\n onResponse(res) {\n const formattedResponse = {\n success: false,\n results: [],\n };\n const stripTags = function (text) {\n return text.replace(/<[^>]*>?/gm, '');\n };\n\n const query = stripTags(this.urlData.query.trim());\n let found_query = false;\n const current_topics = [];\n topicDropdown.find('div.label.visible.topic,a.label.visible').each((_, e) => { current_topics.push(e.dataset.value); });\n\n if (res.topics) {\n let found = false;\n for (let i = 0; i < res.topics.length; i++) {\n // skip currently added tags\n if (current_topics.indexOf(res.topics[i].topic_name) !== -1) {\n continue;\n }\n\n if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()) {\n found_query = true;\n }\n formattedResponse.results.push({ description: res.topics[i].topic_name, 'data-value': res.topics[i].topic_name });\n found = true;\n }\n formattedResponse.success = found;\n }\n\n if (query.length > 0 && !found_query) {\n formattedResponse.success = true;\n formattedResponse.results.unshift({ description: query, 'data-value': query });\n } else if (query.length > 0 && found_query) {\n formattedResponse.results.sort((a, b) => {\n if (a.description.toLowerCase() === query.toLowerCase()) return -1;\n if (b.description.toLowerCase() === query.toLowerCase()) return 1;\n if (a.description > b.description) return -1;\n if (a.description < b.description) return 1;\n return 0;\n });\n }\n\n\n return formattedResponse;\n },\n },\n onLabelCreate(value) {\n value = value.toLowerCase().trim();\n this.attr('data-value', value).contents().first().replaceWith(value);\n return $(this);\n },\n onAdd(addedValue, _addedText, $addedChoice) {\n addedValue = addedValue.toLowerCase().trim();\n $($addedChoice).attr('data-value', addedValue);\n $($addedChoice).attr('data-text', addedValue);\n }\n });\n\n $.fn.form.settings.rules.validateTopic = function (_values, regExp) {\n const topics = topicDropdown.children('a.ui.label');\n const status = topics.length === 0 || topics.last().attr('data-value').match(regExp);\n if (!status) {\n topics.last().removeClass('green').addClass('red');\n }\n return status && topicDropdown.children('a.ui.label.red').length === 0;\n };\n\n topicForm.form({\n on: 'change',\n inline: true,\n fields: {\n topics: {\n identifier: 'topics',\n rules: [\n {\n type: 'validateTopic',\n value: /^[a-z0-9][a-z0-9-]{1,35}$/,\n prompt: topicPrompts.formatPrompt\n },\n {\n type: 'maxCount[25]',\n prompt: topicPrompts.countPrompt\n }\n ]\n },\n }\n });\n}\n\nwindow.toggleDeadlineForm = function () {\n $('#deadlineForm').fadeToggle(150);\n};\n\nwindow.setDeadline = function () {\n const deadline = $('#deadlineDate').val();\n window.updateDeadline(deadline);\n};\n\nwindow.updateDeadline = function (deadlineString) {\n $('#deadline-err-invalid-date').hide();\n $('#deadline-loader').addClass('loading');\n\n let realDeadline = null;\n if (deadlineString !== '') {\n const newDate = Date.parse(deadlineString);\n\n if (Number.isNaN(newDate)) {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n return false;\n }\n realDeadline = new Date(newDate);\n }\n\n $.ajax(`${$('#update-issue-deadline-form').attr('action')}/deadline`, {\n data: JSON.stringify({\n due_date: realDeadline,\n }),\n headers: {\n 'X-Csrf-Token': csrf,\n 'X-Remote': true,\n },\n contentType: 'application/json',\n type: 'POST',\n success() {\n reload();\n },\n error() {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n }\n });\n};\n\nwindow.deleteDependencyModal = function (id, type) {\n $('.remove-dependency')\n .modal({\n closable: false,\n duration: 200,\n onApprove() {\n $('#removeDependencyID').val(id);\n $('#dependencyType').val(type);\n $('#removeDependencyForm').submit();\n }\n }).modal('show');\n};\n\nfunction initIssueList() {\n const repolink = $('#repolink').val();\n const repoId = $('#repoId').val();\n const crossRepoSearch = $('#crossRepoSearch').val();\n let issueSearchUrl = `${suburl}/api/v1/repos/${repolink}/issues?q={query}`;\n if (crossRepoSearch === 'true') {\n issueSearchUrl = `${suburl}/api/v1/repos/issues/search?q={query}&priority_repo_id=${repoId}`;\n }\n $('#new-dependency-drop-list')\n .dropdown({\n apiSettings: {\n url: issueSearchUrl,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n const currIssueId = $('#new-dependency-drop-list').data('issue-id');\n // Parse the response from the api to work with our dropdown\n $.each(response, (_i, issue) => {\n // Don't list current issue in the dependency list.\n if (issue.id === currIssueId) {\n return;\n }\n filteredResponse.results.push({\n name: `#${issue.number} ${htmlEncode(issue.title)\n }
${htmlEncode(issue.repository.full_name)}
`,\n value: issue.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n\n $('.menu a.label-filter-item').each(function () {\n $(this).click(function (e) {\n if (e.altKey) {\n e.preventDefault();\n\n const href = $(this).attr('href');\n const id = $(this).data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n });\n });\n\n $('.menu .ui.dropdown.label-filter').keydown((e) => {\n if (e.altKey && e.keyCode === 13) {\n const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected');\n\n if (selectedItems.length > 0) {\n const item = $(selectedItems[0]);\n\n const href = item.attr('href');\n const id = item.data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n }\n });\n}\nwindow.cancelCodeComment = function (btn) {\n const form = $(btn).closest('form');\n if (form.length > 0 && form.hasClass('comment-form')) {\n form.addClass('hide');\n form.parent().find('button.comment-form-reply').show();\n } else {\n form.closest('.comment-code-cloud').remove();\n }\n};\nwindow.onOAuthLoginClick = function () {\n const oauthLoader = $('#oauth2-login-loader');\n const oauthNav = $('#oauth2-login-navigator');\n\n oauthNav.hide();\n oauthLoader.removeClass('disabled');\n\n setTimeout(() => {\n // recover previous content to let user try again\n // usually redirection will be performed before this action\n oauthLoader.addClass('disabled');\n oauthNav.show();\n }, 5000);\n};\n","$(async () => {\n const graphCanvas = document.getElementById('graph-canvas');\n if (!graphCanvas) return;\n\n const [{ default: gitGraph }] = await Promise.all([\n import(/* webpackChunkName: \"gitgraph\" */'../vendor/gitgraph.js/gitgraph.custom.js'),\n import(/* webpackChunkName: \"gitgraph\" */'../vendor/gitgraph.js/gitgraph.custom.css'),\n ]);\n\n const graphList = [];\n $('#graph-raw-list li span.node-relation').each(function () {\n graphList.push($(this).text());\n });\n\n gitGraph(graphCanvas, graphList);\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/public/vendor/VERSIONS b/public/vendor/VERSIONS index 4643ee7b1..0e6d2d238 100644 --- a/public/vendor/VERSIONS +++ b/public/vendor/VERSIONS @@ -17,9 +17,6 @@ Version: 2.3.1 File(s): /vendor/plugins/clipboard/clipboard.min.js Version: 1.5.9 -File(s): /vendor/plugins/gitgraph/gitgraph.js -Version: 745f604212e2abfe2f0a59169ea530857b46625c - File(s): /vendor/plugins/vue/vue.min.js Version: 2.1.10 diff --git a/public/vendor/librejs.html b/public/vendor/librejs.html index 56c1cb287..320dbb69a 100644 --- a/public/vendor/librejs.html +++ b/public/vendor/librejs.html @@ -46,7 +46,7 @@ clipboard-1.5.9.tar.gz - gitgraph.js + gitgraph.js BSD 3-Clause gitgraph.js-latest diff --git a/public/vendor/plugins/gitgraph/gitgraph.js b/public/vendor/plugins/gitgraph/gitgraph.js deleted file mode 100644 index 05ca0844d..000000000 --- a/public/vendor/plugins/gitgraph/gitgraph.js +++ /dev/null @@ -1,435 +0,0 @@ -/* - * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD 3-Clause - * Copyright (c) 2011, Terrence Lee - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var gitGraph = function (canvas, rawGraphList, config) { - if (!canvas.getContext) { - return; - } - - if (typeof config === "undefined") { - config = { - unitSize: 20, - lineWidth: 3, - nodeRadius: 4 - }; - } - - var flows = []; - var graphList = []; - - var ctx = canvas.getContext("2d"); - - var devicePixelRatio = window.devicePixelRatio || 1; - var backingStoreRatio = ctx.webkitBackingStorePixelRatio || - ctx.mozBackingStorePixelRatio || - ctx.msBackingStorePixelRatio || - ctx.oBackingStorePixelRatio || - ctx.backingStorePixelRatio || 1; - - var ratio = devicePixelRatio / backingStoreRatio; - - var init = function () { - var maxWidth = 0; - var i; - var l = rawGraphList.length; - var row; - var midStr; - - for (i = 0; i < l; i++) { - midStr = rawGraphList[i].replace(/\s+/g, " ").replace(/^\s+|\s+$/g, ""); - - maxWidth = Math.max(midStr.replace(/(\_|\s)/g, "").length, maxWidth); - - row = midStr.split(""); - - graphList.unshift(row); - } - - var width = maxWidth * config.unitSize; - var height = graphList.length * config.unitSize; - - canvas.width = width * ratio; - canvas.height = height * ratio; - - canvas.style.width = width + 'px'; - canvas.style.height = height + 'px'; - - ctx.lineWidth = config.lineWidth; - ctx.lineJoin = "round"; - ctx.lineCap = "round"; - - ctx.scale(ratio, ratio); - }; - - var genRandomStr = function () { - var chars = "0123456789ABCDEF"; - var stringLength = 6; - var randomString = '', rnum, i; - for (i = 0; i < stringLength; i++) { - rnum = Math.floor(Math.random() * chars.length); - randomString += chars.substring(rnum, rnum + 1); - } - - return randomString; - }; - - var findFlow = function (id) { - var i = flows.length; - - while (i-- && flows[i].id !== id) {} - - return i; - }; - - var findColomn = function (symbol, row) { - var i = row.length; - - while (i-- && row[i] !== symbol) {} - - return i; - }; - - var findBranchOut = function (row) { - if (!row) { - return -1 - } - - var i = row.length; - - while (i-- && - !(row[i - 1] && row[i] === "/" && row[i - 1] === "|") && - !(row[i - 2] && row[i] === "_" && row[i - 2] === "|")) {} - - return i; - }; - - var findLineBreak = function (row) { - if (!row) { - return -1 - } - - var i = row.length; - - while (i-- && - !(row[i - 1] && row[i - 2] && row[i] === " " && row[i - 1] === "|" && row[i - 2] === "_")) {} - - return i; - }; - - var genNewFlow = function () { - var newId; - - do { - newId = genRandomStr(); - } while (findFlow(newId) !== -1); - - return {id:newId, color:"#" + newId}; - }; - - //Draw methods - var drawLine = function (moveX, moveY, lineX, lineY, color) { - ctx.strokeStyle = color; - ctx.beginPath(); - ctx.moveTo(moveX, moveY); - ctx.lineTo(lineX, lineY); - ctx.stroke(); - }; - - var drawLineRight = function (x, y, color) { - drawLine(x, y + config.unitSize / 2, x + config.unitSize, y + config.unitSize / 2, color); - }; - - var drawLineUp = function (x, y, color) { - drawLine(x, y + config.unitSize / 2, x, y - config.unitSize / 2, color); - }; - - var drawNode = function (x, y, color) { - ctx.strokeStyle = color; - - drawLineUp(x, y, color); - - ctx.beginPath(); - ctx.arc(x, y, config.nodeRadius, 0, Math.PI * 2, true); - ctx.fill(); - }; - - var drawLineIn = function (x, y, color) { - drawLine(x + config.unitSize, y + config.unitSize / 2, x, y - config.unitSize / 2, color); - }; - - var drawLineOut = function (x, y, color) { - drawLine(x, y + config.unitSize / 2, x + config.unitSize, y - config.unitSize / 2, color); - }; - - var draw = function (graphList) { - var colomn, colomnIndex, prevColomn, condenseIndex, breakIndex = -1; - var x, y; - var color; - var nodePos; - var tempFlow; - var prevRowLength = 0; - var flowSwapPos = -1; - var lastLinePos; - var i, l; - var condenseCurrentLength, condensePrevLength = 0, condenseNextLength = 0; - - var inlineIntersect = false; - - //initiate color array for first row - for (i = 0, l = graphList[0].length; i < l; i++) { - if (graphList[0][i] !== "_" && graphList[0][i] !== " ") { - flows.push(genNewFlow()); - } - } - - y = (canvas.height / ratio) - config.unitSize * 0.5; - - //iterate - for (i = 0, l = graphList.length; i < l; i++) { - x = config.unitSize * 0.5; - - currentRow = graphList[i]; - nextRow = graphList[i + 1]; - prevRow = graphList[i - 1]; - - flowSwapPos = -1; - - condenseCurrentLength = currentRow.filter(function (val) { - return (val !== " " && val !== "_") - }).length; - - if (nextRow) { - condenseNextLength = nextRow.filter(function (val) { - return (val !== " " && val !== "_") - }).length; - } else { - condenseNextLength = 0; - } - - //pre process begin - //use last row for analysing - if (prevRow) { - if (!inlineIntersect) { - //intersect might happen - for (colomnIndex = 0; colomnIndex < prevRowLength; colomnIndex++) { - if (prevRow[colomnIndex + 1] && - (prevRow[colomnIndex] === "/" && prevRow[colomnIndex + 1] === "|") || - ((prevRow[colomnIndex] === "_" && prevRow[colomnIndex + 1] === "|") && - (prevRow[colomnIndex + 2] === "/"))) { - - flowSwapPos = colomnIndex; - - //swap two flow - tempFlow = {id:flows[flowSwapPos].id, color:flows[flowSwapPos].color}; - - flows[flowSwapPos].id = flows[flowSwapPos + 1].id; - flows[flowSwapPos].color = flows[flowSwapPos + 1].color; - - flows[flowSwapPos + 1].id = tempFlow.id; - flows[flowSwapPos + 1].color = tempFlow.color; - } - } - } - - if (condensePrevLength < condenseCurrentLength && - ((nodePos = findColomn("*", currentRow)) !== -1 && - (findColomn("_", currentRow) === -1))) { - - flows.splice(nodePos - 1, 0, genNewFlow()); - } - - if (prevRowLength > currentRow.length && - (nodePos = findColomn("*", prevRow)) !== -1) { - - if (findColomn("_", currentRow) === -1 && - findColomn("/", currentRow) === -1 && - findColomn("\\", currentRow) === -1) { - - flows.splice(nodePos + 1, 1); - } - } - } //done with the previous row - - prevRowLength = currentRow.length; //store for next round - colomnIndex = 0; //reset index - condenseIndex = 0; - condensePrevLength = 0; - breakIndex = -1; //reset break index - while (colomnIndex < currentRow.length) { - colomn = currentRow[colomnIndex]; - - if (colomn !== " " && colomn !== "_") { - ++condensePrevLength; - } - - //check and fix line break in next row - if (colomn === "/" && currentRow[colomnIndex - 1] && currentRow[colomnIndex - 1] === "|") { - if ((breakIndex = findLineBreak(nextRow)) !== -1) { - nextRow.splice(breakIndex, 1); - } - } - //if line break found replace all '/' with '|' after breakIndex in previous row - if (breakIndex !== - 1 && colomn === "/" && colomnIndex > breakIndex) { - currentRow[colomnIndex] = "|"; - colomn = "|"; - } - - if (colomn === " " && - currentRow[colomnIndex + 1] && - currentRow[colomnIndex + 1] === "_" && - currentRow[colomnIndex - 1] && - currentRow[colomnIndex - 1] === "|") { - - currentRow.splice(colomnIndex, 1); - - currentRow[colomnIndex] = "/"; - colomn = "/"; - } - - //create new flow only when no intersect happened - if (flowSwapPos === -1 && - colomn === "/" && - currentRow[colomnIndex - 1] && - currentRow[colomnIndex - 1] === "|") { - - flows.splice(condenseIndex, 0, genNewFlow()); - } - - //change \ and / to | when it's in the last position of the whole row - if (colomn === "/" || colomn === "\\") { - if (!(colomn === "/" && findBranchOut(nextRow) === -1)) { - if ((lastLinePos = Math.max(findColomn("|", currentRow), - findColomn("*", currentRow))) !== -1 && - (lastLinePos < colomnIndex - 1)) { - - while (currentRow[++lastLinePos] === " ") {} - - if (lastLinePos === colomnIndex) { - currentRow[colomnIndex] = "|"; - } - } - } - } - - if (colomn === "*" && - prevRow && - prevRow[condenseIndex + 1] === "\\") { - flows.splice(condenseIndex + 1, 1); - } - - if (colomn !== " ") { - ++condenseIndex; - } - - ++colomnIndex; - } - - condenseCurrentLength = currentRow.filter(function (val) { - return (val !== " " && val !== "_") - }).length; - - //do some clean up - if (flows.length > condenseCurrentLength) { - flows.splice(condenseCurrentLength, flows.length - condenseCurrentLength); - } - - colomnIndex = 0; - - //a little inline analysis and draw process - while (colomnIndex < currentRow.length) { - colomn = currentRow[colomnIndex]; - prevColomn = currentRow[colomnIndex - 1]; - - if (currentRow[colomnIndex] === " ") { - currentRow.splice(colomnIndex, 1); - x += config.unitSize; - - continue; - } - - //inline interset - if ((colomn === "_" || colomn === "/") && - currentRow[colomnIndex - 1] === "|" && - currentRow[colomnIndex - 2] === "_") { - - inlineIntersect = true; - - tempFlow = flows.splice(colomnIndex - 2, 1)[0]; - flows.splice(colomnIndex - 1, 0, tempFlow); - currentRow.splice(colomnIndex - 2, 1); - - colomnIndex = colomnIndex - 1; - } else { - inlineIntersect = false; - } - - color = flows[colomnIndex].color; - - switch (colomn) { - case "_" : - drawLineRight(x, y, color); - - x += config.unitSize; - break; - - case "*" : - drawNode(x, y, color); - break; - - case "|" : - drawLineUp(x, y, color); - break; - - case "/" : - if (prevColomn && - (prevColomn === "/" || - prevColomn === " ")) { - x -= config.unitSize; - } - - drawLineOut(x, y, color); - - x += config.unitSize; - break; - - case "\\" : - drawLineIn(x, y, color); - break; - } - - ++colomnIndex; - } - - y -= config.unitSize; - } - }; - - init(); - draw(graphList); -}; -// @end-license \ No newline at end of file diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 084c49517..e581d3952 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -111,7 +111,6 @@ func Graph(ctx *context.Context) { ctx.Data["Reponame"] = ctx.Repo.Repository.Name ctx.Data["CommitCount"] = commitsCount ctx.Data["Branch"] = ctx.Repo.BranchName - ctx.Data["RequireGitGraph"] = true ctx.Data["Page"] = context.NewPagination(int(allCommitsCount), setting.UI.GraphMaxCommitNum, page, 5) ctx.HTML(200, tplGraph) } diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index 93cf94167..0c07fb6e7 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -23,10 +23,6 @@ CodeMirror.modeURL = "{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js"; {{end}} -{{if .RequireGitGraph}} - - -{{end}} {{if .RequireHighlightJS}} diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index c0686ca93..32251f84a 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -87,11 +87,6 @@ {{end}} -{{if .RequireGitGraph}} - - -{{end}} - {{if .RequireTribute}} {{end}} diff --git a/templates/pwa/serviceworker_js.tmpl b/templates/pwa/serviceworker_js.tmpl index 672e504ff..59f3be413 100644 --- a/templates/pwa/serviceworker_js.tmpl +++ b/templates/pwa/serviceworker_js.tmpl @@ -6,9 +6,9 @@ var urlsToCache = [ '{{StaticUrlPrefix}}/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1', '{{StaticUrlPrefix}}/vendor/plugins/semantic/semantic.min.js', '{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}', + '{{StaticUrlPrefix}}/js/gitgraph.js?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/js/semantic.dropdown.custom.js?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/vendor/plugins/clipboard/clipboard.min.js', - '{{StaticUrlPrefix}}/vendor/plugins/gitgraph/gitgraph.js', '{{StaticUrlPrefix}}/vendor/plugins/vue/vue.min.js', '{{StaticUrlPrefix}}/vendor/plugins/emojify/emojify.custom.js', '{{StaticUrlPrefix}}/vendor/plugins/cssrelpreload/loadCSS.min.js', @@ -25,7 +25,6 @@ var urlsToCache = [ '{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css', '{{StaticUrlPrefix}}/vendor/assets/octicons/octicons.min.css', '{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css', - '{{StaticUrlPrefix}}/vendor/plugins/gitgraph/gitgraph.css', '{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.css', '{{StaticUrlPrefix}}/vendor/plugins/semantic/semantic.min.css', '{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}', diff --git a/web_src/js/draw.js b/web_src/js/draw.js deleted file mode 100644 index bb9c7f28c..000000000 --- a/web_src/js/draw.js +++ /dev/null @@ -1,15 +0,0 @@ -/* globals gitGraph */ - -$(() => { - const graphList = []; - - if (!document.getElementById('graph-canvas')) { - return; - } - - $('#graph-raw-list li span.node-relation').each(function () { - graphList.push($(this).text()); - }); - - gitGraph(document.getElementById('graph-canvas'), graphList); -}); diff --git a/web_src/js/gitGraph.js b/web_src/js/gitGraph.js new file mode 100644 index 000000000..cfa466d8c --- /dev/null +++ b/web_src/js/gitGraph.js @@ -0,0 +1,16 @@ +$(async () => { + const graphCanvas = document.getElementById('graph-canvas'); + if (!graphCanvas) return; + + const [{ default: gitGraph }] = await Promise.all([ + import(/* webpackChunkName: "gitgraph" */'../vendor/gitgraph.js/gitgraph.custom.js'), + import(/* webpackChunkName: "gitgraph" */'../vendor/gitgraph.js/gitgraph.custom.css'), + ]); + + const graphList = []; + $('#graph-raw-list li span.node-relation').each(function () { + graphList.push($(this).text()); + }); + + gitGraph(graphCanvas, graphList); +}); diff --git a/web_src/js/index.js b/web_src/js/index.js index 704647d9c..671c66f68 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -2,6 +2,9 @@ /* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */ /* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */ +import './publicPath'; +import './gitGraph'; + function htmlEncode(text) { return jQuery('
').text(text).html(); } diff --git a/web_src/js/publicPath.js b/web_src/js/publicPath.js new file mode 100644 index 000000000..5d277e442 --- /dev/null +++ b/web_src/js/publicPath.js @@ -0,0 +1,12 @@ +/* This sets up webpack's chunk loading to load resources from the same + directory where it loaded index.js from. This file must be imported + before any lazy-loading is being attempted. */ + +if (document.currentScript && document.currentScript.src) { + const url = new URL(document.currentScript.src); + __webpack_public_path__ = `${url.pathname.replace(/\/[^/]*$/, '')}/`; +} else { + // compat: IE11 + const script = document.querySelector('script[src*="/index.js"]'); + __webpack_public_path__ = `${script.getAttribute('src').replace(/\/[^/]*$/, '')}/`; +} diff --git a/public/vendor/plugins/gitgraph/LICENSE b/web_src/vendor/gitgraph.js/LICENSE similarity index 100% rename from public/vendor/plugins/gitgraph/LICENSE rename to web_src/vendor/gitgraph.js/LICENSE diff --git a/public/vendor/plugins/gitgraph/gitgraph.css b/web_src/vendor/gitgraph.js/gitgraph.custom.css similarity index 86% rename from public/vendor/plugins/gitgraph/gitgraph.css rename to web_src/vendor/gitgraph.js/gitgraph.custom.css index 3eba67517..92d2dcc20 100644 --- a/public/vendor/plugins/gitgraph/gitgraph.css +++ b/web_src/vendor/gitgraph.js/gitgraph.custom.css @@ -1,6 +1,3 @@ -body {font:13.34px/1.4 helvetica,arial,freesans,clean,sans-serif;} -em {font-style:normal;} - #git-graph-container, #rel-container {float:left;} #rel-container {max-width:30%; overflow-x:auto;} #git-graph-container {overflow-x:auto; width:100%} @@ -13,4 +10,4 @@ em {font-style:normal;} #git-graph-container li a em {color:#BB0000;border-bottom:1px dotted #BBBBBB;text-decoration:none;font-style:normal;} #rev-container {width:100%} #rev-list {margin:0;padding:0 5px 0 5px;min-width:95%} -#graph-raw-list {margin:0px;} \ No newline at end of file +#graph-raw-list {margin:0px;} diff --git a/web_src/vendor/gitgraph.js/gitgraph.custom.js b/web_src/vendor/gitgraph.js/gitgraph.custom.js new file mode 100644 index 000000000..2c18a2d03 --- /dev/null +++ b/web_src/vendor/gitgraph.js/gitgraph.custom.js @@ -0,0 +1,419 @@ +/* + * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD 3-Clause + * Copyright (c) 2011, Terrence Lee + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +export default function gitGraph(canvas, rawGraphList, config) { + if (!canvas.getContext) { + return; + } + + if (typeof config === 'undefined') { + config = { + unitSize: 20, + lineWidth: 3, + nodeRadius: 4 + }; + } + + const flows = []; + const graphList = []; + + const ctx = canvas.getContext('2d'); + + const devicePixelRatio = window.devicePixelRatio || 1; + const backingStoreRatio = ctx.webkitBackingStorePixelRatio + || ctx.mozBackingStorePixelRatio + || ctx.msBackingStorePixelRatio + || ctx.oBackingStorePixelRatio + || ctx.backingStorePixelRatio || 1; + + const ratio = devicePixelRatio / backingStoreRatio; + + const init = function () { + let maxWidth = 0; + let i; + const l = rawGraphList.length; + let row; + let midStr; + + for (i = 0; i < l; i++) { + midStr = rawGraphList[i].replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); + + maxWidth = Math.max(midStr.replace(/(_|\s)/g, '').length, maxWidth); + + row = midStr.split(''); + + graphList.unshift(row); + } + + const width = maxWidth * config.unitSize; + const height = graphList.length * config.unitSize; + + canvas.width = width * ratio; + canvas.height = height * ratio; + + canvas.style.width = `${width}px`; + canvas.style.height = `${height}px`; + + ctx.lineWidth = config.lineWidth; + ctx.lineJoin = 'round'; + ctx.lineCap = 'round'; + + ctx.scale(ratio, ratio); + }; + + const genRandomStr = function () { + const chars = '0123456789ABCDEF'; + const stringLength = 6; + let randomString = '', rnum, i; + for (i = 0; i < stringLength; i++) { + rnum = Math.floor(Math.random() * chars.length); + randomString += chars.substring(rnum, rnum + 1); + } + + return randomString; + }; + + const findFlow = function (id) { + let i = flows.length; + + while (i-- && flows[i].id !== id); + + return i; + }; + + const findColomn = function (symbol, row) { + let i = row.length; + + while (i-- && row[i] !== symbol); + + return i; + }; + + const findBranchOut = function (row) { + if (!row) { + return -1; + } + + let i = row.length; + + while (i-- + && !(row[i - 1] && row[i] === '/' && row[i - 1] === '|') + && !(row[i - 2] && row[i] === '_' && row[i - 2] === '|')); + + return i; + }; + + const findLineBreak = function (row) { + if (!row) { + return -1; + } + + let i = row.length; + + while (i-- + && !(row[i - 1] && row[i - 2] && row[i] === ' ' && row[i - 1] === '|' && row[i - 2] === '_')); + + return i; + }; + + const genNewFlow = function () { + let newId; + + do { + newId = genRandomStr(); + } while (findFlow(newId) !== -1); + + return { id: newId, color: `#${newId}` }; + }; + + // Draw methods + const drawLine = function (moveX, moveY, lineX, lineY, color) { + ctx.strokeStyle = color; + ctx.beginPath(); + ctx.moveTo(moveX, moveY); + ctx.lineTo(lineX, lineY); + ctx.stroke(); + }; + + const drawLineRight = function (x, y, color) { + drawLine(x, y + config.unitSize / 2, x + config.unitSize, y + config.unitSize / 2, color); + }; + + const drawLineUp = function (x, y, color) { + drawLine(x, y + config.unitSize / 2, x, y - config.unitSize / 2, color); + }; + + const drawNode = function (x, y, color) { + ctx.strokeStyle = color; + + drawLineUp(x, y, color); + + ctx.beginPath(); + ctx.arc(x, y, config.nodeRadius, 0, Math.PI * 2, true); + ctx.fill(); + }; + + const drawLineIn = function (x, y, color) { + drawLine(x + config.unitSize, y + config.unitSize / 2, x, y - config.unitSize / 2, color); + }; + + const drawLineOut = function (x, y, color) { + drawLine(x, y + config.unitSize / 2, x + config.unitSize, y - config.unitSize / 2, color); + }; + + const draw = function (graphList) { + let colomn, colomnIndex, prevColomn, condenseIndex, breakIndex = -1; + let x, y; + let color; + let nodePos; + let tempFlow; + let prevRowLength = 0; + let flowSwapPos = -1; + let lastLinePos; + let i, l; + let condenseCurrentLength, condensePrevLength = 0; + + let inlineIntersect = false; + + // initiate color array for first row + for (i = 0, l = graphList[0].length; i < l; i++) { + if (graphList[0][i] !== '_' && graphList[0][i] !== ' ') { + flows.push(genNewFlow()); + } + } + + y = (canvas.height / ratio) - config.unitSize * 0.5; + + // iterate + for (i = 0, l = graphList.length; i < l; i++) { + x = config.unitSize * 0.5; + + const currentRow = graphList[i]; + const nextRow = graphList[i + 1]; + const prevRow = graphList[i - 1]; + + flowSwapPos = -1; + + condenseCurrentLength = currentRow.filter((val) => { + return (val !== ' ' && val !== '_'); + }).length; + + // pre process begin + // use last row for analysing + if (prevRow) { + if (!inlineIntersect) { + // intersect might happen + for (colomnIndex = 0; colomnIndex < prevRowLength; colomnIndex++) { + if (prevRow[colomnIndex + 1] + && (prevRow[colomnIndex] === '/' && prevRow[colomnIndex + 1] === '|') + || ((prevRow[colomnIndex] === '_' && prevRow[colomnIndex + 1] === '|') + && (prevRow[colomnIndex + 2] === '/'))) { + flowSwapPos = colomnIndex; + + // swap two flow + tempFlow = { id: flows[flowSwapPos].id, color: flows[flowSwapPos].color }; + + flows[flowSwapPos].id = flows[flowSwapPos + 1].id; + flows[flowSwapPos].color = flows[flowSwapPos + 1].color; + + flows[flowSwapPos + 1].id = tempFlow.id; + flows[flowSwapPos + 1].color = tempFlow.color; + } + } + } + + if (condensePrevLength < condenseCurrentLength + && ((nodePos = findColomn('*', currentRow)) !== -1 + && (findColomn('_', currentRow) === -1))) { + flows.splice(nodePos - 1, 0, genNewFlow()); + } + + if (prevRowLength > currentRow.length + && (nodePos = findColomn('*', prevRow)) !== -1) { + if (findColomn('_', currentRow) === -1 + && findColomn('/', currentRow) === -1 + && findColomn('\\', currentRow) === -1) { + flows.splice(nodePos + 1, 1); + } + } + } // done with the previous row + + prevRowLength = currentRow.length; // store for next round + colomnIndex = 0; // reset index + condenseIndex = 0; + condensePrevLength = 0; + breakIndex = -1; // reset break index + while (colomnIndex < currentRow.length) { + colomn = currentRow[colomnIndex]; + + if (colomn !== ' ' && colomn !== '_') { + ++condensePrevLength; + } + + // check and fix line break in next row + if (colomn === '/' && currentRow[colomnIndex - 1] && currentRow[colomnIndex - 1] === '|') { + if ((breakIndex = findLineBreak(nextRow)) !== -1) { + nextRow.splice(breakIndex, 1); + } + } + // if line break found replace all '/' with '|' after breakIndex in previous row + if (breakIndex !== -1 && colomn === '/' && colomnIndex > breakIndex) { + currentRow[colomnIndex] = '|'; + colomn = '|'; + } + + if (colomn === ' ' + && currentRow[colomnIndex + 1] + && currentRow[colomnIndex + 1] === '_' + && currentRow[colomnIndex - 1] + && currentRow[colomnIndex - 1] === '|') { + currentRow.splice(colomnIndex, 1); + + currentRow[colomnIndex] = '/'; + colomn = '/'; + } + + // create new flow only when no intersect happened + if (flowSwapPos === -1 + && colomn === '/' + && currentRow[colomnIndex - 1] + && currentRow[colomnIndex - 1] === '|') { + flows.splice(condenseIndex, 0, genNewFlow()); + } + + // change \ and / to | when it's in the last position of the whole row + if (colomn === '/' || colomn === '\\') { + if (!(colomn === '/' && findBranchOut(nextRow) === -1)) { + if ((lastLinePos = Math.max(findColomn('|', currentRow), + findColomn('*', currentRow))) !== -1 + && (lastLinePos < colomnIndex - 1)) { + while (currentRow[++lastLinePos] === ' '); + + if (lastLinePos === colomnIndex) { + currentRow[colomnIndex] = '|'; + } + } + } + } + + if (colomn === '*' + && prevRow + && prevRow[condenseIndex + 1] === '\\') { + flows.splice(condenseIndex + 1, 1); + } + + if (colomn !== ' ') { + ++condenseIndex; + } + + ++colomnIndex; + } + + condenseCurrentLength = currentRow.filter((val) => { + return (val !== ' ' && val !== '_'); + }).length; + + // do some clean up + if (flows.length > condenseCurrentLength) { + flows.splice(condenseCurrentLength, flows.length - condenseCurrentLength); + } + + colomnIndex = 0; + + // a little inline analysis and draw process + while (colomnIndex < currentRow.length) { + colomn = currentRow[colomnIndex]; + prevColomn = currentRow[colomnIndex - 1]; + + if (currentRow[colomnIndex] === ' ') { + currentRow.splice(colomnIndex, 1); + x += config.unitSize; + + continue; + } + + // inline interset + if ((colomn === '_' || colomn === '/') + && currentRow[colomnIndex - 1] === '|' + && currentRow[colomnIndex - 2] === '_') { + inlineIntersect = true; + + tempFlow = flows.splice(colomnIndex - 2, 1)[0]; + flows.splice(colomnIndex - 1, 0, tempFlow); + currentRow.splice(colomnIndex - 2, 1); + + colomnIndex -= 1; + } else { + inlineIntersect = false; + } + + color = flows[colomnIndex].color; + + switch (colomn) { + case '_': + drawLineRight(x, y, color); + + x += config.unitSize; + break; + + case '*': + drawNode(x, y, color); + break; + + case '|': + drawLineUp(x, y, color); + break; + + case '/': + if (prevColomn + && (prevColomn === '/' + || prevColomn === ' ')) { + x -= config.unitSize; + } + + drawLineOut(x, y, color); + + x += config.unitSize; + break; + + case '\\': + drawLineIn(x, y, color); + break; + } + + ++colomnIndex; + } + + y -= config.unitSize; + } + }; + + init(); + draw(graphList); +} +// @end-license diff --git a/webpack.config.js b/webpack.config.js index 4fdf4ba5a..7efde9503 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,17 +4,24 @@ const TerserPlugin = require('terser-webpack-plugin'); module.exports = { mode: 'production', entry: { - index: ['./web_src/js/index', './web_src/js/draw'] + index: ['./web_src/js/index'] }, devtool: 'source-map', output: { path: path.resolve(__dirname, 'public/js'), - filename: 'index.js' + filename: 'index.js', + chunkFilename: '[name].js', }, optimization: { minimize: true, minimizer: [new TerserPlugin({ sourceMap: true, + extractComments: false, + terserOptions: { + output: { + comments: false, + }, + }, })], }, module: { @@ -33,10 +40,22 @@ module.exports = { corejs: 3, } ] - ] + ], + plugins: [ + [ + '@babel/plugin-transform-runtime', + { + regenerator: true, + } + ] + ], } } - } + }, + { + test: /\.css$/i, + use: ['style-loader', 'css-loader'], + }, ] } };