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