swh.web 0.16.2__py3-none-any.whl → 0.16.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. swh/web/add_forge_now/templates/add-forge-request-dashboard.html +5 -2
  2. swh/web/api/views/origin.py +2 -2
  3. swh/web/archive_coverage/views.py +4 -7
  4. swh/web/badges/__init__.py +1 -1
  5. swh/web/badges/assets/index.js +40 -14
  6. swh/web/browse/assets/browse/browse.css +5 -0
  7. swh/web/browse/assets/browse/sidetabs.js +3 -16
  8. swh/web/browse/templates/browse-iframe.html +10 -7
  9. swh/web/browse/templates/browse-origin-visits.html +2 -2
  10. swh/web/browse/templates/browse-revision.html +5 -3
  11. swh/web/browse/templates/includes/content-display.html +10 -5
  12. swh/web/browse/templates/includes/readme-display.html +3 -2
  13. swh/web/browse/templates/includes/show-metadata.html +3 -2
  14. swh/web/browse/templates/includes/sidetabs.html +9 -7
  15. swh/web/browse/templates/includes/top-navigation.html +2 -1
  16. swh/web/browse/tests/views/test_origin.py +3 -1
  17. swh/web/deposit/templates/deposit-admin.html +6 -1
  18. swh/web/inbound_email/handle_message.py +1 -1
  19. swh/web/inbound_email/tests/test_utils.py +2 -2
  20. swh/web/save_code_now/assets/origin-save-admin.js +5 -2
  21. swh/web/save_code_now/assets/origin-save.js +9 -4
  22. swh/web/static/css/{archive_coverage.70eba3d32ed75472d638.css → archive_coverage.df54ae8fe40453ecd972.css} +2 -2
  23. swh/web/static/css/archive_coverage.df54ae8fe40453ecd972.css.map +1 -0
  24. swh/web/static/css/browse.633076034514e6a3977d.css +2 -0
  25. swh/web/static/css/browse.633076034514e6a3977d.css.map +1 -0
  26. swh/web/static/css/guided_tour.d496a0c252e1bb193496.css +2 -0
  27. swh/web/static/css/{guided_tour.62c03630e944b8b8d9ad.css.map → guided_tour.d496a0c252e1bb193496.css.map} +1 -1
  28. swh/web/static/css/{highlightjs.0c1b181eb006699a4c3e.css → highlightjs.37238c93749cb449800d.css} +2 -2
  29. swh/web/static/css/highlightjs.37238c93749cb449800d.css.map +1 -0
  30. swh/web/static/css/origin_visits.9a796c4df6606bd9905f.css +2 -0
  31. swh/web/static/css/origin_visits.9a796c4df6606bd9905f.css.map +1 -0
  32. swh/web/static/css/vendors.a4844da6ce54cbc04960.css +24 -0
  33. swh/web/static/css/vendors.a4844da6ce54cbc04960.css.map +1 -0
  34. swh/web/static/css/{webapp.4655323082740f1a4862.css → webapp.e995faa24f8c84db0d06.css} +2 -2
  35. swh/web/static/css/webapp.e995faa24f8c84db0d06.css.map +1 -0
  36. swh/web/static/js/add_forge_now.e85d09463e38c1e19632.js +3 -0
  37. swh/web/static/js/add_forge_now.e85d09463e38c1e19632.js.map +1 -0
  38. swh/web/static/js/auth.06c697ab58b81d08ebce.js +3 -0
  39. swh/web/static/js/auth.06c697ab58b81d08ebce.js.map +1 -0
  40. swh/web/static/js/badges.50941e27bf5e4453b0e0.js +3 -0
  41. swh/web/static/js/badges.50941e27bf5e4453b0e0.js.LICENSE.txt +6 -0
  42. swh/web/static/js/badges.50941e27bf5e4453b0e0.js.map +1 -0
  43. swh/web/static/js/browse.3f22819b69002c8b6407.js +3 -0
  44. swh/web/static/js/browse.3f22819b69002c8b6407.js.map +1 -0
  45. swh/web/static/js/deposit.d47e18177b16ccdbdb84.js.map +1 -1
  46. swh/web/static/js/{highlightjs.dc9b8354c69d942fad33.js → highlightjs.516e784a1e62011c7605.js} +3 -3
  47. swh/web/static/js/highlightjs.516e784a1e62011c7605.js.map +1 -0
  48. swh/web/static/js/mailmap.de04f685e56eff5b627f.js +3 -0
  49. swh/web/static/js/mailmap.de04f685e56eff5b627f.js.map +1 -0
  50. swh/web/static/js/mathjax.98ef576f318f1a0b0c4a.js.map +1 -1
  51. swh/web/static/js/pdf.worker.min.js +1 -1
  52. swh/web/static/js/pdfjs.018d9890c044b3612ece.js +3 -0
  53. swh/web/static/js/pdfjs.018d9890c044b3612ece.js.map +1 -0
  54. swh/web/static/js/{revision.ac9293e1b984b4d4d909.js → revision.122a31614a5f9abffc3c.js} +3 -3
  55. swh/web/static/js/revision.122a31614a5f9abffc3c.js.map +1 -0
  56. swh/web/static/js/save_code_now.d4d8fc47420a4badb683.js +3 -0
  57. swh/web/static/js/save_code_now.d4d8fc47420a4badb683.js.map +1 -0
  58. swh/web/static/js/vault.d2ec3dd1d84a8d038a6c.js +3 -0
  59. swh/web/static/js/vault.d2ec3dd1d84a8d038a6c.js.map +1 -0
  60. swh/web/static/js/vendors.f62cb86cf3b92ae280ee.js +3 -0
  61. swh/web/static/js/{vendors.2eeadf2e0831a7a82b6d.js.LICENSE.txt → vendors.f62cb86cf3b92ae280ee.js.LICENSE.txt} +5 -1
  62. swh/web/static/js/vendors.f62cb86cf3b92ae280ee.js.map +1 -0
  63. swh/web/static/js/webapp.e93873983e400db67bf8.js +3 -0
  64. swh/web/static/js/{webapp.26efc059a8f5fe204240.js.LICENSE.txt → webapp.e93873983e400db67bf8.js.LICENSE.txt} +1 -1
  65. swh/web/static/js/webapp.e93873983e400db67bf8.js.map +1 -0
  66. swh/web/static/jssources/@myriaddreamin/highlighter-typst/dist/esm/contrib/hljs/typst-lite.bundle.js +180 -111
  67. swh/web/static/jssources/assets/src/utils/functions.js +5 -5
  68. swh/web/static/jssources/core-js/LICENSE.txt +1 -1
  69. swh/web/static/jssources/core-js/internals/shared-store.js +3 -3
  70. swh/web/static/jssources/core-js/modules/es.object.group-by.js +2 -1
  71. swh/web/static/jssources/datatables.net/js/dataTables.mjs +108 -44
  72. swh/web/static/jssources/datatables.net-fixedheader/js/dataTables.fixedHeader.mjs +10 -4
  73. swh/web/static/jssources/datatables.net-fixedheader/node_modules/datatables.net/js/dataTables.mjs +14027 -0
  74. swh/web/static/jssources/datatables.net-fixedheader-bs5/node_modules/datatables.net/js/dataTables.mjs +14027 -0
  75. swh/web/static/jssources/datatables.net-fixedheader-bs5/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.mjs +81 -0
  76. swh/web/static/jssources/dompurify/dist/purify.es.mjs +35 -12
  77. swh/web/static/jssources/highlightjs-line-numbers.js/src/highlightjs-line-numbers.js +1 -1
  78. swh/web/static/jssources/highlightjs-macaulay2/dist/macaulay2.min.js +3 -3
  79. swh/web/static/jssources/jslicenses.json +1 -1
  80. swh/web/static/jssources/pdfjs-dist/build/pdf.worker.mjs +885 -596
  81. swh/web/static/jssources/pdfjs-dist/legacy/build/pdf.mjs +4982 -4566
  82. swh/web/static/jssources/swh/web/badges/assets/index.js +40 -14
  83. swh/web/static/jssources/swh/web/browse/assets/browse/sidetabs.js +3 -16
  84. swh/web/static/jssources/swh/web/save_code_now/assets/origin-save-admin.js +5 -2
  85. swh/web/static/jssources/swh/web/save_code_now/assets/origin-save.js +9 -4
  86. swh/web/static/jssources/swh/web/vault/assets/vault-ui.js +6 -4
  87. swh/web/static/jssources/swh/web/webapp/assets/webapp/webapp-utils.js +18 -1
  88. swh/web/static/security.txt +3 -0
  89. swh/web/static/webpack-stats.json +240 -235
  90. swh/web/tests/views.py +9 -8
  91. swh/web/utils/archive.py +1 -1
  92. swh/web/utils/swh_templatetags.py +8 -13
  93. swh/web/vault/assets/vault-ui.js +6 -4
  94. swh/web/webapp/assets/webapp/webapp-utils.js +18 -1
  95. swh/web/webapp/assets/webapp/webapp.css +8 -0
  96. swh/web/webapp/templates/layout.html +13 -10
  97. swh/web/webapp/tests/test_views.py +16 -1
  98. {swh_web-0.16.2.dist-info → swh_web-0.16.4.dist-info}/METADATA +2 -3
  99. {swh_web-0.16.2.dist-info → swh_web-0.16.4.dist-info}/RECORD +112 -107
  100. swh/web/static/css/archive_coverage.70eba3d32ed75472d638.css.map +0 -1
  101. swh/web/static/css/browse.0a250d3b07ce628588a5.css +0 -2
  102. swh/web/static/css/browse.0a250d3b07ce628588a5.css.map +0 -1
  103. swh/web/static/css/guided_tour.62c03630e944b8b8d9ad.css +0 -2
  104. swh/web/static/css/highlightjs.0c1b181eb006699a4c3e.css.map +0 -1
  105. swh/web/static/css/origin_visits.88099d68a63f86af2f8e.css +0 -2
  106. swh/web/static/css/origin_visits.88099d68a63f86af2f8e.css.map +0 -1
  107. swh/web/static/css/vendors.1cfc8080eed63af482cf.css +0 -24
  108. swh/web/static/css/vendors.1cfc8080eed63af482cf.css.map +0 -1
  109. swh/web/static/css/webapp.4655323082740f1a4862.css.map +0 -1
  110. swh/web/static/js/add_forge_now.e25d1ad2ab6c45e60b67.js +0 -3
  111. swh/web/static/js/add_forge_now.e25d1ad2ab6c45e60b67.js.map +0 -1
  112. swh/web/static/js/auth.bd2f475f49caa9f84e99.js +0 -3
  113. swh/web/static/js/auth.bd2f475f49caa9f84e99.js.map +0 -1
  114. swh/web/static/js/badges.f02607179ad0264e7522.js +0 -2
  115. swh/web/static/js/badges.f02607179ad0264e7522.js.map +0 -1
  116. swh/web/static/js/browse.fc5d5fafca71e03d2add.js +0 -3
  117. swh/web/static/js/browse.fc5d5fafca71e03d2add.js.map +0 -1
  118. swh/web/static/js/highlightjs.dc9b8354c69d942fad33.js.map +0 -1
  119. swh/web/static/js/mailmap.631c53127ba5511ebda7.js +0 -3
  120. swh/web/static/js/mailmap.631c53127ba5511ebda7.js.map +0 -1
  121. swh/web/static/js/pdfjs.40675676ebcbdde8baab.js +0 -3
  122. swh/web/static/js/pdfjs.40675676ebcbdde8baab.js.map +0 -1
  123. swh/web/static/js/revision.ac9293e1b984b4d4d909.js.map +0 -1
  124. swh/web/static/js/save_code_now.369ff7f28aaf74e7728e.js +0 -3
  125. swh/web/static/js/save_code_now.369ff7f28aaf74e7728e.js.map +0 -1
  126. swh/web/static/js/vault.1229427aed95c78d4ee2.js +0 -3
  127. swh/web/static/js/vault.1229427aed95c78d4ee2.js.map +0 -1
  128. swh/web/static/js/vendors.2eeadf2e0831a7a82b6d.js +0 -3
  129. swh/web/static/js/vendors.2eeadf2e0831a7a82b6d.js.map +0 -1
  130. swh/web/static/js/webapp.26efc059a8f5fe204240.js +0 -3
  131. swh/web/static/js/webapp.26efc059a8f5fe204240.js.map +0 -1
  132. /swh/web/static/js/{add_forge_now.e25d1ad2ab6c45e60b67.js.LICENSE.txt → add_forge_now.e85d09463e38c1e19632.js.LICENSE.txt} +0 -0
  133. /swh/web/static/js/{auth.bd2f475f49caa9f84e99.js.LICENSE.txt → auth.06c697ab58b81d08ebce.js.LICENSE.txt} +0 -0
  134. /swh/web/static/js/{browse.fc5d5fafca71e03d2add.js.LICENSE.txt → browse.3f22819b69002c8b6407.js.LICENSE.txt} +0 -0
  135. /swh/web/static/js/{highlightjs.dc9b8354c69d942fad33.js.LICENSE.txt → highlightjs.516e784a1e62011c7605.js.LICENSE.txt} +0 -0
  136. /swh/web/static/js/{mailmap.631c53127ba5511ebda7.js.LICENSE.txt → mailmap.de04f685e56eff5b627f.js.LICENSE.txt} +0 -0
  137. /swh/web/static/js/{pdfjs.40675676ebcbdde8baab.js.LICENSE.txt → pdfjs.018d9890c044b3612ece.js.LICENSE.txt} +0 -0
  138. /swh/web/static/js/{revision.ac9293e1b984b4d4d909.js.LICENSE.txt → revision.122a31614a5f9abffc3c.js.LICENSE.txt} +0 -0
  139. /swh/web/static/js/{save_code_now.369ff7f28aaf74e7728e.js.LICENSE.txt → save_code_now.d4d8fc47420a4badb683.js.LICENSE.txt} +0 -0
  140. /swh/web/static/js/{vault.1229427aed95c78d4ee2.js.LICENSE.txt → vault.d2ec3dd1d84a8d038a6c.js.LICENSE.txt} +0 -0
  141. {swh_web-0.16.2.dist-info → swh_web-0.16.4.dist-info}/WHEEL +0 -0
  142. {swh_web-0.16.2.dist-info → swh_web-0.16.4.dist-info}/licenses/AUTHORS +0 -0
  143. {swh_web-0.16.2.dist-info → swh_web-0.16.4.dist-info}/licenses/LICENSE +0 -0
  144. {swh_web-0.16.2.dist-info → swh_web-0.16.4.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"js/revision.ac9293e1b984b4d4d909.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBA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EiD,EAAgBjD,GAAS,KAE1BiD,EAAgBjD,GAAW,CAG7B,EAEI4D,EAAqBhkB,KAAsB,gBAAIA,KAAsB,iBAAK,GAC9EgkB,EAAmBpC,QAAQ+B,EAAqBvH,KAAK,KAAM,IAC3D4H,EAAmB/d,KAAO0d,EAAqBvH,KAAK,KAAM4H,EAAmB/d,KAAKmW,KAAK4H,G","sources":["webpack://swh/webpack/universalModuleDefinition","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorKeys.js","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://swh/./node_modules/waypoints/lib/jquery.waypoints.js","webpack://swh/./assets/src/utils/functions.js","webpack://swh/./swh/web/browse/assets/revision/diff-panel.ejs","webpack://swh/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://swh/./swh/web/browse/assets/revision/diff-utils.js","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js","webpack://swh/./node_modules/@babel/runtime/helpers/regenerator.js","webpack://swh/./node_modules/js-cookie/dist/js.cookie.mjs","webpack://swh/./assets/src/utils/constants.js","webpack://swh/./node_modules/@babel/runtime/helpers/OverloadYield.js","webpack://swh/./swh/web/browse/assets/revision/log-utils.js","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorValues.js","webpack://swh/./node_modules/@babel/runtime/regenerator/index.js","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorAsync.js","webpack://swh/./node_modules/@babel/runtime/helpers/typeof.js","webpack://swh/./node_modules/@babel/runtime/helpers/regeneratorDefine.js","webpack://swh/webpack/bootstrap","webpack://swh/webpack/runtime/load script","webpack://swh/webpack/runtime/compat get default export","webpack://swh/webpack/runtime/define property getters","webpack://swh/webpack/runtime/ensure chunk","webpack://swh/webpack/runtime/get javascript chunk filename","webpack://swh/webpack/runtime/get mini-css chunk filename","webpack://swh/webpack/runtime/global","webpack://swh/webpack/runtime/hasOwnProperty shorthand","webpack://swh/webpack/runtime/make namespace object","webpack://swh/webpack/runtime/publicPath","webpack://swh/webpack/runtime/css loading","webpack://swh/webpack/runtime/jsonp chunk loading"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"swh\"] = factory();\n\telse\n\t\troot[\"swh\"] = root[\"swh\"] || {}, root[\"swh\"][\"revision\"] = factory();\n})(self, function() {\nreturn ","var regenerator = require(\"./regenerator.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nfunction _regeneratorAsyncGen(r, e, t, o, n) {\n return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);\n}\nmodule.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorKeys(e) {\n var n = Object(e),\n r = [];\n for (var t in n) r.unshift(t);\n return function e() {\n for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;\n return e.done = !0, e;\n };\n}\nmodule.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regenerator = require(\"./regenerator.js\");\nvar regeneratorAsync = require(\"./regeneratorAsync.js\");\nvar regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nvar regeneratorKeys = require(\"./regeneratorKeys.js\");\nvar regeneratorValues = require(\"./regeneratorValues.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n var r = regenerator(),\n e = r.m(_regeneratorRuntime),\n t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;\n function n(r) {\n var e = \"function\" == typeof r && r.constructor;\n return !!e && (e === t || \"GeneratorFunction\" === (e.displayName || e.name));\n }\n var o = {\n \"throw\": 1,\n \"return\": 2,\n \"break\": 3,\n \"continue\": 3\n };\n function a(r) {\n var e, t;\n return function (n) {\n e || (e = {\n stop: function stop() {\n return t(n.a, 2);\n },\n \"catch\": function _catch() {\n return n.v;\n },\n abrupt: function abrupt(r, e) {\n return t(n.a, o[r], e);\n },\n delegateYield: function delegateYield(r, o, a) {\n return e.resultName = o, t(n.d, regeneratorValues(r), a);\n },\n finish: function finish(r) {\n return t(n.f, r);\n }\n }, t = function t(r, _t, o) {\n n.p = e.prev, n.n = e.next;\n try {\n return r(_t, o);\n } finally {\n e.next = n.n;\n }\n }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;\n try {\n return r.call(this, e);\n } finally {\n n.p = e.prev, n.n = e.next;\n }\n };\n }\n return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return {\n wrap: function wrap(e, t, n, o) {\n return r.w(a(e), t, n, o && o.reverse());\n },\n isGeneratorFunction: n,\n mark: r.m,\n awrap: function awrap(r, e) {\n return new OverloadYield(r, e);\n },\n AsyncIterator: regeneratorAsyncIterator,\n async: function async(r, e, t, o, u) {\n return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);\n },\n keys: regeneratorKeys,\n values: regeneratorValues\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*!\nWaypoints - 4.0.1\nCopyright © 2011-2016 Caleb Troughton\nLicensed under the MIT license.\nhttps://github.com/imakewebthings/waypoints/blob/master/licenses.txt\n*/\n(function() {\n 'use strict'\n\n var keyCounter = 0\n var allWaypoints = {}\n\n /* http://imakewebthings.com/waypoints/api/waypoint */\n function Waypoint(options) {\n if (!options) {\n throw new Error('No options passed to Waypoint constructor')\n }\n if (!options.element) {\n throw new Error('No element option passed to Waypoint constructor')\n }\n if (!options.handler) {\n throw new Error('No handler option passed to Waypoint constructor')\n }\n\n this.key = 'waypoint-' + keyCounter\n this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)\n this.element = this.options.element\n this.adapter = new Waypoint.Adapter(this.element)\n this.callback = options.handler\n this.axis = this.options.horizontal ? 'horizontal' : 'vertical'\n this.enabled = this.options.enabled\n this.triggerPoint = null\n this.group = Waypoint.Group.findOrCreate({\n name: this.options.group,\n axis: this.axis\n })\n this.context = Waypoint.Context.findOrCreateByElement(this.options.context)\n\n if (Waypoint.offsetAliases[this.options.offset]) {\n this.options.offset = Waypoint.offsetAliases[this.options.offset]\n }\n this.group.add(this)\n this.context.add(this)\n allWaypoints[this.key] = this\n keyCounter += 1\n }\n\n /* Private */\n Waypoint.prototype.queueTrigger = function(direction) {\n this.group.queueTrigger(this, direction)\n }\n\n /* Private */\n Waypoint.prototype.trigger = function(args) {\n if (!this.enabled) {\n return\n }\n if (this.callback) {\n this.callback.apply(this, args)\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/destroy */\n Waypoint.prototype.destroy = function() {\n this.context.remove(this)\n this.group.remove(this)\n delete allWaypoints[this.key]\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/disable */\n Waypoint.prototype.disable = function() {\n this.enabled = false\n return this\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/enable */\n Waypoint.prototype.enable = function() {\n this.context.refresh()\n this.enabled = true\n return this\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/next */\n Waypoint.prototype.next = function() {\n return this.group.next(this)\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/previous */\n Waypoint.prototype.previous = function() {\n return this.group.previous(this)\n }\n\n /* Private */\n Waypoint.invokeAll = function(method) {\n var allWaypointsArray = []\n for (var waypointKey in allWaypoints) {\n allWaypointsArray.push(allWaypoints[waypointKey])\n }\n for (var i = 0, end = allWaypointsArray.length; i < end; i++) {\n allWaypointsArray[i][method]()\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/destroy-all */\n Waypoint.destroyAll = function() {\n Waypoint.invokeAll('destroy')\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/disable-all */\n Waypoint.disableAll = function() {\n Waypoint.invokeAll('disable')\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/enable-all */\n Waypoint.enableAll = function() {\n Waypoint.Context.refreshAll()\n for (var waypointKey in allWaypoints) {\n allWaypoints[waypointKey].enabled = true\n }\n return this\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/refresh-all */\n Waypoint.refreshAll = function() {\n Waypoint.Context.refreshAll()\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/viewport-height */\n Waypoint.viewportHeight = function() {\n return window.innerHeight || document.documentElement.clientHeight\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/viewport-width */\n Waypoint.viewportWidth = function() {\n return document.documentElement.clientWidth\n }\n\n Waypoint.adapters = []\n\n Waypoint.defaults = {\n context: window,\n continuous: true,\n enabled: true,\n group: 'default',\n horizontal: false,\n offset: 0\n }\n\n Waypoint.offsetAliases = {\n 'bottom-in-view': function() {\n return this.context.innerHeight() - this.adapter.outerHeight()\n },\n 'right-in-view': function() {\n return this.context.innerWidth() - this.adapter.outerWidth()\n }\n }\n\n window.Waypoint = Waypoint\n}())\n;(function() {\n 'use strict'\n\n function requestAnimationFrameShim(callback) {\n window.setTimeout(callback, 1000 / 60)\n }\n\n var keyCounter = 0\n var contexts = {}\n var Waypoint = window.Waypoint\n var oldWindowLoad = window.onload\n\n /* http://imakewebthings.com/waypoints/api/context */\n function Context(element) {\n this.element = element\n this.Adapter = Waypoint.Adapter\n this.adapter = new this.Adapter(element)\n this.key = 'waypoint-context-' + keyCounter\n this.didScroll = false\n this.didResize = false\n this.oldScroll = {\n x: this.adapter.scrollLeft(),\n y: this.adapter.scrollTop()\n }\n this.waypoints = {\n vertical: {},\n horizontal: {}\n }\n\n element.waypointContextKey = this.key\n contexts[element.waypointContextKey] = this\n keyCounter += 1\n if (!Waypoint.windowContext) {\n Waypoint.windowContext = true\n Waypoint.windowContext = new Context(window)\n }\n\n this.createThrottledScrollHandler()\n this.createThrottledResizeHandler()\n }\n\n /* Private */\n Context.prototype.add = function(waypoint) {\n var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'\n this.waypoints[axis][waypoint.key] = waypoint\n this.refresh()\n }\n\n /* Private */\n Context.prototype.checkEmpty = function() {\n var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)\n var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)\n var isWindow = this.element == this.element.window\n if (horizontalEmpty && verticalEmpty && !isWindow) {\n this.adapter.off('.waypoints')\n delete contexts[this.key]\n }\n }\n\n /* Private */\n Context.prototype.createThrottledResizeHandler = function() {\n var self = this\n\n function resizeHandler() {\n self.handleResize()\n self.didResize = false\n }\n\n this.adapter.on('resize.waypoints', function() {\n if (!self.didResize) {\n self.didResize = true\n Waypoint.requestAnimationFrame(resizeHandler)\n }\n })\n }\n\n /* Private */\n Context.prototype.createThrottledScrollHandler = function() {\n var self = this\n function scrollHandler() {\n self.handleScroll()\n self.didScroll = false\n }\n\n this.adapter.on('scroll.waypoints', function() {\n if (!self.didScroll || Waypoint.isTouch) {\n self.didScroll = true\n Waypoint.requestAnimationFrame(scrollHandler)\n }\n })\n }\n\n /* Private */\n Context.prototype.handleResize = function() {\n Waypoint.Context.refreshAll()\n }\n\n /* Private */\n Context.prototype.handleScroll = function() {\n var triggeredGroups = {}\n var axes = {\n horizontal: {\n newScroll: this.adapter.scrollLeft(),\n oldScroll: this.oldScroll.x,\n forward: 'right',\n backward: 'left'\n },\n vertical: {\n newScroll: this.adapter.scrollTop(),\n oldScroll: this.oldScroll.y,\n forward: 'down',\n backward: 'up'\n }\n }\n\n for (var axisKey in axes) {\n var axis = axes[axisKey]\n var isForward = axis.newScroll > axis.oldScroll\n var direction = isForward ? axis.forward : axis.backward\n\n for (var waypointKey in this.waypoints[axisKey]) {\n var waypoint = this.waypoints[axisKey][waypointKey]\n if (waypoint.triggerPoint === null) {\n continue\n }\n var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint\n var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint\n var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint\n var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint\n if (crossedForward || crossedBackward) {\n waypoint.queueTrigger(direction)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n }\n }\n\n for (var groupKey in triggeredGroups) {\n triggeredGroups[groupKey].flushTriggers()\n }\n\n this.oldScroll = {\n x: axes.horizontal.newScroll,\n y: axes.vertical.newScroll\n }\n }\n\n /* Private */\n Context.prototype.innerHeight = function() {\n /*eslint-disable eqeqeq */\n if (this.element == this.element.window) {\n return Waypoint.viewportHeight()\n }\n /*eslint-enable eqeqeq */\n return this.adapter.innerHeight()\n }\n\n /* Private */\n Context.prototype.remove = function(waypoint) {\n delete this.waypoints[waypoint.axis][waypoint.key]\n this.checkEmpty()\n }\n\n /* Private */\n Context.prototype.innerWidth = function() {\n /*eslint-disable eqeqeq */\n if (this.element == this.element.window) {\n return Waypoint.viewportWidth()\n }\n /*eslint-enable eqeqeq */\n return this.adapter.innerWidth()\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-destroy */\n Context.prototype.destroy = function() {\n var allWaypoints = []\n for (var axis in this.waypoints) {\n for (var waypointKey in this.waypoints[axis]) {\n allWaypoints.push(this.waypoints[axis][waypointKey])\n }\n }\n for (var i = 0, end = allWaypoints.length; i < end; i++) {\n allWaypoints[i].destroy()\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-refresh */\n Context.prototype.refresh = function() {\n /*eslint-disable eqeqeq */\n var isWindow = this.element == this.element.window\n /*eslint-enable eqeqeq */\n var contextOffset = isWindow ? undefined : this.adapter.offset()\n var triggeredGroups = {}\n var axes\n\n this.handleScroll()\n axes = {\n horizontal: {\n contextOffset: isWindow ? 0 : contextOffset.left,\n contextScroll: isWindow ? 0 : this.oldScroll.x,\n contextDimension: this.innerWidth(),\n oldScroll: this.oldScroll.x,\n forward: 'right',\n backward: 'left',\n offsetProp: 'left'\n },\n vertical: {\n contextOffset: isWindow ? 0 : contextOffset.top,\n contextScroll: isWindow ? 0 : this.oldScroll.y,\n contextDimension: this.innerHeight(),\n oldScroll: this.oldScroll.y,\n forward: 'down',\n backward: 'up',\n offsetProp: 'top'\n }\n }\n\n for (var axisKey in axes) {\n var axis = axes[axisKey]\n for (var waypointKey in this.waypoints[axisKey]) {\n var waypoint = this.waypoints[axisKey][waypointKey]\n var adjustment = waypoint.options.offset\n var oldTriggerPoint = waypoint.triggerPoint\n var elementOffset = 0\n var freshWaypoint = oldTriggerPoint == null\n var contextModifier, wasBeforeScroll, nowAfterScroll\n var triggeredBackward, triggeredForward\n\n if (waypoint.element !== waypoint.element.window) {\n elementOffset = waypoint.adapter.offset()[axis.offsetProp]\n }\n\n if (typeof adjustment === 'function') {\n adjustment = adjustment.apply(waypoint)\n }\n else if (typeof adjustment === 'string') {\n adjustment = parseFloat(adjustment)\n if (waypoint.options.offset.indexOf('%') > - 1) {\n adjustment = Math.ceil(axis.contextDimension * adjustment / 100)\n }\n }\n\n contextModifier = axis.contextScroll - axis.contextOffset\n waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment)\n wasBeforeScroll = oldTriggerPoint < axis.oldScroll\n nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll\n triggeredBackward = wasBeforeScroll && nowAfterScroll\n triggeredForward = !wasBeforeScroll && !nowAfterScroll\n\n if (!freshWaypoint && triggeredBackward) {\n waypoint.queueTrigger(axis.backward)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n else if (!freshWaypoint && triggeredForward) {\n waypoint.queueTrigger(axis.forward)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {\n waypoint.queueTrigger(axis.forward)\n triggeredGroups[waypoint.group.id] = waypoint.group\n }\n }\n }\n\n Waypoint.requestAnimationFrame(function() {\n for (var groupKey in triggeredGroups) {\n triggeredGroups[groupKey].flushTriggers()\n }\n })\n\n return this\n }\n\n /* Private */\n Context.findOrCreateByElement = function(element) {\n return Context.findByElement(element) || new Context(element)\n }\n\n /* Private */\n Context.refreshAll = function() {\n for (var contextId in contexts) {\n contexts[contextId].refresh()\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/context-find-by-element */\n Context.findByElement = function(element) {\n return contexts[element.waypointContextKey]\n }\n\n window.onload = function() {\n if (oldWindowLoad) {\n oldWindowLoad()\n }\n Context.refreshAll()\n }\n\n\n Waypoint.requestAnimationFrame = function(callback) {\n var requestFn = window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n requestAnimationFrameShim\n requestFn.call(window, callback)\n }\n Waypoint.Context = Context\n}())\n;(function() {\n 'use strict'\n\n function byTriggerPoint(a, b) {\n return a.triggerPoint - b.triggerPoint\n }\n\n function byReverseTriggerPoint(a, b) {\n return b.triggerPoint - a.triggerPoint\n }\n\n var groups = {\n vertical: {},\n horizontal: {}\n }\n var Waypoint = window.Waypoint\n\n /* http://imakewebthings.com/waypoints/api/group */\n function Group(options) {\n this.name = options.name\n this.axis = options.axis\n this.id = this.name + '-' + this.axis\n this.waypoints = []\n this.clearTriggerQueues()\n groups[this.axis][this.name] = this\n }\n\n /* Private */\n Group.prototype.add = function(waypoint) {\n this.waypoints.push(waypoint)\n }\n\n /* Private */\n Group.prototype.clearTriggerQueues = function() {\n this.triggerQueues = {\n up: [],\n down: [],\n left: [],\n right: []\n }\n }\n\n /* Private */\n Group.prototype.flushTriggers = function() {\n for (var direction in this.triggerQueues) {\n var waypoints = this.triggerQueues[direction]\n var reverse = direction === 'up' || direction === 'left'\n waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)\n for (var i = 0, end = waypoints.length; i < end; i += 1) {\n var waypoint = waypoints[i]\n if (waypoint.options.continuous || i === waypoints.length - 1) {\n waypoint.trigger([direction])\n }\n }\n }\n this.clearTriggerQueues()\n }\n\n /* Private */\n Group.prototype.next = function(waypoint) {\n this.waypoints.sort(byTriggerPoint)\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)\n var isLast = index === this.waypoints.length - 1\n return isLast ? null : this.waypoints[index + 1]\n }\n\n /* Private */\n Group.prototype.previous = function(waypoint) {\n this.waypoints.sort(byTriggerPoint)\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)\n return index ? this.waypoints[index - 1] : null\n }\n\n /* Private */\n Group.prototype.queueTrigger = function(waypoint, direction) {\n this.triggerQueues[direction].push(waypoint)\n }\n\n /* Private */\n Group.prototype.remove = function(waypoint) {\n var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)\n if (index > -1) {\n this.waypoints.splice(index, 1)\n }\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/first */\n Group.prototype.first = function() {\n return this.waypoints[0]\n }\n\n /* Public */\n /* http://imakewebthings.com/waypoints/api/last */\n Group.prototype.last = function() {\n return this.waypoints[this.waypoints.length - 1]\n }\n\n /* Private */\n Group.findOrCreate = function(options) {\n return groups[options.axis][options.name] || new Group(options)\n }\n\n Waypoint.Group = Group\n}())\n;(function() {\n 'use strict'\n\n var $ = window.jQuery\n var Waypoint = window.Waypoint\n\n function JQueryAdapter(element) {\n this.$element = $(element)\n }\n\n $.each([\n 'innerHeight',\n 'innerWidth',\n 'off',\n 'offset',\n 'on',\n 'outerHeight',\n 'outerWidth',\n 'scrollLeft',\n 'scrollTop'\n ], function(i, method) {\n JQueryAdapter.prototype[method] = function() {\n var args = Array.prototype.slice.call(arguments)\n return this.$element[method].apply(this.$element, args)\n }\n })\n\n $.each([\n 'extend',\n 'inArray',\n 'isEmptyObject'\n ], function(i, method) {\n JQueryAdapter[method] = $[method]\n })\n\n Waypoint.adapters.push({\n name: 'jquery',\n Adapter: JQueryAdapter\n })\n Waypoint.Adapter = JQueryAdapter\n}())\n;(function() {\n 'use strict'\n\n var Waypoint = window.Waypoint\n\n function createExtension(framework) {\n return function() {\n var waypoints = []\n var overrides = arguments[0]\n\n if (framework.isFunction(arguments[0])) {\n overrides = framework.extend({}, arguments[1])\n overrides.handler = arguments[0]\n }\n\n this.each(function() {\n var options = framework.extend({}, overrides, {\n element: this\n })\n if (typeof options.context === 'string') {\n options.context = framework(this).closest(options.context)[0]\n }\n waypoints.push(new Waypoint(options))\n })\n\n return waypoints\n }\n }\n\n if (window.jQuery) {\n window.jQuery.fn.waypoint = createExtension(window.jQuery)\n }\n if (window.Zepto) {\n window.Zepto.fn.waypoint = createExtension(window.Zepto)\n }\n}())\n;","/**\n * Copyright (C) 2018-2025 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\n// utility functions\n\nimport Cookies from 'js-cookie';\n\nexport function handleFetchError(response) {\n if (!response.ok) {\n throw response;\n }\n return response;\n}\n\nexport function handleFetchErrors(responses) {\n for (let i = 0; i < responses.length; ++i) {\n if (!responses[i].ok) {\n throw responses[i];\n }\n }\n return responses;\n}\n\nexport function errorMessageFromResponse(errorData, defaultMessage) {\n let errorMessage = '';\n try {\n const reason = JSON.parse(errorData['reason']);\n Object.entries(reason).forEach((keys, _) => {\n const key = keys[0];\n const message = keys[1][0]; // take only the first issue\n errorMessage += `\\n${key}: ${message}`;\n });\n } catch (_) {\n errorMessage = errorData['reason']; // can't parse it, leave it raw\n }\n return errorMessage ? `Error: ${errorMessage}` : defaultMessage;\n}\n\nexport function staticAsset(asset, origin) {\n let url = `${__STATIC__}${asset}`;\n if (url.startsWith('/') && origin) {\n url = origin + url;\n }\n return url;\n}\n\nexport function csrfPost(url, headers = {}, body = null) {\n headers['X-CSRFToken'] = Cookies.get('csrftoken');\n return fetch(url, {\n credentials: 'include',\n headers: headers,\n method: 'POST',\n body: body\n });\n}\n\nexport function isGitRepoUrl(url, pathPrefix = '/') {\n const allowedProtocols = ['http:', 'https:', 'git:'];\n if (allowedProtocols.find(protocol => protocol === url.protocol) === undefined) {\n return false;\n }\n if (!url.pathname.startsWith(pathPrefix)) {\n return false;\n }\n const re = new RegExp('[\\\\w\\\\.-]+\\\\/?(?!=.git)(?:\\\\.git\\\\/?)?$');\n return re.test(url.pathname.slice(pathPrefix.length));\n};\n\nexport function removeUrlFragment() {\n history.replaceState('', document.title, window.location.pathname + window.location.search);\n}\n\nexport function selectText(startNode, endNode) {\n const selection = window.getSelection();\n selection.removeAllRanges();\n const range = document.createRange();\n range.setStart(startNode, 0);\n if (endNode.nodeName !== '#text') {\n range.setEnd(endNode, endNode.childNodes.length);\n } else {\n range.setEnd(endNode, endNode.textContent.length);\n }\n selection.addRange(range);\n}\n\nexport function textToHTML(text) {\n const textArea = document.createElement('textarea');\n textArea.innerText = text;\n return textArea.innerHTML;\n}\n\nexport function htmlAlert(type, message, closable = false) {\n let closeButton = '';\n let extraClasses = '';\n if (closable) {\n closeButton =\n `<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>`;\n extraClasses = 'alert-dismissible';\n }\n return `<div class=\"alert alert-${type} ${extraClasses}\" role=\"alert\">${message}${closeButton}</div>`;\n}\n\nexport function validateUrl(url, allowedProtocols = []) {\n let originUrl = null;\n let validUrl = true;\n\n try {\n originUrl = new URL(url);\n } catch (TypeError) {\n validUrl = false;\n }\n\n if (validUrl && allowedProtocols.length) {\n validUrl = (\n allowedProtocols.find(protocol => protocol === originUrl.protocol) !== undefined\n );\n }\n\n return validUrl ? originUrl : null;\n}\n\nexport async function isArchivedOrigin(originPath, visitType) {\n if (!validateUrl(originPath)) {\n // Not a valid URL, return immediately\n return false;\n } else {\n let url = `${Urls.api_1_origin_visit_latest(originPath)}?require_snapshot=true`;\n if (visitType && visitType !== 'any') {\n url += `&visit_type=${visitType}`;\n }\n const response = await fetch(url);\n return response.ok;\n }\n}\n\nasync function getCanonicalGithubOriginURL(ownerRepo) {\n const ghApiResponse = await fetch(`https://api.github.com/repos/${ownerRepo}`);\n if (ghApiResponse.ok && ghApiResponse.status === 200) {\n const ghApiResponseData = await ghApiResponse.json();\n return ghApiResponseData.html_url;\n }\n}\n\nexport async function getCanonicalOriginURL(originUrl) {\n let originUrlLower = originUrl.toLowerCase();\n // github.com URL processing\n const ghUrlRegex = /^http[s]*:\\/\\/github.com\\//;\n if (originUrlLower.match(ghUrlRegex)) {\n // remove trailing .git\n if (originUrlLower.endsWith('.git')) {\n originUrlLower = originUrlLower.slice(0, -4);\n }\n // remove trailing slash\n if (originUrlLower.endsWith('/')) {\n originUrlLower = originUrlLower.slice(0, -1);\n }\n // extract {owner}/{repo}\n const ownerRepo = originUrlLower.replace(ghUrlRegex, '');\n // fetch canonical URL from github Web API\n const url = await getCanonicalGithubOriginURL(ownerRepo);\n if (url) {\n return url;\n }\n }\n\n const ghpagesUrlRegex = /^http[s]*:\\/\\/(?<owner>[^/]+).github.io\\/(?<repo>[^/]+)\\/?.*/;\n const parsedUrl = originUrlLower.match(ghpagesUrlRegex);\n if (parsedUrl) {\n const ownerRepo = `${parsedUrl.groups.owner}/${parsedUrl.groups.repo}`;\n // fetch canonical URL from github Web API\n const url = await getCanonicalGithubOriginURL(ownerRepo);\n if (url) {\n return url;\n }\n }\n\n return originUrl;\n}\n\nexport function getHumanReadableDate(data) {\n // Display iso format date string into a human readable date\n // This is expected to be used by date field in datatable listing views\n // Example: 3/24/2022, 10:31:08 AM\n const date = new Date(data);\n return date.toLocaleString();\n}\n\nexport function genLink(sanitizedUrl, type, openInNewTab = false, linkText = '') {\n // Display link. It's up to the caller to sanitize sanitizedUrl first.\n if (type === 'display' && sanitizedUrl) {\n const encodedSanitizedUrl = encodeURI(sanitizedUrl);\n if (!linkText) {\n linkText = encodedSanitizedUrl;\n }\n let attrs = '';\n if (openInNewTab) {\n attrs = 'target=\"_blank\" rel=\"noopener noreferrer\"';\n }\n return `<a href=\"${encodedSanitizedUrl}\" ${attrs}>${linkText}</a>`;\n }\n return sanitizedUrl;\n}\n","module.exports = function anonymous(locals, escapeFn, include, rethrow\n) {\nescapeFn = escapeFn || function (markup) {\n return markup == undefined\n ? ''\n : String(markup)\n .replace(_MATCH_HTML, encode_char);\n};\nvar _ENCODE_HTML_RULES = {\n \"&\": \"&amp;\"\n , \"<\": \"&lt;\"\n , \">\": \"&gt;\"\n , '\"': \"&#34;\"\n , \"'\": \"&#39;\"\n }\n , _MATCH_HTML = /[&<>'\"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n};\n;\n var __output = \"\";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n with (locals || {}) {\n ; __append(\"\\n<div id=\\\"diff_\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" class=\\\"card swh-file-diff-panel\\\">\\n <div class=\\\"card-header swh-background-gray border-bottom-0\\\">\\n <a data-bs-toggle=\\\"collapse\\\" href=\\\"#diff_\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"_content\\\">\\n <div class=\\\"float-start swh-title-color\\\">\\n <strong>\")\n ; __append(escapeFn( diffPanelTitle ))\n ; __append(\"</strong>\\n </div>\\n </a>\\n <div class=\\\"ms-auto float-end\\\">\\n <div class=\\\"btn-group diff-styles\\\" role=\\\"group\\\" style=\\\"visibility: hidden;\\\">\\n <input type=\\\"radio\\\" class=\\\"btn-check\\\" name=\\\"diffs-switch-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" id=\\\"unified-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" autocomplete=\\\"off\\\" checked=\\\"checked\\\">\\n <label class=\\\"btn btn-secondary btn-sm unified-diff-button\\\" id=\\\"unified-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-label\\\" for=\\\"unified-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" onclick=\\\"swh.revision.showUnifiedDiff('\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"')\\\">\\n Unified\\n </label>\\n <input type=\\\"radio\\\" class=\\\"btn-check\\\" name=\\\"diffs-switch-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" id=\\\"side-by-side-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" autocomplete=\\\"off\\\">\\n <label class=\\\"btn btn-secondary btn-sm split-diff-button\\\" for=\\\"side-by-side-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" id=\\\"side-by-side-\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-label\\\" onclick=\\\"swh.revision.showSplitDiff('\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"')\\\">\\n Side-by-side\\n </label>\\n </div>\\n <a href=\\\"\")\n ; __append(escapeFn( diffData.content_url ))\n ; __append(\"\\\" class=\\\"btn btn-secondary btn-sm\\\" role=\\\"button\\\">View file</a>\\n </div>\\n <div class=\\\"clearfix\\\"></div>\\n </div>\\n <div id=\\\"diff_\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"_content\\\" class=\\\"collapse show\\\">\\n <div class=\\\"swh-diff-loading text-center\\\" id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-loading\\\" style=\\\"visibility: hidden;\\\">\\n <img src=\\\"\")\n ; __append(escapeFn( swhSpinnerSrc ))\n ; __append(\"\\\">\\n <p>Loading diff ...</p>\\n </div>\\n <div class=\\\"highlightjs swh-content\\\" style=\\\"display: none;\\\" id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-highlightjs\\\">\\n <div id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-unified-diff\\\">\\n <pre><code class=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\"></code></pre>\\n </div>\\n <div style=\\\"width: 100%; display: none;\\\" id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-split-diff\\\">\\n <pre class=\\\"float-start\\\" style=\\\"width: 50%;\\\"><code class=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-from\\\"></code></pre>\\n <pre style=\\\"width: 50%;\\\"><code class=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"\\\" id=\\\"\")\n ; __append(escapeFn( diffData.id ))\n ; __append(\"-to\\\"></code></pre>\\n </div>\\n </div>\\n </div>\\n</div>\")\n }\n return __output;\n\n}","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nexport { _asyncToGenerator as default };","/**\n * Copyright (C) 2018-2024 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\nimport 'waypoints/lib/jquery.waypoints';\n\nimport {swhSpinnerSrc} from 'utils/constants';\nimport {removeUrlFragment} from 'utils/functions';\n\nimport diffPanelTemplate from './diff-panel.ejs';\n\n// number of changed files in the revision\nlet changes = null;\nlet nbChangedFiles = 0;\n// to track the number of already computed files diffs\nlet nbDiffsComputed = 0;\n\nconst noNewLineMarker =\n '<span class=\"no-nl-marker\" style=\"color: red;\" title=\"No newline at end of file\">' +\n '<i class=\"mdi mdi-rotate-90 mdi-cancel\" aria-hidden=\"true\">' +\n '<i class=\"mdi mdi-keyboard-return\" aria-hidden=\"true\">' +\n '</span>';\n\n// to track the total number of added lines in files diffs\nlet nbAdditions = 0;\n// to track the total number of deleted lines in files diffs\nlet nbDeletions = 0;\n// to track the already computed diffs by id\nconst computedDiffs = {};\n// map a diff id to its computation url\nconst diffsUrls = {};\n// to keep track of diff lines to highlight\nlet startLines = null;\nlet endLines = null;\n// map max line numbers characters to diff\nconst diffMaxNumberChars = {};\n// focused diff for highlighting\nlet focusedDiff = null;\n// highlighting color\nconst lineHighlightColor = '#fdf3da';\n// might contain diff lines to highlight parsed from URL fragment\nlet selectedDiffLinesInfo;\n// URL fragment to append when switching to 'Changes' tab\nconst changesUrlFragment = '#swh-revision-changes';\n// current displayed tab name\nlet currentTabName = 'Files';\n\n// to check if a DOM element is in the viewport\nfunction isInViewport(elt) {\n const elementTop = $(elt).offset().top;\n const elementBottom = elementTop + $(elt).outerHeight();\n\n const viewportTop = $(window).scrollTop();\n const viewportBottom = viewportTop + $(window).height();\n\n return elementBottom > viewportTop && elementTop < viewportBottom;\n}\n\n// to format the diffs line numbers\nexport function formatDiffLineNumbers(diffId, fromLine, toLine) {\n const maxNumberChars = diffMaxNumberChars[diffId];\n const fromLineStr = toLnStr(fromLine);\n const toLineStr = toLnStr(toLine);\n let ret = '';\n for (let i = 0; i < (maxNumberChars - fromLineStr.length); ++i) {\n ret += ' ';\n }\n ret += fromLineStr;\n ret += ' ';\n for (let i = 0; i < (maxNumberChars - toLineStr.length); ++i) {\n ret += ' ';\n }\n ret += toLineStr;\n return ret;\n}\n\nfunction parseDiffHunkRangeIfAny(lineText) {\n let baseFromLine, baseToLine;\n if (lineText.startsWith('@@')) {\n const linesInfoRegExp = new RegExp(/^@@ -(\\d+),(\\d+) \\+(\\d+),(\\d+) @@$/gm);\n const linesInfoRegExp2 = new RegExp(/^@@ -(\\d+) \\+(\\d+),(\\d+) @@$/gm);\n const linesInfoRegExp3 = new RegExp(/^@@ -(\\d+),(\\d+) \\+(\\d+) @@$/gm);\n const linesInfoRegExp4 = new RegExp(/^@@ -(\\d+) \\+(\\d+) @@$/gm);\n const linesInfo = linesInfoRegExp.exec(lineText);\n const linesInfo2 = linesInfoRegExp2.exec(lineText);\n const linesInfo3 = linesInfoRegExp3.exec(lineText);\n const linesInfo4 = linesInfoRegExp4.exec(lineText);\n if (linesInfo) {\n baseFromLine = parseInt(linesInfo[1]) - 1;\n baseToLine = parseInt(linesInfo[3]) - 1;\n } else if (linesInfo2) {\n baseFromLine = parseInt(linesInfo2[1]) - 1;\n baseToLine = parseInt(linesInfo2[2]) - 1;\n } else if (linesInfo3) {\n baseFromLine = parseInt(linesInfo3[1]) - 1;\n baseToLine = parseInt(linesInfo3[3]) - 1;\n } else if (linesInfo4) {\n baseFromLine = parseInt(linesInfo4[1]) - 1;\n baseToLine = parseInt(linesInfo4[2]) - 1;\n }\n }\n if (baseFromLine !== undefined) {\n return [baseFromLine, baseToLine];\n } else {\n return null;\n }\n}\n\nfunction toLnInt(lnStr) {\n return lnStr ? parseInt(lnStr) : 0;\n};\n\nfunction toLnStr(lnInt) {\n return lnInt ? lnInt.toString() : '';\n};\n\n// parse diff line numbers to an int array [from, to]\nexport function parseDiffLineNumbers(lineNumbersStr, from, to) {\n let lines;\n if (!from && !to) {\n lines = lineNumbersStr.replace(/[ ]+/g, ' ').split(' ');\n if (lines.length > 2) {\n lines.shift();\n }\n lines = lines.map(x => toLnInt(x));\n } else {\n const lineNumber = toLnInt(lineNumbersStr.trim());\n if (from) {\n lines = [lineNumber, 0];\n } else if (to) {\n lines = [0, lineNumber];\n }\n }\n return lines;\n}\n\n// serialize selected line numbers range to string for URL fragment\nexport function selectedDiffLinesToFragment(startLines, endLines, unified) {\n let selectedLinesFragment = '';\n selectedLinesFragment += `F${startLines[0] || 0}`;\n selectedLinesFragment += `T${startLines[1] || 0}`;\n selectedLinesFragment += `-F${endLines[0] || 0}`;\n selectedLinesFragment += `T${endLines[1] || 0}`;\n if (unified) {\n selectedLinesFragment += '-unified';\n } else {\n selectedLinesFragment += '-split';\n }\n return selectedLinesFragment;\n}\n\n// parse selected lines from URL fragment\nexport function fragmentToSelectedDiffLines(fragment) {\n const RE_LINES = /F([0-9]+)T([0-9]+)-F([0-9]+)T([0-9]+)-([a-z]+)/;\n const matchObj = RE_LINES.exec(fragment);\n if (matchObj.length === 6) {\n return {\n startLines: [parseInt(matchObj[1]), parseInt(matchObj[2])],\n endLines: [parseInt(matchObj[3]), parseInt(matchObj[4])],\n unified: matchObj[5] === 'unified'\n };\n } else {\n return null;\n }\n}\n\n// function to highlight a single diff line\nfunction highlightDiffLine(diffId, i) {\n const line = $(`#${diffId} .hljs-ln-line[data-line-number=\"${i}\"]`);\n const lineNumbers = $(`#${diffId} .hljs-ln-numbers[data-line-number=\"${i}\"]`);\n lineNumbers.css('color', 'black');\n lineNumbers.css('font-weight', 'bold');\n line.css('background-color', lineHighlightColor);\n line.css('mix-blend-mode', 'multiply');\n return line;\n}\n\n// function to reset highlighting\nfunction resetHighlightedDiffLines(resetVars = true) {\n if (resetVars) {\n focusedDiff = null;\n startLines = null;\n endLines = null;\n }\n $('.hljs-ln-line[data-line-number]').css('background-color', 'initial');\n $('.hljs-ln-line[data-line-number]').css('mix-blend-mode', 'initial');\n $('.hljs-ln-numbers[data-line-number]').css('color', '#aaa');\n $('.hljs-ln-numbers[data-line-number]').css('font-weight', 'initial');\n if (currentTabName === 'Changes' && window.location.hash !== changesUrlFragment) {\n window.history.replaceState('', document.title,\n window.location.pathname + window.location.search + changesUrlFragment);\n }\n}\n\n// highlight lines in a diff, return first highlighted line numbers element\nfunction highlightDiffLines(diffId, startLines, endLines, unified) {\n let firstHighlightedLine;\n // unified diff case\n if (unified) {\n let start = formatDiffLineNumbers(diffId, startLines[0], startLines[1]);\n let end = formatDiffLineNumbers(diffId, endLines[0], endLines[1]);\n\n const startLine = $(`#${diffId} .hljs-ln-line[data-line-number=\"${start}\"]`);\n const endLine = $(`#${diffId} .hljs-ln-line[data-line-number=\"${end}\"]`);\n if ($(endLine).position().top < $(startLine).position().top) {\n [start, end] = [end, start];\n firstHighlightedLine = endLine;\n } else {\n firstHighlightedLine = startLine;\n }\n const lineTd = highlightDiffLine(diffId, start);\n let tr = $(lineTd).closest('tr');\n let lineNumbers = $(tr).children('.hljs-ln-line').data('line-number').toString();\n while (lineNumbers !== end) {\n if (lineNumbers.trim()) {\n highlightDiffLine(diffId, lineNumbers);\n }\n tr = $(tr).next();\n lineNumbers = $(tr).children('.hljs-ln-line').data('line-number').toString();\n }\n highlightDiffLine(diffId, end);\n\n // split diff case\n } else {\n // highlight only from part of the diff\n if (startLines[0] && endLines[0]) {\n const start = Math.min(startLines[0], endLines[0]);\n const end = Math.max(startLines[0], endLines[0]);\n for (let i = start; i <= end; ++i) {\n highlightDiffLine(`${diffId}-from`, i);\n }\n firstHighlightedLine = $(`#${diffId}-from .hljs-ln-line[data-line-number=\"${start}\"]`);\n // highlight only to part of the diff\n } else if (startLines[1] && endLines[1]) {\n const start = Math.min(startLines[1], endLines[1]);\n const end = Math.max(startLines[1], endLines[1]);\n for (let i = start; i <= end; ++i) {\n highlightDiffLine(`${diffId}-to`, i);\n }\n firstHighlightedLine = $(`#${diffId}-to .hljs-ln-line[data-line-number=\"${start}\"]`);\n // highlight both part of the diff\n } else {\n let left, right;\n if (startLines[0] && endLines[1]) {\n left = startLines[0];\n right = endLines[1];\n } else {\n left = endLines[0];\n right = startLines[1];\n }\n\n const leftLine = $(`#${diffId}-from .hljs-ln-line[data-line-number=\"${left}\"]`);\n const rightLine = $(`#${diffId}-to .hljs-ln-line[data-line-number=\"${right}\"]`);\n const leftLineAbove = $(leftLine).position().top < $(rightLine).position().top;\n\n if (leftLineAbove) {\n firstHighlightedLine = leftLine;\n } else {\n firstHighlightedLine = rightLine;\n }\n\n let fromTr = $(`#${diffId}-from tr`).first();\n let fromLn = $(fromTr).children('.hljs-ln-line').data('line-number');\n let toTr = $(`#${diffId}-to tr`).first();\n let toLn = $(toTr).children('.hljs-ln-line').data('line-number');\n let canHighlight = false;\n\n while (true) {\n if (leftLineAbove && fromLn === left) {\n canHighlight = true;\n } else if (!leftLineAbove && toLn === right) {\n canHighlight = true;\n }\n\n if (canHighlight && fromLn) {\n highlightDiffLine(`${diffId}-from`, fromLn);\n }\n\n if (canHighlight && toLn) {\n highlightDiffLine(`${diffId}-to`, toLn);\n }\n\n if ((leftLineAbove && toLn === right) || (!leftLineAbove && fromLn === left)) {\n break;\n }\n\n fromTr = $(fromTr).next();\n fromLn = $(fromTr).children('.hljs-ln-line').data('line-number');\n toTr = $(toTr).next();\n toLn = $(toTr).children('.hljs-ln-line').data('line-number');\n }\n\n }\n }\n\n const selectedLinesFragment = selectedDiffLinesToFragment(startLines, endLines, unified);\n window.location.hash = `diff_${diffId}+${selectedLinesFragment}`;\n return firstHighlightedLine;\n}\n\n// callback to switch from side-by-side diff to unified one\nexport function showUnifiedDiff(diffId) {\n $(`#${diffId}-split-diff`).css('display', 'none');\n $(`#${diffId}-unified-diff`).css('display', 'block');\n}\n\n// callback to switch from unified diff to side-by-side one\nexport function showSplitDiff(diffId) {\n $(`#${diffId}-unified-diff`).css('display', 'none');\n $(`#${diffId}-split-diff`).css('display', 'block');\n}\n\n// to compute diff and process it for display\nexport async function computeDiff(diffUrl, diffId) {\n\n // force diff computation ?\n const force = diffUrl.indexOf('force=true') !== -1;\n\n // it no forced computation and diff already computed, do nothing\n if (!force && computedDiffs.hasOwnProperty(diffId)) {\n return;\n }\n\n function setLineNumbers(lnElt, lineNumbers) {\n $(lnElt).attr('data-line-number', lineNumbers || '');\n $(lnElt).children().attr('data-line-number', lineNumbers || '');\n $(lnElt).siblings().attr('data-line-number', lineNumbers || '');\n }\n\n // mark diff computation as already requested\n computedDiffs[diffId] = true;\n\n $(`#${diffId}-loading`).css('visibility', 'visible');\n\n // set spinner visible while requesting diff\n $(`#${diffId}-loading`).css('display', 'block');\n $(`#${diffId}-highlightjs`).css('display', 'none');\n\n // request diff computation and process it\n const response = await fetch(diffUrl);\n const data = await response.json();\n\n // increment number of computed diffs\n ++nbDiffsComputed;\n // toggle the 'Compute all diffs' button if all diffs have been computed\n if (nbDiffsComputed === changes.length) {\n $('#swh-compute-all-diffs').addClass('active');\n }\n\n // Large diff (> threshold) are not automatically computed,\n // add a button to force its computation\n if (data.diff_str.indexOf('Large diff') === 0) {\n $(`#${diffId}`)[0].innerHTML = data.diff_str +\n `<br/><button class=\"btn btn-secondary btn-sm\" type=\"button\"\n onclick=\"swh.revision.computeDiff('${diffUrl}&force=true', '${diffId}')\">` +\n 'Request diff</button>';\n setDiffVisible(diffId);\n } else if (data.diff_str.indexOf('@@') !== 0) {\n $(`#${diffId}`).text(data.diff_str);\n setDiffVisible(diffId);\n } else {\n\n // prepare code highlighting\n $(`.${diffId}`).removeClass('plaintext');\n $(`.${diffId}`).addClass(data.language);\n\n // set unified diff text\n $(`#${diffId}`).text(data.diff_str);\n\n // code highlighting for unified diff\n $(`#${diffId}`).each((i, elt) => {\n hljs.highlightElement(elt);\n hljs.lineNumbersElementSync(elt);\n });\n\n // process unified diff lines in order to generate side-by-side diffs text\n // but also compute line numbers for unified and side-by-side diffs\n let baseFromLine = '';\n let baseToLine = '';\n const fromToLines = [];\n const fromLines = [];\n const toLines = [];\n let maxNumberChars = 0;\n let diffFromStr = '';\n let diffToStr = '';\n let linesOffset = 0;\n\n $(`#${diffId} .hljs-ln-numbers`).each((i, lnElt) => {\n const lnText = lnElt.nextSibling.innerText;\n const linesInfo = parseDiffHunkRangeIfAny(lnText);\n let fromLine = '';\n let toLine = '';\n // parsed lines info from the diff output\n if (linesInfo) {\n baseFromLine = linesInfo[0];\n baseToLine = linesInfo[1];\n linesOffset = 0;\n diffFromStr += (lnText + '\\n');\n diffToStr += (lnText + '\\n');\n fromLines.push('');\n toLines.push('');\n // line removed in the from file\n } else if (lnText.length > 0 && lnText[0] === '-') {\n baseFromLine = baseFromLine + 1;\n fromLine = baseFromLine.toString();\n fromLines.push(fromLine);\n ++nbDeletions;\n diffFromStr += (lnText + '\\n');\n ++linesOffset;\n // line added in the to file\n } else if (lnText.length > 0 && lnText[0] === '+') {\n baseToLine = baseToLine + 1;\n toLine = baseToLine.toString();\n toLines.push(toLine);\n ++nbAdditions;\n diffToStr += (lnText + '\\n');\n --linesOffset;\n // line present in both files\n } else {\n baseFromLine = baseFromLine + 1;\n baseToLine = baseToLine + 1;\n fromLine = baseFromLine.toString();\n toLine = baseToLine.toString();\n for (let j = 0; j < Math.abs(linesOffset); ++j) {\n if (linesOffset > 0) {\n diffToStr += '\\n';\n toLines.push('');\n } else {\n diffFromStr += '\\n';\n fromLines.push('');\n }\n }\n linesOffset = 0;\n diffFromStr += (lnText + '\\n');\n diffToStr += (lnText + '\\n');\n toLines.push(toLine);\n fromLines.push(fromLine);\n }\n if (!baseFromLine) {\n fromLine = '';\n }\n if (!baseToLine) {\n toLine = '';\n }\n fromToLines[i] = [fromLine, toLine];\n maxNumberChars = Math.max(maxNumberChars, fromLine.length);\n maxNumberChars = Math.max(maxNumberChars, toLine.length);\n });\n\n diffMaxNumberChars[diffId] = maxNumberChars;\n\n // set side-by-side diffs text\n $(`#${diffId}-from`).text(diffFromStr);\n $(`#${diffId}-to`).text(diffToStr);\n\n // code highlighting for side-by-side diffs\n $(`#${diffId}-from, #${diffId}-to`).each((i, elt) => {\n hljs.highlightElement(elt);\n hljs.lineNumbersElementSync(elt);\n });\n\n // diff highlighting for added/removed lines on top of code highlighting\n $(`.${diffId} .hljs-ln-numbers`).each((i, lnElt) => {\n const lnText = lnElt.nextSibling.innerText;\n if (lnText.startsWith('@@')) {\n $(lnElt).parent().addClass('swh-diff-lines-info');\n const linesInfoText = $(lnElt).parent().find('.hljs-ln-code .hljs-ln-line').text();\n $(lnElt).parent().find('.hljs-ln-code .hljs-ln-line').children().remove();\n $(lnElt).parent().find('.hljs-ln-code .hljs-ln-line').text('');\n $(lnElt).parent().find('.hljs-ln-code .hljs-ln-line').append(`<span class=\"hljs-meta\">${linesInfoText}</span>`);\n } else if (lnText.length > 0 && lnText[0] === '-') {\n $(lnElt).parent().addClass('swh-diff-removed-line');\n } else if (lnText.length > 0 && lnText[0] === '+') {\n $(lnElt).parent().addClass('swh-diff-added-line');\n }\n });\n\n // set line numbers for unified diff\n $(`#${diffId} .hljs-ln-numbers`).each((i, lnElt) => {\n const lineNumbers = formatDiffLineNumbers(diffId, fromToLines[i][0], fromToLines[i][1]);\n setLineNumbers(lnElt, lineNumbers);\n });\n\n // set line numbers for the from side-by-side diff\n $(`#${diffId}-from .hljs-ln-numbers`).each((i, lnElt) => {\n setLineNumbers(lnElt, fromLines[i]);\n });\n\n // set line numbers for the to side-by-side diff\n $(`#${diffId}-to .hljs-ln-numbers`).each((i, lnElt) => {\n setLineNumbers(lnElt, toLines[i]);\n });\n\n // last processing:\n // - remove the '+' and '-' at the beginning of the diff lines\n // from code highlighting\n // - add the \"no new line at end of file marker\" if needed\n $(`.${diffId} .hljs-ln-code`).each((i, lnElt) => {\n if (lnElt.firstChild) {\n if (lnElt.firstChild.nodeName !== '#text') {\n const lineText = lnElt.firstChild.innerHTML;\n if (lineText[0] === '-' || lineText[0] === '+') {\n lnElt.firstChild.innerHTML = lineText.substr(1);\n const newTextNode = document.createTextNode(lineText[0]);\n $(lnElt).prepend(newTextNode);\n }\n }\n $(lnElt).contents().filter((i, elt) => {\n return elt.nodeType === 3; // Node.TEXT_NODE\n }).each((i, textNode) => {\n const swhNoNewLineMarker = '[swh-no-nl-marker]';\n if (textNode.textContent.indexOf(swhNoNewLineMarker) !== -1) {\n textNode.textContent = textNode.textContent.replace(swhNoNewLineMarker, '');\n $(lnElt).append($(noNewLineMarker));\n }\n });\n }\n });\n\n // hide the diff mode switch button in case of not generated diffs\n if (data.diff_str.indexOf('Diffs are not generated for non textual content') !== 0) {\n $(`#diff_${diffId} .diff-styles`).css('visibility', 'visible');\n $(`#diff_${diffId} .diff-styles`).children().first().prop('checked', true);\n }\n\n setDiffVisible(diffId);\n\n // highlight diff lines if provided in URL fragment\n if (selectedDiffLinesInfo &&\n selectedDiffLinesInfo.diffPanelId.indexOf(diffId) !== -1) {\n if (!selectedDiffLinesInfo.unified) {\n showSplitDiff(diffId);\n }\n const firstHighlightedLine = highlightDiffLines(\n diffId, selectedDiffLinesInfo.startLines,\n selectedDiffLinesInfo.endLines, selectedDiffLinesInfo.unified);\n\n $('html, body').animate(\n {\n scrollTop: firstHighlightedLine.offset().top - 50\n },\n {\n duration: 500\n }\n );\n }\n }\n\n}\n\nfunction setDiffVisible(diffId) {\n // set the unified diff visible by default\n $(`#${diffId}-loading`).css('display', 'none');\n $(`#${diffId}-highlightjs`).css('display', 'block');\n\n // update displayed counters\n $('#swh-revision-lines-added').text(`${nbAdditions} additions`);\n $('#swh-revision-lines-deleted').text(`${nbDeletions} deletions`);\n $('#swh-nb-diffs-computed').text(nbDiffsComputed);\n\n // refresh the waypoints triggering diffs computation as\n // the DOM layout has been updated\n Waypoint.refreshAll();\n}\n\n// to compute all visible diffs in the viewport\nfunction computeVisibleDiffs() {\n $('.swh-file-diff-panel').each((i, elt) => {\n if (isInViewport(elt)) {\n const diffId = elt.id.replace('diff_', '');\n computeDiff(diffsUrls[diffId], diffId);\n }\n });\n}\n\nfunction genDiffPanel(diffData) {\n let diffPanelTitle = diffData.path;\n if (diffData.type === 'rename') {\n diffPanelTitle = `${diffData.from_path} &rarr; ${diffData.to_path}`;\n }\n return diffPanelTemplate({\n diffData: diffData,\n diffPanelTitle: diffPanelTitle,\n swhSpinnerSrc: swhSpinnerSrc\n });\n}\n\n// setup waypoints to request diffs computation on the fly while scrolling\nfunction setupWaypoints() {\n for (let i = 0; i < changes.length; ++i) {\n const diffData = changes[i];\n\n // create a waypoint that will trigger diff computation when\n // the top of the diff panel hits the bottom of the viewport\n $(`#diff_${diffData.id}`).waypoint({\n handler: function() {\n if (isInViewport(this.element)) {\n const diffId = this.element.id.replace('diff_', '');\n computeDiff(diffsUrls[diffId], diffId);\n this.destroy();\n }\n },\n offset: '100%'\n });\n\n // create a waypoint that will trigger diff computation when\n // the bottom of the diff panel hits the top of the viewport\n $(`#diff_${diffData.id}`).waypoint({\n handler: function() {\n if (isInViewport(this.element)) {\n const diffId = this.element.id.replace('diff_', '');\n computeDiff(diffsUrls[diffId], diffId);\n this.destroy();\n }\n },\n offset: function() {\n return -$(this.element).height();\n }\n });\n }\n Waypoint.refreshAll();\n}\n\nfunction scrollToDiffPanel(diffPanelId, setHash = true) {\n // disable waypoints while scrolling as we do not want to\n // launch computation of diffs the user is not interested in\n // (file changes list can be large)\n Waypoint.disableAll();\n\n $('html, body').animate(\n {\n scrollTop: $(diffPanelId).offset().top\n },\n {\n duration: 500,\n complete: () => {\n if (setHash) {\n window.location.hash = diffPanelId;\n }\n // enable waypoints back after scrolling\n Waypoint.enableAll();\n // compute diffs visible in the viewport\n computeVisibleDiffs();\n }\n });\n}\n\n// callback when the user clicks on the 'Compute all diffs' button\nexport function computeAllDiffs(event) {\n $(event.currentTarget).addClass('active');\n for (const diffId in diffsUrls) {\n if (diffsUrls.hasOwnProperty(diffId)) {\n computeDiff(diffsUrls[diffId], diffId);\n }\n }\n event.stopPropagation();\n}\n\nexport async function initRevisionDiff(revisionMessageBody, diffRevisionUrl) {\n\n await import(/* webpackChunkName: \"highlightjs\" */ 'utils/highlightjs');\n\n // callback when the 'Changes' tab is activated\n $(document).on('shown.bs.tab', 'a[data-bs-toggle=\"tab\"]', async e => {\n currentTabName = e.currentTarget.text.trim();\n if (currentTabName === 'Changes') {\n window.location.hash = changesUrlFragment;\n $('#readme-panel').css('display', 'none');\n\n if (changes) {\n return;\n }\n\n // request computation of revision file changes list\n // when navigating to the 'Changes' tab and add diff panels\n // to the DOM when receiving the result\n const response = await fetch(diffRevisionUrl);\n const data = await response.json();\n\n changes = data.changes;\n nbChangedFiles = data.total_nb_changes;\n let changedFilesText = `${nbChangedFiles} changed file`;\n if (nbChangedFiles !== 1) {\n changedFilesText += 's';\n }\n $('#swh-revision-changed-files').text(changedFilesText);\n $('#swh-total-nb-diffs').text(changes.length);\n $('#swh-revision-changes-list pre')[0].innerHTML = data.changes_msg;\n\n $('#swh-revision-changes-loading').css('display', 'none');\n $('#swh-revision-changes-list pre').css('display', 'block');\n $('#swh-compute-all-diffs').css('visibility', 'visible');\n $('#swh-revision-changes-list').removeClass('in');\n\n if (nbChangedFiles > changes.length) {\n $('#swh-too-large-revision-diff').css('display', 'block');\n $('#swh-nb-loaded-diffs').text(changes.length);\n }\n\n for (let i = 0; i < changes.length; ++i) {\n const diffData = changes[i];\n diffsUrls[diffData.id] = diffData.diff_url;\n $('#swh-revision-diffs').append(genDiffPanel(diffData));\n }\n\n setupWaypoints();\n computeVisibleDiffs();\n\n if (selectedDiffLinesInfo) {\n scrollToDiffPanel(selectedDiffLinesInfo.diffPanelId, false);\n }\n\n } else if (currentTabName === 'Files') {\n removeUrlFragment();\n $('#readme-panel').css('display', 'block');\n }\n });\n\n $(document).ready(() => {\n\n if (revisionMessageBody.length > 0) {\n $('#swh-revision-message').addClass('in');\n } else {\n $('#swh-collapse-revision-message').attr('data-bs-toggle', '');\n }\n\n // callback when the user requests to scroll on a specific diff or back to top\n $('#swh-revision-changes-list a[href^=\"#\"], #back-to-top a[href^=\"#\"]').click(e => {\n const href = $.attr(e.currentTarget, 'href');\n scrollToDiffPanel(href);\n return false;\n });\n\n // click callback for highlighting diff lines\n $('body').click(evt => {\n\n if (currentTabName !== 'Changes') {\n return;\n }\n\n if (evt.target.classList.contains('hljs-ln-n')) {\n\n const diffId = $(evt.target).closest('code').prop('id');\n\n const from = diffId.indexOf('-from') !== -1;\n const to = diffId.indexOf('-to') !== -1;\n\n const lineNumbers = $(evt.target).data('line-number').toString();\n\n const currentDiff = diffId.replace('-from', '').replace('-to', '');\n if (!evt.shiftKey || currentDiff !== focusedDiff || !lineNumbers.trim()) {\n resetHighlightedDiffLines();\n focusedDiff = currentDiff;\n }\n if (currentDiff === focusedDiff && lineNumbers.trim()) {\n if (!evt.shiftKey) {\n startLines = parseDiffLineNumbers(lineNumbers, from, to);\n highlightDiffLines(currentDiff, startLines, startLines, !from && !to);\n } else if (startLines) {\n resetHighlightedDiffLines(false);\n endLines = parseDiffLineNumbers(lineNumbers, from, to);\n highlightDiffLines(currentDiff, startLines, endLines, !from && !to);\n }\n }\n\n } else {\n resetHighlightedDiffLines();\n }\n });\n\n // if an URL fragment for highlighting a diff is present\n // parse highlighting info and initiate diff loading\n const fragment = window.location.hash;\n if (fragment) {\n const split = fragment.split('+');\n if (split.length === 2) {\n selectedDiffLinesInfo = fragmentToSelectedDiffLines(split[1]);\n if (selectedDiffLinesInfo) {\n selectedDiffLinesInfo.diffPanelId = split[0];\n $(`.nav-tabs a[href=\"${changesUrlFragment}\"]`).tab('show');\n }\n }\n if (fragment === changesUrlFragment) {\n $(`.nav-tabs a[href=\"${changesUrlFragment}\"]`).tab('show');\n }\n }\n\n });\n\n}\n","var OverloadYield = require(\"./OverloadYield.js\");\nvar regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction AsyncIterator(t, e) {\n function n(r, o, i, f) {\n try {\n var c = t[r](o),\n u = c.value;\n return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {\n n(\"next\", t, i, f);\n }, function (t) {\n n(\"throw\", t, i, f);\n }) : e.resolve(u).then(function (t) {\n c.value = t, i(c);\n }, function (t) {\n return n(\"throw\", t, i, f);\n });\n } catch (t) {\n f(t);\n }\n }\n var r;\n this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, \"function\" == typeof Symbol && Symbol.asyncIterator || \"@asyncIterator\", function () {\n return this;\n })), regeneratorDefine(this, \"_invoke\", function (t, o, i) {\n function f() {\n return new e(function (e, r) {\n n(t, i, e, r);\n });\n }\n return r = r ? r.then(f, f) : f();\n }, !0);\n}\nmodule.exports = AsyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction _regenerator() {\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\n var e,\n t,\n r = \"function\" == typeof Symbol ? Symbol : {},\n n = r.iterator || \"@@iterator\",\n o = r.toStringTag || \"@@toStringTag\";\n function i(r, n, o, i) {\n var c = n && n.prototype instanceof Generator ? n : Generator,\n u = Object.create(c.prototype);\n return regeneratorDefine(u, \"_invoke\", function (r, n, o) {\n var i,\n c,\n u,\n f = 0,\n p = o || [],\n y = !1,\n G = {\n p: 0,\n n: 0,\n v: e,\n a: d,\n f: d.bind(e, 4),\n d: function d(t, r) {\n return i = t, c = 0, u = e, G.n = r, a;\n }\n };\n function d(r, n) {\n for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {\n var o,\n i = p[t],\n d = G.p,\n l = i[2];\n r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));\n }\n if (o || r > 1) return a;\n throw y = !0, n;\n }\n return function (o, p, l) {\n if (f > 1) throw TypeError(\"Generator is already running\");\n for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {\n i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);\n try {\n if (f = 2, i) {\n if (c || (o = \"next\"), t = i[o]) {\n if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\");\n if (!t.done) return t;\n u = t.value, c < 2 && (c = 0);\n } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1);\n i = e;\n } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;\n } catch (t) {\n i = e, c = 1, u = t;\n } finally {\n f = 1;\n }\n }\n return {\n value: t,\n done: y\n };\n };\n }(r, o, i), !0), u;\n }\n var a = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n t = Object.getPrototypeOf;\n var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {\n return this;\n }), t),\n u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n function f(e) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e;\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), regeneratorDefine(u), regeneratorDefine(u, o, \"Generator\"), regeneratorDefine(u, n, function () {\n return this;\n }), regeneratorDefine(u, \"toString\", function () {\n return \"[object Generator]\";\n }), (module.exports = _regenerator = function _regenerator() {\n return {\n w: i,\n m: f\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","/**\n * Copyright (C) 2019 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\nimport {staticAsset} from 'utils/functions';\n\n// Constants defining Bootstrap Breakpoints\nexport const BREAKPOINT_SM = 768;\nexport const BREAKPOINT_MD = 992;\nexport const BREAKPOINT_LG = 1200;\n\nexport const swhSpinnerSrc = staticAsset('img/swh-spinner.gif');\n\nexport const dataTableCommonConfig = {\n serverSide: true,\n processing: true,\n language: {\n processing: `<img src=\"${swhSpinnerSrc}\"></img>`\n },\n fixedHeader: true,\n lengthMenu: [10, 25, 50, 100, 1000],\n scrollCollapse: true,\n searchDelay: 1000\n};\n","function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Copyright (C) 2019 The Software Heritage developers\n * See the AUTHORS file at the top-level directory of this distribution\n * License: GNU Affero General Public License version 3, or any later version\n * See top-level LICENSE file for more information\n */\n\nexport function revsOrderingTypeClicked(event) {\n const urlParams = new URLSearchParams(window.location.search);\n const orderingType = $(event.target).val();\n if (orderingType) {\n urlParams.set('revs_ordering', $(event.target).val());\n } else if (urlParams.has('revs_ordering')) {\n urlParams.delete('revs_ordering');\n }\n window.location.search = urlParams.toString();\n}\n\nexport function initRevisionsLog() {\n $(document).ready(() => {\n const urlParams = new URLSearchParams(window.location.search);\n const revsOrderingType = urlParams.get('revs_ordering');\n if (revsOrderingType) {\n $(`:input[value=\"${revsOrderingType}\"]`).prop('checked', true);\n }\n });\n}\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorValues(e) {\n if (null != e) {\n var t = e[\"function\" == typeof Symbol && Symbol.iterator || \"@@iterator\"],\n r = 0;\n if (t) return t.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) return {\n next: function next() {\n return e && r >= e.length && (e = void 0), {\n value: e && e[r++],\n done: !e\n };\n }\n };\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n}\nmodule.exports = _regeneratorValues, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nfunction _regeneratorAsync(n, e, r, t, o) {\n var a = regeneratorAsyncGen(n, e, r, t, o);\n return a.next().then(function (n) {\n return n.done ? n.value : a.next();\n });\n}\nmodule.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorDefine(e, r, n, t) {\n var i = Object.defineProperty;\n try {\n i({}, \"\", {});\n } catch (e) {\n i = 0;\n }\n module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {\n function o(r, n) {\n _regeneratorDefine(e, r, function (e) {\n return this._invoke(r, n, e);\n });\n }\n r ? i ? i(e, r, {\n value: n,\n enumerable: !t,\n configurable: !t,\n writable: !t\n }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2));\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _regeneratorDefine(e, r, n, t);\n}\nmodule.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var inProgress = {};\nvar dataWebpackPrefix = \"swh:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"js/\" + \"highlightjs\" + \".\" + \"dc9b8354c69d942fad33\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"css/\" + \"highlightjs\" + \".\" + \"0c1b181eb006699a4c3e\" + \".css\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"/static/\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = function(chunkId, fullhref, oldTag, resolve, reject) {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tif (__webpack_require__.nc) {\n\t\tlinkTag.nonce = __webpack_require__.nc;\n\t}\n\tvar onLinkComplete = function(event) {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && event.type;\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + errorType + \": \" + realHref + \")\");\n\t\t\terr.name = \"ChunkLoadError\";\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tif (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\n\tif (oldTag) {\n\t\toldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling);\n\t} else {\n\t\tdocument.head.appendChild(linkTag);\n\t}\n\treturn linkTag;\n};\nvar findStylesheet = function(href, fullhref) {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = function(chunkId) {\n\treturn new Promise(function(resolve, reject) {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t552: 0\n};\n\n__webpack_require__.f.miniCss = function(chunkId, promises) {\n\tvar cssChunks = {\"940\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(function() {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, function(e) {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr\n\n// no prefetching\n\n// no preloaded","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t552: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\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\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkswh\"] = self[\"webpackChunkswh\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["root","factory","exports","module","define","amd","self","regenerator","regeneratorAsyncIterator","r","e","t","o","n","w","Promise","__esModule","Object","unshift","length","pop","value","done","OverloadYield","regeneratorAsync","regeneratorAsyncGen","regeneratorKeys","regeneratorValues","_regeneratorRuntime","m","getPrototypeOf","__proto__","constructor","displayName","name","a","stop","v","abrupt","delegateYield","resultName","d","finish","f","_t","p","prev","next","sent","call","this","wrap","reverse","isGeneratorFunction","mark","awrap","AsyncIterator","async","u","keys","values","keyCounter","allWaypoints","Waypoint","options","Error","element","handler","key","Adapter","extend","defaults","adapter","callback","axis","horizontal","enabled","triggerPoint","group","Group","findOrCreate","context","Context","findOrCreateByElement","offsetAliases","offset","add","prototype","queueTrigger","direction","trigger","args","apply","destroy","remove","disable","enable","refresh","previous","invokeAll","method","allWaypointsArray","waypointKey","push","i","end","destroyAll","disableAll","enableAll","refreshAll","viewportHeight","window","innerHeight","document","documentElement","clientHeight","viewportWidth","clientWidth","adapters","continuous","outerHeight","innerWidth","outerWidth","requestAnimationFrameShim","setTimeout","contexts","oldWindowLoad","onload","didScroll","didResize","oldScroll","x","scrollLeft","y","scrollTop","waypoints","vertical","waypointContextKey","windowContext","createThrottledScrollHandler","createThrottledResizeHandler","waypoint","checkEmpty","horizontalEmpty","isEmptyObject","verticalEmpty","isWindow","off","resizeHandler","handleResize","on","requestAnimationFrame","scrollHandler","handleScroll","isTouch","triggeredGroups","axes","newScroll","forward","backward","axisKey","wasBeforeTriggerPoint","nowAfterTriggerPoint","id","groupKey","flushTriggers","contextOffset","undefined","left","contextScroll","contextDimension","offsetProp","top","contextModifier","wasBeforeScroll","nowAfterScroll","triggeredForward","adjustment","oldTriggerPoint","elementOffset","freshWaypoint","parseFloat","indexOf","Math","ceil","floor","findByElement","contextId","mozRequestAnimationFrame","webkitRequestAnimationFrame","byTriggerPoint","b","byReverseTriggerPoint","groups","clearTriggerQueues","triggerQueues","up","down","right","sort","index","inArray","splice","first","last","$","jQuery","JQueryAdapter","$element","each","Array","slice","arguments","createExtension","framework","overrides","isFunction","closest","fn","Zepto","staticAsset","asset","origin","url","__STATIC__","startsWith","removeUrlFragment","history","replaceState","title","location","pathname","search","anonymous","locals","escapeFn","include","rethrow","markup","String","replace","_MATCH_HTML","encode_char","_ENCODE_HTML_RULES","c","__output","__append","s","diffData","diffPanelTitle","content_url","swhSpinnerSrc","asyncGeneratorStep","resolve","then","_asyncToGenerator","_next","_throw","selectedDiffLinesInfo","changes","nbChangedFiles","nbDiffsComputed","nbAdditions","nbDeletions","computedDiffs","diffsUrls","startLines","endLines","diffMaxNumberChars","focusedDiff","changesUrlFragment","currentTabName","isInViewport","elt","elementTop","elementBottom","viewportTop","viewportBottom","height","formatDiffLineNumbers","diffId","fromLine","toLine","maxNumberChars","fromLineStr","toLnStr","toLineStr","ret","parseDiffHunkRangeIfAny","lineText","baseFromLine","baseToLine","linesInfoRegExp","RegExp","linesInfoRegExp2","linesInfoRegExp3","linesInfoRegExp4","linesInfo","exec","linesInfo2","linesInfo3","linesInfo4","parseInt","toLnInt","lnStr","lnInt","toString","parseDiffLineNumbers","lineNumbersStr","from","to","lines","lineNumber","trim","split","shift","map","selectedDiffLinesToFragment","unified","selectedLinesFragment","fragmentToSelectedDiffLines","fragment","matchObj","highlightDiffLine","line","lineNumbers","css","resetHighlightedDiffLines","resetVars","hash","highlightDiffLines","firstHighlightedLine","start","startLine","endLine","position","_ref","lineTd","tr","children","data","min","max","leftLine","rightLine","leftLineAbove","fromTr","fromLn","toTr","toLn","canHighlight","showUnifiedDiff","showSplitDiff","computeDiff","_x","_x2","_computeDiff","_callee","diffUrl","setLineNumbers","response","fromToLines","fromLines","toLines","diffFromStr","diffToStr","linesOffset","_context","lnElt","attr","siblings","hasOwnProperty","fetch","json","addClass","diff_str","innerHTML","setDiffVisible","text","removeClass","language","hljs","highlightElement","lineNumbersElementSync","lnText","nextSibling","innerText","j","abs","parent","linesInfoText","find","append","firstChild","nodeName","substr","newTextNode","createTextNode","prepend","contents","filter","nodeType","textNode","swhNoNewLineMarker","textContent","prop","diffPanelId","animate","duration","computeVisibleDiffs","genDiffPanel","path","type","from_path","to_path","diffPanelTemplate","setupWaypoints","scrollToDiffPanel","setHash","complete","computeAllDiffs","event","currentTarget","stopPropagation","initRevisionDiff","_x3","_x4","_initRevisionDiff","_callee3","revisionMessageBody","diffRevisionUrl","_context3","_ref2","_callee2","changedFilesText","_context2","total_nb_changes","changes_msg","diff_url","_x5","ready","click","evt","target","classList","contains","currentDiff","shiftKey","tab","regeneratorDefine","Symbol","asyncIterator","_regenerator","iterator","toStringTag","Generator","create","G","bind","l","TypeError","GeneratorFunction","GeneratorFunctionPrototype","setPrototypeOf","assign","source","init","converter","defaultAttributes","set","attributes","expires","Date","now","toUTCString","encodeURIComponent","decodeURIComponent","escape","stringifiedAttributes","attributeName","cookie","write","get","cookies","jar","parts","join","found","read","withAttributes","withConverter","freeze","k","revsOrderingTypeClicked","urlParams","URLSearchParams","val","has","initRevisionsLog","revsOrderingType","_typeof","isNaN","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","_regeneratorDefine","defineProperty","_invoke","enumerable","configurable","writable","__webpack_module_cache__","inProgress","dataWebpackPrefix","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","chunkId","all","reduce","promises","miniCssF","g","obj","script","needAttach","scripts","getElementsByTagName","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","onerror","clearTimeout","timeout","doneFns","parentNode","removeChild","forEach","head","appendChild","loadStylesheet","reject","href","fullhref","existingLinkTags","dataHref","tag","rel","existingStyleTags","findStylesheet","oldTag","linkTag","nonce","errorType","realHref","err","code","request","insertBefore","createStylesheet","installedCssChunks","miniCss","installedChunks","installedChunkData","promise","error","realSrc","message","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","some","chunkLoadingGlobal"],"sourceRoot":""}
@@ -1,3 +0,0 @@
1
- /*! For license information please see save_code_now.369ff7f28aaf74e7728e.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.swh=t():(e.swh=e.swh||{},e.swh.save_code_now=t())}(self,function(){return function(){var __webpack_modules__={887:function(e,t,n){var r=n(16993),o=n(11791);e.exports=function(e,t,n,a,i){return new o(r().w(e,t,n,a),i||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},4373:function(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633:function(e,t,n){var r=n(25172),o=n(16993),a=n(55869),i=n(887),s=n(11791),u=n(4373),c=n(30579);function l(){"use strict";var t=o(),n=t.m(l),p=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function h(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,o,a){return t.resultName=o,n(r.d,c(e),a)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,o){return t.w(h(e),n,r,o&&o.reverse())},isGeneratorFunction:d,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,o){return(d(t)?i:a)(h(e),t,n,r,o)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},8545:function(e,t,n){"use strict";n.d(t,{Eb:function(){return g},I3:function(){return f},Iu:function(){return h},Jq:function(){return d},Tv:function(){return l},lY:function(){return p},wv:function(){return v},y5:function(){return m}});var r=n(85501),o=n(63662),a=n(10467),i=n(54756),s=n.n(i),u=n(18987);function c(){c=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,a){var i=RegExp(e,r);return t.set(i,a||t.get(e)),(0,o.A)(i,n.prototype)}function a(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var a=0;void 0===e[o[a]]&&a+1<o.length;)a++;t[n]=e[o[a]]}return t},Object.create(null))}return(0,r.A)(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=a(n,this);var r=n.indices;r&&(r.groups=a(r,this))}return n},n.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var o=t.get(this);return e[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof r){var i=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(a(e,i)),r.apply(this,e)})}return e[Symbol.replace].call(this,n,r)},c.apply(this,arguments)}function l(e){if(!e.ok)throw e;return e}function p(e,t){var n="/static/"+e;return n.startsWith("/")&&t&&(n=t+n),n}function d(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=null),t["X-CSRFToken"]=u.A.get("csrftoken"),fetch(e,{credentials:"include",headers:t,method:"POST",body:n})}function f(e,t){void 0===t&&(t="/");return void 0!==["http:","https:","git:"].find(function(t){return t===e.protocol})&&(!!e.pathname.startsWith(t)&&new RegExp("[\\w\\.-]+\\/?(?!=.git)(?:\\.git\\/?)?$").test(e.pathname.slice(t.length)))}function h(e,t,n){void 0===n&&(n=!1);var r="",o="";return n&&(r='<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>',o="alert-dismissible"),'<div class="alert alert-'+e+" "+o+'" role="alert">'+t+r+"</div>"}function v(e,t){void 0===t&&(t=[]);var n=null,r=!0;try{n=new URL(e)}catch(e){r=!1}return r&&t.length&&(r=void 0!==t.find(function(e){return e===n.protocol})),r?n:null}function _(e){return w.apply(this,arguments)}function w(){return(w=(0,a.A)(s().mark(function e(t){var n,r;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,fetch("https://api.github.com/repos/"+t);case 1:if(!(n=e.sent).ok||200!==n.status){e.next=3;break}return e.next=2,n.json();case 2:return r=e.sent,e.abrupt("return",r.html_url);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function m(e){return b.apply(this,arguments)}function b(){return(b=(0,a.A)(s().mark(function e(t){var n,r,o,a,i,u,l,p;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.toLowerCase(),r=/^http[s]*:\/\/github.com\//,!n.match(r)){e.next=2;break}return n.endsWith(".git")&&(n=n.slice(0,-4)),n.endsWith("/")&&(n=n.slice(0,-1)),o=n.replace(r,""),e.next=1,_(o);case 1:if(!(a=e.sent)){e.next=2;break}return e.abrupt("return",a);case 2:if(i=c(/^http[s]*:\/\/([^/]+).github.io\/([^/]+)\/?.*/,{owner:1,repo:2}),!(u=n.match(i))){e.next=4;break}return l=u.groups.owner+"/"+u.groups.repo,e.next=3,_(l);case 3:if(!(p=e.sent)){e.next=4;break}return e.abrupt("return",p);case 4:return e.abrupt("return",t);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function g(e){return new Date(e).toLocaleString()}},10467:function(e,t,n){"use strict";function r(e,t,n,r,o,a,i){try{var s=e[a](i),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(e){r(i,o,a,s,u,"next",e)}function u(e){r(i,o,a,s,u,"throw",e)}s(void 0)})}}n.d(t,{A:function(){return o}})},11791:function(e,t,n){var r=n(25172),o=n(75546);e.exports=function e(t,n){function a(e,o,i,s){try{var u=t[e](o),c=u.value;return c instanceof r?n.resolve(c.v).then(function(e){a("next",e,i,s)},function(e){a("throw",e,i,s)}):n.resolve(c).then(function(e){u.value=e,i(u)},function(e){return a("throw",e,i,s)})}catch(e){s(e)}}var i;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){a(e,r,t,n)})}return i=i?i.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},16993:function(e,t,n){var r=n(75546);function o(){var t,n,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function u(e,o,a,i){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,o){var a,i,s,u=0,l=o||[],p=!1,d={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return a=e,i=0,s=t,d.n=n,c}};function f(e,r){for(i=e,s=r,n=0;!p&&u&&!o&&n<l.length;n++){var o,a=l[n],f=d.p,h=a[2];e>3?(o=h===r)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=f&&((o=e<2&&f<a[1])?(i=0,d.v=r,d.n=a[1]):f<h&&(o=e<3||a[0]>r||r>h)&&(a[4]=e,a[5]=r,d.n=h,i=0))}if(o||e>1)return c;throw p=!0,r}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,h),i=l,s=h;(n=i<2?t:s)||!p;){a||(i?i<3?(i>1&&(d.n=-1),f(i,s)):d.n=s:d.v=s);try{if(u=2,a){if(i||(o="next"),n=a[o]){if(!(n=n.call(a,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,i<2&&(i=0)}else 1===i&&(n=a.return)&&n.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((n=(p=d.n<0)?s:e.call(r,d))!==c)break}catch(e){a=t,i=1,s=e}finally{u=1}}return{value:n,done:p}}}(e,a,i),!0),u}var c={};function l(){}function p(){}function d(){}n=Object.getPrototypeOf;var f=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),h=d.prototype=l.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,r(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e}return p.prototype=d,r(h,"constructor",d),r(d,"constructor",p),p.displayName="GeneratorFunction",r(d,s,"GeneratorFunction"),r(h),r(h,s,"Generator"),r(h,i,function(){return this}),r(h,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:u,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},18987:function(e,t,n){"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}n.d(t,{A:function(){return o}});var o=function e(t,n){function o(e,o,a){if("undefined"!=typeof document){"number"==typeof(a=r({},n,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var s in a)a[s]&&(i+="; "+s,!0!==a[s]&&(i+="="+a[s].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+i}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var a=n[o].split("="),i=a.slice(1).join("=");try{var s=decodeURIComponent(a[0]);if(r[s]=t.read(i,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){o(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},23717:function(e,t,n){"use strict";n.d(t,{Q$:function(){return r},_k:function(){return o}});var r=(0,n(8545).lY)("img/swh-spinner.gif"),o={serverSide:!0,processing:!0,language:{processing:'<img src="'+r+'"></img>'},fixedHeader:!0,lengthMenu:[10,25,50,100,1e3],scrollCollapse:!0,searchDelay:1e3}},25172:function(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},30579:function(e,t,n){var r=n(73738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},36794:function(e,t,n){"use strict";n.d(t,{Hl:function(){return R},K$:function(){return O},N_:function(){return b},Sm:function(){return C},Yk:function(){return y},cR:function(){return g},lu:function(){return A},qW:function(){return T},yn:function(){return I}});var r,o=n(58168),a=n(10467),i=n(54756),s=n.n(i),u=n(23717),c=n(8545),l=n(71407),p=n.n(l),d=n(57986),f=n.n(d);function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t,n,r,o,a){return w.apply(this,arguments)}function w(){return(w=(0,a.A)(s().mark(function e(t,n,r,o,a,i){var u,l,p,d,f,h,v;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=Urls.api_1_save_origin(),u+="?visit_type="+t,u+="&origin_url="+encodeURIComponent(n),$(".swh-processing-save-request").css("display","block"),l={},p=null,r!=={}&&(p=JSON.stringify(r),l={"Content-Type":"application/json"}),e.prev=1,e.next=2,(0,c.Jq)(u,l,p);case 2:return d=e.sent,(0,c.Tv)(d),e.next=3,d.json();case 3:f=e.sent,$(".swh-processing-save-request").css("display","none"),"accepted"===f.save_request_status?o():a(),e.next=6;break;case 4:return e.prev=4,v=e.catch(1),$(".swh-processing-save-request").css("display","none"),e.next=5,v.json();case 5:h=e.sent,i(v.status,h);case 6:case 7:case"end":return e.stop()}},e,null,[[1,4]])}))).apply(this,arguments)}function m(e){$("#swh-input-artifact-url-"+e).on("input",function(t){var n=$(this).val().trim(),r=n.split("/").slice(-1)[0];if(r!==n){var o=(r=r.replace(/tar.*$/,"tar")).split(".").slice(0,-1).join("."),a=$("#swh-input-artifact-version-"+e);o!==r&&a.val(o)}})}function b(){var e=$("#swh-input-visit-type").val(),t="none",n=!0;"archives"===e&&(t="flex",n=!1),$(".swh-save-origin-archives-form").css("display",t),n||$("#swh-save-origin-archives-help").css("display","block"),$(".swh-save-origin-archives-form .form-control").prop("disabled",n),"archives"===e&&1===$(".swh-save-origin-archives-form").length&&($(".swh-save-origin-archives-form").last().after(f()({deletableRow:!1,formId:0})),m(0))}function g(){var e=$(".swh-save-origin-artifact-form").length;$(".swh-save-origin-artifact-form").last().after(f()({deletableRow:!0,formId:e})),m(e)}function y(e){$(e.target).closest(".swh-save-origin-artifact-form").remove()}var x="swh-save-requests-user-filter",k=p()({inputId:x,checked:!1}),q='\n<a href="'+Urls.admin_origin_save_requests_csv()+'"\n class="btn btn-secondary btn-sm swh-tr-link"\n role="button">\n <i class="mdi mdi-table mdi-fw" aria-hidden="true"></i>\n CSV export\n</a>\n';function T(){$(document).ready(function(){$.fn.dataTable.ext.errMode="none",$("#swh-input-visit-type").val("git"),r=$("#swh-origin-save-requests").on("error.dt",function(e,t,n,r){$("#swh-origin-save-request-list-error").text("An error occurred while retrieving the save requests list"),console.log(r)}).DataTable((0,o.A)({},u._k,{ajax:{url:Urls.origin_save_requests_list("all"),data:function(e){swh.webapp.isUserLoggedIn()&&$("#"+x).prop("checked")&&(e.user_requests_only="1")}},dom:'<"row mb-2"<"col-sm-3"l><"col-sm-3 text-start user-requests-filter"><"col-sm-3 requests-csv-export"><"col-sm-3"f>><"row"<"col-sm-12"tr>><"row mt-2"<"col-sm-5"i><"col-sm-7"p>>',fnInitComplete:function(){swh.webapp.isUserLoggedIn()&&($("div.user-requests-filter").html(k),swh.webapp.isStaffUser()&&$("div.requests-csv-export").html(q),$("#"+x).on("change",function(){r.draw()}))},columns:[{data:"save_request_date",name:"request_date",render:c.Eb},{data:"visit_type",name:"visit_type"},{data:"origin_url",name:"origin_url",render:function(e,t,n){if("display"===t){var r="",o=$.fn.dataTable.render.text().display(e);if("succeeded"===n.save_task_status)if("full"===n.visit_status||"partial"===n.visit_status){var a=Urls.browse_origin()+"?origin_url="+encodeURIComponent(o);n.visit_date&&(a+="&amp;timestamp="+encodeURIComponent(n.visit_date)),r+='<a href="'+a+'">'+o+"</a>"}else{r+='<span title="origin was successfully loaded, waiting for data to be available in database">'+o+"</span>"}else r+=o;return r+='&nbsp;<a href="'+o+'" target="_blank" rel="noopener noreferrer"><i class="mdi mdi-open-in-new" aria-hidden="true"></i></a>'}return e}},{data:"save_request_status",name:"status"},{data:"save_task_status",name:"loading_task_status"},{name:"info",render:function(e,t,n){var r="";return"succeeded"!==n.save_task_status&&"failed"!==n.save_task_status&&null==n.note||(r+='<i class="mdi mdi-information-outline swh-save-request-info"\n aria-hidden="true" style="cursor: pointer"\n onclick="swh.save_code_now.displaySaveRequestInfo(event, '+n.id+')"></i>'),n.from_webhook&&(r+='<i class="mdi mdi-webhook" aria-hidden="true"\n title="save request created from webhook"></i>'),r}},{render:function(e,t,n){return"accepted"===n.save_request_status?'<button class="btn btn-secondary btn-sm swh-save-origin-again" type="button" onclick="swh.save_code_now.fillSaveRequestFormAndScroll(\''+n.visit_type+"', '"+n.origin_url+'\');"><i class="mdi mdi-camera mdi-fw" aria-hidden="true"></i>Save again</button>':""}}],order:[[0,"desc"]],responsive:{details:{type:"none"}}})),swh.webapp.addJumpToPagePopoverToDataTable(r),window.location.pathname===Urls.origin_save()&&"#requests"===window.location.hash?window.location=Urls.origin_save_list():$("#swh-origin-save-requests")&&r.draw();var e=(0,c.Iu)("success",'The "save code now" request has been accepted and will be processed as soon as possible.',!0),t=(0,c.Iu)("warning",'The "save code now" request has been put in pending state and may be accepted for processing after manual review.',!0),n=(0,c.Iu)("danger",'The rate limit for "save code now" requests has been reached. Please try again later.',!0),i=(0,c.Iu)("danger",'An unexpected error happened when submitting the "save code now request".',!0);S(),$("#swh-save-origin-form").submit(function(){var r=(0,a.A)(s().mark(function r(o){var a,u,l,p;return s().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(o.preventDefault(),o.stopPropagation(),$(".alert").alert("close"),!o.target.checkValidity()){r.next=2;break}return $(o.target).removeClass("was-validated"),a=$("#swh-input-visit-type").val(),u=$("#swh-input-origin-url").val(),r.next=1,(0,c.y5)(u);case 1:if(u=r.sent,l={},"archives"===a)for(l.archives_data=[],p=0;p<$(".swh-save-origin-artifact-form").length;++p)l.archives_data.push({artifact_url:$("#swh-input-artifact-url-"+p).val(),artifact_version:$("#swh-input-artifact-version-"+p).val()});_(a,u,l,function(){return $("#swh-origin-save-request-status").html(e)},function(){return $("#swh-origin-save-request-status").html(t)},function(e,t){if($("#swh-origin-save-request-status").css("color","red"),403===e){var r=(0,c.Iu)("danger","Error: "+t.reason);$("#swh-origin-save-request-status").html(r)}else if(429===e)$("#swh-origin-save-request-status").html(n);else if(400===e){var o=(0,c.Iu)("danger",t.reason);$("#swh-origin-save-request-status").html(o)}else $("#swh-origin-save-request-status").html(i)}),r.next=3;break;case 2:$(o.target).addClass("was-validated");case 3:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}()),$("#swh-show-origin-save-requests-list").on("click",function(e){e.preventDefault(),$('.nav-tabs a[href="#swh-origin-save-requests-list"]').tab("show")}),$("#swh-input-origin-url").on("input",function(e){S()}),"#requests"===window.location.hash&&$('.nav-tabs a[href="#swh-origin-save-requests-list"]').tab("show"),$(window).on("hashchange",function(){"#requests"===window.location.hash?$('.nav-tabs a[href="#swh-origin-save-requests-list"]').tab("show"):$('.nav-tabs a[href="#swh-origin-save-requests-create"]').tab("show")})})}var j=[".jar",".tar",".tar.bz2",".tar.gz",".tar.lz",".tar.xz",".tar.zst",".zip"];function S(){var e=$("#swh-input-origin-url").val().trim();$(this).val(e),$("#swh-input-visit-type option").each(function(){var t=$(this).val();if(t&&"tarball"!==t&&e.includes(t))$(this).prop("selected",!0),A($("#swh-input-origin-url")[0]);else if("tarball"===t)for(var n,r=h(j);!(n=r()).done;){var o=n.value;if(e.includes(o)){$(this).prop("selected",!0),A($("#swh-input-origin-url")[0]);break}}})}function A(e){var t=$("#swh-input-visit-type").val(),n=(0,c.wv)(e.value.trim(),["http:","https:","svn:","git:","rsync:","pserver:","ssh:","bzr:"]),r=null!==n;r&&"git"===t&&(r=(0,c.I3)(n));var o="";r?-1===["","anonymous","guest","password"].indexOf(n.password)&&(o="The origin url contains a password and cannot be accepted for security reasons"):o="The origin url is not valid or does not reference a code repository",e.setCustomValidity(o),$(e).siblings(".invalid-feedback").text(o)}function I(){var e=(0,c.Iu)("success",'The "take new snapshot" request has been accepted and will be processed as soon as possible.',!0),t=(0,c.Iu)("warning",'The "take new snapshot" request has been put in pending state and may be accepted for processing after manual review.',!0),n=(0,c.Iu)("danger",'The rate limit for "take new snapshot" requests has been reached. Please try again later.',!0),r=(0,c.Iu)("danger",'An unexpected error happened when submitting the "save code now request".',!0);$(document).ready(function(){$("#swh-take-new-snapshot-form").submit(function(o){o.preventDefault(),o.stopPropagation();_($("#swh-input-visit-type").val(),$("#swh-input-origin-url").val(),{},function(){return $("#swh-take-new-snapshot-request-status").html(e)},function(){return $("#swh-take-new-snapshot-request-status").html(t)},function(e,t){if($("#swh-take-new-snapshot-request-status").css("color","red"),403===e){var o=(0,c.Iu)("danger","Error: "+t.detail,!0);$("#swh-take-new-snapshot-request-status").html(o)}else 429===e?$("#swh-take-new-snapshot-request-status").html(n):$("#swh-take-new-snapshot-request-status").html(r)})})})}function O(e,t){return null===t?null:{json:function(e){return JSON.stringify(e,null,2)},date:function(e){return new Date(e).toLocaleString()},raw:function(e){return e},duration:function(e){return e+" seconds"}}[e](t)}function R(e,t){return U.apply(this,arguments)}function U(){return(U=(0,a.A)(s().mark(function e(t,n){var r,o,a,i,c,l,p,d,f,h,v,_,w,m,b,g;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),r=Urls.origin_save_task_info(n),!$(t.target).data("has.popover")){e.next=1;break}return $(t.target).data("has.popover",!1),$(t.target).popover("dispose"),e.abrupt("return");case 1:return $(".swh-save-request-info").popover("dispose"),$(t.target).data("has.popover",!0),$(t.target).popover({animation:!1,boundary:"viewport",container:"body",title:"Save request task information",content:'<div class="swh-popover swh-save-request-info-popover">\n <div class="text-center">\n <img src='+u.Q$+"></img>\n <p>Fetching task information ...</p>\n </div>\n </div>",html:!0,placement:"left",sanitizeFn:swh.webapp.filterXSS}),$(t.target).popover("show"),e.next=2,fetch(r);case 2:return o=e.sent,e.next=3,o.json();case 3:if(a=e.sent,$.isEmptyObject(a))i="Not available";else if(null!=a.note)i="<pre>"+a.note+"</pre>";else{for(c=[],l={Type:["raw","type"],"Visit status":["raw","visit_status"],Arguments:["json","arguments"],Metadata:["json","metadata"],Id:["raw","id"],"Backend id":["raw","backend_id"],"Scheduling date":["date","scheduled"],"Start date":["date","started"],"Completion date":["date","ended"],Duration:["duration","duration"],Runner:["raw","worker"],Log:["raw","message"]},p=0,d=Object.entries(l);p<d.length;p++)f=d[p],h=f[0],v=f[1],_=v[0],w=v[1],a.hasOwnProperty(w)&&c.push({key:h,value:O(_,a[w])});for(i='<table class="table"><tbody>',m=0,b=c;m<b.length;m++)g=b[m],i+='<tr>\n <th class="swh-metadata-table-row swh-metadata-table-key">'+g.key+'</th>\n <td class="swh-metadata-table-row swh-metadata-table-value">\n <pre>'+g.value+"</pre>\n </td>\n </tr>";i+="</tbody></table>"}$(".swh-popover").html(i),$(t.target).popover("update");case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function C(e,t){$("#swh-input-origin-url").val(t);var n=!1;$("#swh-input-visit-type option").each(function(){var e=$(this).val();e&&t.includes(e)&&($(this).prop("selected",!0),n=!0)}),n||$("#swh-input-visit-type option").each(function(){$(this).val()===e&&$(this).prop("selected",!0)}),window.scrollTo(0,0)}},54756:function(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},55869:function(e,t,n){var r=n(887);e.exports=function(e,t,n,o,a){var i=r(e,t,n,o,a);return i.next().then(function(e){return e.done?e.value:i.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},57986:function(module){module.exports=function anonymous(locals,escapeFn,include,rethrow){escapeFn=escapeFn||function(e){return null==e?"":String(e).replace(_MATCH_HTML,encode_char)};var _ENCODE_HTML_RULES={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},_MATCH_HTML=/[&<>'"]/g;function encode_char(e){return _ENCODE_HTML_RULES[e]||e}var __output="";function __append(e){null!=e&&(__output+=e)}with(locals||{})__append('\n\n<div class="swh-save-origin-archives-form swh-save-origin-artifact-form row g-3 mb-3">\n <div class="col-md-7">\n <label class="form-label" for="swh-input-artifact-url-'),__append(escapeFn(formId)),__append('">Artifact url</label>\n <input type="text" class="form-control" id="swh-input-artifact-url-'),__append(escapeFn(formId)),__append('" required>\n <div class="invalid-feedback">The artifact url is mandatory</div>\n </div>\n <div class="col-md-2">\n <label class="form-label" for="swh-input-artifact-version-'),__append(escapeFn(formId)),__append('">Artifact version</label>\n <input type="text" class="form-control" id="swh-input-artifact-version-'),__append(escapeFn(formId)),__append('" required>\n <div class="invalid-feedback">The artifact version is mandatory</div>\n </div>\n <div class="col-md-2">\n '),deletableRow?(__append('\n <label class="form-label" for="swh-remove-archive-artifact-'),__append(escapeFn(formId)),__append('">&nbsp;</label>\n <button id="swh-remove-archive-artifact-'),__append(escapeFn(formId)),__append('" type="button" class="form-control btn btn-secondary" onclick="swh.save_code_now.deleteArtifactFormRow(event)">\n <i class="mdi mdi-file-remove mdi-fw" aria-hidden="true"></i>Remove artifact\n </button>\n ')):__append('\n <label class="form-label" for="swh-add-archive-artifact">&nbsp;</label>\n <button id="swh-add-archive-artifact" type="button" class="form-control btn btn-secondary" onclick="swh.save_code_now.addArtifactFormRow()">\n <i class="mdi mdi-file-plus mdi-fw" aria-hidden="true"></i>Add artifact\n </button>\n '),__append("\n </div>\n</div>");return __output}},58168:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:function(){return r}})},63662:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:function(){return r}})},67664:function(e,t,n){"use strict";n.d(t,{Cv:function(){return x},Fl:function(){return q},IH:function(){return I},IJ:function(){return _},Tq:function(){return m},XM:function(){return v},aA:function(){return A},dg:function(){return O},jH:function(){return g},mt:function(){return j}});var r,o,a,i,s,u=n(10467),c=n(58168),l=n(54756),p=n.n(l),d=n(8545),f=n(23717);function h(e){$(e+" tbody").on("click","tr",function(){$(this).hasClass("selected")?($(this).removeClass("selected"),$(e).closest(".tab-pane").find(".swh-action-need-selection").prop("disabled",!0)):($(e+" tr.selected").removeClass("selected"),$(this).addClass("selected"),$(e).closest(".tab-pane").find(".swh-action-need-selection").prop("disabled",!1))})}function v(){$(document).ready(function(){$.fn.dataTable.ext.errMode="throw",r=$("#swh-authorized-origin-urls").DataTable((0,c.A)({},f._k,{ajax:Urls.admin_origin_save_authorized_urls_list(),columns:[{data:"url",name:"url"}],info:!1})),h("#swh-authorized-origin-urls"),swh.webapp.addJumpToPagePopoverToDataTable(r),o=$("#swh-unauthorized-origin-urls").DataTable((0,c.A)({},f._k,{ajax:Urls.admin_origin_save_unauthorized_urls_list(),columns:[{data:"url",name:"url"}],info:!1})),h("#swh-unauthorized-origin-urls"),swh.webapp.addJumpToPagePopoverToDataTable(o);var e=[{data:"id",name:"id",visible:!1,searchable:!1},{data:"save_request_date",name:"request_date",render:d.Eb},{data:"visit_type",name:"visit_type"},{data:"origin_url",name:"origin_url",render:function(e,t,n){if("display"===t){var r="",o=$.fn.dataTable.render.text().display(e);if("succeeded"===n.save_task_status){var a=Urls.browse_origin()+"?origin_url="+encodeURIComponent(o);n.visit_date&&(a+="&amp;timestamp="+encodeURIComponent(n.visit_date)),r+='<a href="'+a+'">'+o+"</a>"}else r+=o;return r+='&nbsp;<a href="'+o+'" target="_blank" rel="noopener noreferrer"><i class="mdi mdi-open-in-new" aria-hidden="true"></i></a>'}return e}}];a=$("#swh-origin-save-pending-requests").DataTable((0,c.A)({},f._k,{ajax:Urls.origin_save_requests_list("pending"),columns:e,order:[[0,"desc"]],responsive:{details:{type:"none"}}})),h("#swh-origin-save-pending-requests"),swh.webapp.addJumpToPagePopoverToDataTable(a),e.push({name:"info",render:function(e,t,n){var r="";return"succeeded"!==n.save_task_status&&"failed"!==n.save_task_status&&null==n.note||(r+='<i class="mdi mdi-information-outline swh-save-request-info" aria-hidden="true"\n style="cursor: pointer"\n onclick="swh.save_code_now.displaySaveRequestInfo(event, '+n.id+')"></i>'),n.from_webhook&&(r+='<i class="mdi mdi-webhook" aria-hidden="true"\n title="save request created from webhook"></i>'),r}}),s=$("#swh-origin-save-rejected-requests").DataTable((0,c.A)({},f._k,{ajax:Urls.origin_save_requests_list("rejected"),columns:e,order:[[0,"desc"]],responsive:{details:{type:"none"}}})),h("#swh-origin-save-rejected-requests"),swh.webapp.addJumpToPagePopoverToDataTable(s),e.splice(e.length-1,0,{data:"save_task_status",name:"save_task_status"}),i=$("#swh-origin-save-accepted-requests").DataTable((0,c.A)({},f._k,{ajax:Urls.origin_save_requests_list("accepted"),columns:e,order:[[0,"desc"]],responsive:{details:{type:"none"}}})),h("#swh-origin-save-accepted-requests"),swh.webapp.addJumpToPagePopoverToDataTable(i),$("#swh-authorized-origins-tab").on("shown.bs.tab",function(){r.draw()}),$("#swh-unauthorized-origins-tab").on("shown.bs.tab",function(){o.draw()}),$("#swh-save-requests-pending-tab").on("shown.bs.tab",function(){a.draw()}),$("#swh-save-requests-accepted-tab").on("shown.bs.tab",function(){i.draw()}),$("#swh-save-requests-rejected-tab").on("shown.bs.tab",function(){s.draw()}),$("#swh-save-requests-pending-tab").click(function(){a.ajax.reload(null,!1)}),$("#swh-save-requests-accepted-tab").click(function(){i.ajax.reload(null,!1)}),$("#swh-save-requests-rejected-tab").click(function(){s.ajax.reload(null,!1)}),$("body").on("click",function(e){$(e.target).parents(".popover").length>0?e.stopPropagation():0===$(e.target).parents(".swh-save-request-info").length&&$(".swh-save-request-info").popover("dispose")})})}function _(){return w.apply(this,arguments)}function w(){return(w=(0,u.A)(p().mark(function e(){var t,n,o;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=$("#swh-authorized-url-prefix").val(),n=Urls.admin_origin_save_add_authorized_url(encodeURIComponent(t)),e.prev=1,e.next=2,(0,d.Jq)(n);case 2:o=e.sent,(0,d.Tv)(o),r.row.add({url:t}).draw(),$(".swh-add-authorized-origin-status").html((0,d.Iu)("success","The origin url prefix has been successfully added in the authorized list.",!0)),e.next=4;break;case 3:e.prev=3,e.catch(1),$(".swh-add-authorized-origin-status").html((0,d.Iu)("warning","The provided origin url prefix is already registered in the authorized list.",!0));case 4:case"end":return e.stop()}},e,null,[[1,3]])}))).apply(this,arguments)}function m(){return b.apply(this,arguments)}function b(){return(b=(0,u.A)(p().mark(function e(){var t,n,o;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=$("#swh-authorized-origin-urls tr.selected").text())){e.next=4;break}return n=Urls.admin_origin_save_remove_authorized_url(encodeURIComponent(t)),e.prev=1,e.next=2,(0,d.Jq)(n);case 2:o=e.sent,(0,d.Tv)(o),r.row(".selected").remove().draw(),e.next=4;break;case 3:e.prev=3,e.catch(1);case 4:case"end":return e.stop()}},e,null,[[1,3]])}))).apply(this,arguments)}function g(){return y.apply(this,arguments)}function y(){return(y=(0,u.A)(p().mark(function e(){var t,n,r;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=$("#swh-unauthorized-url-prefix").val(),n=Urls.admin_origin_save_add_unauthorized_url(encodeURIComponent(t)),e.prev=1,e.next=2,(0,d.Jq)(n);case 2:r=e.sent,(0,d.Tv)(r),o.row.add({url:t}).draw(),$(".swh-add-unauthorized-origin-status").html((0,d.Iu)("success","The origin url prefix has been successfully added in the unauthorized list.",!0)),e.next=4;break;case 3:e.prev=3,e.catch(1),$(".swh-add-unauthorized-origin-status").html((0,d.Iu)("warning","The provided origin url prefix is already registered in the unauthorized list.",!0));case 4:case"end":return e.stop()}},e,null,[[1,3]])}))).apply(this,arguments)}function x(){return k.apply(this,arguments)}function k(){return(k=(0,u.A)(p().mark(function e(){var t,n,r;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=$("#swh-unauthorized-origin-urls tr.selected").text())){e.next=5;break}return n=Urls.admin_origin_save_remove_unauthorized_url(encodeURIComponent(t)),e.prev=1,e.next=2,(0,d.Jq)(n);case 2:r=e.sent,(0,d.Tv)(r),o.row(".selected").remove().draw(),e.next=4;break;case 3:e.prev=3,e.catch(1);case 4:case 5:case"end":return e.stop()}},e,null,[[1,3]])}))).apply(this,arguments)}function q(){var e=a.row(".selected");if(e.length){var t=function(){var t=(0,u.A)(p().mark(function t(){var n,r;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.data(),r=Urls.admin_origin_save_request_accept(n.visit_type,encodeURIComponent(n.origin_url)),t.next=1,(0,d.Jq)(r);case 1:a.ajax.reload(null,!1),setTimeout(function(){$("td.dt-empty").is(":visible")&&location.reload(!0)},100);case 2:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();swh.webapp.showModalConfirm("Accept origin save request ?","Are you sure to accept this origin save request ?",t)}}var T='\n<form id="swh-rejection-form">\n <div class="row">\n <label for="swh-rejection-reason" class="col-4 col-form-label">\n Rejection reason:\n </label>\n <div class="col-8">\n <select class="form-select" id="swh-rejection-reason">\n <option value="custom" selected>Custom</option>\n <option value="invalid-origin">Invalid origin</option>\n <option value="invalid-origin-type">Invalid origin type</option>\n <option value="origin-not-found">Origin not found</option>\n </select>\n </div>\n </div>\n <div class="row mt-3 mb-3">\n <textarea class="form-control" id="swh-rejection-text"></textarea>\n </div>\n <button type="submit" class="btn btn-secondary float-end" id="swh-rejection-submit">\n Reject\n </button>\n</form>\n';function j(){var e=a.row(".selected"),t=e.data();if(e.length){var n=function(){var e=(0,u.A)(p().mark(function e(){var n;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return $("#swh-web-modal-html").modal("hide"),n=Urls.admin_origin_save_request_reject(t.visit_type,encodeURIComponent(t.origin_url)),e.next=1,(0,d.Jq)(n,{},JSON.stringify({note:$("#swh-rejection-text").val()}));case 1:a.ajax.reload(null,!1);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),r="custom",o={};swh.webapp.showModalHtml("Reject origin save request ?",T),$("#swh-rejection-reason").on("change",function(e){o[r]=$("#swh-rejection-text").val(),r=e.target.value;var n="";o.hasOwnProperty(r)?n=o[r]:"invalid-origin"===r?n="The origin with URL "+t.origin_url+" is not a link to a "+t.visit_type+" repository.":"invalid-origin-type"===r?n="The origin with URL "+t.origin_url+" is not of type "+t.visit_type+".":"origin-not-found"===r&&(n="The origin with URL "+t.origin_url+" cannot be found."),$("#swh-rejection-text").val(n)}),$("#swh-rejection-form").on("submit",function(e){e.preventDefault(),e.stopPropagation(),$("#swh-web-modal-html").css("z-index",4e3),swh.webapp.showModalConfirm("Reject origin save request ?","Are you sure to reject this origin save request ?",n)})}}function S(e){var t=e.row(".selected");if(t.length){var n=t.data().id,r=function(){var t=(0,u.A)(p().mark(function t(){var r;return p().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=Urls.admin_origin_save_request_remove(n),t.next=1,(0,d.Jq)(r);case 1:e.ajax.reload(null,!1);case 2:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();swh.webapp.showModalConfirm("Remove origin save request ?","Are you sure to remove this origin save request ?",r)}}function A(){S(a)}function I(){S(i)}function O(){S(s)}},71407:function(module){module.exports=function anonymous(locals,escapeFn,include,rethrow){escapeFn=escapeFn||function(e){return null==e?"":String(e).replace(_MATCH_HTML,encode_char)};var _ENCODE_HTML_RULES={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},_MATCH_HTML=/[&<>'"]/g;function encode_char(e){return _ENCODE_HTML_RULES[e]||e}var __output="";function __append(e){null!=e&&(__output+=e)}with(locals||{})__append('\n<div class="form-check swhid-option">\n <input class="form-check-input" value="option-user-requests-filter" type="checkbox"\n '),checked&&__append('\n checked="checked"\n '),__append('\n id="'),__append(escapeFn(inputId)),__append('">\n <label class="form-check-label font-weight-normal" for="'),__append(escapeFn(inputId)),__append('">\n show only your own requests\n </label>\n</div>\n');return __output}},73738:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},75546:function(e){function t(n,r,o,a){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}e.exports=t=function(e,n,r,o){function a(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?i?i(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},85501:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(63662);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{acceptOriginSaveRequest:function(){return t.Fl},addArtifactFormRow:function(){return e.cR},addAuthorizedOriginUrl:function(){return t.IJ},addUnauthorizedOriginUrl:function(){return t.jH},deleteArtifactFormRow:function(){return e.Yk},displaySaveRequestInfo:function(){return e.Hl},fillSaveRequestFormAndScroll:function(){return e.Sm},formatValuePerType:function(){return e.K$},initOriginSave:function(){return e.qW},initOriginSaveAdmin:function(){return t.XM},initTakeNewSnapshot:function(){return e.yn},maybeRequireExtraInputs:function(){return e.N_},rejectOriginSaveRequest:function(){return t.mt},removeAcceptedOriginSaveRequest:function(){return t.IH},removeAuthorizedOriginUrl:function(){return t.Tq},removePendingOriginSaveRequest:function(){return t.aA},removeRejectedOriginSaveRequest:function(){return t.dg},removeUnauthorizedOriginUrl:function(){return t.Cv},validateSaveOriginUrl:function(){return e.lu}});var e=__webpack_require__(36794),t=__webpack_require__(67664)}(),__webpack_exports__}()});
3
- //# sourceMappingURL=save_code_now.369ff7f28aaf74e7728e.js.map