keshan commited on
Commit
89dc400
·
verified ·
1 Parent(s): 0b6476c

Upload folder using huggingface_hub

Browse files
src/backend/gradio_codeanalysisviewer/templates/component/index.js CHANGED
@@ -1,6 +1,6 @@
1
- var bt = Object.defineProperty;
2
- var xt = (n, e, t) => e in n ? bt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var v = (n, e, t) => xt(n, typeof e != "symbol" ? e + "" : e, t);
4
  function V() {
5
  }
6
  V.prototype = {
@@ -28,19 +28,19 @@ V.prototype = {
28
  var g = -1 / 0, I = 1 / 0;
29
  function E() {
30
  for (var R = Math.max(g, -o); R <= Math.min(I, o); R += 2) {
31
- var q = void 0, $ = f[R - 1], z = f[R + 1];
32
  $ && (f[R - 1] = void 0);
33
  var j = !1;
34
- if (z) {
35
- var W = z.oldPos - R;
36
- j = z && 0 <= W && W < u;
37
  }
38
  var H = $ && $.oldPos + 1 < a;
39
  if (!j && !H) {
40
  f[R] = void 0;
41
  continue;
42
  }
43
- if (!H || j && $.oldPos + 1 < z.oldPos ? q = c.addToPath(z, !0, void 0, 0) : q = c.addToPath($, void 0, !0, 1), k = c.extractCommon(q, t, e, R), q.oldPos + 1 >= a && k + 1 >= u)
44
  return l(wt(c, q.lastComponent, t, e, c.useLongestToken));
45
  f[R] = q, q.oldPos + 1 >= a && (I = Math.min(I, R - 1)), k + 1 >= u && (g = Math.max(g, R + 1));
46
  }
@@ -174,28 +174,28 @@ function ke(n) {
174
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
175
  }, ke(n);
176
  }
177
- var Ct = Object.prototype.toString, oe = new V();
178
  oe.useLongestToken = !0;
179
  oe.tokenize = lt.tokenize;
180
  oe.castInput = function(n) {
181
  var e = this.options, t = e.undefinedReplacement, s = e.stringifyReplacer, i = s === void 0 ? function(r, c) {
182
  return typeof c > "u" ? t : c;
183
  } : s;
184
- return typeof n == "string" ? n : JSON.stringify(Ce(n, null, null, i), i, " ");
185
  };
186
  oe.equals = function(n, e) {
187
  return V.prototype.equals.call(oe, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
188
  };
189
- function Ce(n, e, t, s, i) {
190
  e = e || [], t = t || [], s && (n = s(i, n));
191
  var r;
192
  for (r = 0; r < e.length; r += 1)
193
  if (e[r] === n)
194
  return t[r];
195
  var c;
196
- if (Ct.call(n) === "[object Array]") {
197
  for (e.push(n), c = new Array(n.length), t.push(c), r = 0; r < n.length; r += 1)
198
- c[r] = Ce(n[r], e, t, s, i);
199
  return e.pop(), t.pop(), c;
200
  }
201
  if (n && n.toJSON && (n = n.toJSON()), ke(n) === "object" && n !== null) {
@@ -204,17 +204,17 @@ function Ce(n, e, t, s, i) {
204
  for (u in n)
205
  n.hasOwnProperty(u) && l.push(u);
206
  for (l.sort(), r = 0; r < l.length; r += 1)
207
- u = l[r], c[u] = Ce(n[u], e, t, s, u);
208
  e.pop(), t.pop();
209
  } else
210
  c = n;
211
  return c;
212
  }
213
- var Te = new V();
214
- Te.tokenize = function(n) {
215
  return n.slice();
216
  };
217
- Te.join = Te.removeEmpty = function(n) {
218
  return n;
219
  };
220
  function Le() {
@@ -304,20 +304,20 @@ var P = {
304
  fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`),
305
  headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`),
306
  htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i")
307
- }, Tt = /^(?:[ \t]*(?:\n|$))+/, St = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, zt = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ce = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, $t = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ie = /(?:[*+-]|\d{1,9}[.)])/, ot = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ct = w(ot).replace(/bull/g, Ie).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), At = w(ot).replace(/bull/g, Ie).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ee = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Lt = /^[^\n]+/, Pe = /(?!\s*\])(?:\\.|[^\[\]\\])+/, It = w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Pe).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Et = w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ie).getRegex(), ve = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", De = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Pt = w(
308
  "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
309
  "i"
