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