PageSourceSearch

https://hugging-apps-flux2-klein-refcontrol-lineart.hf.space/assets/Example-GBtWCYGT.js

js hugging-apps-flux2-klein-refcontrol-lineart.hf.space collected 2026-10-03 16:58:34 UTC 1,667 bytes, 85 lines download raw bytes

1import { p as prop, e as init, b as set_class } from './i18n-CMo5lpzy.js';
2import { R as push, x as set, t as template_effect, a as append, T as pop, a3 as mutable_source, U as flushSync, W as from_html, a0 as set_text, w as get, V as child, Y as reset } from './index-BvBk1Iap.js';
3
4var root = from_html(`<div> </div>`);
5
6function Example($$anchor, $$props) {
7	push($$props, false);
8
9	let value = prop($$props, 'value', 12);
10	let type = prop($$props, 'type', 12);
11	let selected = prop($$props, 'selected', 12, false);
12	let choices = prop($$props, 'choices', 12);
13	let name_string = mutable_source();
14
15	if (value() === null) {
16		set(name_string, "");
17	} else {
18		let name = choices().find((pair) => pair[1] === value());
19
20		set(name_string, name ? name[0] : "");
21	}
22
23	var $$exports = {
24		get value() {
25			return value();
26		},
27
28		set value($$value) {
29			value($$value);
30			flushSync();
31		},
32
33		get type() {
34			return type();
35		},
36
37		set type($$value) {
38			type($$value);
39			flushSync();
40		},
41
42		get selected() {
43			return selected();
44		},
45
46		set selected($$value) {
47			selected($$value);
48			flushSync();
49		},
50
51		get choices() {
52			return choices();
53		},
54
55		set choices($$value) {
56			choices($$value);
57			flushSync();
58		}
59	};
60
61	init();
62
63	var div = root();
64	let classes;
65	var text = child(div, true);
66
67	reset(div);
68
69	template_effect(() => {
70		classes = set_class(div, 1, 'svelte-g2dls0', null, classes, {
71			table: type() === "table",
72			gallery: type() === "gallery",
73			selected: selected()
74		});
75
76		set_text(text, get(name_string));
77	});
78
79	append($$anchor, div);
80
81	return pop($$exports);
82}
83
84export { Example as default };
85//# sourceMappingURL=Example-GBtWCYGT.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.