310
  ).replace("comment", De).replace("tag", ve).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ut = w(Ee).replace("hr", ce).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ve).getRegex(), Dt = w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ut).getRegex(), Be = {
311
  blockquote: Dt,
312
- code: St,
313
  def: It,
314
- fences: zt,
315
  heading: $t,
316
  hr: ce,
317
  html: Pt,
318
  lheading: ct,
319
  list: Et,
320
- newline: Tt,
321
  paragraph: ut,
322
  table: ae,
323
  text: Lt
@@ -345,7 +345,7 @@ var P = {
345
  "gu"
346
  ).replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, _e).getRegex(), Xt = w(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), Jt = w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Yt = w(De).replace("(?:-->|$)", "-->").getRegex(), Kt = w(
347
  "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
348
- ).replace("comment", Yt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), be = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, en = w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", be).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), kt = w(/^!?\[(label)\]\[(ref)\]/).replace("label", be).replace("ref", Pe).getRegex(), mt = w(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pe).getRegex(), tn = w("reflink|nolink(?!\\()", "g").replace("reflink", kt).replace("nolink", mt).getRegex(), Ne = {
349
  _backpedal: ae,
350
  // only used for GFM url
351
  anyPunctuation: Xt,
@@ -368,9 +368,9 @@ var P = {
368
  url: ae
369
  }, nn = {
370
  ...Ne,
371
- link: w(/^!?\[(label)\]\((.*?)\)/).replace("label", be).getRegex(),
372
- reflink: w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", be).getRegex()
373
- }, Se = {
374
  ...Ne,
375
  emStrongRDelimAst: Wt,
376
  emStrongLDelim: Vt,
@@ -379,16 +379,16 @@ var P = {
379
  del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
380
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
381
  }, sn = {
382
- ...Se,
383
  br: w(ht).replace("{2,}", "*").getRegex(),
384
- text: w(Se.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
385
  }, de = {
386
  normal: Be,
387
  gfm: Bt,
388
  pedantic: qt
389
  }, re = {
390
  normal: Ne,
391
- gfm: Se,
392
  breaks: sn,
393
  pedantic: nn
394
  }, rn = {
@@ -481,7 +481,7 @@ function an(n, e, t) {
481
  }).join(`
482
  `);
483
  }
484
- var xe = class {
485
  // set by the lexer
486
  constructor(n) {
487
  v(this, "options");
@@ -632,12 +632,12 @@ ${o}` : o;
632
  for (; n; ) {
633
  const $ = n.split(`
634
  `, 1)[0];
635
- let z;
636
- if (h = $, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), z = h) : z = h.replace(this.rules.other.tabCharGlobal, " "), B.test(h) || R.test(h) || q.test(h) || I.test(h) || E.test(h))
637
  break;
638
- if (z.search(this.rules.other.nonSpaceChar) >= f || !h.trim())
639
  o += `
640
- ` + z.slice(f);
641
  else {
642
  if (d || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || B.test(p) || R.test(p) || E.test(p))
643
  break;
@@ -645,7 +645,7 @@ ${o}` : o;
645
  ` + h;
646
  }
647
  !d && !h.trim() && (d = !0), a += $ + `
648
- `, n = n.substring($.length + 1), p = z.slice(f);
649
  }
650
  }
651
  i.loose || (c ? i.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (c = !0));
@@ -963,14 +963,14 @@ ${o}` : o;
963
  };
964
  }
965
  }
966
- }, F = class ze {
967
  constructor(e) {
968
  v(this, "tokens");
969
  v(this, "options");
970
  v(this, "state");
971
  v(this, "tokenizer");
972
  v(this, "inlineQueue");
973
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || X, this.options.tokenizer = this.options.tokenizer || new xe(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
974
  inLink: !1,
975
  inRawBlock: !1,
976
  top: !0
@@ -995,13 +995,13 @@ ${o}` : o;
995
  * Static Lex Method
996
  */
997
  static lex(e, t) {
998
- return new ze(t).lex(e);
999
  }
1000
  /**
1001
  * Static Lex Inline Method
1002
  */
1003
  static lexInline(e, t) {
1004
- return new ze(t).inlineTokens(e);
1005
  }
1006
  /**
1007
  * Preprocessing
@@ -1583,7 +1583,7 @@ ${n}</tr>
1583
  v(this, "Renderer", we);
1584
  v(this, "TextRenderer", Oe);
1585
  v(this, "Lexer", F);
1586
- v(this, "Tokenizer", xe);
1587
  v(this, "Hooks", me);
1588
  this.use(...n);
1589
  }
@@ -1656,7 +1656,7 @@ ${n}</tr>
1656
  s.renderer = i;
1657
  }
1658
  if (t.tokenizer) {
1659
- const i = this.defaults.tokenizer || new xe(this.defaults);
1660
  for (const r in t.tokenizer) {
1661
  if (!(r in i))
1662
  throw new Error(`tokenizer '${r}' does not exist`);
@@ -1767,7 +1767,7 @@ m.Renderer = we;
1767
  m.TextRenderer = Oe;
1768
  m.Lexer = F;
1769
  m.lexer = F.lex;
1770
- m.Tokenizer = xe;
1771
  m.Hooks = me;
1772
  m.parse = m;
1773
  m.options;
@@ -1783,13 +1783,13 @@ const {
1783
  append_hydration: _,
1784
  attr: y,
1785
  children: L,
1786
- claim_element: C,
1787
  claim_html_tag: hn,
1788
  claim_space: N,
1789
  claim_text: te,
1790
  destroy_each: pn,
1791
- detach: x,
1792
- element: T,
1793
  ensure_array_like: Ke,
1794
  flush: Z,
1795
  get_svelte_dataset: K,
@@ -1817,15 +1817,15 @@ function tt(n) {
1817
  ), s;
1818
  return {
1819
  c() {
1820
- e = T("div"), s = se(t), this.h();
1821
  },
1822
  l(i) {
1823
- e = C(i, "DIV", { class: !0 });
1824
  var r = L(e);
1825
- s = te(r, t), r.forEach(x), this.h();
1826
  },
1827
  h() {
1828
- y(e, "class", "status-message svelte-1stw26d"), ee(
1829
  e,
1830
  "error",
1831
  /*loading_status*/
@@ -1850,7 +1850,7 @@ function tt(n) {
1850
  );
1851
  },
1852
  d(i) {
1853
- i && x(e);
1854
  }
1855
  };
1856
  }
@@ -1858,19 +1858,19 @@ function nt(n) {
1858
  let e, t;
1859
  return {
1860
  c() {
1861
- e = T("div"), t = se(
1862
  /*label*/
1863
  n[0]
1864
  ), this.h();
1865
  },
1866
  l(s) {
1867
- e = C(s, "DIV", { class: !0 });
1868
  var i = L(e);
1869
  t = te(
1870
  i,
1871
  /*label*/
1872
  n[0]
1873
- ), i.forEach(x), this.h();
1874
  },
1875
  h() {
1876
  y(e, "class", "gradio-label");
@@ -1887,7 +1887,7 @@ function nt(n) {
1887
  );
1888
  },
1889
  d(s) {
1890
- s && x(e);
1891
  }
1892
  };
1893
  }
@@ -1895,20 +1895,20 @@ function gn(n) {
1895
  let e, t = "No analysis data to display.";
1896
  return {
1897
  c() {
1898
- e = T("p"), e.textContent = t, this.h();
1899
  },
1900
  l(s) {
1901
- e = C(s, "P", { class: !0, "data-svelte-h": !0 }), K(e) !== "svelte-1q8w132" && (e.textContent = t), this.h();
1902
  },
1903
  h() {
1904
- y(e, "class", "svelte-1stw26d");
1905
  },
1906
  m(s, i) {
1907
  D(s, e, i);
1908
  },
1909
  p: Ae,
1910
  d(s) {
1911
- s && x(e);
1912
  }
1913
  };
1914
  }
@@ -1919,7 +1919,7 @@ function kn(n) {
1919
  ), u, a, o, p, h = "Issue:", d, f, k = (
1920
  /*display_value*/
1921
  n[8].issue + ""
1922
- ), g, I, E, B, R = "Reason:", q, $, z = (
1923
  /*display_value*/
1924
  n[8].reason + ""
1925
  ), j, W, H, G, J, Ze = "Feedback", ye, Y, ie, ue = m.parse(
@@ -1931,51 +1931,51 @@ function kn(n) {
1931
  );
1932
  return {
1933
  c() {
1934
- e = T("div"), t = T("h4"), t.textContent = s, i = O(), r = T("pre"), c = T("code"), u = se(l), a = O(), o = T("div"), p = T("h4"), p.textContent = h, d = O(), f = T("p"), g = se(k), I = O(), E = T("div"), B = T("h4"), B.textContent = R, q = O(), $ = T("p"), j = se(z), W = O(), A && A.c(), H = O(), G = T("div"), J = T("h3"), J.textContent = Ze, ye = O(), Y = T("div"), ie = new cn(!1), this.h();
1935
  },
1936
- l(b) {
1937
- e = C(b, "DIV", { class: !0 });
1938
- var S = L(e);
1939
- t = C(S, "H4", { class: !0, "data-svelte-h": !0 }), K(t) !== "svelte-1y38fdw" && (t.textContent = s), i = N(S), r = C(S, "PRE", { class: !0 });
1940
  var Me = L(r);
1941
- c = C(Me, "CODE", { class: !0 });
1942
  var He = L(c);
1943
- u = te(He, l), He.forEach(x), Me.forEach(x), S.forEach(x), a = N(b), o = C(b, "DIV", { class: !0 });
1944
  var he = L(o);
1945
- p = C(he, "H4", { class: !0, "data-svelte-h": !0 }), K(p) !== "svelte-1663oc9" && (p.textContent = h), d = N(he), f = C(he, "P", { class: !0 });
1946
  var Ge = L(f);
1947
- g = te(Ge, k), Ge.forEach(x), he.forEach(x), I = N(b), E = C(b, "DIV", { class: !0 });
1948
  var pe = L(E);
1949
- B = C(pe, "H4", { class: !0, "data-svelte-h": !0 }), K(B) !== "svelte-14axvnc" && (B.textContent = R), q = N(pe), $ = C(pe, "P", { class: !0 });
1950
  var Fe = L($);
1951
- j = te(Fe, z), Fe.forEach(x), pe.forEach(x), W = N(b), A && A.l(b), H = N(b), G = C(b, "DIV", { class: !0 });
1952
  var fe = L(G);
1953
- J = C(fe, "H3", { "data-svelte-h": !0 }), K(J) !== "svelte-76jzqn" && (J.textContent = Ze), ye = N(fe), Y = C(fe, "DIV", { class: !0 });
1954
  var Qe = L(Y);
1955
- ie = hn(Qe, !1), Qe.forEach(x), fe.forEach(x), this.h();
1956
  },
1957
  h() {
1958
- y(t, "class", "svelte-1stw26d"), y(c, "class", "svelte-1stw26d"), y(r, "class", "svelte-1stw26d"), y(e, "class", "analysis-section svelte-1stw26d"), y(p, "class", "svelte-1stw26d"), y(f, "class", "svelte-1stw26d"), y(o, "class", "analysis-section svelte-1stw26d"), y(B, "class", "svelte-1stw26d"), y($, "class", "svelte-1stw26d"), y(E, "class", "analysis-section svelte-1stw26d"), ie.a = null, y(Y, "class", "markdown-content svelte-1stw26d"), y(G, "class", "feedback-section svelte-1stw26d");
1959
  },
1960
- m(b, S) {
1961
- D(b, e, S), _(e, t), _(e, i), _(e, r), _(r, c), _(c, u), D(b, a, S), D(b, o, S), _(o, p), _(o, d), _(o, f), _(f, g), D(b, I, S), D(b, E, S), _(E, B), _(E, q), _(E, $), _($, j), D(b, W, S), A && A.m(b, S), D(b, H, S), D(b, G, S), _(G, J), _(G, ye), _(G, Y), ie.m(ue, Y);
1962
  },
1963
- p(b, S) {
1964
- S & /*display_value*/
1965
  256 && l !== (l = /*display_value*/
1966
- b[8].code + "") && ne(u, l), S & /*display_value*/
1967
  256 && k !== (k = /*display_value*/
1968
- b[8].issue + "") && ne(g, k), S & /*display_value*/
1969
- 256 && z !== (z = /*display_value*/
1970
- b[8].reason + "") && ne(j, z), /*display_value*/
1971
- b[8].fixed_code ? A ? A.p(b, S) : (A = st(b), A.c(), A.m(H.parentNode, H)) : A && (A.d(1), A = null), S & /*display_value*/
1972
  256 && ue !== (ue = m.parse(
1973
  /*display_value*/
1974
- b[8].feedback || ""
1975
  ) + "") && ie.p(ue);
1976
  },
1977
- d(b) {
1978
- b && (x(e), x(a), x(o), x(I), x(E), x(W), x(H), x(G)), A && A.d(b);
1979
  }
1980
  };
1981
  }
@@ -1988,22 +1988,22 @@ function st(n) {
1988
  l[u] = it(et(n, c, u));
1989
  return {
1990
  c() {
1991
- e = T("div"), t = T("h4"), t.textContent = s, i = O(), r = T("pre");
1992
  for (let u = 0; u < l.length; u += 1)
1993
  l[u].c();
1994
  this.h();
1995
  },
1996
  l(u) {
1997
- e = C(u, "DIV", { class: !0 });
1998
  var a = L(e);
1999
- t = C(a, "H4", { class: !0, "data-svelte-h": !0 }), K(t) !== "svelte-18sigz6" && (t.textContent = s), i = N(a), r = C(a, "PRE", { class: !0 });
2000
  var o = L(r);
2001
  for (let p = 0; p < l.length; p += 1)
2002
  l[p].l(o);
2003
- o.forEach(x), a.forEach(x), this.h();
2004
  },
2005
  h() {
2006
- y(t, "class", "svelte-1stw26d"), y(r, "class", "diff-view svelte-1stw26d"), y(e, "class", "analysis-section svelte-1stw26d");
2007
  },
2008
  m(u, a) {
2009
  D(u, e, a), _(e, t), _(e, i), _(e, r);
@@ -2028,7 +2028,7 @@ function st(n) {
2028
  }
2029
  },
2030
  d(u) {
2031
- u && x(e), pn(l, u);
2032
  }
2033
  };
2034
  }
@@ -2039,19 +2039,19 @@ function it(n) {
2039
  ), s, i;
2040
  return {
2041
  c() {
2042
- e = T("span"), s = se(t), this.h();
2043
  },
2044
  l(r) {
2045
- e = C(r, "SPAN", { class: !0 });
2046
  var c = L(e);
2047
- s = te(c, t), c.forEach(x), this.h();
2048
  },
2049
  h() {
2050
  y(e, "class", i = "diff-part " + /*part*/
2051
  (n[13].added ? "added" : (
2052
  /*part*/
2053
  n[13].removed ? "removed" : "common"
2054
- )) + " svelte-1stw26d");
2055
  },
2056
  m(r, c) {
2057
  D(r, e, c), _(e, s);
@@ -2064,10 +2064,10 @@ function it(n) {
2064
  (r[13].added ? "added" : (
2065
  /*part*/
2066
  r[13].removed ? "removed" : "common"
2067
- )) + " svelte-1stw26d") && y(e, "class", i);
2068
  },
2069
  d(r) {
2070
- r && x(e);
2071
  }
2072
  };
2073
  }
@@ -2088,17 +2088,17 @@ function mn(n) {
2088
  let a = u(n), o = a(n);
2089
  return {
2090
  c() {
2091
- e = T("div"), c && c.c(), t = O(), s = T("div"), l && l.c(), i = O(), o.c(), this.h();
2092
  },
2093
  l(p) {
2094
- e = C(p, "DIV", { class: !0, id: !0, style: !0 });
2095
  var h = L(e);
2096
- c && c.l(h), t = N(h), s = C(h, "DIV", { class: !0 });
2097
  var d = L(s);
2098
- l && l.l(d), i = N(d), o.l(d), d.forEach(x), h.forEach(x), this.h();
2099
  },
2100
  h() {
2101
- y(s, "class", "code-analysis-viewer svelte-1stw26d"), y(e, "class", "gradio-container"), y(e, "id", r = /*elem_id*/
2102
  n[1] || null), ge(
2103
  e,
2104
  "width",
@@ -2150,11 +2150,11 @@ function mn(n) {
2150
  i: Ae,
2151
  o: Ae,
2152
  d(p) {
2153
- p && x(e), c && c.d(), l && l.d(), o.d();
2154
  }
2155
  };
2156
  }
2157
- function bn(n, e, t) {
2158
  let s;
2159
  m.setOptions({
2160
  breaks: !0,
@@ -2195,7 +2195,7 @@ function bn(n, e, t) {
2195
  }
2196
  class wn extends un {
2197
  constructor(e) {
2198
- super(), fn(this, e, bn, mn, dn, {
2199
  gradio: 10,
2200
  label: 0,
2201
  elem_id: 1,
 
1
+ var xt = Object.defineProperty;
2
+ var bt = (n, e, t) => e in n ? xt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var v = (n, e, t) => bt(n, typeof e != "symbol" ? e + "" : e, t);
4
  function V() {
5
  }
6
  V.prototype = {
 
28
  var g = -1 / 0, I = 1 / 0;
29
  function E() {
30
  for (var R = Math.max(g, -o); R <= Math.min(I, o); R += 2) {
31
+ var q = void 0, $ = f[R - 1], S = f[R + 1];
32
  $ && (f[R - 1] = void 0);
33
  var j = !1;
34
+ if (S) {
35
+ var W = S.oldPos - R;
36
+ j = S && 0 <= W && W < u;
37
  }
38
  var H = $ && $.oldPos + 1 < a;
39
  if (!j && !H) {
40
  f[R] = void 0;
41
  continue;
42
  }
43
+ if (!H || j && $.oldPos + 1 < S.oldPos ? q = c.addToPath(S, !0, void 0, 0) : q = c.addToPath($, void 0, !0, 1), k = c.extractCommon(q, t, e, R), q.oldPos + 1 >= a && k + 1 >= u)
44
  return l(wt(c, q.lastComponent, t, e, c.useLongestToken));
45
  f[R] = q, q.oldPos + 1 >= a && (I = Math.min(I, R - 1)), k + 1 >= u && (g = Math.max(g, R + 1));
46
  }
 
174
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
175
  }, ke(n);
176
  }
177
+ var zt = Object.prototype.toString, oe = new V();
178
  oe.useLongestToken = !0;
179
  oe.tokenize = lt.tokenize;
180
  oe.castInput = function(n) {
181
  var e = this.options, t = e.undefinedReplacement, s = e.stringifyReplacer, i = s === void 0 ? function(r, c) {
182
  return typeof c > "u" ? t : c;
183
  } : s;
184
+ return typeof n == "string" ? n : JSON.stringify(ze(n, null, null, i), i, " ");
185
  };
186
  oe.equals = function(n, e) {
187
  return V.prototype.equals.call(oe, n.replace(/,([\r\n])/g, "$1"), e.replace(/,([\r\n])/g, "$1"));
188
  };
189
+ function ze(n, e, t, s, i) {
190
  e = e || [], t = t || [], s && (n = s(i, n));
191
  var r;
192
  for (r = 0; r < e.length; r += 1)
193
  if (e[r] === n)
194
  return t[r];
195
  var c;
196
+ if (zt.call(n) === "[object Array]") {
197
  for (e.push(n), c = new Array(n.length), t.push(c), r = 0; r < n.length; r += 1)
198
+ c[r] = ze(n[r], e, t, s, i);
199
  return e.pop(), t.pop(), c;
200
  }
201
  if (n && n.toJSON && (n = n.toJSON()), ke(n) === "object" && n !== null) {
 
204
  for (u in n)
205
  n.hasOwnProperty(u) && l.push(u);
206
  for (l.sort(), r = 0; r < l.length; r += 1)
207
+ u = l[r], c[u] = ze(n[u], e, t, s, u);
208
  e.pop(), t.pop();
209
  } else
210
  c = n;
211
  return c;
212
  }
213
+ var Ce = new V();
214
+ Ce.tokenize = function(n) {
215
  return n.slice();
216
  };
217
+ Ce.join = Ce.removeEmpty = function(n) {
218
  return n;
219
  };
220
  function Le() {
 
304
  fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`),
305
  headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`),
306
  htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i")
307
+ }, Ct = /^(?:[ \t]*(?:\n|$))+/, Tt = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, St = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ce = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, $t = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ie = /(?:[*+-]|\d{1,9}[.)])/, ot = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ct = w(ot).replace(/bull/g, Ie).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), At = w(ot).replace(/bull/g, Ie).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ee = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Lt = /^[^\n]+/, Pe = /(?!\s*\])(?:\\.|[^\[\]\\])+/, It = w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Pe).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Et = w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ie).getRegex(), ve = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", De = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Pt = w(
308
  "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
309
  "i"
310
  ).replace("comment", De).replace("tag", ve).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ut = w(Ee).replace("hr", ce).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ve).getRegex(), Dt = w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ut).getRegex(), Be = {
311
  blockquote: Dt,
312
+ code: Tt,
313
  def: It,
314
+ fences: St,
315
  heading: $t,
316
  hr: ce,
317
  html: Pt,
318
  lheading: ct,
319
  list: Et,
320
+ newline: Ct,
321
  paragraph: ut,
322
  table: ae,
323
  text: Lt
 
345
  "gu"
346
  ).replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, _e).getRegex(), Xt = w(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), Jt = w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Yt = w(De).replace("(?:-->|$)", "-->").getRegex(), Kt = w(
347
  "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
348
+ ).replace("comment", Yt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xe = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, en = w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", xe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), kt = w(/^!?\[(label)\]\[(ref)\]/).replace("label", xe).replace("ref", Pe).getRegex(), mt = w(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pe).getRegex(), tn = w("reflink|nolink(?!\\()", "g").replace("reflink", kt).replace("nolink", mt).getRegex(), Ne = {
349
  _backpedal: ae,
350
  // only used for GFM url
351
  anyPunctuation: Xt,
 
368
  url: ae
369
  }, nn = {
370
  ...Ne,
371
+ link: w(/^!?\[(label)\]\((.*?)\)/).replace("label", xe).getRegex(),
372
+ reflink: w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", xe).getRegex()
373
+ }, Te = {
374
  ...Ne,
375
  emStrongRDelimAst: Wt,
376
  emStrongLDelim: Vt,
 
379
  del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
380
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
381
  }, sn = {
382
+ ...Te,
383
  br: w(ht).replace("{2,}", "*").getRegex(),
384
+ text: w(Te.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
385
  }, de = {
386
  normal: Be,
387
  gfm: Bt,
388
  pedantic: qt
389
  }, re = {
390
  normal: Ne,
391
+ gfm: Te,
392
  breaks: sn,
393
  pedantic: nn
394
  }, rn = {
 
481
  }).join(`
482
  `);
483
  }
484
+ var be = class {
485
  // set by the lexer
486
  constructor(n) {
487
  v(this, "options");
 
632
  for (; n; ) {
633
  const $ = n.split(`
634
  `, 1)[0];
635
+ let S;
636
+ if (h = $, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), S = h) : S = h.replace(this.rules.other.tabCharGlobal, " "), B.test(h) || R.test(h) || q.test(h) || I.test(h) || E.test(h))
637
  break;
638
+ if (S.search(this.rules.other.nonSpaceChar) >= f || !h.trim())
639
  o += `
640
+ ` + S.slice(f);
641
  else {
642
  if (d || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || B.test(p) || R.test(p) || E.test(p))
643
  break;
 
645
  ` + h;
646
  }
647
  !d && !h.trim() && (d = !0), a += $ + `
648
+ `, n = n.substring($.length + 1), p = S.slice(f);
649
  }
