PageSourceSearch

https://ck42-sentiment-model-comparison.hf.space/assets/Example-8a688c80.js

js ck42-sentiment-model-comparison.hf.space collected 2026-10-03 10:21:47 UTC 3,555 bytes, 126 lines download raw bytes

1import { M as MarkdownCode } from './Example.svelte_svelte_type_style_lang-3f7f456e.js';
2import './Index-a77cc637.js';
3import './index-9dc32a9d.js';
4import './svelte/svelte.js';
5
6/* home/runner/work/gradio/gradio/js/markdown/Example.svelte generated by Svelte v4.2.2 */
7const {
8	SvelteComponent,
9	attr,
10	create_component,
11	destroy_component,
12	detach,
13	element,
14	init,
15	insert,
16	mount_component,
17	safe_not_equal,
18	toggle_class,
19	transition_in,
20	transition_out
21} = window.__gradio__svelte__internal;
22function create_fragment(ctx) {
23	let div;
24	let markdowncode;
25	let current;
26
27	markdowncode = new MarkdownCode({
28			props: {
29				message: /*value*/ ctx[0],
30				latex_delimiters: /*latex_delimiters*/ ctx[5],
31				sanitize_html: /*sanitize_html*/ ctx[3],
32				line_breaks: /*line_breaks*/ ctx[4],
33				chatbot: false
34			}
35		});
36
37	return {
38		c() {
39			div = element("div");
40			create_component(markdowncode.$$.fragment);
41			attr(div, "class", "prose svelte-1ayixqk");
42			toggle_class(div, "table", /*type*/ ctx[1] === "table");
43			toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery");
44			toggle_class(div, "selected", /*selected*/ ctx[2]);
45		},
46		m(target, anchor) {
47			insert(target, div, anchor);
48			mount_component(markdowncode, div, null);
49			current = true;
50		},
51		p(ctx, [dirty]) {
52			const markdowncode_changes = {};
53			if (dirty & /*value*/ 1) markdowncode_changes.message = /*value*/ ctx[0];
54			if (dirty & /*latex_delimiters*/ 32) markdowncode_changes.latex_delimiters = /*latex_delimiters*/ ctx[5];
55			if (dirty & /*sanitize_html*/ 8) markdowncode_changes.sanitize_html = /*sanitize_html*/ ctx[3];
56			if (dirty & /*line_breaks*/ 16) markdowncode_changes.line_breaks = /*line_breaks*/ ctx[4];
57			markdowncode.$set(markdowncode_changes);
58
59			if (!current || dirty & /*type*/ 2) {
60				toggle_class(div, "table", /*type*/ ctx[1] === "table");
61			}
62
63			if (!current || dirty & /*type*/ 2) {
64				toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery");
65			}
66
67			if (!current || dirty & /*selected*/ 4) {
68				toggle_class(div, "selected", /*selected*/ ctx[2]);
69			}
70		},
71		i(local) {
72			if (current) return;
73			transition_in(markdowncode.$$.fragment, local);
74			current = true;
75		},
76		o(local) {
77			transition_out(markdowncode.$$.fragment, local);
78			current = false;
79		},
80		d(detaching) {
81			if (detaching) {
82				detach(div);
83			}
84
85			destroy_component(markdowncode);
86		}
87	};
88}
89
90function instance($$self, $$props, $$invalidate) {
91	let { value } = $$props;
92	let { type } = $$props;
93	let { selected = false } = $$props;
94	let { sanitize_html } = $$props;
95	let { line_breaks } = $$props;
96	let { latex_delimiters } = $$props;
97
98	$$self.$$set = $$props => {
99		if ('value' in $$props) $$invalidate(0, value = $$props.value);
100		if ('type' in $$props) $$invalidate(1, type = $$props.type);
101		if ('selected' in $$props) $$invalidate(2, selected = $$props.selected);
102		if ('sanitize_html' in $$props) $$invalidate(3, sanitize_html = $$props.sanitize_html);
103		if ('line_breaks' in $$props) $$invalidate(4, line_breaks = $$props.line_breaks);
104		if ('latex_delimiters' in $$props) $$invalidate(5, latex_delimiters = $$props.latex_delimiters);
105	};
106
107	return [value, type, selected, sanitize_html, line_breaks, latex_delimiters];
108}
109
110class Example extends SvelteComponent {
111	constructor(options) {
112		super();
113
114		init(this, options, instance, create_fragment, safe_not_equal, {
115			value: 0,
116			type: 1,
117			selected: 2,
118			sanitize_html: 3,
119			line_breaks: 4,
120			latex_delimiters: 5
121		});
122	}
123}
124
125export { Example as default };
126//# sourceMappingURL=Example-8a688c80.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.