1import { p as prop, b as set_class } from './i18n-dpAHICcw.js'; 2import { R as push, w as get, t as template_effect, a as append, T as pop, U as flushSync, V as child, ae as derived_safe_equal, I as deep_read_state, z as untrack, W as from_html, Y as reset } from './index-CDZuCcOm.js'; 3import { M as MarkdownCode } from './MarkdownCode-Q694H4-C.js'; 4/* empty css */ 5import './html-h_YSgefI.js'; 6import './MarkdownCode.svelte_svelte_type_style_lang-GeNUGzep.js'; 7import './prism-python-C_fanlsZ.js'; 8 9var root = from_html(`<div><!></div>`); 10 11function Example($$anchor, $$props) { 12 push($$props, false); 13 14 let value = prop($$props, 'value', 12); 15 let type = prop($$props, 'type', 12); 16 let selected = prop($$props, 'selected', 12, false); 17 let sanitize_html = prop($$props, 'sanitize_html', 12); 18 let line_breaks = prop($$props, 'line_breaks', 12); 19 let latex_delimiters = prop($$props, 'latex_delimiters', 12); 20 21 function truncate_text(text, max_length = 60) { 22 if (!text) return ""; 23 24 const str = String(text); 25 26 if (str.length <= max_length) return str; 27 28 return str.slice(0, max_length) + "..."; 29 } 30 31 var $$exports = { 32 get value() { 33 return value(); 34 }, 35 36 set value($$value) { 37 value($$value); 38 flushSync(); 39 }, 40 41 get type() { 42 return type(); 43 }, 44 45 set type($$value) { 46 type($$value); 47 flushSync(); 48 }, 49 50 get selected() { 51 return selected(); 52 }, 53 54 set selected($$value) { 55 selected($$value); 56 flushSync(); 57 }, 58 59 get sanitize_html() { 60 return sanitize_html(); 61 }, 62 63 set sanitize_html($$value) { 64 sanitize_html($$value); 65 flushSync(); 66 }, 67 68 get line_breaks() { 69 return line_breaks(); 70 }, 71 72 set line_breaks($$value) { 73 line_breaks($$value); 74 flushSync(); 75 }, 76 77 get latex_delimiters() { 78 return latex_delimiters(); 79 }, 80 81 set latex_delimiters($$value) { 82 latex_delimiters($$value); 83 flushSync(); 84 } 85 }; 86 87 var div = root(); 88 let classes; 89 var node = child(div); 90 91 { 92 let $0 = derived_safe_equal(() => ( 93 deep_read_state(value()), 94 untrack(() => truncate_text(value())) 95 )); 96 97 MarkdownCode(node, { 98 get message() { 99 return get($0); 100 }, 101 102 get latex_delimiters() { 103 return latex_delimiters(); 104 }, 105 106 get sanitize_html() { 107 return sanitize_html(); 108 }, 109 110 get line_breaks() { 111 return line_breaks(); 112 }, 113 chatbot: false 114 }); 115 } 116 117 reset(div); 118 119 template_effect(() => classes = set_class(div, 1, 'prose svelte-11ua876', null, classes, { 120 table: type() === "table", 121 gallery: type() === "gallery", 122 selected: selected() 123 })); 124 125 append($$anchor, div); 126 127 return pop($$exports); 128} 129 130export { Example as default }; 131//# sourceMappingURL=Example-DVcuxyo8.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.