Update v0.0.4
Browse files
README.md
CHANGED
|
@@ -6,7 +6,7 @@ tags:
|
|
| 6 |
- textbox
|
| 7 |
- editing
|
| 8 |
- color
|
| 9 |
-
title: gradio_highlightedtextbox V0.0.
|
| 10 |
colorFrom: indigo
|
| 11 |
colorTo: green
|
| 12 |
sdk: docker
|
|
|
|
| 6 |
- textbox
|
| 7 |
- editing
|
| 8 |
- color
|
| 9 |
+
title: gradio_highlightedtextbox V0.0.4
|
| 10 |
colorFrom: indigo
|
| 11 |
colorTo: green
|
| 12 |
sdk: docker
|
src/backend/gradio_highlightedtextbox/templates/component/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
| 1 |
const {
|
| 2 |
-
SvelteComponent:
|
| 3 |
-
assign:
|
| 4 |
-
create_slot:
|
| 5 |
-
detach:
|
| 6 |
-
element:
|
| 7 |
-
get_all_dirty_from_scope:
|
| 8 |
-
get_slot_changes:
|
| 9 |
-
get_spread_update:
|
| 10 |
-
init:
|
| 11 |
-
insert:
|
| 12 |
-
safe_not_equal:
|
| 13 |
set_dynamic_element_data: et,
|
| 14 |
set_style: A,
|
| 15 |
toggle_class: te,
|
| 16 |
transition_in: Ot,
|
| 17 |
transition_out: It,
|
| 18 |
-
update_slot_base:
|
| 19 |
} = window.__gradio__svelte__internal;
|
| 20 |
-
function
|
| 21 |
let e, t, l;
|
| 22 |
const i = (
|
| 23 |
/*#slots*/
|
| 24 |
n[18].default
|
| 25 |
-
), o =
|
| 26 |
i,
|
| 27 |
n,
|
| 28 |
/*$$scope*/
|
|
@@ -44,10 +44,10 @@ function bl(n) {
|
|
| 44 |
}
|
| 45 |
], r = {};
|
| 46 |
for (let f = 0; f < s.length; f += 1)
|
| 47 |
-
r =
|
| 48 |
return {
|
| 49 |
c() {
|
| 50 |
-
e =
|
| 51 |
/*tag*/
|
| 52 |
n[14]
|
| 53 |
), o && o.c(), et(
|
|
@@ -105,23 +105,23 @@ function bl(n) {
|
|
| 105 |
n[13]}px, 100%))`), A(e, "border-width", "var(--block-border-width)");
|
| 106 |
},
|
| 107 |
m(f, a) {
|
| 108 |
-
|
| 109 |
},
|
| 110 |
p(f, a) {
|
| 111 |
o && o.p && (!l || a & /*$$scope*/
|
| 112 |
-
131072) &&
|
| 113 |
o,
|
| 114 |
i,
|
| 115 |
f,
|
| 116 |
/*$$scope*/
|
| 117 |
f[17],
|
| 118 |
-
l ?
|
| 119 |
i,
|
| 120 |
/*$$scope*/
|
| 121 |
f[17],
|
| 122 |
a,
|
| 123 |
null
|
| 124 |
-
) :
|
| 125 |
/*$$scope*/
|
| 126 |
f[17]
|
| 127 |
),
|
|
@@ -129,7 +129,7 @@ function bl(n) {
|
|
| 129 |
), et(
|
| 130 |
/*tag*/
|
| 131 |
f[14]
|
| 132 |
-
)(e, r =
|
| 133 |
(!l || a & /*test_id*/
|
| 134 |
128) && { "data-testid": (
|
| 135 |
/*test_id*/
|
|
@@ -207,14 +207,14 @@ function bl(n) {
|
|
| 207 |
It(o, f), l = !1;
|
| 208 |
},
|
| 209 |
d(f) {
|
| 210 |
-
f &&
|
| 211 |
}
|
| 212 |
};
|
| 213 |
}
|
| 214 |
-
function
|
| 215 |
let e, t = (
|
| 216 |
/*tag*/
|
| 217 |
-
n[14] &&
|
| 218 |
);
|
| 219 |
return {
|
| 220 |
c() {
|
|
@@ -238,7 +238,7 @@ function gl(n) {
|
|
| 238 |
}
|
| 239 |
};
|
| 240 |
}
|
| 241 |
-
function
|
| 242 |
let { $$slots: l = {}, $$scope: i } = e, { height: o = void 0 } = e, { width: s = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: f = [] } = e, { variant: a = "solid" } = e, { border_mode: _ = "base" } = e, { padding: u = !0 } = e, { type: c = "normal" } = e, { test_id: m = void 0 } = e, { explicit_call: p = !1 } = e, { container: T = !0 } = e, { visible: S = !0 } = e, { allow_overflow: L = !0 } = e, { scale: C = null } = e, { min_width: d = 0 } = e, y = c === "fieldset" ? "fieldset" : "div";
|
| 243 |
const M = (g) => {
|
| 244 |
if (g !== void 0) {
|
|
@@ -272,9 +272,9 @@ function hl(n, e, t) {
|
|
| 272 |
l
|
| 273 |
];
|
| 274 |
}
|
| 275 |
-
class
|
| 276 |
constructor(e) {
|
| 277 |
-
super(),
|
| 278 |
height: 0,
|
| 279 |
width: 1,
|
| 280 |
elem_id: 2,
|
|
@@ -294,26 +294,26 @@ class wl extends nl {
|
|
| 294 |
}
|
| 295 |
}
|
| 296 |
const {
|
| 297 |
-
SvelteComponent:
|
| 298 |
-
attr:
|
| 299 |
-
create_slot:
|
| 300 |
-
detach:
|
| 301 |
-
element:
|
| 302 |
-
get_all_dirty_from_scope:
|
| 303 |
-
get_slot_changes:
|
| 304 |
-
init:
|
| 305 |
-
insert:
|
| 306 |
-
safe_not_equal:
|
| 307 |
-
transition_in:
|
| 308 |
-
transition_out:
|
| 309 |
-
update_slot_base:
|
| 310 |
} = window.__gradio__svelte__internal;
|
| 311 |
-
function
|
| 312 |
let e, t;
|
| 313 |
const l = (
|
| 314 |
/*#slots*/
|
| 315 |
n[1].default
|
| 316 |
-
), i =
|
| 317 |
l,
|
| 318 |
n,
|
| 319 |
/*$$scope*/
|
|
@@ -322,26 +322,26 @@ function jl(n) {
|
|
| 322 |
);
|
| 323 |
return {
|
| 324 |
c() {
|
| 325 |
-
e =
|
| 326 |
},
|
| 327 |
m(o, s) {
|
| 328 |
-
|
| 329 |
},
|
| 330 |
p(o, [s]) {
|
| 331 |
i && i.p && (!t || s & /*$$scope*/
|
| 332 |
-
1) &&
|
| 333 |
i,
|
| 334 |
l,
|
| 335 |
o,
|
| 336 |
/*$$scope*/
|
| 337 |
o[0],
|
| 338 |
-
t ?
|
| 339 |
l,
|
| 340 |
/*$$scope*/
|
| 341 |
o[0],
|
| 342 |
s,
|
| 343 |
null
|
| 344 |
-
) :
|
| 345 |
/*$$scope*/
|
| 346 |
o[0]
|
| 347 |
),
|
|
@@ -349,65 +349,65 @@ function jl(n) {
|
|
| 349 |
);
|
| 350 |
},
|
| 351 |
i(o) {
|
| 352 |
-
t || (
|
| 353 |
},
|
| 354 |
o(o) {
|
| 355 |
-
|
| 356 |
},
|
| 357 |
d(o) {
|
| 358 |
-
o &&
|
| 359 |
}
|
| 360 |
};
|
| 361 |
}
|
| 362 |
-
function
|
| 363 |
let { $$slots: l = {}, $$scope: i } = e;
|
| 364 |
return n.$$set = (o) => {
|
| 365 |
"$$scope" in o && t(0, i = o.$$scope);
|
| 366 |
}, [i, l];
|
| 367 |
}
|
| 368 |
-
class
|
| 369 |
constructor(e) {
|
| 370 |
-
super(),
|
| 371 |
}
|
| 372 |
}
|
| 373 |
const {
|
| 374 |
-
SvelteComponent:
|
| 375 |
attr: tt,
|
| 376 |
-
check_outros:
|
| 377 |
-
create_component:
|
| 378 |
-
create_slot:
|
| 379 |
-
destroy_component:
|
| 380 |
detach: je,
|
| 381 |
-
element:
|
| 382 |
-
empty:
|
| 383 |
-
get_all_dirty_from_scope:
|
| 384 |
-
get_slot_changes:
|
| 385 |
-
group_outros:
|
| 386 |
-
init:
|
| 387 |
insert: Ve,
|
| 388 |
-
mount_component:
|
| 389 |
-
safe_not_equal:
|
| 390 |
-
set_data:
|
| 391 |
-
space:
|
| 392 |
-
text:
|
| 393 |
toggle_class: ge,
|
| 394 |
transition_in: Se,
|
| 395 |
transition_out: Ae,
|
| 396 |
-
update_slot_base:
|
| 397 |
} = window.__gradio__svelte__internal;
|
| 398 |
function lt(n) {
|
| 399 |
let e, t;
|
| 400 |
-
return e = new
|
| 401 |
props: {
|
| 402 |
-
$$slots: { default: [
|
| 403 |
$$scope: { ctx: n }
|
| 404 |
}
|
| 405 |
}), {
|
| 406 |
c() {
|
| 407 |
-
|
| 408 |
},
|
| 409 |
m(l, i) {
|
| 410 |
-
|
| 411 |
},
|
| 412 |
p(l, i) {
|
| 413 |
const o = {};
|
|
@@ -421,15 +421,15 @@ function lt(n) {
|
|
| 421 |
Ae(e.$$.fragment, l), t = !1;
|
| 422 |
},
|
| 423 |
d(l) {
|
| 424 |
-
|
| 425 |
}
|
| 426 |
};
|
| 427 |
}
|
| 428 |
-
function
|
| 429 |
let e;
|
| 430 |
return {
|
| 431 |
c() {
|
| 432 |
-
e =
|
| 433 |
/*info*/
|
| 434 |
n[1]
|
| 435 |
);
|
|
@@ -439,7 +439,7 @@ function xl(n) {
|
|
| 439 |
},
|
| 440 |
p(t, l) {
|
| 441 |
l & /*info*/
|
| 442 |
-
2 &&
|
| 443 |
e,
|
| 444 |
/*info*/
|
| 445 |
t[1]
|
|
@@ -450,12 +450,12 @@ function xl(n) {
|
|
| 450 |
}
|
| 451 |
};
|
| 452 |
}
|
| 453 |
-
function
|
| 454 |
let e, t, l, i;
|
| 455 |
const o = (
|
| 456 |
/*#slots*/
|
| 457 |
n[2].default
|
| 458 |
-
), s =
|
| 459 |
o,
|
| 460 |
n,
|
| 461 |
/*$$scope*/
|
|
@@ -468,7 +468,7 @@ function $l(n) {
|
|
| 468 |
);
|
| 469 |
return {
|
| 470 |
c() {
|
| 471 |
-
e =
|
| 472 |
n[0]), ge(e, "hide", !/*show_label*/
|
| 473 |
n[0]), ge(
|
| 474 |
e,
|
|
@@ -482,19 +482,19 @@ function $l(n) {
|
|
| 482 |
},
|
| 483 |
p(f, [a]) {
|
| 484 |
s && s.p && (!i || a & /*$$scope*/
|
| 485 |
-
8) &&
|
| 486 |
s,
|
| 487 |
o,
|
| 488 |
f,
|
| 489 |
/*$$scope*/
|
| 490 |
f[3],
|
| 491 |
-
i ?
|
| 492 |
o,
|
| 493 |
/*$$scope*/
|
| 494 |
f[3],
|
| 495 |
a,
|
| 496 |
null
|
| 497 |
-
) :
|
| 498 |
/*$$scope*/
|
| 499 |
f[3]
|
| 500 |
),
|
|
@@ -511,9 +511,9 @@ function $l(n) {
|
|
| 511 |
f[1] != null
|
| 512 |
), /*info*/
|
| 513 |
f[1] ? r ? (r.p(f, a), a & /*info*/
|
| 514 |
-
2 && Se(r, 1)) : (r = lt(f), r.c(), Se(r, 1), r.m(l.parentNode, l)) : r && (
|
| 515 |
r = null;
|
| 516 |
-
}),
|
| 517 |
},
|
| 518 |
i(f) {
|
| 519 |
i || (Se(s, f), Se(r), i = !0);
|
|
@@ -526,81 +526,81 @@ function $l(n) {
|
|
| 526 |
}
|
| 527 |
};
|
| 528 |
}
|
| 529 |
-
function
|
| 530 |
let { $$slots: l = {}, $$scope: i } = e, { show_label: o = !0 } = e, { info: s = void 0 } = e;
|
| 531 |
return n.$$set = (r) => {
|
| 532 |
"show_label" in r && t(0, o = r.show_label), "info" in r && t(1, s = r.info), "$$scope" in r && t(3, i = r.$$scope);
|
| 533 |
}, [o, s, l, i];
|
| 534 |
}
|
| 535 |
-
class
|
| 536 |
constructor(e) {
|
| 537 |
-
super(),
|
| 538 |
}
|
| 539 |
}
|
| 540 |
const {
|
| 541 |
-
SvelteComponent:
|
| 542 |
-
append:
|
| 543 |
attr: le,
|
| 544 |
-
detach:
|
| 545 |
-
init:
|
| 546 |
-
insert:
|
| 547 |
noop: Be,
|
| 548 |
-
safe_not_equal:
|
| 549 |
svg_element: nt
|
| 550 |
} = window.__gradio__svelte__internal;
|
| 551 |
-
function
|
| 552 |
let e, t;
|
| 553 |
return {
|
| 554 |
c() {
|
| 555 |
e = nt("svg"), t = nt("polyline"), le(t, "points", "20 6 9 17 4 12"), le(e, "xmlns", "http://www.w3.org/2000/svg"), le(e, "viewBox", "2 0 20 20"), le(e, "fill", "none"), le(e, "stroke", "currentColor"), le(e, "stroke-width", "3"), le(e, "stroke-linecap", "round"), le(e, "stroke-linejoin", "round");
|
| 556 |
},
|
| 557 |
m(l, i) {
|
| 558 |
-
|
| 559 |
},
|
| 560 |
p: Be,
|
| 561 |
i: Be,
|
| 562 |
o: Be,
|
| 563 |
d(l) {
|
| 564 |
-
l &&
|
| 565 |
}
|
| 566 |
};
|
| 567 |
}
|
| 568 |
-
class
|
| 569 |
constructor(e) {
|
| 570 |
-
super(),
|
| 571 |
}
|
| 572 |
}
|
| 573 |
const {
|
| 574 |
-
SvelteComponent:
|
| 575 |
append: it,
|
| 576 |
attr: ae,
|
| 577 |
-
detach:
|
| 578 |
-
init:
|
| 579 |
-
insert:
|
| 580 |
noop: Re,
|
| 581 |
-
safe_not_equal:
|
| 582 |
svg_element: De
|
| 583 |
} = window.__gradio__svelte__internal;
|
| 584 |
-
function
|
| 585 |
let e, t, l;
|
| 586 |
return {
|
| 587 |
c() {
|
| 588 |
e = De("svg"), t = De("path"), l = De("path"), ae(t, "fill", "currentColor"), ae(t, "d", "M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z"), ae(l, "fill", "currentColor"), ae(l, "d", "M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z"), ae(e, "xmlns", "http://www.w3.org/2000/svg"), ae(e, "viewBox", "0 0 33 33"), ae(e, "color", "currentColor");
|
| 589 |
},
|
| 590 |
m(i, o) {
|
| 591 |
-
|
| 592 |
},
|
| 593 |
p: Re,
|
| 594 |
i: Re,
|
| 595 |
o: Re,
|
| 596 |
d(i) {
|
| 597 |
-
i &&
|
| 598 |
}
|
| 599 |
};
|
| 600 |
}
|
| 601 |
-
class
|
| 602 |
constructor(e) {
|
| 603 |
-
super(),
|
| 604 |
}
|
| 605 |
}
|
| 606 |
const ot = [
|
|
@@ -614,7 +614,7 @@ const ot = [
|
|
| 614 |
"cyan",
|
| 615 |
"lime",
|
| 616 |
"pink"
|
| 617 |
-
],
|
| 618 |
{ color: "red", primary: 600, secondary: 100 },
|
| 619 |
{ color: "green", primary: 600, secondary: 100 },
|
| 620 |
{ color: "blue", primary: 600, secondary: 100 },
|
|
@@ -917,7 +917,7 @@ const ot = [
|
|
| 917 |
900: "#881337",
|
| 918 |
950: "#4c0519"
|
| 919 |
}
|
| 920 |
-
}, ft =
|
| 921 |
(n, { color: e, primary: t, secondary: l }) => ({
|
| 922 |
...n,
|
| 923 |
[e]: {
|
|
@@ -926,33 +926,33 @@ const ot = [
|
|
| 926 |
}
|
| 927 |
}),
|
| 928 |
{}
|
| 929 |
-
),
|
| 930 |
function ze() {
|
| 931 |
}
|
| 932 |
-
const
|
| 933 |
-
function
|
| 934 |
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
| 935 |
}
|
| 936 |
const Ut = typeof window < "u";
|
| 937 |
let rt = Ut ? () => window.performance.now() : () => Date.now(), Wt = Ut ? (n) => requestAnimationFrame(n) : ze;
|
| 938 |
-
const
|
| 939 |
function Xt(n) {
|
| 940 |
-
|
| 941 |
-
e.c(n) || (
|
| 942 |
-
}),
|
| 943 |
}
|
| 944 |
-
function
|
| 945 |
let e;
|
| 946 |
-
return
|
| 947 |
promise: new Promise((t) => {
|
| 948 |
-
|
| 949 |
}),
|
| 950 |
abort() {
|
| 951 |
-
|
| 952 |
}
|
| 953 |
};
|
| 954 |
}
|
| 955 |
-
function
|
| 956 |
const i = +getComputedStyle(n).opacity;
|
| 957 |
return {
|
| 958 |
delay: e,
|
|
@@ -962,11 +962,11 @@ function Cn(n, { delay: e = 0, duration: t = 400, easing: l = kn } = {}) {
|
|
| 962 |
};
|
| 963 |
}
|
| 964 |
const he = [];
|
| 965 |
-
function
|
| 966 |
let t;
|
| 967 |
const l = /* @__PURE__ */ new Set();
|
| 968 |
function i(r) {
|
| 969 |
-
if (
|
| 970 |
const f = !he.length;
|
| 971 |
for (const a of l)
|
| 972 |
a[1](), he.push(a, n);
|
|
@@ -1010,12 +1010,12 @@ function Ie(n, e, t, l) {
|
|
| 1010 |
}
|
| 1011 |
}
|
| 1012 |
function _t(n, e = {}) {
|
| 1013 |
-
const t =
|
| 1014 |
let s, r, f, a = n, _ = n, u = 1, c = 0, m = !1;
|
| 1015 |
function p(S, L = {}) {
|
| 1016 |
_ = S;
|
| 1017 |
const C = f = {};
|
| 1018 |
-
return n == null || L.hard || T.stiffness >= 1 && T.damping >= 1 ? (m = !0, s = rt(), a = S, t.set(n = _), Promise.resolve()) : (L.soft && (c = 1 / ((L.soft === !0 ? 0.5 : +L.soft) * 60), u = 0), r || (s = rt(), m = !1, r =
|
| 1019 |
if (m)
|
| 1020 |
return m = !1, r = null, !1;
|
| 1021 |
u = Math.min(u + c, 1);
|
|
@@ -1051,7 +1051,7 @@ function ut(n, e, t) {
|
|
| 1051 |
const [i, o, s] = t.getImageData(0, 0, 1, 1).data;
|
| 1052 |
return t.clearRect(0, 0, 1, 1), `rgba(${i}, ${o}, ${s}, ${255 / e})`;
|
| 1053 |
}
|
| 1054 |
-
function
|
| 1055 |
var l = {};
|
| 1056 |
for (const i in n) {
|
| 1057 |
const o = n[i].trim();
|
|
@@ -1062,13 +1062,13 @@ function Sn(n, e, t) {
|
|
| 1062 |
}
|
| 1063 |
return l;
|
| 1064 |
}
|
| 1065 |
-
function
|
| 1066 |
let t = [], l = null, i = null;
|
| 1067 |
for (const [o, s] of n)
|
| 1068 |
e === "empty" && s === null || e === "equal" && i === s ? l = l ? l + o : o : (l !== null && t.push([l, i]), l = o, i = s);
|
| 1069 |
return l !== null && t.push([l, i]), t;
|
| 1070 |
}
|
| 1071 |
-
function
|
| 1072 |
const e = window.getSelection();
|
| 1073 |
if (e.rangeCount > 0) {
|
| 1074 |
const t = document.createRange();
|
|
@@ -1076,7 +1076,7 @@ function Tn(n) {
|
|
| 1076 |
}
|
| 1077 |
return -1;
|
| 1078 |
}
|
| 1079 |
-
function
|
| 1080 |
var t = document.createTreeWalker(n, NodeFilter.SHOW_TEXT), l = t.nextNode();
|
| 1081 |
if (!l || !l.textContent)
|
| 1082 |
return null;
|
|
@@ -1089,39 +1089,39 @@ function Fn(n, e) {
|
|
| 1089 |
return { node: l, offset: o };
|
| 1090 |
}
|
| 1091 |
const {
|
| 1092 |
-
SvelteComponent:
|
| 1093 |
add_render_callback: We,
|
| 1094 |
append: ue,
|
| 1095 |
attr: H,
|
| 1096 |
binding_callbacks: ct,
|
| 1097 |
-
bubble:
|
| 1098 |
check_outros: Yt,
|
| 1099 |
create_component: Xe,
|
| 1100 |
-
create_in_transition:
|
| 1101 |
destroy_component: Ye,
|
| 1102 |
-
destroy_each:
|
| 1103 |
detach: J,
|
| 1104 |
element: oe,
|
| 1105 |
-
empty:
|
| 1106 |
ensure_array_like: dt,
|
| 1107 |
group_outros: Gt,
|
| 1108 |
-
init:
|
| 1109 |
insert: K,
|
| 1110 |
-
listen:
|
| 1111 |
mount_component: Ge,
|
| 1112 |
noop: Jt,
|
| 1113 |
-
run_all:
|
| 1114 |
-
safe_not_equal:
|
| 1115 |
set_data: Je,
|
| 1116 |
space: Le,
|
| 1117 |
text: Ke,
|
| 1118 |
toggle_class: mt,
|
| 1119 |
transition_in: ne,
|
| 1120 |
transition_out: ce
|
| 1121 |
-
} = window.__gradio__svelte__internal, { beforeUpdate:
|
| 1122 |
function bt(n, e, t) {
|
| 1123 |
const l = n.slice();
|
| 1124 |
-
return l[
|
| 1125 |
}
|
| 1126 |
function gt(n) {
|
| 1127 |
let e, t, l = (
|
|
@@ -1164,7 +1164,7 @@ function gt(n) {
|
|
| 1164 |
}
|
| 1165 |
},
|
| 1166 |
d(s) {
|
| 1167 |
-
s && J(e), l && l.d(),
|
| 1168 |
}
|
| 1169 |
};
|
| 1170 |
}
|
|
@@ -1196,12 +1196,12 @@ function ht(n) {
|
|
| 1196 |
function wt(n) {
|
| 1197 |
let e, t = (
|
| 1198 |
/*category*/
|
| 1199 |
-
n[
|
| 1200 |
), l, i, o;
|
| 1201 |
return {
|
| 1202 |
c() {
|
| 1203 |
e = oe("div"), l = Ke(t), i = Le(), H(e, "class", "category-label svelte-1u11ied"), H(e, "style", o = "background-color:" + /*color*/
|
| 1204 |
-
n[
|
| 1205 |
},
|
| 1206 |
m(s, r) {
|
| 1207 |
K(s, e, r), ue(e, l), ue(e, i);
|
|
@@ -1209,16 +1209,16 @@ function wt(n) {
|
|
| 1209 |
p(s, r) {
|
| 1210 |
r[0] & /*_color_map*/
|
| 1211 |
4096 && t !== (t = /*category*/
|
| 1212 |
-
s[
|
| 1213 |
4096 && o !== (o = "background-color:" + /*color*/
|
| 1214 |
-
s[
|
| 1215 |
},
|
| 1216 |
d(s) {
|
| 1217 |
s && J(e);
|
| 1218 |
}
|
| 1219 |
};
|
| 1220 |
}
|
| 1221 |
-
function
|
| 1222 |
let e;
|
| 1223 |
return {
|
| 1224 |
c() {
|
|
@@ -1245,7 +1245,7 @@ function Bn(n) {
|
|
| 1245 |
}
|
| 1246 |
function pt(n) {
|
| 1247 |
let e, t, l, i;
|
| 1248 |
-
const o = [
|
| 1249 |
function r(f, a) {
|
| 1250 |
return (
|
| 1251 |
/*copied*/
|
|
@@ -1254,7 +1254,7 @@ function pt(n) {
|
|
| 1254 |
}
|
| 1255 |
return e = r(n), t = s[e] = o[e](n), {
|
| 1256 |
c() {
|
| 1257 |
-
t.c(), l =
|
| 1258 |
},
|
| 1259 |
m(f, a) {
|
| 1260 |
s[e].m(f, a), K(f, l, a), i = !0;
|
|
@@ -1276,14 +1276,14 @@ function pt(n) {
|
|
| 1276 |
}
|
| 1277 |
};
|
| 1278 |
}
|
| 1279 |
-
function
|
| 1280 |
let e, t, l, i, o;
|
| 1281 |
-
return t = new
|
| 1282 |
c() {
|
| 1283 |
e = oe("button"), Xe(t.$$.fragment), H(e, "aria-label", "Copy"), H(e, "aria-roledescription", "Copy text"), H(e, "class", "svelte-1u11ied");
|
| 1284 |
},
|
| 1285 |
m(s, r) {
|
| 1286 |
-
K(s, e, r), Ge(t, e, null), l = !0, i || (o =
|
| 1287 |
e,
|
| 1288 |
"click",
|
| 1289 |
/*handle_copy*/
|
|
@@ -1302,9 +1302,9 @@ function Rn(n) {
|
|
| 1302 |
}
|
| 1303 |
};
|
| 1304 |
}
|
| 1305 |
-
function
|
| 1306 |
let e, t, l, i;
|
| 1307 |
-
return t = new
|
| 1308 |
c() {
|
| 1309 |
e = oe("button"), Xe(t.$$.fragment), H(e, "aria-label", "Copied"), H(e, "aria-roledescription", "Text copied"), H(e, "class", "svelte-1u11ied");
|
| 1310 |
},
|
|
@@ -1314,7 +1314,7 @@ function Dn(n) {
|
|
| 1314 |
p: Jt,
|
| 1315 |
i(o) {
|
| 1316 |
i || (ne(t.$$.fragment, o), o && (l || We(() => {
|
| 1317 |
-
l =
|
| 1318 |
})), i = !0);
|
| 1319 |
},
|
| 1320 |
o(o) {
|
|
@@ -1325,7 +1325,7 @@ function Dn(n) {
|
|
| 1325 |
}
|
| 1326 |
};
|
| 1327 |
}
|
| 1328 |
-
function
|
| 1329 |
let e, t, l;
|
| 1330 |
return {
|
| 1331 |
c() {
|
|
@@ -1333,84 +1333,60 @@ function On(n) {
|
|
| 1333 |
(n[11] === void 0 || /*marked_el_text*/
|
| 1334 |
n[9] === void 0) && We(() => (
|
| 1335 |
/*div_input_handler_1*/
|
| 1336 |
-
n[
|
| 1337 |
));
|
| 1338 |
},
|
| 1339 |
m(i, o) {
|
| 1340 |
-
K(i, e, o), n[
|
| 1341 |
n[11] !== void 0 && (e.textContent = /*el_text*/
|
| 1342 |
n[11]), /*marked_el_text*/
|
| 1343 |
n[9] !== void 0 && (e.innerHTML = /*marked_el_text*/
|
| 1344 |
n[9]), t || (l = [
|
| 1345 |
-
|
| 1346 |
e,
|
| 1347 |
"input",
|
| 1348 |
/*div_input_handler_1*/
|
| 1349 |
-
n[
|
| 1350 |
),
|
| 1351 |
-
|
| 1352 |
e,
|
| 1353 |
"blur",
|
| 1354 |
/*handle_blur*/
|
| 1355 |
n[14]
|
| 1356 |
),
|
| 1357 |
-
|
| 1358 |
e,
|
| 1359 |
"keypress",
|
| 1360 |
/*keypress_handler*/
|
| 1361 |
n[20]
|
| 1362 |
),
|
| 1363 |
-
|
| 1364 |
e,
|
| 1365 |
"select",
|
| 1366 |
/*select_handler*/
|
| 1367 |
n[21]
|
| 1368 |
),
|
| 1369 |
-
|
| 1370 |
e,
|
| 1371 |
"scroll",
|
| 1372 |
/*scroll_handler*/
|
| 1373 |
n[22]
|
| 1374 |
),
|
| 1375 |
-
|
| 1376 |
e,
|
| 1377 |
"input",
|
| 1378 |
/*input_handler*/
|
| 1379 |
n[23]
|
| 1380 |
),
|
| 1381 |
-
|
| 1382 |
e,
|
| 1383 |
"focus",
|
| 1384 |
/*focus_handler*/
|
| 1385 |
n[24]
|
| 1386 |
),
|
| 1387 |
-
|
| 1388 |
e,
|
| 1389 |
"change",
|
| 1390 |
-
/*change_handler*/
|
| 1391 |
-
n[25]
|
| 1392 |
-
),
|
| 1393 |
-
V(
|
| 1394 |
-
e,
|
| 1395 |
-
"mousedown",
|
| 1396 |
-
/*checkAndRemoveHighlight*/
|
| 1397 |
-
n[16]
|
| 1398 |
-
),
|
| 1399 |
-
V(
|
| 1400 |
-
e,
|
| 1401 |
-
"keydown",
|
| 1402 |
-
/*checkAndRemoveHighlight*/
|
| 1403 |
-
n[16]
|
| 1404 |
-
),
|
| 1405 |
-
V(
|
| 1406 |
-
e,
|
| 1407 |
-
"mouseup",
|
| 1408 |
-
/*checkAndRemoveHighlight*/
|
| 1409 |
-
n[16]
|
| 1410 |
-
),
|
| 1411 |
-
V(
|
| 1412 |
-
e,
|
| 1413 |
-
"keyup",
|
| 1414 |
/*checkAndRemoveHighlight*/
|
| 1415 |
n[16]
|
| 1416 |
)
|
|
@@ -1426,11 +1402,11 @@ function On(n) {
|
|
| 1426 |
i[9]);
|
| 1427 |
},
|
| 1428 |
d(i) {
|
| 1429 |
-
i && J(e), n[
|
| 1430 |
}
|
| 1431 |
};
|
| 1432 |
}
|
| 1433 |
-
function
|
| 1434 |
let e, t, l;
|
| 1435 |
return {
|
| 1436 |
c() {
|
|
@@ -1438,19 +1414,19 @@ function In(n) {
|
|
| 1438 |
(n[11] === void 0 || /*marked_el_text*/
|
| 1439 |
n[9] === void 0) && We(() => (
|
| 1440 |
/*div_input_handler*/
|
| 1441 |
-
n[
|
| 1442 |
));
|
| 1443 |
},
|
| 1444 |
m(i, o) {
|
| 1445 |
-
K(i, e, o), n[
|
| 1446 |
n[11] !== void 0 && (e.textContent = /*el_text*/
|
| 1447 |
n[11]), /*marked_el_text*/
|
| 1448 |
n[9] !== void 0 && (e.innerHTML = /*marked_el_text*/
|
| 1449 |
-
n[9]), t || (l =
|
| 1450 |
e,
|
| 1451 |
"input",
|
| 1452 |
/*div_input_handler*/
|
| 1453 |
-
n[
|
| 1454 |
), t = !0);
|
| 1455 |
},
|
| 1456 |
p(i, o) {
|
|
@@ -1463,16 +1439,16 @@ function In(n) {
|
|
| 1463 |
i[9]);
|
| 1464 |
},
|
| 1465 |
d(i) {
|
| 1466 |
-
i && J(e), n[
|
| 1467 |
}
|
| 1468 |
};
|
| 1469 |
}
|
| 1470 |
-
function
|
| 1471 |
let e, t, l, i, o, s, r = (
|
| 1472 |
/*show_legend*/
|
| 1473 |
n[4] && gt(n)
|
| 1474 |
);
|
| 1475 |
-
l = new
|
| 1476 |
props: {
|
| 1477 |
show_label: (
|
| 1478 |
/*show_label*/
|
|
@@ -1482,7 +1458,7 @@ function Un(n) {
|
|
| 1482 |
/*info*/
|
| 1483 |
n[2]
|
| 1484 |
),
|
| 1485 |
-
$$slots: { default: [
|
| 1486 |
$$scope: { ctx: n }
|
| 1487 |
}
|
| 1488 |
});
|
|
@@ -1493,7 +1469,7 @@ function Un(n) {
|
|
| 1493 |
function a(c, m) {
|
| 1494 |
return (
|
| 1495 |
/*disabled*/
|
| 1496 |
-
c[8] ?
|
| 1497 |
);
|
| 1498 |
}
|
| 1499 |
let _ = a(n), u = _(n);
|
|
@@ -1519,7 +1495,7 @@ function Un(n) {
|
|
| 1519 |
4 && (p.info = /*info*/
|
| 1520 |
c[2]), m[0] & /*label*/
|
| 1521 |
1 | m[1] & /*$$scope*/
|
| 1522 |
-
|
| 1523 |
c[7] ? f ? (f.p(c, m), m[0] & /*show_copy_button*/
|
| 1524 |
128 && ne(f, 1)) : (f = pt(c), f.c(), ne(f, 1), f.m(e, o)) : f && (Gt(), ce(f, 1, 1, () => {
|
| 1525 |
f = null;
|
|
@@ -1542,7 +1518,7 @@ function Un(n) {
|
|
| 1542 |
}
|
| 1543 |
};
|
| 1544 |
}
|
| 1545 |
-
function
|
| 1546 |
let e, t = n[0], l = 1;
|
| 1547 |
for (; l < n.length; ) {
|
| 1548 |
const i = n[l], o = n[l + 1];
|
|
@@ -1552,113 +1528,110 @@ function Wn(n) {
|
|
| 1552 |
}
|
| 1553 |
return t;
|
| 1554 |
}
|
| 1555 |
-
function
|
| 1556 |
const l = typeof document < "u";
|
| 1557 |
-
let { value: i = [] } = e, { value_is_output: o = !1 } = e, { label: s } = e, { legend_label: r } = e, { info: f = void 0 } = e, { show_label: a = !0 } = e, { show_legend: _ = !1 } = e, { show_legend_label: u = !1 } = e, { container: c = !0 } = e, { color_map: m = {} } = e, { show_copy_button: p = !1 } = e, { disabled: T } = e, S, L = "", C = "", d, y = {}, M = {}, g = !1,
|
| 1558 |
function Q() {
|
| 1559 |
if (!m || Object.keys(m).length === 0 ? y = {} : y = m, i.length > 0) {
|
| 1560 |
for (let [b, j] of i)
|
| 1561 |
if (j !== null && !(j in y)) {
|
| 1562 |
-
let
|
| 1563 |
-
y[j] =
|
| 1564 |
}
|
| 1565 |
}
|
| 1566 |
-
t(12, M =
|
| 1567 |
}
|
| 1568 |
function z() {
|
| 1569 |
i.length > 0 && o && (t(11, L = i.map(([b, j]) => b).join(" ")), t(9, C = i.map(([b, j]) => j !== null ? `<mark class="hl ${j}" style="background-color:${M[j].secondary}">${b}</mark>` : b).join(" ") + " "));
|
| 1570 |
}
|
| 1571 |
-
const
|
| 1572 |
-
|
| 1573 |
S && S.offsetHeight + S.scrollTop > S.scrollHeight - 100;
|
| 1574 |
});
|
| 1575 |
-
function
|
| 1576 |
-
|
| 1577 |
}
|
| 1578 |
-
|
| 1579 |
Q(), z(), t(18, o = !1);
|
| 1580 |
});
|
| 1581 |
function se() {
|
| 1582 |
-
let b = [], j = "",
|
| 1583 |
for (let fe = 0; fe < C.length; fe++) {
|
| 1584 |
let re = C[fe];
|
| 1585 |
-
re === "<" ? (ee = !0, j && b.push([j,
|
| 1586 |
be,
|
| 1587 |
"access",
|
| 1588 |
-
(
|
| 1589 |
"call",
|
| 1590 |
-
(
|
| 1591 |
"optionalAccess",
|
| 1592 |
-
(
|
| 1593 |
]) || null), be = "") : ee ? be += re : j += re;
|
| 1594 |
}
|
| 1595 |
-
j && b.push([j,
|
| 1596 |
}
|
| 1597 |
-
async function
|
| 1598 |
"clipboard" in navigator && (await navigator.clipboard.writeText(L), x());
|
| 1599 |
}
|
| 1600 |
function x() {
|
| 1601 |
-
t(13, g = !0),
|
| 1602 |
() => {
|
| 1603 |
t(13, g = !1);
|
| 1604 |
},
|
| 1605 |
1e3
|
| 1606 |
);
|
| 1607 |
}
|
| 1608 |
-
function
|
| 1609 |
const b = window.getSelection(), j = b.anchorOffset;
|
| 1610 |
if (b.rangeCount > 0) {
|
| 1611 |
-
var
|
| 1612 |
-
if (
|
| 1613 |
-
const
|
| 1614 |
-
var ee =
|
| 1615 |
-
ee.replaceChild(be,
|
| 1616 |
var fe = document.createRange(), re = window.getSelection();
|
| 1617 |
-
const
|
| 1618 |
-
var
|
| 1619 |
-
fe.setStart(
|
| 1620 |
}
|
| 1621 |
}
|
| 1622 |
}
|
| 1623 |
function de(b) {
|
| 1624 |
-
|
| 1625 |
}
|
| 1626 |
function h(b) {
|
| 1627 |
-
|
| 1628 |
}
|
| 1629 |
function Fe(b) {
|
| 1630 |
-
|
| 1631 |
}
|
| 1632 |
function Me(b) {
|
| 1633 |
-
|
| 1634 |
}
|
| 1635 |
function me(b) {
|
| 1636 |
-
|
| 1637 |
}
|
| 1638 |
function Pe(b) {
|
| 1639 |
-
we.call(this, n, b);
|
| 1640 |
-
}
|
| 1641 |
-
function Ze(b) {
|
| 1642 |
ct[b ? "unshift" : "push"](() => {
|
| 1643 |
S = b, t(10, S);
|
| 1644 |
});
|
| 1645 |
}
|
| 1646 |
-
function
|
| 1647 |
L = this.textContent, C = this.innerHTML, t(11, L), t(9, C);
|
| 1648 |
}
|
| 1649 |
-
function
|
| 1650 |
ct[b ? "unshift" : "push"](() => {
|
| 1651 |
S = b, t(10, S);
|
| 1652 |
});
|
| 1653 |
}
|
| 1654 |
-
function
|
| 1655 |
L = this.textContent, C = this.innerHTML, t(11, L), t(9, C);
|
| 1656 |
}
|
| 1657 |
return n.$$set = (b) => {
|
| 1658 |
"value" in b && t(17, i = b.value), "value_is_output" in b && t(18, o = b.value_is_output), "label" in b && t(0, s = b.label), "legend_label" in b && t(1, r = b.legend_label), "info" in b && t(2, f = b.info), "show_label" in b && t(3, a = b.show_label), "show_legend" in b && t(4, _ = b.show_legend), "show_legend_label" in b && t(5, u = b.show_legend_label), "container" in b && t(6, c = b.container), "color_map" in b && t(19, m = b.color_map), "show_copy_button" in b && t(7, p = b.show_copy_button), "disabled" in b && t(8, T = b.disabled);
|
| 1659 |
}, n.$$.update = () => {
|
| 1660 |
n.$$.dirty[0] & /*marked_el_text*/
|
| 1661 |
-
512 &&
|
| 1662 |
}, z(), Q(), [
|
| 1663 |
s,
|
| 1664 |
r,
|
|
@@ -1675,8 +1648,8 @@ function Xn(n, e, t) {
|
|
| 1675 |
M,
|
| 1676 |
g,
|
| 1677 |
se,
|
| 1678 |
-
|
| 1679 |
-
|
| 1680 |
i,
|
| 1681 |
o,
|
| 1682 |
m,
|
|
@@ -1688,18 +1661,17 @@ function Xn(n, e, t) {
|
|
| 1688 |
Pe,
|
| 1689 |
Ze,
|
| 1690 |
w,
|
| 1691 |
-
$t
|
| 1692 |
-
el
|
| 1693 |
];
|
| 1694 |
}
|
| 1695 |
-
class
|
| 1696 |
constructor(e) {
|
| 1697 |
-
super(),
|
| 1698 |
this,
|
| 1699 |
e,
|
| 1700 |
-
|
| 1701 |
-
|
| 1702 |
-
|
| 1703 |
{
|
| 1704 |
value: 17,
|
| 1705 |
value_is_output: 18,
|
|
@@ -1719,7 +1691,7 @@ class Yn extends Mn {
|
|
| 1719 |
);
|
| 1720 |
}
|
| 1721 |
}
|
| 1722 |
-
function
|
| 1723 |
let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0;
|
| 1724 |
for (; n > 1e3 && t < e.length - 1; )
|
| 1725 |
n /= 1e3, t++;
|
|
@@ -1727,25 +1699,25 @@ function pe(n) {
|
|
| 1727 |
return (Number.isInteger(n) ? n : n.toFixed(1)) + l;
|
| 1728 |
}
|
| 1729 |
const {
|
| 1730 |
-
SvelteComponent:
|
| 1731 |
-
append:
|
| 1732 |
attr: q,
|
| 1733 |
component_subscribe: kt,
|
| 1734 |
-
detach:
|
| 1735 |
-
element:
|
| 1736 |
-
init:
|
| 1737 |
-
insert:
|
| 1738 |
noop: vt,
|
| 1739 |
-
safe_not_equal:
|
| 1740 |
set_style: Ne,
|
| 1741 |
-
svg_element:
|
| 1742 |
toggle_class: yt
|
| 1743 |
-
} = window.__gradio__svelte__internal, { onMount:
|
| 1744 |
-
function
|
| 1745 |
let e, t, l, i, o, s, r, f, a, _, u, c;
|
| 1746 |
return {
|
| 1747 |
c() {
|
| 1748 |
-
e =
|
| 1749 |
n[1][0] + "px, " + /*$top*/
|
| 1750 |
n[1][1] + "px)"), q(a, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), q(a, "fill", "#FF7C00"), q(a, "fill-opacity", "0.4"), q(a, "class", "svelte-43sxxs"), q(_, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), q(_, "fill", "#FF7C00"), q(_, "class", "svelte-43sxxs"), q(u, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), q(u, "fill", "#FF7C00"), q(u, "fill-opacity", "0.4"), q(u, "class", "svelte-43sxxs"), q(c, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), q(c, "fill", "#FF7C00"), q(c, "class", "svelte-43sxxs"), Ne(f, "transform", "translate(" + /*$bottom*/
|
| 1751 |
n[2][0] + "px, " + /*$bottom*/
|
|
@@ -1757,7 +1729,7 @@ function ti(n) {
|
|
| 1757 |
);
|
| 1758 |
},
|
| 1759 |
m(m, p) {
|
| 1760 |
-
|
| 1761 |
},
|
| 1762 |
p(m, [p]) {
|
| 1763 |
p & /*$top*/
|
|
@@ -1777,11 +1749,11 @@ function ti(n) {
|
|
| 1777 |
i: vt,
|
| 1778 |
o: vt,
|
| 1779 |
d(m) {
|
| 1780 |
-
m &&
|
| 1781 |
}
|
| 1782 |
};
|
| 1783 |
}
|
| 1784 |
-
function
|
| 1785 |
let l, i, { margin: o = !0 } = e;
|
| 1786 |
const s = _t([0, 0]);
|
| 1787 |
kt(n, s, (c) => t(1, l = c));
|
|
@@ -1797,46 +1769,46 @@ function li(n, e, t) {
|
|
| 1797 |
async function u() {
|
| 1798 |
await Promise.all([s.set([125, 0]), r.set([-125, 0])]), _();
|
| 1799 |
}
|
| 1800 |
-
return
|
| 1801 |
"margin" in c && t(0, o = c.margin);
|
| 1802 |
}, [o, l, i, s, r];
|
| 1803 |
}
|
| 1804 |
-
class
|
| 1805 |
constructor(e) {
|
| 1806 |
-
super(),
|
| 1807 |
}
|
| 1808 |
}
|
| 1809 |
const {
|
| 1810 |
-
SvelteComponent:
|
| 1811 |
append: _e,
|
| 1812 |
attr: Y,
|
| 1813 |
binding_callbacks: Ct,
|
| 1814 |
check_outros: Kt,
|
| 1815 |
-
create_component:
|
| 1816 |
-
create_slot:
|
| 1817 |
-
destroy_component:
|
| 1818 |
destroy_each: Qt,
|
| 1819 |
detach: k,
|
| 1820 |
element: $,
|
| 1821 |
-
empty:
|
| 1822 |
ensure_array_like: Ee,
|
| 1823 |
-
get_all_dirty_from_scope:
|
| 1824 |
-
get_slot_changes:
|
| 1825 |
group_outros: xt,
|
| 1826 |
-
init:
|
| 1827 |
insert: v,
|
| 1828 |
-
mount_component:
|
| 1829 |
noop: Ue,
|
| 1830 |
-
safe_not_equal:
|
| 1831 |
-
set_data:
|
| 1832 |
set_style: ie,
|
| 1833 |
space: G,
|
| 1834 |
text: F,
|
| 1835 |
-
toggle_class:
|
| 1836 |
-
transition_in:
|
| 1837 |
-
transition_out:
|
| 1838 |
-
update_slot_base:
|
| 1839 |
-
} = window.__gradio__svelte__internal, { tick:
|
| 1840 |
function St(n, e, t) {
|
| 1841 |
const l = n.slice();
|
| 1842 |
return l[38] = e[t], l[40] = t, l;
|
|
@@ -1845,7 +1817,7 @@ function Lt(n, e, t) {
|
|
| 1845 |
const l = n.slice();
|
| 1846 |
return l[38] = e[t], l;
|
| 1847 |
}
|
| 1848 |
-
function
|
| 1849 |
let e, t = (
|
| 1850 |
/*i18n*/
|
| 1851 |
n[1]("common.error") + ""
|
|
@@ -1853,7 +1825,7 @@ function hi(n) {
|
|
| 1853 |
const s = (
|
| 1854 |
/*#slots*/
|
| 1855 |
n[29].error
|
| 1856 |
-
), r =
|
| 1857 |
s,
|
| 1858 |
n,
|
| 1859 |
/*$$scope*/
|
|
@@ -1870,20 +1842,20 @@ function hi(n) {
|
|
| 1870 |
p(f, a) {
|
| 1871 |
(!o || a[0] & /*i18n*/
|
| 1872 |
2) && t !== (t = /*i18n*/
|
| 1873 |
-
f[1]("common.error") + "") &&
|
| 1874 |
-
268435456) &&
|
| 1875 |
r,
|
| 1876 |
s,
|
| 1877 |
f,
|
| 1878 |
/*$$scope*/
|
| 1879 |
f[28],
|
| 1880 |
-
o ?
|
| 1881 |
s,
|
| 1882 |
/*$$scope*/
|
| 1883 |
f[28],
|
| 1884 |
a,
|
| 1885 |
-
|
| 1886 |
-
) :
|
| 1887 |
/*$$scope*/
|
| 1888 |
f[28]
|
| 1889 |
),
|
|
@@ -1891,17 +1863,17 @@ function hi(n) {
|
|
| 1891 |
);
|
| 1892 |
},
|
| 1893 |
i(f) {
|
| 1894 |
-
o || (
|
| 1895 |
},
|
| 1896 |
o(f) {
|
| 1897 |
-
|
| 1898 |
},
|
| 1899 |
d(f) {
|
| 1900 |
f && (k(e), k(i)), r && r.d(f);
|
| 1901 |
}
|
| 1902 |
};
|
| 1903 |
}
|
| 1904 |
-
function
|
| 1905 |
let e, t, l, i, o, s, r, f, a, _ = (
|
| 1906 |
/*variant*/
|
| 1907 |
n[8] === "default" && /*show_eta_bar*/
|
|
@@ -1913,25 +1885,25 @@ function wi(n) {
|
|
| 1913 |
/*progress*/
|
| 1914 |
d[7]
|
| 1915 |
)
|
| 1916 |
-
return
|
| 1917 |
if (
|
| 1918 |
/*queue_position*/
|
| 1919 |
d[2] !== null && /*queue_size*/
|
| 1920 |
d[3] !== void 0 && /*queue_position*/
|
| 1921 |
d[2] >= 0
|
| 1922 |
)
|
| 1923 |
-
return
|
| 1924 |
if (
|
| 1925 |
/*queue_position*/
|
| 1926 |
d[2] === 0
|
| 1927 |
)
|
| 1928 |
-
return
|
| 1929 |
}
|
| 1930 |
let c = u(n), m = c && c(n), p = (
|
| 1931 |
/*timer*/
|
| 1932 |
n[5] && Nt(n)
|
| 1933 |
);
|
| 1934 |
-
const T = [
|
| 1935 |
function L(d, y) {
|
| 1936 |
return (
|
| 1937 |
/*last_progress_level*/
|
|
@@ -1946,12 +1918,12 @@ function wi(n) {
|
|
| 1946 |
n[5] && Pt(n);
|
| 1947 |
return {
|
| 1948 |
c() {
|
| 1949 |
-
_ && _.c(), e = G(), t = $("div"), m && m.c(), l = G(), p && p.c(), i = G(), s && s.c(), r = G(), C && C.c(), f =
|
| 1950 |
t,
|
| 1951 |
"meta-text-center",
|
| 1952 |
/*variant*/
|
| 1953 |
n[8] === "center"
|
| 1954 |
-
),
|
| 1955 |
t,
|
| 1956 |
"meta-text",
|
| 1957 |
/*variant*/
|
|
@@ -1967,29 +1939,29 @@ function wi(n) {
|
|
| 1967 |
d[18] && /*show_progress*/
|
| 1968 |
d[6] === "full" ? _ ? _.p(d, y) : (_ = Tt(d), _.c(), _.m(e.parentNode, e)) : _ && (_.d(1), _ = null), c === (c = u(d)) && m ? m.p(d, y) : (m && m.d(1), m = c && c(d), m && (m.c(), m.m(t, l))), /*timer*/
|
| 1969 |
d[5] ? p ? p.p(d, y) : (p = Nt(d), p.c(), p.m(t, null)) : p && (p.d(1), p = null), (!a || y[0] & /*variant*/
|
| 1970 |
-
256) &&
|
| 1971 |
t,
|
| 1972 |
"meta-text-center",
|
| 1973 |
/*variant*/
|
| 1974 |
d[8] === "center"
|
| 1975 |
), (!a || y[0] & /*variant*/
|
| 1976 |
-
256) &&
|
| 1977 |
t,
|
| 1978 |
"meta-text",
|
| 1979 |
/*variant*/
|
| 1980 |
d[8] === "default"
|
| 1981 |
);
|
| 1982 |
let M = o;
|
| 1983 |
-
o = L(d), o === M ? ~o && S[o].p(d, y) : (s && (xt(),
|
| 1984 |
S[M] = null;
|
| 1985 |
-
}), Kt()), ~o ? (s = S[o], s ? s.p(d, y) : (s = S[o] = T[o](d), s.c()),
|
| 1986 |
d[5] ? C && (C.d(1), C = null) : C ? C.p(d, y) : (C = Pt(d), C.c(), C.m(f.parentNode, f));
|
| 1987 |
},
|
| 1988 |
i(d) {
|
| 1989 |
-
a || (
|
| 1990 |
},
|
| 1991 |
o(d) {
|
| 1992 |
-
|
| 1993 |
},
|
| 1994 |
d(d) {
|
| 1995 |
d && (k(e), k(t), k(i), k(r), k(f)), _ && _.d(d), m && m.d(), p && p.d(), ~o && S[o].d(d), C && C.d(d);
|
|
@@ -2016,7 +1988,7 @@ function Tt(n) {
|
|
| 2016 |
}
|
| 2017 |
};
|
| 2018 |
}
|
| 2019 |
-
function
|
| 2020 |
let e;
|
| 2021 |
return {
|
| 2022 |
c() {
|
|
@@ -2031,7 +2003,7 @@ function pi(n) {
|
|
| 2031 |
}
|
| 2032 |
};
|
| 2033 |
}
|
| 2034 |
-
function
|
| 2035 |
let e, t = (
|
| 2036 |
/*queue_position*/
|
| 2037 |
n[2] + 1 + ""
|
|
@@ -2049,8 +2021,8 @@ function ki(n) {
|
|
| 2049 |
p(r, f) {
|
| 2050 |
f[0] & /*queue_position*/
|
| 2051 |
4 && t !== (t = /*queue_position*/
|
| 2052 |
-
r[2] + 1 + "") &&
|
| 2053 |
-
8 &&
|
| 2054 |
o,
|
| 2055 |
/*queue_size*/
|
| 2056 |
r[3]
|
|
@@ -2061,7 +2033,7 @@ function ki(n) {
|
|
| 2061 |
}
|
| 2062 |
};
|
| 2063 |
}
|
| 2064 |
-
function
|
| 2065 |
let e, t = Ee(
|
| 2066 |
/*progress*/
|
| 2067 |
n[7]
|
|
@@ -2072,7 +2044,7 @@ function vi(n) {
|
|
| 2072 |
c() {
|
| 2073 |
for (let i = 0; i < l.length; i += 1)
|
| 2074 |
l[i].c();
|
| 2075 |
-
e =
|
| 2076 |
},
|
| 2077 |
m(i, o) {
|
| 2078 |
for (let s = 0; s < l.length; s += 1)
|
|
@@ -2109,7 +2081,7 @@ function Ft(n) {
|
|
| 2109 |
function r(_, u) {
|
| 2110 |
return (
|
| 2111 |
/*p*/
|
| 2112 |
-
_[38].length != null ?
|
| 2113 |
);
|
| 2114 |
}
|
| 2115 |
let f = r(n), a = f(n);
|
|
@@ -2123,15 +2095,15 @@ function Ft(n) {
|
|
| 2123 |
p(_, u) {
|
| 2124 |
f === (f = r(_)) && a ? a.p(_, u) : (a.d(1), a = f(_), a && (a.c(), a.m(e.parentNode, e))), u[0] & /*progress*/
|
| 2125 |
128 && t !== (t = /*p*/
|
| 2126 |
-
_[38].unit + "") &&
|
| 2127 |
},
|
| 2128 |
d(_) {
|
| 2129 |
_ && (k(e), k(l), k(i), k(s)), a.d(_);
|
| 2130 |
}
|
| 2131 |
};
|
| 2132 |
}
|
| 2133 |
-
function
|
| 2134 |
-
let e =
|
| 2135 |
/*p*/
|
| 2136 |
n[38].index || 0
|
| 2137 |
) + "", t;
|
|
@@ -2144,21 +2116,21 @@ function yi(n) {
|
|
| 2144 |
},
|
| 2145 |
p(l, i) {
|
| 2146 |
i[0] & /*progress*/
|
| 2147 |
-
128 && e !== (e =
|
| 2148 |
/*p*/
|
| 2149 |
l[38].index || 0
|
| 2150 |
-
) + "") &&
|
| 2151 |
},
|
| 2152 |
d(l) {
|
| 2153 |
l && k(t);
|
| 2154 |
}
|
| 2155 |
};
|
| 2156 |
}
|
| 2157 |
-
function
|
| 2158 |
-
let e =
|
| 2159 |
/*p*/
|
| 2160 |
n[38].index || 0
|
| 2161 |
-
) + "", t, l, i =
|
| 2162 |
/*p*/
|
| 2163 |
n[38].length
|
| 2164 |
) + "", o;
|
|
@@ -2171,14 +2143,14 @@ function Ci(n) {
|
|
| 2171 |
},
|
| 2172 |
p(s, r) {
|
| 2173 |
r[0] & /*progress*/
|
| 2174 |
-
128 && e !== (e =
|
| 2175 |
/*p*/
|
| 2176 |
s[38].index || 0
|
| 2177 |
-
) + "") &&
|
| 2178 |
-
128 && i !== (i =
|
| 2179 |
/*p*/
|
| 2180 |
s[38].length
|
| 2181 |
-
) + "") &&
|
| 2182 |
},
|
| 2183 |
d(s) {
|
| 2184 |
s && (k(t), k(l), k(o));
|
|
@@ -2192,7 +2164,7 @@ function Mt(n) {
|
|
| 2192 |
);
|
| 2193 |
return {
|
| 2194 |
c() {
|
| 2195 |
-
t && t.c(), e =
|
| 2196 |
},
|
| 2197 |
m(l, i) {
|
| 2198 |
t && t.m(l, i), v(l, e, i);
|
|
@@ -2224,33 +2196,33 @@ function Nt(n) {
|
|
| 2224 |
},
|
| 2225 |
p(o, s) {
|
| 2226 |
s[0] & /*formatted_timer*/
|
| 2227 |
-
1048576 &&
|
| 2228 |
e,
|
| 2229 |
/*formatted_timer*/
|
| 2230 |
o[20]
|
| 2231 |
), s[0] & /*eta, formatted_eta*/
|
| 2232 |
524289 && t !== (t = /*eta*/
|
| 2233 |
o[0] ? `/${/*formatted_eta*/
|
| 2234 |
-
o[19]}` : "") &&
|
| 2235 |
},
|
| 2236 |
d(o) {
|
| 2237 |
o && (k(e), k(l), k(i));
|
| 2238 |
}
|
| 2239 |
};
|
| 2240 |
}
|
| 2241 |
-
function
|
| 2242 |
let e, t;
|
| 2243 |
-
return e = new
|
| 2244 |
props: { margin: (
|
| 2245 |
/*variant*/
|
| 2246 |
n[8] === "default"
|
| 2247 |
) }
|
| 2248 |
}), {
|
| 2249 |
c() {
|
| 2250 |
-
|
| 2251 |
},
|
| 2252 |
m(l, i) {
|
| 2253 |
-
|
| 2254 |
},
|
| 2255 |
p(l, i) {
|
| 2256 |
const o = {};
|
|
@@ -2259,17 +2231,17 @@ function qi(n) {
|
|
| 2259 |
l[8] === "default"), e.$set(o);
|
| 2260 |
},
|
| 2261 |
i(l) {
|
| 2262 |
-
t || (
|
| 2263 |
},
|
| 2264 |
o(l) {
|
| 2265 |
-
|
| 2266 |
},
|
| 2267 |
d(l) {
|
| 2268 |
-
|
| 2269 |
}
|
| 2270 |
};
|
| 2271 |
}
|
| 2272 |
-
function
|
| 2273 |
let e, t, l, i, o, s = `${/*last_progress_level*/
|
| 2274 |
n[15] * 100}%`, r = (
|
| 2275 |
/*progress*/
|
|
@@ -2306,7 +2278,7 @@ function Ht(n) {
|
|
| 2306 |
c() {
|
| 2307 |
for (let i = 0; i < l.length; i += 1)
|
| 2308 |
l[i].c();
|
| 2309 |
-
e =
|
| 2310 |
},
|
| 2311 |
m(i, o) {
|
| 2312 |
for (let s = 0; s < l.length; s += 1)
|
|
@@ -2338,7 +2310,7 @@ function Ht(n) {
|
|
| 2338 |
function jt(n) {
|
| 2339 |
let e, t, l, i, o = (
|
| 2340 |
/*i*/
|
| 2341 |
-
n[40] !== 0 &&
|
| 2342 |
), s = (
|
| 2343 |
/*p*/
|
| 2344 |
n[38].desc != null && Vt(n)
|
|
@@ -2356,7 +2328,7 @@ function jt(n) {
|
|
| 2356 |
);
|
| 2357 |
return {
|
| 2358 |
c() {
|
| 2359 |
-
o && o.c(), e = G(), s && s.c(), t = G(), r && r.c(), l = G(), f && f.c(), i =
|
| 2360 |
},
|
| 2361 |
m(a, _) {
|
| 2362 |
o && o.m(a, _), v(a, e, _), s && s.m(a, _), v(a, t, _), r && r.m(a, _), v(a, l, _), f && f.m(a, _), v(a, i, _);
|
|
@@ -2377,7 +2349,7 @@ function jt(n) {
|
|
| 2377 |
}
|
| 2378 |
};
|
| 2379 |
}
|
| 2380 |
-
function
|
| 2381 |
let e;
|
| 2382 |
return {
|
| 2383 |
c() {
|
|
@@ -2406,7 +2378,7 @@ function Vt(n) {
|
|
| 2406 |
p(l, i) {
|
| 2407 |
i[0] & /*progress*/
|
| 2408 |
128 && e !== (e = /*p*/
|
| 2409 |
-
l[38].desc + "") &&
|
| 2410 |
},
|
| 2411 |
d(l) {
|
| 2412 |
l && k(t);
|
|
@@ -2446,7 +2418,7 @@ function zt(n) {
|
|
| 2446 |
(i[14][
|
| 2447 |
/*i*/
|
| 2448 |
i[40]
|
| 2449 |
-
] || 0)).toFixed(1) + "") &&
|
| 2450 |
},
|
| 2451 |
d(i) {
|
| 2452 |
i && (k(t), k(l));
|
|
@@ -2465,7 +2437,7 @@ function Et(n) {
|
|
| 2465 |
);
|
| 2466 |
return {
|
| 2467 |
c() {
|
| 2468 |
-
t && t.c(), e =
|
| 2469 |
},
|
| 2470 |
m(l, i) {
|
| 2471 |
t && t.m(l, i), v(l, e, i);
|
|
@@ -2498,7 +2470,7 @@ function Pt(n) {
|
|
| 2498 |
},
|
| 2499 |
p(l, i) {
|
| 2500 |
i[0] & /*loading_text*/
|
| 2501 |
-
512 &&
|
| 2502 |
t,
|
| 2503 |
/*loading_text*/
|
| 2504 |
l[9]
|
|
@@ -2509,9 +2481,9 @@ function Pt(n) {
|
|
| 2509 |
}
|
| 2510 |
};
|
| 2511 |
}
|
| 2512 |
-
function
|
| 2513 |
let e, t, l, i, o;
|
| 2514 |
-
const s = [
|
| 2515 |
function f(a, _) {
|
| 2516 |
return (
|
| 2517 |
/*status*/
|
|
@@ -2525,10 +2497,10 @@ function Ti(n) {
|
|
| 2525 |
c() {
|
| 2526 |
e = $("div"), l && l.c(), Y(e, "class", i = "wrap " + /*variant*/
|
| 2527 |
n[8] + " " + /*show_progress*/
|
| 2528 |
-
n[6] + " svelte-1txqlrd"),
|
| 2529 |
n[4] || /*status*/
|
| 2530 |
n[4] === "complete" || /*show_progress*/
|
| 2531 |
-
n[6] === "hidden"),
|
| 2532 |
e,
|
| 2533 |
"translucent",
|
| 2534 |
/*variant*/
|
|
@@ -2537,12 +2509,12 @@ function Ti(n) {
|
|
| 2537 |
n[4] === "error") || /*translucent*/
|
| 2538 |
n[11] || /*show_progress*/
|
| 2539 |
n[6] === "minimal"
|
| 2540 |
-
),
|
| 2541 |
e,
|
| 2542 |
"generating",
|
| 2543 |
/*status*/
|
| 2544 |
n[4] === "generating"
|
| 2545 |
-
),
|
| 2546 |
e,
|
| 2547 |
"border",
|
| 2548 |
/*border*/
|
|
@@ -2564,17 +2536,17 @@ function Ti(n) {
|
|
| 2564 |
},
|
| 2565 |
p(a, _) {
|
| 2566 |
let u = t;
|
| 2567 |
-
t = f(a), t === u ? ~t && r[t].p(a, _) : (l && (xt(),
|
| 2568 |
r[u] = null;
|
| 2569 |
-
}), Kt()), ~t ? (l = r[t], l ? l.p(a, _) : (l = r[t] = s[t](a), l.c()),
|
| 2570 |
320 && i !== (i = "wrap " + /*variant*/
|
| 2571 |
a[8] + " " + /*show_progress*/
|
| 2572 |
a[6] + " svelte-1txqlrd")) && Y(e, "class", i), (!o || _[0] & /*variant, show_progress, status, show_progress*/
|
| 2573 |
-
336) &&
|
| 2574 |
a[4] || /*status*/
|
| 2575 |
a[4] === "complete" || /*show_progress*/
|
| 2576 |
a[6] === "hidden"), (!o || _[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
|
| 2577 |
-
2384) &&
|
| 2578 |
e,
|
| 2579 |
"translucent",
|
| 2580 |
/*variant*/
|
|
@@ -2584,13 +2556,13 @@ function Ti(n) {
|
|
| 2584 |
a[11] || /*show_progress*/
|
| 2585 |
a[6] === "minimal"
|
| 2586 |
), (!o || _[0] & /*variant, show_progress, status*/
|
| 2587 |
-
336) &&
|
| 2588 |
e,
|
| 2589 |
"generating",
|
| 2590 |
/*status*/
|
| 2591 |
a[4] === "generating"
|
| 2592 |
), (!o || _[0] & /*variant, show_progress, border*/
|
| 2593 |
-
4416) &&
|
| 2594 |
e,
|
| 2595 |
"border",
|
| 2596 |
/*border*/
|
|
@@ -2610,10 +2582,10 @@ function Ti(n) {
|
|
| 2610 |
);
|
| 2611 |
},
|
| 2612 |
i(a) {
|
| 2613 |
-
o || (
|
| 2614 |
},
|
| 2615 |
o(a) {
|
| 2616 |
-
|
| 2617 |
},
|
| 2618 |
d(a) {
|
| 2619 |
a && k(e), ~t && r[t].d(), n[31](null);
|
|
@@ -2621,13 +2593,13 @@ function Ti(n) {
|
|
| 2621 |
};
|
| 2622 |
}
|
| 2623 |
let He = [], Oe = !1;
|
| 2624 |
-
async function
|
| 2625 |
if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) {
|
| 2626 |
if (He.push(n), !Oe)
|
| 2627 |
Oe = !0;
|
| 2628 |
else
|
| 2629 |
return;
|
| 2630 |
-
await
|
| 2631 |
let t = [0, 0];
|
| 2632 |
for (let l = 0; l < He.length; l++) {
|
| 2633 |
const o = He[l].getBoundingClientRect();
|
|
@@ -2637,26 +2609,26 @@ async function Fi(n, e = !0) {
|
|
| 2637 |
});
|
| 2638 |
}
|
| 2639 |
}
|
| 2640 |
-
function
|
| 2641 |
-
let l, { $$slots: i = {}, $$scope: o } = e, { i18n: s } = e, { eta: r = null } = e, { queue_position: f } = e, { queue_size: a } = e, { status: _ } = e, { scroll_to_output: u = !1 } = e, { timer: c = !0 } = e, { show_progress: m = "full" } = e, { message: p = null } = e, { progress: T = null } = e, { variant: S = "default" } = e, { loading_text: L = "Loading..." } = e, { absolute: C = !0 } = e, { translucent: d = !1 } = e, { border: y = !1 } = e, { autoscroll: M } = e, g,
|
| 2642 |
const h = () => {
|
| 2643 |
-
t(0, r = t(26,
|
| 2644 |
};
|
| 2645 |
function Fe() {
|
| 2646 |
requestAnimationFrame(() => {
|
| 2647 |
-
t(25, z = (performance.now() - Q) / 1e3),
|
| 2648 |
});
|
| 2649 |
}
|
| 2650 |
function Me() {
|
| 2651 |
-
t(25, z = 0), t(0, r = t(26,
|
| 2652 |
}
|
| 2653 |
-
|
| 2654 |
-
|
| 2655 |
});
|
| 2656 |
let me = null;
|
| 2657 |
function Pe(w) {
|
| 2658 |
Ct[w ? "unshift" : "push"](() => {
|
| 2659 |
-
|
| 2660 |
});
|
| 2661 |
}
|
| 2662 |
function Ze(w) {
|
|
@@ -2668,17 +2640,17 @@ function Mi(n, e, t) {
|
|
| 2668 |
"i18n" in w && t(1, s = w.i18n), "eta" in w && t(0, r = w.eta), "queue_position" in w && t(2, f = w.queue_position), "queue_size" in w && t(3, a = w.queue_size), "status" in w && t(4, _ = w.status), "scroll_to_output" in w && t(21, u = w.scroll_to_output), "timer" in w && t(5, c = w.timer), "show_progress" in w && t(6, m = w.show_progress), "message" in w && t(22, p = w.message), "progress" in w && t(7, T = w.progress), "variant" in w && t(8, S = w.variant), "loading_text" in w && t(9, L = w.loading_text), "absolute" in w && t(10, C = w.absolute), "translucent" in w && t(11, d = w.translucent), "border" in w && t(12, y = w.border), "autoscroll" in w && t(23, M = w.autoscroll), "$$scope" in w && t(28, o = w.$$scope);
|
| 2669 |
}, n.$$.update = () => {
|
| 2670 |
n.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
|
| 2671 |
-
218103809 && (r === null && t(0, r =
|
| 2672 |
-
167772160 && t(17, se =
|
| 2673 |
128 && T != null && t(18, de = !1), n.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
|
| 2674 |
-
114816 && (T != null ? t(14,
|
| 2675 |
if (w.index != null && w.length != null)
|
| 2676 |
return w.index / w.length;
|
| 2677 |
if (w.progress != null)
|
| 2678 |
return w.progress;
|
| 2679 |
-
})) : t(14,
|
| 2680 |
16 && (_ === "pending" ? h() : Me()), n.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
|
| 2681 |
-
10493968 && g && u && (_ === "pending" || _ === "complete") &&
|
| 2682 |
4194320, n.$$.dirty[0] & /*timer_diff*/
|
| 2683 |
33554432 && t(20, l = z.toFixed(1));
|
| 2684 |
}, [
|
|
@@ -2696,9 +2668,9 @@ function Mi(n, e, t) {
|
|
| 2696 |
d,
|
| 2697 |
y,
|
| 2698 |
g,
|
| 2699 |
-
|
| 2700 |
x,
|
| 2701 |
-
|
| 2702 |
se,
|
| 2703 |
de,
|
| 2704 |
me,
|
|
@@ -2708,22 +2680,22 @@ function Mi(n, e, t) {
|
|
| 2708 |
M,
|
| 2709 |
Q,
|
| 2710 |
z,
|
| 2711 |
-
|
| 2712 |
-
|
| 2713 |
o,
|
| 2714 |
i,
|
| 2715 |
Pe,
|
| 2716 |
Ze
|
| 2717 |
];
|
| 2718 |
}
|
| 2719 |
-
class
|
| 2720 |
constructor(e) {
|
| 2721 |
-
super(),
|
| 2722 |
this,
|
| 2723 |
e,
|
| 2724 |
-
|
| 2725 |
-
|
| 2726 |
-
|
| 2727 |
{
|
| 2728 |
i18n: 1,
|
| 2729 |
eta: 0,
|
|
@@ -2748,25 +2720,25 @@ class Ni extends ii {
|
|
| 2748 |
}
|
| 2749 |
}
|
| 2750 |
const {
|
| 2751 |
-
SvelteComponent:
|
| 2752 |
add_flush_callback: Zt,
|
| 2753 |
-
assign:
|
| 2754 |
bind: Bt,
|
| 2755 |
binding_callbacks: Rt,
|
| 2756 |
-
check_outros:
|
| 2757 |
create_component: Qe,
|
| 2758 |
destroy_component: xe,
|
| 2759 |
-
detach:
|
| 2760 |
flush: N,
|
| 2761 |
-
get_spread_object:
|
| 2762 |
-
get_spread_update:
|
| 2763 |
-
group_outros:
|
| 2764 |
-
init:
|
| 2765 |
-
insert:
|
| 2766 |
mount_component: $e,
|
| 2767 |
-
safe_not_equal:
|
| 2768 |
-
space:
|
| 2769 |
-
transition_in:
|
| 2770 |
transition_out: Te
|
| 2771 |
} = window.__gradio__svelte__internal;
|
| 2772 |
function Dt(n) {
|
|
@@ -2785,8 +2757,8 @@ function Dt(n) {
|
|
| 2785 |
];
|
| 2786 |
let i = {};
|
| 2787 |
for (let o = 0; o < l.length; o += 1)
|
| 2788 |
-
i =
|
| 2789 |
-
return e = new
|
| 2790 |
c() {
|
| 2791 |
Qe(e.$$.fragment);
|
| 2792 |
},
|
|
@@ -2795,7 +2767,7 @@ function Dt(n) {
|
|
| 2795 |
},
|
| 2796 |
p(o, s) {
|
| 2797 |
const r = s & /*gradio, loading_status*/
|
| 2798 |
-
131080 ?
|
| 2799 |
s & /*gradio*/
|
| 2800 |
8 && { autoscroll: (
|
| 2801 |
/*gradio*/
|
|
@@ -2807,7 +2779,7 @@ function Dt(n) {
|
|
| 2807 |
o[3].i18n
|
| 2808 |
) },
|
| 2809 |
s & /*loading_status*/
|
| 2810 |
-
131072 &&
|
| 2811 |
/*loading_status*/
|
| 2812 |
o[17]
|
| 2813 |
)
|
|
@@ -2815,7 +2787,7 @@ function Dt(n) {
|
|
| 2815 |
e.$set(r);
|
| 2816 |
},
|
| 2817 |
i(o) {
|
| 2818 |
-
t || (
|
| 2819 |
},
|
| 2820 |
o(o) {
|
| 2821 |
Te(e.$$.fragment, o), t = !1;
|
|
@@ -2825,7 +2797,7 @@ function Dt(n) {
|
|
| 2825 |
}
|
| 2826 |
};
|
| 2827 |
}
|
| 2828 |
-
function
|
| 2829 |
let e, t, l, i, o, s = (
|
| 2830 |
/*loading_status*/
|
| 2831 |
n[17] && Dt(n)
|
|
@@ -2881,7 +2853,7 @@ function Oi(n) {
|
|
| 2881 |
n[0] !== void 0 && (a.value = /*value*/
|
| 2882 |
n[0]), /*value_is_output*/
|
| 2883 |
n[2] !== void 0 && (a.value_is_output = /*value_is_output*/
|
| 2884 |
-
n[2]), t = new
|
| 2885 |
"change",
|
| 2886 |
/*change_handler*/
|
| 2887 |
n[24]
|
|
@@ -2907,17 +2879,17 @@ function Oi(n) {
|
|
| 2907 |
n[29]
|
| 2908 |
), {
|
| 2909 |
c() {
|
| 2910 |
-
s && s.c(), e =
|
| 2911 |
},
|
| 2912 |
m(_, u) {
|
| 2913 |
-
s && s.m(_, u),
|
| 2914 |
},
|
| 2915 |
p(_, u) {
|
| 2916 |
/*loading_status*/
|
| 2917 |
_[17] ? s ? (s.p(_, u), u & /*loading_status*/
|
| 2918 |
-
131072 &&
|
| 2919 |
s = null;
|
| 2920 |
-
}),
|
| 2921 |
const c = {};
|
| 2922 |
u & /*label*/
|
| 2923 |
16 && (c.label = /*label*/
|
|
@@ -2946,20 +2918,20 @@ function Oi(n) {
|
|
| 2946 |
_[2], Zt(() => i = !1)), t.$set(c);
|
| 2947 |
},
|
| 2948 |
i(_) {
|
| 2949 |
-
o || (
|
| 2950 |
},
|
| 2951 |
o(_) {
|
| 2952 |
Te(s), Te(t.$$.fragment, _), o = !1;
|
| 2953 |
},
|
| 2954 |
d(_) {
|
| 2955 |
-
_ &&
|
| 2956 |
}
|
| 2957 |
}
|
| 2958 |
);
|
| 2959 |
}
|
| 2960 |
-
function
|
| 2961 |
let e, t;
|
| 2962 |
-
return e = new
|
| 2963 |
props: {
|
| 2964 |
visible: (
|
| 2965 |
/*visible*/
|
|
@@ -2986,7 +2958,7 @@ function Ii(n) {
|
|
| 2986 |
/*container*/
|
| 2987 |
n[13]
|
| 2988 |
),
|
| 2989 |
-
$$slots: { default: [
|
| 2990 |
$$scope: { ctx: n }
|
| 2991 |
}
|
| 2992 |
}), {
|
|
@@ -3014,7 +2986,7 @@ function Ii(n) {
|
|
| 3014 |
1074216063 && (o.$$scope = { dirty: i, ctx: l }), e.$set(o);
|
| 3015 |
},
|
| 3016 |
i(l) {
|
| 3017 |
-
t || (
|
| 3018 |
},
|
| 3019 |
o(l) {
|
| 3020 |
Te(e.$$.fragment, l), t = !1;
|
|
@@ -3024,22 +2996,22 @@ function Ii(n) {
|
|
| 3024 |
}
|
| 3025 |
};
|
| 3026 |
}
|
| 3027 |
-
function
|
| 3028 |
let { gradio: l } = e, { label: i = "Highlighted Textbox" } = e, { legend_label: o = "Highlights:" } = e, { info: s = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: f = [] } = e, { visible: a = !0 } = e, { value: _ } = e, { show_label: u } = e, { show_legend: c } = e, { show_legend_label: m } = e, { color_map: p = {} } = e, { container: T = !0 } = e, { scale: S = null } = e, { min_width: L = void 0 } = e, { show_copy_button: C = !1 } = e, { loading_status: d = void 0 } = e, { value_is_output: y = !1 } = e, { combine_adjacent: M = !1 } = e, { interactive: g = !0 } = e;
|
| 3029 |
-
const
|
| 3030 |
function z(h) {
|
| 3031 |
_ = h, t(0, _), t(19, M);
|
| 3032 |
}
|
| 3033 |
-
function
|
| 3034 |
y = h, t(2, y);
|
| 3035 |
}
|
| 3036 |
-
const
|
| 3037 |
return n.$$set = (h) => {
|
| 3038 |
"gradio" in h && t(3, l = h.gradio), "label" in h && t(4, i = h.label), "legend_label" in h && t(5, o = h.legend_label), "info" in h && t(6, s = h.info), "elem_id" in h && t(7, r = h.elem_id), "elem_classes" in h && t(8, f = h.elem_classes), "visible" in h && t(9, a = h.visible), "value" in h && t(0, _ = h.value), "show_label" in h && t(10, u = h.show_label), "show_legend" in h && t(11, c = h.show_legend), "show_legend_label" in h && t(12, m = h.show_legend_label), "color_map" in h && t(1, p = h.color_map), "container" in h && t(13, T = h.container), "scale" in h && t(14, S = h.scale), "min_width" in h && t(15, L = h.min_width), "show_copy_button" in h && t(16, C = h.show_copy_button), "loading_status" in h && t(17, d = h.loading_status), "value_is_output" in h && t(2, y = h.value_is_output), "combine_adjacent" in h && t(19, M = h.combine_adjacent), "interactive" in h && t(18, g = h.interactive);
|
| 3039 |
}, n.$$.update = () => {
|
| 3040 |
n.$$.dirty & /*color_map*/
|
| 3041 |
2 && !p && Object.keys(p).length && t(1, p), n.$$.dirty & /*value, combine_adjacent*/
|
| 3042 |
-
524289 && _ && M && t(0, _ =
|
| 3043 |
}, [
|
| 3044 |
_,
|
| 3045 |
p,
|
|
@@ -3061,21 +3033,21 @@ function Ui(n, e, t) {
|
|
| 3061 |
d,
|
| 3062 |
g,
|
| 3063 |
M,
|
| 3064 |
-
|
| 3065 |
Q,
|
| 3066 |
z,
|
| 3067 |
-
|
| 3068 |
-
|
| 3069 |
se,
|
| 3070 |
-
|
| 3071 |
x,
|
| 3072 |
-
|
| 3073 |
de
|
| 3074 |
];
|
| 3075 |
}
|
| 3076 |
-
class
|
| 3077 |
constructor(e) {
|
| 3078 |
-
super(),
|
| 3079 |
gradio: 3,
|
| 3080 |
label: 4,
|
| 3081 |
legend_label: 5,
|
|
@@ -3228,5 +3200,5 @@ class Xi extends Hi {
|
|
| 3228 |
}
|
| 3229 |
}
|
| 3230 |
export {
|
| 3231 |
-
|
| 3232 |
};
|
|
|
|
| 1 |
const {
|
| 2 |
+
SvelteComponent: ll,
|
| 3 |
+
assign: nl,
|
| 4 |
+
create_slot: il,
|
| 5 |
+
detach: ol,
|
| 6 |
+
element: sl,
|
| 7 |
+
get_all_dirty_from_scope: fl,
|
| 8 |
+
get_slot_changes: rl,
|
| 9 |
+
get_spread_update: al,
|
| 10 |
+
init: _l,
|
| 11 |
+
insert: ul,
|
| 12 |
+
safe_not_equal: cl,
|
| 13 |
set_dynamic_element_data: et,
|
| 14 |
set_style: A,
|
| 15 |
toggle_class: te,
|
| 16 |
transition_in: Ot,
|
| 17 |
transition_out: It,
|
| 18 |
+
update_slot_base: dl
|
| 19 |
} = window.__gradio__svelte__internal;
|
| 20 |
+
function ml(n) {
|
| 21 |
let e, t, l;
|
| 22 |
const i = (
|
| 23 |
/*#slots*/
|
| 24 |
n[18].default
|
| 25 |
+
), o = il(
|
| 26 |
i,
|
| 27 |
n,
|
| 28 |
/*$$scope*/
|
|
|
|
| 44 |
}
|
| 45 |
], r = {};
|
| 46 |
for (let f = 0; f < s.length; f += 1)
|
| 47 |
+
r = nl(r, s[f]);
|
| 48 |
return {
|
| 49 |
c() {
|
| 50 |
+
e = sl(
|
| 51 |
/*tag*/
|
| 52 |
n[14]
|
| 53 |
), o && o.c(), et(
|
|
|
|
| 105 |
n[13]}px, 100%))`), A(e, "border-width", "var(--block-border-width)");
|
| 106 |
},
|
| 107 |
m(f, a) {
|
| 108 |
+
ul(f, e, a), o && o.m(e, null), l = !0;
|
| 109 |
},
|
| 110 |
p(f, a) {
|
| 111 |
o && o.p && (!l || a & /*$$scope*/
|
| 112 |
+
131072) && dl(
|
| 113 |
o,
|
| 114 |
i,
|
| 115 |
f,
|
| 116 |
/*$$scope*/
|
| 117 |
f[17],
|
| 118 |
+
l ? rl(
|
| 119 |
i,
|
| 120 |
/*$$scope*/
|
| 121 |
f[17],
|
| 122 |
a,
|
| 123 |
null
|
| 124 |
+
) : fl(
|
| 125 |
/*$$scope*/
|
| 126 |
f[17]
|
| 127 |
),
|
|
|
|
| 129 |
), et(
|
| 130 |
/*tag*/
|
| 131 |
f[14]
|
| 132 |
+
)(e, r = al(s, [
|
| 133 |
(!l || a & /*test_id*/
|
| 134 |
128) && { "data-testid": (
|
| 135 |
/*test_id*/
|
|
|
|
| 207 |
It(o, f), l = !1;
|
| 208 |
},
|
| 209 |
d(f) {
|
| 210 |
+
f && ol(e), o && o.d(f);
|
| 211 |
}
|
| 212 |
};
|
| 213 |
}
|
| 214 |
+
function bl(n) {
|
| 215 |
let e, t = (
|
| 216 |
/*tag*/
|
| 217 |
+
n[14] && ml(n)
|
| 218 |
);
|
| 219 |
return {
|
| 220 |
c() {
|
|
|
|
| 238 |
}
|
| 239 |
};
|
| 240 |
}
|
| 241 |
+
function gl(n, e, t) {
|
| 242 |
let { $$slots: l = {}, $$scope: i } = e, { height: o = void 0 } = e, { width: s = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: f = [] } = e, { variant: a = "solid" } = e, { border_mode: _ = "base" } = e, { padding: u = !0 } = e, { type: c = "normal" } = e, { test_id: m = void 0 } = e, { explicit_call: p = !1 } = e, { container: T = !0 } = e, { visible: S = !0 } = e, { allow_overflow: L = !0 } = e, { scale: C = null } = e, { min_width: d = 0 } = e, y = c === "fieldset" ? "fieldset" : "div";
|
| 243 |
const M = (g) => {
|
| 244 |
if (g !== void 0) {
|
|
|
|
| 272 |
l
|
| 273 |
];
|
| 274 |
}
|
| 275 |
+
class hl extends ll {
|
| 276 |
constructor(e) {
|
| 277 |
+
super(), _l(this, e, gl, bl, cl, {
|
| 278 |
height: 0,
|
| 279 |
width: 1,
|
| 280 |
elem_id: 2,
|
|
|
|
| 294 |
}
|
| 295 |
}
|
| 296 |
const {
|
| 297 |
+
SvelteComponent: wl,
|
| 298 |
+
attr: pl,
|
| 299 |
+
create_slot: kl,
|
| 300 |
+
detach: vl,
|
| 301 |
+
element: yl,
|
| 302 |
+
get_all_dirty_from_scope: Cl,
|
| 303 |
+
get_slot_changes: ql,
|
| 304 |
+
init: Sl,
|
| 305 |
+
insert: Ll,
|
| 306 |
+
safe_not_equal: Tl,
|
| 307 |
+
transition_in: Fl,
|
| 308 |
+
transition_out: Ml,
|
| 309 |
+
update_slot_base: Nl
|
| 310 |
} = window.__gradio__svelte__internal;
|
| 311 |
+
function Hl(n) {
|
| 312 |
let e, t;
|
| 313 |
const l = (
|
| 314 |
/*#slots*/
|
| 315 |
n[1].default
|
| 316 |
+
), i = kl(
|
| 317 |
l,
|
| 318 |
n,
|
| 319 |
/*$$scope*/
|
|
|
|
| 322 |
);
|
| 323 |
return {
|
| 324 |
c() {
|
| 325 |
+
e = yl("div"), i && i.c(), pl(e, "class", "svelte-1hnfib2");
|
| 326 |
},
|
| 327 |
m(o, s) {
|
| 328 |
+
Ll(o, e, s), i && i.m(e, null), t = !0;
|
| 329 |
},
|
| 330 |
p(o, [s]) {
|
| 331 |
i && i.p && (!t || s & /*$$scope*/
|
| 332 |
+
1) && Nl(
|
| 333 |
i,
|
| 334 |
l,
|
| 335 |
o,
|
| 336 |
/*$$scope*/
|
| 337 |
o[0],
|
| 338 |
+
t ? ql(
|
| 339 |
l,
|
| 340 |
/*$$scope*/
|
| 341 |
o[0],
|
| 342 |
s,
|
| 343 |
null
|
| 344 |
+
) : Cl(
|
| 345 |
/*$$scope*/
|
| 346 |
o[0]
|
| 347 |
),
|
|
|
|
| 349 |
);
|
| 350 |
},
|
| 351 |
i(o) {
|
| 352 |
+
t || (Fl(i, o), t = !0);
|
| 353 |
},
|
| 354 |
o(o) {
|
| 355 |
+
Ml(i, o), t = !1;
|
| 356 |
},
|
| 357 |
d(o) {
|
| 358 |
+
o && vl(e), i && i.d(o);
|
| 359 |
}
|
| 360 |
};
|
| 361 |
}
|
| 362 |
+
function jl(n, e, t) {
|
| 363 |
let { $$slots: l = {}, $$scope: i } = e;
|
| 364 |
return n.$$set = (o) => {
|
| 365 |
"$$scope" in o && t(0, i = o.$$scope);
|
| 366 |
}, [i, l];
|
| 367 |
}
|
| 368 |
+
class Vl extends wl {
|
| 369 |
constructor(e) {
|
| 370 |
+
super(), Sl(this, e, jl, Hl, Tl, {});
|
| 371 |
}
|
| 372 |
}
|
| 373 |
const {
|
| 374 |
+
SvelteComponent: Al,
|
| 375 |
attr: tt,
|
| 376 |
+
check_outros: zl,
|
| 377 |
+
create_component: El,
|
| 378 |
+
create_slot: Pl,
|
| 379 |
+
destroy_component: Zl,
|
| 380 |
detach: je,
|
| 381 |
+
element: Bl,
|
| 382 |
+
empty: Rl,
|
| 383 |
+
get_all_dirty_from_scope: Dl,
|
| 384 |
+
get_slot_changes: Ol,
|
| 385 |
+
group_outros: Il,
|
| 386 |
+
init: Ul,
|
| 387 |
insert: Ve,
|
| 388 |
+
mount_component: Wl,
|
| 389 |
+
safe_not_equal: Xl,
|
| 390 |
+
set_data: Yl,
|
| 391 |
+
space: Gl,
|
| 392 |
+
text: Jl,
|
| 393 |
toggle_class: ge,
|
| 394 |
transition_in: Se,
|
| 395 |
transition_out: Ae,
|
| 396 |
+
update_slot_base: Kl
|
| 397 |
} = window.__gradio__svelte__internal;
|
| 398 |
function lt(n) {
|
| 399 |
let e, t;
|
| 400 |
+
return e = new Vl({
|
| 401 |
props: {
|
| 402 |
+
$$slots: { default: [Ql] },
|
| 403 |
$$scope: { ctx: n }
|
| 404 |
}
|
| 405 |
}), {
|
| 406 |
c() {
|
| 407 |
+
El(e.$$.fragment);
|
| 408 |
},
|
| 409 |
m(l, i) {
|
| 410 |
+
Wl(e, l, i), t = !0;
|
| 411 |
},
|
| 412 |
p(l, i) {
|
| 413 |
const o = {};
|
|
|
|
| 421 |
Ae(e.$$.fragment, l), t = !1;
|
| 422 |
},
|
| 423 |
d(l) {
|
| 424 |
+
Zl(e, l);
|
| 425 |
}
|
| 426 |
};
|
| 427 |
}
|
| 428 |
+
function Ql(n) {
|
| 429 |
let e;
|
| 430 |
return {
|
| 431 |
c() {
|
| 432 |
+
e = Jl(
|
| 433 |
/*info*/
|
| 434 |
n[1]
|
| 435 |
);
|
|
|
|
| 439 |
},
|
| 440 |
p(t, l) {
|
| 441 |
l & /*info*/
|
| 442 |
+
2 && Yl(
|
| 443 |
e,
|
| 444 |
/*info*/
|
| 445 |
t[1]
|
|
|
|
| 450 |
}
|
| 451 |
};
|
| 452 |
}
|
| 453 |
+
function xl(n) {
|
| 454 |
let e, t, l, i;
|
| 455 |
const o = (
|
| 456 |
/*#slots*/
|
| 457 |
n[2].default
|
| 458 |
+
), s = Pl(
|
| 459 |
o,
|
| 460 |
n,
|
| 461 |
/*$$scope*/
|
|
|
|
| 468 |
);
|
| 469 |
return {
|
| 470 |
c() {
|
| 471 |
+
e = Bl("span"), s && s.c(), t = Gl(), r && r.c(), l = Rl(), tt(e, "data-testid", "block-info"), tt(e, "class", "svelte-22c38v"), ge(e, "sr-only", !/*show_label*/
|
| 472 |
n[0]), ge(e, "hide", !/*show_label*/
|
| 473 |
n[0]), ge(
|
| 474 |
e,
|
|
|
|
| 482 |
},
|
| 483 |
p(f, [a]) {
|
| 484 |
s && s.p && (!i || a & /*$$scope*/
|
| 485 |
+
8) && Kl(
|
| 486 |
s,
|
| 487 |
o,
|
| 488 |
f,
|
| 489 |
/*$$scope*/
|
| 490 |
f[3],
|
| 491 |
+
i ? Ol(
|
| 492 |
o,
|
| 493 |
/*$$scope*/
|
| 494 |
f[3],
|
| 495 |
a,
|
| 496 |
null
|
| 497 |
+
) : Dl(
|
| 498 |
/*$$scope*/
|
| 499 |
f[3]
|
| 500 |
),
|
|
|
|
| 511 |
f[1] != null
|
| 512 |
), /*info*/
|
| 513 |
f[1] ? r ? (r.p(f, a), a & /*info*/
|
| 514 |
+
2 && Se(r, 1)) : (r = lt(f), r.c(), Se(r, 1), r.m(l.parentNode, l)) : r && (Il(), Ae(r, 1, 1, () => {
|
| 515 |
r = null;
|
| 516 |
+
}), zl());
|
| 517 |
},
|
| 518 |
i(f) {
|
| 519 |
i || (Se(s, f), Se(r), i = !0);
|
|
|
|
| 526 |
}
|
| 527 |
};
|
| 528 |
}
|
| 529 |
+
function $l(n, e, t) {
|
| 530 |
let { $$slots: l = {}, $$scope: i } = e, { show_label: o = !0 } = e, { info: s = void 0 } = e;
|
| 531 |
return n.$$set = (r) => {
|
| 532 |
"show_label" in r && t(0, o = r.show_label), "info" in r && t(1, s = r.info), "$$scope" in r && t(3, i = r.$$scope);
|
| 533 |
}, [o, s, l, i];
|
| 534 |
}
|
| 535 |
+
class en extends Al {
|
| 536 |
constructor(e) {
|
| 537 |
+
super(), Ul(this, e, $l, xl, Xl, { show_label: 0, info: 1 });
|
| 538 |
}
|
| 539 |
}
|
| 540 |
const {
|
| 541 |
+
SvelteComponent: tn,
|
| 542 |
+
append: ln,
|
| 543 |
attr: le,
|
| 544 |
+
detach: nn,
|
| 545 |
+
init: on,
|
| 546 |
+
insert: sn,
|
| 547 |
noop: Be,
|
| 548 |
+
safe_not_equal: fn,
|
| 549 |
svg_element: nt
|
| 550 |
} = window.__gradio__svelte__internal;
|
| 551 |
+
function rn(n) {
|
| 552 |
let e, t;
|
| 553 |
return {
|
| 554 |
c() {
|
| 555 |
e = nt("svg"), t = nt("polyline"), le(t, "points", "20 6 9 17 4 12"), le(e, "xmlns", "http://www.w3.org/2000/svg"), le(e, "viewBox", "2 0 20 20"), le(e, "fill", "none"), le(e, "stroke", "currentColor"), le(e, "stroke-width", "3"), le(e, "stroke-linecap", "round"), le(e, "stroke-linejoin", "round");
|
| 556 |
},
|
| 557 |
m(l, i) {
|
| 558 |
+
sn(l, e, i), ln(e, t);
|
| 559 |
},
|
| 560 |
p: Be,
|
| 561 |
i: Be,
|
| 562 |
o: Be,
|
| 563 |
d(l) {
|
| 564 |
+
l && nn(e);
|
| 565 |
}
|
| 566 |
};
|
| 567 |
}
|
| 568 |
+
class an extends tn {
|
| 569 |
constructor(e) {
|
| 570 |
+
super(), on(this, e, null, rn, fn, {});
|
| 571 |
}
|
| 572 |
}
|
| 573 |
const {
|
| 574 |
+
SvelteComponent: _n,
|
| 575 |
append: it,
|
| 576 |
attr: ae,
|
| 577 |
+
detach: un,
|
| 578 |
+
init: cn,
|
| 579 |
+
insert: dn,
|
| 580 |
noop: Re,
|
| 581 |
+
safe_not_equal: mn,
|
| 582 |
svg_element: De
|
| 583 |
} = window.__gradio__svelte__internal;
|
| 584 |
+
function bn(n) {
|
| 585 |
let e, t, l;
|
| 586 |
return {
|
| 587 |
c() {
|
| 588 |
e = De("svg"), t = De("path"), l = De("path"), ae(t, "fill", "currentColor"), ae(t, "d", "M28 10v18H10V10h18m0-2H10a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Z"), ae(l, "fill", "currentColor"), ae(l, "d", "M4 18H2V4a2 2 0 0 1 2-2h14v2H4Z"), ae(e, "xmlns", "http://www.w3.org/2000/svg"), ae(e, "viewBox", "0 0 33 33"), ae(e, "color", "currentColor");
|
| 589 |
},
|
| 590 |
m(i, o) {
|
| 591 |
+
dn(i, e, o), it(e, t), it(e, l);
|
| 592 |
},
|
| 593 |
p: Re,
|
| 594 |
i: Re,
|
| 595 |
o: Re,
|
| 596 |
d(i) {
|
| 597 |
+
i && un(e);
|
| 598 |
}
|
| 599 |
};
|
| 600 |
}
|
| 601 |
+
class gn extends _n {
|
| 602 |
constructor(e) {
|
| 603 |
+
super(), cn(this, e, null, bn, mn, {});
|
| 604 |
}
|
| 605 |
}
|
| 606 |
const ot = [
|
|
|
|
| 614 |
"cyan",
|
| 615 |
"lime",
|
| 616 |
"pink"
|
| 617 |
+
], hn = [
|
| 618 |
{ color: "red", primary: 600, secondary: 100 },
|
| 619 |
{ color: "green", primary: 600, secondary: 100 },
|
| 620 |
{ color: "blue", primary: 600, secondary: 100 },
|
|
|
|
| 917 |
900: "#881337",
|
| 918 |
950: "#4c0519"
|
| 919 |
}
|
| 920 |
+
}, ft = hn.reduce(
|
| 921 |
(n, { color: e, primary: t, secondary: l }) => ({
|
| 922 |
...n,
|
| 923 |
[e]: {
|
|
|
|
| 926 |
}
|
| 927 |
}),
|
| 928 |
{}
|
| 929 |
+
), wn = (n) => ot[n % ot.length];
|
| 930 |
function ze() {
|
| 931 |
}
|
| 932 |
+
const pn = (n) => n;
|
| 933 |
+
function kn(n, e) {
|
| 934 |
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
| 935 |
}
|
| 936 |
const Ut = typeof window < "u";
|
| 937 |
let rt = Ut ? () => window.performance.now() : () => Date.now(), Wt = Ut ? (n) => requestAnimationFrame(n) : ze;
|
| 938 |
+
const ke = /* @__PURE__ */ new Set();
|
| 939 |
function Xt(n) {
|
| 940 |
+
ke.forEach((e) => {
|
| 941 |
+
e.c(n) || (ke.delete(e), e.f());
|
| 942 |
+
}), ke.size !== 0 && Wt(Xt);
|
| 943 |
}
|
| 944 |
+
function vn(n) {
|
| 945 |
let e;
|
| 946 |
+
return ke.size === 0 && Wt(Xt), {
|
| 947 |
promise: new Promise((t) => {
|
| 948 |
+
ke.add(e = { c: n, f: t });
|
| 949 |
}),
|
| 950 |
abort() {
|
| 951 |
+
ke.delete(e);
|
| 952 |
}
|
| 953 |
};
|
| 954 |
}
|
| 955 |
+
function yn(n, { delay: e = 0, duration: t = 400, easing: l = pn } = {}) {
|
| 956 |
const i = +getComputedStyle(n).opacity;
|
| 957 |
return {
|
| 958 |
delay: e,
|
|
|
|
| 962 |
};
|
| 963 |
}
|
| 964 |
const he = [];
|
| 965 |
+
function Cn(n, e = ze) {
|
| 966 |
let t;
|
| 967 |
const l = /* @__PURE__ */ new Set();
|
| 968 |
function i(r) {
|
| 969 |
+
if (kn(n, r) && (n = r, t)) {
|
| 970 |
const f = !he.length;
|
| 971 |
for (const a of l)
|
| 972 |
a[1](), he.push(a, n);
|
|
|
|
| 1010 |
}
|
| 1011 |
}
|
| 1012 |
function _t(n, e = {}) {
|
| 1013 |
+
const t = Cn(n), { stiffness: l = 0.15, damping: i = 0.8, precision: o = 0.01 } = e;
|
| 1014 |
let s, r, f, a = n, _ = n, u = 1, c = 0, m = !1;
|
| 1015 |
function p(S, L = {}) {
|
| 1016 |
_ = S;
|
| 1017 |
const C = f = {};
|
| 1018 |
+
return n == null || L.hard || T.stiffness >= 1 && T.damping >= 1 ? (m = !0, s = rt(), a = S, t.set(n = _), Promise.resolve()) : (L.soft && (c = 1 / ((L.soft === !0 ? 0.5 : +L.soft) * 60), u = 0), r || (s = rt(), m = !1, r = vn((d) => {
|
| 1019 |
if (m)
|
| 1020 |
return m = !1, r = null, !1;
|
| 1021 |
u = Math.min(u + c, 1);
|
|
|
|
| 1051 |
const [i, o, s] = t.getImageData(0, 0, 1, 1).data;
|
| 1052 |
return t.clearRect(0, 0, 1, 1), `rgba(${i}, ${o}, ${s}, ${255 / e})`;
|
| 1053 |
}
|
| 1054 |
+
function qn(n, e, t) {
|
| 1055 |
var l = {};
|
| 1056 |
for (const i in n) {
|
| 1057 |
const o = n[i].trim();
|
|
|
|
| 1062 |
}
|
| 1063 |
return l;
|
| 1064 |
}
|
| 1065 |
+
function Sn(n, e) {
|
| 1066 |
let t = [], l = null, i = null;
|
| 1067 |
for (const [o, s] of n)
|
| 1068 |
e === "empty" && s === null || e === "equal" && i === s ? l = l ? l + o : o : (l !== null && t.push([l, i]), l = o, i = s);
|
| 1069 |
return l !== null && t.push([l, i]), t;
|
| 1070 |
}
|
| 1071 |
+
function Ln(n) {
|
| 1072 |
const e = window.getSelection();
|
| 1073 |
if (e.rangeCount > 0) {
|
| 1074 |
const t = document.createRange();
|
|
|
|
| 1076 |
}
|
| 1077 |
return -1;
|
| 1078 |
}
|
| 1079 |
+
function Tn(n, e) {
|
| 1080 |
var t = document.createTreeWalker(n, NodeFilter.SHOW_TEXT), l = t.nextNode();
|
| 1081 |
if (!l || !l.textContent)
|
| 1082 |
return null;
|
|
|
|
| 1089 |
return { node: l, offset: o };
|
| 1090 |
}
|
| 1091 |
const {
|
| 1092 |
+
SvelteComponent: Fn,
|
| 1093 |
add_render_callback: We,
|
| 1094 |
append: ue,
|
| 1095 |
attr: H,
|
| 1096 |
binding_callbacks: ct,
|
| 1097 |
+
bubble: qe,
|
| 1098 |
check_outros: Yt,
|
| 1099 |
create_component: Xe,
|
| 1100 |
+
create_in_transition: Mn,
|
| 1101 |
destroy_component: Ye,
|
| 1102 |
+
destroy_each: Nn,
|
| 1103 |
detach: J,
|
| 1104 |
element: oe,
|
| 1105 |
+
empty: Hn,
|
| 1106 |
ensure_array_like: dt,
|
| 1107 |
group_outros: Gt,
|
| 1108 |
+
init: jn,
|
| 1109 |
insert: K,
|
| 1110 |
+
listen: X,
|
| 1111 |
mount_component: Ge,
|
| 1112 |
noop: Jt,
|
| 1113 |
+
run_all: Vn,
|
| 1114 |
+
safe_not_equal: An,
|
| 1115 |
set_data: Je,
|
| 1116 |
space: Le,
|
| 1117 |
text: Ke,
|
| 1118 |
toggle_class: mt,
|
| 1119 |
transition_in: ne,
|
| 1120 |
transition_out: ce
|
| 1121 |
+
} = window.__gradio__svelte__internal, { beforeUpdate: zn, afterUpdate: En, createEventDispatcher: Pn, tick: Ui } = window.__gradio__svelte__internal;
|
| 1122 |
function bt(n, e, t) {
|
| 1123 |
const l = n.slice();
|
| 1124 |
+
return l[39] = e[t][0], l[40] = e[t][1], l[42] = t, l;
|
| 1125 |
}
|
| 1126 |
function gt(n) {
|
| 1127 |
let e, t, l = (
|
|
|
|
| 1164 |
}
|
| 1165 |
},
|
| 1166 |
d(s) {
|
| 1167 |
+
s && J(e), l && l.d(), Nn(o, s);
|
| 1168 |
}
|
| 1169 |
};
|
| 1170 |
}
|
|
|
|
| 1196 |
function wt(n) {
|
| 1197 |
let e, t = (
|
| 1198 |
/*category*/
|
| 1199 |
+
n[39] + ""
|
| 1200 |
), l, i, o;
|
| 1201 |
return {
|
| 1202 |
c() {
|
| 1203 |
e = oe("div"), l = Ke(t), i = Le(), H(e, "class", "category-label svelte-1u11ied"), H(e, "style", o = "background-color:" + /*color*/
|
| 1204 |
+
n[40].secondary);
|
| 1205 |
},
|
| 1206 |
m(s, r) {
|
| 1207 |
K(s, e, r), ue(e, l), ue(e, i);
|
|
|
|
| 1209 |
p(s, r) {
|
| 1210 |
r[0] & /*_color_map*/
|
| 1211 |
4096 && t !== (t = /*category*/
|
| 1212 |
+
s[39] + "") && Je(l, t), r[0] & /*_color_map*/
|
| 1213 |
4096 && o !== (o = "background-color:" + /*color*/
|
| 1214 |
+
s[40].secondary) && H(e, "style", o);
|
| 1215 |
},
|
| 1216 |
d(s) {
|
| 1217 |
s && J(e);
|
| 1218 |
}
|
| 1219 |
};
|
| 1220 |
}
|
| 1221 |
+
function Zn(n) {
|
| 1222 |
let e;
|
| 1223 |
return {
|
| 1224 |
c() {
|
|
|
|
| 1245 |
}
|
| 1246 |
function pt(n) {
|
| 1247 |
let e, t, l, i;
|
| 1248 |
+
const o = [Rn, Bn], s = [];
|
| 1249 |
function r(f, a) {
|
| 1250 |
return (
|
| 1251 |
/*copied*/
|
|
|
|
| 1254 |
}
|
| 1255 |
return e = r(n), t = s[e] = o[e](n), {
|
| 1256 |
c() {
|
| 1257 |
+
t.c(), l = Hn();
|
| 1258 |
},
|
| 1259 |
m(f, a) {
|
| 1260 |
s[e].m(f, a), K(f, l, a), i = !0;
|
|
|
|
| 1276 |
}
|
| 1277 |
};
|
| 1278 |
}
|
| 1279 |
+
function Bn(n) {
|
| 1280 |
let e, t, l, i, o;
|
| 1281 |
+
return t = new gn({}), {
|
| 1282 |
c() {
|
| 1283 |
e = oe("button"), Xe(t.$$.fragment), H(e, "aria-label", "Copy"), H(e, "aria-roledescription", "Copy text"), H(e, "class", "svelte-1u11ied");
|
| 1284 |
},
|
| 1285 |
m(s, r) {
|
| 1286 |
+
K(s, e, r), Ge(t, e, null), l = !0, i || (o = X(
|
| 1287 |
e,
|
| 1288 |
"click",
|
| 1289 |
/*handle_copy*/
|
|
|
|
| 1302 |
}
|
| 1303 |
};
|
| 1304 |
}
|
| 1305 |
+
function Rn(n) {
|
| 1306 |
let e, t, l, i;
|
| 1307 |
+
return t = new an({}), {
|
| 1308 |
c() {
|
| 1309 |
e = oe("button"), Xe(t.$$.fragment), H(e, "aria-label", "Copied"), H(e, "aria-roledescription", "Text copied"), H(e, "class", "svelte-1u11ied");
|
| 1310 |
},
|
|
|
|
| 1314 |
p: Jt,
|
| 1315 |
i(o) {
|
| 1316 |
i || (ne(t.$$.fragment, o), o && (l || We(() => {
|
| 1317 |
+
l = Mn(e, yn, { duration: 300 }), l.start();
|
| 1318 |
})), i = !0);
|
| 1319 |
},
|
| 1320 |
o(o) {
|
|
|
|
| 1325 |
}
|
| 1326 |
};
|
| 1327 |
}
|
| 1328 |
+
function Dn(n) {
|
| 1329 |
let e, t, l;
|
| 1330 |
return {
|
| 1331 |
c() {
|
|
|
|
| 1333 |
(n[11] === void 0 || /*marked_el_text*/
|
| 1334 |
n[9] === void 0) && We(() => (
|
| 1335 |
/*div_input_handler_1*/
|
| 1336 |
+
n[28].call(e)
|
| 1337 |
));
|
| 1338 |
},
|
| 1339 |
m(i, o) {
|
| 1340 |
+
K(i, e, o), n[27](e), /*el_text*/
|
| 1341 |
n[11] !== void 0 && (e.textContent = /*el_text*/
|
| 1342 |
n[11]), /*marked_el_text*/
|
| 1343 |
n[9] !== void 0 && (e.innerHTML = /*marked_el_text*/
|
| 1344 |
n[9]), t || (l = [
|
| 1345 |
+
X(
|
| 1346 |
e,
|
| 1347 |
"input",
|
| 1348 |
/*div_input_handler_1*/
|
| 1349 |
+
n[28]
|
| 1350 |
),
|
| 1351 |
+
X(
|
| 1352 |
e,
|
| 1353 |
"blur",
|
| 1354 |
/*handle_blur*/
|
| 1355 |
n[14]
|
| 1356 |
),
|
| 1357 |
+
X(
|
| 1358 |
e,
|
| 1359 |
"keypress",
|
| 1360 |
/*keypress_handler*/
|
| 1361 |
n[20]
|
| 1362 |
),
|
| 1363 |
+
X(
|
| 1364 |
e,
|
| 1365 |
"select",
|
| 1366 |
/*select_handler*/
|
| 1367 |
n[21]
|
| 1368 |
),
|
| 1369 |
+
X(
|
| 1370 |
e,
|
| 1371 |
"scroll",
|
| 1372 |
/*scroll_handler*/
|
| 1373 |
n[22]
|
| 1374 |
),
|
| 1375 |
+
X(
|
| 1376 |
e,
|
| 1377 |
"input",
|
| 1378 |
/*input_handler*/
|
| 1379 |
n[23]
|
| 1380 |
),
|
| 1381 |
+
X(
|
| 1382 |
e,
|
| 1383 |
"focus",
|
| 1384 |
/*focus_handler*/
|
| 1385 |
n[24]
|
| 1386 |
),
|
| 1387 |
+
X(
|
| 1388 |
e,
|
| 1389 |
"change",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1390 |
/*checkAndRemoveHighlight*/
|
| 1391 |
n[16]
|
| 1392 |
)
|
|
|
|
| 1402 |
i[9]);
|
| 1403 |
},
|
| 1404 |
d(i) {
|
| 1405 |
+
i && J(e), n[27](null), t = !1, Vn(l);
|
| 1406 |
}
|
| 1407 |
};
|
| 1408 |
}
|
| 1409 |
+
function On(n) {
|
| 1410 |
let e, t, l;
|
| 1411 |
return {
|
| 1412 |
c() {
|
|
|
|
| 1414 |
(n[11] === void 0 || /*marked_el_text*/
|
| 1415 |
n[9] === void 0) && We(() => (
|
| 1416 |
/*div_input_handler*/
|
| 1417 |
+
n[26].call(e)
|
| 1418 |
));
|
| 1419 |
},
|
| 1420 |
m(i, o) {
|
| 1421 |
+
K(i, e, o), n[25](e), /*el_text*/
|
| 1422 |
n[11] !== void 0 && (e.textContent = /*el_text*/
|
| 1423 |
n[11]), /*marked_el_text*/
|
| 1424 |
n[9] !== void 0 && (e.innerHTML = /*marked_el_text*/
|
| 1425 |
+
n[9]), t || (l = X(
|
| 1426 |
e,
|
| 1427 |
"input",
|
| 1428 |
/*div_input_handler*/
|
| 1429 |
+
n[26]
|
| 1430 |
), t = !0);
|
| 1431 |
},
|
| 1432 |
p(i, o) {
|
|
|
|
| 1439 |
i[9]);
|
| 1440 |
},
|
| 1441 |
d(i) {
|
| 1442 |
+
i && J(e), n[25](null), t = !1, l();
|
| 1443 |
}
|
| 1444 |
};
|
| 1445 |
}
|
| 1446 |
+
function In(n) {
|
| 1447 |
let e, t, l, i, o, s, r = (
|
| 1448 |
/*show_legend*/
|
| 1449 |
n[4] && gt(n)
|
| 1450 |
);
|
| 1451 |
+
l = new en({
|
| 1452 |
props: {
|
| 1453 |
show_label: (
|
| 1454 |
/*show_label*/
|
|
|
|
| 1458 |
/*info*/
|
| 1459 |
n[2]
|
| 1460 |
),
|
| 1461 |
+
$$slots: { default: [Zn] },
|
| 1462 |
$$scope: { ctx: n }
|
| 1463 |
}
|
| 1464 |
});
|
|
|
|
| 1469 |
function a(c, m) {
|
| 1470 |
return (
|
| 1471 |
/*disabled*/
|
| 1472 |
+
c[8] ? On : Dn
|
| 1473 |
);
|
| 1474 |
}
|
| 1475 |
let _ = a(n), u = _(n);
|
|
|
|
| 1495 |
4 && (p.info = /*info*/
|
| 1496 |
c[2]), m[0] & /*label*/
|
| 1497 |
1 | m[1] & /*$$scope*/
|
| 1498 |
+
4096 && (p.$$scope = { dirty: m, ctx: c }), l.$set(p), /*show_copy_button*/
|
| 1499 |
c[7] ? f ? (f.p(c, m), m[0] & /*show_copy_button*/
|
| 1500 |
128 && ne(f, 1)) : (f = pt(c), f.c(), ne(f, 1), f.m(e, o)) : f && (Gt(), ce(f, 1, 1, () => {
|
| 1501 |
f = null;
|
|
|
|
| 1518 |
}
|
| 1519 |
};
|
| 1520 |
}
|
| 1521 |
+
function Un(n) {
|
| 1522 |
let e, t = n[0], l = 1;
|
| 1523 |
for (; l < n.length; ) {
|
| 1524 |
const i = n[l], o = n[l + 1];
|
|
|
|
| 1528 |
}
|
| 1529 |
return t;
|
| 1530 |
}
|
| 1531 |
+
function Wn(n, e, t) {
|
| 1532 |
const l = typeof document < "u";
|
| 1533 |
+
let { value: i = [] } = e, { value_is_output: o = !1 } = e, { label: s } = e, { legend_label: r } = e, { info: f = void 0 } = e, { show_label: a = !0 } = e, { show_legend: _ = !1 } = e, { show_legend_label: u = !1 } = e, { container: c = !0 } = e, { color_map: m = {} } = e, { show_copy_button: p = !1 } = e, { disabled: T } = e, S, L = "", C = "", d, y = {}, M = {}, g = !1, B;
|
| 1534 |
function Q() {
|
| 1535 |
if (!m || Object.keys(m).length === 0 ? y = {} : y = m, i.length > 0) {
|
| 1536 |
for (let [b, j] of i)
|
| 1537 |
if (j !== null && !(j in y)) {
|
| 1538 |
+
let E = wn(Object.keys(y).length);
|
| 1539 |
+
y[j] = E;
|
| 1540 |
}
|
| 1541 |
}
|
| 1542 |
+
t(12, M = qn(y, l, d));
|
| 1543 |
}
|
| 1544 |
function z() {
|
| 1545 |
i.length > 0 && o && (t(11, L = i.map(([b, j]) => b).join(" ")), t(9, C = i.map(([b, j]) => j !== null ? `<mark class="hl ${j}" style="background-color:${M[j].secondary}">${b}</mark>` : b).join(" ") + " "));
|
| 1546 |
}
|
| 1547 |
+
const R = Pn();
|
| 1548 |
+
zn(() => {
|
| 1549 |
S && S.offsetHeight + S.scrollTop > S.scrollHeight - 100;
|
| 1550 |
});
|
| 1551 |
+
function U() {
|
| 1552 |
+
R("change", C), o || R("input"), V();
|
| 1553 |
}
|
| 1554 |
+
En(() => {
|
| 1555 |
Q(), z(), t(18, o = !1);
|
| 1556 |
});
|
| 1557 |
function se() {
|
| 1558 |
+
let b = [], j = "", E = null, ee = !1, be = "";
|
| 1559 |
for (let fe = 0; fe < C.length; fe++) {
|
| 1560 |
let re = C[fe];
|
| 1561 |
+
re === "<" ? (ee = !0, j && b.push([j, E]), j = "", E = null) : re === ">" ? (ee = !1, be.startsWith("mark") && (E = Un([
|
| 1562 |
be,
|
| 1563 |
"access",
|
| 1564 |
+
(W) => W.match,
|
| 1565 |
"call",
|
| 1566 |
+
(W) => W(/class="hl ([^"]+)"/),
|
| 1567 |
"optionalAccess",
|
| 1568 |
+
(W) => W[1]
|
| 1569 |
]) || null), be = "") : ee ? be += re : j += re;
|
| 1570 |
}
|
| 1571 |
+
j && b.push([j, E]), t(17, i = b);
|
| 1572 |
}
|
| 1573 |
+
async function D() {
|
| 1574 |
"clipboard" in navigator && (await navigator.clipboard.writeText(L), x());
|
| 1575 |
}
|
| 1576 |
function x() {
|
| 1577 |
+
t(13, g = !0), B && clearTimeout(B), B = setTimeout(
|
| 1578 |
() => {
|
| 1579 |
t(13, g = !1);
|
| 1580 |
},
|
| 1581 |
1e3
|
| 1582 |
);
|
| 1583 |
}
|
| 1584 |
+
function V() {
|
| 1585 |
const b = window.getSelection(), j = b.anchorOffset;
|
| 1586 |
if (b.rangeCount > 0) {
|
| 1587 |
+
var E = b.getRangeAt(0).commonAncestorContainer.parentElement;
|
| 1588 |
+
if (E && E.tagName.toLowerCase() === "mark") {
|
| 1589 |
+
const el = E.textContent;
|
| 1590 |
+
var ee = E.parentElement, be = document.createTextNode(el);
|
| 1591 |
+
ee.replaceChild(be, E), t(9, C = ee.innerHTML);
|
| 1592 |
var fe = document.createRange(), re = window.getSelection();
|
| 1593 |
+
const tl = j + Ln(ee);
|
| 1594 |
+
var W = Tn(ee, tl);
|
| 1595 |
+
fe.setStart(W.node, W.offset), fe.setEnd(W.node, W.offset), re.removeAllRanges(), re.addRange(fe), se();
|
| 1596 |
}
|
| 1597 |
}
|
| 1598 |
}
|
| 1599 |
function de(b) {
|
| 1600 |
+
qe.call(this, n, b);
|
| 1601 |
}
|
| 1602 |
function h(b) {
|
| 1603 |
+
qe.call(this, n, b);
|
| 1604 |
}
|
| 1605 |
function Fe(b) {
|
| 1606 |
+
qe.call(this, n, b);
|
| 1607 |
}
|
| 1608 |
function Me(b) {
|
| 1609 |
+
qe.call(this, n, b);
|
| 1610 |
}
|
| 1611 |
function me(b) {
|
| 1612 |
+
qe.call(this, n, b);
|
| 1613 |
}
|
| 1614 |
function Pe(b) {
|
|
|
|
|
|
|
|
|
|
| 1615 |
ct[b ? "unshift" : "push"](() => {
|
| 1616 |
S = b, t(10, S);
|
| 1617 |
});
|
| 1618 |
}
|
| 1619 |
+
function Ze() {
|
| 1620 |
L = this.textContent, C = this.innerHTML, t(11, L), t(9, C);
|
| 1621 |
}
|
| 1622 |
+
function w(b) {
|
| 1623 |
ct[b ? "unshift" : "push"](() => {
|
| 1624 |
S = b, t(10, S);
|
| 1625 |
});
|
| 1626 |
}
|
| 1627 |
+
function $t() {
|
| 1628 |
L = this.textContent, C = this.innerHTML, t(11, L), t(9, C);
|
| 1629 |
}
|
| 1630 |
return n.$$set = (b) => {
|
| 1631 |
"value" in b && t(17, i = b.value), "value_is_output" in b && t(18, o = b.value_is_output), "label" in b && t(0, s = b.label), "legend_label" in b && t(1, r = b.legend_label), "info" in b && t(2, f = b.info), "show_label" in b && t(3, a = b.show_label), "show_legend" in b && t(4, _ = b.show_legend), "show_legend_label" in b && t(5, u = b.show_legend_label), "container" in b && t(6, c = b.container), "color_map" in b && t(19, m = b.color_map), "show_copy_button" in b && t(7, p = b.show_copy_button), "disabled" in b && t(8, T = b.disabled);
|
| 1632 |
}, n.$$.update = () => {
|
| 1633 |
n.$$.dirty[0] & /*marked_el_text*/
|
| 1634 |
+
512 && U();
|
| 1635 |
}, z(), Q(), [
|
| 1636 |
s,
|
| 1637 |
r,
|
|
|
|
| 1648 |
M,
|
| 1649 |
g,
|
| 1650 |
se,
|
| 1651 |
+
D,
|
| 1652 |
+
V,
|
| 1653 |
i,
|
| 1654 |
o,
|
| 1655 |
m,
|
|
|
|
| 1661 |
Pe,
|
| 1662 |
Ze,
|
| 1663 |
w,
|
| 1664 |
+
$t
|
|
|
|
| 1665 |
];
|
| 1666 |
}
|
| 1667 |
+
class Xn extends Fn {
|
| 1668 |
constructor(e) {
|
| 1669 |
+
super(), jn(
|
| 1670 |
this,
|
| 1671 |
e,
|
| 1672 |
+
Wn,
|
| 1673 |
+
In,
|
| 1674 |
+
An,
|
| 1675 |
{
|
| 1676 |
value: 17,
|
| 1677 |
value_is_output: 18,
|
|
|
|
| 1691 |
);
|
| 1692 |
}
|
| 1693 |
}
|
| 1694 |
+
function we(n) {
|
| 1695 |
let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0;
|
| 1696 |
for (; n > 1e3 && t < e.length - 1; )
|
| 1697 |
n /= 1e3, t++;
|
|
|
|
| 1699 |
return (Number.isInteger(n) ? n : n.toFixed(1)) + l;
|
| 1700 |
}
|
| 1701 |
const {
|
| 1702 |
+
SvelteComponent: Yn,
|
| 1703 |
+
append: O,
|
| 1704 |
attr: q,
|
| 1705 |
component_subscribe: kt,
|
| 1706 |
+
detach: Gn,
|
| 1707 |
+
element: Jn,
|
| 1708 |
+
init: Kn,
|
| 1709 |
+
insert: Qn,
|
| 1710 |
noop: vt,
|
| 1711 |
+
safe_not_equal: xn,
|
| 1712 |
set_style: Ne,
|
| 1713 |
+
svg_element: I,
|
| 1714 |
toggle_class: yt
|
| 1715 |
+
} = window.__gradio__svelte__internal, { onMount: $n } = window.__gradio__svelte__internal;
|
| 1716 |
+
function ei(n) {
|
| 1717 |
let e, t, l, i, o, s, r, f, a, _, u, c;
|
| 1718 |
return {
|
| 1719 |
c() {
|
| 1720 |
+
e = Jn("div"), t = I("svg"), l = I("g"), i = I("path"), o = I("path"), s = I("path"), r = I("path"), f = I("g"), a = I("path"), _ = I("path"), u = I("path"), c = I("path"), q(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), q(i, "fill", "#FF7C00"), q(i, "fill-opacity", "0.4"), q(i, "class", "svelte-43sxxs"), q(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), q(o, "fill", "#FF7C00"), q(o, "class", "svelte-43sxxs"), q(s, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), q(s, "fill", "#FF7C00"), q(s, "fill-opacity", "0.4"), q(s, "class", "svelte-43sxxs"), q(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), q(r, "fill", "#FF7C00"), q(r, "class", "svelte-43sxxs"), Ne(l, "transform", "translate(" + /*$top*/
|
| 1721 |
n[1][0] + "px, " + /*$top*/
|
| 1722 |
n[1][1] + "px)"), q(a, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), q(a, "fill", "#FF7C00"), q(a, "fill-opacity", "0.4"), q(a, "class", "svelte-43sxxs"), q(_, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), q(_, "fill", "#FF7C00"), q(_, "class", "svelte-43sxxs"), q(u, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), q(u, "fill", "#FF7C00"), q(u, "fill-opacity", "0.4"), q(u, "class", "svelte-43sxxs"), q(c, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), q(c, "fill", "#FF7C00"), q(c, "class", "svelte-43sxxs"), Ne(f, "transform", "translate(" + /*$bottom*/
|
| 1723 |
n[2][0] + "px, " + /*$bottom*/
|
|
|
|
| 1729 |
);
|
| 1730 |
},
|
| 1731 |
m(m, p) {
|
| 1732 |
+
Qn(m, e, p), O(e, t), O(t, l), O(l, i), O(l, o), O(l, s), O(l, r), O(t, f), O(f, a), O(f, _), O(f, u), O(f, c);
|
| 1733 |
},
|
| 1734 |
p(m, [p]) {
|
| 1735 |
p & /*$top*/
|
|
|
|
| 1749 |
i: vt,
|
| 1750 |
o: vt,
|
| 1751 |
d(m) {
|
| 1752 |
+
m && Gn(e);
|
| 1753 |
}
|
| 1754 |
};
|
| 1755 |
}
|
| 1756 |
+
function ti(n, e, t) {
|
| 1757 |
let l, i, { margin: o = !0 } = e;
|
| 1758 |
const s = _t([0, 0]);
|
| 1759 |
kt(n, s, (c) => t(1, l = c));
|
|
|
|
| 1769 |
async function u() {
|
| 1770 |
await Promise.all([s.set([125, 0]), r.set([-125, 0])]), _();
|
| 1771 |
}
|
| 1772 |
+
return $n(() => (u(), () => f = !0)), n.$$set = (c) => {
|
| 1773 |
"margin" in c && t(0, o = c.margin);
|
| 1774 |
}, [o, l, i, s, r];
|
| 1775 |
}
|
| 1776 |
+
class li extends Yn {
|
| 1777 |
constructor(e) {
|
| 1778 |
+
super(), Kn(this, e, ti, ei, xn, { margin: 0 });
|
| 1779 |
}
|
| 1780 |
}
|
| 1781 |
const {
|
| 1782 |
+
SvelteComponent: ni,
|
| 1783 |
append: _e,
|
| 1784 |
attr: Y,
|
| 1785 |
binding_callbacks: Ct,
|
| 1786 |
check_outros: Kt,
|
| 1787 |
+
create_component: ii,
|
| 1788 |
+
create_slot: oi,
|
| 1789 |
+
destroy_component: si,
|
| 1790 |
destroy_each: Qt,
|
| 1791 |
detach: k,
|
| 1792 |
element: $,
|
| 1793 |
+
empty: Ce,
|
| 1794 |
ensure_array_like: Ee,
|
| 1795 |
+
get_all_dirty_from_scope: fi,
|
| 1796 |
+
get_slot_changes: ri,
|
| 1797 |
group_outros: xt,
|
| 1798 |
+
init: ai,
|
| 1799 |
insert: v,
|
| 1800 |
+
mount_component: _i,
|
| 1801 |
noop: Ue,
|
| 1802 |
+
safe_not_equal: ui,
|
| 1803 |
+
set_data: Z,
|
| 1804 |
set_style: ie,
|
| 1805 |
space: G,
|
| 1806 |
text: F,
|
| 1807 |
+
toggle_class: P,
|
| 1808 |
+
transition_in: ve,
|
| 1809 |
+
transition_out: ye,
|
| 1810 |
+
update_slot_base: ci
|
| 1811 |
+
} = window.__gradio__svelte__internal, { tick: di } = window.__gradio__svelte__internal, { onDestroy: mi } = window.__gradio__svelte__internal, bi = (n) => ({}), qt = (n) => ({});
|
| 1812 |
function St(n, e, t) {
|
| 1813 |
const l = n.slice();
|
| 1814 |
return l[38] = e[t], l[40] = t, l;
|
|
|
|
| 1817 |
const l = n.slice();
|
| 1818 |
return l[38] = e[t], l;
|
| 1819 |
}
|
| 1820 |
+
function gi(n) {
|
| 1821 |
let e, t = (
|
| 1822 |
/*i18n*/
|
| 1823 |
n[1]("common.error") + ""
|
|
|
|
| 1825 |
const s = (
|
| 1826 |
/*#slots*/
|
| 1827 |
n[29].error
|
| 1828 |
+
), r = oi(
|
| 1829 |
s,
|
| 1830 |
n,
|
| 1831 |
/*$$scope*/
|
|
|
|
| 1842 |
p(f, a) {
|
| 1843 |
(!o || a[0] & /*i18n*/
|
| 1844 |
2) && t !== (t = /*i18n*/
|
| 1845 |
+
f[1]("common.error") + "") && Z(l, t), r && r.p && (!o || a[0] & /*$$scope*/
|
| 1846 |
+
268435456) && ci(
|
| 1847 |
r,
|
| 1848 |
s,
|
| 1849 |
f,
|
| 1850 |
/*$$scope*/
|
| 1851 |
f[28],
|
| 1852 |
+
o ? ri(
|
| 1853 |
s,
|
| 1854 |
/*$$scope*/
|
| 1855 |
f[28],
|
| 1856 |
a,
|
| 1857 |
+
bi
|
| 1858 |
+
) : fi(
|
| 1859 |
/*$$scope*/
|
| 1860 |
f[28]
|
| 1861 |
),
|
|
|
|
| 1863 |
);
|
| 1864 |
},
|
| 1865 |
i(f) {
|
| 1866 |
+
o || (ve(r, f), o = !0);
|
| 1867 |
},
|
| 1868 |
o(f) {
|
| 1869 |
+
ye(r, f), o = !1;
|
| 1870 |
},
|
| 1871 |
d(f) {
|
| 1872 |
f && (k(e), k(i)), r && r.d(f);
|
| 1873 |
}
|
| 1874 |
};
|
| 1875 |
}
|
| 1876 |
+
function hi(n) {
|
| 1877 |
let e, t, l, i, o, s, r, f, a, _ = (
|
| 1878 |
/*variant*/
|
| 1879 |
n[8] === "default" && /*show_eta_bar*/
|
|
|
|
| 1885 |
/*progress*/
|
| 1886 |
d[7]
|
| 1887 |
)
|
| 1888 |
+
return ki;
|
| 1889 |
if (
|
| 1890 |
/*queue_position*/
|
| 1891 |
d[2] !== null && /*queue_size*/
|
| 1892 |
d[3] !== void 0 && /*queue_position*/
|
| 1893 |
d[2] >= 0
|
| 1894 |
)
|
| 1895 |
+
return pi;
|
| 1896 |
if (
|
| 1897 |
/*queue_position*/
|
| 1898 |
d[2] === 0
|
| 1899 |
)
|
| 1900 |
+
return wi;
|
| 1901 |
}
|
| 1902 |
let c = u(n), m = c && c(n), p = (
|
| 1903 |
/*timer*/
|
| 1904 |
n[5] && Nt(n)
|
| 1905 |
);
|
| 1906 |
+
const T = [qi, Ci], S = [];
|
| 1907 |
function L(d, y) {
|
| 1908 |
return (
|
| 1909 |
/*last_progress_level*/
|
|
|
|
| 1918 |
n[5] && Pt(n);
|
| 1919 |
return {
|
| 1920 |
c() {
|
| 1921 |
+
_ && _.c(), e = G(), t = $("div"), m && m.c(), l = G(), p && p.c(), i = G(), s && s.c(), r = G(), C && C.c(), f = Ce(), Y(t, "class", "progress-text svelte-1txqlrd"), P(
|
| 1922 |
t,
|
| 1923 |
"meta-text-center",
|
| 1924 |
/*variant*/
|
| 1925 |
n[8] === "center"
|
| 1926 |
+
), P(
|
| 1927 |
t,
|
| 1928 |
"meta-text",
|
| 1929 |
/*variant*/
|
|
|
|
| 1939 |
d[18] && /*show_progress*/
|
| 1940 |
d[6] === "full" ? _ ? _.p(d, y) : (_ = Tt(d), _.c(), _.m(e.parentNode, e)) : _ && (_.d(1), _ = null), c === (c = u(d)) && m ? m.p(d, y) : (m && m.d(1), m = c && c(d), m && (m.c(), m.m(t, l))), /*timer*/
|
| 1941 |
d[5] ? p ? p.p(d, y) : (p = Nt(d), p.c(), p.m(t, null)) : p && (p.d(1), p = null), (!a || y[0] & /*variant*/
|
| 1942 |
+
256) && P(
|
| 1943 |
t,
|
| 1944 |
"meta-text-center",
|
| 1945 |
/*variant*/
|
| 1946 |
d[8] === "center"
|
| 1947 |
), (!a || y[0] & /*variant*/
|
| 1948 |
+
256) && P(
|
| 1949 |
t,
|
| 1950 |
"meta-text",
|
| 1951 |
/*variant*/
|
| 1952 |
d[8] === "default"
|
| 1953 |
);
|
| 1954 |
let M = o;
|
| 1955 |
+
o = L(d), o === M ? ~o && S[o].p(d, y) : (s && (xt(), ye(S[M], 1, 1, () => {
|
| 1956 |
S[M] = null;
|
| 1957 |
+
}), Kt()), ~o ? (s = S[o], s ? s.p(d, y) : (s = S[o] = T[o](d), s.c()), ve(s, 1), s.m(r.parentNode, r)) : s = null), /*timer*/
|
| 1958 |
d[5] ? C && (C.d(1), C = null) : C ? C.p(d, y) : (C = Pt(d), C.c(), C.m(f.parentNode, f));
|
| 1959 |
},
|
| 1960 |
i(d) {
|
| 1961 |
+
a || (ve(s), a = !0);
|
| 1962 |
},
|
| 1963 |
o(d) {
|
| 1964 |
+
ye(s), a = !1;
|
| 1965 |
},
|
| 1966 |
d(d) {
|
| 1967 |
d && (k(e), k(t), k(i), k(r), k(f)), _ && _.d(d), m && m.d(), p && p.d(), ~o && S[o].d(d), C && C.d(d);
|
|
|
|
| 1988 |
}
|
| 1989 |
};
|
| 1990 |
}
|
| 1991 |
+
function wi(n) {
|
| 1992 |
let e;
|
| 1993 |
return {
|
| 1994 |
c() {
|
|
|
|
| 2003 |
}
|
| 2004 |
};
|
| 2005 |
}
|
| 2006 |
+
function pi(n) {
|
| 2007 |
let e, t = (
|
| 2008 |
/*queue_position*/
|
| 2009 |
n[2] + 1 + ""
|
|
|
|
| 2021 |
p(r, f) {
|
| 2022 |
f[0] & /*queue_position*/
|
| 2023 |
4 && t !== (t = /*queue_position*/
|
| 2024 |
+
r[2] + 1 + "") && Z(l, t), f[0] & /*queue_size*/
|
| 2025 |
+
8 && Z(
|
| 2026 |
o,
|
| 2027 |
/*queue_size*/
|
| 2028 |
r[3]
|
|
|
|
| 2033 |
}
|
| 2034 |
};
|
| 2035 |
}
|
| 2036 |
+
function ki(n) {
|
| 2037 |
let e, t = Ee(
|
| 2038 |
/*progress*/
|
| 2039 |
n[7]
|
|
|
|
| 2044 |
c() {
|
| 2045 |
for (let i = 0; i < l.length; i += 1)
|
| 2046 |
l[i].c();
|
| 2047 |
+
e = Ce();
|
| 2048 |
},
|
| 2049 |
m(i, o) {
|
| 2050 |
for (let s = 0; s < l.length; s += 1)
|
|
|
|
| 2081 |
function r(_, u) {
|
| 2082 |
return (
|
| 2083 |
/*p*/
|
| 2084 |
+
_[38].length != null ? yi : vi
|
| 2085 |
);
|
| 2086 |
}
|
| 2087 |
let f = r(n), a = f(n);
|
|
|
|
| 2095 |
p(_, u) {
|
| 2096 |
f === (f = r(_)) && a ? a.p(_, u) : (a.d(1), a = f(_), a && (a.c(), a.m(e.parentNode, e))), u[0] & /*progress*/
|
| 2097 |
128 && t !== (t = /*p*/
|
| 2098 |
+
_[38].unit + "") && Z(l, t);
|
| 2099 |
},
|
| 2100 |
d(_) {
|
| 2101 |
_ && (k(e), k(l), k(i), k(s)), a.d(_);
|
| 2102 |
}
|
| 2103 |
};
|
| 2104 |
}
|
| 2105 |
+
function vi(n) {
|
| 2106 |
+
let e = we(
|
| 2107 |
/*p*/
|
| 2108 |
n[38].index || 0
|
| 2109 |
) + "", t;
|
|
|
|
| 2116 |
},
|
| 2117 |
p(l, i) {
|
| 2118 |
i[0] & /*progress*/
|
| 2119 |
+
128 && e !== (e = we(
|
| 2120 |
/*p*/
|
| 2121 |
l[38].index || 0
|
| 2122 |
+
) + "") && Z(t, e);
|
| 2123 |
},
|
| 2124 |
d(l) {
|
| 2125 |
l && k(t);
|
| 2126 |
}
|
| 2127 |
};
|
| 2128 |
}
|
| 2129 |
+
function yi(n) {
|
| 2130 |
+
let e = we(
|
| 2131 |
/*p*/
|
| 2132 |
n[38].index || 0
|
| 2133 |
+
) + "", t, l, i = we(
|
| 2134 |
/*p*/
|
| 2135 |
n[38].length
|
| 2136 |
) + "", o;
|
|
|
|
| 2143 |
},
|
| 2144 |
p(s, r) {
|
| 2145 |
r[0] & /*progress*/
|
| 2146 |
+
128 && e !== (e = we(
|
| 2147 |
/*p*/
|
| 2148 |
s[38].index || 0
|
| 2149 |
+
) + "") && Z(t, e), r[0] & /*progress*/
|
| 2150 |
+
128 && i !== (i = we(
|
| 2151 |
/*p*/
|
| 2152 |
s[38].length
|
| 2153 |
+
) + "") && Z(o, i);
|
| 2154 |
},
|
| 2155 |
d(s) {
|
| 2156 |
s && (k(t), k(l), k(o));
|
|
|
|
| 2164 |
);
|
| 2165 |
return {
|
| 2166 |
c() {
|
| 2167 |
+
t && t.c(), e = Ce();
|
| 2168 |
},
|
| 2169 |
m(l, i) {
|
| 2170 |
t && t.m(l, i), v(l, e, i);
|
|
|
|
| 2196 |
},
|
| 2197 |
p(o, s) {
|
| 2198 |
s[0] & /*formatted_timer*/
|
| 2199 |
+
1048576 && Z(
|
| 2200 |
e,
|
| 2201 |
/*formatted_timer*/
|
| 2202 |
o[20]
|
| 2203 |
), s[0] & /*eta, formatted_eta*/
|
| 2204 |
524289 && t !== (t = /*eta*/
|
| 2205 |
o[0] ? `/${/*formatted_eta*/
|
| 2206 |
+
o[19]}` : "") && Z(l, t);
|
| 2207 |
},
|
| 2208 |
d(o) {
|
| 2209 |
o && (k(e), k(l), k(i));
|
| 2210 |
}
|
| 2211 |
};
|
| 2212 |
}
|
| 2213 |
+
function Ci(n) {
|
| 2214 |
let e, t;
|
| 2215 |
+
return e = new li({
|
| 2216 |
props: { margin: (
|
| 2217 |
/*variant*/
|
| 2218 |
n[8] === "default"
|
| 2219 |
) }
|
| 2220 |
}), {
|
| 2221 |
c() {
|
| 2222 |
+
ii(e.$$.fragment);
|
| 2223 |
},
|
| 2224 |
m(l, i) {
|
| 2225 |
+
_i(e, l, i), t = !0;
|
| 2226 |
},
|
| 2227 |
p(l, i) {
|
| 2228 |
const o = {};
|
|
|
|
| 2231 |
l[8] === "default"), e.$set(o);
|
| 2232 |
},
|
| 2233 |
i(l) {
|
| 2234 |
+
t || (ve(e.$$.fragment, l), t = !0);
|
| 2235 |
},
|
| 2236 |
o(l) {
|
| 2237 |
+
ye(e.$$.fragment, l), t = !1;
|
| 2238 |
},
|
| 2239 |
d(l) {
|
| 2240 |
+
si(e, l);
|
| 2241 |
}
|
| 2242 |
};
|
| 2243 |
}
|
| 2244 |
+
function qi(n) {
|
| 2245 |
let e, t, l, i, o, s = `${/*last_progress_level*/
|
| 2246 |
n[15] * 100}%`, r = (
|
| 2247 |
/*progress*/
|
|
|
|
| 2278 |
c() {
|
| 2279 |
for (let i = 0; i < l.length; i += 1)
|
| 2280 |
l[i].c();
|
| 2281 |
+
e = Ce();
|
| 2282 |
},
|
| 2283 |
m(i, o) {
|
| 2284 |
for (let s = 0; s < l.length; s += 1)
|
|
|
|
| 2310 |
function jt(n) {
|
| 2311 |
let e, t, l, i, o = (
|
| 2312 |
/*i*/
|
| 2313 |
+
n[40] !== 0 && Si()
|
| 2314 |
), s = (
|
| 2315 |
/*p*/
|
| 2316 |
n[38].desc != null && Vt(n)
|
|
|
|
| 2328 |
);
|
| 2329 |
return {
|
| 2330 |
c() {
|
| 2331 |
+
o && o.c(), e = G(), s && s.c(), t = G(), r && r.c(), l = G(), f && f.c(), i = Ce();
|
| 2332 |
},
|
| 2333 |
m(a, _) {
|
| 2334 |
o && o.m(a, _), v(a, e, _), s && s.m(a, _), v(a, t, _), r && r.m(a, _), v(a, l, _), f && f.m(a, _), v(a, i, _);
|
|
|
|
| 2349 |
}
|
| 2350 |
};
|
| 2351 |
}
|
| 2352 |
+
function Si(n) {
|
| 2353 |
let e;
|
| 2354 |
return {
|
| 2355 |
c() {
|
|
|
|
| 2378 |
p(l, i) {
|
| 2379 |
i[0] & /*progress*/
|
| 2380 |
128 && e !== (e = /*p*/
|
| 2381 |
+
l[38].desc + "") && Z(t, e);
|
| 2382 |
},
|
| 2383 |
d(l) {
|
| 2384 |
l && k(t);
|
|
|
|
| 2418 |
(i[14][
|
| 2419 |
/*i*/
|
| 2420 |
i[40]
|
| 2421 |
+
] || 0)).toFixed(1) + "") && Z(t, e);
|
| 2422 |
},
|
| 2423 |
d(i) {
|
| 2424 |
i && (k(t), k(l));
|
|
|
|
| 2437 |
);
|
| 2438 |
return {
|
| 2439 |
c() {
|
| 2440 |
+
t && t.c(), e = Ce();
|
| 2441 |
},
|
| 2442 |
m(l, i) {
|
| 2443 |
t && t.m(l, i), v(l, e, i);
|
|
|
|
| 2470 |
},
|
| 2471 |
p(l, i) {
|
| 2472 |
i[0] & /*loading_text*/
|
| 2473 |
+
512 && Z(
|
| 2474 |
t,
|
| 2475 |
/*loading_text*/
|
| 2476 |
l[9]
|
|
|
|
| 2481 |
}
|
| 2482 |
};
|
| 2483 |
}
|
| 2484 |
+
function Li(n) {
|
| 2485 |
let e, t, l, i, o;
|
| 2486 |
+
const s = [hi, gi], r = [];
|
| 2487 |
function f(a, _) {
|
| 2488 |
return (
|
| 2489 |
/*status*/
|
|
|
|
| 2497 |
c() {
|
| 2498 |
e = $("div"), l && l.c(), Y(e, "class", i = "wrap " + /*variant*/
|
| 2499 |
n[8] + " " + /*show_progress*/
|
| 2500 |
+
n[6] + " svelte-1txqlrd"), P(e, "hide", !/*status*/
|
| 2501 |
n[4] || /*status*/
|
| 2502 |
n[4] === "complete" || /*show_progress*/
|
| 2503 |
+
n[6] === "hidden"), P(
|
| 2504 |
e,
|
| 2505 |
"translucent",
|
| 2506 |
/*variant*/
|
|
|
|
| 2509 |
n[4] === "error") || /*translucent*/
|
| 2510 |
n[11] || /*show_progress*/
|
| 2511 |
n[6] === "minimal"
|
| 2512 |
+
), P(
|
| 2513 |
e,
|
| 2514 |
"generating",
|
| 2515 |
/*status*/
|
| 2516 |
n[4] === "generating"
|
| 2517 |
+
), P(
|
| 2518 |
e,
|
| 2519 |
"border",
|
| 2520 |
/*border*/
|
|
|
|
| 2536 |
},
|
| 2537 |
p(a, _) {
|
| 2538 |
let u = t;
|
| 2539 |
+
t = f(a), t === u ? ~t && r[t].p(a, _) : (l && (xt(), ye(r[u], 1, 1, () => {
|
| 2540 |
r[u] = null;
|
| 2541 |
+
}), Kt()), ~t ? (l = r[t], l ? l.p(a, _) : (l = r[t] = s[t](a), l.c()), ve(l, 1), l.m(e, null)) : l = null), (!o || _[0] & /*variant, show_progress*/
|
| 2542 |
320 && i !== (i = "wrap " + /*variant*/
|
| 2543 |
a[8] + " " + /*show_progress*/
|
| 2544 |
a[6] + " svelte-1txqlrd")) && Y(e, "class", i), (!o || _[0] & /*variant, show_progress, status, show_progress*/
|
| 2545 |
+
336) && P(e, "hide", !/*status*/
|
| 2546 |
a[4] || /*status*/
|
| 2547 |
a[4] === "complete" || /*show_progress*/
|
| 2548 |
a[6] === "hidden"), (!o || _[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
|
| 2549 |
+
2384) && P(
|
| 2550 |
e,
|
| 2551 |
"translucent",
|
| 2552 |
/*variant*/
|
|
|
|
| 2556 |
a[11] || /*show_progress*/
|
| 2557 |
a[6] === "minimal"
|
| 2558 |
), (!o || _[0] & /*variant, show_progress, status*/
|
| 2559 |
+
336) && P(
|
| 2560 |
e,
|
| 2561 |
"generating",
|
| 2562 |
/*status*/
|
| 2563 |
a[4] === "generating"
|
| 2564 |
), (!o || _[0] & /*variant, show_progress, border*/
|
| 2565 |
+
4416) && P(
|
| 2566 |
e,
|
| 2567 |
"border",
|
| 2568 |
/*border*/
|
|
|
|
| 2582 |
);
|
| 2583 |
},
|
| 2584 |
i(a) {
|
| 2585 |
+
o || (ve(l), o = !0);
|
| 2586 |
},
|
| 2587 |
o(a) {
|
| 2588 |
+
ye(l), o = !1;
|
| 2589 |
},
|
| 2590 |
d(a) {
|
| 2591 |
a && k(e), ~t && r[t].d(), n[31](null);
|
|
|
|
| 2593 |
};
|
| 2594 |
}
|
| 2595 |
let He = [], Oe = !1;
|
| 2596 |
+
async function Ti(n, e = !0) {
|
| 2597 |
if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) {
|
| 2598 |
if (He.push(n), !Oe)
|
| 2599 |
Oe = !0;
|
| 2600 |
else
|
| 2601 |
return;
|
| 2602 |
+
await di(), requestAnimationFrame(() => {
|
| 2603 |
let t = [0, 0];
|
| 2604 |
for (let l = 0; l < He.length; l++) {
|
| 2605 |
const o = He[l].getBoundingClientRect();
|
|
|
|
| 2609 |
});
|
| 2610 |
}
|
| 2611 |
}
|
| 2612 |
+
function Fi(n, e, t) {
|
| 2613 |
+
let l, { $$slots: i = {}, $$scope: o } = e, { i18n: s } = e, { eta: r = null } = e, { queue_position: f } = e, { queue_size: a } = e, { status: _ } = e, { scroll_to_output: u = !1 } = e, { timer: c = !0 } = e, { show_progress: m = "full" } = e, { message: p = null } = e, { progress: T = null } = e, { variant: S = "default" } = e, { loading_text: L = "Loading..." } = e, { absolute: C = !0 } = e, { translucent: d = !1 } = e, { border: y = !1 } = e, { autoscroll: M } = e, g, B = !1, Q = 0, z = 0, R = null, U = null, se = 0, D = null, x, V = null, de = !0;
|
| 2614 |
const h = () => {
|
| 2615 |
+
t(0, r = t(26, R = t(19, me = null))), t(24, Q = performance.now()), t(25, z = 0), B = !0, Fe();
|
| 2616 |
};
|
| 2617 |
function Fe() {
|
| 2618 |
requestAnimationFrame(() => {
|
| 2619 |
+
t(25, z = (performance.now() - Q) / 1e3), B && Fe();
|
| 2620 |
});
|
| 2621 |
}
|
| 2622 |
function Me() {
|
| 2623 |
+
t(25, z = 0), t(0, r = t(26, R = t(19, me = null))), B && (B = !1);
|
| 2624 |
}
|
| 2625 |
+
mi(() => {
|
| 2626 |
+
B && Me();
|
| 2627 |
});
|
| 2628 |
let me = null;
|
| 2629 |
function Pe(w) {
|
| 2630 |
Ct[w ? "unshift" : "push"](() => {
|
| 2631 |
+
V = w, t(16, V), t(7, T), t(14, D), t(15, x);
|
| 2632 |
});
|
| 2633 |
}
|
| 2634 |
function Ze(w) {
|
|
|
|
| 2640 |
"i18n" in w && t(1, s = w.i18n), "eta" in w && t(0, r = w.eta), "queue_position" in w && t(2, f = w.queue_position), "queue_size" in w && t(3, a = w.queue_size), "status" in w && t(4, _ = w.status), "scroll_to_output" in w && t(21, u = w.scroll_to_output), "timer" in w && t(5, c = w.timer), "show_progress" in w && t(6, m = w.show_progress), "message" in w && t(22, p = w.message), "progress" in w && t(7, T = w.progress), "variant" in w && t(8, S = w.variant), "loading_text" in w && t(9, L = w.loading_text), "absolute" in w && t(10, C = w.absolute), "translucent" in w && t(11, d = w.translucent), "border" in w && t(12, y = w.border), "autoscroll" in w && t(23, M = w.autoscroll), "$$scope" in w && t(28, o = w.$$scope);
|
| 2641 |
}, n.$$.update = () => {
|
| 2642 |
n.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/
|
| 2643 |
+
218103809 && (r === null && t(0, r = R), r != null && R !== r && (t(27, U = (performance.now() - Q) / 1e3 + r), t(19, me = U.toFixed(1)), t(26, R = r))), n.$$.dirty[0] & /*eta_from_start, timer_diff*/
|
| 2644 |
+
167772160 && t(17, se = U === null || U <= 0 || !z ? null : Math.min(z / U, 1)), n.$$.dirty[0] & /*progress*/
|
| 2645 |
128 && T != null && t(18, de = !1), n.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
|
| 2646 |
+
114816 && (T != null ? t(14, D = T.map((w) => {
|
| 2647 |
if (w.index != null && w.length != null)
|
| 2648 |
return w.index / w.length;
|
| 2649 |
if (w.progress != null)
|
| 2650 |
return w.progress;
|
| 2651 |
+
})) : t(14, D = null), D ? (t(15, x = D[D.length - 1]), V && (x === 0 ? t(16, V.style.transition = "0", V) : t(16, V.style.transition = "150ms", V))) : t(15, x = void 0)), n.$$.dirty[0] & /*status*/
|
| 2652 |
16 && (_ === "pending" ? h() : Me()), n.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
|
| 2653 |
+
10493968 && g && u && (_ === "pending" || _ === "complete") && Ti(g, M), n.$$.dirty[0] & /*status, message*/
|
| 2654 |
4194320, n.$$.dirty[0] & /*timer_diff*/
|
| 2655 |
33554432 && t(20, l = z.toFixed(1));
|
| 2656 |
}, [
|
|
|
|
| 2668 |
d,
|
| 2669 |
y,
|
| 2670 |
g,
|
| 2671 |
+
D,
|
| 2672 |
x,
|
| 2673 |
+
V,
|
| 2674 |
se,
|
| 2675 |
de,
|
| 2676 |
me,
|
|
|
|
| 2680 |
M,
|
| 2681 |
Q,
|
| 2682 |
z,
|
| 2683 |
+
R,
|
| 2684 |
+
U,
|
| 2685 |
o,
|
| 2686 |
i,
|
| 2687 |
Pe,
|
| 2688 |
Ze
|
| 2689 |
];
|
| 2690 |
}
|
| 2691 |
+
class Mi extends ni {
|
| 2692 |
constructor(e) {
|
| 2693 |
+
super(), ai(
|
| 2694 |
this,
|
| 2695 |
e,
|
| 2696 |
+
Fi,
|
| 2697 |
+
Li,
|
| 2698 |
+
ui,
|
| 2699 |
{
|
| 2700 |
i18n: 1,
|
| 2701 |
eta: 0,
|
|
|
|
| 2720 |
}
|
| 2721 |
}
|
| 2722 |
const {
|
| 2723 |
+
SvelteComponent: Ni,
|
| 2724 |
add_flush_callback: Zt,
|
| 2725 |
+
assign: Hi,
|
| 2726 |
bind: Bt,
|
| 2727 |
binding_callbacks: Rt,
|
| 2728 |
+
check_outros: ji,
|
| 2729 |
create_component: Qe,
|
| 2730 |
destroy_component: xe,
|
| 2731 |
+
detach: Vi,
|
| 2732 |
flush: N,
|
| 2733 |
+
get_spread_object: Ai,
|
| 2734 |
+
get_spread_update: zi,
|
| 2735 |
+
group_outros: Ei,
|
| 2736 |
+
init: Pi,
|
| 2737 |
+
insert: Zi,
|
| 2738 |
mount_component: $e,
|
| 2739 |
+
safe_not_equal: Bi,
|
| 2740 |
+
space: Ri,
|
| 2741 |
+
transition_in: pe,
|
| 2742 |
transition_out: Te
|
| 2743 |
} = window.__gradio__svelte__internal;
|
| 2744 |
function Dt(n) {
|
|
|
|
| 2757 |
];
|
| 2758 |
let i = {};
|
| 2759 |
for (let o = 0; o < l.length; o += 1)
|
| 2760 |
+
i = Hi(i, l[o]);
|
| 2761 |
+
return e = new Mi({ props: i }), {
|
| 2762 |
c() {
|
| 2763 |
Qe(e.$$.fragment);
|
| 2764 |
},
|
|
|
|
| 2767 |
},
|
| 2768 |
p(o, s) {
|
| 2769 |
const r = s & /*gradio, loading_status*/
|
| 2770 |
+
131080 ? zi(l, [
|
| 2771 |
s & /*gradio*/
|
| 2772 |
8 && { autoscroll: (
|
| 2773 |
/*gradio*/
|
|
|
|
| 2779 |
o[3].i18n
|
| 2780 |
) },
|
| 2781 |
s & /*loading_status*/
|
| 2782 |
+
131072 && Ai(
|
| 2783 |
/*loading_status*/
|
| 2784 |
o[17]
|
| 2785 |
)
|
|
|
|
| 2787 |
e.$set(r);
|
| 2788 |
},
|
| 2789 |
i(o) {
|
| 2790 |
+
t || (pe(e.$$.fragment, o), t = !0);
|
| 2791 |
},
|
| 2792 |
o(o) {
|
| 2793 |
Te(e.$$.fragment, o), t = !1;
|
|
|
|
| 2797 |
}
|
| 2798 |
};
|
| 2799 |
}
|
| 2800 |
+
function Di(n) {
|
| 2801 |
let e, t, l, i, o, s = (
|
| 2802 |
/*loading_status*/
|
| 2803 |
n[17] && Dt(n)
|
|
|
|
| 2853 |
n[0] !== void 0 && (a.value = /*value*/
|
| 2854 |
n[0]), /*value_is_output*/
|
| 2855 |
n[2] !== void 0 && (a.value_is_output = /*value_is_output*/
|
| 2856 |
+
n[2]), t = new Xn({ props: a }), Rt.push(() => Bt(t, "value", r)), Rt.push(() => Bt(t, "value_is_output", f)), t.$on(
|
| 2857 |
"change",
|
| 2858 |
/*change_handler*/
|
| 2859 |
n[24]
|
|
|
|
| 2879 |
n[29]
|
| 2880 |
), {
|
| 2881 |
c() {
|
| 2882 |
+
s && s.c(), e = Ri(), Qe(t.$$.fragment);
|
| 2883 |
},
|
| 2884 |
m(_, u) {
|
| 2885 |
+
s && s.m(_, u), Zi(_, e, u), $e(t, _, u), o = !0;
|
| 2886 |
},
|
| 2887 |
p(_, u) {
|
| 2888 |
/*loading_status*/
|
| 2889 |
_[17] ? s ? (s.p(_, u), u & /*loading_status*/
|
| 2890 |
+
131072 && pe(s, 1)) : (s = Dt(_), s.c(), pe(s, 1), s.m(e.parentNode, e)) : s && (Ei(), Te(s, 1, 1, () => {
|
| 2891 |
s = null;
|
| 2892 |
+
}), ji());
|
| 2893 |
const c = {};
|
| 2894 |
u & /*label*/
|
| 2895 |
16 && (c.label = /*label*/
|
|
|
|
| 2918 |
_[2], Zt(() => i = !1)), t.$set(c);
|
| 2919 |
},
|
| 2920 |
i(_) {
|
| 2921 |
+
o || (pe(s), pe(t.$$.fragment, _), o = !0);
|
| 2922 |
},
|
| 2923 |
o(_) {
|
| 2924 |
Te(s), Te(t.$$.fragment, _), o = !1;
|
| 2925 |
},
|
| 2926 |
d(_) {
|
| 2927 |
+
_ && Vi(e), s && s.d(_), xe(t, _);
|
| 2928 |
}
|
| 2929 |
}
|
| 2930 |
);
|
| 2931 |
}
|
| 2932 |
+
function Oi(n) {
|
| 2933 |
let e, t;
|
| 2934 |
+
return e = new hl({
|
| 2935 |
props: {
|
| 2936 |
visible: (
|
| 2937 |
/*visible*/
|
|
|
|
| 2958 |
/*container*/
|
| 2959 |
n[13]
|
| 2960 |
),
|
| 2961 |
+
$$slots: { default: [Di] },
|
| 2962 |
$$scope: { ctx: n }
|
| 2963 |
}
|
| 2964 |
}), {
|
|
|
|
| 2986 |
1074216063 && (o.$$scope = { dirty: i, ctx: l }), e.$set(o);
|
| 2987 |
},
|
| 2988 |
i(l) {
|
| 2989 |
+
t || (pe(e.$$.fragment, l), t = !0);
|
| 2990 |
},
|
| 2991 |
o(l) {
|
| 2992 |
Te(e.$$.fragment, l), t = !1;
|
|
|
|
| 2996 |
}
|
| 2997 |
};
|
| 2998 |
}
|
| 2999 |
+
function Ii(n, e, t) {
|
| 3000 |
let { gradio: l } = e, { label: i = "Highlighted Textbox" } = e, { legend_label: o = "Highlights:" } = e, { info: s = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: f = [] } = e, { visible: a = !0 } = e, { value: _ } = e, { show_label: u } = e, { show_legend: c } = e, { show_legend_label: m } = e, { color_map: p = {} } = e, { container: T = !0 } = e, { scale: S = null } = e, { min_width: L = void 0 } = e, { show_copy_button: C = !1 } = e, { loading_status: d = void 0 } = e, { value_is_output: y = !1 } = e, { combine_adjacent: M = !1 } = e, { interactive: g = !0 } = e;
|
| 3001 |
+
const B = !1, Q = !0;
|
| 3002 |
function z(h) {
|
| 3003 |
_ = h, t(0, _), t(19, M);
|
| 3004 |
}
|
| 3005 |
+
function R(h) {
|
| 3006 |
y = h, t(2, y);
|
| 3007 |
}
|
| 3008 |
+
const U = () => l.dispatch("change"), se = () => l.dispatch("input"), D = () => l.dispatch("submit"), x = () => l.dispatch("blur"), V = (h) => l.dispatch("select", h.detail), de = () => l.dispatch("focus");
|
| 3009 |
return n.$$set = (h) => {
|
| 3010 |
"gradio" in h && t(3, l = h.gradio), "label" in h && t(4, i = h.label), "legend_label" in h && t(5, o = h.legend_label), "info" in h && t(6, s = h.info), "elem_id" in h && t(7, r = h.elem_id), "elem_classes" in h && t(8, f = h.elem_classes), "visible" in h && t(9, a = h.visible), "value" in h && t(0, _ = h.value), "show_label" in h && t(10, u = h.show_label), "show_legend" in h && t(11, c = h.show_legend), "show_legend_label" in h && t(12, m = h.show_legend_label), "color_map" in h && t(1, p = h.color_map), "container" in h && t(13, T = h.container), "scale" in h && t(14, S = h.scale), "min_width" in h && t(15, L = h.min_width), "show_copy_button" in h && t(16, C = h.show_copy_button), "loading_status" in h && t(17, d = h.loading_status), "value_is_output" in h && t(2, y = h.value_is_output), "combine_adjacent" in h && t(19, M = h.combine_adjacent), "interactive" in h && t(18, g = h.interactive);
|
| 3011 |
}, n.$$.update = () => {
|
| 3012 |
n.$$.dirty & /*color_map*/
|
| 3013 |
2 && !p && Object.keys(p).length && t(1, p), n.$$.dirty & /*value, combine_adjacent*/
|
| 3014 |
+
524289 && _ && M && t(0, _ = Sn(_, "equal"));
|
| 3015 |
}, [
|
| 3016 |
_,
|
| 3017 |
p,
|
|
|
|
| 3033 |
d,
|
| 3034 |
g,
|
| 3035 |
M,
|
| 3036 |
+
B,
|
| 3037 |
Q,
|
| 3038 |
z,
|
| 3039 |
+
R,
|
| 3040 |
+
U,
|
| 3041 |
se,
|
| 3042 |
+
D,
|
| 3043 |
x,
|
| 3044 |
+
V,
|
| 3045 |
de
|
| 3046 |
];
|
| 3047 |
}
|
| 3048 |
+
class Wi extends Ni {
|
| 3049 |
constructor(e) {
|
| 3050 |
+
super(), Pi(this, e, Ii, Oi, Bi, {
|
| 3051 |
gradio: 3,
|
| 3052 |
label: 4,
|
| 3053 |
legend_label: 5,
|
|
|
|
| 3200 |
}
|
| 3201 |
}
|
| 3202 |
export {
|
| 3203 |
+
Wi as default
|
| 3204 |
};
|
src/frontend/HighlightedTextbox.svelte
CHANGED
|
@@ -88,6 +88,7 @@
|
|
| 88 |
if (!value_is_output) {
|
| 89 |
dispatch("input");
|
| 90 |
}
|
|
|
|
| 91 |
}
|
| 92 |
afterUpdate(() => {
|
| 93 |
set_color_map();
|
|
@@ -234,11 +235,7 @@
|
|
| 234 |
on:scroll
|
| 235 |
on:input
|
| 236 |
on:focus
|
| 237 |
-
on:change
|
| 238 |
-
on:mousedown={checkAndRemoveHighlight}
|
| 239 |
-
on:keydown={checkAndRemoveHighlight}
|
| 240 |
-
on:mouseup={checkAndRemoveHighlight}
|
| 241 |
-
on:keyup={checkAndRemoveHighlight}
|
| 242 |
/>
|
| 243 |
{/if}
|
| 244 |
</label>
|
|
|
|
| 88 |
if (!value_is_output) {
|
| 89 |
dispatch("input");
|
| 90 |
}
|
| 91 |
+
checkAndRemoveHighlight();
|
| 92 |
}
|
| 93 |
afterUpdate(() => {
|
| 94 |
set_color_map();
|
|
|
|
| 235 |
on:scroll
|
| 236 |
on:input
|
| 237 |
on:focus
|
| 238 |
+
on:change={checkAndRemoveHighlight}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 239 |
/>
|
| 240 |
{/if}
|
| 241 |
</label>
|
src/pyproject.toml
CHANGED
|
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|
| 8 |
|
| 9 |
[project]
|
| 10 |
name = "gradio_highlightedtextbox"
|
| 11 |
-
version = "0.0.
|
| 12 |
description = "Editable Gradio textarea supporting highlighting"
|
| 13 |
readme = "README.md"
|
| 14 |
license = "mit"
|
|
@@ -36,7 +36,7 @@ classifiers = [
|
|
| 36 |
dev = ["build", "twine"]
|
| 37 |
|
| 38 |
[tool.hatch.build]
|
| 39 |
-
artifacts = ["/backend/gradio_highlightedtextbox/templates", "*.pyi", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "Users/gsarti/Documents/projects/highlightedtextbox/backend/gradio_highlightedtextbox/templates", "Users/gsarti/Documents/projects/highlightedtextbox/backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates"]
|
| 40 |
|
| 41 |
[tool.hatch.build.targets.wheel]
|
| 42 |
packages = ["/backend/gradio_highlightedtextbox"]
|
|
|
|
| 8 |
|
| 9 |
[project]
|
| 10 |
name = "gradio_highlightedtextbox"
|
| 11 |
+
version = "0.0.4"
|
| 12 |
description = "Editable Gradio textarea supporting highlighting"
|
| 13 |
readme = "README.md"
|
| 14 |
license = "mit"
|
|
|
|
| 36 |
dev = ["build", "twine"]
|
| 37 |
|
| 38 |
[tool.hatch.build]
|
| 39 |
+
artifacts = ["/backend/gradio_highlightedtextbox/templates", "*.pyi", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "Users/gsarti/Documents/projects/highlightedtextbox/backend/gradio_highlightedtextbox/templates", "Users/gsarti/Documents/projects/highlightedtextbox/backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates", "backend/gradio_highlightedtextbox/templates"]
|
| 40 |
|
| 41 |
[tool.hatch.build.targets.wheel]
|
| 42 |
packages = ["/backend/gradio_highlightedtextbox"]
|