Spaces:
Runtime error
Runtime error
OpenHathi-SI-v0.1
/
env
/Lib
/site-packages
/gradio
/templates
/frontend
/assets
/BlockLabel-f22cfddb.js
import './Button-ab11cb83.js'; | |
/* home/runner/work/gradio/gradio/js/atoms/src/BlockLabel.svelte generated by Svelte v4.2.2 */ | |
const { | |
SvelteComponent, | |
append, | |
attr, | |
create_component, | |
destroy_component, | |
detach, | |
element, | |
init, | |
insert, | |
mount_component, | |
safe_not_equal, | |
set_data, | |
space, | |
text, | |
toggle_class, | |
transition_in, | |
transition_out | |
} = window.__gradio__svelte__internal; | |
function create_fragment(ctx) { | |
let label_1; | |
let span; | |
let icon; | |
let t0; | |
let t1; | |
let current; | |
icon = new /*Icon*/ ctx[1]({}); | |
return { | |
c() { | |
label_1 = element("label"); | |
span = element("span"); | |
create_component(icon.$$.fragment); | |
t0 = space(); | |
t1 = text(/*label*/ ctx[0]); | |
attr(span, "class", "svelte-1b6s6s"); | |
attr(label_1, "for", ""); | |
attr(label_1, "data-testid", "block-label"); | |
attr(label_1, "class", "svelte-1b6s6s"); | |
toggle_class(label_1, "hide", !/*show_label*/ ctx[2]); | |
toggle_class(label_1, "sr-only", !/*show_label*/ ctx[2]); | |
toggle_class(label_1, "float", /*float*/ ctx[4]); | |
toggle_class(label_1, "hide-label", /*disable*/ ctx[3]); | |
}, | |
m(target, anchor) { | |
insert(target, label_1, anchor); | |
append(label_1, span); | |
mount_component(icon, span, null); | |
append(label_1, t0); | |
append(label_1, t1); | |
current = true; | |
}, | |
p(ctx, [dirty]) { | |
if (!current || dirty & /*label*/ 1) set_data(t1, /*label*/ ctx[0]); | |
if (!current || dirty & /*show_label*/ 4) { | |
toggle_class(label_1, "hide", !/*show_label*/ ctx[2]); | |
} | |
if (!current || dirty & /*show_label*/ 4) { | |
toggle_class(label_1, "sr-only", !/*show_label*/ ctx[2]); | |
} | |
if (!current || dirty & /*float*/ 16) { | |
toggle_class(label_1, "float", /*float*/ ctx[4]); | |
} | |
if (!current || dirty & /*disable*/ 8) { | |
toggle_class(label_1, "hide-label", /*disable*/ ctx[3]); | |
} | |
}, | |
i(local) { | |
if (current) return; | |
transition_in(icon.$$.fragment, local); | |
current = true; | |
}, | |
o(local) { | |
transition_out(icon.$$.fragment, local); | |
current = false; | |
}, | |
d(detaching) { | |
if (detaching) { | |
detach(label_1); | |
} | |
destroy_component(icon); | |
} | |
}; | |
} | |
function instance($$self, $$props, $$invalidate) { | |
let { label = null } = $$props; | |
let { Icon } = $$props; | |
let { show_label = true } = $$props; | |
let { disable = false } = $$props; | |
let { float = true } = $$props; | |
$$self.$$set = $$props => { | |
if ('label' in $$props) $$invalidate(0, label = $$props.label); | |
if ('Icon' in $$props) $$invalidate(1, Icon = $$props.Icon); | |
if ('show_label' in $$props) $$invalidate(2, show_label = $$props.show_label); | |
if ('disable' in $$props) $$invalidate(3, disable = $$props.disable); | |
if ('float' in $$props) $$invalidate(4, float = $$props.float); | |
}; | |
return [label, Icon, show_label, disable, float]; | |
} | |
class BlockLabel extends SvelteComponent { | |
constructor(options) { | |
super(); | |
init(this, options, instance, create_fragment, safe_not_equal, { | |
label: 0, | |
Icon: 1, | |
show_label: 2, | |
disable: 3, | |
float: 4 | |
}); | |
} | |
} | |
export { BlockLabel as B }; | |
//# sourceMappingURL=BlockLabel-f22cfddb.js.map | |