PageSourceSearch

https://rongguangw-genmind.hf.space/assets/Example-d9b38e6f.js

js rongguangw-genmind.hf.space collected 2026-10-03 10:22:33 UTC 2,088 bytes, 89 lines download raw bytes

1const Example_svelte_svelte_type_style_lang = '';
2
3/* home/runner/work/gradio/gradio/js/file/Example.svelte generated by Svelte v4.2.2 */
4const {
5	SvelteComponent,
6	append,
7	attr,
8	detach,
9	element,
10	init,
11	insert,
12	noop,
13	safe_not_equal,
14	set_data,
15	text,
16	toggle_class
17} = window.__gradio__svelte__internal;
18function create_fragment(ctx) {
19	let div;
20
21	let t_value = (Array.isArray(/*value*/ ctx[0])
22	? /*value*/ ctx[0].join(", ")
23	: /*value*/ ctx[0]) + "";
24
25	let t;
26
27	return {
28		c() {
29			div = element("div");
30			t = text(t_value);
31			attr(div, "class", "svelte-rgtszb");
32			toggle_class(div, "table", /*type*/ ctx[1] === "table");
33			toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery");
34			toggle_class(div, "selected", /*selected*/ ctx[2]);
35		},
36		m(target, anchor) {
37			insert(target, div, anchor);
38			append(div, t);
39		},
40		p(ctx, [dirty]) {
41			if (dirty & /*value*/ 1 && t_value !== (t_value = (Array.isArray(/*value*/ ctx[0])
42			? /*value*/ ctx[0].join(", ")
43			: /*value*/ ctx[0]) + "")) set_data(t, t_value);
44
45			if (dirty & /*type*/ 2) {
46				toggle_class(div, "table", /*type*/ ctx[1] === "table");
47			}
48
49			if (dirty & /*type*/ 2) {
50				toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery");
51			}
52
53			if (dirty & /*selected*/ 4) {
54				toggle_class(div, "selected", /*selected*/ ctx[2]);
55			}
56		},
57		i: noop,
58		o: noop,
59		d(detaching) {
60			if (detaching) {
61				detach(div);
62			}
63		}
64	};
65}
66
67function instance($$self, $$props, $$invalidate) {
68	let { value } = $$props;
69	let { type } = $$props;
70	let { selected = false } = $$props;
71
72	$$self.$$set = $$props => {
73		if ('value' in $$props) $$invalidate(0, value = $$props.value);
74		if ('type' in $$props) $$invalidate(1, type = $$props.type);
75		if ('selected' in $$props) $$invalidate(2, selected = $$props.selected);
76	};
77
78	return [value, type, selected];
79}
80
81class Example extends SvelteComponent {
82	constructor(options) {
83		super();
84		init(this, options, instance, create_fragment, safe_not_equal, { value: 0, type: 1, selected: 2 });
85	}
86}
87
88export { Example as default };
89//# sourceMappingURL=Example-d9b38e6f.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.