1import { S as SvelteComponent, i as init, s as safe_not_equal, f as element, b as attr, t as toggle_class, c as insert, n as noop, e as detach, A as createEventDispatcher, q as create_component, u as mount_component, v as transition_in, w as transition_out, x as destroy_component, F as bubble } from './index.230aa104.js'; 2 3/* home/runner/work/gradio/gradio/ui/packages/html/src/HTML.svelte generated by Svelte v3.49.0 */ 4 5function create_fragment$1(ctx) { 6 let div; 7 8 return { 9 c() { 10 div = element("div"); 11 attr(div, "class", "output-html"); 12 attr(div, "id", /*elem_id*/ ctx[0]); 13 toggle_class(div, "!hidden", !/*visible*/ ctx[2]); 14 }, 15 m(target, anchor) { 16 insert(target, div, anchor); 17 div.innerHTML = /*value*/ ctx[1]; 18 }, 19 p(ctx, [dirty]) { 20 if (dirty & /*value*/ 2) div.innerHTML = /*value*/ ctx[1]; 21 if (dirty & /*elem_id*/ 1) { 22 attr(div, "id", /*elem_id*/ ctx[0]); 23 } 24 25 if (dirty & /*visible*/ 4) { 26 toggle_class(div, "!hidden", !/*visible*/ ctx[2]); 27 } 28 }, 29 i: noop, 30 o: noop, 31 d(detaching) { 32 if (detaching) detach(div); 33 } 34 }; 35} 36 37function instance$1($$self, $$props, $$invalidate) { 38 let { elem_id = "" } = $$props; 39 let { value } = $$props; 40 let { visible = true } = $$props; 41 const dispatch = createEventDispatcher(); 42 43 $$self.$$set = $$props => {
44 if ('elem_id' in $$props) $$invalidate(0, elem_id = $$props.elem_id); 45 if ('value' in $$props) $$invalidate(1, value = $$props.value); 46 if ('visible' in $$props) $$invalidate(2, visible = $$props.visible); 47 }; 48 49 $$self.$$.update = () => { 50 if ($$self.$$.dirty & /*value*/ 2) { 51 (dispatch("change")); 52 } 53 }; 54 55 return [elem_id, value, visible]; 56} 57 58class HTML extends SvelteComponent { 59 constructor(options) { 60 super(); 61 init(this, options, instance$1, create_fragment$1, safe_not_equal, { elem_id: 0, value: 1, visible: 2 }); 62 } 63} 64 65/* src/components/HTML/HTML.svelte generated by Svelte v3.49.0 */ 66 67function create_fragment(ctx) { 68 let html; 69 let current; 70 71 html = new HTML({ 72 props: { 73 value: /*value*/ ctx[2], 74 elem_id: /*elem_id*/ ctx[0], 75 visible: /*visible*/ ctx[1] 76 } 77 }); 78 79 html.$on("change", /*change_handler*/ ctx[4]); 80 81 return { 82 c() { 83 create_component(html.$$.fragment); 84 }, 85 m(target, anchor) { 86 mount_component(html, target, anchor); 87 current = true; 88 }, 89 p(ctx, [dirty]) { 90 const html_changes = {}; 91 if (dirty & /*value*/ 4) html_changes.value = /*value*/ ctx[2]; 92 if (dirty & /*elem_id*/ 1) html_changes.elem_id = /*elem_id*/ ctx[0]; 93 if (dirty & /*visible*/ 2) html_changes.visible = /*visible*/ ctx[1]; 94 html.$set(html_changes); 95 }, 96 i(local) { 97 if (current) return; 98 transition_in(html.$$.fragment, local); 99 current = true; 100 }, 101 o(local) { 102 transition_out(html.$$.fragment, local); 103 current = false; 104 }, 105 d(detaching) { 106 destroy_component(html, detaching); 107 } 108 }; 109} 110 111function instance($$self, $$props, $$invalidate) { 112 let { label } = $$props; 113 let { elem_id = "" } = $$props; 114 let { visible = true } = $$props; 115 let { value = "" } = $$props; 116 const dispatch = createEventDispatcher(); 117 118 function change_handler(event) { 119 bubble.call(this, $$self, event); 120 } 121 122 $$self.$$set = $$props => {
123 if ('label' in $$props) $$invalidate(3, label = $$props.label); 124 if ('elem_id' in $$props) $$invalidate(0, elem_id = $$props.elem_id); 125 if ('visible' in $$props) $$invalidate(1, visible = $$props.visible); 126 if ('value' in $$props) $$invalidate(2, value = $$props.value); 127 }; 128 129 $$self.$$.update = () => { 130 if ($$self.$$.dirty & /*label*/ 8) { 131 (dispatch("change")); 132 } 133 }; 134 135 return [elem_id, visible, value, label, change_handler]; 136} 137 138class HTML_1 extends SvelteComponent { 139 constructor(options) { 140 super(); 141 142 init(this, options, instance, create_fragment, safe_not_equal, { 143 label: 3, 144 elem_id: 0, 145 visible: 1, 146 value: 2 147 }); 148 } 149} 150 151var HTML_1$1 = HTML_1; 152 153const modes = ["static"]; 154 155export { HTML_1$1 as Component, modes };
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.