650
  }
651
  i.loose || (c ? i.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (c = !0));
 
963
  };
964
  }
965
  }
966
+ }, F = class Se {
967
  constructor(e) {
968
  v(this, "tokens");
969
  v(this, "options");
970
  v(this, "state");
971
  v(this, "tokenizer");
972
  v(this, "inlineQueue");
973
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || X, this.options.tokenizer = this.options.tokenizer || new be(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
974
  inLink: !1,
975
  inRawBlock: !1,
976
  top: !0
 
995
  * Static Lex Method
996
  */
997
  static lex(e, t) {
998
+ return new Se(t).lex(e);
999
  }
1000
  /**
1001
  * Static Lex Inline Method
1002
  */
1003
  static lexInline(e, t) {
1004
+ return new Se(t).inlineTokens(e);
1005
  }
1006
  /**
1007
  * Preprocessing
 
1583
  v(this, "Renderer", we);
1584
  v(this, "TextRenderer", Oe);
1585
  v(this, "Lexer", F);
1586
+ v(this, "Tokenizer", be);
1587
  v(this, "Hooks", me);
1588
  this.use(...n);
1589
  }
 
1656
  s.renderer = i;
1657
  }
1658
  if (t.tokenizer) {
1659
+ const i = this.defaults.tokenizer || new be(this.defaults);
1660
  for (const r in t.tokenizer) {
1661
  if (!(r in i))
1662
  throw new Error(`tokenizer '${r}' does not exist`);
 
1767
  m.TextRenderer = Oe;
1768
  m.Lexer = F;
1769
  m.lexer = F.lex;
1770
+ m.Tokenizer = be;
1771
  m.Hooks = me;
1772
  m.parse = m;
1773
  m.options;
 
1783
  append_hydration: _,
1784
  attr: y,
1785
  children: L,
1786
+ claim_element: z,
1787
  claim_html_tag: hn,
1788
  claim_space: N,
1789
  claim_text: te,
1790
  destroy_each: pn,
1791
+ detach: b,
1792
+ element: C,
1793
  ensure_array_like: Ke,
1794
  flush: Z,
1795
  get_svelte_dataset: K,
 
1817
  ), s;
1818
  return {
1819
  c() {
1820
+ e = C("div"), s = se(t), this.h();
1821
  },
1822
  l(i) {
1823
+ e = z(i, "DIV", { class: !0 });
1824
  var r = L(e);
1825
+ s = te(r, t), r.forEach(b), this.h();
1826
  },
1827
  h() {
1828
+ y(e, "class", "status-message svelte-18zx8pk"), ee(
1829
  e,
1830
  "error",
1831
  /*loading_status*/
 
1850
  );
1851
  },
1852
  d(i) {
1853
+ i && b(e);
1854
  }
1855
  };
