PageSourceSearch

https://zjunlp-easyinstruct.hf.space/assets/Example-4dcb2d09.js

js zjunlp-easyinstruct.hf.space collected 2026-10-03 10:25:24 UTC 2,026 bytes, 85 lines download raw bytes

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