import { f as fallback, e as escape_html } from './async-Mo2Ia14K.js';
import { s as store_get, f as attr_class, d as attr_style, i as slot, a as attr, g as stringify, u as unsubscribe_stores, c as bind_props, e as ensure_array_like } from './index-D1Ptw7Az.js';
import { D as ls, p as pr } from './2-B89dC7Mi.js';

const z="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='10'%20fill='none'%3e%3cpath%20fill='%23FF3270'%20d='M1.93%206.03v2.04h2.04V6.03H1.93Z'/%3e%3cpath%20fill='%23861FFF'%20d='M6.03%206.03v2.04h2.04V6.03H6.03Z'/%3e%3cpath%20fill='%23097EFF'%20d='M1.93%201.93v2.04h2.04V1.93H1.93Z'/%3e%3cpath%20fill='%23000'%20fill-rule='evenodd'%20d='M.5%201.4c0-.5.4-.9.9-.9h3.1a.9.9%200%200%201%20.87.67A2.44%202.44%200%200%201%209.5%202.95c0%20.65-.25%201.24-.67%201.68.39.1.67.46.67.88v3.08c0%20.5-.4.91-.9.91H1.4a.9.9%200%200%201-.9-.9V1.4Zm1.43.53v2.04h2.04V1.93H1.93Zm0%206.14V6.03h2.04v2.04H1.93Zm4.1%200V6.03h2.04v2.04H6.03Zm0-5.12a1.02%201.02%200%201%201%202.04%200%201.02%201.02%200%200%201-2.04%200Z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%23FFD702'%20d='M7.05%201.93a1.02%201.02%200%201%200%200%202.04%201.02%201.02%200%200%200%200-2.04Z'/%3e%3c/svg%3e";function j(M,e){M.component(s$1=>{var c;let d,b,E=e.wrapper,w=e.version,k=e.initial_height,r=e.fill_width,H=e.is_embed,_=e.space,p=e.display,g=e.info,F=e.loaded,u=fallback(e.pages,()=>[],true),Z=fallback(e.current_page,""),y=e.root,W=fallback(e.components,()=>[],true),f=W.find(i=>i.type==="navbar"),l=f?{visible:f.props.visible,main_page_name:f.props.main_page_name,value:f.props.value}:null;l&&ls.set(l);function V(i){let n=i.split("?")[0].split("#")[0];return n=n.replace(/^\/+|\/+$/g,""),n}function S(i,n){return i.startsWith("http://")||i.startsWith("https://")?false:V(i)===V(n)}if(store_get(c??={},"$navbar_config",ls)&&(l={visible:store_get(c??={},"$navbar_config",ls).visible??true,main_page_name:store_get(c??={},"$navbar_config",ls).main_page_name??"Home",value:store_get(c??={},"$navbar_config",ls).value??null}),d=u.length>1&&(l===null||l.visible!==false),b=(()=>{let i=u.filter(([o,a,h],v)=>v===0&&o===""?l?.main_page_name!==false:h!==false),n=l&&l.main_page_name!==false&&l.main_page_name!=="Home"?i.map(([o,a,h],v)=>v===0&&o===""&&a==="Home"?[o,l.main_page_name]:[o,a]):i.map(([o,a])=>[o,a]);if(l?.value&&l.value.length>0){const o=new Set(n.map(([h])=>h)),a=l.value.map(([h,v])=>[v,h]).filter(([h])=>!o.has(h));return [...n,...a]}return n})(),s$1.push(`<div${attr_class(`gradio-container gradio-container-${stringify(w)}`,"svelte-99kmwu",{fill_width:r,"embed-container":p,"with-info":g})} data-iframe-height=""${attr_style("",{"min-height":F?"initial":k,"flex-grow":p?"auto":"1"})}>`),d){s$1.push("<!--[-->"),s$1.push(`<div class="nav-holder svelte-99kmwu"><nav${attr_class("fillable svelte-99kmwu",void 0,{fill_width:r})}><!--[-->`);const i=ensure_array_like(b);for(let n=0,o=i.length;n<o;n++){let[a,h]=i[n];s$1.push(`<a${attr("href",a.startsWith("http://")||a.startsWith("https://")?a:`${y}/${a}`)} data-sveltekit-reload=""${attr("target",a.startsWith("http://")||a.startsWith("https://")?"_blank":"_self")}${attr("rel",a.startsWith("http://")||a.startsWith("https://")?"noopener noreferrer":"")}${attr_class("svelte-99kmwu",void 0,{active:S(a,Z)})}>${escape_html(h)}</a>`);}s$1.push("<!--]--></nav></div>");}else s$1.push("<!--[!-->");s$1.push(`<!--]--> <div${attr_class("main fillable svelte-99kmwu",void 0,{fill_width:r,app:!p&&!H})}><!--[-->`),slot(s$1,e,"default",{},null),s$1.push("<!--]--> <div>"),p&&_&&g?(s$1.push("<!--[-->"),s$1.push(`<div class="info svelte-99kmwu"><span class="svelte-99kmwu"><a${attr("href",`https://huggingface.co/spaces/${stringify(_)}`)} class="title svelte-99kmwu">${escape_html(_)}</a></span> <span class="svelte-99kmwu">${escape_html(store_get(c??={},"$_",pr)("common.built_with"))} <a class="gradio svelte-99kmwu" href="https://gradio.app">Gradio</a>.</span> <span class="svelte-99kmwu">${escape_html(store_get(c??={},"$_",pr)("common.hosted_on"))} <a class="hf svelte-99kmwu" href="https://huggingface.co/spaces"><span class="space-logo svelte-99kmwu"><img${attr("src",z)} alt="Hugging Face Space" class="svelte-99kmwu"/></span> Spaces</a></span></div>`)):s$1.push("<!--[!-->"),s$1.push("<!--]--></div></div></div>"),c&&unsubscribe_stores(c),bind_props(e,{wrapper:E,version:w,initial_height:k,fill_width:r,is_embed:H,space:_,display:p,info:g,loaded:F,pages:u,current_page:Z,root:y,components:W});});}

export { j };
//# sourceMappingURL=Embed-nr914GT1.js.map