1856
  }
 
1858
  let e, t;
1859
  return {
1860
  c() {
1861
+ e = C("div"), t = se(
1862
  /*label*/
1863
  n[0]
1864
  ), this.h();
1865
  },
1866
  l(s) {
1867
+ e = z(s, "DIV", { class: !0 });
1868
  var i = L(e);
1869
  t = te(
1870
  i,
1871
  /*label*/
1872
  n[0]
1873
+ ), i.forEach(b), this.h();
1874
  },
1875
  h() {
1876
  y(e, "class", "gradio-label");
 
1887
  );
1888
  },
1889
  d(s) {
1890
+ s && b(e);
1891
  }
1892
  };
1893
  }
 
1895
  let e, t = "No analysis data to display.";
1896
  return {
1897
  c() {
1898
+ e = C("p"), e.textContent = t, this.h();
1899
  },
1900
  l(s) {
1901
+ e = z(s, "P", { class: !0, "data-svelte-h": !0 }), K(e) !== "svelte-1q8w132" && (e.textContent = t), this.h();
1902
  },
1903
  h() {
1904
+ y(e, "class", "svelte-18zx8pk");
1905
  },
1906
  m(s, i) {
1907
  D(s, e, i);
1908
  },
1909
  p: Ae,
1910
  d(s) {
1911
+ s && b(e);
1912
  }
1913
  };
