PageSourceSearch

https://zoezormancdz81-marigold-v2.hf.space/assets/Index-BEzHC-5Y.js

js zoezormancdz81-marigold-v2.hf.space collected 2026-10-03 17:33:38 UTC 127,211 bytes, 6 lines download raw bytes

vendor: 4,715 bytes, lines 1-4
1import{B as Co}from"./Block-CygNNd5z.js";import"./MarkdownCode.svelte_svelte_type_style_lang-C4fBIMNi.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-Dn324h3u.js";import{d as Kn}from"./index-tFQomdd2.js";import{o as Ae,w as So}from"./index-Do3LSwBC.js";import{d as qo}from"./dsv-DB8NKgIY.js";import{d as Ot}from"./index-CnqicUFC.js";import{a as Mo}from"./Upload-B_zkKtR-.js";import"./DownloadLink.svelte_svelte_type_style_lang-C_5UIfol.js";import{M as Eo}from"./MarkdownCode-qms8blzp.js";import{C as cs}from"./Check-CEkiXcyC.js";import{C as Ao}from"./Copy-CxQ9EyK2.js";import{M as Lo,a as jo}from"./FullscreenButton-zMG84Fb2.js";import{S as Bo}from"./index-Dk7BRz4q.js";import"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";import zo from"./Index-HLR2_tkn.js";import{default as Jc}from"./Example-CqPGqNav.js";import"./prism-python-Cp7Xa0u5.js";import"./svelte/svelte.js";/* empty css                                             */import"./IconButton-DSs-aBrk.js";import"./Clear-By3xiIwg.js";import"./ImagePreview-CGW8mLyK.js";import"./utils-BsGrhMNe.js";import"./BlockLabel-8WtM61r3.js";import"./Empty-AVq7jL0F.js";import"./ShareButton-CuWfx-Ef.js";import"./Community-Dw1micSV.js";import"./Download-DVtk-Jv3.js";import"./IconButtonWrapper-jknaAjP6.js";import"./utils-Gtzs_Zla.js";import"./Image-CnqB5dbD.js";import"./file-url-DoxvUUVV.js";import"./DownloadLink-QIttOhoR.js";/* empty css                                                   */import"./ImageUploader-BCPq3aDm.js";import"./SelectSource-Ce_27dAp.js";import"./DropdownArrow-CFmkDyPW.js";import"./Square-oAGqOwsh.js";import"./index-KfiBD3Sx.js";import"./StreamingBar-BU9S4hA7.js";import"./UploadText-sHYakqun.js";import"./Example-CC8yxxGn.js";/* empty css                                              */function cn(n,e,t){if(!e.length)return"none";const l=e.find(i=>{const s=i.col;return s<0||s>=t.length?!1:t[s]===n});return l?l.direction:"none"}function Do(n,e){if(!n||!n.length||!n[0])return[];if(e.length>0){const t=[...Array(n.length)].map((l,i)=>i);return t.sort((l,i)=>{const s=n[l],o=n[i];for(const{col:r,direction:u}of e){if(!s||!o||r<0||r>=s.length||r>=o.length||!s[r]||!o[r])continue;const c=s[r].value,_=o[r].value,a=c<_?-1:c>_?1:0;if(a!==0)return u==="asc"?a:-a}return 0}),t}return[...Array(n.length)].map((t,l)=>l)}function To(n,e,t,l,i,s){let o=null;i&&i[0]in n&&i[1]in n[i[0]]&&(o=n[i[0]][i[1]].id),fs(n,e,t,l);let r=i;if(o){const[u,c]=s(o,n);r=[u,c]}return{data:n,selected:r}}function Ho(n){if(!n||!n.length)return[];let e=n[0].slice();for(let t=0;t<n.length;t++)for(let l=0;l<n[t].length;l++)`${e[l].value}`.length<`${n[t][l].value}`.length&&(e[l]=n[t][l]);return e}function fs(n,e,t,l){if(!l.length||!n||!n.length)return;const i=Do(n,l),s=i.map(o=>n[o]);if(n.splice(0,n.length,...s),e){const o=i.map(r=>e[r]);e.splice(0,e.length,...o)}if(t){const o=i.map(r=>t[r]);t.splice(0,t.length,...o)}}async function hs(n,e){if(!n||!n.length)return;const l=(e||n.flatMap((r,u)=>r.map((c,_)=>[u,_]))).reduce((r,[u,c])=>{r[u]=r[u]||{};const _=String(n[u][c].value);return r[u][c]=_.includes(",")||_.includes('"')||_.includes(`
2`)?`"${_.replace(/"/g,'""')}"`:_,r},{}),i=Object.keys(l).sort((r,u)=>+r-+u);if(!i.length)return;const s=Object.keys(l[i[0]]).sort((r,u)=>+r-+u),o=i.map(r=>s.map(u=>l[r][u]||"").join(",")).join(`
3`);try{await navigator.clipboard.writeText(o)}catch(r){throw new Error("Failed to copy to clipboard: "+r.message)}}function Ro(n,e){return e.filter(t);function t(l){var i=-1;return n.split(`
4`).every(s);function s(o){if(!o)return!0;var r=o.split(l).length;return i<0&&(i=r),i===r&&r>1}}}function No(n){const e=atob(n.split(",")[1]),t=n.split(",")[0].split(":")[1].split(";")[0],l=new ArrayBuffer(e.length),i=new Uint8Array(l);for(let s=0;s<e.length;s++)i[s]=e.charCodeAt(s);return new Blob([l],{type:t})}function Po(n,e,t){const l=No(n),i=new FileReader;i.addEventListener("loadend",s=>{if(!s?.target?.result||typeof s.target.result!="string")return;const[o]=Ro(s.target.result,[",","	"]),[r,...u]=qo(o).parseRows(s.target.result);e(r),t(u)}),i.readAsText(l)}function Fo(n,e){const[t,l]=n;return e.some(([i,s])=>i===t&&s===l)}function Io(n,e){const[t,l]=n;if(!e.some(([u,c])=>u===t&&c===l))return"";const i=e.some(([u,c])=>u===t-1&&c===l),s=e.some(([u,c])=>u===t+1&&c===l),o=e.some(([u,c])=>u===t&&c===l-1),r=e.some(([u,c])=>u===t&&c===l+1);return`cell-selected${i?" no-top":""}${s?" no-bottom":""}${o?" no-left":""}${r?" no-right":""}`}function fl(n,e){const[t,l]=n,[i,s]=e,o=Math.min(t,i),r=Math.max(t,i),u=Math.min(l,s),c=Math.max(l,s),_=[];_.push(n);for(let a=o;a<=r;a++)for(let f=u;f<=c;f++)a===t&&f===l||_.push([a,f]);return _}function Oo(n,e,t){if(t.shiftKey&&e.length>0)return fl(e[e.length-1],n);
4if(t.metaKey||t.ctrlKey){const l=([s,o])=>s===n[0]&&o===n[1],i=e.findIndex(l);return i===-1?[...e,n]:e.filter((s,o)=>o!==i)}return[n]}function Ko(n,e){const t=n.map(l=>[...l]);return e.forEach(([l,i])=>{t[l]&&t[l][i]&&(t[l][i]={...t[l][i],value:""})}),t}function Vo(n,e,t){const[l,i]=n;return t&&e.length===1&&e[0][0]===l&&e[0][1]===i}function Uo(n,e,t){const[l,i]=n,s=t?-1:1;if(e[l]?.[i+s])return[l,i+s];const o=l+(s>0?1:0),r=l+(s<0?-1:0);return s>0&&e[o]?.[0]?[o,0]:s<0&&e[r]?.[e[0].length-1]?[r,e[0].length-1]:!1}function Wo(n,e,t){const l=n.key,i={ArrowRight:[0,1],ArrowLeft:[0,-1],ArrowDown:[1,0],ArrowUp:[-1,0]}[l];let s,o;if(n.metaKey||n.ctrlKey)if(l==="ArrowRight")s=e[0],o=t[0].length-1;else if(l==="ArrowLeft")s=e[0],o=0;else if(l==="ArrowDown")s=t.length-1,o=e[1];else if(l==="ArrowUp")s=0,o=e[1];else return!1;else s=e[0]+i[0],o=e[1]+i[1];return s<0&&o<=0?!1:t[s]?.[o]?[s,o]:!1}function Jo(n,e){return e.reduce((t,l,i)=>{const s=l.reduce((o,r,u)=>n===r.id?u:o,-1);return s===-1?t:[i,s]},[-1,-1])}function Yo(n,e){const[t]=n.composedPath();return!e.contains(t)}function Xo(n,e,t,l,i){const[s,o]=n;if(!e[s]?.[o])return{col_pos:"0px",row_pos:void 0};const r=e[s][o].id,u=t[r]?.cell;if(!u)return{col_pos:"0px",row_pos:void 0};const c=u.getBoundingClientRect(),_=i.getBoundingClientRect(),a=`${c.left-_.left+c.width/2}px`,f=`${c.top-_.top+c.height/2}px`;return{col_pos:a,row_pos:f}}const{getContext:Kc,setContext:Fl}=window.__gradio__svelte__internal,{tick:Il}=window.__gradio__svelte__internal,Go=Symbol("dataframe");function Qo(n,e){const t=s=>n.update(o=>({...o,...s(o)})),l=(s,o,r)=>{const u=s[0]?.length?Array(s[0].length).fill(null).map(()=>({value:"",id:o()})):[{value:"",id:o()}],c=[...s];return r!==void 0?c.splice(r,0,u):c.push(u),c},i=(s,o,r,u)=>{const c=e.headers?[...o.map(a=>e.headers[o.indexOf(a)].value)]:[...o,`Header ${o.length+1}`],_=s.map(a=>[...a,{value:"",id:r()}]);return u!==void 0&&(c.splice(u,0,c.pop()),_.forEach(a=>a.splice(u,0,a.pop()))),{data:_,headers:c}};return{handle_search:s=>t(o=>({current_search_query:s})),handle_sort:(s,o)=>t(r=>{const u=r.sort_state.sort_columns.filter(c=>c.col!==s);return r.sort_state.sort_columns.some(c=>c.col===s&&c.direction===o)||u.push({col:s,direction:o}),{sort_state:{...r.sort_state,sort_columns:u.slice(-3)}}}),get_sort_status:(s,o)=>{const u=Ae(n).sort_state.sort_columns.find(c=>o[c.col]===s);return u?u.direction:"none"},sort_data:(s,o,r)=>{const{sort_state:{sort_columns:u}}=Ae(n);u.length&&fs(s,o,r,u)},update_row_order:s=>t(o=>({sort_state:{...o.sort_state,row_order:o.sort_state.sort_columns.length&&s[0]?[...Array(s.length)].map((r,u)=>u).sort((r,u)=>{for(const{col:c,direction:_}of o.sort_state.sort_columns){const a=(s[r]?.[c]?.value??"")<(s[u]?.[c]?.value??"")?-1:1;if(a)return _==="asc"?a:-a}return 0}):[...Array(s.length)].map((r,u)=>u)}})),filter_data:s=>{const o=Ae(n).current_search_query?.toLowerCase();return o?s.filter(r=>r.some(u=>String(u?.value).toLowerCase().includes(o))):s},add_row:l,add_col:i,add_row_at:(s,o,r,u)=>l(s,u,r==="above"?o:o+1),add_col_at:(s,o,r,u,c)=>i(s,o,c,u==="left"?r:r+1),delete_row:(s,o)=>s.length>1?s.filter((r,u)=>u!==o):s,delete_col:(s,o,r)=>o.length>1?{data:s.map(u=>u.filter((c,_)=>_!==r)),headers:o.filter((u,c)=>c!==r)}:{data:s,headers:o},delete_row_at:(s,o)=>s.length>1?[...s.slice(0,o),...s.slice(o+1)]:s,delete_col_at:(s,o,r)=>o.length>1?{data:s.map(u=>[...u.slice(0,r),...u.slice(r+1)]),headers:[...o.slice(0,r),...o.slice(r+1)]}:{data:s,headers:o},trigger_change:async(s,o,r,u,c,_)=>{if(Ae(n).current_search_query)return;const f=o.map(q=>q.value),v=s.map(q=>q.map(m=>String(m.value)));(!Kn(v,r)||!Kn(f,u))&&(Kn(f,u)||t(q=>({sort_state:{sort_columns:[],row_order:[]}})),_("change",{data:s.map(q=>q.map(m=>m.value)),headers:f,metadata:null}),c||_("input"))},reset_sort_state:()=>t(s=>({sort_state:{sort_columns:[],row_order:[]}})),set_active_cell_menu:s=>t(o=>({ui_state:{...o.ui_state,active_cell_menu:s}})),set_active_header_menu:s=>t(o=>({ui_state:{...o.ui_state,active_header_menu:s}})),set_selected_cells:s=>t(o=>({ui_state:{...o.ui_state,selected_cells:s}})),set_selected:s=>t(o=>({ui_state:{...o.ui_state,selected:s}})),set_editing:s=>t(o=>({ui_state:{...o.ui_state,editing:s}})),clear_ui_state:()=>t(s=>({ui_state:{active_cell_menu:null,active_header_menu:null,selected_cells:[],selected:!1,editing:!1,header_edit:!1,selected_header:!1,active_button:null,copy_flash:!1}})),set_header_edit:s=>t(o=>({ui_state:{...o.ui_state,selected_cells:[],selected_header:s,header_edit:s}})),set_selected_header:s=>t(o=>({ui_state:{...o.ui_state,selected_header:s,selected:!1,selected_cells:[]}})),handle_header_click:(s,o)=>t(r=>({ui_state:{...r.ui_state,active_cell_menu:null,active_header_menu:null,selected:!1,selected_cells:[],selected_header:s,header_edit:o?s:!1}})),end_header_edit:s=>{["Escape","Enter","Tab"].includes(s)&&t(o=>({ui_state:{...o.ui_state,selected:!1,header_edit:!1}}))},get_selected_cells:()=>Ae(n).ui_state.selected_cells,get_active_cell_menu:()=>Ae(n).ui_state.active_cell_menu,get_active_button:()=>Ae(n).ui_state.active_button,set_active_button:s=>t(o=>({ui_state:{...o.ui_state,active_button:s}})),set_copy_flash:s=>t(o=>({ui_state:{...o.ui_state,copy_flash:s}})),handle_cell_click:(s,o,r)=>{s.preventDefault(),s.stopPropagation();const u=Ae(n);if(u.config.show_row_numbers&&r===-1)return;let c=o;if(u.current_search_query&&e.data){const a=[];e.data.forEach((f,v)=>{f.some(q=>String(q?.value).toLowerCase().includes(u.current_search_query?.toLowerCase()||""))&&a.push(v)}),c=a[o]??o}const _=Oo([c,r],u.ui_state.selected_cells,s);t(a=>({ui_state:{...a.ui_state,active_cell_menu:null,active_header_menu:null,selected_header:!1,header_edit:!1,selected_cells:_,selected:_[0]}})),u.config.editable&&_.length===1?(t(a=>({ui_state:{...a.ui_state,editing:[c,r]}})),Il().then(()=>e.els[e.data[c][r].id]?.input?.focus())):Il().then(()=>{e.parent_element&&e.parent_element.focus()}),e.dispatch?.("select",{index:[c,r],col_value:e.get_column(r),row_value:e.get_row(c),value:e.get_data_at(c,r)})},toggle_cell_menu:(s,o,r)=>{s.stopPropagation();const u=Ae(n).ui_state.active_cell_menu;if(u?.row===o&&u.col===r)t(c=>({ui_state:{...c.ui_state,active_cell_menu:null}}));else{const c=s.target.closest("td");if(c){const _=c.getBoundingClientRect();t(a=>({ui_state:{...a.ui_state,active_cell_menu:{row:o,col:r,x:_.right,y:_.bottom}}}))}}},toggle_cell_button:(s,o)=>{const r=Ae(n).ui_state.active_button,u=r?.type==="cell"&&r.row===s&&r.col===o?null:{type:"cell",row:s,col:o};t(c=>({ui_state:{...c.ui_state,active_button:u}}))},handle_select_column:s=>{if(!e.data)return;const o=e.data.map((r,u)=>[u,s]);t(r=>({ui_state:{...r.ui_state,selected_cells:o,selected:o[0],editing:!1}})),setTimeout(()=>
4e.parent_element?.focus(),0)},handle_select_row:s=>{if(!e.data||!e.data[0])return;const o=e.data[0].map((r,u)=>[s,u]);t(r=>({ui_state:{...r.ui_state,selected_cells:o,selected:o[0],editing:!1}})),setTimeout(()=>e.parent_element?.focus(),0)},get_next_cell_coordinates:Uo,get_range_selection:fl,move_cursor:Wo}}function Zo(n){const e=So({config:n,current_search_query:null,sort_state:{sort_columns:[],row_order:[]},ui_state:{active_cell_menu:null,active_header_menu:null,selected_cells:[],selected:!1,editing:!1,header_edit:!1,selected_header:!1,active_button:null,copy_flash:!1}}),t={state:e,actions:null};t.actions=Qo(e,t);const l=Symbol(`dataframe_${Math.random().toString(36).substring(2)}`);return Fl(l,t),Fl(Go,{instance_id:l,context:t}),t}const{SvelteComponent:$o,append:Vn,attr:Ye,detach:xo,element:Ol,flush:Un,init:er,insert:tr,listen:nr,noop:Kl,null_to_empty:Vl,safe_not_equal:lr,stop_propagation:ir,svg_element:Ul}=window.__gradio__svelte__internal;function sr(n){let e,t,l,i,s,o,r,u,c;return{c(){e=Ol("button"),t=Ol("span"),l=Ul("svg"),i=Ul("path"),Ye(i,"d","m16.707 13.293-4-4a1 1 0 0 0-1.414 0l-4 4A1 1 0 0 0 8 15h8a1 1 0 0 0 .707-1.707z"),Ye(i,"data-name",n[3]),Ye(l,"xmlns","http://www.w3.org/2000/svg"),Ye(l,"viewBox","0 0 24 24"),Ye(l,"class","svelte-1mp8yw1"),Ye(t,"class",s=Vl(n[3])+" svelte-1mp8yw1"),Ye(e,"class",o="selection-button selection-button-"+n[0]+" "+(n[2]?`move-${n[3]}`:"")+" svelte-1mp8yw1"),Ye(e,"aria-label",r=`Select ${n[0]}`)},m(_,a){tr(_,e,a),Vn(e,t),Vn(t,l),Vn(l,i),u||(c=nr(e,"click",ir(n[5])),u=!0)},p(_,[a]){a&8&&Ye(i,"data-name",_[3]),a&8&&s!==(s=Vl(_[3])+" svelte-1mp8yw1")&&Ye(t,"class",s),a&13&&o!==(o="selection-button selection-button-"+_[0]+" "+(_[2]?`move-${_[3]}`:"")+" svelte-1mp8yw1")&&Ye(e,"class",o),a&1&&r!==(r=`Select ${_[0]}`)&&Ye(e,"aria-label",r)},i:Kl,o:Kl,d(_){_&&xo(e),u=!1,c()}}}function or(n,e,t){let l,i,{position:s}=e,{coords:o}=e,{on_click:r=null}=e;const u=()=>r&&r();return n.$$set=c=>{"position"in c&&t(0,s=c.position),"coords"in c&&t(4,o=c.coords),"on_click"in c&&t(1,r=c.on_click)},n.$$.update=()=>{n.$$.dirty&17&&t(2,l=s==="column"?o[0]===0:o[1]===0),n.$$.dirty&5&&t(3,i=s==="column"?l?"down":"up":l?"right":"left")},[s,r,l,i,o,u]}class Wl extends $o{constructor(e){super(),er(this,e,or,sr,lr,{position:0,coords:4,on_click:1})}get position(){return this.$$.ctx[0]}set position(e){this.$$set({position:e}),Un()}get coords(){return this.$$.ctx[4]}set coords(e){this.$$set({coords:e}),Un()}get on_click(){return this.$$.ctx[1]}set on_click(e){this.$$set({on_click:e}),Un()}}const{HtmlTag:rr,SvelteComponent:_r,action_destroyer:ar,attr:Se,binding_callbacks:ur,bubble:fn,check_outros:Zn,construct_svelte_component:Jl,create_component:Wt,destroy_component:Jt,detach:ct,element:ds,empty:hl,flush:ge,group_outros:$n,init:cr,insert:ft,listen:at,mount_component:Yt,noop:yn,prevent_default:fr,run_all:ms,safe_not_equal:hr,set_data:dr,set_input_value:Yl,space:xn,stop_propagation:Wn,text:mr,toggle_class:Pe,transition_in:lt,transition_out:ht}=window.__gradio__svelte__internal,{createEventDispatcher:gr}=window.__gradio__svelte__internal;function Xl(n){let e,t,l,i;return{c(){e=ds("input"),e.readOnly=n[9],Se(e,"aria-readonly",n[9]),Se(e,"role","textbox"),Se(e,"aria-label",t=n[9]?"Cell is read-only":"Edit cell"),Se(e,"tabindex","-1"),Se(e,"class","svelte-1y3tas2"),Pe(e,"header",n[4])},m(s,o){ft(s,e,o),n[32](e),Yl(e,n[0]),l||(i=[at(e,"input",n[33]),at(e,"blur",n[22]),at(e,"mousedown",Wn(n[29])),at(e,"mouseup",Wn(n[30])),at(e,"click",Wn(n[31])),ar(Cr.call(null,e)),at(e,"keydown",n[23])],l=!0)},p(s,o){o[0]&512&&(e.readOnly=s[9]),o[0]&512&&Se(e,"aria-readonly",s[9]),o[0]&512&&t!==(t=s[9]?"Cell is read-only":"Edit cell")&&Se(e,"aria-label",t),o[0]&1&&e.value!==s[0]&&Yl(e,s[0]),o[0]&16&&Pe(e,"header",s[4])},d(s){s&&ct(e),n[32](null),l=!1,ms(i)}}}function br(n){let e;return{c(){e=mr(n[21])},m(t,l){ft(t,e,l)},p(t,l){l[0]&2097152&&dr(e,t[21])},i:yn,o:yn,d(t){t&&ct(e)}}}function wr(n){let e,t;return e=new Eo({props:{message:n[21].toLocaleString(),latex_delimiters:n[6],line_breaks:n[7],chatbot:!1,root:n[10]}}),{c(){Wt(e.$$.fragment)},m(l,i){Yt(e,l,i),t=!0},p(l,i){const s={};
4i[0]&2097152&&(s.message=l[21].toLocaleString()),i[0]&64&&(s.latex_delimiters=l[6]),i[0]&128&&(s.line_breaks=l[7]),i[0]&1024&&(s.root=l[10]),e.$set(s)},i(l){t||(lt(e.$$.fragment,l),t=!0)},o(l){ht(e.$$.fragment,l),t=!1},d(l){Jt(e,l)}}}function kr(n){let e,t;return{c(){e=new rr(!1),t=hl(),e.a=t},m(l,i){e.m(n[21],l,i),ft(l,t,i)},p(l,i){i[0]&2097152&&e.p(l[21])},i:yn,o:yn,d(l){l&&(ct(t),e.d())}}}function pr(n){let e,t,l;var i=n[12].image;function s(o,r){return{props:{value:{url:o[21]},show_label:!1,label:"cell-image",show_download_button:!1,i18n:o[13],gradio:{dispatch:Sr}}}}return i&&(e=Jl(i,s(n))),{c(){e&&Wt(e.$$.fragment),t=hl()},m(o,r){e&&Yt(e,o,r),ft(o,t,r),l=!0},p(o,r){if(r[0]&4096&&i!==(i=o[12].image)){if(e){$n();const u=e;ht(u.$$.fragment,1,0,()=>{Jt(u,1)}),Zn()}i?(e=Jl(i,s(o)),Wt(e.$$.fragment),lt(e.$$.fragment,1),Yt(e,t.parentNode,t)):e=null}else if(i){const u={};r[0]&2097152&&(u.value={url:o[21]}),r[0]&8192&&(u.i18n=o[13]),e.$set(u)}},i(o){l||(e&&lt(e.$$.fragment,o),l=!0)},o(o){e&&ht(e.$$.fragment,o),l=!1},d(o){o&&ct(t),e&&Jt(e,o)}}}function Gl(n){let e,t,l,i;return e=new Wl({props:{position:"column",coords:n[17],on_click:n[34]}}),l=new Wl({props:{position:"row",coords:n[17],on_click:n[35]}}),{c(){Wt(e.$$.fragment),t=xn(),Wt(l.$$.fragment)},m(s,o){Yt(e,s,o),ft(s,t,o),Yt(l,s,o),i=!0},p(s,o){const r={};o[0]&131072&&(r.coords=s[17]),o[0]&393216&&(r.on_click=s[34]),e.$set(r);const u={};o[0]&131072&&(u.coords=s[17]),o[0]&655360&&(u.on_click=s[35]),l.$set(u)},i(s){i||(lt(e.$$.fragment,s),lt(l.$$.fragment,s),i=!0)},o(s){ht(e.$$.fragment,s),ht(l.$$.fragment,s),i=!1},d(s){s&&ct(t),Jt(e,s),Jt(l,s)}}}function vr(n){let e,t,l,i,s,o,r,u,c,_=n[2]&&Xl(n);const a=[pr,kr,wr,br],f=[];function v(m,M){return m[5]==="image"&&m[12].image?0:m[5]==="html"?1:m[5]==="markdown"?2:3}l=v(n),i=f[l]=a[l](n);let q=n[16]&&n[17]&&n[18]&&n[19]&&Gl(n);return{c(){_&&_.c(),e=xn(),t=ds("span"),i.c(),s=xn(),q&&q.c(),o=hl(),Se(t,"tabindex","0"),Se(t,"role","button"),Se(t,"style",n[3]),Se(t,"data-editable",n[8]),Se(t,"data-max-chars",n[11]),Se(t,"data-expanded",n[20]),Se(t,"placeholder"," "),Se(t,"class","svelte-1y3tas2"),Pe(t,"dragging",n[14]),Pe(t,"edit",n[2]),Pe(t,"expanded",n[20]),Pe(t,"multiline",n[4]),Pe(t,"text",n[5]==="str"),Pe(t,"wrap",n[15])},m(m,M){_&&_.m(m,M),ft(m,e,M),ft(m,t,M),f[l].m(t,null),ft(m,s,M),q&&q.m(m,M),ft(m,o,M),r=!0,u||(c=[at(t,"click",n[24]),at(t,"keydown",n[23]),at(t,"focus",fr(n[28]))],u=!0)},p(m,M){m[2]?_?_.p(m,M):(_=Xl(m),_.c(),_.m(e.parentNode,e)):_&&(_.d(1),_=null);let d=l;l=v(m),l===d?f[l].p(m,M):($n(),ht(f[d],1,1,()=>{f[d]=null}),Zn(),i=f[l],i?i.p(m,M):(i=f[l]=a[l](m),i.c()),lt(i,1),i.m(t,null)),(!r||M[0]&8)&&Se(t,"style",m[3]),(!r||M[0]&256)&&Se(t,"data-editable",m[8]),(!r||M[0]&2048)&&Se(t,"data-max-chars",m[11]),(!r||M[0]&1048576)&&Se(t,"data-expanded",m[20]),(!r||M[0]&16384)&&Pe(t,"dragging",m[14]),(!r||M[0]&4)&&Pe(t,"edit",m[2]),(!r||M[0]&1048576)&&Pe(t,"expanded",m[20]),(!r||M[0]&16)&&Pe(t,"multiline",m[4]),(!r||M[0]&32)&&Pe(t,"text",m[5]==="str"),(!r||M[0]&32768)&&Pe(t,"wrap",m[15]),m[16]&&m[17]&&m[18]&&m[19]?q?(q.p(m,M),M[0]&983040&&lt(q,1)):(q=Gl(m),q.c(),lt(q,1),q.m(o.parentNode,o)):q&&($n(),ht(q,1,1,()=>{q=null}),Zn())},i(m){r||(lt(i),lt(q),r=!0)},o(m){ht(i),ht(q),r=!1},d(m){m&&(ct(e),ct(t),ct(s),ct(o)),_&&_.d(m),f[l].d(),q&&q.d(m),u=!1,ms(c)}}}function yr(n,e=null,t=!1){if(t)return String(n);const l=String(n);return!e||e<=0||l.length<=e?l:l.slice(0,e)+"..."}function Cr(n){return requestAnimationFrame(()=>{n.focus()}),{}}const Sr=()=>{};function qr(n,e,t){let l,i,s,{edit:o}=e,{value:r=""}=e,{display_value:u=null}=e,{styling:c=""}=e,{header:_=!1}=e,{datatype:a="str"}=e,{latex_delimiters:f}=e,{line_breaks:v=!0}=e,{editable:q=!0}=e,{is_static:m=!1}=e,{root:M}=e,{max_chars:d=null}=e,{components:w={}}=e,{i18n:k}=e,{is_dragging:y=!1}=e,{wrap_text:C=!1}=e,{show_selection_buttons:L=!1}=e,{coords:B}=e,{on_select_column:z=null}=e,{on_select_row:H=null}=e;const F=gr();let P=!1,{el:I}=e;function U(S){F("blur",{blur_event:S,coords:B})}function ce(S){S.key==="Enter"&&(_||t(20,P=!P)),F("keydown",S)}function te(){!o&&!_&&t(20,P=!P)}function V(S){fn.call(this,n,S)}function J(S){fn.call(this,n,S)}function p(S){fn.call(this,n,S)}function ze(S){fn.call(this,n,S)}function fe(S){ur[S?"unshift":"push"](()=>{I=S,t(1,I)})}function Y(){r=this.value,t(0,r)}const W=()=>z(B[1]),X=()=>H(B[0]);return n.$$set=S=>{"edit"in S&&t(2,o=S.edit),"value"in S&&t(0,r=S.value),"display_value"in S&&t(25,u=S.display_value),"styling"in S&&t(3,c=S.styling),"header"in S&&t(4,_=S.header),"datatype"in S&&t(5,a=S.datatype),"latex_delimiters"in S&&t(6,f=S.latex_delimiters),"line_breaks"in S&&t(7,v=S.line_breaks),"editable"in S&&t(8,q=S.editable),"is_static"in S&&t(9,m=S.is_static),"root"in S&&t(10,M=S.root),"max_chars"in S&&t(11,d=S.max_chars),"components"in S&&t(12,w=S.components),"i18n"in S&&t(13,k=S.i18n),"is_dragging"in S&&t(14,y=S.is_dragging),"wrap_text"in S&&t(15,C=S.wrap_text),"show_selection_buttons"in S&&t(16,L=S.show_selection_buttons),"coords"in S&&t(17,B=S.coords),"on_select_column"in S&&t(18,z=S.on_select_column),"on_select_row"in S&&t(19,H=S.on_select_row),"el"in S&&t(1,I=S.el)},n.$$.update=()=>{n.$$.dirty[0]&1050628&&t(27,l=!o&&!P&&d!==null&&d>0),n.$$.dirty[0]&33554689&&t(26,i=q?r:u!==null?u:r),n.$$.dirty[0]&201328672&&t(21,s=l?yr(i,d,a==="image"):i)},[r,I,o,c,_,a,f,v,q,m,M,d,w,k,y,C,L,B,z,H,P,s,U,ce,te,u,i,l,V,J,p,ze,fe,Y,W,X]}class dl extends _r{constructor(e){super(),cr(this,e,qr,vr,hr,{edit:2,value:0,display_value:25,styling:3,header:4,datatype:5,latex_delimiters:6,line_breaks:7,editable:8,is_static:9,root:10,max_chars:11,components:12,i18n:13,is_dragging:14,wrap_text:15,show_selection_buttons:16,coords:17,on_select_column:18,on_select_row:19,el:1},null,[-1,-1])}get edit(){return this.$$.ctx[2]}set edit(e){this.$$set({edit:e}),ge()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),ge()}get display_value(){return this.$$.ctx[25]}set display_value(e){this.$$set({display_value:e}),ge()}get styling(){return this.$$.ctx[3]}set styling(e){this.$$set({styling:e}),ge()}get header(){return this.$$.ctx[4]}set header(e){this.$$set({header:e}),ge()}get datatype(){return this.$$.ctx[5]}set datatype(e){this.$$set({datatype:e}),ge()}get latex_delimiters(){return this.$$.ctx[6]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),ge()}get line_breaks(){return this.$$.ctx[7]}set line_breaks(e){this.$$set({line_breaks:e}),ge()}get editable(){return this.$$.ctx[8]}set editable(e){this.$$set({editable:e}),ge()}get is_static(){return this.$$.ctx[9]}set is_static(e){this.$$set({is_static:e}),ge()}get root(){return this.$$.ctx[10]}set root(e){this.$$set({root:e}),ge()}get max_chars(){return this.$$.ctx[11]}set max_chars(e){this.$$set({max_chars:e}),ge()}get components(){return this.$$.ctx[12]}set components(e){this.$$set({components:e}),ge()}get i18n(){return this.$$.ctx[13]}set i18n(e){this.$$set({i18n:e}),ge()}get is_dragging(){return this.$$.ctx[14]}set is_dragging(e){this.$$set({is_dragging:e}),ge()}get wrap_text(){return this.$$.ctx[15]}set wrap_text(e){this.$$set({wrap_text:e}),ge()}get show_selection_buttons(){return this.$$.ctx[16]}set show_selection_buttons(e){this.$$set({show_selection_buttons:e}),ge()}get coords(){return this.$$.ctx[17]}set coords(e){this.$$set({coords:e}),ge()}get on_select_column(){return this.$$.ctx[18]}set on_select_column(e){this.$$set({on_select_column:e}),ge()}get on_select_row(){return this.$$.ctx[19]}set on_select_row(e){this.$$set({on_select_row:e}),ge()}get el(){return this.$$.ctx[1]}set el(e){this.$$set({el:e}),ge()}}const{SvelteComponent:Mr,append:Er,attr:Mt,detach:ml,element:gs,empty:Ar,flush:Ql,init:Lr,insert:gl,noop:el,safe_not_equal:jr,set_data:Br,text:zr}=window.__gradio__svelte__internal;function Dr(n){let e,t=(n[0]!==null?n[0]+1:"")+"",l;return{c(){e=gs("td"),l=zr(t),Mt(e,"class","row-number svelte-l87gn2"),Mt(e,"tabindex","-1"),Mt(e,"data-row",n[0]),Mt(e,"data-col","row-number")},m(i,s){gl(i,e,s),Er(e,l)},p(i,s){s&1&&t!==(t=(i[0]!==null?i[0]+1:"")+"")&&Br(l,t),s&1&&Mt(e,"data-row",i[0])},d(i){i&&ml(e)}}}function Tr(n){let e;return{c(){e=gs("th"),e.innerHTML='<div class="cell-wrap"><div class="header-content"><div class="header-text"></div></div></div>',Mt(e,"tabindex","-1"),Mt(e,"class","row-number svelte-l87gn2")},m(t,l){gl(t,e,l)},p:el,d(t){t&&ml(e)}}}function Hr(n){let e;function t(s,o){return s[1]?Tr:Dr}let l=t(n),i=l(n);return{c(){i.c(),e=Ar()},m(s,o){i.m(s,o),gl(s,e,o)},p(s,[o]){l===(l=t(s))&&i?i.p(s,o):(i.d(1),i=l(s),i&&(i.c(),i.m(e.parentNode,e)))},i:el,o:el,d(s){s&&ml(e),i.d(s)}}}function Rr(n,e,t){let{index:l=null}=e,{is_header:i=!1}=e;return n.$$set=s=>{"index"in s&&t(0,l=s.index),"is_header"in s&&t(1,i=s.is_header)},[l,i]}class Mn extends Mr{constructor(e){super(),Lr(this,e,Rr,Hr,jr,{index:0,is_header:1})}get index(){return this.$$.ctx[0]}set index(e){this.$$set({index:e}),Ql()}get is_header(){return this.$$.ctx[1]}set is_header(e){this.$$set({is_header:e}),Ql()}}const{SvelteComponent:Nr,attr:Jn,detach:Pr,element:Fr,flush:Ir,init:Or,insert:Kr,is_function:Vr,listen:Zl,noop:$l,run_all:Ur,safe_not_equal:Wr}=window.__gradio__svelte__internal;function Jr(n){let e,t,l;return{c(){e=Fr("button"),e.textContent="⋮",Jn(e,"aria-label","Open cell menu"),Jn(e,"class","cell-menu-button svelte-vt38nd"),Jn(e,"aria-haspopup","menu")},m(i,s){Kr(i,e,s),t||(l=[Zl(e,"click",function(){Vr(n[0])&&n[0].apply(this,arguments)}),Zl(e,"touchstart",n[1])],t=!0)},p(i,[s]){n=i},i:$l,o:$l,d(i){i&&Pr(e),t=!1,Ur(l)}}}function Yr(n,e,t){let{on_click:l}=e;const i=s=>{s.preventDefault();const o=s.touches[0],r=new MouseEvent("click",{clientX:o.clientX,clientY:o.clientY,bubbles:!0,cancelable:!0,view:window});l(r)};return n.$$set=s=>{"on_click"in s&&t(0,l=s.on_click)},[l,i]}class bs extends Nr{constructor(e){super(),Or(this,e,Yr,Jr,Wr,{on_click:0})}get on_click(){return this.$$.ctx[0]}set on_click(e){this.$$set({on_click:e}),Ir()}}const{SvelteComponent:Xr,attr:xl,detach:Gr,element:Qr,init:Zr,insert:$r,noop:Yn,safe_not_equal:xr}=window.__gradio__svelte__internal;function e_(n){let e;return{c(){e=Qr("div"),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>',xl(e,"class","wrapper svelte-1skchaw"),xl(e,"aria-label","Static column")},m(t,l){$r(t,e,l)},p:Yn,i:Yn,o:Yn,d(t){t&&Gr(e)}}}class t_ extends Xr{constructor(e){super(),Zr(this,e,null,e_,xr,{})}}const{SvelteComponent:n_,append:ei,attr:De,detach:l_,flush:i_,init:s_,insert:o_,noop:ti,safe_not_equal:r_,svg_element:Xn}=window.__gradio__svelte__internal;function __(n){let e,t,l;return{c(){e=Xn("svg"),t=Xn("path"),l=Xn("path"),De(t,"d","M4 8L8 4L12 8"),De(t,"stroke","currentColor"),De(t,"stroke-width","1.5"),De(t,"stroke-linecap","round"),De(t,"stroke-linejoin","round"),De(l,"d","M8 4V12"),De(l,"stroke","currentColor"),De(l,"stroke-width","1.5"),De(l,"stroke-linecap","round"),De(e,"width",n[0]),De(e,"height",n[0]),De(e,"viewBox","0 0 16 16"),De(e,"fill","none"),De(e,"xmlns","http://www.w3.org/2000/svg")},m(i,s){o_(i,e,s),ei(e,t),ei(e,l)},p(i,[s]){s&1&&De(e,"width",i[0]),s&1&&De(e,"height",i[0])},i:ti,o:ti,d(i){i&&l_(e)}}}function a_(n,e,t){let{size:l=16}=e;return n.$$set=i=>{"size"in i&&t(0,l=i.size)},[l]}class u_ extends n_{constructor(e){super(),s_(this,e,a_,__,r_,{size:0})}get size(){return this.$$.ctx[0]}set size(e){this.$$set({size:e}),i_()}}const{SvelteComponent:c_,append:ni,attr:Te,detach:f_,flush:h_,init:d_,insert:m_,noop:li,safe_not_equal:g_,svg_element:Gn}=window.__gradio__svelte__internal;function b_(n){let e,t,l;return{c(){e=Gn("svg"),t=Gn("path"),l=Gn("path"),Te(t,"d","M4 8L8 12L12 8"),Te(t,"stroke","currentColor"),Te(t,"stroke-width","1.5"),Te(t,"stroke-linecap","round"),Te(t,"stroke-linejoin","round"),Te(l,"d","M8 12V4"),Te(l,"stroke","currentColor"),Te(l,"stroke-width","1.5"),Te(l,"stroke-linecap","round"),Te(e,"width",n[0]),Te(e,"height",n[0]),Te(e,"viewBox","0 0 16 16"),Te(e,"fill","none"),Te(e,"xmlns","http://www.w3.org/2000/svg")},m(i,s){m_(i,e,s),ni(e,t),ni(e,l)},p(i,[s]){s&1&&Te(e,"width",i[0]),s&1&&Te(e,"height",i[0])},i:li,o:li,d(i){i&&f_(e)}}}function w_(n,e,t){let{size:l=16}=e;return n.$$set=i=>{"size"in i&&t(0,l=i.size)},[l]}class k_ extends c_{constructor(e){super(),d_(this,e,w_,b_,g_,{size:0})}get size(){return this.$$.ctx[0]}set size(e){this.$$set({size:e}),h_()}}const{SvelteComponent:p_,add_flush_callback:ii,append:ut,attr:Ie,bind:si,binding_callbacks:oi,check_outros:wn,create_component:Xt,destroy_component:Gt,detach:bl,element:At,flush:we,group_outros:kn,init:v_,insert:wl,listen:hn,mount_component:Qt,run_all:y_,safe_not_equal:C_,set_data:S_,set_style:dn,space:pn,text:q_,toggle_class:kt,transition_in:He,transition_out:Ke}=window.__gradio__svelte__internal;function ri(n){let e,t,l,i,s,o;const r=[E_,M_],u=[];function c(a,f){return a[20]==="asc"?0:1}l=c(n),i=u[l]=r[l](n);let _=n[11].length>1&&_i(n);return{c(){e=At("div"),t=At("span"),i.c(),s=pn(),_&&_.c(),Ie(t,"class","sort-arrow svelte-sy2j2s"),Ie(e,"class","sort-indicators svelte-sy2j2s")},m(a,f){wl(a,e,f),ut(e,t),u[l].m(t,null),ut(e,s),_&&_.m(e,null),o=!0},p(a,f){let v=l;l=c(a),l!==v&&(kn(),Ke(u[v],1,1,()=>{u[v]=null}),wn(),i=u[l],i||(i=u[l]=r[l](a),i.c()),He(i,1),i.m(t,null)),a[11].length>1?_?_.p(a,f):(_=_i(a),_.c(),_.m(e,null)):_&&(_.d(1),_=null)},i(a){o||(He(i),o=!0)},o(a){Ke(i),o=!1},d(a){a&&bl(e),u[l].d(),_&&_.d()}}}function M_(n){let e,t;return e=new k_({props:{size:12}}),{c(){Xt(e.$$.fragment)},m(l,i){Qt(e,l,i),t=!0},i(l){t||(He(e.$$.fragment,l),t=!0)},o(l){Ke(e.$$.fragment,l),t=!1},d(l){Gt(e,l)}}}function E_(n){let e,t;return e=new u_({props:{size:12}}),{c(){Xt(e.$$.fragment)},m(l,i){Qt(e,l,i),t=!0},i(l){t||(He(e.$$.fragment,l),t=!0)},o(l){Ke(e.$$.fragment,l),t=!1},d(l){Gt(e,l)}}}function _i(n){let e,t;return{c(){e=At("span"),t=q_(n[21]),Ie(e,"class","sort-priority svelte-sy2j2s")},m(l,i){wl(l,e,i),ut(e,t)},p(l,i){i&2097152&&S_(t,l[21])},d(l){l&&bl(e)}}}function ai(n){let e,t;return e=new t_({}),{c(){Xt(e.$$.fragment)},m(l,i){Qt(e,l,i),t=!0},i(l){t||(He(e.$$.fragment,l),t=!0)},o(l){Ke(e.$$.fragment,l),t=!1},d(l){Gt(e,l)}}}function ui(n){let e,t;return e=new bs({props:{on_click:n[29]}}),{c(){Xt(e.$$.fragment)},m(l,i){Qt(e,l,i),t=!0},p(l,i){const s={};i&516&&(s.on_click=l[29]),e.$set(s)},i(l){t||(He(e.$$.fragment,l),t=!0)},o(l){Ke(e.$$.fragment,l),t=!1},d(l){Gt(e,l)}}}function A_(n){let e,t,l,i,s,o,r,u,c,_,a,f,v,q;function m(C){n[25](C)}function M(C){n[26](C)}let d={max_chars:n[14],latex_delimiters:n[12],line_breaks:n[13],edit:n[4]===n[2],header:!0,root:n[15],editable:n[16],is_static:n[18],i18n:n[17],coords:[n[2],0]};n[0]!==void 0&&(d.value=n[0]),n[1]!==void 0&&(d.el=n[1]),s=new dl({props:d}),oi.push(()=>si(s,"value",m)),oi.push(()=>
4si(s,"el",M)),s.$on("keydown",n[27]);let w=n[19]!==-1&&ri(n),k=n[18]&&ai(),y=n[22]&&ui(n);return{c(){e=At("th"),t=At("div"),l=At("div"),i=At("button"),Xt(s.$$.fragment),u=pn(),w&&w.c(),c=pn(),k&&k.c(),_=pn(),y&&y.c(),Ie(i,"class","header-button svelte-sy2j2s"),Ie(i,"title",n[0]),Ie(l,"class","header-content svelte-sy2j2s"),Ie(t,"class","cell-wrap svelte-sy2j2s"),Ie(e,"aria-sort",a=cn(n[0],n[11],n[6])==="none"?"none":cn(n[0],n[11],n[6])==="asc"?"ascending":"descending"),dn(e,"width",n[7](n[2])),dn(e,"left",n[23](n[2])),Ie(e,"title",n[0]),Ie(e,"class","svelte-sy2j2s"),kt(e,"pinned-column",n[2]<n[3]),kt(e,"last-pinned",n[2]===n[3]-1),kt(e,"focus",n[4]===n[2]||n[5]===n[2]),kt(e,"sorted",n[19]!==-1)},m(C,L){wl(C,e,L),ut(e,t),ut(t,l),ut(l,i),Qt(s,i,null),ut(i,u),w&&w.m(i,null),ut(l,c),k&&k.m(l,null),ut(t,_),y&&y.m(t,null),f=!0,v||(q=[hn(i,"click",n[28]),hn(i,"mousedown",L_),hn(e,"click",n[30]),hn(e,"mousedown",j_)],v=!0)},p(C,[L]){const B={};L&16384&&(B.max_chars=C[14]),L&4096&&(B.latex_delimiters=C[12]),L&8192&&(B.line_breaks=C[13]),L&20&&(B.edit=C[4]===C[2]),L&32768&&(B.root=C[15]),L&65536&&(B.editable=C[16]),L&262144&&(B.is_static=C[18]),L&131072&&(B.i18n=C[17]),L&4&&(B.coords=[C[2],0]),!o&&L&1&&(o=!0,B.value=C[0],ii(()=>o=!1)),!r&&L&2&&(r=!0,B.el=C[1],ii(()=>r=!1)),s.$set(B),C[19]!==-1?w?(w.p(C,L),L&524288&&He(w,1)):(w=ri(C),w.c(),He(w,1),w.m(i,null)):w&&(kn(),Ke(w,1,1,()=>{w=null}),wn()),(!f||L&1)&&Ie(i,"title",C[0]),C[18]?k?L&262144&&He(k,1):(k=ai(),k.c(),He(k,1),k.m(l,null)):k&&(kn(),Ke(k,1,1,()=>{k=null}),wn()),C[22]?y?(y.p(C,L),L&4194304&&He(y,1)):(y=ui(C),y.c(),He(y,1),y.m(t,null)):y&&(kn(),Ke(y,1,1,()=>{y=null}),wn()),(!f||L&2113&&a!==(a=cn(C[0],C[11],C[6])==="none"?"none":cn(C[0],C[11],C[6])==="asc"?"ascending":"descending"))&&Ie(e,"aria-sort",a),(!f||L&132)&&dn(e,"width",C[7](C[2])),(!f||L&4)&&dn(e,"left",C[23](C[2])),(!f||L&1)&&Ie(e,"title",C[0]),(!f||L&12)&&kt(e,"pinned-column",C[2]<C[3]),(!f||L&12)&&kt(e,"last-pinned",C[2]===C[3]-1),(!f||L&52)&&kt(e,"focus",C[4]===C[2]||C[5]===C[2]),(!f||L&524288)&&kt(e,"sorted",C[19]!==-1)},i(C){f||(He(s.$$.fragment,C),He(w),He(k),He(y),f=!0)},o(C){Ke(s.$$.fragment,C),Ke(w),Ke(k),Ke(y),f=!1},d(C){C&&bl(e),Gt(s),w&&w.d(),k&&k.d(),y&&y.d(),v=!1,y_(q)}}}const L_=n=>{n.preventDefault(),n.stopPropagation()},j_=n=>{n.preventDefault(),n.stopPropagation()};function B_(n,e,t){let l,i,s,o,{value:r}=e,{i:u}=e,{actual_pinned_columns:c}=e,{header_edit:_}=e,{selected_header:a}=e,{headers:f}=e,{get_cell_width:v}=e,{handle_header_click:q}=e,{toggle_header_menu:m}=e,{end_header_edit:M}=e,{sort_columns:d=[]}=e,{latex_delimiters:w}=e,{line_breaks:k}=e,{max_chars:y}=e,{root:C}=e,{editable:L}=e,{i18n:B}=e,{el:z}=e,{is_static:H}=e,{col_count:F}=e;function P(p){return p>=c?"auto":p===0?"0":`calc(${Array(p).fill(0).map((fe,Y)=>v(Y)).join(" + ")})`}function I(p){r=p,t(0,r)}function U(p){z=p,t(1,z)}const ce=p=>{(p.detail.key==="Enter"||p.detail.key==="Escape"||p.detail.key==="Tab")&&M(p)},te=p=>q(p,u),V=p=>m(p,u),J=p=>q(p,u);return n.$$set=p=>{"value"in p&&t(0,r=p.value),"i"in p&&t(2,u=p.i),"actual_pinned_columns"in p&&t(3,c=p.actual_pinned_columns),"header_edit"in p&&t(4,_=p.header_edit),"selected_header"in p&&t(5,a=p.selected_header),"headers"in p&&t(6,f=p.headers),"get_cell_width"in p&&t(7,v=p.get_cell_width),"handle_header_click"in p&&t(8,q=p.handle_header_click),"toggle_header_menu"in p&&t(9,m=p.toggle_header_menu),"end_header_edit"in p&&t(10,M=p.end_header_edit),"sort_columns"in p&&t(11,d=p.sort_columns),"latex_delimiters"in p&&t(12,w=p.latex_delimiters),"line_breaks"in p&&t(13,k=p.line_breaks),"max_chars"in p&&t(14,y=p.max_chars),"root"in p&&t(15,C=p.root),"editable"in p&&t(16,L=p.editable),"i18n"in p&&t(17,B=p.i18n),"el"in p&&t(1,z=p.el),"is_static"in p&&t(18,H=p.is_static),"col_count"in p&&t(24,F=p.col_count)},n.$$.update=()=>{n.$$.dirty&16777216&&t(22,l=F&&F[1]==="dynamic"),n.$$.dirty&2052&&t(19,i=d.findIndex(p=>p.col===u)),n.$$.dirty&524288&&t(21,s=i!==-1?i+1:null),n.$$.dirty&526336&&t(20,o=i!==-1?d[i].direction:null)},[r,z,u,c,_,a,f,v,q,m,M,d,w,k,y,C,L,B,H,i,o,s,l,P,F,I,U,ce,te,V,J]}class ws extends p_{constructor(e){super(),v_(this,e,B_,A_,C_,{value:0,i:2,actual_pinned_columns:3,header_edit:4,selected_header:5,headers:6,get_cell_width:7,handle_header_click:8,toggle_header_menu:9,end_header_edit:10,sort_columns:11,latex_delimiters:12,line_breaks:13,max_chars:14,root:15,editable:16,i18n:17,el:1,is_static:18,col_count:24})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),we()}get i(){return this.$$.ctx[2]}set i(e){this.$$set({i:e}),we()}get actual_pinned_columns(){return this.$$.ctx[3]}set actual_pinned_columns(e){this.$$set({actual_pinned_columns:e}),we()}get header_edit(){return this.$$.ctx[4]}set header_edit(e){this.$$set({header_edit:e}),we()}get selected_header(){return this.$$.ctx[5]}set selected_header(e){this.$$set({selected_header:e}),we()}get headers(){return this.$$.ctx[6]}set headers(e){this.$$set({headers:e}),we()}get get_cell_width(){return this.$$.ctx[7]}set get_cell_width(e){this.$$set({get_cell_width:e}),we()}get handle_header_click(){return this.$$.ctx[8]}set handle_header_click(e){this.$$set({handle_header_click:e}),we()}get toggle_header_menu(){return this.$$.ctx[9]}set toggle_header_menu(e){this.$$set({toggle_header_menu:e}),we()}get end_header_edit(){return this.$$.ctx[10]}set end_header_edit(e){this.$$set({end_header_edit:e}),we()}get sort_columns(){return this.$$.ctx[11]}set sort_columns(e){this.$$set({sort_columns:e}),we()}get latex_delimiters(){return this.$$.ctx[12]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),we()}get line_breaks(){return this.$$.ctx[13]}set line_breaks(e){this.$$set({line_breaks:e}),we()}get max_chars(){return this.$$.ctx[14]}set max_chars(e){this.$$set({max_chars:e}),we()}get root(){return this.$$.ctx[15]}set root(e){this.$$set({root:e}),we()}get editable(){return this.$$.ctx[16]}set editable(e){this.$$set({editable:e}),we()}get i18n(){return this.$$.ctx[17]}set i18n(e){this.$$set({i18n:e}),we()}get el(){return this.$$.ctx[1]}set el(e){this.$$set({el:e}),we()}get is_static(){return this.$$.ctx[18]}set is_static(e){this.$$set({is_static:e}),we()}get col_count(){return this.$$.ctx[24]}set col_count(e){this.$$set({col_count:e}),we()}}const{SvelteComponent:z_,add_flush_callback:ci,append:fi,attr:Xe,bind:hi,binding_callbacks:tl,check_outros:D_,create_component:ks,destroy_component:ps,detach:T_,element:di,flush:Z,group_outros:H_,init:R_,insert:N_,is_function:P_,listen:mi,mount_component:vs,prevent_default:F_,run_all:I_,safe_not_equal:O_,space
4:K_,toggle_class:ke,transition_in:It,transition_out:vn}=window.__gradio__svelte__internal;function gi(n){let e,t;return e=new bs({props:{on_click:n[40]}}),{c(){ks(e.$$.fragment)},m(l,i){vs(e,l,i),t=!0},p(l,i){const s={};i[0]&536&&(s.on_click=l[40]),e.$set(s)},i(l){t||(It(e.$$.fragment,l),t=!0)},o(l){vn(e.$$.fragment,l),t=!1},d(l){ps(e,l)}}}function V_(n){let e,t,l,i,s,o,r=n[20]&&n[10]([n[3],n[4]],n[0],n[20]),u,c,_,a,f,v;function q(w){n[37](w)}function m(w){n[38](w)}let M={display_value:n[27]!==void 0?n[27]:String(n[1]),latex_delimiters:n[14],line_breaks:n[15],editable:n[20],is_static:n[21],edit:n[17]&&n[17][0]===n[3]&&n[17][1]===n[4],datatype:n[16],root:n[19],max_chars:n[18],i18n:n[22],components:n[23],show_selection_buttons:n[0].length===1&&n[0][0][0]===n[3]&&n[0][0][1]===n[4],coords:[n[3],n[4]],on_select_column:n[24],on_select_row:n[25],is_dragging:n[26],wrap_text:n[28]};n[1]!==void 0&&(M.value=n[1]),n[2].input!==void 0&&(M.el=n[2].input),l=new dl({props:M}),tl.push(()=>hi(l,"value",q)),tl.push(()=>hi(l,"el",m)),l.$on("focus",n[39]),l.$on("blur",function(){P_(n[8])&&n[8].apply(this,arguments)});let d=r&&gi(n);return{c(){e=di("td"),t=di("div"),ks(l.$$.fragment),o=K_(),d&&d.c(),Xe(t,"class","cell-wrap svelte-v1pjjd"),Xe(e,"tabindex",u=n[4]<n[5]?-1:0),Xe(e,"data-row",n[3]),Xe(e,"data-col",n[4]),Xe(e,"data-testid",c=`cell-${n[3]}-${n[4]}`),Xe(e,"style",_="width: "+n[6](n[4])+"; left: "+n[34](n[4])+"; "+(n[13]||"")),Xe(e,"class","svelte-v1pjjd"),ke(e,"pinned-column",n[4]<n[5]),ke(e,"last-pinned",n[4]===n[5]-1),ke(e,"flash",n[11]&&n[33]),ke(e,"cell-selected",n[33]),ke(e,"no-top",n[32]),ke(e,"no-bottom",n[31]),ke(e,"no-left",n[30]),ke(e,"no-right",n[29]),ke(e,"menu-active",n[12]&&n[12].row===n[3]&&n[12].col===n[4]),ke(e,"dragging",n[26])},m(w,k){N_(w,e,k),fi(e,t),vs(l,t,null),fi(t,o),d&&d.m(t,null),n[41](e),a=!0,f||(v=[mi(e,"mousedown",n[42]),mi(e,"contextmenu",F_(n[43]))],f=!0)},p(w,k){n=w;const y={};k[0]&134217730&&(y.display_value=n[27]!==void 0?n[27]:String(n[1])),k[0]&16384&&(y.latex_delimiters=n[14]),k[0]&32768&&(y.line_breaks=n[15]),k[0]&1048576&&(y.editable=n[20]),k[0]&2097152&&(y.is_static=n[21]),k[0]&131096&&(y.edit=n[17]&&n[17][0]===n[3]&&n[17][1]===n[4]),k[0]&65536&&(y.datatype=n[16]),k[0]&524288&&(y.root=n[19]),k[0]&262144&&(y.max_chars=n[18]),k[0]&4194304&&(y.i18n=n[22]),k[0]&8388608&&(y.components=n[23]),k[0]&25&&(y.show_selection_buttons=n[0].length===1&&n[0][0][0]===n[3]&&n[0][0][1]===n[4]),k[0]&24&&(y.coords=[n[3],n[4]]),k[0]&16777216&&(y.on_select_column=n[24]),k[0]&33554432&&(y.on_select_row=n[25]),k[0]&67108864&&(y.is_dragging=n[26]),k[0]&268435456&&(y.wrap_text=n[28]),!i&&k[0]&2&&(i=!0,y.value=n[1],ci(()=>i=!1)),!s&&k[0]&4&&(s=!0,y.el=n[2].input,ci(()=>s=!1)),l.$set(y),k[0]&1049625&&(r=n[20]&&n[10]([n[3],n[4]],n[0],n[20])),r?d?(d.p(n,k),k[0]&1049625&&It(d,1)):(d=gi(n),d.c(),It(d,1),d.m(t,null)):d&&(H_(),vn(d,1,1,()=>{d=null}),D_()),(!a||k[0]&48&&u!==(u=n[4]<n[5]?-1:0))&&Xe(e,"tabindex",u),(!a||k[0]&8)&&Xe(e,"data-row",n[3]),(!a||k[0]&16)&&Xe(e,"data-col",n[4]),(!a||k[0]&24&&c!==(c=`cell-${n[3]}-${n[4]}`))&&Xe(e,"data-testid",c),(!a||k[0]&8272&&_!==(_="width: "+n[6](n[4])+"; left: "+n[34](n[4])+"; "+(n[13]||"")))&&Xe(e,"style",_),(!a||k[0]&48)&&ke(e,"pinned-column",n[4]<n[5]),(!a||k[0]&48)&&ke(e,"last-pinned",n[4]===n[5]-1),(!a||k[0]&2048|k[1]&4)&&ke(e,"flash",n[11]&&n[33]),(!a||k[1]&4)&&ke(e,"cell-selected",n[33]),(!a||k[1]&2)&&ke(e,"no-top",n[32]),(!a||k[1]&1)&&ke(e,"no-bottom",n[31]),(!a||k[0]&1073741824)&&ke(e,"no-left",n[30]),(!a||k[0]&536870912)&&ke(e,"no-right",n[29]),(!a||k[0]&4120)&&ke(e,"menu-active",n[12]&&n[12].row===n[3]&&n[12].col===n[4]),(!a||k[0]&67108864)&&ke(e,"dragging",n[26])},i(w){a||(It(l.$$.fragment,w),It(d),a=!0)},o(w){vn(l.$$.fragment,w),vn(d),a=!1},d(w){w&&T_(e),ps(l),d&&d.d(),n[41](null),f=!1,I_(v)}}}function U_(n,e,t){let l,i,s,o,r,u,{value:c}=e,{index:_}=e,{j:a}=e,{actual_pinned_columns:f}=e,{get_cell_width:v}=e,{handle_cell_click:q}=e,{handle_blur:m}=e,{toggle_cell_menu:M}=e,{is_cell_selected:d}=e,{should_show_cell_menu:w}=e,{selected_cells:k}=e,{copy_flash:y}=e,{active_cell_menu:C}=e,{styling:L}=e,{latex_delimiters:B}=e,{line_breaks:z}=e,{datatype:H}=e,{editing:F}=e,{max_chars:P}=e,{root:I}=e,{editable:U}=e,{is_static:ce=!1}=e,{i18n:te}=e,{components:V={}}=e,{el:J}=e,{handle_select_column:p}=e,{handle_select_row:ze}=e,{is_dragging:fe}=e,{display_value:Y}=e,{wrap:W=!1}=e;function X(E){return E>=f?"auto":E===0?"0":`calc(${Array(E).fill(0).map((ye,le)=>v(le)).join(" + ")})`}function S(E){c=E,t(1,c)}function j(E){n.$$.not_equal(J.input,E)&&(J.input=E,t(2,J))}const g=()=>{const E=_,D=a;k.some(([ye,le])=>ye===E&&le===D)||t(0,k=[[E,D]])},se=E=>M(E,_,a);function K(E){tl[E?"unshift":"push"](()=>{J.cell=E,t(2,J)})}const Ne=E=>q(E,_,a),R=E=>M(E,_,a);return n.$$set=E=>{"value"in E&&t(1,c=E.value),"index"in E&&t(3,_=E.index),"j"in E&&t(4,a=E.j),"actual_pinned_columns"in E&&t(5,f=E.actual_pinned_columns),"get_cell_width"in E&&t(6,v=E.get_cell_width),"handle_cell_click"in E&&t(7,q=E.handle_cell_click),"handle_blur"in E&&t(8,m=E.handle_blur),"toggle_cell_menu"in E&&t(9,M=E.toggle_cell_menu),"is_cell_selected"in E&&t(35,d=E.is_cell_selected),"should_show_cell_menu"in E&&t(10,w=E.should_show_cell_menu),"selected_cells"in E&&t(0,k=E.selected_cells),"copy_flash"in E&&t(11,y=E.copy_flash),"active_cell_menu"in E&&t(12,C=E.active_cell_menu),"styling"in E&&t(13,L=E.styling),"latex_delimiters"in E&&t(14,B=E.latex_delimiters),"line_breaks"in E&&t(15,z=E.line_breaks),"datatype"in E&&t(16,H=E.datatype),"editing"in E&&t(17,F=E.editing),"max_chars"in E&&t(18,P=E.max_chars),"root"in E&&t(19,I=E.root),"editable"in E&&t(20,U=E.editable),"is_static"in E&&t(21,ce=E.is_static),"i18n"in E&&t(22,te=E.i18n),"components"in E&&t(23,V=E.components),"el"in E&&t(2,J=E.el),"handle_select_column"in E&&t(24,p=E.handle_select_column),"handle_select_row"in E&&t(25,ze=E.handle_select_row),"is_dragging"in E&&t(26,fe=E.is_dragging),"display_value"in E&&t(27,Y=E.display_value),"wrap"in E&&t(28,W=E.wrap)},n.$$.update=()=>{n.$$.dirty[0]&25|n.$$.dirty[1]&16&&t(36,l=d([_,a],k||[])),n.$$.dirty[0]&25&&t(33,i=Fo([_,a],k)),n.$$.dirty[1]&32&&t(32,s=l.includes("no-top")),n.$$.dirty[1]&32&&t(31,o=l.includes("no-bottom")),n.$$.dirty[1]&32&&t(30,r=l.includes("no-left")),n.$$.dirty[1]&32&&t(29,u=l.includes("no-right"))},[k,c,J,_,a,f,v,q,m,M,w,y,C,L,B,z,H,F,P,I,U,ce,te,V,p,ze,fe,Y,W,u,r,o,s,i,X,d,l,S,j,g,se,K,Ne,R]}class W_ extends z_{constructor(e){super(),R_(this,e,U_,V_,O_,{value:1,index:3,j:4,actual_pinned_columns:5,get_cell_width:6,handle_cell_click:7,handle_blur:8,toggle_cell_menu:9,is_cell_selected:35,should_show_cell_menu:10,selected_cells:0,copy_flash:11,active_cell_menu:12,styling:13,latex_delimiters:14,line_breaks:15,datatype:16,editing:17,max_chars:18,root:19,editable:20,is_static:21,i18n:22,components:23,el:2,handle_select_column:24,handle_select_row:25,is_dragging:26,display_value:27,wrap:28},null,[-1,-1])}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),Z()}get index(){return this.$$.ctx[3]}set index(e){this.$$set({index:e}),Z()}get j(){return this.$$.ctx[4]}set j(e){this.$$set({j:e}),Z()}get actual_pinned_columns(){return this.$$.ctx[5]}set actual_pinned_columns(e){this.$$set({actual_pinned_columns:e}),Z()}get get_cell_width(){return this.$$.ctx[6]}set get_cell_width(e){this.$$set({get_cell_width:e}),Z()}get handle_cell_click(){return this.$$.ctx[7]}set handle_cell_click(e){this.$$set({handle_cell_click:e}),Z()}get handle_blur(){return this.$$.ctx[8]}set handle_blur(e){this.$$set({handle_blur:e}),Z()}get toggle_cell_menu(){return this.$$.ctx[9]}set toggle_cell_menu(e){this.$$set({toggle_cell_menu:e}),Z()}get is_cell_selected(){return this.$$.ctx[35]}set is_cell_selected(e){this.$$set({is_cell_selected:e}),Z()}get should_show_cell_menu(){return this.$$.ctx[10]}set should_show_cell_menu(e){this.$$set({should_show_cell_menu:e}),Z()}get selected_cells(){return this.$$.ctx[0]}set selected_cells(e){this.$$set({selected_cells:e}),Z()}get copy_flash(){return this.$$.ctx[11]}set copy_flash(e){this.$$set({copy_flash:e}),Z()}get active_cell_menu(){return this.$$.ctx[12]}set active_cell_menu(e){this.$$set({active_cell_menu:e}),Z()}get styling(){return this.$$.ctx[13]}set styling(e){this.$$set({styling:e}),Z()}get latex_delimiters(){return this.$$.ctx[14]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),Z()}get line_breaks(){return this.$$.ctx[15]}set line_breaks(e){this.$$set({line_breaks:e}),Z()}get datatype(){return this.$$.ctx[16]}set datatype(e){this.$$set({datatype:e}),Z()}
4get editing(){return this.$$.ctx[17]}set editing(e){this.$$set({editing:e}),Z()}get max_chars(){return this.$$.ctx[18]}set max_chars(e){this.$$set({max_chars:e}),Z()}get root(){return this.$$.ctx[19]}set root(e){this.$$set({root:e}),Z()}get editable(){return this.$$.ctx[20]}set editable(e){this.$$set({editable:e}),Z()}get is_static(){return this.$$.ctx[21]}set is_static(e){this.$$set({is_static:e}),Z()}get i18n(){return this.$$.ctx[22]}set i18n(e){this.$$set({i18n:e}),Z()}get components(){return this.$$.ctx[23]}set components(e){this.$$set({components:e}),Z()}get el(){return this.$$.ctx[2]}set el(e){this.$$set({el:e}),Z()}get handle_select_column(){return this.$$.ctx[24]}set handle_select_column(e){this.$$set({handle_select_column:e}),Z()}get handle_select_row(){return this.$$.ctx[25]}set handle_select_row(e){this.$$set({handle_select_row:e}),Z()}get is_dragging(){return this.$$.ctx[26]}set is_dragging(e){this.$$set({is_dragging:e}),Z()}get display_value(){return this.$$.ctx[27]}set display_value(e){this.$$set({display_value:e}),Z()}get wrap(){return this.$$.ctx[28]}set wrap(e){this.$$set({wrap:e}),Z()}}const{SvelteComponent:J_,attr:bi,detach:Y_,element:X_,flush:G_,init:Q_,insert:Z_,is_function:$_,listen:x_,noop:wi,safe_not_equal:ea}=window.__gradio__svelte__internal;function ta(n){let e,t,l;return{c(){e=X_("button"),e.textContent="+",bi(e,"class","add-row-button svelte-jkwuz7"),bi(e,"aria-label","Add row")},m(i,s){Z_(i,e,s),t||(l=x_(e,"click",function(){$_(n[0])&&n[0].apply(this,arguments)}),t=!0)},p(i,[s]){n=i},i:wi,o:wi,d(i){i&&Y_(e),t=!1,l()}}}function na(n,e,t){let{on_click:l}=e;return n.$$set=i=>{"on_click"in i&&t(0,l=i.on_click)},[l]}class la extends J_{constructor(e){super(),Q_(this,e,na,ta,ea,{on_click:0})}get on_click(){return this.$$.ctx[0]}set on_click(e){this.$$set({on_click:e}),G_()}}const{ResizeObserverSingleton:ia,SvelteComponent:sa,add_iframe_resize_listener:ki,add_render_callback:pi,append:Ct,attr:mn,binding_callbacks:vi,check_outros:ys,create_slot:nl,detach:En,element:zt,empty:Cs,ensure_array_like:yi,flush:nt,get_all_dirty_from_scope:ll,get_slot_changes:il,group_outros:Ss,init:oa,insert:An,listen:ra,outro_and_destroy_block:_a,resize_observer_content_box:aa,safe_not_equal:ua,set_style:Fe,space:Ci,text:ca,toggle_class:Si,transition_in:Et,transition_out:Tt,update_keyed_each:fa,update_slot_base:sl}=window.__gradio__svelte__internal,{onMount:ha,tick:Ft,createEventDispatcher:da}=window.__gradio__svelte__internal,ma=n=>({}),qi=n=>({});function Mi(n,e,t){const l=n.slice();return l[39]=e[t],l}const ga=n=>({item:n[0]&1024,index:n[0]&1024}),Ei=n=>({item:n[39].data,index:n[39].index}),ba=n=>({}),Ai=n=>({});function Li(n){let e=[],t=new Map,l,i,s=yi(n[10]);const o=r=>r[39].data[0].id;for(let r=0;r<s.length;r+=1){let u=Mi(n,s,r),c=o(u);t.set(c,e[r]=ji(c,u))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();l=Cs()},m(r,u){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(r,u);An(r,l,u),i=!0},p(r,u){u[0]&4195328&&(s=yi(r[10]),Ss(),e=fa(e,u,o,1,r,s,t,l.parentNode,_a,ji,l,Mi),ys())},i(r){if(!i){for(let u=0;u<s.length;u+=1)Et(e[u]);i=!0}},o(r){for(let u=0;u<e.length;u+=1)Tt(e[u]);i=!1},d(r){r&&En(l);for(let u=0;u<e.length;u+=1)e[u].d(r)}}}function wa(n){let e;return{c(){e=ca(`Missing Table Row
5						`)},m(t,l){An(t,e,l)},d(t){t&&En(e)}}}function ji(n,e){let t,l;const i=e[23].tbody,s=nl(i,e,e[22],Ei),o=s||wa();return{key:n,first:null,c(){t=Cs(),o&&o.c(),this.first=t},m(r,u){An(r,t,u),o&&o.m(r,u),l=!0},p(r,u){e=r,s&&s.p&&(!l||u[0]&4195328)&&sl(s,i,e,e[22],l?il(i,e[22],u,ga):ll(e[22]),Ei)},i(r){l||(Et(o,r),l=!0)},o(r){Tt(o,r),l=!1},d(r){r&&En(t),o&&o.d(r)}}}function ka(n){let e,t,l,i,s,o,r,u,c,_,a,f,v,q;const m=n[23].thead,M=nl(m,n,n[22],Ai);let d=n[10].length&&n[10][0].data.length&&Li(n);const w=n[23].tfoot,k=nl(w,n,n[22],qi);return{c(){e=zt("svelte-virtual-table-viewport"),t=zt("div"),l=zt("table"),i=zt("thead"),M&&M.c(),o=Ci(),r=zt("tbody"),d&&d.c(),u=Ci(),c=zt("tfoot"),k&&k.c(),mn(i,"class","thead svelte-1e98i6s"),pi(()=>n[24].call(i)),mn(r,"class","tbody svelte-1e98i6s"),mn(c,"class","tfoot svelte-1e98i6s"),pi(()=>n[26].call(c)),mn(l,"class","table svelte-1e98i6s"),Fe(l,"height",pa),Fe(l,"--bw-svt-p-top",n[9]+"px"),Fe(l,"--bw-svt-p-bottom",n[5]+"px"),Fe(l,"--bw-svt-head-height",n[7]+"px"),Fe(l,"--bw-svt-foot-height",n[8]+"px"),Fe(l,"--bw-svt-avg-row-height",n[3]+"px"),Fe(l,"--max-height",n[1]+"px"),Si(l,"disable-scroll",n[2])},m(y,C){An(y,e,C),Ct(e,t),Ct(t,l),Ct(l,i),M&&M.m(i,null),s=ki(i,n[24].bind(i)),Ct(l,o),Ct(l,r),d&&d.m(r,null),n[25](r),Ct(l,u),Ct(l,c),k&&k.m(c,null),_=ki(c,n[26].bind(c)),n[27](l),a=aa.observe(l,n[28].bind(l)),f=!0,v||(q=ra(l,"scroll",n[11]),v=!0)},p(y,C){M&&M.p&&(!f||C[0]&4194304)&&sl(M,m,y,y[22],f?il(m,y[22],C,ba):ll(y[22]),Ai),y[10].length&&y[10][0].data.length?d?(d.p(y,C),C[0]&1024&&Et(d,1)):(d=Li(y),d.c(),Et(d,1),d.m(r,null)):d&&(Ss(),Tt(d,1,1,()=>{d=null}),ys()),k&&k.p&&(!f||C[0]&4194304)&&sl(k,w,y,y[22],f?il(w,y[22],C,ma):ll(y[22]),qi),(!f||C[0]&512)&&Fe(l,"--bw-svt-p-top",y[9]+"px"),(!f||C[0]&32)&&Fe(l,"--bw-svt-p-bottom",y[5]+"px"),(!f||C[0]&128)&&Fe(l,"--bw-svt-head-height",y[7]+"px"),(!f||C[0]&256)&&Fe(l,"--bw-svt-foot-height",y[8]+"px"),(!f||C[0]&8)&&Fe(l,"--bw-svt-avg-row-height",y[3]+"px"),(!f||C[0]&2)&&Fe(l,"--max-height",y[1]+"px"),(!f||C[0]&4)&&Si(l,"disable-scroll",
5y[2])},i(y){f||(Et(M,y),Et(d),Et(k,y),f=!0)},o(y){Tt(M,y),Tt(d),Tt(k,y),f=!1},d(y){y&&En(e),M&&M.d(y),s(),d&&d.d(),n[25](null),k&&k.d(y),_(),n[27](null),a(),v=!1,q()}}}let pa="100%";function va(n,e){if(!n)return 0;const t=getComputedStyle(n);return parseInt(t.getPropertyValue(e))}function ya(n,e,t){let l,{$$slots:i={},$$scope:s}=e,{items:o=[]}=e,{max_height:r}=e,{actual_height:u}=e,{table_scrollbar_width:c}=e,{start:_=0}=e,{end:a=20}=e,{selected:f}=e,{disable_scroll:v=!1}=e,{show_scroll_button:q=!1}=e,{viewport:m}=e;const M=da();let d=30,w=0,k,y=0,C=0,L=[],B,z,H=0,F=200,P=[],I;const U=typeof window<"u",ce=U?window.requestAnimationFrame:g=>g();let te=0;async function V(g){if(F===0)return;t(7,y=m.querySelector(".thead")?.getBoundingClientRect().height||0),await Ft();const{scrollTop:se}=m;t(15,c=m.offsetWidth-m.clientWidth),te=H-(se-y);let K=_;for(;te<r&&K<g.length;){let D=z[K-_];D||(t(13,a=K+1),await Ft(),D=z[K-_]);let ye=D?.getBoundingClientRect().height;ye||(ye=d);const le=L[K]=ye;te+=le,K+=1}t(13,a=K);const Ne=g.length-a,R=m.offsetHeight-m.clientHeight;R>0&&(te+=R);let E=L.filter(D=>typeof D=="number");t(3,d=E.reduce((D,ye)=>D+ye,0)/E.length),t(5,w=Ne*d),L.length=g.length,await Ft(),r?te<r?t(14,u=te+2):t(14,u=r):t(14,u=te+1),await Ft()}async function J(g){ce(async()=>{if(typeof g!="number")return;const se=typeof g!="number"?!1:p(g);se!==!0&&(se==="back"&&await fe(g,{behavior:"instant"}),se==="forwards"&&await fe(g,{behavior:"instant"},!0))})}function p(g){const se=z&&z[g-_];if(!se&&g<_)return"back";if(!se&&g>=a-1)return"forwards";const{top:K}=m.getBoundingClientRect(),{top:Ne,bottom:R}=se.getBoundingClientRect();return Ne-K<37?"back":R-K>F?"forwards":!0}async function ze(g){const se=m.scrollTop;t(16,q=se>100),q&&M("scroll_top",se),z=k.children;const K=l.length<_,Ne=va(z[1],"border-top-width"),R=0;K&&await fe(l.length-1,{behavior:"auto"});let E=0;for(let re=0;re<z.length;re+=1)L[_+re]=z[re].getBoundingClientRect().height;let D=0,ye=y+Ne/2,le=[];for(;D<l.length;){const re=L[D]||d;if(le[D]=re,ye+re+R>se){E=D,t(9,H=ye-(y+Ne/2));break}ye+=re,D+=1}for(E=Math.max(0,E);D<l.length;){const re=L[D]||d;if(ye+=re,D+=1,ye>se+F)break}t(12,_=E),t(13,a=D);const yt=l.length-a;a===0&&t(13,a=10),t(3,d=(ye-y)/a);let N=yt*d;for(;D<l.length;)D+=1,L[D]=d;t(5,w=N),isFinite(w)||t(5,w=2e5)}async function fe(g,se,K=!1){await Ft();const Ne=d;let R=g*Ne;K&&(R=R-F+Ne+y);const E=m.offsetHeight-m.clientHeight;E>0&&(R+=E);const D={top:R,behavior:"smooth",...se};m.scrollTo(D)}ha(()=>{z=k.children,t(20,B=!0),V(o)});function Y(){y=this.offsetHeight,t(7,y)}function W(g){vi[g?"unshift":"push"](()=>{k=g,t(6,k)})}function X(){C=this.offsetHeight,t(8,C)}function S(g){vi[g?"unshift":"push"](()=>{m=g,t(0,m)})}function j(){I=ia.entries.get(this)?.contentRect,t(4,I)}return n.$$set=g=>{"items"in g&&t(17,o=g.items),"max_height"in g&&t(1,r=g.max_height),"actual_height"in g&&t(14,u=g.actual_height),"table_scrollbar_width"in g&&t(15,c=g.table_scrollbar_width),"start"in g&&t(12,_=g.start),"end"in g&&t(13,a=g.end),"selected"in g&&t(18,f=g.selected),"disable_scroll"in g&&t(2,v=g.disable_scroll),"show_scroll_button"in g&&t(16,q=g.show_scroll_button),"viewport"in g&&t(0,m=g.viewport),"$$scope"in g&&t(22,s=g.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&16&&(F=I?.height||200),n.$$.dirty[0]&131072&&t(21,l=o),n.$$.dirty[0]&3145728&&B&&ce(()=>V(l)),n.$$.dirty[0]&262144&&J(f),n.$$.dirty[0]&2109450&&t(10,P=U?l.slice(_,a).map((g,se)=>({index:se+_,data:g})):l.slice(0,r/l.length*d+1).map((g,se)=>({index:se+_,data:g})))},[m,r,v,d,I,w,k,y,C,H,P,ze,_,a,u,c,q,o,f,fe,B,l,s,i,Y,W,X,S,j]}class Ca extends sa{constructor(e){super(),oa(this,e,ya,ka,ua,{items:17,max_height:1,actual_height:14,table_scrollbar_width:15,start:12,end:13,selected:18,disable_scroll:2,show_scroll_button:16,viewport:0,scroll_to_index:19},null,[-1,-1])}get items(){return this.$$.ctx[17]}set items(e){this.$$set({items:e}),nt()}get max_height(){return this.$$.ctx[1]}set max_height(e){this.$$set({max_height:e}),nt()}get actual_height(){return this.$$.ctx[14]}set actual_height(e){this.$$set({actual_height:e}),nt()}get table_scrollbar_width(){return this.$$.ctx[15]}set table_scrollbar_width(e){this.$$set({table_scrollbar_width:e}),nt()}get start(){return this.$$.ctx[12]}set start(e){this.$$set({start:e}),nt()}get end(){return this.$$.ctx[13]}set end(e){this.$$set({end:e}),nt()}get selected(){return this.$$.ctx[18]}set selected(e){this.$$set({selected:e}),nt()}get disable_scroll(){return this.$$.ctx[2]}set disable_scroll(e){this.$$set({disable_scroll:e}),nt()}get show_scroll_button(){return this.$$.ctx[16]}set show_scroll_button(e){this.$$set({show_scroll_button:e}),nt()}get viewport(){return this.$$.ctx[0]}set viewport(e){this.$$set({viewport:e}),nt()}get scroll_to_index(){return this.$$.ctx[19]}}const{SvelteComponent:Sa,append:de,attr:b,detach:it,empty:qa,flush:Ma,init:Ea,insert:st,noop:Bi,safe_not_equal:Aa,svg_element:G}=window.__gradio__svelte__internal;function La(n){let e,t,l,i,s,o;return{c(){e=G("svg"),t=G("path"),l=G("path"),i=G("path"),s=G("path"),o=G("path"),b(t,"d","M5 5H19"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(t,"stroke-linecap","round"),b(l,"d","M5 9H15"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"stroke-linecap","round"),b(i,"d","M5 13H11"),b(i,"stroke","currentColor"),b(i,"stroke-width","2"),b(i,"stroke-linecap","round"),b(s,"d","M5 17H7"),b(s,"stroke","currentColor"),b(s,"stroke-width","2"),b(s,"stroke-linecap","round"),b(o,"d","M17 17L21 21M21 17L17 21"),b(o,"stroke","currentColor"),b(o,"stroke-width","2"),b(o,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")}
5,m(r,u){st(r,e,u),de(e,t),de(e,l),de(e,i),de(e,s),de(e,o)},d(r){r&&it(e)}}}function ja(n){let e,t,l,i;return{c(){e=G("svg"),t=G("path"),l=G("path"),i=G("path"),b(t,"d","M8 12L12 16L16 12"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(t,"fill","none"),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(l,"d","M12 16V9"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"stroke-linecap","round"),b(i,"d","M5 5H19"),b(i,"stroke","currentColor"),b(i,"stroke-width","2"),b(i,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(s,o){st(s,e,o),de(e,t),de(e,l),de(e,i)},d(s){s&&it(e)}}}function Ba(n){let e,t,l,i;return{c(){e=G("svg"),t=G("path"),l=G("path"),i=G("path"),b(t,"d","M8 16L12 12L16 16"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(t,"fill","none"),b(t,"stroke-linecap","round"),b(t,"stroke-linejoin","round"),b(l,"d","M12 12V19"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"stroke-linecap","round"),b(i,"d","M5 7H19"),b(i,"stroke","currentColor"),b(i,"stroke-width","2"),b(i,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(s,o){st(s,e,o),de(e,t),de(e,l),de(e,i)},d(s){s&&it(e)}}}function za(n){let e,t,l;return{c(){e=G("svg"),t=G("rect"),l=G("path"),b(t,"x","10"),b(t,"y","5"),b(t,"width","4"),b(t,"height","14"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(l,"d","M7 8L17 16M17 8L7 16"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(i,s){st(i,e,s),de(e,t),de(e,l)},d(i){i&&it(e)}}}function Da(n){let e,t,l;return{c(){e=G("svg"),t=G("rect"),l=G("path"),b(t,"x","5"),b(t,"y","10"),b(t,"width","14"),b(t,"height","4"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(l,"d","M8 7L16 17M16 7L8 17"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(i,s){st(i,e,s),de(e,t),de(e,l)},d(i){i&&it(e)}}}function Ta(n){let e,t,l;return{c(){e=G("svg"),t=G("rect"),l=G("path"),b(t,"x","6"),b(t,"y","4"),b(t,"width","12"),b(t,"height","4"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(l,"d","M12 12V19M8 16L12 19L16 16"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"fill","none"),b(l,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(i,s){st(i,e,s),de(e,t),de(e,l)},d(i){i&&it(e)}}}function Ha(n){let e,t,l;return{c(){e=G("svg"),t=G("rect"),l=G("path"),b(t,"x","6"),b(t,"y","16"),b(t,"width","12"),b(t,"height","4"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(l,"d","M12 12V5M8 8L12 5L16 8"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"fill","none"),b(l,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(i,s){st(i,e,s),de(e,t),de(e,l)},d(i){i&&it(e)}}}function Ra(n){let e,t,l;return{c(){e=G("svg"),t=G("rect"),l=G("path"),b(t,"x","16"),b(t,"y","6"),b(t,"width","4"),b(t,"height","12"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(t,"fill","none"),b(l,"d","M12 12H5M8 8L5 12L8 16"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"fill","none"),b(l,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(i,s){st(i,e,s),de(e,t),de(e,l)},d(i){i&&it(e)}}}function Na(n){let e,t,l;return{c(){e=G("svg"),t=G("rect"),l=G("path"),b(t,"x","4"),b(t,"y","6"),b(t,"width","4"),b(t,"height","12"),b(t,"stroke","currentColor"),b(t,"stroke-width","2"),b(t,"fill","none"),b(l,"d","M12 12H19M16 8L19 12L16 16"),b(l,"stroke","currentColor"),b(l,"stroke-width","2"),b(l,"fill","none"),b(l,"stroke-linecap","round"),b(e,"viewBox","0 0 24 24"),b(e,"width","16"),b(e,"height","16")},m(i,s){st(i,e,s),de(e,t),de(e,l)},d(i){i&&it(e)}}}function Pa(n){let e;function t(s,o){if(s[0]=="add-column-right")return Na;if(s[0]=="add-column-left")return Ra;if(s[0]=="add-row-above")return Ha;if(s[0]=="add-row-below")return Ta;if(s[0]=="delete-row")return Da;if(s[0]=="delete-column")return za;if(s[0]=="sort-asc")return Ba;if(s[0]=="sort-desc")return ja;if(s[0]=="clear-sort")return La}let l=t(n),i=l&&l(n);return{c(){i&&i.c(),e=qa()},m(s,o){i&&i.m(s,o),st(s,e,o)},p(s,[o]){l!==(l=t(s))&&(i&&i.d(1),i=l&&l(s),i&&(i.c(),i.m(e.parentNode,e)))},i:Bi,o:Bi,d(s){s&&it(e),i&&i.d(s)}}}function Fa(n,e,t){let{icon:l}=e;return n.$$set=i=>{"icon"in i&&t(0,l=i.icon)},[l]}class dt extends Sa{constructor(e){super(),Ea(this,e,Fa,Pa,Aa,{icon:0})}get icon(){return this.$$.ctx[0]}set icon(e){this.$$set({icon:e}),Ma()}}const{SvelteComponent:Ia,append:ae,attr:ee,binding_callbacks:Oa,check_outros:Kt,create_component:mt,destroy_component:gt,detach:pe,element:Ze,empty:qs,flush:Ce,group_outros:Vt,init:Ka,insert:ve,is_function:kl,listen:bt,mount_component:wt,run_all:pl,safe_not_equal:Va,set_data:et,space:qe,text:tt,toggle_class:gn,transition_in:_e,transition_out:Me}=window.__gradio__svelte__internal,{onMount:Ua}=window.__gradio__svelte__internal;function zi(n){let e,t,l,i=n[12]("dataframe.sort_ascending")+"",s,o,r,u,c,_,a=n[12]("dataframe.sort_descending")+"",f,v,q,m,M,d,w=n[12]("dataframe.clear_sort")+"",k,y,C,L;
5t=new dt({props:{icon:"sort-asc"}});let B=n[10]==="asc"&&n[11]!==null&&Di(n);c=new dt({props:{icon:"sort-desc"}});let z=n[10]==="desc"&&n[11]!==null&&Ti(n);return M=new dt({props:{icon:"clear-sort"}}),{c(){e=Ze("button"),mt(t.$$.fragment),l=qe(),s=tt(i),o=qe(),B&&B.c(),r=qe(),u=Ze("button"),mt(c.$$.fragment),_=qe(),f=tt(a),v=qe(),z&&z.c(),q=qe(),m=Ze("button"),mt(M.$$.fragment),d=qe(),k=tt(w),ee(e,"role","menuitem"),ee(e,"class","svelte-42thj4"),gn(e,"active",n[10]==="asc"),ee(u,"role","menuitem"),ee(u,"class","svelte-42thj4"),gn(u,"active",n[10]==="desc"),ee(m,"role","menuitem"),ee(m,"class","svelte-42thj4")},m(H,F){ve(H,e,F),wt(t,e,null),ae(e,l),ae(e,s),ae(e,o),B&&B.m(e,null),ve(H,r,F),ve(H,u,F),wt(c,u,null),ae(u,_),ae(u,f),ae(u,v),z&&z.m(u,null),ve(H,q,F),ve(H,m,F),wt(M,m,null),ae(m,d),ae(m,k),y=!0,C||(L=[bt(e,"click",n[23]),bt(u,"click",n[24]),bt(m,"click",function(){kl(n[9])&&n[9].apply(this,arguments)})],C=!0)},p(H,F){n=H,(!y||F&4096)&&i!==(i=n[12]("dataframe.sort_ascending")+"")&&et(s,i),n[10]==="asc"&&n[11]!==null?B?B.p(n,F):(B=Di(n),B.c(),B.m(e,null)):B&&(B.d(1),B=null),(!y||F&1024)&&gn(e,"active",n[10]==="asc"),(!y||F&4096)&&a!==(a=n[12]("dataframe.sort_descending")+"")&&et(f,a),n[10]==="desc"&&n[11]!==null?z?z.p(n,F):(z=Ti(n),z.c(),z.m(u,null)):z&&(z.d(1),z=null),(!y||F&1024)&&gn(u,"active",n[10]==="desc"),(!y||F&4096)&&w!==(w=n[12]("dataframe.clear_sort")+"")&&et(k,w)},i(H){y||(_e(t.$$.fragment,H),_e(c.$$.fragment,H),_e(M.$$.fragment,H),y=!0)},o(H){Me(t.$$.fragment,H),Me(c.$$.fragment,H),Me(M.$$.fragment,H),y=!1},d(H){H&&(pe(e),pe(r),pe(u),pe(q),pe(m)),gt(t),B&&B.d(),gt(c),z&&z.d(),gt(M),C=!1,pl(L)}}}function Di(n){let e,t;return{c(){e=Ze("span"),t=tt(n[11]),ee(e,"class","priority svelte-42thj4")},m(l,i){ve(l,e,i),ae(e,t)},p(l,i){i&2048&&et(t,l[11])},d(l){l&&pe(e)}}}function Ti(n){let e,t;return{c(){e=Ze("span"),t=tt(n[11]),ee(e,"class","priority svelte-42thj4")},m(l,i){ve(l,e,i),ae(e,t)},p(l,i){i&2048&&et(t,l[11])},d(l){l&&pe(e)}}}function Hi(n){let e,t,l,i=n[12]("dataframe.add_row_above")+"",s,o,r,u,c,_=n[12]("dataframe.add_row_below")+"",a,f,v,q,m,M;t=new dt({props:{icon:"add-row-above"}}),u=new dt({props:{icon:"add-row-below"}});let d=n[6]&&Ri(n);return{c(){e=Ze("button"),mt(t.$$.fragment),l=qe(),s=tt(i),o=qe(),r=Ze("button"),mt(u.$$.fragment),c=qe(),a=tt(_),f=qe(),d&&d.c(),v=qs(),ee(e,"role","menuitem"),ee(e,"aria-label","Add row above"),ee(e,"class","svelte-42thj4"),ee(r,"role","menuitem"),ee(r,"aria-label","Add row below"),ee(r,"class","svelte-42thj4")},m(w,k){ve(w,e,k),wt(t,e,null),ae(e,l),ae(e,s),ve(w,o,k),ve(w,r,k),wt(u,r,null),ae(r,c),ae(r,a),ve(w,f,k),d&&d.m(w,k),ve(w,v,k),q=!0,m||(M=[bt(e,"click",n[25]),bt(r,"click",n[26])],m=!0)},p(w,k){(!q||k&4096)&&i!==(i=w[12]("dataframe.add_row_above")+"")&&et(s,i),(!q||k&4096)&&_!==(_=w[12]("dataframe.add_row_below")+"")&&et(a,_),w[6]?d?(d.p(w,k),k&64&&_e(d,1)):(d=Ri(w),d.c(),_e(d,1),d.m(v.parentNode,v)):d&&(Vt(),Me(d,1,1,()=>{d=null}),Kt())},i(w){q||(_e(t.$$.fragment,w),_e(u.$$.fragment,w),_e(d),q=!0)},o(w){Me(t.$$.fragment,w),Me(u.$$.fragment,w),Me(d),q=!1},d(w){w&&(pe(e),pe(o),pe(r),pe(f),pe(v)),gt(t),gt(u),d&&d.d(w),m=!1,pl(M)}}}function Ri(n){let e,t,l,i=n[12]("dataframe.delete_row")+"",s,o,r,u;return t=new dt({props:{icon:"delete-row"}}),{c(){e=Ze("button"),mt(t.$$.fragment),l=qe(),s=tt(i),ee(e,"role","menuitem"),ee(e,"class","delete svelte-42thj4"),ee(e,"aria-label","Delete row")},m(c,_){ve(c,e,_),wt(t,e,null),ae(e,l),ae(e,s),o=!0,r||(u=bt(e,"click",function(){kl(n[4])&&n[4].apply(this,arguments)}),r=!0)},p(c,_){n=c,(!o||_&4096)&&i!==(i=n[12]("dataframe.delete_row")+"")&&et(s,i)},i(c){o||(_e(t.$$.fragment,c),o=!0)},o(c){Me(t.$$.fragment,c),o=!1},d(c){c&&pe(e),gt(t),r=!1,u()}}}function Ni(n){let e,t,l,i=n[12]("dataframe.add_column_left")+"",s,o,r,u,c,_=n[12]("dataframe.add_column_right")+"",a,f,v,q,m,M;t=new dt({props:{icon:"add-column-left"}}),u=new dt({props:{icon:"add-column-right"}});let d=n[7]&&Pi(n);return{c(){e=Ze("button"),mt(t.$$.fragment),l=qe(),s=tt(i),o=qe(),r=Ze("button"),mt(u.$$.fragment),c=qe(),a=tt(_),f=qe(),d&&d.c(),v=qs(),ee(e,"role","menuitem"),ee(e,"aria-label","Add column to the left"),ee(e,"class","svelte-42thj4"),ee(r,"role","menuitem"),ee(r,"aria-label","Add column to the right"),ee(r,"class","svelte-42thj4")}
5,m(w,k){ve(w,e,k),wt(t,e,null),ae(e,l),ae(e,s),ve(w,o,k),ve(w,r,k),wt(u,r,null),ae(r,c),ae(r,a),ve(w,f,k),d&&d.m(w,k),ve(w,v,k),q=!0,m||(M=[bt(e,"click",n[27]),bt(r,"click",n[28])],m=!0)},p(w,k){(!q||k&4096)&&i!==(i=w[12]("dataframe.add_column_left")+"")&&et(s,i),(!q||k&4096)&&_!==(_=w[12]("dataframe.add_column_right")+"")&&et(a,_),w[7]?d?(d.p(w,k),k&128&&_e(d,1)):(d=Pi(w),d.c(),_e(d,1),d.m(v.parentNode,v)):d&&(Vt(),Me(d,1,1,()=>{d=null}),Kt())},i(w){q||(_e(t.$$.fragment,w),_e(u.$$.fragment,w),_e(d),q=!0)},o(w){Me(t.$$.fragment,w),Me(u.$$.fragment,w),Me(d),q=!1},d(w){w&&(pe(e),pe(o),pe(r),pe(f),pe(v)),gt(t),gt(u),d&&d.d(w),m=!1,pl(M)}}}function Pi(n){let e,t,l,i=n[12]("dataframe.delete_column")+"",s,o,r,u;return t=new dt({props:{icon:"delete-column"}}),{c(){e=Ze("button"),mt(t.$$.fragment),l=qe(),s=tt(i),ee(e,"role","menuitem"),ee(e,"class","delete svelte-42thj4"),ee(e,"aria-label","Delete column")},m(c,_){ve(c,e,_),wt(t,e,null),ae(e,l),ae(e,s),o=!0,r||(u=bt(e,"click",function(){kl(n[5])&&n[5].apply(this,arguments)}),r=!0)},p(c,_){n=c,(!o||_&4096)&&i!==(i=n[12]("dataframe.delete_column")+"")&&et(s,i)},i(c){o||(_e(t.$$.fragment,c),o=!0)},o(c){Me(t.$$.fragment,c),o=!1},d(c){c&&pe(e),gt(t),r=!1,u()}}}function Wa(n){let e,t,l,i,s=n[16]&&zi(n),o=!n[16]&&n[15]&&Hi(n),r=n[14]&&Ni(n);return{c(){e=Ze("div"),s&&s.c(),t=qe(),o&&o.c(),l=qe(),r&&r.c(),ee(e,"class","cell-menu svelte-42thj4"),ee(e,"role","menu")},m(u,c){ve(u,e,c),s&&s.m(e,null),ae(e,t),o&&o.m(e,null),ae(e,l),r&&r.m(e,null),n[29](e),i=!0},p(u,[c]){u[16]?s?(s.p(u,c),c&65536&&_e(s,1)):(s=zi(u),s.c(),_e(s,1),s.m(e,t)):s&&(Vt(),Me(s,1,1,()=>{s=null}),Kt()),!u[16]&&u[15]?o?(o.p(u,c),c&98304&&_e(o,1)):(o=Hi(u),o.c(),_e(o,1),o.m(e,l)):o&&(Vt(),Me(o,1,1,()=>{o=null}),Kt()),u[14]?r?(r.p(u,c),c&16384&&_e(r,1)):(r=Ni(u),r.c(),_e(r,1),r.m(e,null)):r&&(Vt(),Me(r,1,1,()=>{r=null}),Kt())},i(u){i||(_e(s),_e(o),_e(r),i=!0)},o(u){Me(s),Me(o),Me(r),i=!1},d(u){u&&pe(e),s&&s.d(),o&&o.d(),r&&r.d(),n[29](null)}}}function Ja(n,e,t){let l,i,s,{x:o}=e,{y:r}=e,{on_add_row_above:u}=e,{on_add_row_below:c}=e,{on_add_column_left:_}=e,{on_add_column_right:a}=e,{row:f}=e,{col_count:v}=e,{row_count:q}=e,{on_delete_row:m}=e,{on_delete_col:M}=e,{can_delete_rows:d}=e,{can_delete_cols:w}=e,{on_sort:k=()=>{}}=e,{on_clear_sort:y=()=>{}}=e,{sort_direction:C=null}=e,{sort_priority:L=null}=e,{editable:B=!0}=e,{i18n:z}=e,H;Ua(()=>{F()});function F(){if(!H)return;const p=window.innerWidth,ze=window.innerHeight,fe=H.getBoundingClientRect();let Y=o-30,W=r-20;Y+fe.width>p&&(Y=o-fe.width+10),W+fe.height>ze&&(W=r-fe.height+10),t(13,H.style.left=`${Y}px`,H),t(13,H.style.top=`${W}px`,H)}const P=()=>k("asc"),I=()=>k("desc"),U=()=>u(),ce=()=>c(),te=()=>_(),V=()=>a();function J(p){Oa[p?"unshift":"push"](()=>{H=p,t(13,H)})}return n.$$set=p=>{"x"in p&&t(17,o=p.x),"y"in p&&t(18,r=p.y),"on_add_row_above"in p&&t(0,u=p.on_add_row_above),"on_add_row_below"in p&&t(1,c=p.on_add_row_below),"on_add_column_left"in p&&t(2,_=p.on_add_column_left),"on_add_column_right"in p&&t(3,a=p.on_add_column_right),"row"in p&&t(19,f=p.row),"col_count"in p&&t(20,v=p.col_count),"row_count"in p&&t(21,q=p.row_count),"on_delete_row"in p&&t(4,m=p.on_delete_row),"on_delete_col"in p&&t(5,M=p.on_delete_col),"can_delete_rows"in p&&t(6,d=p.can_delete_rows),"can_delete_cols"in p&&t(7,w=p.can_delete_cols),"on_sort"in p&&t(8,k=p.on_sort),"on_clear_sort"in p&&t(9,y=p.on_clear_sort),"sort_direction"in p&&t(10,C=p.sort_direction),"sort_priority"in p&&t(11,L=p.sort_priority),"editable"in p&&t(22,B=p.editable),"i18n"in p&&t(12,z=p.i18n)},n.$$.update=()=>{n.$$.dirty&524288&&t(16,l=f===-1),n.$$.dirty&6291456&&t(15,i=B&&q[1]==="dynamic"),n.$$.dirty&5242880&&t(14,s=B&&v[1]==="dynamic")},[u,c,_,a,m,M,d,w,k,y,C,L,z,H,s,i,l,o,r,f,v,q,B,P,I,U,ce,te,V,J]}class Ya extends Ia{constructor(e){super(),Ka(this,e,Ja,Wa,Va,{x:17,y:18,on_add_row_above:0,on_add_row_below:1,on_add_column_left:2,on_add_column_right:3,row:19,col_count:20,row_count:21,on_delete_row:4,on_delete_col:5,can_delete_rows:6,can_delete_cols:7,on_sort:8,on_clear_sort:9,sort_direction:10,sort_priority:11,editable:22,i18n:12})}get x(){return this.$$.ctx[17]}set x(e){this.$$set({x:e}),Ce()}get y(){return this.$$.ctx[18]}set y(e){this.$$set({y:e}),Ce()}get on_add_row_above(){return this.$$.ctx[0]}set on_add_row_above(e){this.$$set({on_add_row_above:e}),Ce()}get on_add_row_below(){return this.$$.ctx[1]}set on_add_row_below(e){this.$$set({on_add_row_below:e}),Ce()}get on_add_column_left(){return this.$$.ctx[2]}set on_add_column_left(e){this.$$set({on_add_column_left:e}),Ce()}get on_add_column_right(){return this.$$.ctx[3]}set on_add_column_right(e){this.$$set({on_add_column_right:e}),Ce()}get row(){return this.$$.ctx[19]}set row(e){this.$$set({row:e}),Ce()}get col_count(){return this.$$.ctx[20]}set col_count(e){this.$$set({col_count:e}),Ce()}get row_count(){return this.$$.ctx[21]}set row_count(e){this.$$set({row_count:e}),Ce()}get on_delete_row(){return this.$$.ctx[4]}set on_delete_row(e){this.$$set({on_delete_row:e}),Ce()}get on_delete_col(){return this.$$.ctx[5]}set on_delete_col(e){this.$$set({on_delete_col:e}),Ce()}get can_delete_rows(){return this.$$.ctx[6]}set can_delete_rows(e){this.$$set({can_delete_rows:e}),Ce()}get can_delete_cols(){return this.$$.ctx[7]}set can_delete_cols(e){this.$$set({can_delete_cols:e}),Ce()}get on_sort(){return this.$$.ctx[8]}set on_sort(e){this.$$set({on_sort:e}),Ce()}get on_clear_sort(){return this.$$.ctx[9]}set on_clear_sort(e){this.$$set({on_clear_sort:e}),Ce()}get sort_direction(){return this.$$.ctx[10]}set sort_direction(e){this.$$set({sort_direction:e}),Ce()}get sort_priority(){return this.$$.ctx[11]}set sort_priority(e){this.$$set({sort_priority:e}),Ce()}get editable(){return this.$$.ctx[22]}set editable(e){this.$$set({editable:e}),Ce()}get i18n(){return this.$$.ctx[12]}set i18n(e){this.$$set({i18n:e}),Ce()}}const{SvelteComponent:Xa,append:Ut,attr:ue,bubble:Ga,check_outros:Ht,create_component:Zt,destroy_component:$t,detach:xt,element:Lt,flush:St,group_outros:Rt,init:Qa,insert:en,is_function:Za,listen:Ln,mount_component:tn,safe_not_equal:$a,space:ol,toggle_class:Fi,transition_in:be,transition_out:Le}=window.__gradio__svelte__internal,{onDestroy:xa}=window.__gradio__svelte__internal,{createEventDispatcher:eu}=window.__gradio__svelte__internal;function Ii(n){let e,t,l,i,s,o,r,u,c,_=n[0]&&n[3]==="filter"&&Oi(n);return{c(){e=Lt("div"),t=Lt("input"),o=ol(),_&&_.c(),ue(t,"type","text"),t.value=l=n[0]||"",ue(t,"placeholder",i=n[3]==="filter"?"Filter...":"Search..."),ue(t,"class","search-input svelte-b1nr0g"),ue(t,"title",s=`Enter text to ${n[3]} the table`),Fi(t,"filter-mode",n[3]==="filter"),ue(e,"class","search-container svelte-b1nr0g")},m(a,f){en(a,e,f),Ut(e,t),Ut(e,o),_&&_.m(e,null),r=!0,u||(c=Ln(t,"input",n[7]),u=!0)}
5,p(a,f){(!r||f&1&&l!==(l=a[0]||"")&&t.value!==l)&&(t.value=l),(!r||f&8&&i!==(i=a[3]==="filter"?"Filter...":"Search..."))&&ue(t,"placeholder",i),(!r||f&8&&s!==(s=`Enter text to ${a[3]} the table`))&&ue(t,"title",s),(!r||f&8)&&Fi(t,"filter-mode",a[3]==="filter"),a[0]&&a[3]==="filter"?_?(_.p(a,f),f&9&&be(_,1)):(_=Oi(a),_.c(),be(_,1),_.m(e,null)):_&&(Rt(),Le(_,1,1,()=>{_=null}),Ht())},i(a){r||(be(_),r=!0)},o(a){Le(_),r=!1},d(a){a&&xt(e),_&&_.d(),u=!1,c()}}}function Oi(n){let e,t,l,i,s;return t=new cs({}),{c(){e=Lt("button"),Zt(t.$$.fragment),ue(e,"class","toolbar-button check-button svelte-b1nr0g"),ue(e,"aria-label","Apply filter and update dataframe values"),ue(e,"title","Apply filter and update dataframe values")},m(o,r){en(o,e,r),tn(t,e,null),l=!0,i||(s=Ln(e,"click",function(){Za(n[5])&&n[5].apply(this,arguments)}),i=!0)},p(o,r){n=o},i(o){l||(be(t.$$.fragment,o),l=!0)},o(o){Le(t.$$.fragment,o),l=!1},d(o){o&&xt(e),$t(t),i=!1,s()}}}function Ki(n){let e,t,l,i,s,o,r,u;const c=[nu,tu],_=[];function a(f,v){return f[6]?0:1}return t=a(n),l=_[t]=c[t](n),{c(){e=Lt("button"),l.c(),ue(e,"class","toolbar-button svelte-b1nr0g"),ue(e,"aria-label",i=n[6]?"Copied to clipboard":"Copy table data"),ue(e,"title",s=n[6]?"Copied to clipboard":"Copy table data")},m(f,v){en(f,e,v),_[t].m(e,null),o=!0,r||(u=Ln(e,"click",n[8]),r=!0)},p(f,v){let q=t;t=a(f),t!==q&&(Rt(),Le(_[q],1,1,()=>{_[q]=null}),Ht(),l=_[t],l||(l=_[t]=c[t](f),l.c()),be(l,1),l.m(e,null)),(!o||v&64&&i!==(i=f[6]?"Copied to clipboard":"Copy table data"))&&ue(e,"aria-label",i),(!o||v&64&&s!==(s=f[6]?"Copied to clipboard":"Copy table data"))&&ue(e,"title",s)},i(f){o||(be(l),o=!0)},o(f){Le(l),o=!1},d(f){f&&xt(e),_[t].d(),r=!1,u()}}}function tu(n){let e,t;return e=new Ao({}),{c(){Zt(e.$$.fragment)},m(l,i){tn(e,l,i),t=!0},i(l){t||(be(e.$$.fragment,l),t=!0)},o(l){Le(e.$$.fragment,l),t=!1},d(l){$t(e,l)}}}function nu(n){let e,t;return e=new cs({}),{c(){Zt(e.$$.fragment)},m(l,i){tn(e,l,i),t=!0},i(l){t||(be(e.$$.fragment,l),t=!0)},o(l){Le(e.$$.fragment,l),t=!1},d(l){$t(e,l)}}}function Vi(n){let e,t,l,i,s,o,r,u;const c=[iu,lu],_=[];function a(f,v){return f[4]?0:1}return t=a(n),l=_[t]=c[t](n),{c(){e=Lt("button"),l.c(),ue(e,"class","toolbar-button svelte-b1nr0g"),ue(e,"aria-label",i=n[4]?"Exit fullscreen":"Enter fullscreen"),ue(e,"title",s=n[4]?"Exit fullscreen":"Enter fullscreen")},m(f,v){en(f,e,v),_[t].m(e,null),o=!0,r||(u=Ln(e,"click",n[10]),r=!0)},p(f,v){let q=t;t=a(f),t!==q&&(Rt(),Le(_[q],1,1,()=>{_[q]=null}),Ht(),l=_[t],l||(l=_[t]=c[t](f),l.c()),be(l,1),l.m(e,null)),(!o||v&16&&i!==(i=f[4]?"Exit fullscreen":"Enter fullscreen"))&&ue(e,"aria-label",i),(!o||v&16&&s!==(s=f[4]?"Exit fullscreen":"Enter fullscreen"))&&ue(e,"title",s)},i(f){o||(be(l),o=!0)},o(f){Le(l),o=!1},d(f){f&&xt(e),_[t].d(),r=!1,u()}}}function lu(n){let e,t;return e=new Lo({}),{c(){Zt(e.$$.fragment)},m(l,i){tn(e,l,i),t=!0},i(l){t||(be(e.$$.fragment,l),t=!0)},o(l){Le(e.$$.fragment,l),t=!1},d(l){$t(e,l)}}}function iu(n){let e,t;return e=new jo({}),{c(){Zt(e.$$.fragment)},m(l,i){tn(e,l,i),t=!0},i(l){t||(be(e.$$.fragment,l),t=!0)},o(l){Le(e.$$.fragment,l),t=!1},d(l){$t(e,l)}}}function su(n){let e,t,l,i,s,o=n[3]!=="none"&&Ii(n),r=n[2]&&Ki(n),u=n[1]&&Vi(n);return{c(){e=Lt("div"),t=Lt("div"),o&&o.c(),l=ol(),r&&r.c(),i=ol(),u&&u.c(),ue(t,"class","toolbar-buttons svelte-b1nr0g"),ue(e,"class","toolbar svelte-b1nr0g"),ue(e,"role","toolbar"),ue(e,"aria-label","Table actions")},m(c,_){en(c,e,_),Ut(e,t),o&&o.m(t,null),Ut(t,l),r&&r.m(t,null),Ut(t,i),u&&u.m(t,null),s=!0},p(c,[_]){c[3]!=="none"?o?(o.p(c,_),_&8&&be(o,1)):(o=Ii(c),o.c(),be(o,1),o.m(t,l)):o&&(Rt(),Le(o,1,1,()=>{o=null}),Ht()),c[2]?r?(r.p(c,_),_&4&&be(r,1)):(r=Ki(c),r.c(),be(r,1),r.m(t,i)):r&&(Rt(),Le(r,1,1,()=>{r=null}),Ht()),c[1]?u?(u.p(c,_),_&2&&be(u,1)):(u=Vi(c),u.c(),be(u,1),u.m(t,null)):u&&(Rt(),Le(u,1,1,()=>{u=null}),Ht())},i(c){s||(be(o),be(r),be(u),s=!0)},o(c){Le(o),Le(r),Le(u),s=!1},d(c){c&&xt(e),o&&o.d(),r&&r.d(),u&&u.d()}}}function ou(n,e,t){let{show_fullscreen_button:l=!1}=e,{show_copy_button:i=!1}=e,{show_search:s="none"}=e,{is_fullscreen:o=!1}=e,{on_copy:r}=e,{on_commit_filter:u}=e;const c=eu();let _=!1,a,{current_search_query:f=null}=e,v="";function q(w){v=w.target.value;const y=v||null;f!==y&&(t(0,f=y),c("search",f))}function m(){t(6,_=!0),a&&clearTimeout(a),a=setTimeout(()=>{t(6,_=!1)},2e3)}async function M(){await r(),m()}xa(()=>{a&&clearTimeout(a)});function d(w){Ga.call(this,n,w)}return n.$$set=w=>{"show_fullscreen_button"in w&&t(1,l=w.show_fullscreen_button),"show_copy_button"in w&&t(2,i=w.show_copy_button),"show_search"in w&&t(3,s=w.show_search),"is_fullscreen"in w&&t(4,o=w.is_fullscreen),"on_copy"in w&&t(9,r=w.on_copy),"on_commit_filter"in w&&t(5,u=w.on_commit_filter),"current_search_query"in w&&t(0,f=w.current_search_query)},[f,l,i,s,o,u,_,q,M,r,d]}class ru extends Xa{constructor(e){super(),Qa(this,e,ou,su,$a,{show_fullscreen_button:1,show_copy_button:2,show_search:3,is_fullscreen:4,on_copy:9,on_commit_filter:5,current_search_query:0})}get show_fullscreen_button(){return this.$$.ctx[1]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),St()}get show_copy_button(){return this.$$.ctx[2]}set show_copy_button(e){this.$$set({show_copy_button:e}),St()}get show_search(){return this.$$.ctx[3]}set show_search(e){this.$$set({show_search:e}),St()}get is_fullscreen(){return this.$$.ctx[4]}set is_fullscreen(e){this.$$set({is_fullscreen:e}),St()}get on_copy(){return this.$$.ctx[9]}set on_copy(e){this.$$set({on_copy:e}),St()}get on_commit_filter(){return this.$$.ctx[5]}set on_commit_filter(e){this.$$set({on_commit_filter:e}),St()}get current_search_query(){return this.$$.ctx[0]}set current_search_query(e){this.$$set({current_search_query:e}),St()}}function bn(n,e,t,l){let i=n||[];if(e[1]==="fixed"&&i.length<e[0]){const s=Array(e[0]-i.length).fill("").map((o,r)=>
5`${r+i.length}`);i=i.concat(s)}return!i||i.length===0?Array(e[0]).fill(0).map((s,o)=>{const r=l();return t[r]={cell:null,input:null},{id:r,value:JSON.stringify(o+1)}}):i.map((s,o)=>{const r=l();return t[r]={cell:null,input:null},{id:r,value:s??""}})}function _u(n,e,t,l,i=null){return!n||n.length===0?[]:n.map((o,r)=>o.map((u,c)=>{const _=l();e[_]={cell:null,input:null},t[_]=u;let a=i?.[r]?.[c];return a===void 0&&(a=String(u)),{id:_,value:u,display_value:a}}))}const{tick:au}=window.__gradio__svelte__internal;async function Ms(n,e,t,l){if(!e.data||!e.data[t]||!e.data[t][l])return;const i=e.data[t][l].value;e.data[t][l].value=n,i!==n&&e.dispatch&&e.dispatch("change",{data:e.data.map(s=>s.map(o=>o.value)),headers:e.headers?.map(s=>s.value)||[],metadata:null}),e.actions.set_selected([t,l])}async function uu(n,e,t){if(!e.data||!e.headers||!e.els)return;const l=n.target;!l||l.value===void 0||await Ms(l.value,e,t[0],t[1])}function cu(n,e){const t=Ae(e.state),l=t.ui_state.selected_header,i=t.ui_state.header_edit,s=e.headers||[];if(l===!1||i!==!1)return!1;switch(n.key){case"ArrowDown":return e.actions.set_selected_header(!1),e.actions.set_selected([0,l]),e.actions.set_selected_cells([[0,l]]),!0;case"ArrowLeft":return e.actions.set_selected_header(l>0?l-1:l),!0;case"ArrowRight":return e.actions.set_selected_header(l<s.length-1?l+1:l),!0;case"Escape":return n.preventDefault(),e.actions.set_selected_header(!1),!0;case"Enter":return n.preventDefault(),t.config.editable&&e.actions.set_header_edit(l),!0}return!1}function Es(n,e){if(!e.data||!e.headers||!e.els||!e.dispatch)return!1;const t=Ae(e.state);if(!t.config.editable||n.key!=="Delete"&&n.key!=="Backspace")return!1;const l=t.ui_state.editing,i=t.ui_state.selected_cells;if(l){const[s,o]=l,r=e.els[e.data[s][o].id]?.input;if(r&&r.selectionStart!==r.selectionEnd||n.key==="Delete"&&r?.selectionStart!==r?.value.length||n.key==="Backspace"&&r?.selectionStart!==0)return!1}if(n.preventDefault(),i.length>0){const s=Ko(e.data,i);e.dispatch("change",{data:s.map(o=>o.map(r=>r.value)),headers:e.headers.map(o=>o.value),metadata:null})}return!0}function fu(n,e,t,l){const i=Ae(e.state),s=i.ui_state.editing,o=i.ui_state.selected_cells;if(s||!e.data)return!1;n.preventDefault();const r=e.actions.move_cursor(n,[t,l],e.data);return r?(n.shiftKey?(e.actions.set_selected_cells(e.actions.get_range_selection(o.length>0?o[0]:[t,l],r)),e.actions.set_editing(!1)):(e.actions.set_selected_cells([r]),e.actions.set_editing(!1)),e.actions.set_selected(r)):r===!1&&n.key==="ArrowUp"&&t===0&&(e.actions.set_selected_header(l),e.actions.set_selected(!1),e.actions.set_selected_cells([]),e.actions.set_editing(!1)),!0}async function hu(n,e,t,l){if(!e.data||!e.els)return!1;const i=Ae(e.state);if(!i.config.editable)return!1;n.preventDefault();const s=i.ui_state.editing;if(s&&Ot(s,[t,l])){const o=e.data[t][l].id,r=e.els[o]?.input;r&&await Ms(r.value,e,t,l),e.actions.set_editing(!1)}else e.actions.set_editing([t,l]);return!0}function du(n,e,t,l){if(!e.data)return!1;n.preventDefault(),e.actions.set_editing(!1);const i=e.actions.get_next_cell_coordinates([t,l],e.data,n.shiftKey);return i&&(e.actions.set_selected_cells([i]),e.actions.set_selected(i),Ae(e.state).config.editable&&e.actions.set_editing(i)),!0}function mu(n,e,t,l){const i=Ae(e.state);if(!i.config.editable)return!1;const s=i.ui_state.editing;return(!s||s&&Ot(s,[t,l]))&&n.key.length===1?(e.actions.set_editing([t,l]),!0):!1}async function gu(n,e){if(!e.data)return!1;const t=Ae(e.state),l=t.ui_state.selected,i=t.ui_state.selected_cells;if(!l)return!1;if(n.key==="c"&&(n.metaKey||n.ctrlKey))return n.preventDefault(),i.length>0&&await hs(e.data,i),e.actions.set_copy_flash(!0),!0;const[s,o]=l;switch(n.key){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":return fu(n,e,s,o);case"Escape":return t.config.editable?(n.preventDefault(),e.actions.set_editing(!1),au().then(()=>{e.parent_element&&e.parent_element.focus()}),!0):!1;case"Enter":return await hu(n,e,s,o);case"Tab":return du(n,e,s,o);case"Delete":case"Backspace":return Es(n,e);default:return mu(n,e,s,o)}}async function bu(n,e){cu(n,e)||Es(n,e)||await gu(n,e)}function wu(n,e,t,l,i,s,o){const r=(_,a,f)=>{_.target instanceof HTMLAnchorElement||s&&f===-1||(_.preventDefault(),_.stopPropagation(),n.mouse_down_pos={x:_.clientX,y:_.clientY},n.drag_start=[a,f],!_.shiftKey&&!_.metaKey&&!_.ctrlKey&&(t([[a,f]]),l([a,f]),i(_,a,f)))},u=_=>{const a=_.target.closest("td");if(!a)return;const f=parseInt(a.getAttribute("data-row")||"0"),v=parseInt(a.getAttribute("data-col")||"0");if(isNaN(f)||isNaN(v))return;const q=fl(n.drag_start,[f,v]);t(q),l([f,v])};return{handle_mouse_down:r,handle_mouse_move(_){if(!n.drag_start||!n.mouse_down_pos)return;
5const a=Math.abs(_.clientX-n.mouse_down_pos.x),f=Math.abs(_.clientY-n.mouse_down_pos.y);!n.is_dragging&&(a>3||f>3)&&(n.is_dragging=!0,e(!0)),n.is_dragging&&u(_)},handle_mouse_up:_=>{!n.is_dragging&&n.drag_start?i(_,n.drag_start[0],n.drag_start[1]):n.is_dragging&&o&&o.focus(),n.is_dragging=!1,e(!1),n.drag_start=null,n.mouse_down_pos=null}}}const{SvelteComponent:ku,add_flush_callback:Ge,append:me,attr:he,bind:Qe,binding_callbacks:Re,check_outros:$e,component_subscribe:pu,create_component:Ve,destroy_component:Ue,detach:je,element:Ee,empty:nn,ensure_array_like:vt,flush:x,globals:vu,group_outros:xe,init:yu,insert:Be,is_function:Qn,listen:Dt,mount_component:We,noop:As,outro_and_destroy_block:Cn,run_all:Cu,safe_not_equal:Su,set_data:vl,set_style:Ui,space:Oe,text:yl,toggle_class:pt,transition_in:O,transition_out:Q,update_keyed_each:Sn}=window.__gradio__svelte__internal,{Map:qn,window:qu}=vu,{afterUpdate:Mu,createEventDispatcher:Eu,tick:Au,onMount:Wi}=window.__gradio__svelte__internal;function Ji(n,e,t){const l=n.slice();return l[139]=e[t].value,l[140]=e[t].id,l[143]=e,l[144]=t,l}function Yi(n,e,t){const l=n.slice();return l[139]=e[t].value,l[140]=e[t].id,l[141]=e,l[142]=t,l}function Xi(n,e,t){const l=n.slice();return l[139]=e[t].value,l[140]=e[t].id,l[145]=e,l[142]=t,l}function Gi(n,e,t){const l=n.slice();return l[139]=e[t].value,l[140]=e[t].id,l[146]=e,l[144]=t,l}function Qi(n){let e,t,l,i,s=n[3]&&n[3].length!==0&&n[4]&&Zi(n);return l=new ru({props:{show_fullscreen_button:n[18],is_fullscreen:n[35],on_copy:n[86],show_copy_button:n[19],show_search:n[21],on_commit_filter:n[67],current_search_query:n[32].current_search_query}}),l.$on("click",n[63]),l.$on("search",n[87]),{c(){e=Ee("div"),s&&s.c(),t=Oe(),Ve(l.$$.fragment),he(e,"class","header-row svelte-18s8a4c")},m(o,r){Be(o,e,r),s&&s.m(e,null),me(e,t),We(l,e,null),i=!0},p(o,r){o[3]&&o[3].length!==0&&o[4]?s?s.p(o,r):(s=Zi(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null);const u={};r[0]&262144&&(u.show_fullscreen_button=o[18]),r[1]&16&&(u.is_fullscreen=o[35]),r[0]&33554432&&(u.on_copy=o[86]),r[0]&524288&&(u.show_copy_button=o[19]),r[0]&2097152&&(u.show_search=o[21]),r[1]&2&&(u.current_search_query=o[32].current_search_query),l.$set(u)},i(o){i||(O(l.$$.fragment,o),i=!0)},o(o){Q(l.$$.fragment,o),i=!1},d(o){o&&je(e),s&&s.d(),Ue(l)}}}function Zi(n){let e,t,l;return{c(){e=Ee("div"),t=Ee("p"),l=yl(n[3]),he(t,"class","svelte-18s8a4c"),he(e,"class","label svelte-18s8a4c")},m(i,s){Be(i,e,s),me(e,t),me(t,l)},p(i,s){s[0]&8&&vl(l,i[3])},d(i){i&&je(e)}}}function $i(n){let e,t;return{c(){e=Ee("caption"),t=yl(n[3]),he(e,"class","sr-only svelte-18s8a4c")},m(l,i){Be(l,e,i),me(e,t)},p(l,i){i[0]&8&&vl(t,l[3])},d(l){l&&je(e)}}}function xi(n){let e,t;return e=new Mn({props:{is_header:!0}}),{c(){Ve(e.$$.fragment)},m(l,i){We(e,l,i),t=!0},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){Ue(e,l)}}}function es(n,e){let t,l,i,s,o;function r(_){e[88](_,e[144])}function u(_){e[89](_,e[140])}let c={i:e[144],actual_pinned_columns:e[53],header_edit:e[52],selected_header:e[51],headers:e[0],get_cell_width:Cl,handle_header_click:e[58],toggle_header_menu:e[64],end_header_edit:e[59],sort_columns:e[32].sort_state.sort_columns,latex_delimiters:e[7],line_breaks:e[14],max_chars:e[20],root:e[11],editable:e[9],is_static:e[22].includes(e[144]),i18n:e[12],col_count:e[5]};return e[24][e[144]].value!==void 0&&(c.value=e[24][e[144]].value),e[23][e[140]].input!==void 0&&(c.el=e[23][e[140]].input),l=new ws({props:c}),Re.push(()=>Qe(l,"value",r)),Re.push(()=>Qe(l,"el",u)),{key:n,first:null,c(){t=nn(),Ve(l.$$.fragment),this.first=t},m(_,a){Be(_,t,a),We(l,_,a),o=!0},p(_,a){e=_;const f={};a[0]&16777216&&(f.i=e[144]),a[1]&4194304&&(f.actual_pinned_columns=e[53]),a[1]&2097152&&(f.header_edit=e[52]),a[1]&1048576&&(f.selected_header=e[51]),a[0]&1&&(f.headers=e[0]),a[1]&2&&(f.sort_columns=e[32].sort_state.sort_columns),a[0]&128&&(f.latex_delimiters=e[7]),a[0]&16384&&(f.line_breaks=e[14]),a[0]&1048576&&(f.max_chars=e[20]),a[0]&2048&&(f.root=e[11]),a[0]&512&&(f.editable=e[9]),a[0]&20971520&&(f.is_static=e[22].includes(e[144])),a[0]&4096&&(f.i18n=e[12]),a[0]&32&&(f.col_
5count=e[5]),!i&&a[0]&16777216&&(i=!0,f.value=e[24][e[144]].value,Ge(()=>i=!1)),!s&&a[0]&25165824&&(s=!0,f.el=e[23][e[140]].input,Ge(()=>s=!1)),l.$set(f)},i(_){o||(O(l.$$.fragment,_),o=!0)},o(_){Q(l.$$.fragment,_),o=!1},d(_){_&&je(t),Ue(l,_)}}}function ts(n){let e,t;return e=new Mn({props:{index:0}}),{c(){Ve(e.$$.fragment)},m(l,i){We(e,l,i),t=!0},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){Ue(e,l)}}}function ns(n,e){let t,l,i,s,o=e[142],r;i=new dl({props:{value:e[139],latex_delimiters:e[7],line_breaks:e[14],datatype:Array.isArray(e[2])?e[2][e[142]]:e[2],edit:!1,el:null,root:e[11],editable:e[9],i18n:e[12],show_selection_buttons:e[30].length===1&&e[30][0][0]===0&&e[30][0][1]===e[142],coords:e[39],on_select_column:e[55].handle_select_column,on_select_row:e[55].handle_select_row,is_dragging:e[42]}}),i.$on("blur",e[62]);const u=()=>e[90](t,o),c=()=>e[90](null,o);return{key:n,first:null,c(){t=Ee("td"),l=Ee("div"),Ve(i.$$.fragment),s=Oe(),he(l,"class","cell-wrap svelte-18s8a4c"),he(t,"tabindex","-1"),he(t,"class","svelte-18s8a4c"),this.first=t},m(_,a){Be(_,t,a),me(t,l),We(i,l,null),me(t,s),u(),r=!0},p(_,a){e=_;const f={};a[1]&524288&&(f.value=e[139]),a[0]&128&&(f.latex_delimiters=e[7]),a[0]&16384&&(f.line_breaks=e[14]),a[0]&4|a[1]&524288&&(f.datatype=Array.isArray(e[2])?e[2][e[142]]:e[2]),a[0]&2048&&(f.root=e[11]),a[0]&512&&(f.editable=e[9]),a[0]&4096&&(f.i18n=e[12]),a[0]&1073741824|a[1]&524288&&(f.show_selection_buttons=e[30].length===1&&e[30][0][0]===0&&e[30][0][1]===e[142]),a[1]&256&&(f.coords=e[39]),a[1]&2048&&(f.is_dragging=e[42]),i.$set(f),o!==e[142]&&(c(),o=e[142],u())},i(_){r||(O(i.$$.fragment,_),r=!0)},o(_){Q(i.$$.fragment,_),r=!1},d(_){_&&je(t),Ue(i),c()}}}function ls(n){let e,t;return{c(){e=Ee("caption"),t=yl(n[3]),he(e,"class","sr-only svelte-18s8a4c")},m(l,i){Be(l,e,i),me(e,t)},p(l,i){i[0]&8&&vl(t,l[3])},d(l){l&&je(e)}}}function Lu(n){let e,t=n[3]&&n[3].length!==0&&ls(n);return{c(){t&&t.c(),e=nn()},m(l,i){t&&t.m(l,i),Be(l,e,i)},p(l,i){l[3]&&l[3].length!==0?t?t.p(l,i):(t=ls(l),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(l){l&&je(e),t&&t.d(l)}}}function is(n){let e,t;return e=new Mn({props:{is_header:!0}}),{c(){Ve(e.$$.fragment)},m(l,i){We(e,l,i),t=!0},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){Ue(e,l)}}}function ss(n,e){let t,l,i,s,o;function r(_){e[95](_,e[144])}function u(_){e[96](_,e[140])}let c={i:e[144],actual_pinned_columns:e[53],header_edit:e[52],selected_header:e[51],headers:e[0],get_cell_width:Cl,handle_header_click:e[58],toggle_header_menu:e[64],end_header_edit:e[59],sort_columns:e[32].sort_state.sort_columns,latex_delimiters:e[7],line_breaks:e[14],max_chars:e[20],root:e[11],editable:e[9],is_static:e[22].includes(e[144]),i18n:e[12],col_count:e[5]};return e[24][e[144]].value!==void 0&&(c.value=e[24][e[144]].value),e[23][e[140]].input!==void 0&&(c.el=e[23][e[140]].input),l=new ws({props:c}),Re.push(()=>Qe(l,"value",r)),Re.push(()=>Qe(l,"el",u)),{key:n,first:null,c(){t=nn(),Ve(l.$$.fragment),this.first=t},m(_,a){Be(_,t,a),We(l,_,a),o=!0},p(_,a){e=_;const f={};a[0]&16777216&&(f.i=e[144]),a[1]&4194304&&(f.actual_pinned_columns=e[53]),a[1]&2097152&&(f.header_edit=e[52]),a[1]&1048576&&(f.selected_header=e[51]),a[0]&1&&(f.headers=e[0]),a[1]&2&&(f.sort_columns=e[32].sort_state.sort_columns),a[0]&128&&(f.latex_delimiters=e[7]),a[0]&16384&&(f.line_breaks=e[14]),a[0]&1048576&&(f.max_chars=e[20]),a[0]&2048&&(f.root=e[11]),a[0]&512&&(f.editable=e[9]),a[0]&20971520&&(f.is_static=e[22].includes(e[144])),a[0]&4096&&(f.i18n=e[12]),a[0]&32&&(f.col_count=e[5]),!i&&a[0]&16777216&&(i=!0,f.value=e[24][e[144]].value,Ge(()=>i=!1)),!s&&a[0]&25165824&&(s=!0,f.el=e[23][e[140]].input,Ge(()=>s=!1)),l.$set(f)},i(_){o||(O(l.$$.fragment,_),o=!0)},o(_){Q(l.$$.fragment,_),o=!1},d(_){_&&je(t),Ue(l,_)}}}function ju(n){let e,t,l=[],i=new qn,s,o=n[15]&&is(),r=vt(n[24]);const u=c=>c[140];for(let c=0;c<r.length;c+=1){let _=Ji(n,r,c),a=u(_);i.set(a,l[c]=ss(a,_))}return{c(){e=Ee("tr"),o&&o.c(),t=Oe();for(let c=0;c<l.length;c+=1)l[c].c();he(e,"slot","thead"),he(e,"class","svelte-18s8a4c")},m(c,_){Be(c,e,_),o&&o.m(e,null),me(e,t);for(let a=0;a<l.length;
5a+=1)l[a]&&l[a].m(e,null);s=!0},p(c,_){c[15]?o?_[0]&32768&&O(o,1):(o=is(),o.c(),O(o,1),o.m(e,t)):o&&(xe(),Q(o,1,1,()=>{o=null}),$e()),_[0]&30431905|_[1]&409993218|_[2]&4&&(r=vt(c[24]),xe(),l=Sn(l,_,u,1,c,r,i,e,Cn,ss,null,Ji),$e())},i(c){if(!s){O(o);for(let _=0;_<r.length;_+=1)O(l[_]);s=!0}},o(c){Q(o);for(let _=0;_<l.length;_+=1)Q(l[_]);s=!1},d(c){c&&je(e),o&&o.d();for(let _=0;_<l.length;_+=1)l[_].d()}}}function os(n){let e,t;return e=new Mn({props:{index:n[137]}}),{c(){Ve(e.$$.fragment)},m(l,i){We(e,l,i),t=!0},p(l,i){const s={};i[4]&8192&&(s.index=l[137]),e.$set(s)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){Ue(e,l)}}}function rs(n,e){let t,l,i,s,o;function r(_){e[93](_,e[137],e[142])}function u(_){e[94](_,e[140])}let c={display_value:e[71](e[137],e[142]),index:e[32].current_search_query!==void 0&&e[26][e[137]]!==void 0?e[26][e[137]]:e[137],j:e[142],actual_pinned_columns:e[53],get_cell_width:Cl,handle_cell_click:e[92],handle_blur:e[62],toggle_cell_menu:e[55].toggle_cell_menu,is_cell_selected:Io,should_show_cell_menu:Vo,selected_cells:e[30],copy_flash:e[31],active_cell_menu:e[47],styling:e[34][e[137]][e[142]].styling,latex_delimiters:e[7],line_breaks:e[14],datatype:Array.isArray(e[2])?e[2][e[142]]:e[2],editing:e[48],max_chars:e[20],root:e[11],editable:e[9],is_static:e[22].includes(e[142]),i18n:e[12],components:e[8],handle_select_column:e[55].handle_select_column,handle_select_row:e[55].handle_select_row,is_dragging:e[42],wrap:e[10]};return e[34][e[137]][e[142]].value!==void 0&&(c.value=e[34][e[137]][e[142]].value),e[23][e[140]]!==void 0&&(c.el=e[23][e[140]]),l=new W_({props:c}),Re.push(()=>Qe(l,"value",r)),Re.push(()=>Qe(l,"el",u)),{key:n,first:null,c(){t=nn(),Ve(l.$$.fragment),this.first=t},m(_,a){Be(_,t,a),We(l,_,a),o=!0},p(_,a){e=_;const f={};a[4]&24576&&(f.display_value=e[71](e[137],e[142])),a[0]&67108864|a[1]&2|a[4]&8192&&(f.index=e[32].current_search_query!==void 0&&e[26][e[137]]!==void 0?e[26][e[137]]:e[137]),a[4]&16384&&(f.j=e[142]),a[1]&4194304&&(f.actual_pinned_columns=e[53]),a[1]&16384&&(f.handle_cell_click=e[92]),a[0]&1073741824&&(f.selected_cells=e[30]),a[1]&1&&(f.copy_flash=e[31]),a[1]&65536&&(f.active_cell_menu=e[47]),a[1]&8|a[4]&24576&&(f.styling=e[34][e[137]][e[142]].styling),a[0]&128&&(f.latex_delimiters=e[7]),a[0]&16384&&(f.line_breaks=e[14]),a[0]&4|a[4]&16384&&(f.datatype=Array.isArray(e[2])?e[2][e[142]]:e[2]),a[1]&131072&&(f.editing=e[48]),a[0]&1048576&&(f.max_chars=e[20]),a[0]&2048&&(f.root=e[11]),a[0]&512&&(f.editable=e[9]),a[0]&4194304|a[4]&16384&&(f.is_static=e[22].includes(e[142])),a[0]&4096&&(f.i18n=e[12]),a[0]&256&&(f.components=e[8]),a[1]&2048&&(f.is_dragging=e[42]),a[0]&1024&&(f.wrap=e[10]),!i&&a[1]&8|a[4]&24576&&(i=!0,f.value=e[34][e[137]][e[142]].value,Ge(()=>i=!1)),!s&&a[0]&8388608|a[4]&16384&&(s=!0,f.el=e[23][e[140]],Ge(()=>s=!1)),l.$set(f)},i(_){o||(O(l.$$.fragment,_),o=!0)},o(_){Q(l.$$.fragment,_),o=!1},d(_){_&&je(t),Ue(l,_)}}}function Bu(n){let e,t,l=[],i=new qn,s,o=n[15]&&os(n),r=vt(n[138]);const u=c=>c[140];for(let c=0;c<r.length;c+=1){let _=Yi(n,r,c),a=u(_);i.set(a,l[c]=rs(a,_))}return{c(){e=Ee("tr"),o&&o.c(),t=Oe();for(let c=0;c<l.length;c+=1)l[c].c();he(e,"slot","tbody"),he(e,"class","svelte-18s8a4c"),pt(e,"row-odd",n[137]%2===0)},m(c,_){Be(c,e,_),o&&o.m(e,null),me(e,t);for(let a=0;a<l.length;a+=1)l[a]&&l[a].m(e,null);s=!0},p(c,_){c[15]?o?(o.p(c,_),_[0]&32768&&O(o,1)):(o=os(c),o.c(),O(o,1),o.m(e,t)):o&&(xe(),Q(o,1,1,()=>{o=null}),$e()),_[0]&1154506628|_[1]&21186571|_[2]&513|_[4]&24576&&(r=vt(c[138]),xe(),l=Sn(l,_,u,1,c,r,i,e,Cn,rs,null,Yi),$e()),(!s||_[4]&8192)&&pt(e,"row-odd",c[137]%2===0)},i(c){if(!s){O(o);for(let _=0;_<r.length;_+=1)O(l[_]);s=!0}},o(c){Q(o);for(let _=0;_<l.length;_+=1)Q(l[_]);s=!1},d(c){c&&je(e),o&&o.d();for(let _=0;_<l.length;_+=1)l[_].d()}}}function zu(n){let e,t,l,i,s,o,r,u;function c(m){n[97](m)}function _(m){n[98](m)}function a(m){n[99](m)}function f(m){n[100](m)}function v(m){n[101](m)}let q={max_height:n[13],selected:n[49],disable_scroll:n[47]!==null||n[46]!==null,$$slots:{tbody:[Bu,({index:m,item:M})=>({137:m,138:M}),({index:m,item:M})=>[0,0,0,0,(m?8192:0)|(M?16384:0)]],thead:[ju],default:[Lu]},$$scope:{ctx:n}};return n[34]!==void 0&&(q.items=n[34]),n[37]!==void 0&&(q.actual_height=n[37]),n[38]!==void 0&&(q.table_scrollbar_width=n[38]),n[40]!==void 0&&(q.viewport=n[40]),n[41]!==void 0&&(q.show_scroll_button=n[41]),t=new Ca({props:q}),Re.push(()=>Qe(t,"items",c)),Re.push(()=>Qe(t,"actual_height",_)),Re.push(()=>Qe(t,"table_scrollbar_width",a)),Re.push(()=>Qe(t,"viewport",f)),Re.push(()=>Qe(t,"show_scroll_button",v)),t.$on("scroll_top",Tu),{c(){e=Ee("div"),Ve(t.$$.fragment),he(e,"class","table-wrap svelte-18s8a4c")},m(m,M){Be(m,e,M),We(t,e,null),u=!0},p(m,M){const d={};M[0]&8192&&(d.max_height=m[13]),M[1]&262144&&(d.selected=m[49]),M[1]&98304&&(d.disable_scroll=m[47]!==null||m[46]!==null),M[0]&1171316653|M[1]&7555083|M[4]&8413184&&(d.$$scope={dirty:M,ctx:m}),!l&&M[1]&8&&(l=!0,d.items=m[34],Ge(()=>l=!1)),!i&&M[1]&64&&(i=!0,d.actual_height=m[37],Ge(()=>i=!1)),!s&&M[1]&128&&(s=!0,d.table_scrollbar_width=m[38],Ge(()=>s=!1)),!o&&M[1]&512&&(o=!0,d.viewport=m[40],Ge(()=>o=!1)),!r&&M[1]&1024&&(r=!0,d.show_scroll_button=m[41],Ge(()=>r=!1)),t.$set(d)},i(m){u||(O(t.$$.fragment,m),u=!0)},o(m){Q(t.$$.fragment,m),u=!1},d(m){m&&je(e),Ue(t)}}}function _s(n){let e,t,l;return{c(){e=Ee("button"),e.textContent="↑",he(e,"class","scroll-top-button svelte-18s8a4c")},m(i,s){Be(i,e,s),t||(l=Dt(e,"click",n[68]),t=!0)}
5,p:As,d(i){i&&je(e),t=!1,l()}}}function as(n){let e,t;return e=new la({props:{on_click:n[106]}}),{c(){Ve(e.$$.fragment)},m(l,i){We(e,l,i),t=!0},p:As,i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){Ue(e,l)}}}function us(n){let e,t;return e=new Ya({props:{x:n[47]?.x??n[46]?.x??0,y:n[47]?.y??n[46]?.y??0,row:n[46]?-1:n[47]?.row??0,col_count:n[5],row_count:n[6],on_add_row_above:n[107],on_add_row_below:n[108],on_add_column_left:n[109],on_add_column_right:n[110],on_delete_row:n[111],on_delete_col:n[112],editable:n[9],can_delete_rows:!n[46]&&n[25].length>1&&n[9],can_delete_cols:n[25].length>0&&n[25][0]?.length>1&&n[9],i18n:n[12],on_sort:n[46]?n[113]:void 0,on_clear_sort:n[46]?n[114]:void 0,sort_direction:n[46]?n[32].sort_state.sort_columns.find(n[115])?.direction??null:null,sort_priority:n[46]&&n[32].sort_state.sort_columns.findIndex(n[116])+1||null}}),{c(){Ve(e.$$.fragment)},m(l,i){We(e,l,i),t=!0},p(l,i){const s={};i[1]&98304&&(s.x=l[47]?.x??l[46]?.x??0),i[1]&98304&&(s.y=l[47]?.y??l[46]?.y??0),i[1]&98304&&(s.row=l[46]?-1:l[47]?.row??0),i[0]&32&&(s.col_count=l[5]),i[0]&64&&(s.row_count=l[6]),i[1]&65536&&(s.on_add_row_above=l[107]),i[1]&65536&&(s.on_add_row_below=l[108]),i[1]&98304&&(s.on_add_column_left=l[109]),i[1]&98304&&(s.on_add_column_right=l[110]),i[1]&65536&&(s.on_delete_row=l[111]),i[1]&98304&&(s.on_delete_col=l[112]),i[0]&512&&(s.editable=l[9]),i[0]&33554944|i[1]&32768&&(s.can_delete_rows=!l[46]&&l[25].length>1&&l[9]),i[0]&33554944&&(s.can_delete_cols=l[25].length>0&&l[25][0]?.length>1&&l[9]),i[0]&4096&&(s.i18n=l[12]),i[1]&32768&&(s.on_sort=l[46]?l[113]:void 0),i[1]&32768&&(s.on_clear_sort=l[46]?l[114]:void 0),i[1]&32770&&(s.sort_direction=l[46]?l[32].sort_state.sort_columns.find(l[115])?.direction??null:null),i[1]&32770&&(s.sort_priority=l[46]&&l[32].sort_state.sort_columns.findIndex(l[116])+1||null),e.$set(s)},i(l){t||(O(e.$$.fragment,l),t=!0)},o(l){Q(e.$$.fragment,l),t=!1},d(l){Ue(e,l)}}}function Du(n){let e,t,l,i,s,o,r,u,c=[],_=new qn,a,f,v,q,m=[],M=new qn,d,w,k,y,C,L,B,z,H,F,P=(n[3]&&n[3].length!==0&&n[4]||n[18]||n[19]||n[21]!=="none")&&Qi(n),I=n[3]&&n[3].length!==0&&$i(n),U=n[15]&&xi(),ce=vt(n[24]);const te=S=>S[140];for(let S=0;S<ce.length;S+=1){let j=Gi(n,ce,S),g=te(j);_.set(g,c[S]=es(g,j))}let V=n[15]&&ts(),J=vt(n[50]);const p=S=>S[140];for(let S=0;S<J.length;S+=1){let j=Xi(n,J,S),g=p(j);M.set(g,m[S]=ns(g,j))}function ze(S){n[102](S)}let fe={upload:n[16],stream_handler:n[17],flex:!1,center:!1,boundedheight:!1,disable_click:!0,root:n[11],aria_label:n[12]("dataframe.drop_to_upload"),$$slots:{default:[zu]},$$scope:{ctx:n}};n[36]!==void 0&&(fe.dragging=n[36]),w=new Mo({props:fe}),Re.push(()=>Qe(w,"dragging",ze)),w.$on("load",n[103]);let Y=n[41]&&_s(n),W=n[25].length===0&&n[9]&&n[6][1]==="dynamic"&&as(n),X=(n[47]||n[46])&&us(n);return{c(){e=Ee("div"),P&&P.c(),t=Oe(),l=Ee("div"),i=Ee("table"),I&&I.c(),s=Oe(),o=Ee("thead"),r=Ee("tr"),U&&U.c(),u=Oe();for(let S=0;S<c.length;S+=1)c[S].c();a=Oe(),f=Ee("tbody"),v=Ee("tr"),V&&V.c(),q=Oe();for(let S=0;S<m.length;S+=1)m[S].c();d=Oe(),Ve(w.$$.fragment),y=Oe(),Y&&Y.c(),C=Oe(),W&&W.c(),L=Oe(),X&&X.c(),B=nn(),he(r,"class","svelte-18s8a4c"),he(o,"class","svelte-18s8a4c"),he(v,"class","svelte-18s8a4c"),he(f,"class","svelte-18s8a4c"),he(i,"class","svelte-18s8a4c"),he(l,"class","table-wrap svelte-18s8a4c"),Ui(l,"height",n[37]+"px"),he(l,"role","grid"),he(l,"tabindex","0"),pt(l,"dragging",n[42]),pt(l,"no-wrap",!n[10]),pt(l,"menu-open",n[47]||n[46]),he(e,"class","table-container svelte-18s8a4c")},m(S,j){Be(S,e,j),P&&P.m(e,null),me(e,t),me(e,l),me(l,i),I&&I.m(i,null),me(i,s),me(i,o),me(o,r),U&&U.m(r,null),me(r,u);for(let g=0;g<c.length;g+=1)c[g]&&c[g].m(r,null);me(i,a),me(i,f),me(f,v),V&&V.m(v,null),me(v,q);for(let g=0;g<m.length;g+=1)m[g]&&m[g].m(v,null);n[91](i),me(l,d),We(w,l,null),me(l,y),Y&&Y.m(l,null),n[104](l),Be(S,C,j),W&&W.m(S,j),Be(S,L,j),X&&X.m(S,j),Be(S,B,j),z=!0,H||(F=[Dt(qu,"resize",n[85]),Dt(l,"keydown",n[105]),Dt(l,"mousemove",function(){Qn(n[44])&&n[44].apply(this,arguments)}),Dt(l,"mouseup",function(){Qn(n[43])&&n[43].apply(this,arguments)}),Dt(l,"mouseleave",function(){Qn(n[43])&&n[43].apply(this,arguments)})],H=!0)},p(S,j){n=S,n[3]&&n[3].length!==0&&n[4]||n[18]||n[19]||n[21]!=="none"?P?(P.p(n,j),j[0]&2883608&&O(P,1)):(P=Qi(n),P.c(),O(P,1),P.m(e,t)):P&&(xe(),Q(P,1,1,()=>{P=null}),$e()),n[3]&&n[3].length!==0?I?I.p(n,j):(I=$i(n),I.c(),I.m(i,s)):I&&(I.d(1),I=null),n[15]?U?j[0]&32768&&O(U,1):(U=xi(),U.c(),O(U,1),U.m(r,u)):U&&(xe(),Q(U,1,1,()=>{U=null}
5),$e()),j[0]&30431905|j[1]&409993218|j[2]&4&&(ce=vt(n[24]),xe(),c=Sn(c,j,te,1,n,ce,_,r,Cn,es,null,Gi),$e()),n[15]?V?j[0]&32768&&O(V,1):(V=ts(),V.c(),O(V,1),V.m(v,q)):V&&(xe(),Q(V,1,1,()=>{V=null}),$e()),j[0]&1207982724|j[1]&17303808|j[2]&1&&(J=vt(n[50]),xe(),m=Sn(m,j,p,1,n,J,M,v,Cn,ns,null,Xi),$e());const g={};j[0]&65536&&(g.upload=n[16]),j[0]&131072&&(g.stream_handler=n[17]),j[0]&2048&&(g.root=n[11]),j[0]&4096&&(g.aria_label=n[12]("dataframe.drop_to_upload")),j[0]&1171324845|j[1]&7851723|j[4]&8388608&&(g.$$scope={dirty:j,ctx:n}),!k&&j[1]&32&&(k=!0,g.dragging=n[36],Ge(()=>k=!1)),w.$set(g),n[41]?Y?Y.p(n,j):(Y=_s(n),Y.c(),Y.m(l,null)):Y&&(Y.d(1),Y=null),(!z||j[1]&64)&&Ui(l,"height",n[37]+"px"),(!z||j[1]&2048)&&pt(l,"dragging",n[42]),(!z||j[0]&1024)&&pt(l,"no-wrap",!n[10]),(!z||j[1]&98304)&&pt(l,"menu-open",n[47]||n[46]),n[25].length===0&&n[9]&&n[6][1]==="dynamic"?W?(W.p(n,j),j[0]&33555008&&O(W,1)):(W=as(n),W.c(),O(W,1),W.m(L.parentNode,L)):W&&(xe(),Q(W,1,1,()=>{W=null}),$e()),n[47]||n[46]?X?(X.p(n,j),j[1]&98304&&O(X,1)):(X=us(n),X.c(),O(X,1),X.m(B.parentNode,B)):X&&(xe(),Q(X,1,1,()=>{X=null}),$e())},i(S){if(!z){O(P),O(U);for(let j=0;j<ce.length;j+=1)O(c[j]);O(V);for(let j=0;j<J.length;j+=1)O(m[j]);O(w.$$.fragment,S),O(W),O(X),z=!0}},o(S){Q(P),Q(U);for(let j=0;j<c.length;j+=1)Q(c[j]);Q(V);for(let j=0;j<m.length;j+=1)Q(m[j]);Q(w.$$.fragment,S),Q(W),Q(X),z=!1},d(S){S&&(je(e),je(C),je(L),je(B)),P&&P.d(),I&&I.d(),U&&U.d();for(let j=0;j<c.length;j+=1)c[j].d();V&&V.d();for(let j=0;j<m.length;j+=1)m[j].d();n[91](null),Ue(w),Y&&Y.d(),n[104](null),W&&W.d(S),X&&X.d(S),H=!1,Cu(F)}}}function qt(){return Math.random().toString(36).substring(2,15)}function Cl(n){return`var(--cell-width-${n})`}const Tu=n=>{};function Hu(n,e,t){let l,i,s,o,r,u,c,_,a,f,v,q,m,M,d,{datatype:w}=e,{label:k=null}=e,{show_label:y=!0}=e,{headers:C=[]}=e,{values:L=[]}=e,{col_count:B}=e,{row_count:z}=e,{latex_delimiters:H}=e,{components:F={}}=e,{editable:P=!0}=e,{wrap:I=!1}=e,{root:U}=e,{i18n:ce}=e,{max_height:te=500}=e,{line_breaks:V=!0}=e,{column_widths:J=[]}=e,{show_row_numbers:p=!1}=e,{upload:ze}=e,{stream_handler:fe}=e,{show_fullscreen_button:Y=!1}=e,{show_copy_button:W=!1}=e,{value_is_output:X=!1}=e,{max_chars:S=void 0}=e,{show_search:j="none"}=e,{pinned_columns:g=0}=e,{static_columns:se=[]}=e;const K=Zo({show_fullscreen_button:Y,show_copy_button:W,show_search:j,show_row_numbers:p,editable:P,pinned_columns:g,show_label:y,line_breaks:V,wrap:I,max_height:te,column_widths:J,max_chars:S}),{state:Ne,actions:R}=K;pu(n,Ne,h=>t(32,d=h)),Wi(()=>{t(33,K.parent_element=ne,K),t(33,K.get_data_at=Ls,K),t(33,K.get_column=js,K),t(33,K.get_row=Bs,K),t(33,K.dispatch=E,K),Rl();const h=new IntersectionObserver(A=>{A.forEach(T=>{T.isIntersecting&&!Al&&Bt(),Al=T.isIntersecting})});return h.observe(ne),document.addEventListener("click",El),window.addEventListener("resize",Dl),document.addEventListener("fullscreenchange",Ll),()=>{h.disconnect(),document.removeEventListener("click",El),window.removeEventListener("resize",Dl),document.removeEventListener("fullscreenchange",Ll)}});const E=Eu();let D={},ye={},le=bn(C,B,D,qt),yt=C,N=[[]],re,Je=[[]],ln=!1,jn=!1,Sl,jt=[];Wi(()=>{Sl=getComputedStyle(document.documentElement).getPropertyValue("--color-accent").trim()+"40",document.documentElement.style.setProperty("--color-accent-copied",Sl)});const Ls=(h,A)=>N?.[h]?.[A]?.value,js=h=>N?.map(A=>A[h]?.value)??[],Bs=h=>N?.[h]?.map(A=>A.value)??[];let{display_value:ot=null}=e,{styling:rt=null}=e,Bn=le.map(h=>h.value),zn=N.map(h=>h.map(A=>String(A.value)));function ql(h,A){R.handle_sort(h,A),on(N,ot,rt)}function Ml(){R.reset_sort_state(),on(N,ot,rt)}async function zs(h,A=!1){!P||o===h||B[1]!=="dynamic"||R.set_header_edit(h)}function Ds(h,A){h.target instanceof HTMLAnchorElement||(h.preventDefault(),h.stopPropagation(),P&&(R.set_editing(!1),R.handle_header_click(A,P),ne.focus()))}function Ts(h){P&&(R.end_header_edit(h.detail.key),ne.focus())}async function Dn(h){if(ne.focus(),z[1]!=="dynamic")return;const A=Array(N[0]?.length||C.length).fill(0).map((T,oe)=>{const ie=qt();return t(23,D[ie]={cell:null,input:null},D),{id:ie,value:""}});N.length===0?t(25,N=[A]):h!==void 0&&h>=0&&h<=N.length?N.splice(h,0,A):N.push(A),t(84,i=[h!==void 0?h:N.length-1,0])}async function Hs(h){if(ne.focus(),B[1]!=="dynamic")return;const A=R.add_col(N,C,qt,h);A.data.forEach(T=>{T.forEach(oe=>{D[oe.id]||t(23,D[oe.id]={cell:null,input:null},D)})}),t(25,N=A.data),t(0,C=A.headers),await Au(),requestAnimationFrame(()=>{zs(h!==void 0?h:N[0].length-1,!0);const T=ne.querySelectorAll("tbody")[1].offsetWidth;ne.querySelectorAll("table")[1].scrollTo({left:T})})}function El(h){Yo(h,ne)&&(R.clear_ui_state(),t(52,o=!1),t(51,r=!1))}let _t=[],ne,sn,Tn=0,Hn=0;function Bt(){const h=N[0]?.length||0;if(Tn===N.length&&Hn===h&&d.sort_state.sort_columns.length>0)return;Tn=N.length,Hn=h;const A=_t.map(T=>T?.clientWidth||0);if(A.length!==0){p&&ne.style.setProperty("--cell-width-row-number",`${A[0]}px`);for(let T=0;T<50;T++)if(!J[T])ne.style.removeProperty(`--cell-width-${T}`);else if(J[T].endsWith("%")){const oe=parseFloat(J[T]),ie=Math.floor(oe/100*ne.clientWidth);ne.style.setProperty(`--cell-width-${T}`,`${ie}px`)}else ne.style.setProperty(`--cell-width-${T}`,J[T]);A.forEach((T,oe)=>{if(!J[oe]){const ie=`${Math.max(T,45)}px`;ne.style.setProperty(`--cell-width-${oe}`,ie)}})}}let Rn=L.slice(0,te/L.length*37).length*37+37,Nn=0;function on(h,A,T){const oe=To(h,A,T,d.sort_state.sort_columns,i,Jo);t(25,N=oe.data),t(84,i=oe.selected)}let Al=!1;const Rs=h=>{R.set_copy_flash(h)};let Pn=[];function Ns(h){const{blur_event:A,coords:T}=h.detail;uu(A,K,T)}function Ps(){document.fullscreenElement?(document.exitFullscreen(),t(35,ln=!1)):(ne.requestFullscreen(),t(35,ln=!0))}function Ll(){t(35,ln=!!document.fullscreenElement)}function Fs(h,A){if(h.stopPropagation(),c&&c.col===A)R.set_active_header_menu(null);else{const T=h.target.closest("th");if(T){const oe=T.getBoundingClientRect();R.set_active_header_menu({col:A,x:oe.right,y:oe.bottom})}}}Mu(()=>{t(72,X=!1)});function jl(h){if(B[1]!=="dynamic"||N[0].length<=1)return;const A=R.delete_col_at(N,C,h);t(25,N=A.data),t(0,C=A.headers),t(24,le=bn(C,B,D,qt)),R.set_active_cell_menu(null),R.set_active_header_menu(null),R.set_selected(!1),R.set_selected_cells([]),R.set_editing(!1)}function Bl(h){t(25,N=R.delete_row_at(N,h)),R.set_active_cell_menu(null),R.set_active_header_menu(null)}let zl;function Is(){if(d.current_search_query&&j==="filter"){const h=[],A=[],T=[];Je.forEach(ie=>{const un=[],Nl=[],Pl=[];ie.forEach(Pt=>
5{un.push(Pt.value),Nl.push(Pt.display_value!==void 0?Pt.display_value:String(Pt.value)),Pl.push(Pt.styling||"")}),h.push(un),A.push(Nl),T.push(Pl)});const oe={data:h,headers:le.map(ie=>ie.value),metadata:{display_value:A,styling:T}};E("change",oe),X||E("input"),R.handle_search(null)}}let rn,Fn=!1;function Os(){rn.scrollTo({top:0})}function Dl(){R.set_active_cell_menu(null),R.set_active_header_menu(null),t(30,l=[]),t(84,i=!1),t(48,s=!1),Bt()}function In(h,A){const T=A==="above"?h:h+1;Dn(T),t(47,u=null),t(46,c=null)}function On(h,A){const T=A==="left"?h:h+1;Hs(T),t(47,u=null),t(46,c=null)}function Ks(){R.reset_sort_state()}let _n=!1,Tl=null,Hl=null;const an={is_dragging:_n,drag_start:Tl,mouse_down_pos:Hl};let Nt;function Rl(){t(83,Nt=wu(an,h=>t(42,_n=h),h=>R.set_selected_cells(h),h=>R.set_selected(h),(h,A,T)=>R.handle_cell_click(h,A,T),p,ne))}function Vs(h,A){return d.current_search_query!==void 0&&Je?.[h]?.[A]?Je[h][A].display_value!==void 0?Je[h][A].display_value:String(Je[h][A].value):N?.[h]?.[A]?N[h][A].display_value!==void 0?N[h][A].display_value:String(N[h][A].value):""}const Us=()=>Bt(),Ws=async()=>await hs(N,null),Js=h=>R.handle_search(h.detail);function Ys(h,A){n.$$.not_equal(le[A].value,h)&&(le[A].value=h,t(24,le),t(0,C),t(78,yt),t(5,B),t(23,D))}function Xs(h,A){n.$$.not_equal(D[A].input,h)&&(D[A].input=h,t(23,D))}function Gs(h,A){Re[h?"unshift":"push"](()=>{_t[A]=h,t(27,_t)})}function Qs(h){Re[h?"unshift":"push"](()=>{sn=h,t(29,sn)})}const Zs=(h,A,T)=>q(h,A,T);function $s(h,A,T){n.$$.not_equal(Je[A][T].value,h)&&(Je[A][T].value=h,t(34,Je),t(32,d),t(25,N),t(26,jt),t(76,rt),t(1,L),t(79,re),t(28,ne),t(23,D),t(124,ye),t(75,ot),t(27,_t))}function xs(h,A){n.$$.not_equal(D[A],h)&&(D[A]=h,t(23,D))}function eo(h,A){n.$$.not_equal(le[A].value,h)&&(le[A].value=h,t(24,le),t(0,C),t(78,yt),t(5,B),t(23,D))}function to(h,A){n.$$.not_equal(D[A].input,h)&&(D[A].input=h,t(23,D))}function no(h){Je=h,t(34,Je),t(32,d),t(25,N),t(26,jt),t(76,rt),t(1,L),t(79,re),t(28,ne),t(23,D),t(124,ye),t(75,ot),t(27,_t)}function lo(h){Rn=h,t(37,Rn)}function io(h){Nn=h,t(38,Nn)}function so(h){rn=h,t(40,rn)}function oo(h){Fn=h,t(41,Fn)}function ro(h){jn=h,t(36,jn)}const _o=({detail:h})=>Po(h.data,A=>(t(24,le=bn(A.map(T=>T??""),B,D,qt)),le),A=>{t(1,L=A)});function ao(h){Re[h?"unshift":"push"](()=>{ne=h,t(28,ne)})}const uo=h=>bu(h,K),co=()=>Dn(),fo=()=>In(u?.row??-1,"above"),ho=()=>In(u?.row??-1,"below"),mo=()=>On(u?.col??c?.col??-1,"left"),go=()=>On(u?.col??c?.col??-1,"right"),bo=()=>Bl(u?.row??-1),wo=()=>jl(u?.col??c?.col??-1),ko=h=>{c&&(ql(c.col,h),R.set_active_header_menu(null))},po=()=>{Ml(),R.set_active_header_menu(null)},vo=h=>h.col===(c?.col??-1),yo=h=>h.col===(c?.col??-1);return n.$$set=h=>{"datatype"in h&&t(2,w=h.datatype),"label"in h&&t(3,k=h.label),"show_label"in h&&t(4,y=h.show_label),"headers"in h&&t(0,C=h.headers),"values"in h&&t(1,L=h.values),"col_count"in h&&t(5,B=h.col_count),"row_count"in h&&t(6,z=h.row_count),"latex_delimiters"in h&&t(7,H=h.latex_delimiters),"components"in h&&t(8,F=h.components),"editable"in h&&t(9,P=h.editable),"wrap"in h&&t(10,I=h.wrap),"root"in h&&t(11,U=h.root),"i18n"in h&&t(12,ce=h.i18n),"max_height"in h&&t(13,te=h.max_height),"line_breaks"in h&&t(14,V=h.line_breaks),"column_widths"in h&&t(73,J=h.column_widths),"show_row_numbers"in h&&t(15,p=h.show_row_numbers),"upload"in h&&t(16,ze=h.upload),"stream_handler"in h&&t(17,fe=h.stream_handler),"show_fullscreen_button"in h&&t(18,Y=h.show_fullscreen_button),"show_copy_button"in h&&t(19,W=h.show_copy_button),"value_is_output"in h&&t(72,X=h.value_is_output),"max_chars"in h&&t(20,S=h.max_chars),"show_search"in h&&t(21,j=h.show_search),"pinned_columns"in h&&t(74,g=h.pinned_columns),"static_columns"in h&&t(22,se=h.static_columns),"display_value"in h&&t(75,ot=h.display_value),"styling"in h&&t(76,rt=h.styling)},n.$$.update=()=>{if(n.$$.dirty[1]&2&&t(30,l=d.ui_state.selected_cells),n.$$.dirty[1]&2&&t(84,i=d.ui_state.selected),n.$$.dirty[1]&2&&t(48,s=d.ui_state.editing),n.$$.dirty[1]&2&&t(52,o=d.ui_state.header_edit),n.$$.dirty[1]&2&&t(51,r=d.ui_state.selected_header),n.$$.dirty[1]&2&&t(47,u=d.ui_state.active_cell_menu),n.$$.dirty[1]&2&&t(46,c=d.ui_state.active_header_menu),n.$$.dirty[1]&2&&t(31,_=d.ui_state.copy_flash),n.$$.dirty[0]&444596226|n.$$.dirty[1]&2|n.$$.dirty[2]&155648&&!Ot(L,re)){if(ne){const T=L.length===0||L.length===1&&L[0].length===0,oe=re!==void 0&&(L.length!==re.length||L[0]&&re[0]&&L[0].length!==re[0].length);if(T||oe){for(let ie=0;ie<50;ie++)ne.style.removeProperty(`--cell-width-${ie}`);Tn=0,Hn=0}}const h=L.length===0||L.length===1&&L[0].length===0,A=re!==void 0&&(L.length!==re.length||L[0]&&re[0]&&L[0].length!==re[0].length);t(25,N=_u(L,D,ye,qt,ot)),t(79,re=JSON.parse(JSON.stringify(L))),h||A?R.reset_sort_state():d.sort_state.sort_columns.length>0&&on(N,ot,rt),d.current_search_query&&R.handle_search(null),ne&&_t.length>0&&Bt()}if(n.$$.dirty[0]&33554432|n.$$.dirty[2]&4096&&t(53,a=g&&N?.[0]?.length?Math.min(g,N[0].length):0),n.$$.dirty[0]&8388641|n.$$.dirty[2]&65536&&(Ot(C,yt)||(t(24,le=bn(C,B,D,qt)),t(78,yt=JSON.parse(JSON.stringify(C))))),n.$$.dirty[0]&58720256&&(N||le||D)&&(t(33,K.data=N,K),t(33,K.headers=le,K),t(33,K.els=D,K)),n.$$.dirty[0]&100663296|n.$$.dirty[1]&2|n.$$.dirty[2]&16384)if(d.current_search_query!==void 0){const h=new Map;
5t(26,jt=[]),N.forEach((T,oe)=>{T.some(ie=>String(ie?.value).toLowerCase().includes(d.current_search_query?.toLowerCase()||""))&&jt.push(oe),T.forEach((ie,un)=>{h.set(ie.id,{value:ie.value,display_value:ie.display_value!==void 0?ie.display_value:String(ie.value),styling:rt?.[oe]?.[un]||""})})});const A=R.filter_data(N);t(34,Je=A.map(T=>T.map(oe=>{const ie=h.get(oe.id);return{...oe,display_value:ie?.display_value!==void 0?ie.display_value:String(oe.value),styling:ie?.styling||""}})))}else t(26,jt=[]);if(n.$$.dirty[0]&50331648|n.$$.dirty[2]&787456&&(N||le)&&(R.trigger_change(N,le,zn,Bn,X,E),t(81,zn=N.map(h=>h.map(A=>String(A.value)))),t(80,Bn=le.map(h=>h.value))),n.$$.dirty[0]&33554432|n.$$.dirty[1]&2|n.$$.dirty[2]&24576&&d.sort_state.sort_columns.length>0&&(on(N,ot,rt),R.update_row_order(N)),n.$$.dirty[0]&33554432&&t(50,f=Ho(N)),n.$$.dirty[0]&134217728&&_t[0]&&_t[0]?.clientWidth&&Bt(),n.$$.dirty[2]&4194304&&t(49,v=!!i&&i[0]),n.$$.dirty[0]&1073741824|n.$$.dirty[1]&1|n.$$.dirty[2]&1048576&&(_&&!Ot(l,Pn)&&Rs(!1),t(82,Pn=l)),n.$$.dirty[2]&4194304&&i!==!1&&t(39,zl=i),n.$$.dirty[0]&847249408|n.$$.dirty[2]&4194304&&i!==!1){const h=Xo(i,N,D,ne,sn);document.documentElement.style.setProperty("--selected-col-pos",h.col_pos),document.documentElement.style.setProperty("--selected-row-pos",h.row_pos||"0px")}n.$$.dirty[0]&268435456&&ne&&Rl(),n.$$.dirty[2]&2097152&&t(45,q=Nt?.handle_mouse_down||(()=>{})),n.$$.dirty[2]&2097152&&t(44,m=Nt?.handle_mouse_move||(()=>{})),n.$$.dirty[2]&2097152&&t(43,M=Nt?.handle_mouse_up||(()=>{}))},t(42,_n=an.is_dragging),Tl=an.drag_start,Hl=an.mouse_down_pos,[C,L,w,k,y,B,z,H,F,P,I,U,ce,te,V,p,ze,fe,Y,W,S,j,se,D,le,N,jt,_t,ne,sn,l,_,d,K,Je,ln,jn,Rn,Nn,zl,rn,Fn,_n,M,m,q,c,u,s,v,f,r,o,a,Ne,R,ql,Ml,Ds,Ts,Dn,Bt,Ns,Ps,Fs,jl,Bl,Is,Os,In,On,Vs,X,J,g,ot,rt,Ks,yt,re,Bn,zn,Pn,Nt,i,Us,Ws,Js,Ys,Xs,Gs,Qs,Zs,$s,xs,eo,to,no,lo,io,so,oo,ro,_o,ao,uo,co,fo,ho,mo,go,bo,wo,ko,po,vo,yo]}class Ru extends ku{constructor(e){super(),yu(this,e,Hu,Du,Su,{datatype:2,label:3,show_label:4,headers:0,values:1,col_count:5,row_count:6,latex_delimiters:7,components:8,editable:9,wrap:10,root:11,i18n:12,max_height:13,line_breaks:14,column_widths:73,show_row_numbers:15,upload:16,stream_handler:17,show_fullscreen_button:18,show_copy_button:19,value_is_output:72,max_chars:20,show_search:21,pinned_columns:74,static_columns:22,display_value:75,styling:76,reset_sort_state:77},null,[-1,-1,-1,-1,-1])}get datatype(){return this.$$.ctx[2]}set datatype(e){this.$$set({datatype:e}),x()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),x()}get show_label(){return this.$$.ctx[4]}set show_label(e){this.$$set({show_label:e}),x()}get headers(){return this.$$.ctx[0]}set headers(e){this.$$set({headers:e}),x()}get values(){return this.$$.ctx[1]}set values(e){this.$$set({values:e}),x()}get col_count(){return this.$$.ctx[5]}set col_count(e){this.$$set({col_count:e}),x()}get row_count(){return this.$$.ctx[6]}set row_count(e){this.$$set({row_count:e}),x()}get latex_delimiters(){return this.$$.ctx[7]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),x()}get components(){return this.$$.ctx[8]}set components(e){this.$$set({components:e}),x()}get editable(){return this.$$.ctx[9]}set editable(e){this.$$set({editable:e}),x()}get wrap(){return this.$$.ctx[10]}set wrap(e){this.$$set({wrap:e}),x()}get root(){return this.$$.ctx[11]}set root(e){this.$$set({root:e}),x()}get i18n(){return this.$$.ctx[12]}set i18n(e){this.$$set({i18n:e}),x()}get max_height(){return this.$$.ctx[13]}set max_height(e){this.$$set({max_height:e}),x()}get line_breaks(){return this.$$.ctx[14]}set line_breaks(e){this.$$set({line_breaks:e}),x()}get column_widths(){return this.$$.ctx[73]}set column_widths(e){this.$$set({column_widths:e}),x()}get show_row_numbers(){return this.$$.ctx[15]}set show_row_numbers(e){this.$$set({show_row_numbers:e}),x()}get upload(){return this.$$.ctx[16]}set upload(e){this.$$set({upload:e}),x()}get stream_handler(){return this.$$.ctx[17]}set stream_handler(e){this.$$set({stream_handler:e}),x()}get show_fullscreen_button(){return this.$$.ctx[18]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),x()}get show_copy_button(){return this.$$.ctx[19]}set show_copy_button(e){this.$$set({show_copy_button:e}),x()}get value_is_output(){return this.$$.ctx[72]}set value_is_output(e){this.$$set({value_is_output:e}),x()}get max_chars(){return this.$$.ctx[20]}set max_chars(e){this.$$set({max_chars:e}),x()}get show_search(){return this.$$.ctx[21]}set show_search(e){this.$$set({show_search:e}),x()}get pinned_columns(){return this.$$.ctx[74]}set pinned_columns(e){this.$$set({pinned_columns:e}),x()}get static_columns(){return this.$$.ctx[22]}set static_columns(e){this.$$set({static_columns:e}),x()}get display_value(){return this.$$.ctx[75]}set display_value(e){this.$$set({display_value:e}),x()}get styling(){return this.$$.ctx[76]}set styling(e){this.$$set({styling:e}),x()}get reset_sort_state(){return this.$$.ctx[77]}}const Nu=Ru,{SvelteComponent:Pu,add_flush_callback:Fu,assign:Iu,bind:Ou,binding_callbacks:Ku,create_component:rl,destroy_component:_l,detach:Vu,flush:$,get_spread_object:Uu,get_spread_update:Wu,init:Ju,insert:Yu,mount_component:al,safe_not_equal:Xu,space:Gu,transition_in:ul,transition_out:cl}=window.__gradio__svelte__internal;function Qu(n){let e,t,l,i,s;const o=[{autoscroll:n[16].autoscroll},{i18n:n[16].i18n},n[19]];let r={};for(let _=0;_<o.length;_+=1)r=Iu(r,o[_]);e=new Bo({props:r}),e.$on("clear_status",n[32]);function u(_){n[35](_)}let c={root:n[13],label:n[7],show_label:n[8],row_count:n[6],col_count:n[5],values:n[0].data,display_value:n[29],styling:n[28],headers:n[30],wrap:n[9],datatype:n[10],latex_delimiters:n[17],editable:n[20],max_height:n[18],i18n:n[16].i18n,line_breaks:n[14],column_widths:n[15],upload:n[33],stream_handler:n[34],show_fullscreen_button:n[21],max_chars:n[22],show_copy_button:n[23],show_row_numbers:n[24],show_search:n[25],pinned_columns:n[26],components:{image:zo},static_columns:n[27]};return n[1]!==void 0&&(c.value_is_output=n[1]),l=new Nu({props:c}),Ku.push(()=>Ou(l,"value_is_output",u)),l.$on("change",n[36]),l.$on("input",n[37]),l.$on("select",n[38]),{c(){rl(e.$$.fragment),t=Gu(),rl(l.$$.fragment)},m(_,a){al(e,_,a),Yu(_,t,a),al(l,_,a),s=!0},p(_,a){const f=a[0]&589824?Wu(o,[a[0]&65536&&{autoscroll:_[16].autoscroll},a[0]&65536&&{i18n:_[16].i18n},a[0]&524288&&Uu(_[19])]):{};e.$set(f);const v={};a[0]&8192&&(v.root=_[13]),a[0]&128&&(v.label=_[7]),a[0]&256&&(v.show_label=_[8]),a[0]&64&&(v.row_count=_[6]),a[0]&32&&(v.col_count=_[5]),a[0]&1&&(v.values=_[0].data),a[0]&536870912&&(v.dis
5play_value=_[29]),a[0]&268435456&&(v.styling=_[28]),a[0]&1073741824&&(v.headers=_[30]),a[0]&512&&(v.wrap=_[9]),a[0]&1024&&(v.datatype=_[10]),a[0]&131072&&(v.latex_delimiters=_[17]),a[0]&1048576&&(v.editable=_[20]),a[0]&262144&&(v.max_height=_[18]),a[0]&65536&&(v.i18n=_[16].i18n),a[0]&16384&&(v.line_breaks=_[14]),a[0]&32768&&(v.column_widths=_[15]),a[0]&65536&&(v.upload=_[33]),a[0]&65536&&(v.stream_handler=_[34]),a[0]&2097152&&(v.show_fullscreen_button=_[21]),a[0]&4194304&&(v.max_chars=_[22]),a[0]&8388608&&(v.show_copy_button=_[23]),a[0]&16777216&&(v.show_row_numbers=_[24]),a[0]&33554432&&(v.show_search=_[25]),a[0]&67108864&&(v.pinned_columns=_[26]),a[0]&134217728&&(v.static_columns=_[27]),!i&&a[0]&2&&(i=!0,v.value_is_output=_[1],Fu(()=>i=!1)),l.$set(v)},i(_){s||(ul(e.$$.fragment,_),ul(l.$$.fragment,_),s=!0)},o(_){cl(e.$$.fragment,_),cl(l.$$.fragment,_),s=!1},d(_){_&&Vu(t),_l(e,_),_l(l,_)}}}function Zu(n){let e,t;return e=new Co({props:{visible:n[4],padding:!1,elem_id:n[2],elem_classes:n[3],container:!1,scale:n[11],min_width:n[12],overflow_behavior:"visible",$$slots:{default:[Qu]},$$scope:{ctx:n}}}),{c(){rl(e.$$.fragment)},m(l,i){al(e,l,i),t=!0},p(l,i){const s={};i[0]&16&&(s.visible=l[4]),i[0]&4&&(s.elem_id=l[2]),i[0]&8&&(s.elem_classes=l[3]),i[0]&2048&&(s.scale=l[11]),i[0]&4096&&(s.min_width=l[12]),i[0]&2147477475|i[1]&256&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){t||(ul(e.$$.fragment,l),t=!0)},o(l){cl(e.$$.fragment,l),t=!1},d(l){_l(e,l)}}}function $u(n,e,t){let l,i,s,{headers:o=[]}=e,{elem_id:r=""}=e,{elem_classes:u=[]}=e,{visible:c=!0}=e,{value:_={data:[["","",""]],headers:["1","2","3"],metadata:null}}=e,{value_is_output:a=!1}=e,{col_count:f}=e,{row_count:v}=e,{label:q=null}=e,{show_label:m=!0}=e,{wrap:M}=e,{datatype:d}=e,{scale:w=null}=e,{min_width:k=void 0}=e,{root:y}=e,{line_breaks:C=!0}=e,{column_widths:L=[]}=e,{gradio:B}=e,{latex_delimiters:z}=e,{max_height:H=void 0}=e,{loading_status:F}=e,{interactive:P}=e,{show_fullscreen_button:I=!1}=e,{max_chars:U=void 0}=e,{show_copy_button:ce=!1}=e,{show_row_numbers:te=!1}=e,{show_search:V="none"}=e,{pinned_columns:J=0}=e,{static_columns:p=[]}=e;const ze=()=>B.dispatch("clear_status",F),fe=(...g)=>B.client.upload(...g),Y=(...g)=>B.client.stream(...g);function W(g){a=g,t(1,a)}const X=g=>{t(0,_.data=g.detail.data,_),t(0,_.headers=g.detail.headers,_),B.dispatch("change")},S=g=>B.dispatch("input"),j=g=>B.dispatch("select",g.detail);return n.$$set=g=>{"headers"in g&&t(31,o=g.headers),"elem_id"in g&&t(2,r=g.elem_id),"elem_classes"in g&&t(3,u=g.elem_classes),"visible"in g&&t(4,c=g.visible),"value"in g&&t(0,_=g.value),"value_is_output"in g&&t(1,a=g.value_is_output),"col_count"in g&&t(5,f=g.col_count),"row_count"in g&&t(6,v=g.row_count),"label"in g&&t(7,q=g.label),"show_label"in g&&t(8,m=g.show_label),"wrap"in g&&t(9,M=g.wrap),"datatype"in g&&t(10,d=g.datatype),"scale"in g&&t(11,w=g.scale),"min_width"in g&&t(12,k=g.min_width),"root"in g&&t(13,y=g.root),"line_breaks"in g&&t(14,C=g.line_breaks),"column_widths"in g&&t(15,L=g.column_widths),"gradio"in g&&t(16,B=g.gradio),"latex_delimiters"in g&&t(17,z=g.latex_delimiters),"max_height"in g&&t(18,H=g.max_height),"loading_status"in g&&t(19,F=g.loading_status),"interactive"in g&&t(20,P=g.interactive),"show_fullscreen_button"in g&&t(21,I=g.show_fullscreen_button),"max_chars"in g&&t(22,U=g.max_chars),"show_copy_button"in g&&t(23,ce=g.show_copy_button),"show_row_numbers"in g&&t(24,te=g.show_row_numbers),"show_search"in g&&t(25,V=g.show_search),"pinned_columns"in g&&t(26,J=g.pinned_columns),"static_columns"in g&&t(27,p=g.static_columns)},n.$$.update=()=>{n.$$.dirty[0]&1|n.$$.dirty[1]&1&&t(30,l=[..._.headers||o]),n.$$.dirty[0]&1&&t(29,i=_?.metadata?.display_value?[..._?.metadata?.display_value]:null),n.$$.dirty[0]&1048577&&t(28,s=!P&&_?.metadata?.styling?[..._?.metadata?.styling]:null)},[_,a,r,u,c,f,v,q,m,M,d,w,k,y,C,L,B,z,H,F,P,I,U,ce,te,V,J,p,s,i,l,o,ze,fe,Y,W,X,S,j]}class Vc extends Pu{constructor(e){super(),Ju(this,e,$u,Zu,Xu,{headers:31,elem_id:2,elem_classes:3,visible:4,value:0,value_is_output:1,col_count:5,row_count:6,label:7,show_label:8,wrap:9,datatype:10,scale:11,min_width:12,root:13,line_breaks:14,column_widths:15,gradio:16,latex_delimiters:17,max_height:18,loading_status:19,interactive:20,show_fullscreen_button:21,max_chars:22,show_copy_button:23,show_row_numbers:24,show_search:25,pinned_columns:26,static_columns:27},null,[-1,-1])}get headers(){return this.$$.ctx[31]}set headers(e){this.$$set({headers:e}),$()}get elem_id(){return this.$$.ctx[2]}set elem_id(e){this.$$set({elem_id:e}),$()}get elem_classes(){return this.$$.ctx[3]}set elem_classes(e){this.$$set({elem_classes:e}),$()}get visible(){return this.$$.ctx[4]}set visible(e){this.$$set({visible:e}),$()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),$()}get value_is_output(){return this.$$.ctx[1]}set value_is_output(e){this.$$set({value_is_output:e}),$()}get col_count(){return this.$$.ctx[5]}set col_count(e){this.$$set({col_count:e}),$()}get row_count(){return this.$$.ctx[6]}set row_count(e){this.$$set({row_count:e}),$()}get label(){return this.$$.ctx[7]}set label(e){this.$$set({label:e}),$()}get show_label(){return this.$$.ctx[8]}set show_label(e){this.$$set({show_label:e}),$()}get wrap(){return this.$$.ctx[9]}set wrap(e){this.$$set({wrap:e}),$()}get datatype(){return this.$$.ctx[10]}set datatype(e){this.$$set({datatype:e}),$()}get scale(){return this.$$.ctx[11]}set scale(e){this.$$set({scale:e}),$()}get min_width(){return this.$$.ctx[12]}set min_width(e){this.$$set({min_width:e}),$()}get root(){return this.$$.ctx[13]}set root(e){this.$$set({root:e}),$()}get line_breaks(){return this.$$.ctx[14]}set line_breaks(e){this.$$set({line_breaks:e}),$()}get column_widths(){return this.$$.ctx[15]}set column_widths(e){this.$$set({column_widths:e}),$()}get gradio(){return this.$$.ctx[16]}set gradio(e){this.$$set({gradio:e}),$()}get latex_delimiters(){return this.$$.ctx[17]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),$()}get max_height(){return this.$$.ctx[18]}set max_height(e){this.$$set({max_height:e}),$()}get loading_status(){return this.$$.ctx[19]}set loading_status(e){this.$$set({loading_status:e}),$()}get interactive(){return this.$$.ctx[20]}set interactive(e){this.$$set({interactive:e}),$()}get show_fullscreen_button(){return this.$$.ctx[21]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),$()}get max_chars(){return this.$$.ctx[22]}set max_chars(e){this.$$set({max_chars:e}),$()}get show_copy_button(){return this.$$.ctx[23]}set show_copy_button(e){this.$$set({show_copy_button:e}),$()}get show_row_numbers(){return this.$$.ctx[24]}set show_row_numbers(e){this.$$set({show_row_numbers:e}),$()}get show_search(){return this.$$.ctx[25]}set show_search(e){this.$$set({show_search:e}),$()}get pinned_columns(){return this.$$.ctx[26]}set pinned_columns(e){this.$$set({pinned_columns:e}),$()}get static_columns(){return this.$$.ctx[27]}set static_columns(e){this.$$set({static_columns:e}),$()}}export{Nu as BaseDataFrame,Jc as BaseExample,Vc as default};
6//# sourceMappingURL=Index-BEzHC-5Y.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.