PageSourceSearch

https://pendrokar-xvasynth-tts.hf.space/assets/Index-f03f3b04.js

js pendrokar-xvasynth-tts.hf.space collected 2026-10-03 10:24:06 UTC 4,926 bytes, 201 lines download raw bytes

1import { T as Tabs } from './Tabs-7892470e.js';
2export { a as TABS } from './Tabs-7892470e.js';
3import './Index-9d23d982.js';
4import './index-12d4b00b.js';
5import './svelte/svelte.js';
6
7/* home/runner/work/gradio/gradio/js/tabs/Index.svelte generated by Svelte v4.2.2 */
8const {
9	SvelteComponent,
10	add_flush_callback,
11	bind,
12	binding_callbacks,
13	create_component,
14	create_slot,
15	destroy_component,
16	get_all_dirty_from_scope,
17	get_slot_changes,
18	init,
19	mount_component,
20	safe_not_equal,
21	transition_in,
22	transition_out,
23	update_slot_base
24} = window.__gradio__svelte__internal;
25const { createEventDispatcher } = window.__gradio__svelte__internal;
26function create_default_slot(ctx) {
27	let current;
28	const default_slot_template = /*#slots*/ ctx[5].default;
29	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[9], null);
30
31	return {
32		c() {
33			if (default_slot) default_slot.c();
34		},
35		m(target, anchor) {
36			if (default_slot) {
37				default_slot.m(target, anchor);
38			}
39
40			current = true;
41		},
42		p(ctx, dirty) {
43			if (default_slot) {
44				if (default_slot.p && (!current || dirty & /*$$scope*/ 512)) {
45					update_slot_base(
46						default_slot,
47						default_slot_template,
48						ctx,
49						/*$$scope*/ ctx[9],
50						!current
51						? get_all_dirty_from_scope(/*$$scope*/ ctx[9])
52						: get_slot_changes(default_slot_template, /*$$scope*/ ctx[9], dirty, null),
53						null
54					);
55				}
56			}
57		},
58		i(local) {
59			if (current) return;
60			transition_in(default_slot, local);
61			current = true;
62		},
63		o(local) {
64			transition_out(default_slot, local);
65			current = false;
66		},
67		d(detaching) {
68			if (default_slot) default_slot.d(detaching);
69		}
70	};
71}
72
73function create_fragment(ctx) {
74	let tabs;
75	let updating_selected;
76	let current;
77
78	function tabs_selected_binding(value) {
79		/*tabs_selected_binding*/ ctx[6](value);
80	}
81
82	let tabs_props = {
83		visible: /*visible*/ ctx[1],
84		elem_id: /*elem_id*/ ctx[2],
85		elem_classes: /*elem_classes*/ ctx[3],
86		$$slots: { default: [create_default_slot] },
87		$$scope: { ctx }
88	};
89
90	if (/*selected*/ ctx[0] !== void 0) {
91		tabs_props.selected = /*selected*/ ctx[0];
92	}
93
94	tabs = new Tabs({ props: tabs_props });
95	binding_callbacks.push(() => bind(tabs, 'selected', tabs_selected_binding));
96	tabs.$on("change", /*change_handler*/ ctx[7]);
97	tabs.$on("select", /*select_handler*/ ctx[8]);
98
99	return {
100		c() {
101			create_component(tabs.$$.fragment);
102		},
103		m(target, anchor) {
104			mount_component(tabs, target, anchor);
105			current = true;
106		},
107		p(ctx, [dirty]) {
108			const tabs_changes = {};
109			if (dirty & /*visible*/ 2) tabs_changes.visible = /*visible*/ ctx[1];
110			if (dirty & /*elem_id*/ 4) tabs_changes.elem_id = /*elem_id*/ ctx[2];
111			if (dirty & /*elem_classes*/ 8) tabs_changes.elem_classes = /*elem_classes*/ ctx[3];
112
113			if (dirty & /*$$scope*/ 512) {
114				tabs_changes.$$scope = { dirty, ctx };
115			}
116
117			if (!updating_selected && dirty & /*selected*/ 1) {
118				updating_selected = true;
119				tabs_changes.selected = /*selected*/ ctx[0];
120				add_flush_callback(() => updating_selected = false);
121			}
122
123			tabs.$set(tabs_changes);
124		},
125		i(local) {
126			if (current) return;
127			transition_in(tabs.$$.fragment, local);
128			current = true;
129		},
130		o(local) {
131			transition_out(tabs.$$.fragment, local);
132			current = false;
133		},
134		d(detaching) {
135			destroy_component(tabs, detaching);
136		}
137	};
138}
139
140function instance($$self, $$props, $$invalidate) {
141	let { $$slots: slots = {}, $$scope } = $$props;
142	const dispatch = createEventDispatcher();
143	let { visible = true } = $$props;
144	let { elem_id = "" } = $$props;
145	let { elem_classes = [] } = $$props;
146	let { selected } = $$props;
147	let { gradio } = $$props;
148
149	function tabs_selected_binding(value) {
150		selected = value;
151		$$invalidate(0, selected);
152	}
153
154	const change_handler = () => gradio.dispatch("change");
155	const select_handler = e => gradio.dispatch("select", e.detail);
156
157	$$self.$$set = $$props => {
158		if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
159		if ('elem_id' in $$props) $$invalidate(2, elem_id = $$props.elem_id);
160		if ('elem_classes' in $$props) $$invalidate(3, elem_classes = $$props.elem_classes);
161		if ('selected' in $$props) $$invalidate(0, selected = $$props.selected);
162		if ('gradio' in $$props) $$invalidate(4, gradio = $$props.gradio);
163		if ('$$scope' in $$props) $$invalidate(9, $$scope = $$props.$$scope);
164	};
165
166	$$self.$$.update = () => {
167		if ($$self.$$.dirty & /*selected*/ 1) {
168			dispatch("prop_change", { selected });
169		}
170	};
171
172	return [
173		selected,
174		visible,
175		elem_id,
176		elem_classes,
177		gradio,
178		slots,
179		tabs_selected_binding,
180		change_handler,
181		select_handler,
182		$$scope
183	];
184}
185
186class Index extends SvelteComponent {
187	constructor(options) {
188		super();
189
190		init(this, options, instance, create_fragment, safe_not_equal, {
191			visible: 1,
192			elem_id: 2,
193			elem_classes: 3,
194			selected: 0,
195			gradio: 4
196		});
197	}
198}
199
200export { Index as default };
201//# sourceMappingURL=Index-f03f3b04.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.