1914
  }
 
1919
  ), u, a, o, p, h = "Issue:", d, f, k = (
1920
  /*display_value*/
1921
  n[8].issue + ""
1922
+ ), g, I, E, B, R = "Reason:", q, $, S = (
1923
  /*display_value*/
1924
  n[8].reason + ""
1925
  ), j, W, H, G, J, Ze = "Feedback", ye, Y, ie, ue = m.parse(
 
1931
  );
1932
  return {
1933
  c() {
1934
+ e = C("div"), t = C("h4"), t.textContent = s, i = O(), r = C("pre"), c = C("code"), u = se(l), a = O(), o = C("div"), p = C("h4"), p.textContent = h, d = O(), f = C("p"), g = se(k), I = O(), E = C("div"), B = C("h4"), B.textContent = R, q = O(), $ = C("p"), j = se(S), W = O(), A && A.c(), H = O(), G = C("div"), J = C("h3"), J.textContent = Ze, ye = O(), Y = C("div"), ie = new cn(!1), this.h();
1935
  },
1936
+ l(x) {
1937
+ e = z(x, "DIV", { class: !0 });
1938
+ var T = L(e);
1939
+ t = z(T, "H4", { class: !0, "data-svelte-h": !0 }), K(t) !== "svelte-1y38fdw" && (t.textContent = s), i = N(T), r = z(T, "PRE", { class: !0 });
1940
  var Me = L(r);
1941
+ c = z(Me, "CODE", { class: !0 });
1942
  var He = L(c);
1943
+ u = te(He, l), He.forEach(b), Me.forEach(b), T.forEach(b), a = N(x), o = z(x, "DIV", { class: !0 });
1944
  var he = L(o);
1945
+ p = z(he, "H4", { class: !0, "data-svelte-h": !0 }), K(p) !== "svelte-1663oc9" && (p.textContent = h), d = N(he), f = z(he, "P", { class: !0 });
1946
  var Ge = L(f);
1947
+ g = te(Ge, k), Ge.forEach(b), he.forEach(b), I = N(x), E = z(x, "DIV", { class: !0 });
1948
  var pe = L(E);
1949
+ B = z(pe, "H4", { class: !0, "data-svelte-h": !0 }), K(B) !== "svelte-14axvnc" && (B.textContent = R), q = N(pe), $ = z(pe, "P", { class: !0 });
1950
  var Fe = L($);
1951
+ j = te(Fe, S), Fe.forEach(b), pe.forEach(b), W = N(x), A && A.l(x), H = N(x), G = z(x, "DIV", { class: !0 });
1952
  var fe = L(G);
1953
+ J = z(fe, "H3", { "data-svelte-h": !0 }), K(J) !== "svelte-76jzqn" && (J.textContent = Ze), ye = N(fe), Y = z(fe, "DIV", { class: !0 });
1954
  var Qe = L(Y);
1955
+ ie = hn(Qe, !1), Qe.forEach(b), fe.forEach(b), this.h();
1956
  },
1957
  h() {
1958
+ y(t, "class", "svelte-18zx8pk"), y(c, "class", "svelte-18zx8pk"), y(r, "class", "svelte-18zx8pk"), y(e, "class", "analysis-section svelte-18zx8pk"), y(p, "class", "svelte-18zx8pk"), y(f, "class", "svelte-18zx8pk"), y(o, "class", "analysis-section svelte-18zx8pk"), y(B, "class", "svelte-18zx8pk"), y($, "class", "svelte-18zx8pk"), y(E, "class", "analysis-section svelte-18zx8pk"), ie.a = null, y(Y, "class", "markdown-content svelte-18zx8pk"), y(G, "class", "feedback-section svelte-18zx8pk");
1959
  },
1960
+ m(x, T) {
1961
+ D(x, e, T), _(e, t), _(e, i), _(e, r), _(r, c), _(c, u), D(x, a, T), D(x, o, T), _(o, p), _(o, d), _(o, f), _(f, g), D(x, I, T), D(x, E, T), _(E, B), _(E, q), _(E, $), _($, j), D(x, W, T), A && A.m(x, T), D(x, H, T), D(x, G, T), _(G, J), _(G, ye), _(G, Y), ie.m(ue, Y);
1962
  },
1963
+ p(x, T) {
1964
+ T & /*display_value*/
1965
  256 && l !== (l = /*display_value*/
1966
+ x[8].code + "") && ne(u, l), T & /*display_value*/
1967
  256 && k !== (k = /*display_value*/
1968
+ x[8].issue + "") && ne(g, k), T & /*display_value*/
1969
+ 256 && S !== (S = /*display_value*/
1970
+ x[8].reason + "") && ne(j, S), /*display_value*/
1971
+ x[8].fixed_code ? A ? A.p(x, T) : (A = st(x), A.c(), A.m(H.parentNode, H)) : A && (A.d(1), A = null), T & /*display_value*/
1972
  256 && ue !== (ue = m.parse(
1973
  /*display_value*/
1974
+ x[8].feedback || ""
1975
  ) + "") && ie.p(ue);
1976
  },
1977
+ d(x) {
1978
+ x && (b(e), b(a), b(o), b(I), b(E), b(W), b(H), b(G)), A && A.d(x);
1979
  }
1980
  };
1981
  }
 
1988
  l[u] = it(et(n, c, u));
1989
  return {
1990
  c() {
1991
+ e = C("div"), t = C("h4"), t.textContent = s, i = O(), r = C("pre");
1992
  for (let u = 0; u < l.length; u += 1)
1993
  l[u].c();
1994
  this.h();
1995
  },
1996
  l(u) {
1997
+ e = z(u, "DIV", { class: !0 });
1998
  var a = L(e);
1999
+ t = z(a, "H4", { class: !0, "data-svelte-h": !0 }), K(t) !== "svelte-18sigz6" && (t.textContent = s), i = N(a), r = z(a, "PRE", { class: !0 });
2000
  var o = L(r);
2001
  for (let p = 0; p < l.length; p += 1)
2002
  l[p].l(o);
2003
+ o.forEach(b), a.forEach(b), this.h();
2004
  },
2005
  h() {
2006
+ y(t, "class", "svelte-18zx8pk"), y(r, "class", "diff-view svelte-18zx8pk"), y(e, "class", "analysis-section svelte-18zx8pk");
2007
  },
2008
  m(u, a) {
2009
  D(u, e, a), _(e, t), _(e, i), _(e, r);
 
2028
  }
2029
  },
2030
  d(u) {
2031
+ u && b(e), pn(l, u);
2032
  }
2033
  };
2034
  }
 
2039
  ), s, i;
2040
  return {
2041
  c() {
2042
+ e = C("span"), s = se(t), this.h();
2043
  },
2044
  l(r) {
2045
+ e = z(r, "SPAN", { class: !0 });
2046
  var c = L(e);
2047
+ s = te(c, t), c.forEach(b), this.h();
2048
  },
2049
  h() {
2050
  y(e, "class", i = "diff-part " + /*part*/
2051
  (n[13].added ? "added" : (
2052
  /*part*/
2053
  n[13].removed ? "removed" : "common"
2054
+ )) + " svelte-18zx8pk");
2055
  },
2056
  m(r, c) {
2057
  D(r, e, c), _(e, s);
 
2064
  (r[13].added ? "added" : (
2065
  /*part*/
2066
  r[13].removed ? "removed" : "common"
2067
+ )) + " svelte-18zx8pk") && y(e, "class", i);
2068
  },
2069
  d(r) {
2070
+ r && b(e);
2071
  }
2072
  };
2073
  }
 
2088
  let a = u(n), o = a(n);
2089
  return {
2090
  c() {
2091
+ e = C("div"), c && c.c(), t = O(), s = C("div"), l && l.c(), i = O(), o.c(), this.h();
2092
  },
2093
  l(p) {
2094
+ e = z(p, "DIV", { class: !0, id: !0, style: !0 });
2095
  var h = L(e);
2096
+ c && c.l(h), t = N(h), s = z(h, "DIV", { class: !0 });
2097
  var d = L(s);
2098
+ l && l.l(d), i = N(d), o.l(d), d.forEach(b), h.forEach(b), this.h();
2099
  },
2100
  h() {
2101
+ y(s, "class", "code-analysis-viewer svelte-18zx8pk"), y(e, "class", "gradio-container"), y(e, "id", r = /*elem_id*/
2102
  n[1] || null), ge(
2103
  e,
2104
  "width",
 
2150
  i: Ae,
2151
  o: Ae,
2152
  d(p) {
2153
+ p && b(e), c && c.d(), l && l.d(), o.d();
2154
  }
2155
  };
2156
  }
2157
+ function xn(n, e, t) {
2158
  let s;
2159
  m.setOptions({
2160
  breaks: !0,
 
2195
  }
2196
  class wn extends un {
2197
  constructor(e) {
2198
+ super(), fn(this, e, xn, mn, dn, {
2199
  gradio: 10,
2200
  label: 0,
2201
  elem_id: 1,
src/backend/gradio_codeanalysisviewer/templates/component/style.css CHANGED
@@ -1 +1 @@
1
- .code-analysis-viewer.svelte-1stw26d.svelte-1stw26d{font-family:var(--font-mono, monospace);font-size:var(--text-sm, 14px);color:var(--body-text-color, #333);border:1px solid var(--border-color-primary, #e0e0e0);border-radius:var(--radius-lg, 8px);padding:var(--spacing-lg, 16px);background-color:var(--background-fill-primary, #f9f9f9)}.analysis-section.svelte-1stw26d.svelte-1stw26d{margin-bottom:var(--spacing-lg, 16px);padding-bottom:var(--spacing-md, 12px);border-bottom:1px solid var(--border-color-secondary, #eee)}.analysis-section.svelte-1stw26d.svelte-1stw26d:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.analysis-section.svelte-1stw26d h4.svelte-1stw26d{font-weight:var(--font-weight-semibold, 600);color:var(--text-color-strong, #222);margin-top:0;margin-bottom:var(--spacing-sm, 8px);font-size:var(--text-md, 16px)}pre.svelte-1stw26d.svelte-1stw26d{background-color:var(--background-fill-secondary, #f0f0f0);padding:var(--spacing-md, 12px);border-radius:var(--radius-md, 6px);overflow-x:auto;white-space:pre-wrap;word-wrap:break-word}code.svelte-1stw26d.svelte-1stw26d{font-family:var(--font-mono, monospace)}p.svelte-1stw26d.svelte-1stw26d{line-height:1.6;margin-top:0;margin-bottom:4px}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:#333;overflow-wrap:break-word;word-break:break-word;max-width:100%}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d p{margin-bottom:8px}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d ul,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d ol{padding-left:20px;margin-bottom:8px}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d li{margin-bottom:4px}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background-color:#e6f3ff;padding:2px 4px;border-radius:4px;font-size:.9em}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d pre{background-color:#f0f0f0;padding:12px;border-radius:6px;overflow-x:auto;margin-bottom:12px}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d pre code{background-color:transparent;padding:0;border-radius:0}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h1,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h2,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h3,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h4,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h5,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h6{margin-top:16px;margin-bottom:12px;font-weight:600;line-height:1.25;color:#111}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h3{font-size:1.25rem}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d h4{font-size:1.1rem}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d a{color:#3b82f6;text-decoration:none}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d a:hover{text-decoration:underline}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d blockquote{padding:12px 16px;margin:12px 0;border-left:4px solid #3B82F6;background-color:#f5f5f5;color:#555}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d hr{height:1px;background-color:#e0e0e0;border:none;margin:16px 0}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d table{border-collapse:collapse;width:100%;margin:12px 0}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d th,.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d td{border:1px solid #eee;padding:8px;text-align:left}.feedback-section.svelte-1stw26d .markdown-content.svelte-1stw26d th{background-color:#f0f0f0;font-weight:600}.diff-view.svelte-1stw26d.svelte-1stw26d{white-space:pre-wrap;word-wrap:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background-color:#f0f0f0;padding:12px;border-radius:6px;overflow-x:auto}.status-message.svelte-1stw26d.svelte-1stw26d{padding:12px;margin-bottom:12px;border-radius:6px;background-color:#f0f0f0}.status-message.error.svelte-1stw26d.svelte-1stw26d{background-color:#ffe6e6;color:#8b0000}.diff-part.added.svelte-1stw26d.svelte-1stw26d{background-color:#cbe1d1;color:#006400}.diff-part.removed.svelte-1stw26d.svelte-1stw26d{background-color:#ffebe9;color:#b30000;text-decoration:line-through}.diff-part.common.svelte-1stw26d.svelte-1stw26d{color:#333;background-color:#fcfcfc;padding:0 2px}
 
1
+ .code-analysis-viewer.svelte-18zx8pk.svelte-18zx8pk{font-family:var(--font-mono, monospace);font-size:var(--text-sm, 14px);color:var(--body-text-color, #333);border:1px solid var(--border-color-primary, #e0e0e0);border-radius:var(--radius-lg, 8px);padding:var(--spacing-lg, 16px);background-color:var(--background-fill-primary, #f9f9f9)}.analysis-section.svelte-18zx8pk.svelte-18zx8pk{margin-bottom:var(--spacing-lg, 16px);padding-bottom:var(--spacing-md, 12px);border-bottom:1px solid var(--border-color-secondary, #eee)}.analysis-section.svelte-18zx8pk.svelte-18zx8pk:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.analysis-section.svelte-18zx8pk h4.svelte-18zx8pk{font-weight:var(--font-weight-semibold, 600);color:var(--text-color-strong, #222);margin-top:0;margin-bottom:var(--spacing-sm, 8px);font-size:var(--text-md, 16px)}pre.svelte-18zx8pk.svelte-18zx8pk{background-color:var(--background-fill-secondary, #f0f0f0);padding:var(--spacing-md, 12px);border-radius:var(--radius-md, 6px);overflow-x:auto;white-space:pre-wrap;word-wrap:break-word}code.svelte-18zx8pk.svelte-18zx8pk{font-family:var(--font-mono, monospace)}p.svelte-18zx8pk.svelte-18zx8pk{line-height:1.6;margin-top:0;margin-bottom:4px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:#aeabab;background-color:#0b0000;overflow-wrap:break-word;word-break:break-word;max-width:100%}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk p{margin-bottom:8px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk ul,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk ol{padding-left:20px;margin-bottom:8px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk li{margin-bottom:4px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;background-color:#e6f3ff;padding:2px 4px;border-radius:4px;font-size:.9em}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk pre{background-color:#f0f0f0;padding:12px;border-radius:6px;overflow-x:auto;margin-bottom:12px}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk pre code{background-color:transparent;padding:0;border-radius:0}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h1,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h2,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h3,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h4,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h5,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h6{margin-top:16px;margin-bottom:12px;font-weight:600;line-height:1.25;color:#c17979}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h3{font-size:1.25rem}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk h4{font-size:1.1rem}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk a{color:#3b82f6;text-decoration:none}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk a:hover{text-decoration:underline}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk blockquote{padding:12px 16px;margin:12px 0;border-left:4px solid #3B82F6;background-color:#f5f5f5;color:#555}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk hr{height:1px;background-color:#d5d0d0;border:none;margin:16px 0}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk table{border-collapse:collapse;width:100%;margin:12px 0}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk th,.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk td{border:1px solid #eee;padding:8px;text-align:left}.feedback-section.svelte-18zx8pk .markdown-content.svelte-18zx8pk th{background-color:#f0f0f0;font-weight:600}.diff-view.svelte-18zx8pk.svelte-18zx8pk{white-space:pre-wrap;word-wrap:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background-color:#f0f0f0;padding:12px;border-radius:6px;overflow-x:auto}.status-message.svelte-18zx8pk.svelte-18zx8pk{padding:12px;margin-bottom:12px;border-radius:6px;background-color:#ede5e5}.status-message.error.svelte-18zx8pk.svelte-18zx8pk{background-color:#ffe6e6;color:#8b0000}.diff-part.added.svelte-18zx8pk.svelte-18zx8pk{background-color:#cbe1d1;color:#006400}.diff-part.removed.svelte-18zx8pk.svelte-18zx8pk{background-color:#ffebe9;color:#b30000;text-decoration:line-through}.diff-part.common.svelte-18zx8pk.svelte-18zx8pk{color:#333;background-color:#fcfcfc;padding:0 2px}
src/frontend/Index.svelte CHANGED
@@ -173,7 +173,8 @@
173
  .feedback-section .markdown-content {
174
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
175
  line-height: 1.6;
176
- color: #333;
 
177
  overflow-wrap: break-word;
178
  word-break: break-word;
179
  max-width: 100%;
@@ -220,7 +221,7 @@
220
  margin-bottom: 12px;
221
  font-weight: 600;
222
  line-height: 1.25;
223
- color: #111;
224
  }
225
 
226
  .feedback-section .markdown-content :global(h3) {
@@ -250,7 +251,7 @@
250
 
251
  .feedback-section .markdown-content :global(hr) {
252
  height: 1px;
253
- background-color: #e0e0e0;
254
  border: none;
255
  margin: 16px 0;
256
  }
@@ -289,7 +290,7 @@
289
  padding: 12px;
290
  margin-bottom: 12px;
291
  border-radius: 6px;
292
- background-color: #f0f0f0;
293
  }
294
 
295
  .status-message.error {
 
173
  .feedback-section .markdown-content {
174
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
175
  line-height: 1.6;
176
+ color: #aeabab;
177
+ background-color: #0b0000;
178
  overflow-wrap: break-word;
179
  word-break: break-word;
180
  max-width: 100%;
 
221
  margin-bottom: 12px;
222
  font-weight: 600;
223
  line-height: 1.25;
224
+ color: #c17979;
225
  }
226
 
227
  .feedback-section .markdown-content :global(h3) {
 
251
 
252
  .feedback-section .markdown-content :global(hr) {
253
  height: 1px;
254
+ background-color: #d5d0d0;
255
  border: none;
256
  margin: 16px 0;
257
  }
 
290
  padding: 12px;
291
  margin-bottom: 12px;
292
  border-radius: 6px;
293
+ background-color: #ede5e5;
294
  }
295
 
296
  .status-message.error {
src/pyproject.toml CHANGED
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
8
 
9
  [project]
10
  name = "gradio_codeanalysisviewer"
11
- version = "0.0.2"
12
  description = "A nicer view to show the Agentic code analyser outputs"
13
  readme = "README.md"
14
  license = "MIT"
 
8
 
9
  [project]
10
  name = "gradio_codeanalysisviewer"
11
+ version = "0.0.3"
12
  description = "A nicer view to show the Agentic code analyser outputs"
13
  readme = "README.md"
14
  license = "MIT"