PageSourceSearch

https://mrbajaj-mersy-legal-ai.hf.space/assets/Blocks-BXkusghy.js

js mrbajaj-mersy-legal-ai.hf.space collected 2026-10-03 17:10:09 UTC 109,476 bytes, 98 lines download raw bytes

1import{$ as Qn,s as Dl,l as Po,k as Io,b as Oo,o as Do,q as Fo,c as Uo,p as ti,A as ni}from"./index-JknPi_fQ.js";import{B as Jn}from"./Button-iTFUlR-X.js";import{L as Ws}from"./index-9SlBuhZX.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-BOpxTcdu.js";import"./MarkdownCode.svelte_svelte_type_style_lang-D57LCKne.js";import"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";import{B as hn}from"./Block-DZqtZLFP.js";import{c as Ro}from"./Dropdown-DgIUWhOQ.js";/* empty css                                              */import{T as Bo}from"./Toast-DakLcehk.js";import{G as Go}from"./utils-BsGrhMNe.js";import"./svelte/svelte.js";import"./Image-CsmDAdIf.js";import"./file-url-DgijyRSD.js";import"./context-TgWPFwN2.js";/* empty css                                                   *//* empty css                                                   */import"./IconButton-B-aAVSzy.js";import"./Clear-By3xiIwg.js";import"./prism-python-RepOAllt.js";import"./index-JjiBz4M5.js";import"./BlockTitle-BzTugq2O.js";import"./Info-C3cBOn-b.js";import"./MarkdownCode-B4-rCAOi.js";import"./DropdownArrow-dYuMZY9s.js";const{SvelteComponent:Ho,append:_l,attr:rt,detach:Vo,init:Wo,insert:Zo,noop:ul,safe_not_equal:Qo,set_style:on,svg_element:En}=window.__gradio__svelte__internal;function Jo(l){let e,t,n,i;return{c(){e=En("svg"),t=En("g"),n=En("path"),i=En("path"),rt(n,"d","M3.789,0.09C3.903,-0.024 4.088,-0.024 4.202,0.09L4.817,0.705C4.931,0.819 4.931,1.004 4.817,1.118L1.118,4.817C1.004,4.931 0.819,4.931 0.705,4.817L0.09,4.202C-0.024,4.088 -0.024,3.903 0.09,3.789L3.789,0.09Z"),rt(i,"d","M4.825,3.797C4.934,3.907 4.934,4.084 4.825,4.193L4.193,4.825C4.084,4.934 3.907,4.934 3.797,4.825L0.082,1.11C-0.027,1.001 -0.027,0.823 0.082,0.714L0.714,0.082C0.823,-0.027 1.001,-0.027 1.11,0.082L4.825,3.797Z"),rt(e,"width","100%"),rt(e,"height","100%"),rt(e,"viewBox","0 0 5 5"),rt(e,"version","1.1"),rt(e,"xmlns","http://www.w3.org/2000/svg"),rt(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),rt(e,"xml:space","preserve"),on(e,"fill","currentColor"),on(e,"fill-rule","evenodd"),on(e,"clip-rule","evenodd"),on(e,"stroke-linejoin","round"),on(e,"stroke-miterlimit","2")},m(s,o){Zo(s,e,o),_l(e,t),_l(t,n),_l(t,i)},p:ul,i:ul,o:ul,d(s){s&&Vo(e)}}}class Fl extends Ho{constructor(e){super(),Wo(this,e,null,Jo,Qo,{})}}const{SvelteComponent:Yo,append:ut,attr:Sn,create_component:Ko,destroy_component:Xo,detach:fl,element:Rt,flush:xo,init:er,insert:pl,listen:tr,mount_component:nr,safe_not_equal:lr,set_data:ir,space:ml,text:li,transition_in:sr,transition_out:or}=window.__gradio__svelte__internal,{createEventDispatcher:rr}=window.__gradio__svelte__internal;function ar(l){let e,t,n,i,s,o,a,c,r,_,u,d,p,b,m;return d=new Fl({}),{c(){e=Rt("div"),t=Rt("h1"),t.textContent="API Docs",n=ml(),i=Rt("p"),s=li(`No API Routes found for
2		`),o=Rt("code"),a=li(l[0]),c=ml(),r=Rt("p"),r.innerHTML=`To expose an API endpoint of your app in this page, set the <code>api_name</code>
3		parameter of the event listener.
4		<br/>
5		For more information, visit the
6		<a href="https://gradio.app/sharing_your_app/#api-page" target="_blank">API Page guide</a>
7		. To hide the API documentation button and this page, set
8		<code>show_api=False</code>
9		in the
10		<code>Blocks.launch()</code>
11		method.`,_=ml(),u=Rt("button"),Ko(d.$$.fragment),Sn(o,"class","svelte-e1ha0f"),Sn(i,"class","attention svelte-e1ha0f"),Sn(e,"class","wrap prose svelte-e1ha0f"),Sn(u,"class","svelte-e1ha0f")},m($,f){pl($,e,f),ut(e,t),ut(e,n),ut(e,i),ut(i,s),ut(i,o),ut(o,a),ut(e,c),ut(e,r),pl($,_,f),pl($,u,f),nr(d,u,null),p=!0,b||(m=tr(u,"click",l[2]),b=!0)},p($,[f]){(!p||f&1)&&ir(a,$[0])},i($){p||(sr(d.$$.fragment,$),p=!0)},o($){or(d.$$.fragment,$),p=!1},d($){$&&(fl(e),fl(_),fl(u)),Xo(d),b=!1,m()}}}function cr(l,e,t){const n=rr();let{root:i}=e;const s=()=>n("close");return l.$$set=o=>{"root"in o&&t(0,i=o.root)},[i,n,s]}class _r extends Yo{constructor(e){super(),er(this,e,cr,ar,lr,{root:0})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),xo()}}const Zs="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9425%202.94265C27.4632%202.42195%2027.4632%201.57773%2026.9425%201.05703C26.4218%200.536329%2025.5776%200.536329%2025.0569%201.05703L22.5713%203.54256C21.1213%202.59333%2019.5367%202.43378%2018.1753%202.64006C16.5495%202.88638%2015.1127%203.66838%2014.3905%204.39053L12.3905%206.39053C12.1405%206.64058%2012%206.97972%2012%207.33334C12%207.68697%2012.1405%208.0261%2012.3905%208.27615L19.7239%2015.6095C20.2446%2016.1302%2021.0888%2016.1302%2021.6095%2015.6095L23.6095%2013.6095C24.3316%2012.8873%2025.1136%2011.4505%2025.36%209.82475C25.5663%208.46312%2025.4066%206.87827%2024.4571%205.42807L26.9425%202.94265Z'%20fill='%233c4555'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.276%2012.9426C12.7967%2012.4219%2012.7967%2011.5777%2012.276%2011.057C11.7553%2010.5363%2010.9111%2010.5363%2010.3904%2011.057L8.66651%2012.7809L8.27615%2012.3905C8.0261%2012.1405%207.68697%2012%207.33334%2012C6.97972%2012%206.64058%2012.1405%206.39053%2012.3905L4.39053%2014.3905C3.66838%2015.1127%202.88638%2016.5495%202.64006%2018.1753C2.43377%2019.5367%202.59333%2021.1214%203.54262%2022.5714L1.05703%2025.057C0.536329%2025.5777%200.536329%2026.4219%201.05703%2026.9426C1.57773%2027.4633%202.42195%2027.4633%202.94265%2026.9426L5.42817%2024.4571C6.87835%2025.4066%208.46315%2025.5663%209.82475%2025.36C11.4505%2025.1136%2012.8873%2024.3316%2013.6095%2023.6095L15.6095%2021.6095C16.1302%2021.0888%2016.1302%2020.2446%2015.6095%2019.7239L15.2188%2019.3332L16.9426%2017.6093C17.4633%2017.0886%2017.4633%2016.2444%2016.9426%2015.7237C16.4219%2015.203%2015.5777%2015.203%2015.057%2015.7237L13.3332%2017.4475L10.5521%2014.6665L12.276%2012.9426Z'%20fill='%23FF7C00'/%3e%3c/svg%3e",{SvelteComponent:ur,append:Ue,attr:Ke,create_component:ii,destroy_component:si,detach:It,element:Xe,flush:oi,init:fr,insert:Ot,listen:pr,mount_component:ri,noop:mr,safe_not_equal:dr,set_data:ai,space:un,src_url_equal:hr,text:fn,transition_in:ci,transition_out:_i}=window.__gradio__svelte__internal,{createEventDispatcher:gr}=window.__gradio__svelte__internal;function br(l){let e,t,n;return{c(){e=Xe("div"),t=un(),n=Xe("p"),n.textContent="API Recorder",Ke(e,"class","loading-dot self-baseline svelte-1i1gjw2"),Ke(n,"class","self-baseline btn-text svelte-1i1gjw2")},m(i,s){Ot(i,e,s),Ot(i,t,s),Ot(i,n,s)},p:mr,d(i){i&&(It(e),It(t),It(n))}}}function ui(l){let e;return{c(){e=fn("s")}
vendor: 19,983 bytes, lines 11-27
11,m(t,n){Ot(t,e,n)},d(t){t&&It(e)}}}function vr(l){let e,t,n,i,s,o,a,c,r,_,u,d,p,b,m,$,f,k,y,g,w,v,h;u=new Jn({props:{size:"sm",variant:"secondary",elem_id:"start-api-recorder",$$slots:{default:[br]},$$scope:{ctx:l}}}),u.$on("click",l[3]);let E=l[1]>1&&ui();return g=new Fl({}),{c(){e=Xe("h2"),t=Xe("img"),i=un(),s=Xe("div"),o=fn(`API documentation
12		`),a=Xe("div"),c=fn(l[0]),r=un(),_=Xe("span"),ii(u.$$.fragment),d=un(),p=Xe("p"),b=Xe("span"),m=fn(l[1]),$=fn(" API endpoint"),E&&E.c(),f=Xe("br"),k=un(),y=Xe("button"),ii(g.$$.fragment),hr(t.src,n=Zs)||Ke(t,"src",n),Ke(t,"alt",""),Ke(t,"class","svelte-1i1gjw2"),Ke(a,"class","url svelte-1i1gjw2"),Ke(s,"class","title svelte-1i1gjw2"),Ke(b,"class","url svelte-1i1gjw2"),Ke(_,"class","counts svelte-1i1gjw2"),Ke(e,"class","svelte-1i1gjw2"),Ke(y,"class","svelte-1i1gjw2")},m(S,C){Ot(S,e,C),Ue(e,t),Ue(e,i),Ue(e,s),Ue(s,o),Ue(s,a),Ue(a,c),Ue(e,r),Ue(e,_),ri(u,_,null),Ue(_,d),Ue(_,p),Ue(p,b),Ue(b,m),Ue(p,$),E&&E.m(p,null),Ue(p,f),Ot(S,k,C),Ot(S,y,C),ri(g,y,null),w=!0,v||(h=pr(y,"click",l[4]),v=!0)},p(S,[C]){(!w||C&1)&&ai(c,S[0]);const z={};C&32&&(z.$$scope={dirty:C,ctx:S}),u.$set(z),(!w||C&2)&&ai(m,S[1]),S[1]>1?E||(E=ui(),E.c(),E.m(p,f)):E&&(E.d(1),E=null)},i(S){w||(ci(u.$$.fragment,S),ci(g.$$.fragment,S),w=!0)},o(S){_i(u.$$.fragment,S),_i(g.$$.fragment,S),w=!1},d(S){S&&(It(e),It(k),It(y)),si(u),E&&E.d(),si(g),v=!1,h()}}}function $r(l,e,t){let{root:n}=e,{api_count:i}=e;const s=gr(),o=()=>s("close",{api_recorder_visible:!0}),a=()=>s("close");return l.$$set=c=>{"root"in c&&t(0,n=c.root),"api_count"in c&&t(1,i=c.api_count)},[n,i,s,o,a]}class kr extends ur{constructor(e){super(),fr(this,e,$r,vr,dr,{root:0,api_count:1})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),oi()}get api_count(){return this.$$.ctx[1]}set api_count(e){this.$$set({api_count:e}),oi()}}function Qe(l,e,t=null){return e===void 0?t==="py"?"None":null:l===null&&t==="py"?"None":e==="string"||e==="str"?t===null?l:'"'+l+'"':e==="number"?t===null?parseFloat(l):l:e==="boolean"||e=="bool"?t==="py"?(l=String(l),l==="true"?"True":"False"):t==="js"||t==="bash"?l:l==="true":e==="List[str]"?(l=JSON.stringify(l),l):e.startsWith("Literal['")?'"'+l+'"':t===null?l===""?null:JSON.parse(l):typeof l=="string"?l===""?t==="py"?"None":"null":l:(t==="bash"&&(l=ql(l)),t==="py"&&(l=El(l)),wr(l))}function Qs(l){if(typeof l=="object"&&l!==null&&l.hasOwnProperty("url")&&l.hasOwnProperty("meta")&&typeof l.meta=="object"&&l.meta!==null&&l.meta._type==="gradio.FileData")return!0;if(typeof l=="object"&&l!==null){for(let e in l)if(typeof l[e]=="object"&&Qs(l[e]))return!0}return!1}function ql(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&"url"in l&&l.url&&"meta"in l&&l.meta?._type==="gradio.FileData"?{path:l.url}:(Array.isArray(l)?l.forEach((e,t)=>{typeof e=="object"&&e!==null&&(l[t]=ql(e))}):typeof l=="object"&&l!==null&&Object.keys(l).forEach(e=>{l[e]=ql(l[e])}),l)}function El(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&"url"in l&&l.url&&"meta"in l&&l.meta?._type==="gradio.FileData"?`handle_file('${l.url}')`:(Array.isArray(l)?l.forEach((e,t)=>{typeof e=="object"&&e!==null&&(l[t]=El(e))}):typeof l=="object"&&l!==null&&Object.keys(l).forEach(e=>{l[e]=El(l[e])}),l)}function wr(l){let e=JSON.stringify(l,(i,s)=>s===null?"UNQUOTEDNone":typeof s=="string"&&s.startsWith("handle_file(")&&s.endsWith(")")?`UNQUOTED${s}`:s);const t=/"UNQUOTEDhandle_file\(([^)]*)\)"/g;e=e.replace(t,(i,s)=>`handle_file(${s})`);const n=/"UNQUOTEDNone"/g;return e.replace(n,"None")}const{SvelteComponent:yr,append:_e,attr:mt,check_outros:Cr,create_component:qr,destroy_component:Er,destroy_each:Sr,detach:ze,element:Ge,empty:Js,ensure_array_like:fi,flush:zn,group_outros:zr,init:jr,insert:je,mount_component:Lr,noop:Nr,safe_not_equal:Ar,set_data:dt,set_style:Nt,space:At,text:Pe,toggle_class:pi,transition_in:Mn,transition_out:Sl}=window.__gradio__svelte__internal;function mi(l,e,t){const n=l.slice();return n[4]=e[t].label,n[5]=e[t].python_type,n[6]=e[t].component,n[7]=e[t].parameter_name,n[8]=e[t].parameter_has_default,n[9]=e[t].parameter_default,n[11]=t,n}function di(l){let e;return{c(){e=Pe("s")},m(t,n){je(t,e,n)},d(t){t&&ze(e)}}}function Tr(l){let e=(l[2][l[11]].type||"any")+"",t;return{c(){t=Pe(e)},m(n,i){je(n,t,i)},p(n,i){i&4&&e!==(e=(n[2][n[11]].type||"any")+"")&&dt(t,e)},d(n){n&&ze(t)}}}function Mr(l){let e=l[5].type+"",t,n,i=l[8]&&l[9]===null&&hi();return{c(){t=Pe(e),i&&i.c(),n=Js()},m(s,o){je(s,t,o),i&&i.m(s,o),je(s,n,o)},p(s,o){o&2&&e!==(e=s[5].type+"")&&dt(t,e),s[8]&&s[9]===null?i||(i=hi(),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(s){s&&(ze(t),ze(n)),i&&i.d(s)}}}function hi(l){let e;return{c(){e=Pe(` |
13							None`)},m(t,n){je(t,e,n)},d(t){t&&ze(e)}}}function Pr(l){let e,t,n=Qe(l[9],l[5].type,"py")+"",i;return{c(){e=Ge("span"),e.textContent="Default: ",t=Ge("span"),i=Pe(n),mt(t,"class","code svelte-1yt946s"),Nt(t,"font-size","var(--text-sm)")},m(s,o){je(s,e,o),je(s,t,o),_e(t,i)},p(s,o){o&2&&n!==(n=Qe(s[9],s[5].type,"py")+"")&&dt(i,n)},d(s){s&&(ze(e),ze(t))}}}function Ir(l){let e;return{c(){e=Ge("span"),e.textContent="Required",Nt(e,"font-weight","bold")},m(t,n){je(t,e,n)},p:Nr,d(t){t&&ze(e)}}}function gi(l){let e,t,n,i,s,o=(l[3]!=="bash"&&l[7]?l[7]:"["+l[11]+"]")+"",a,c,r,_,u,d,p,b=l[4]+"",m,$,f=l[6]+"",k,y,g=l[5].description+"",w,v;function h(L,M){return L[3]==="python"?Mr:Tr}let E=h(l),S=E(l);function C(L,M){return!L[8]||L[3]=="bash"?Ir:Pr}let z=C(l),A=z(l);return{c(){e=Ge("hr"),t=At(),n=Ge("div"),i=Ge("p"),s=Ge("span"),a=Pe(o),c=At(),r=Ge("span"),S.c(),_=At(),A.c(),u=At(),d=Ge("p"),p=Pe('The input value that is provided in the "'),m=Pe(b),$=Pe('" '),k=Pe(f),y=Pe(`
14				component. `),w=Pe(g),v=At(),mt(e,"class","hr svelte-1yt946s"),mt(s,"class","code svelte-1yt946s"),Nt(s,"margin-right","10px"),mt(r,"class","code highlight svelte-1yt946s"),Nt(r,"margin-right","10px"),Nt(i,"white-space","nowrap"),Nt(i,"overflow-x","auto"),mt(d,"class","desc svelte-1yt946s"),Nt(n,"margin","10px")},m(L,M){je(L,e,M),je(L,t,M),je(L,n,M),_e(n,i),_e(i,s),_e(s,a),_e(i,c),_e(i,r),S.m(r,null),_e(i,_),A.m(i,null),_e(n,u),_e(n,d),_e(d,p),_e(d,m),_e(d,$),_e(d,k),_e(d,y),_e(d,w),_e(n,v)},p(L,M){M&10&&o!==(o=(L[3]!=="bash"&&L[7]?L[7]:"["+L[11]+"]")+"")&&dt(a,o),E===(E=h(L))&&S?S.p(L,M):(S.d(1),S=E(L),S&&(S.c(),S.m(r,null))),z===(z=C(L))&&A?A.p(L,M):(A.d(1),A=z(L),A&&(A.c(),A.m(i,null))),M&2&&b!==(b=L[4]+"")&&dt(m,b),M&2&&f!==(f=L[6]+"")&&dt(k,f),M&2&&g!==(g=L[5].description+"")&&dt(w,g)},d(L){L&&(ze(e),ze(t),ze(n)),S.d(),A.d()}}}function bi(l){let e,t,n;return t=new Ws({props:{margin:!1}}),{c(){e=Ge("div"),qr(t.$$.fragment),mt(e,"class","load-wrap")},m(i,s){je(i,e,s),Lr(t,e,null),n=!0},i(i){n||(Mn(t.$$.fragment,i),n=!0)},o(i){Sl(t.$$.fragment,i),n=!1},d(i){i&&ze(e),Er(t)}}}function Or(l){let e,t,n,i=l[1].length+"",s,o,a,c,r,_,u,d,p=l[1].length!=1&&di(),b=fi(l[1]),m=[];for(let f=0;f<b.length;f+=1)m[f]=gi(mi(l,b,f));let $=l[0]&&bi();return{c(){e=Ge("h4"),t=Ge("div"),t.innerHTML='<div class="toggle-dot svelte-1yt946s"></div>',n=Pe(`
15	Accepts `),s=Pe(i),o=Pe(" parameter"),p&&p.c(),a=Pe(":"),c=At(),r=Ge("div");for(let f=0;f<m.length;f+=1)m[f].c();_=At(),$&&$.c(),u=Js(),mt(t,"class","toggle-icon svelte-1yt946s"),mt(e,"class","svelte-1yt946s"),pi(r,"hide",l[0])},m(f,k){je(f,e,k),_e(e,t),_e(e,n),_e(e,s),_e(e,o),p&&p.m(e,null),_e(e,a),je(f,c,k),je(f,r,k);for(let y=0;y<m.length;y+=1)m[y]&&m[y].m(r,null);je(f,_,k),$&&$.m(f,k),je(f,u,k),d=!0},p(f,[k]){if((!d||k&2)&&i!==(i=f[1].length+"")&&dt(s,i),f[1].length!=1?p||(p=di(),p.c(),p.m(e,a)):p&&(p.d(1),p=null),k&14){b=fi(f[1]);let y;for(y=0;y<b.length;y+=1){const g=mi(f,b,y);m[y]?m[y].p(g,k):(m[y]=gi(g),m[y].c(),m[y].m(r,null))}for(;y<m.length;y+=1)m[y].d(1);m.length=b.length}(!d||k&1)&&pi(r,"hide",f[0]),f[0]?$?k&1&&Mn($,1):($=bi(),$.c(),Mn($,1),$.m(u.parentNode,u)):$&&(zr(),Sl($,1,1,()=>{$=null}),Cr())},i(f){d||(Mn($),d=!0)},o(f){Sl($),d=!1},d(f){f&&(ze(e),ze(c),ze(r),ze(_),ze(u)),p&&p.d(),Sr(m,f),$&&$.d(f)}}}function Dr(l,e,t){let{is_running:n}=e,{endpoint_returns:i}=e,{js_returns:s}=e,{current_language:o}=e;return l.$$set=a=>{"is_running"in a&&t(0,n=a.is_running),"endpoint_returns"in a&&t(1,i=a.endpoint_returns),"js_returns"in a&&t(2,s=a.js_returns),"current_language"in a&&t(3,o=a.current_language)},[n,i,s,o]}class Fr extends yr{constructor(e){super(),jr(this,e,Dr,Or,Ar,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}get is_running(){return this.$$.ctx[0]}set is_running(e){this.$$set({is_running:e}),zn()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),zn()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),zn()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),zn()}}const{SvelteComponent:Ur,create_component:Rr,destroy_component:Br,detach:Gr,flush:Hr,init:Vr,insert:Wr,mount_component:Zr,safe_not_equal:Qr,set_data:Jr,text:Yr,transition_in:Kr,transition_out:Xr}=window.__gradio__svelte__internal;function xr(l){let e;return{c(){e=Yr(l[0])},m(t,n){Wr(t,e,n)},p(t,n){n&1&&Jr(e,t[0])},d(t){t&&Gr(e)}}}function ea(l){let e,t;return e=new Jn({props:{size:"sm",$$slots:{default:[xr]},$$scope:{ctx:l}}}),e.$on("click",l[1]),{c(){Rr(e.$$.fragment)},m(n,i){Zr(e,n,i),t=!0},p(n,[i]){const s={};i&9&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Kr(e.$$.fragment,n),t=!0)},o(n){Xr(e.$$.fragment,n),t=!1},d(n){Br(e,n)}}}function ta(l,e,t){let{code:n}=e,i="copy";function s(){navigator.clipboard.writeText(n),t(0,i="copied!"),setTimeout(()=>{t(0,i="copy")},1500)}return l.$$set=o=>{"code"in o&&t(2,n=o.code)},[i,s,n]}class _t extends Ur{constructor(e){super(),Vr(this,e,ta,ea,Qr,{code:2})}get code(){return this.$$.ctx[2]}set code(e){this.$$set({code:e}),Hr()}}const{SvelteComponent:na,append:Ul,attr:Ft,check_outros:la,create_component:Yn,destroy_component:Kn,detach:tt,element:nt,flush:ia,group_outros:sa,init:oa,insert:lt,mount_component:Xn,noop:Rl,safe_not_equal:ra,space:Bl,transition_in:Zt,transition_out:Qt}=window.__gradio__svelte__internal;function aa(l){let e,t,n,i,s,o;return t=new _t({props:{code:ki}}),{c(){e=nt("div"),Yn(t.$$.fragment),n=Bl(),i=nt("div"),s=nt("pre"),s.textContent=`$ ${ki}`,Ft(e,"class","copy svelte-hq8ezf"),Ft(s,"class","svelte-hq8ezf")},m(a,c){lt(a,e,c),Xn(t,e,null),lt(a,n,c),lt(a,i,c),Ul(i,s),o=!0},p:Rl,i(a){o||(Zt(t.$$.fragment,a),o=!0)},o(a){Qt(t.$$.fragment,a),o=!1},d(a){a&&(tt(e),tt(n),tt(i)),Kn(t)}}}function ca(l){let e,t,n,i,s,o;return t=new _t({props:{code:$i}}),{c(){e=nt("div"),Yn(t.$$.fragment),n=Bl(),i=nt("div"),s=nt("pre"),s.textContent=`$ ${$i}`,Ft(e,"class","copy svelte-hq8ezf"),Ft(s,"class","svelte-hq8ezf")},m(a,c){lt(a,e,c),Xn(t,e,null),lt(a,n,c),lt(a,i,c),Ul(i,s),o=!0},p:Rl,i(a){o||(Zt(t.$$.fragment,a),o=!0)},o(a){Qt(t.$$.fragment,a),o=!1},d(a){a&&(tt(e),tt(n),tt(i)),Kn(t)}}}function _a(l){let e,t,n,i,s,o;return t=new _t({props:{code:vi}}),{c(){e=nt("div"),Yn(t.$$.fragment),n=Bl(),i=nt("div"),s=nt("pre"),s.textContent=`$ ${vi}`,Ft(e,"class","copy svelte-hq8ezf"),Ft(s,"class","svelte-hq8ezf")},m(a,c){lt(a,e,c),Xn(t,e,null),lt(a,n,c),lt(a,i,c),Ul(i,s),o=!0},p:Rl,i(a){o||(Zt(t.$$.fragment,a),o=!0)},o(a){Qt(t.$$.fragment,a),o=!1},d(a){a&&(tt(e),tt(n),tt(i)),Kn(t)}}}function ua(l){let e,t,n,i;const s=[_a,ca,aa],o=[];function a(c,r){return c[0]==="python"?0:c[0]==="javascript"?1:c[0]==="bash"?2:-1}return~(t=a(l))&&(n=o[t]=s[t](l)),{c(){e=nt("code"),n&&n.c(),Ft(e,"class","svelte-hq8ezf")},m(c,r){lt(c,e,r),~t&&o[t].m(e,null),i=!0},p(c,r){let _=t;t=a(c),t===_?~t&&o[t].p(c,r):(n&&(sa(),Qt(o[_],1,1,()=>{o[_]=null}),la()),~t?(n=o[t],n?n.p(c,r):(n=o[t]=s[t](c),n.c()),Zt(n,1),n.m(e,null)):n=null)},i(c){i||(Zt(n),i=!0)},o(c){Qt(n),i=!1},d(c){c&&tt(e),~t&&o[t].d()}}}function fa(l){let e,t;return e=new hn({props:{$$slots:{default:[ua]},$$scope:{ctx:l}}}),{c(){Yn(e.$$.fragment)},m(n,i){Xn(e,n,i),t=!0},p(n,[i]){const s={};i&3&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Zt(e.$$.fragment,n),t=!0)},o(n){Qt(e.$$.fragment,n),t=!1},d(n){Kn(e,n)}}}let vi="pip install gradio_client",$i="npm i -D @gradio/client",ki="curl --version";function pa(l,e,t){let{current_language:n}=e;return l.$$set=i=>{"current_language"in i&&t(0,n=i.current_language)},[n]}class ma extends na{constructor(e){super(),oa(this,e,pa,fa,ra,{current_language:0})}get current_language(){return this.$$.ctx[0]}set current_language(e){this.$$set({current_language:e}),ia()}}const{SvelteComponent:da,append:Vt,attr:Dn,detach:Gl,element:Fn,empty:ha,flush:dl,init:ga,insert:Hl,noop:wi,safe_not_equal:ba,set_data:Ys,text:Un}=window.__gradio__svelte__internal;function va(l){let e,t,n,i;return{c(){e=Fn("h3"),t=Un(`fn_index:
16		`),n=Fn("span"),i=Un(l[1]),Dn(n,"class","post svelte-41kcm6"),Dn(e,"class","svelte-41kcm6")},m(s,o){Hl(s,e,o),Vt(e,t),Vt(e,n),Vt(n,i)},p(s,o){o&2&&Ys(i,s[1])},d(s){s&&Gl(e)}}}function $a(l){let e,t,n,i="/"+l[0],s;return{c(){e=Fn("h3"),t=Un(`api_name:
17		`),n=Fn("span"),s=Un(i),Dn(n,"class","post svelte-41kcm6"),Dn(e,"class","svelte-41kcm6")},m(o,a){Hl(o,e,a),Vt(e,t),Vt(e,n),Vt(n,s)},p(o,a){a&1&&i!==(i="/"+o[0])&&Ys(s,i)},d(o){o&&Gl(e)}}}function ka(l){let e;function t(s,o){return s[2]?$a:va}let n=t(l),i=n(l);return{c(){i.c(),e=ha()},m(s,o){i.m(s,o),Hl(s,e,o)},p(s,[o]){n===(n=t(s))&&i?i.p(s,o):(i.d(1),i=n(s),i&&(i.c(),i.m(e.parentNode,e)))},i:wi,o:wi,d(s){s&&Gl(e),i.d(s)}}}function wa(l,e,t){let{api_name:n=null}=e,{fn_index:i=null}=e,{named:s}=e;return l.$$set=o=>{"api_name"in o&&t(0,n=o.api_name),"fn_index"in o&&t(1,i=o.fn_index),"named"in o&&t(2,s=o.named)},[n,i,s]}class Ks extends da{constructor(e){super(),ga(this,e,wa,ka,ba,{api_name:0,fn_index:1,named:2})}get api_name(){return this.$$.ctx[0]}set api_name(e){this.$$set({api_name:e}),dl()}get fn_index(){return this.$$.ctx[1]}set fn_index(e){this.$$set({fn_index:e}),dl()}get named(){return this.$$.ctx[2]}set named(e){this.$$set({named:e}),dl()}}const{SvelteComponent:ya,append:N,attr:fe,binding_callbacks:hl,check_outros:yi,create_component:kt,destroy_component:wt,destroy_each:Rn,detach:H,element:re,empty:Xs,ensure_array_like:ht,flush:at,group_outros:Ci,init:Ca,insert:V,mount_component:yt,noop:qa,safe_not_equal:Ea,set_data:be,space:xn,text:j,transition_in:Je,transition_out:Ye}=window.__gradio__svelte__internal;function qi(l,e,t){const n=l.slice();return n[28]=e[t].label,n[23]=e[t].parameter_name,n[29]=e[t].type,n[21]=e[t].python_type,n[30]=e[t].component,n[22]=e[t].example_input,n[31]=e[t].serializer,n[27]=t,n}function Ei(l,e,t){const n=l.slice();return n[28]=e[t].label,n[23]=e[t].parameter_name,n[29]=e[t].type,n[21]=e[t].python_type,n[30]=e[t].component,n[22]=e[t].example_input,n[31]=e[t].serializer,n[27]=t,n}function Si(l,e,t){const n=l.slice();return n[30]=e[t].component,n[22]=e[t].example_input,n[27]=t,n}function zi(l,e,t){const n=l.slice();return n[21]=e[t].python_type,n[22]=e[t].example_input,n[23]=e[t].parameter_name,n[24]=e[t].parameter_has_default,n[25]=e[t].parameter_default,n[27]=t,n}function Sa(l){let e,t;return e=new Ks({props:{named:l[5],fn_index:l[1]}}),{c(){kt(e.$$.fragment)},m(n,i){yt(e,n,i),t=!0},p(n,i){const s={};i[0]&32&&(s.named=n[5]),i[0]&2&&(s.fn_index=n[1]),e.$set(s)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){wt(e,n)}}}function za(l){let e,t;return e=new Ks({props:{named:l[5],api_name:l[0].api_name}}),{c(){kt(e.$$.fragment)},m(n,i){yt(e,n,i),t=!0},p(n,i){const s={};i[0]&32&&(s.named=n[5]),i[0]&1&&(s.api_name=n[0].api_name),e.$set(s)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){wt(e,n)}}}function ja(l){let e,t;return e=new hn({props:{$$slots:{default:[Aa]},$$scope:{ctx:l}}}),{c(){kt(e.$$.fragment)},m(n,i){yt(e,n,i),t=!0},p(n,i){const s={};i[0]&7185|i[1]&16&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){wt(e,n)}}}function La(l){let e,t;return e=new hn({props:{$$slots:{default:[Oa]},$$scope:{ctx:l}}}),{c(){kt(e.$$.fragment)},m(n,i){yt(e,n,i),t=!0},p(n,i){const s={};i[0]&639|i[1]&16&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){wt(e,n)}}}function Na(l){let e,t;return e=new hn({props:{$$slots:{default:[Fa]},$$scope:{ctx:l}}}),{c(){kt(e.$$.fragment)},m(n,i){yt(e,n,i),t=!0},p(n,i){const s={};i[0]&349|i[1]&16&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){wt(e,n)}}}function ji(l){let e;return{c(){e=j(",")},m(t,n){V(t,e,n)},d(t){t&&H(e)}}}function Li(l){let e,t=Qe(l[22],l[21].type,"bash")+"",n,i,s=l[27]<l[4].length-1&&ji();return{c(){e=j(`
18							`),n=j(t),s&&s.c(),i=Xs()},m(o,a){V(o,e,a),V(o,n,a),s&&s.m(o,a),V(o,i,a)},p(o,a){a[0]&16&&t!==(t=Qe(o[22],o[21].type,"bash")+"")&&be(n,t),o[27]<o[4].length-1?s||(s=ji(),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&(H(e),H(n),H(i)),s&&s.d(o)}}}function Aa(l){let e,t,n,i,s,o,a,c,r,_,u=l[0].api_name+"",d,p,b="{",m,$,f,k="}",y,g,w="{",v,h,E="}",S,C,z,A,L,M=l[0].api_name+"",Z,ke,K;n=new _t({props:{code:l[10]?.innerText}});let W=ht(l[4]),te=[];for(let R=0;R<W.length;R+=1)te[R]=Li(qi(l,W,R));return{c(){e=re("code"),t=re("div"),kt(n.$$.fragment),i=xn(),s=re("div"),o=re("pre"),a=j("curl -X POST "),c=j(l[11]),r=j(l[12]),_=j("/call/"),d=j(u),p=j(` -s -H "Content-Type: application/json" -d '`),m=j(b),$=j(`
19  "data": [`);for(let R=0;R<te.length;R+=1)te[R].c();f=j(`
20]`),y=j(k),g=j(`' \\
21  | awk -F'"' '`),v=j(w),h=j(" print $4"),S=j(E),C=j(`'  \\
22  | read EVENT_ID; curl -N `),z=j(l[11]),A=j(l[12]),L=j("/call/"),Z=j(M),ke=j("/$EVENT_ID"),fe(t,"class","copy svelte-114qcyq"),fe(o,"class","svelte-114qcyq"),fe(e,"class","svelte-114qcyq")},m(R,ie){V(R,e,ie),N(e,t),yt(n,t,null),N(e,i),N(e,s),N(s,o),N(o,a),N(o,c),N(o,r),N(o,_),N(o,d),N(o,p),N(o,m),N(o,$);for(let Ce=0;Ce<te.length;Ce+=1)te[Ce]&&te[Ce].m(o,null);N(o,f),N(o,y),N(o,g),N(o,v),N(o,h),N(o,S),N(o,C),N(o,z),N(o,A),N(o,L),N(o,Z),N(o,ke),l[19](s),K=!0},p(R,ie){const Ce={};if(ie[0]&1024&&(Ce.code=R[10]?.innerText),n.$set(Ce),(!K||ie[0]&2048)&&be(c,R[11]),(!K||ie[0]&4096)&&be(r,R[12]),(!K||ie[0]&1)&&u!==(u=R[0].api_name+"")&&be(d,u),ie[0]&16){W=ht(R[4]);let Te;for(Te=0;Te<W.length;Te+=1){const kn=qi(R,W,Te);te[Te]?te[Te].p(kn,ie):(te[Te]=Li(kn),te[Te].c(),te[Te].m(o,f))}for(;Te<te.length;Te+=1)te[Te].d(1);te.length=W.length}(!K||ie[0]&2048)&&be(z,R[11]),(!K||ie[0]&4096)&&be(A,R[12]),(!K||ie[0]&1)&&M!==(M=R[0].api_name+"")&&be(Z,M)},i(R){K||(Je(n.$$.fragment,R),K=!0)},o(R){Ye(n.$$.fragment,R),K=!1},d(R){R&&H(e),wt(n),Rn(te,R),l[19](null)}}}function Ni(l){let e,t,n,i=l[22].url+"",s,o,a=l[30]+"",c,r,_,u;return{c(){e=j(`
23const response_`),t=j(l[27]),n=j(' = await fetch("'),s=j(i),o=j(`");
24const example`),c=j(a),r=j(" = await response_"),_=j(l[27]),u=j(`.blob();
25						`)},m(d,p){V(d,e,p),V(d,t,p),V(d,n,p),V(d,s,p),V(d,o,p),V(d,c,p),V(d,r,p),V(d,_,p),V(d,u,p)},p:qa,d(d){d&&(H(e),H(t),H(n),H(s),H(o),H(c),H(r),H(_),H(u))}}}function Ai(l){let e,t,n;return{c(){e=j(', {auth: ["'),t=j(l[6]),n=j('", **password**]}')},m(i,s){V(i,e,s),V(i,t,s),V(i,n,s)},p(i,s){s[0]&64&&be(t,i[6])},d(i){i&&(H(e),H(t),H(n))}}}function Ta(l){let e;return{c(){e=j(l[1])},m(t,n){V(t,e,n)},p(t,n){n[0]&2&&be(e,t[1])},d(t){t&&H(e)}}}function Ma(l){let e,t,n=l[0].api_name+"",i,s;return{c(){e=re("span"),t=j('"/'),i=j(n),s=j('"'),fe(e,"class","api-name svelte-114qcyq")},m(o,a){V(o,e,a),N(e,t),N(e,i),N(e,s)},p(o,a){a[0]&1&&n!==(n=o[0].api_name+"")&&be(i,n)},d(o){o&&H(e)}}}function Pa(l){let e,t,n=l[23]+"",i,s,o=Qe(l[22],l[21].type,"js")+"",a,c;return{c(){e=j(`		
26		`),t=re("span"),i=j(n),s=j(": "),a=j(o),c=j(", "),fe(t,"class","example-inputs")},m(r,_){V(r,e,_),V(r,t,_),N(t,i),N(t,s),N(t,a),V(r,c,_)},p(r,_){_[0]&16&&n!==(n=r[23]+"")&&be(i,n),_[0]&16&&o!==(o=Qe(r[22],r[21].type,"js")+"")&&be(a,o)},d(r){r&&(H(e),H(t),H(c))}}}function Ia(l){let e,t,n=l[23]+"",i,s,o=l[30]+"",a,c,r;return{c(){e=j(`
27				`),t=re("span"),i=j(n),s=j(": example"),a=j(o),c=j(", "),r=re("span"),r.innerHTML="",fe(t,"class","example-inputs"),fe(r,"class","desc 
27svelte-114qcyq")},m(_,u){V(_,e,u),V(_,t,u),N(t,i),N(t,s),N(t,a),V(_,c,u),V(_,r,u)},p(_,u){u[0]&16&&n!==(n=_[23]+"")&&be(i,n),u[0]&16&&o!==(o=_[30]+"")&&be(a,o)},d(_){_&&(H(e),H(t),H(c),H(r))}}}function Ti(l){let e,t;function n(o,a){return a[0]&16&&(e=null),e==null&&(e=!!o[14].includes(o[30])),e?Ia:Pa}let i=n(l,[-1,-1]),s=i(l);return{c(){s.c(),t=Xs()},m(o,a){s.m(o,a),V(o,t,a)},p(o,a){i===(i=n(o,a))&&s?s.p(o,a):(s.d(1),s=i(o),s&&(s.c(),s.m(t.parentNode,t)))},d(o){o&&H(t),s.d(o)}}}function Oa(l){let e,t,n,i,s,o,a,c,r,_,u=(l[3]||l[2])+"",d,p,b,m,$,f;n=new _t({props:{code:l[9]?.innerText}});let k=ht(l[15]),y=[];for(let C=0;C<k.length;C+=1)y[C]=Ni(Si(l,k,C));let g=l[6]!==null&&Ai(l);function w(C,z){return C[5]?Ma:Ta}let v=w(l),h=v(l),E=ht(l[4]),S=[];for(let C=0;C<E.length;C+=1)S[C]=Ti(Ei(l,E,C));return{c(){e=re("code"),t=re("div"),kt(n.$$.fragment),i=xn(),s=re("div"),o=re("pre"),a=j(`import { Client } from "@gradio/client";
28`);for(let C=0;C<y.length;C+=1)y[C].c();c=j(`
29const client = await Client.connect(`),r=re("span"),_=j('"'),d=j(u),p=j('"'),g&&g.c(),b=j(`);
30const result = await client.predict(`),h.c(),m=j(", { ");for(let C=0;C<S.length;C+=1)S[C].c();$=j(`
31});
32
33console.log(result.data);
34`),fe(t,"class","copy svelte-114qcyq"),fe(r,"class","token string svelte-114qcyq"),fe(o,"class","svelte-114qcyq"),fe(e,"class","svelte-114qcyq")},m(C,z){V(C,e,z),N(e,t),yt(n,t,null),N(e,i),N(e,s),N(s,o),N(o,a);for(let A=0;A<y.length;A+=1)y[A]&&y[A].m(o,null);N(o,c),N(o,r),N(r,_),N(r,d),N(r,p),g&&g.m(o,null),N(o,b),h.m(o,null),N(o,m);for(let A=0;A<S.length;A+=1)S[A]&&S[A].m(o,null);N(o,$),l[18](s),f=!0},p(C,z){const A={};if(z[0]&512&&(A.code=C[9]?.innerText),n.$set(A),z[0]&32768){k=ht(C[15]);let L;for(L=0;L<k.length;L+=1){const M=Si(C,k,L);y[L]?y[L].p(M,z):(y[L]=Ni(M),y[L].c(),y[L].m(o,c))}for(;L<y.length;L+=1)y[L].d(1);y.length=k.length}if((!f||z[0]&12)&&u!==(u=(C[3]||C[2])+"")&&be(d,u),C[6]!==null?g?g.p(C,z):(g=Ai(C),g.c(),g.m(o,b)):g&&(g.d(1),g=null),v===(v=w(C))&&h?h.p(C,z):(h.d(1),h=v(C),h&&(h.c(),h.m(o,m))),z[0]&16400){E=ht(C[4]);let L;for(L=0;L<E.length;L+=1){const M=Ei(C,E,L);S[L]?S[L].p(M,z):(S[L]=Ti(M),S[L].c(),S[L].m(o,$))}for(;L<S.length;L+=1)S[L].d(1);S.length=E.length}},i(C){f||(Je(n.$$.fragment,C),f=!0)},o(C){Ye(n.$$.fragment,C),f=!1},d(C){C&&H(e),wt(n),Rn(y,C),g&&g.d(),h.d(),Rn(S,C),l[18](null)}}}function Da(l){let e;return{c(){e=j(", handle_file")},m(t,n){V(t,e,n)},d(t){t&&H(e)}}}function Mi(l){let e,t,n;return{c(){e=j(', auth=("'),t=j(l[6]),n=j('", **password**)')},m(i,s){V(i,e,s),V(i,t,s),V(i,n,s)},p(i,s){s[0]&64&&be(t,i[6])},d(i){i&&(H(e),H(t),H(n))}}}function Pi(l){let e,t=l[23]?l[23]+"=":"",n,i,s=Qe(l[24]?l[25]:l[22],l[21].type,"py")+"",o,a;return{c(){e=j(`
35		`),n=j(t),i=re("span"),o=j(s),a=j(",")},m(c,r){V(c,e,r),V(c,n,r),V(c,i,r),N(i,o),V(c,a,r)},p(c,r){r[0]&16&&t!==(t=c[23]?c[23]+"=":"")&&be(n,t),r[0]&16&&s!==(s=Qe(c[24]?c[25]:c[22],c[21].type,"py")+"")&&be(o,s)},d(c){c&&(H(e),H(n),H(i),H(a))}}}function Fa(l){let e,t,n,i,s,o,a,c,r,_,u,d,p,b=(l[3]||l[2])+"",m,$,f,k,y,g,w,v,h=l[0].api_name+"",E,S,C,z,A,L;n=new _t({props:{code:l[8]?.innerText}});let M=l[13]&&Da(),Z=l[6]!==null&&Mi(l),ke=ht(l[4]),K=[];for(let W=0;W<ke.length;W+=1)K[W]=Pi(zi(l,ke,W));return{c(){e=re("code"),t=re("div"),kt(n.$$.fragment),i=xn(),s=re("div"),o=re("pre"),a=re("span"),a.textContent="from",c=j(" gradio_client "),r=re("span"),r.textContent="import",_=j(" Client"),M&&M.c(),u=j(`
36
37client = Client(`),d=re("span"),p=j('"'),m=j(b),$=j('"'),Z&&Z.c(),f=j(`)
38result = client.`),k=re("span"),k.textContent="predict",y=j("(");for(let W=0;W<K.length;W+=1)K[W].c();g=j(`
39		api_name=`),w=re("span"),v=j('"/'),E=j(h),S=j('"'),C=j(`
40)
41`),z=re("span"),z.textContent="print",A=j("(result)"),fe(t,"class","copy svelte-114qcyq"),fe(a,"class","highlight"),fe(r,"class","highlight"),fe(d,"class","token string svelte-114qcyq"),fe(k,"class","highlight"),fe(w,"class","api-name svelte-114qcyq"),fe(z,"class","highlight"),fe(o,"class","svelte-114qcyq"),fe(e,"class","svelte-114qcyq")},m(W,te){V(W,e,te),N(e,t),yt(n,t,null),N(e,i),N(e,s),N(s,o),N(o,a),N(o,c),N(o,r),N(o,_),M&&M.m(o,null),N(o,u),N(o,d),N(d,p),N(d,m),N(d,$),Z&&Z.m(o,null),N(o,f),N(o,k),N(o,y);for(let R=0;R<K.length;R+=1)K[R]&&K[R].m(o,null);N(o,g),N(o,w),N(w,v),N(w,E),N(w,S),N(o,C),N(o,z),N(o,A),l[17](s),L=!0},p(W,te){const R={};if(te[0]&256&&(R.code=W[8]?.innerText),n.$set(R),(!L||te[0]&12)&&b!==(b=(W[3]||W[2])+"")&&be(m,b),W[6]!==null?Z?Z.p(W,te):(Z=Mi(W),Z.c(),Z.m(o,f)):Z&&(Z.d(1),Z=null),te[0]&16){ke=ht(W[4]);let ie;for(ie=0;ie<ke.length;ie+=1){const Ce=zi(W,ke,ie);K[ie]?K[ie].p(Ce,te):(K[ie]=Pi(Ce),K[ie].c(),K[ie].m(o,g))}for(;ie<K.length;ie+=1)K[ie].d(1);K.length=ke.length}(!L||te[0]&1)&&h!==(h=W[0].api_name+"")&&be(E,h)},i(W){L||(Je(n.$$.fragment,W),L=!0)},o(W){Ye(n.$$.fragment,W),L=!1},d(W){W&&H(e),wt(n),M&&M.d(),Z&&Z.d(),Rn(K,W),l[17](null)}}}function Ua(l){let e,t,n,i,s,o,a;const c=[za,Sa],r=[];function _(b,m){return b[5]?0:1}t=_(l),n=r[t]=c[t](l);const u=[Na,La,ja],d=[];function p(b,m){return b[7]==="python"?0:b[7]==="javascript"?1:b[7]==="bash"?2:-1}return~(s=p(l))&&(o=d[s]=u[s](l)),{c(){e=re("div"),n.c(),i=xn(),o&&o.c(),fe(e,"class","container svelte-114qcyq")},m(b,m){V(b,e,m),r[t].m(e,null),N(e,i),~s&&d[s].m(e,null),a=!0},p(b,m){let $=t;t=_(b),t===$?r[t].p(b,m):(Ci(),Ye(r[$],1,1,()=>{r[$]=null}),yi(),n=r[t],n?n.p(b,m):(n=r[t]=c[t](b),n.c()),Je(n,1),n.m(e,i));let f=s;s=p(b),s===f?~s&&d[s].p(b,m):(o&&(Ci(),Ye(d[f],1,1,()=>{d[f]=null}),yi()),~s?(o=d[s],o?o.p(b,m):(o=d[s]=u[s](b),o.c()),Je(o,1),o.m(e,null)):o=null)},i(b){a||(Je(n),Je(o),a=!0)},o(b){Ye(n),Ye(o),a=!1},d(b){b&&H(e),r[t].d(),~s&&d[s].d()}}}function Ra(l,e,t){let n,i,{dependency:s}=e,{dependency_index:o}=e,{root:a}=e,{api_prefix:c}=e,{space_id:r}=e,{endpoint_parameters:_}=e,{named:u}=e,{username:d}=e,{current_language:p}=e,b,m,$,f=_.some(h=>Qs(h.example_input)),k=["Audio","File","Image","Video"],y=_.filter(h=>k.includes(h.component));function g(h){hl[h?"unshift":"push"](()=>{b=h,t(8,b)})}function w(h){hl[h?"unshift":"push"](()=>{m=h,t(9,m)})}function v(h){hl[h?"unshift":"push"](()=>{$=h,t(10,$)})}return l.$$set=h=>{"dependency"in h&&t(0,s=h.dependency),"dependency_index"in h&&t(1,o=h.dependency_index),"root"in h&&t(2,a=h.root),"api_prefix"in h&&t(16,c=h.api_prefix),"space_id"in h&&t(3,r=h.space_id),"endpoint_parameters"in h&&t(4,_=h.endpoint_parameters),"named"in h&&t(5,u=h.named),"username"in h&&t(6,d=h.username),"current_language"in h&&t(7,p=h.current_language)},l.$$.update=()=>{l.$$.dirty[0]&65536&&t(12,n=c||"/"),l.$$.dirty[0]&4&&t(11,i=a.replace(/\/$/,""))},[s,o,a,r,_,u,d,p,b,m,$,i,n,f,k,y,c,g,w,v]}class Ba extends ya{constructor(e){super(),Ca(this,e,Ra,Ua,Ea,{dependency:0,dependency_index:1,root:2,api_prefix:16,space_id:3,endpoint_parameters:4,named:5,username:6,current_language:7},null,[-1,-1])}get dependency(){return this.$$.ctx[0]}set dependency(e){this.$$set({dependency:e}),at()}get dependency_index(){return this.$$.ctx[1]}set dependency_index(e){this.$$set({dependency_index:e}),at()}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),at()}get api_prefix(){return this.$$.ctx[16]}set api_prefix(e){this.$$set({api_prefix:e}),at()}get space_id(){return this.$$.ctx[3]}set space_id(e){this.$$set({space_id:e}),at()}get endpoint_parameters(){return this.$$.ctx[4]}set endpoint_parameters(e){this.$$set({endpoint_parameters:e}),at()}get named(){return this.$$.ctx[5]}set named(e){this.$$set({named:e}),at()}get username(){return this.$$.ctx[6]}set username(e){this.$$set({username:e}),at()}get current_language(){return this.$$.ctx[7]}set current_language(e){this.$$set({current_language:e}),at()}}const{SvelteComponent:Ga,append:T,attr:Se,binding_callbacks:gl,check_outros:Ha,create_component:el,destroy_component:tl,destroy_each:Vl,detach:me,element:pe,empty:Va,ensure_array_like:Jt,flush:Et,group_outros:Wa,init:Za,insert:de,mount_component:nl,safe_not_equal:Qa,set_data:We,space
vendor: 11,885 bytes, lines 41-64
41:ll,text:D,transition_in:Yt,transition_out:Kt}=window.__gradio__svelte__internal,{onMount:Ja,tick:Ya}=window.__gradio__svelte__internal;function Ii(l,e,t){const n=l.slice();return n[20]=e[t].call,n[21]=e[t].api_name,n}function Oi(l,e,t){const n=l.slice();return n[20]=e[t].call,n[21]=e[t].api_name,n}function Di(l,e,t){const n=l.slice();return n[20]=e[t].call,n[21]=e[t].api_name,n}function Ka(l){let e,t,n,i,s,o;n=new _t({props:{code:l[6]?.innerText}});let a=Jt(l[9]),c=[];for(let r=0;r<a.length;r+=1)c[r]=Fi(Ii(l,a,r));return{c(){e=pe("code"),t=pe("div"),el(n.$$.fragment),i=ll(),s=pe("div");for(let r=0;r<c.length;r+=1)c[r].c();Se(t,"class","copy svelte-j71ub0"),Se(e,"class","svelte-j71ub0")},m(r,_){de(r,e,_),T(e,t),nl(n,t,null),T(e,i),T(e,s);for(let u=0;u<c.length;u+=1)c[u]&&c[u].m(s,null);l[16](s),o=!0},p(r,_){const u={};if(_&64&&(u.code=r[6]?.innerText),n.$set(u),_&513){a=Jt(r[9]);let d;for(d=0;d<a.length;d+=1){const p=Ii(r,a,d);c[d]?c[d].p(p,_):(c[d]=Fi(p),c[d].c(),c[d].m(s,null))}for(;d<c.length;d+=1)c[d].d(1);c.length=a.length}},i(r){o||(Yt(n.$$.fragment,r),o=!0)},o(r){Kt(n.$$.fragment,r),o=!1},d(r){r&&me(e),tl(n),Vl(c,r),l[16](null)}}}function Xa(l){let e,t,n,i,s,o,a,c,r,_,u,d,p;n=new _t({props:{code:l[5]?.innerText}});let b=l[2]!==null&&Ui(l),m=Jt(l[8]),$=[];for(let f=0;f<m.length;f+=1)$[f]=Bi(Oi(l,m,f));return{c(){e=pe("code"),t=pe("div"),el(n.$$.fragment),i=ll(),s=pe("div"),o=pe("pre"),a=D(`import { Client } from "@gradio/client";
42
43const app = await Client.connect(`),c=pe("span"),r=D('"'),_=D(l[0]),u=D('"'),b&&b.c(),d=D(`);
44					`);for(let f=0;f<$.length;f+=1)$[f].c();Se(t,"class","copy svelte-j71ub0"),Se(c,"class","token string svelte-j71ub0"),Se(o,"class","svelte-j71ub0"),Se(e,"class","svelte-j71ub0")},m(f,k){de(f,e,k),T(e,t),nl(n,t,null),T(e,i),T(e,s),T(s,o),T(o,a),T(o,c),T(c,r),T(c,_),T(c,u),b&&b.m(o,null),T(o,d);for(let y=0;y<$.length;y+=1)$[y]&&$[y].m(o,null);l[15](s),p=!0},p(f,k){const y={};if(k&32&&(y.code=f[5]?.innerText),n.$set(y),(!p||k&1)&&We(_,f[0]),f[2]!==null?b?b.p(f,k):(b=Ui(f),b.c(),b.m(o,d)):b&&(b.d(1),b=null),k&256){m=Jt(f[8]);let g;for(g=0;g<m.length;g+=1){const w=Oi(f,m,g);$[g]?$[g].p(w,k):($[g]=Bi(w),$[g].c(),$[g].m(o,null))}for(;g<$.length;g+=1)$[g].d(1);$.length=m.length}},i(f){p||(Yt(n.$$.fragment,f),p=!0)},o(f){Kt(n.$$.fragment,f),p=!1},d(f){f&&me(e),tl(n),b&&b.d(),Vl($,f),l[15](null)}}}function xa(l){let e,t,n,i,s,o,a,c,r,_,u,d,p,b,m,$;n=new _t({props:{code:l[4]}});let f=l[2]!==null&&Gi(l),k=Jt(l[7]),y=[];for(let g=0;g<k.length;g+=1)y[g]=Hi(Di(l,k,g));return{c(){e=pe("code"),t=pe("div"),el(n.$$.fragment),i=ll(),s=pe("div"),o=pe("pre"),a=pe("span"),a.textContent="from",c=D(" gradio_client "),r=pe("span"),r.textContent="import",_=D(` Client, file
45
46client = Client(`),u=pe("span"),d=D('"'),p=D(l[0]),b=D('"'),f&&f.c(),m=D(`)
47`);for(let g=0;g<y.length;g+=1)y[g].c();Se(t,"class","copy svelte-j71ub0"),Se(a,"class","highlight"),Se(r,"class","highlight"),Se(u,"class","token string svelte-j71ub0"),Se(o,"class","svelte-j71ub0"),Se(e,"class","svelte-j71ub0")},m(g,w){de(g,e,w),T(e,t),nl(n,t,null),T(e,i),T(e,s),T(s,o),T(o,a),T(o,c),T(o,r),T(o,_),T(o,u),T(u,d),T(u,p),T(u,b),f&&f.m(o,null),T(o,m);for(let v=0;v<y.length;v+=1)y[v]&&y[v].m(o,null);l[14](s),$=!0},p(g,w){const v={};if(w&16&&(v.code=g[4]),n.$set(v),(!$||w&1)&&We(p,g[0]),g[2]!==null?f?f.p(g,w):(f=Gi(g),f.c(),f.m(o,m)):f&&(f.d(1),f=null),w&128){k=Jt(g[7]);let h;for(h=0;h<k.length;h+=1){const E=Di(g,k,h);y[h]?y[h].p(E,w):(y[h]=Hi(E),y[h].c(),y[h].m(o,null))}for(;h<y.length;h+=1)y[h].d(1);y.length=k.length}},i(g){$||(Yt(n.$$.fragment,g),$=!0)},o(g){Kt(n.$$.fragment,g),$=!1},d(g){g&&me(e),tl(n),f&&f.d(),Vl(y,g),l[14](null)}}}function Fi(l){let e,t,n,i,s=l[21]+"",o,a,c="{",r,_,u=l[20]+"",d,p,b="}",m,$,f="{",k,y,g="}",w,v,h,E,S=l[21]+"",C,z,A,L;return{c(){e=pe("pre"),t=D("curl -X POST "),n=D(l[0]),i=D("call/"),o=D(s),a=D(` -s -H "Content-Type: application/json" -d '`),r=D(c),_=D(` 
48	"data": [`),d=D(u),p=D("]"),m=D(b),$=D(`' \\
49  | awk -F'"' '`),k=D(f),y=D(" print $4"),w=D(g),v=D(`' \\
50  | read EVENT_ID; curl -N `),h=D(l[0]),E=D("call/"),C=D(S),z=D("/$EVENT_ID"),A=ll(),L=pe("br"),Se(e,"class","svelte-j71ub0")},m(M,Z){de(M,e,Z),T(e,t),T(e,n),T(e,i),T(e,o),T(e,a),T(e,r),T(e,_),T(e,d),T(e,p),T(e,m),T(e,$),T(e,k),T(e,y),T(e,w),T(e,v),T(e,h),T(e,E),T(e,C),T(e,z),de(M,A,Z),de(M,L,Z)},p(M,Z){Z&1&&We(n,M[0]),Z&512&&s!==(s=M[21]+"")&&We(o,s),Z&512&&u!==(u=M[20]+"")&&We(d,u),Z&1&&We(h,M[0]),Z&512&&S!==(S=M[21]+"")&&We(C,S)},d(M){M&&(me(e),me(A),me(L))}}}function Ui(l){let e,t,n;return{c(){e=D(', {auth: ["'),t=D(l[2]),n=D('", **password**]}')},m(i,s){de(i,e,s),de(i,t,s),de(i,n,s)},p(i,s){s&4&&We(t,i[2])},d(i){i&&(me(e),me(t),me(n))}}}function Ri(l){let e,t=l[20]+"",n;return{c(){e=D(", "),n=D(t)},m(i,s){de(i,e,s),de(i,n,s)},p(i,s){s&256&&t!==(t=i[20]+"")&&We(n,t)},d(i){i&&(me(e),me(n))}}}function Bi(l){let e,t,n,i=l[21]+"",s,o,a,c=l[20]&&Ri(l);return{c(){e=D(`
51await client.predict(`),t=pe("span"),n=D(`
52  "/`),s=D(i),o=D('"'),c&&c.c(),a=D(`);
53						`),Se(t,"class","api-name svelte-j71ub0")},m(r,_){de(r,e,_),de(r,t,_),T(t,n),T(t,s),T(t,o),c&&c.m(r,_),de(r,a,_)},p(r,_){_&256&&i!==(i=r[21]+"")&&We(s,i),r[20]?c?c.p(r,_):(c=Ri(r),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(r){r&&(me(e),me(t),me(a)),c&&c.d(r)}}}function Gi(l){let e,t,n;return{c(){e=D(', auth=("'),t=D(l[2]),n=D('", **password**)')},m(i,s){de(i,e,s),de(i,t,s),de(i,n,s)},p(i,s){s&4&&We(t,i[2])},d(i){i&&(me(e),me(t),me(n))}}}function Hi(l){let e,t,n,i=l[20]+"",s,o,a,c,r=l[21]+"",_,u,d;return{c(){e=D(`
54client.`),t=pe("span"),n=D(`predict(
55`),s=D(i),o=D("  api_name="),a=pe("span"),c=D('"/'),_=D(r),u=D('"'),d=D(`
56)
57`),Se(a,"class","api-name svelte-j71ub0"),Se(t,"class","highlight")},m(p,b){de(p,e,b),de(p,t,b),T(t,n),T(t,s),T(t,o),T(t,a),T(a,c),T(a,_),T(a,u),T(t,d)},p(p,b){b&128&&i!==(i=p[20]+"")&&We(s,i),b&128&&r!==(r=p[21]+"")&&We(_,r)},d(p){p&&(me(e),me(t))}}}function ec(l){let e,t,n,i;const s=[xa,Xa,Ka],o=[];function a(c,r){return c[1]==="python"?0:c[1]==="javascript"?1:c[1]==="bash"?2:-1}return~(e=a(l))&&(t=o[e]=s[e](l)),{c(){t&&t.c(),n=Va()},m(c,r){~e&&o[e].m(c,r),de(c,n,r),i=!0},p(c,r){let _=e;e=a(c),e===_?~e&&o[e].p(c,r):(t&&(Wa(),Kt(o[_],1,1,()=>{o[_]=null}),Ha()),~e?(t=o[e],t?t.p(c,r):(t=o[e]=s[e](c),t.c()),Yt(t,1),t.m(n.parentNode,n)):t=null)},i(c){i||(Yt(t),i=!0)},o(c){Kt(t),i=!1},d(c){c&&me(n),~e&&o[e].d(c)}}}function tc(l){let e,t,n;return t=new hn({props:{border_mode:"focus",$$slots:{default:[ec]},$$scope:{ctx:l}}}),{c(){e=pe("div"),el(t.$$.fragment),Se(e,"class","container svelte-j71ub0")},m(i,s){de(i,e,s),nl(t,e,null),n=!0},p(i,[s]){const o={};s&268436479&&(o.$$scope={dirty:s,ctx:i}),t.$set(o)},i(i){n||(Yt(t.$$.fragment,i),n=!0)},o(i){Kt(t.$$.fragment,i),n=!1},d(i){i&&me(e),tl(t)}}}function nc(l,e,t){let{dependencies:n}=e,{short_root:i}=e,{root:s}=e,{api_prefix:o=""}=e,{current_language:a}=e,{username:c}=e,r,_,u,d,{api_calls:p=[]}=e;async function b(){return await(await fetch(s.replace(/\/$/,"")+o+"/info/?all_endpoints=true")).json()}let m,$=[],f=[],k=[];function y(h,E){const S=`/${n[h.fn_index].api_name}`,z=h.data.filter(A=>typeof A<"u").map((A,L)=>{if(m[S]){const M=m[S].parameters[L];if(!M)return;const Z=M.parameter_name,ke=M.python_type.type;if(E==="py")return`  ${Z}=${Qe(A,ke,"py")}`;if(E==="js")return`    ${Z}: ${Qe(A,ke,"js")}`;if(E==="bash")return`    ${Qe(A,ke,"bash")}`}return`  ${Qe(A,void 0,E)}`}).filter(A=>typeof A<"u").join(`,
58`);if(z){if(E==="py")return`${z},
59`;if(E==="js")return`{
60${z},
61}`;if(E==="bash")return`
62${z}
63`}return E==="py"?"":`
64`}Ja(async()=>{m=(await b()).named_endpoints;let E=p.map(A=>y(A,"py")),S=p.map(A=>y(A,"js")),C=p.map(A=>y(A,"bash")),z=p.map(A=>n[A.fn_index].api_name||"");t(7,$=E.map((A,L)=>({call:A,api_name:z[L]}))),t(8,f=S.map((A,L)=>({call:A,api_name:z[L]}))),t(9,k=C.map((A,L)=>({call:A,api_name:z[L]}))),await Ya(),t(4,_=r.innerText)});function g(h){gl[h?"unshift":"push"](()=>{r=h,t(3,r)})}function w(h){gl[h?"unshift":"push"](()=>{u=h,t(5,u)})}function v(h){gl[h?"unshift":"push"](()=>{d=h,t(6,d)})}return l.$$set=h=>{"dependencies"in h&&t(10,n=h.dependencies),"short_root"in h&&t(0,i=h.short_root),"root"in h&&t(11,s=h.root),"api_prefix"in h&&t(12,o=h.api_prefix),"current_language"in h&&t(1,a=h.current_language),"username"in h&&t(2,c=h.username),"api_calls"in h&&t(13,p=h.api_calls)},[i,a,c,r,_,u,d,$,f,k,n,s,o,p,g,w,v]}class lc extends Ga{constructor(e){super(),Za(this,e,nc,tc,Qa,{dependencies:10,short_root:0,root:11,api_prefix:12,current_language:1,username:2,api_calls:13})}get dependencies(){return this.$$.ctx[10]}set dependencies(e){this.$$set({dependencies:e}),Et()}get short_root(){return this.$$.ctx[0]}set short_root(e){this.$$set({short_root:e}),Et()}get root(){return this.$$.ctx[11]}set root(e){this.$$set({root:e}),Et()}get api_prefix(){return this.$$.ctx[12]}set api_prefix(e){this.$$set({api_prefix:e}),Et()}get current_language(){return this.$$.ctx[1]}set current_language(e){this.$$set({current_language:e}),Et()}get username(){return this.$$.ctx[2]}set username(e){this.$$set({username:e}),Et()}get api_calls(){return this.$$.ctx[13]}set api_calls(e){this.$$set({api_calls:e}),Et()}}const ic="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20focusable='false'%20role='img'%20width='1em'%20height='1em'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%2032%2032'%20%3e%3cpath%20d='M15.84.5a16.4,16.4,0,0,0-3.57.32C9.1,1.39,8.53,2.53,8.53,4.64V7.48H16v1H5.77a4.73,4.73,0,0,0-4.7,3.74,14.82,14.82,0,0,0,0,7.54c.57,2.28,1.86,3.82,4,3.82h2.6V20.14a4.73,4.73,0,0,1,4.63-4.63h7.38a3.72,3.72,0,0,0,3.73-3.73V4.64A4.16,4.16,0,0,0,19.65.82,20.49,20.49,0,0,0,15.84.5ZM11.78,2.77a1.39,1.39,0,0,1,1.38,1.46,1.37,1.37,0,0,1-1.38,1.38A1.42,1.42,0,0,1,10.4,4.23,1.44,1.44,0,0,1,11.78,2.77Z'%20fill='%235a9fd4'%20%3e%3c/path%3e%3cpath%20d='M16.16,31.5a16.4,16.4,0,0,0,3.57-.32c3.17-.57,3.74-1.71,3.74-3.82V24.52H16v-1H26.23a4.73,4.73,0,0,0,4.7-3.74,14.82,14.82,0,0,0,0-7.54c-.57-2.28-1.86-3.82-4-3.82h-2.6v3.41a4.73,4.73,0,0,1-4.63,4.63H12.35a3.72,3.72,0,0,0-3.73,3.73v7.14a4.16,4.16,0,0,0,3.73,3.82A20.49,20.49,0,0,0,16.16,31.5Zm4.06-2.27a1.39,1.39,0,0,1-1.38-1.46,1.37,1.37,0,0,1,1.38-1.38,1.42,1.42,0,0,1,1.38,1.38A1.44,1.44,0,0,1,20.22,29.23Z'%20fill='%23ffd43b'%20%3e%3c/path%3e%3c/svg%3e",sc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20focusable='false'%20role='img'%20width='1em'%20height='1em'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%2032%2032'%20%3e%3crect%20width='32'%20height='32'%20fill='%23f7df1e'%3e%3c/rect%3e%3cpath%20d='M21.5,25a3.27,3.27,0,0,0,3,1.83c1.25,0,2-.63,2-1.49,0-1-.81-1.39-2.19-2L23.56,23C21.39,22.1,20,20.94,20,18.49c0-2.25,1.72-4,4.41-4a4.44,4.44,0,0,1,4.27,2.41l-2.34,1.5a2,2,0,0,0-1.93-1.29,1.31,1.31,0,0,0-1.44,1.29c0,.9.56,1.27,1.85,1.83l.75.32c2.55,1.1,4,2.21,4,4.72,0,2.71-2.12,4.19-5,4.19a5.78,5.78,0,0,1-5.48-3.07Zm-10.63.26c.48.84.91,1.55,1.94,1.55s1.61-.39,1.61-1.89V14.69h3V25c0,3.11-1.83,4.53-4.49,4.53a4.66,4.66,0,0,1-4.51-2.75Z'%20%3e%3c/path%3e%3c/svg%3e",oc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20id='Layer_1'%20x='0px'%20y='0px'%20viewBox='0%200%20150%20150'%20style='enable-background:new%200%200%20150%20150;%20background-color:%20%2372a824;'%20xml:space='preserve'%3e%3cscript%20xmlns=''/%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cg%3e%3cpath%20class='st0'%20d='M118.9,40.3L81.7,18.2c-2.2-1.3-4.7-2-7.2-2s-5,0.7-7.2,2L30.1,40.3c-4.4,2.6-7.2,7.5-7.2,12.8v44.2%20c0,5.3,2.7,10.1,7.2,12.8l37.2,22.1c2.2,1.3,4.7,2,7.2,2c2.5,0,5-0.7,7.2-2l37.2-22.1c4.4-2.6,7.2-7.5,7.2-12.8V53%20C126.1,47.8,123.4,42.9,118.9,40.3z%20M90.1,109.3l0.1,3.2c0,0.4-0.2,0.8-0.5,1l-1.9,1.1c-0.3,0.2-0.5,0-0.6-0.4l0-3.1%20c-1.
646,0.7-3.2,0.8-4.3,0.4c-0.2-0.1-0.3-0.4-0.2-0.7l0.7-2.9c0.1-0.2,0.2-0.5,0.3-0.6c0.1-0.1,0.1-0.1,0.2-0.1%20c0.1-0.1,0.2-0.1,0.3,0c1.1,0.4,2.6,0.2,3.9-0.5c1.8-0.9,2.9-2.7,2.9-4.5c0-1.6-0.9-2.3-3-2.3c-2.7,0-5.2-0.5-5.3-4.5%20c0-3.3,1.7-6.7,4.4-8.8l0-3.2c0-0.4,0.2-0.8,0.5-1l1.8-1.2c0.3-0.2,0.5,0,0.6,0.4l0,3.2c1.3-0.5,2.5-0.7,3.6-0.4%20c0.2,0.1,0.3,0.4,0.2,0.7l-0.7,2.8c-0.1,0.2-0.2,0.4-0.3,0.6c-0.1,0.1-0.1,0.1-0.2,0.1c-0.1,0-0.2,0.1-0.3,0%20c-0.5-0.1-1.6-0.4-3.4,0.6c-1.9,1-2.6,2.6-2.5,3.8c0,1.5,0.8,1.9,3.3,1.9c3.4,0.1,4.9,1.6,5,5C94.7,103.4,92.9,107,90.1,109.3z%20M109.6,103.9c0,0.3,0,0.6-0.3,0.7l-9.4,5.7c-0.2,0.1-0.4,0-0.4-0.3v-2.4c0-0.3,0.2-0.5,0.4-0.6l9.3-5.5c0.2-0.1,0.4,0,0.4,0.3%20V103.9z%20M116.1,49.6L80.9,71.3c-4.4,2.6-7.6,5.4-7.6,10.7v43.4c0,3.2,1.3,5.2,3.2,5.8c-0.6,0.1-1.3,0.2-2,0.2%20c-2.1,0-4.1-0.6-5.9-1.6l-37.2-22.1c-3.6-2.2-5.9-6.2-5.9-10.5V53c0-4.3,2.3-8.4,5.9-10.5l37.2-22.1c1.8-1.1,3.8-1.6,5.9-1.6%20s4.1,0.6,5.9,1.6l37.2,22.1c3.1,1.8,5.1,5,5.7,8.5C122.1,48.4,119.3,47.7,116.1,49.6z'/%3e%3c/g%3e%3c/svg%3e",{SvelteComponent:rc,append:Be,attr:Dt,check_outros:ac,create_component:cc,destroy_component:_c,destroy_each:uc,detach:Le,element:et,empty:fc,ensure_array_like:Vi,flush:jn,group_outros:pc,init:mc,insert:Ne,mount_component:dc,noop:hc,safe_not_equal:gc,set_data:Xt,set_style:bc,space:Bt,text:Ze,toggle_class:Wi,transition_in:Pn,transition_out:zl}=window.__gradio__svelte__internal;function Zi(l,e,t){const n=l.slice();return n[4]=e[t].label,n[5]=e[t].type,n[6]=e[t].python_type,n[7]=e[t].component,n[8]=e[t].serializer,n[10]=t,n}function vc(l){let e;return{c(){e=Ze("1 element")},m(t,n){Ne(t,e,n)},p:hc,d(t){t&&Le(e)}}}function $c(l){let e=l[3]=="python"?"tuple":"list",t,n,i=l[1].length+"",s,o;return{c(){t=Ze(e),n=Ze(" of "),s=Ze(i),o=Ze(`
65		elements`)},m(a,c){Ne(a,t,c),Ne(a,n,c),Ne(a,s,c),Ne(a,o,c)},p(a,c){c&8&&e!==(e=a[3]=="python"?"tuple":"list")&&Xt(t,e),c&2&&i!==(i=a[1].length+"")&&Xt(s,i)},d(a){a&&(Le(t),Le(n),Le(s),Le(o))}}}function Qi(l){let e;return{c(){e=et("span"),e.textContent=`[${l[10]}]`,Dt(e,"class","code svelte-16h224k")},m(t,n){Ne(t,e,n)},d(t){t&&Le(e)}}}function kc(l){let e=l[2][l[10]].type+"",t;return{c(){t=Ze(e)},m(n,i){Ne(n,t,i)},p(n,i){i&4&&e!==(e=n[2][n[10]].type+"")&&Xt(t,e)},d(n){n&&Le(t)}}}function wc(l){let e=l[6].type+"",t;return{c(){t=Ze(e)},m(n,i){Ne(n,t,i)},p(n,i){i&2&&e!==(e=n[6].type+"")&&Xt(t,e)},d(n){n&&Le(t)}}}function Ji(l){let e,t,n,i,s,o,a,c,r,_=l[4]+"",u,d,p=l[7]+"",b,m,$,f=l[1].length>1&&Qi(l);function k(w,v){return w[3]==="python"?wc:kc}let y=k(l),g=y(l);return{c(){e=et("hr"),t=Bt(),n=et("div"),i=et("p"),f&&f.c(),s=Bt(),o=et("span"),g.c(),a=Bt(),c=et("p"),r=Ze('The output value that appears in the "'),u=Ze(_),d=Ze('" '),b=Ze(p),m=Ze(`
66				component.`),$=Bt(),Dt(e,"class","hr svelte-16h224k"),Dt(o,"class","code highlight svelte-16h224k"),Dt(c,"class","desc svelte-16h224k"),bc(n,"margin","10px")},m(w,v){Ne(w,e,v),Ne(w,t,v),Ne(w,n,v),Be(n,i),f&&f.m(i,null),Be(i,s),Be(i,o),g.m(o,null),Be(n,a),Be(n,c),Be(c,r),Be(c,u),Be(c,d),Be(c,b),Be(c,m),Be(n,$)},p(w,v){w[1].length>1?f||(f=Qi(w),f.c(),f.m(i,s)):f&&(f.d(1),f=null),y===(y=k(w))&&g?g.p(w,v):(g.d(1),g=y(w),g&&(g.c(),g.m(o,null))),v&2&&_!==(_=w[4]+"")&&Xt(u,_),v&2&&p!==(p=w[7]+"")&&Xt(b,p)},d(w){w&&(Le(e),Le(t),Le(n)),f&&f.d(),g.d()}}}function Yi(l){let e,t,n;return t=new Ws({props:{margin:!1}}),{c(){e=et("div"),cc(t.$$.fragment),Dt(e,"class","load-wrap")},m(i,s){Ne(i,e,s),dc(t,e,null),n=!0},i(i){n||(Pn(t.$$.fragment,i),n=!0)},o(i){zl(t.$$.fragment,i),n=!1},d(i){i&&Le(e),_c(t)}}}function yc(l){let e,t,n,i,s,o,a,c;function r(m,$){return m[1].length>1?$c:vc}let _=r(l),u=_(l),d=Vi(l[1]),p=[];for(let m=0;m<d.length;m+=1)p[m]=Ji(Zi(l,d,m));let b=l[0]&&Yi();return{c(){e=et("h4"),t=et("div"),t.innerHTML='<div class="toggle-dot toggle-right svelte-16h224k"></div>',n=Ze(`
67	Returns `),u.c(),i=Bt(),s=et("div");for(let m=0;m<p.length;m+=1)p[m].c();o=Bt(),b&&b.c(),a=fc(),Dt(t,"class","toggle-icon svelte-16h224k"),Dt(e,"class","svelte-16h224k"),Wi(s,"hide",l[0])},m(m,$){Ne(m,e,$),Be(e,t),Be(e,n),u.m(e,null),Ne(m,i,$),Ne(m,s,$);for(let f=0;f<p.length;f+=1)p[f]&&p[f].m(s,null);Ne(m,o,$),b&&b.m(m,$),Ne(m,a,$),c=!0},p(m,[$]){if(_===(_=r(m))&&u?u.p(m,$):(u.d(1),u=_(m),u&&(u.c(),u.m(e,null))),$&14){d=Vi(m[1]);let f;for(f=0;f<d.length;f+=1){const k=Zi(m,d,f);p[f]?p[f].p(k,$):(p[f]=Ji(k),p[f].c(),p[f].m(s,null))}for(;f<p.length;f+=1)p[f].d(1);p.length=d.length}(!c||$&1)&&Wi(s,"hide",m[0]),m[0]?b?$&1&&Pn(b,1):(b=Yi(),b.c(),Pn(b,1),b.m(a.parentNode,a)):b&&(pc(),zl(b,1,1,()=>{b=null}),ac())},i(m){c||(Pn(b),c=!0)},o(m){zl(b),c=!1},d(m){m&&(Le(e),Le(i),Le(s),Le(o),Le(a)),u.d(),uc(p,m),b&&b.d(m)}}}function Cc(l,e,t){let{is_running:n}=e,{endpoint_returns:i}=e,{js_returns:s}=e,{current_language:o}=e;return l.$$set=a=>{"is_running"in a&&t(0,n=a.is_running),"endpoint_returns"in a&&t(1,i=a.endpoint_returns),"js_returns"in a&&t(2,s=a.js_returns),"current_language"in a&&t(3,o=a.current_language)},[n,i,s,o]}class qc extends rc{constructor(e){super(),mc(this,e,Cc,yc,gc,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}get is_running(){return this.$$.ctx[0]}set is_running(e){this.$$set({is_running:e}),jn()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),jn()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),jn()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),jn()}}const{SvelteComponent:Ec,append:J,attr:Q,bubble:Ki,check_outros:Bn,create_component:gt,destroy_component:bt,destroy_each:Xi,detach:I,element:x,empty:Wl,ensure_array_like:Ln,flush:St,group_outros:Gn,init:Sc,insert:O,listen:zc,mou
vendor: 10,307 bytes, lines 67-94
67nt_component:vt,noop:xs,safe_not_equal:jc,set_data:jl,set_style:Lt,space:Ie,src_url_equal:Lc,text:Y,transition_in:ve,transition_out:Ae}=window.__gradio__svelte__internal,{onMount:Nc,createEventDispatcher:Ac}=window.__gradio__svelte__internal;function xi(l,e,t){const n=l.slice();return n[19]=e[t],n[21]=t,n}function es(l,e,t){const n=l.slice();return n[22]=e[t][0],n[23]=e[t][1],n}function ts(l){let e,t,n,i;const s=[Mc,Tc],o=[];function a(c,r){return c[9]?0:1}return e=a(l),t=o[e]=s[e](l),{c(){t.c(),n=Wl()},m(c,r){o[e].m(c,r),O(c,n,r),i=!0},p(c,r){t.p(c,r)},i(c){i||(ve(t),i=!0)},o(c){Ae(t),i=!1},d(c){c&&I(n),o[e].d(c)}}}function Tc(l){let e,t;return e=new _r({props:{root:l[0]}}),e.$on("close",l[16]),{c(){gt(e.$$.fragment)},m(n,i){vt(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.root=n[0]),e.$set(s)},i(n){t||(ve(e.$$.fragment,n),t=!0)},o(n){Ae(e.$$.fragment,n),t=!1},d(n){bt(e,n)}}}function Mc(l){let e,t,n,i,s,o,a,c,r,_,u,d,p;t=new kr({props:{root:l[3]||l[0],api_count:l[9]}}),t.$on("close",l[13]);let b=Ln(l[10]),m=[];for(let v=0;v<b.length;v+=1)m[v]=ns(es(l,b,v));const $=[Ic,Pc],f=[];function k(v,h){return v[5].length?0:1}_=k(l),u=f[_]=$[_](l);let y=Ln(l[1]),g=[];for(let v=0;v<y.length;v+=1)g[v]=rs(xi(l,y,v));const w=v=>Ae(g[v],1,1,()=>{g[v]=null});return{c(){e=x("div"),gt(t.$$.fragment),n=Ie(),i=x("div"),s=x("div"),s.innerHTML=`<p style="font-size: var(--text-lg);">Choose a language to see the code snippets for interacting with the
68					API.</p>`,o=Ie(),a=x("div"),c=x("div");for(let v=0;v<m.length;v+=1)m[v].c();r=Ie(),u.c(),d=Ie();for(let v=0;v<g.length;v+=1)g[v].c();Q(e,"class","banner-wrap svelte-1y3yua6"),Q(s,"class","client-doc svelte-1y3yua6"),Q(c,"class","snippets svelte-1y3yua6"),Q(a,"class","endpoint svelte-1y3yua6"),Q(i,"class","docs-wrap svelte-1y3yua6")},m(v,h){O(v,e,h),vt(t,e,null),O(v,n,h),O(v,i,h),J(i,s),J(i,o),J(i,a),J(a,c);for(let E=0;E<m.length;E+=1)m[E]&&m[E].m(c,null);J(a,r),f[_].m(a,null),J(a,d);for(let E=0;E<g.length;E+=1)g[E]&&g[E].m(a,null);p=!0},p(v,h){const E={};if(h&9&&(E.root=v[3]||v[0]),t.$set(E),h&1088){b=Ln(v[10]);let C;for(C=0;C<b.length;C+=1){const z=es(v,b,C);m[C]?m[C].p(z,h):(m[C]=ns(z),m[C].c(),m[C].m(c,null))}for(;C<m.length;C+=1)m[C].d(1);m.length=b.length}let S=_;if(_=k(v),_===S?f[_].p(v,h):(Gn(),Ae(f[S],1,1,()=>{f[S]=null}),Bn(),u=f[_],u?u.p(v,h):(u=f[_]=$[_](v),u.c()),ve(u,1),u.m(a,d)),h&479){y=Ln(v[1]);let C;for(C=0;C<y.length;C+=1){const z=xi(v,y,C);g[C]?(g[C].p(z,h),ve(g[C],1)):(g[C]=rs(z),g[C].c(),ve(g[C],1),g[C].m(a,null))}for(Gn(),C=y.length;C<g.length;C+=1)w(C);Bn()}},i(v){if(!p){ve(t.$$.fragment,v),ve(u);for(let h=0;h<y.length;h+=1)ve(g[h]);p=!0}},o(v){Ae(t.$$.fragment,v),Ae(u),g=g.filter(Boolean);for(let h=0;h<g.length;h+=1)Ae(g[h]);p=!1},d(v){v&&(I(e),I(n),I(i)),bt(t),Xi(m,v),f[_].d(),Xi(g,v)}}}function ns(l){let e,t,n,i,s=l[22]+"",o,a,c,r,_;function u(){return l[14](l[22])}return{c(){e=x("li"),t=x("img"),i=Ie(),o=Y(s),a=Ie(),Lc(t.src,n=l[23])||Q(t,"src",n),Q(t,"alt",""),Q(t,"class","svelte-1y3yua6"),Q(e,"class",c="snippet "+(l[6]===l[22]?"current-lang":"inactive-lang")+" svelte-1y3yua6")},m(d,p){O(d,e,p),J(e,t),J(e,i),J(e,o),J(e,a),r||(_=zc(e,"click",u),r=!0)},p(d,p){l=d,p&64&&c!==(c="snippet "+(l[6]===l[22]?"current-lang":"inactive-lang")+" svelte-1y3yua6")&&Q(e,"class",c)},d(d){d&&I(e),r=!1,_()}}}function Pc(l){let e,t,n,i,s,o,a,c,r,_;function u($,f){return $[6]=="python"||$[6]=="javascript"?Dc:Oc}let d=u(l),p=d(l);n=new ma({props:{current_language:l[6]}});let b=l[3]&&ls(l);c=new Jn({props:{size:"sm",variant:"secondary",$$slots:{default:[Fc]},$$scope:{ctx:l}}}),c.$on("click",l[15]);let m=l[6]=="bash"&&is(l);return{c(){e=x("p"),p.c(),t=Ie(),gt(n.$$.fragment),i=Ie(),s=x("p"),o=Y(`2. Find the API endpoint below corresponding to your desired
69						function in the app. Copy the code snippet, replacing the
70						placeholder values with your own input data.
71						`),b&&b.c(),a=Y(`
72
73						Or use the
74						`),gt(c.$$.fragment),r=Y(`
75						to automatically generate your API requests.
76						`),m&&m.c(),Q(e,"class","padded svelte-1y3yua6"),Q(s,"class","padded svelte-1y3yua6")},m($,f){O($,e,f),p.m(e,null),O($,t,f),vt(n,$,f),O($,i,f),O($,s,f),J(s,o),b&&b.m(s,null),J(s,a),vt(c,s,null),J(s,r),m&&m.m(s,null),_=!0},p($,f){d===(d=u($))&&p?p.p($,f):(p.d(1),p=d($),p&&(p.c(),p.m(e,null)));const k={};f&64&&(k.current_language=$[6]),n.$set(k),$[3]?b?b.p($,f):(b=ls($),b.c(),b.m(s,a)):b&&(b.d(1),b=null);const y={};f&67108864&&(y.$$scope={dirty:f,ctx:$}),c.$set(y),$[6]=="bash"?m?m.p($,f):(m=is($),m.c(),m.m(s,null)):m&&(m.d(1),m=null)},i($){_||(ve(n.$$.fragment,$),ve(c.$$.fragment,$),_=!0)},o($){Ae(n.$$.fragment,$),Ae(c.$$.fragment,$),_=!1},d($){$&&(I(e),I(t),I(i),I(s)),p.d(),bt(n,$),b&&b.d(),bt(c),m&&m.d()}}}function Ic(l){let e,t,n,i,s,o=l[5].length+"",a,c,r,_,u,d,p,b,m,$,f,k,y,g;return m=new lc({props:{current_language:l[6],api_calls:l[5],dependencies:l[1],root:l[0],api_prefix:l[2].api_prefix,short_root:l[3]||l[0],username:l[4]}}),{c(){e=x("div"),t=x("p"),n=Y("🪄 Recorded API Calls "),i=x("span"),s=Y("["),a=Y(o),c=Y("]"),r=Ie(),_=x("p"),u=Y(`Here is the code snippet to replay the most recently recorded API
77							calls using the `),d=Y(l[6]),p=Y(`
78							client.`),b=Ie(),gt(m.$$.fragment),$=Ie(),f=x("p"),f.textContent=`Note: Some API calls only affect the UI, so when using the
79							clients, the desired result may be achieved with only a subset of
80							the recorded calls.`,k=Ie(),y=x("p"),y.textContent="API Documentation",Q(i,"class","api-count svelte-1y3yua6"),Q(t,"id","num-recorded-api-calls"),Lt(t,"font-size","var(--text-lg)"),Lt(t,"font-weight","bold"),Lt(t,"margin","10px 0px"),Lt(y,"font-size","var(--text-lg)"),Lt(y,"font-weight","bold"),Lt(y,"margin","30px 0px 10px")},m(w,v){O(w,e,v),J(e,t),J(t,n),J(t,i),J(i,s),J(i,a),J(i,c),J(e,r),J(e,_),J(_,u),J(_,d),J(_,p),J(e,b),vt(m,e,null),J(e,$),J(e,f),O(w,k,v),O(w,y,v),g=!0},p(w,v){(!g||v&32)&&o!==(o=w[5].length+"")&&jl(a,o),(!g||v&64)&&jl(d,w[6]);const h={};v&64&&(h.current_language=w[6]),v&32&&(h.api_calls=w[5]),v&2&&(h.dependencies=w[1]),v&1&&(h.root=w[0]),v&4&&(h.api_prefix=w[2].api_prefix),v&9&&(h.short_root=w[3]||w[0]),v&16&&(h.username=w[4]),m.$set(h)},i(w){g||(ve(m.$$.fragment,w),g=!0)},o(w){Ae(m.$$.fragment,w),g=!1},d(w){w&&(I(e),I(k),I(y)),bt(m)}}}function Oc(l){let e;return{c(){e=Y("1. Confirm that you have cURL installed on your system.")},m(t,n){O(t,e,n)},p:xs,d(t){t&&I(e)}}}function Dc(l){let e,t,n,i,s,o,a,c;return{c(){e=Y(`1. Install the
81							`),t=x("span"),n=Y(l[6]),i=Y(`
82							client (`),s=x("a"),o=Y("docs"),c=Y(") if you don't already have it installed."),Lt(t,"text-transform","capitalize"),Q(s,"href",a=l[6]=="python"?Vn:Hn),Q(s,"target","_blank"),Q(s,"class","svelte-1y3yua6")},m(r,_){O(r,e,_),O(r,t,_),J(t,n),O(r,i,_),O(r,s,_),J(s,o),O(r,c,_)},p(r,_){_&64&&jl(n,r[6]),_&64&&a!==(a=r[6]=="python"?Vn:Hn)&&Q(s,"href",a)},d(r){r&&(I(e),I(t),I(i),I(s),I(c))}}}function ls(l){let e,t,n,i,s;return{c(){e=Y(`If this is a private Space, you may need to pass your
83							Hugging Face token as well (`),t=x("a"),n=Y("read more"),s=Y(")."),Q(t,"href",i=l[6]=="python"?Vn+Nn:l[6]=="javascript"?Hn+Nn:Ll),Q(t,"class","underline svelte-1y3yua6"),Q(t,"target","_blank")},m(o,a){O(o,e,a),O(o,t,a),J(t,n),O(o,s,a)},p(o,a){a&64&&i!==(i=o[6]=="python"?Vn+Nn:o[6]=="javascript"?Hn+Nn:Ll)&&Q(t,"href",i)},d(o){o&&(I(e),I(t),I(s))}}}function Fc(l){let e,t,n;return{c(){e=x("div"),t=Ie(),n=x("p"),n.textContent="API Recorder",Q(e,"class","loading-dot svelte-1y3yua6"),Q(n,"class","self-baseline svelte-1y3yua6")},m(i,s){O(i,e,s),O(i,t,s),O(i,n,s)},p:xs,d(i){i&&(I(e),I(t),I(n))}}}function is(l){let e,t,n,i,s,o,a,c,r,_,u,d,p,b,m,$,f,k,y,g,w,v,h,E,S=l[4]!==null&&ss();return{c(){e=x("br"),t=Y(" "),n=x("br"),i=Y(`Making a
84							prediction and getting a result requires
85							`),s=x("strong"),s.textContent="2 requests",o=Y(`: a
86							`),a=x("code"),a.textContent="POST",c=Y(`
87							and a `),r=x("code"),r.textContent="GET",_=Y(" request. The "),u=x("code"),u.textContent="POST",d=Y(` request
88							returns an `),p=x("code"),p.textContent="EVENT_ID",b=Y(`, which is used in the second
89							`),m=x("code"),m.textContent="GET",$=Y(` request to fetch the results. In these snippets,
90							we've used `),f=x("code"),f.textContent="awk",k=Y(" and "),y=x("code"),y.textContent="read",g=Y(` to parse the
91							results, combining these two requests into one command for ease of
92							use. `),S&&S.c(),w=Y(` See
93							`),v=x("a"),h=Y("curl docs"),E=Y("."),Q(a,"class","svelte-1y3yua6"),Q(r,"class","svelte-1y3yua6"),Q(u,"class","svelte-1y3yua6"),Q(p,"class","svelte-1y3yua6"),Q(m,"class","svelte-1y3yua6"),Q(f,"class","svelte-1y3yua6"),Q(y,"class","svelte-1y3yua6"),Q(v,"href",Ll),Q(v,"target","_blank"),Q(v,"class","svelte-1y3yua6")},m(C,z){O(C,e,z),O(C,t,z),O(C,n,z),O(C,i,z),O(C,s,z),O(C,o,z),O(C,a,z),O(C,c,z),O(C,r,z),O(C,_,z),O(C,u,z),O(C,d,z),O(C,p,z),O(C,b,z),O(C,m,z),O(C,$,z),O(C,f,z),O(C,k,z),O(C,y,z),O(C,g,z),S&&S.m(C,z),O(C,w,z),O(C,v,z),J(v,h),O(C,E,z)},p(C,z){C[4]!==null?S||(S=ss(),S.c(),S.m(w.parentNode,w)):S&&(S.d(1),S=null)},d(C){C&&(I(e),I(t),I(n),I(i),I(s),I(o),I(a),I(c),I(r),I(_),I(u),I(d),I(p),I(b),I(m),I($),I(f),I(k),I(y),I(g),I(w),I(v),I(E)),S&&S.d(C)}}}function ss(l){let e;return{c(){e=Y(`Note: connecting to an authenticated app requires an additional
94								request.`)},m(t,n){O(t,e,n)},d(t){t&&I(e)}}}function os(l){let e,t,n,i,s,o,a,c;return t=new Ba({props:{named:!0,endpoint_parameters:l[7].named_endpoints["/"+l[19].api_name].parameters,dependency:l[19],dependency_index:l[21],current_language:l[6],root:l[0],space_id:l[3],username:l[4],api_prefix:l[2].api_prefix}}),i=new Fr({props:{endpoint_returns:l[7].named_endpoints["/"+l[19].api_name].parameters,js_returns:l[8].named_endpoints["/"+l[19].api_name].parameters,is_running:as,current_language:l[6]}}),o=new qc({props:{endpoint_returns:l[7].named_endpoints["/"+l[19].api_name].returns,js_returns:l[8].named_endpoints["/"+l[19].api_name].returns,is_running:as,current_language:l[6]}}),{c(){e=x("div"),gt(t.$$.fragment),n=Ie(),gt(i.$$.fragment),s=Ie(),gt(o.$$.fragment),a=Ie(),Q(e,"class","endpoint-container svelte-1y3yua6")},m(r,_){O(r,e,_),vt(t,e,null),J(e,n),vt(i,e,null),J(e,s),vt(o,e,null),J(e,a),c=!0},p(r,_){const u={};_&130&&(u.endpoint_parameters=r[7].named_endpoints["/"+r[19].api_name].parameters),_&2&&(u.depen
94dency=r[19]),_&64&&(u.current_language=r[6]),_&1&&(u.root=r[0]),_&8&&(u.space_id=r[3]),_&16&&(u.username=r[4]),_&4&&(u.api_prefix=r[2].api_prefix),t.$set(u);const d={};_&130&&(d.endpoint_returns=r[7].named_endpoints["/"+r[19].api_name].parameters),_&258&&(d.js_returns=r[8].named_endpoints["/"+r[19].api_name].parameters),_&64&&(d.current_language=r[6]),i.$set(d);const p={};_&130&&(p.endpoint_returns=r[7].named_endpoints["/"+r[19].api_name].returns),_&258&&(p.js_returns=r[8].named_endpoints["/"+r[19].api_name].returns),_&64&&(p.current_language=r[6]),o.$set(p)},i(r){c||(ve(t.$$.fragment,r),ve(i.$$.fragment,r),ve(o.$$.fragment,r),c=!0)},o(r){Ae(t.$$.fragment,r),Ae(i.$$.fragment,r),Ae(o.$$.fragment,r),c=!1},d(r){r&&I(e),bt(t),bt(i),bt(o)}}}function rs(l){let e,t,n=l[19].show_api&&l[7].named_endpoints["/"+l[19].api_name]&&os(l);return{c(){n&&n.c(),e=Wl()},m(i,s){n&&n.m(i,s),O(i,e,s),t=!0},p(i,s){i[19].show_api&&i[7].named_endpoints["/"+i[19].api_name]?n?(n.p(i,s),s&130&&ve(n,1)):(n=os(i),n.c(),ve(n,1),n.m(e.parentNode,e)):n&&(Gn(),Ae(n,1,1,()=>{n=null}),Bn())},i(i){t||(ve(n),t=!0)},o(i){Ae(n),t=!1},d(i){i&&I(e),n&&n.d(i)}}}function Uc(l){let e,t,n=l[7]&&ts(l);return{c(){n&&n.c(),e=Wl()},m(i,s){n&&n.m(i,s),O(i,e,s),t=!0},p(i,[s]){i[7]?n?(n.p(i,s),s&128&&ve(n,1)):(n=ts(i),n.c(),ve(n,1),n.m(e.parentNode,e)):n&&(Gn(),Ae(n,1,1,()=>{n=null}),Bn())},i(i){t||(ve(n),t=!0)},o(i){Ae(n),t=!1},d(i){i&&I(e),n&&n.d(i)}}}const Hn="https://www.gradio.app/guides/getting-started-with-the-js-client",Vn="https://www.gradio.app/guides/getting-started-with-the-python-client",Ll="https://www.gradio.app/guides/querying-gradio-apps-with-curl",Nn="#connecting-to-a-hugging-face-space";let as=!1;function Rc(l,e,t){let{dependencies:n}=e,{root:i}=e,{app:s}=e,{space_id:o}=e,{root_node:a}=e,{username:c}=e,r=n.filter(v=>v.show_api).length;i===""&&(i=location.protocol+"//"+location.host+location.pathname),i.endsWith("/")||(i+="/");let{api_calls:_=[]}=e,u="python";const d=[["python",ic],["javascript",sc],["bash",oc]];async function p(){return await(await fetch(i.replace(/\/$/,"")+s.api_prefix+"/info")).json()}async function b(){return await s.view_api()}let m,$;p().then(v=>{t(7,m=v)}),b().then(v=>{t(8,$=v)});const f=Ac();Nc(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));function k(v){Ki.call(this,l,v)}const y=v=>t(6,u=v),g=()=>f("close",{api_recorder_visible:!0});function w(v){Ki.call(this,l,v)}return l.$$set=v=>{"dependencies"in v&&t(1,n=v.dependencies),"root"in v&&t(0,i=v.root),"app"in v&&t(2,s=v.app),"space_id"in v&&t(3,o=v.space_id),"root_node"in v&&t(12,a=v.root_node),"username"in v&&t(4,c=v.username),"api_calls"in v&&t(5,_=v.api_calls)},[i,n,s,o,c,_,u,m,$,r,d,f,a,k,y,g,w]}class Bc extends Ec{constructor(e){super(),Sc(this,e,Rc,Uc,jc,{dependencies:1,root:0,app:2,space_id:3,root_node:12,username:4,api_calls:5})}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),St()}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),St()}get app(){return this.$$.ctx[2]}set app(e){this.$$set({app:e}),St()}get space_id(){return this.$$.ctx[3]}set space_id(e){this.$$set({space_id:e}),St()}get root_node(){return this.$$.ctx[12]}set root_node(e){this.$$set({root_node:e}),St()}get username(){return this.$$.ctx[4]}set username(e){this.$$set({username:e}),St()}get api_calls(){return this.$$.ctx[5]}set api_calls(e){this.$$set({api_calls:e}),St()}}const{SvelteComponent:Gc,append:Tt,attr:Gt,create_component:Hc,destroy_component:Vc,detach:Mt,element:Ht,flush:cs,init:Wc,insert:Pt,mount_component:Zc,safe_not_equal:Qc,set_data:eo,space:bl,text:mn,transition_in:Jc,transition_out:Yc}=window.__gradio__svelte__internal;function _s(l){let e,t,n=l[1][l[0][l[0].length-1].fn_index].api_name+"",i;return{c(){e=Ht("span"),t=mn("/"),i=mn(n),Gt(e,"class","api-name svelte-sy28j6")},m(s,o){Pt(s,e,o),Tt(e,t),Tt(e,i)},p(s,o){o&3&&n!==(n=s[1][s[0][s[0].length-1].fn_index].api_name+"")&&eo(i,n)},d(s){s&&Mt(e)}}}function Kc(l){let e,t,n,i,s,o,a,c=l[0].length+"",r,_,u,d=l[0].length>0&&_s(l);return{c(){e=Ht("div"),t=bl(),n=Ht("p"),n.textContent="Recording API Calls:",i=bl(),s=Ht("p"),o=Ht("span"),a=mn("["),r=mn(c),_=mn("]"),u=bl(),d&&d.c(),Gt(e,"class","loading-dot self-baseline svelte-sy28j6"),Gt(n,"class","self-baseline svelte-sy28j6"),Gt(o,"class","api-count svelte-sy28j6"),Gt(s,"class","self-baseline api-section svelte-sy28j6")},m(p,b){Pt(p,e,b),Pt(p,t,b),Pt(p,n,b),Pt(p,i,b),Pt(p,s,b),Tt(s,o),Tt(o,a),Tt(o,r),Tt(o,_),Tt(s,u),d&&d.m(s,null)},p(p,b){b&1&&c!==(c=p[0].length+"")&&eo(r,c),p[0].length>0?d?d.p(p,b):(d=_s(p),d.c(),d.m(s,null)):d&&(d.d(1),d=null)},d(p){p&&(Mt(e),Mt(t),Mt(n),Mt(i),Mt(s)),d&&d.d()}}}function Xc(l){let e,t,n;return t=new Jn({props:{size:"sm",variant:"secondary",$$slots:{default:[Kc]},$$scope:{ctx:l}}}),{c(){e=Ht("div"),Hc(t.$$.fragment),Gt(e,"id","api-recorder")},m(i,s){Pt(i,e,s),Zc(t,e,null),n=!0},p(i,[s]){const o={};s&7&&(o.$$scope={dirty:s,ctx:i}),t.$set(o)},i(i){n||(Jc(t.$$.fragment,i),n=!0)},o(i){Yc(t.$$.fragment,i),n=!1},d(i){i&&Mt(e),Vc(t)}}}function xc(l,e,t){let{api_calls:n=[]}=e,{dependencies:i}=e;return l.$$set=s=>{"api_calls"in s&&t(0,n=s.api_calls),"dependencies"in s&&t(1,i=s.dependencies)},[n,i]}class e_ extends Gc{constructor(e){super(),Wc(this,e,xc,Xc,Qc,{api_calls:0,dependencies:1})}get api_calls(){return this.$$.ctx[0]}set api_calls(e){this.$$set({api_calls:e}),cs()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),cs()}}const to="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3c!--%20Outer%20gear%20teeth%20(gray)%20--%3e%3cpath%20d='M19.14%2012.94c.04-.3.06-.61.06-.94%200-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24%200-.43.17-.47.41l-.36%202.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47%200-.59.22L2.74%208.87c-.12.21-.08.47.12.61l2.03%201.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03%201.58c-.18.14-.23.41-.12.61l1.92%203.32c.12.22.37.29.59.22l2.39-.96c.5.38%201.03.7%201.62.94l.36%202.54c.05.24.24.41.48.41h3.84c.24%200%20.44-.17.47-.41l.36-2.54c.59-.24%201.13-.56%201.62-.94l2.39.96c.22.08.47%200%20.59
94-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12%2015.6c-1.98%200-3.6-1.62-3.6-3.6s1.62-3.6%203.6-3.6%203.6%201.62%203.6%203.6-1.62%203.6-3.6%203.6z'%20fill='%23808080'/%3e%3c!--%20Inner%20circle%20(now%20gray)%20--%3e%3ccircle%20cx='12'%20cy='12'%20r='2.5'%20fill='%23808080'/%3e%3c/svg%3e",{SvelteComponent:t_,append:zt,attr:jt,component_subscribe:n_,create_component:l_,destroy_component:i_,detach:vl,element:rn,flush:s_,init:o_,insert:$l,listen:r_,mount_component:a_,safe_not_equal:c_,set_data:us,space:kl,src_url_equal:__,text:fs,transition_in:u_,transition_out:f_}=window.__gradio__svelte__internal,{createEventDispatcher:p_}=window.__gradio__svelte__internal;function m_(l){let e,t,n,i,s,o=l[1]("common.settings")+"",a,c,r,_,u,d,p,b,m,$;return p=new Fl({}),{c(){e=rn("h2"),t=rn("img"),i=kl(),s=rn("div"),a=fs(o),c=kl(),r=rn("div"),_=fs(l[0]),u=kl(),d=rn("button"),l_(p.$$.fragment),__(t.src,n=to)||jt(t,"src",n),jt(t,"alt",""),jt(t,"class","svelte-1b2d8fn"),jt(r,"class","url svelte-1b2d8fn"),jt(s,"class","title svelte-1b2d8fn"),jt(e,"class","svelte-1b2d8fn"),jt(d,"class","svelte-1b2d8fn")},m(f,k){$l(f,e,k),zt(e,t),zt(e,i),zt(e,s),zt(s,a),zt(s,c),zt(s,r),zt(r,_),$l(f,u,k),$l(f,d,k),a_(p,d,null),b=!0,m||($=r_(d,"click",l[3]),m=!0)},p(f,[k]){(!b||k&2)&&o!==(o=f[1]("common.settings")+"")&&us(a,o),(!b||k&1)&&us(_,f[0])},i(f){b||(u_(p.$$.fragment,f),b=!0)},o(f){f_(p.$$.fragment,f),b=!1},d(f){f&&(vl(e),vl(u),vl(d)),i_(p),m=!1,$()}}}function d_(l,e,t){let n;n_(l,Qn,a=>t(1,n=a));let{root:i}=e;const s=p_();Dl();const o=()=>s("close");return l.$$set=a=>{"root"in a&&t(0,i=a.root)},[i,n,s,o]}class h_ extends t_{constructor(e){super(),o_(this,e,d_,m_,c_,{root:0})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),s_()}}const{SvelteComponent:g_,append:ue,attr:ce,bubble:b_,component_subscribe:v_,create_component:ps,destroy_component:ms,detach:He,element:we,flush:wl,init:$_,insert:Ve,listen:yl,mount_component:ds,noop:k_,run_all:w_,safe_not_equal:y_,set_data:Wn,space:pt,text:$t,transition_in:hs,transition_out:gs}=window.__gradio__svelte__internal,{onMount:C_}=window.__gradio__svelte__internal;function bs(l){let e,t,n=l[5]("common.display_theme")+"",i,s,o,a,c,r,_,u,d,p,b,m,$,f,k,y;return{c(){e=we("div"),t=we("h2"),i=$t(n),s=pt(),o=we("p"),a=we("li"),c=we("button"),c.textContent="☀︎  Light",_=pt(),u=we("li"),d=we("button"),d.textContent="⏾   Dark",b=pt(),m=we("li"),$=we("button"),$.textContent="🖥︎  System",ce(t,"class","svelte-npavty"),ce(c,"class","svelte-npavty"),ce(a,"class",r="theme-button "+(l[4]==="light"?"current-theme":"inactive-theme")+" svelte-npavty"),ce(d,"class","svelte-npavty"),ce(u,"class",p="theme-button "+(l[4]==="dark"?"current-theme":"inactive-theme")+" svelte-npavty"),ce($,"class","svelte-npavty"),ce(m,"class",f="theme-button "+(l[4]==="system"?"current-theme":"inactive-theme")+" svelte-npavty"),ce(o,"class","padded theme-buttons svelte-npavty"),ce(e,"class","banner-wrap svelte-npavty")},m(g,w){Ve(g,e,w),ue(e,t),ue(t,i),ue(e,s),ue(e,o),ue(o,a),ue(a,c),ue(o,_),ue(o,u),ue(u,d),ue(o,b),ue(o,m),ue(m,$),k||(y=[yl(a,"click",l[9]),yl(u,"click",l[10]),yl(m,"click",l[11])],k=!0)},p(g,w){w&32&&n!==(n=g[5]("common.display_theme")+"")&&Wn(i,n),w&16&&r!==(r="theme-button "+(g[4]==="light"?"current-theme":"inactive-theme")+" svelte-npavty")&&ce(a,"class",r),w&16&&p!==(p="theme-button "+(g[4]==="dark"?"current-theme":"inactive-theme")+" svelte-npavty")&&ce(u,"class",p),w&16&&f!==(f="theme-button "+(g[4]==="system"?"current-theme":"inactive-theme")+" svelte-npavty")&&ce(m,"class",f)},d(g){g&&He(e),k=!1,w_(y)}}}function q_(l){let e,t,n;return{c(){e=$t(`Progressive Web App is not enabled for this app. To enable it, start your
95			Gradio app with `),t=we("code"),t.textContent="launch(pwa=True)",n=$t(".")},m(i,s){Ve(i,e,s),Ve(i,t,s),Ve(i,n,s)},p:k_,d(i){i&&(He(e),He(t),He(n))}}}function E_(l){let e,t,n,i;return{c(){e=$t("You can install this app as a Progressive Web App on your device. Visit "),t=we("a"),n=$t(l[0]),i=$t(" and click the install button in the URL address bar of your browser."),ce(t,"href",l[0]),ce(t,"target","_blank"),ce(t,"class","svelte-npavty")},m(s,o){Ve(s,e,o),Ve(s,t,o),ue(t,n),Ve(s,i,o)},p(s,o){o&1&&Wn(n,s[0]),o&1&&ce(t,"href",s[0])}
95,d(s){s&&(He(e),He(t),He(i))}}}function S_(l){let e,t,n,i,s,o,a=l[5]("common.language")+"",c,r,_,u,d,p,b,m=l[5]("common.pwa")+"",$,f,k,y;t=new h_({props:{root:l[0]}}),t.$on("close",l[8]);let g=l[1]===null&&bs(l);u=new Ro({props:{label:"Language",choices:Po,show_label:!1,root:l[0],value:l[3]}}),u.$on("change",l[7]);function w(E,S){return E[2]?E_:q_}let v=w(l),h=v(l);return{c(){e=we("div"),ps(t.$$.fragment),n=pt(),g&&g.c(),i=pt(),s=we("div"),o=we("h2"),c=$t(a),r=pt(),_=we("p"),ps(u.$$.fragment),d=pt(),p=we("div"),b=we("h2"),$=$t(m),f=pt(),k=we("p"),h.c(),ce(e,"class","banner-wrap svelte-npavty"),ce(o,"class","svelte-npavty"),ce(_,"class","padded svelte-npavty"),ce(s,"class","banner-wrap svelte-npavty"),ce(b,"class","svelte-npavty"),ce(k,"class","padded svelte-npavty"),ce(p,"class","banner-wrap svelte-npavty")},m(E,S){Ve(E,e,S),ds(t,e,null),Ve(E,n,S),g&&g.m(E,S),Ve(E,i,S),Ve(E,s,S),ue(s,o),ue(o,c),ue(s,r),ue(s,_),ds(u,_,null),Ve(E,d,S),Ve(E,p,S),ue(p,b),ue(b,$),ue(p,f),ue(p,k),h.m(k,null),y=!0},p(E,[S]){const C={};S&1&&(C.root=E[0]),t.$set(C),E[1]===null?g?g.p(E,S):(g=bs(E),g.c(),g.m(i.parentNode,i)):g&&(g.d(1),g=null),(!y||S&32)&&a!==(a=E[5]("common.language")+"")&&Wn(c,a);const z={};S&1&&(z.root=E[0]),S&8&&(z.value=E[3]),u.$set(z),(!y||S&32)&&m!==(m=E[5]("common.pwa")+"")&&Wn($,m),v===(v=w(E))&&h?h.p(E,S):(h.d(1),h=v(E),h&&(h.c(),h.m(k,null)))},i(E){y||(hs(t.$$.fragment,E),hs(u.$$.fragment,E),y=!0)},o(E){gs(t.$$.fragment,E),gs(u.$$.fragment,E),y=!1},d(E){E&&(He(e),He(n),He(i),He(s),He(d),He(p)),ms(t),g&&g.d(E),ms(u),h.d()}}}function z_(l,e,t){let n;v_(l,Qn,m=>t(5,n=m));let{root:i}=e,{space_id:s}=e,{pwa_enabled:o}=e;i===""&&(i=location.protocol+"//"+location.host+location.pathname),i.endsWith("/")||(i+="/");function a(m){const $=new URL(window.location.href);m==="system"?($.searchParams.delete("__theme"),t(4,r="system")):($.searchParams.set("__theme",m),t(4,r=m)),window.location.href=$.toString()}C_(()=>{document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0);const $=new URL(window.location.href).searchParams.get("__theme");return t(4,r=$||"system"),()=>{document.body.style.overflow="auto"}});let c,r="system";Io.subscribe(m=>{m&&t(3,c=m)});function _(m){const $=m.detail;Oo($)}Dl();function u(m){b_.call(this,l,m)}const d=()=>a("light"),p=()=>a("dark"),b=()=>a("system");return l.$$set=m=>{"root"in m&&t(0,i=m.root),"space_id"in m&&t(1,s=m.space_id),"pwa_enabled"in m&&t(2,o=m.pwa_enabled)},[i,s,o,c,r,n,a,_,u,d,p,b]}class j_ extends g_{constructor(e){super(),$_(this,e,z_,S_,y_,{root:0,space_id:1,pwa_enabled:2})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),wl()}get space_id(){return this.$$.ctx[1]}set space_id(e){this.$$set({space_id:e}),wl()}get pwa_enabled(){return this.$$.ctx[2]}set pwa_enabled(e){this.$$set({pwa_enabled:e}),wl()}}const L_=Do(Qn),{SvelteComponent:N_,add_flush_callback:A_,assign:Zn,bind:vs,binding_callbacks:Nl,bubble:T_,check_outros:M_,compute_rest_props:$s,construct_svelte_component:ks,create_component:ws,create_slot:P_,destroy_component:ys,detach:I_,empty:O_,exclude_internal_props:D_,flush:xe,get_all_dirty_from_scope:F_,get_slot_changes:U_,get_spread_object:Cs,get_spread_update:qs,group_outros:R_,init:B_,insert:G_,mount_component:Es,not_equal:H_,transition_in:Al,transition_out:Tl,update_slot_base:V_}=window.__gradio__svelte__internal,{bind:W_,binding_callbacks:Z_}=window.__gradio__svelte__internal;function Q_(l){let e;const t=l[12].default,n=P_(t,l,l[16],null);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&65536)&&V_(n,t,i,i[16],e?U_(t,i[16],s,null):F_(i[16]),null)},i(i){e||(Al(n,i),e=!0)},o(i){Tl(n,i),e=!1},d(i){n&&n.d(i)}}}function J_(l){let e,t,n,i;const s=[{elem_id:l[5]},{elem_classes:l[6]},{target:l[3]},{visible:l[7]},l[9],{theme_mode:l[4]},{root:l[2]}];function o(r){l[14](r)}var a=l[8];function c(r,_){let u={$$slots:{default:[Q_]},$$scope:{ctx:r}};for(let d=0;d<s.length;d+=1)u=Zn(u,s[d]);return _!==void 0&&_&764&&(u=Zn(u,qs(s,[_&32&&{elem_id:r[5]},_&64&&{elem_classes:r[6]},_&8&&{target:r[3]},_&128&&{visible:r[7]},_&512&&Cs(r[9]),_&16&&{theme_mode:r[4]},_&4&&{root:r[2]}]))),r[1]!==void 0&&(u.value=r[1]),{props:u}}return a&&(e=ks(a,c(l)),l[13](e),Nl.push(()=>vs(e,"value",o)),e.$on("prop_change",l[15])),{c(){e&&ws(e.$$.fragment),n=O_()},m(r,_){e&&Es(e,r,_),G_(r,n,_),i=!0},p(r,[_]){if(a!==(a=r[8])){if(e){R_();const u=e;Tl(u.$$.fragment,1,0,()=>{ys(u,1)}),M_()}a?(e=ks(a,c(r,_)),r[13](e),Nl.push(()=>vs(e,"value",o)),e.$on("prop_change",r[15]),ws(e.$$.fragment),Al(e.$$.fragment,1),Es(e,n.parentNode,n)):e=null}else if(a){const u=_&764?qs(s,[_&32&&{elem_id:r[5]},_&64&&{elem_classes:r[6]},_&8&&{target:r[3]},_&128&&{visible:r[7]},_&512&&Cs(r[9]),_&16&&{theme_mode:r[4]},_&4&&{root:r[2]}]):{};_&65536&&(u.$$scope={dirty:_,ctx:r}),!t&&_&2&&(t=!0,u.value=r[1],A_(()=>t=!1)),e.$set(u)}}
vendor: 13,461 bytes, line 95
95,i(r){i||(e&&Al(e.$$.fragment,r),i=!0)},o(r){e&&Tl(e.$$.fragment,r),i=!1},d(r){r&&I_(n),l[13](null),e&&ys(e,r)}}}function Y_(l,e,t){const n=["root","component","target","theme_mode","instance","value","elem_id","elem_classes","_id","visible"];let i=$s(e,n),{$$slots:s={},$$scope:o}=e,{root:a}=e,{component:c}=e,{target:r}=e,{theme_mode:_}=e,{instance:u}=e,{value:d}=e,{elem_id:p}=e,{elem_classes:b}=e,{_id:m}=e,{visible:$}=e;const f=(h,E,S)=>new CustomEvent("prop_change",{detail:{id:h,prop:E,value:S}});function k(h){return new Proxy(h,{construct(S,C){const z=new S(...C),A=Object.keys(z.$$.props);function L(M){return function(Z){if(!r)return;const ke=f(m,M,Z);r.dispatchEvent(ke)}}return A.forEach(M=>{Z_.push(()=>W_(z,M,L(M)))}),z}})}const y=k(c);function g(h){Nl[h?"unshift":"push"](()=>{u=h,t(0,u)})}function w(h){d=h,t(1,d)}function v(h){T_.call(this,l,h)}return l.$$set=h=>{e=Zn(Zn({},e),D_(h)),t(9,i=$s(e,n)),"root"in h&&t(2,a=h.root),"component"in h&&t(10,c=h.component),"target"in h&&t(3,r=h.target),"theme_mode"in h&&t(4,_=h.theme_mode),"instance"in h&&t(0,u=h.instance),"value"in h&&t(1,d=h.value),"elem_id"in h&&t(5,p=h.elem_id),"elem_classes"in h&&t(6,b=h.elem_classes),"_id"in h&&t(11,m=h._id),"visible"in h&&t(7,$=h.visible),"$$scope"in h&&t(16,o=h.$$scope)},[u,d,a,r,_,p,b,$,y,i,c,m,s,g,w,v,o]}class K_ extends N_{constructor(e){super(),B_(this,e,Y_,J_,H_,{root:2,component:10,target:3,theme_mode:4,instance:0,value:1,elem_id:5,elem_classes:6,_id:11,visible:7})}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),xe()}get component(){return this.$$.ctx[10]}set component(e){this.$$set({component:e}),xe()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),xe()}get theme_mode(){return this.$$.ctx[4]}set theme_mode(e){this.$$set({theme_mode:e}),xe()}get instance(){return this.$$.ctx[0]}set instance(e){this.$$set({instance:e}),xe()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),xe()}get elem_id(){return this.$$.ctx[5]}set elem_id(e){this.$$set({elem_id:e}),xe()}get elem_classes(){return this.$$.ctx[6]}set elem_classes(e){this.$$set({elem_classes:e}),xe()}get _id(){return this.$$.ctx[11]}set _id(e){this.$$set({_id:e}),xe()}get visible(){return this.$$.ctx[7]}set visible(e){this.$$set({visible:e}),xe()}}const{SvelteComponent:X_,add_flush_callback:Ss,assign:x_,bind:zs,binding_callbacks:js,bubble:Ls,check_outros:no,create_component:lo,destroy_component:io,detach:Zl,empty:Ql,ensure_array_like:Ns,flush:ct,get_spread_object:eu,get_spread_update:tu,group_outros:so,init:nu,insert:Jl,mount_component:oo,outro_and_destroy_block:lu,safe_not_equal:iu,transition_in:Wt,transition_out:dn,update_keyed_each:su}=window.__gradio__svelte__internal,{onMount:ou,createEventDispatcher:ru,setContext:au}=window.__gradio__svelte__internal;function As(l,e,t){const n=l.slice();return n[15]=e[t],n}function Ts(l){let e=[],t=new Map,n,i,s=Ns(l[0].children);const o=a=>a[15].id;for(let a=0;a<s.length;a+=1){let c=As(l,s,a),r=o(c);t.set(r,e[a]=Ms(r,c))}return{c(){for(let a=0;a<e.length;a+=1)e[a].c();n=Ql()},m(a,c){for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(a,c);Jl(a,n,c),i=!0},p(a,c){c&63&&(s=Ns(a[0].children),so(),e=su(e,c,o,1,a,s,t,n.parentNode,lu,Ms,n,As),no())},i(a){if(!i){for(let c=0;c<s.length;c+=1)Wt(e[c]);i=!0}},o(a){for(let c=0;c<e.length;c+=1)dn(e[c]);i=!1},d(a){a&&Zl(n);for(let c=0;c<e.length;c+=1)e[c].d(a)}}}function Ms(l,e){let t,n,i;return n=new ro({props:{node:e[15],component:e[15].component,target:e[2],id:e[15].id,root:e[1],theme_mode:e[3],max_file_size:e[4],client:e[5]}}),n.$on("destroy",e[9]),n.$on("mount",e[10]),{key:l,first:null,c(){t=Ql(),lo(n.$$.fragment),this.first=t},m(s,o){Jl(s,t,o),oo(n,s,o),i=!0},p(s,o){e=s;const a={};o&1&&(a.node=e[15]),o&1&&(a.component=e[15].component),o&4&&(a.target=e[2]),o&1&&(a.id=e[15].id),o&2&&(a.root=e[1]),o&8&&(a.theme_mode=e[3]),o&16&&(a.max_file_size=e[4]),o&32&&(a.client=e[5]),n.$set(a)},i(s){i||(Wt(n.$$.fragment,s),i=!0)},o(s){dn(n.$$.fragment,s),i=!1},d(s){s&&Zl(t),io(n,s)}}}function cu(l){let e,t,n=l[0].children&&l[0].children.length&&Ts(l);return{c(){n&&n.c(),e=Ql()},m(i,s){n&&n.m(i,s),Jl(i,e,s),t=!0},p(i,s){i[0].children&&i[0].children.length?n?(n.p(i,s),s&1&&Wt(n,1)):(n=Ts(i),n.c(),Wt(n,1),n.m(e.parentNode,e)):n&&(so(),dn(n,1,1,()=>{n=null}),no())},i(i){t||(Wt(n),t=!0)},o(i){dn(n),t=!1},d(i){i&&Zl(e),n&&n.d(i)}}}function _u(l){let e,t,n,i;const s=[{_id:l[0]?.id},{component:l[0].component},{elem_id:"elem_id"in l[0].props&&l[0].props.elem_id||`component-${l[0].id}`},{elem_classes:"elem_classes"in l[0].props&&l[0].props.elem_classes||[]},{target:l[2]},l[0].props,{theme_mode:l[3]},{root:l[1]},{visible:typeof l[0].props.visible=="boolean"?l[0].props.visible:!0}];function o(r){l[11](r)}function a(r){l[12](r)}let c={$$slots:{default:[cu]},$$scope:{ctx:l}};for(let r=0;r<s.length;r+=1)c=x_(c,s[r]);return l[0].instance!==void 0&&(c.instance=l[0].instance),l[0].props.value!==void 0&&(c.value=l[0].props.value),e=new K_({props:c}),js.push(()=>zs(e,"instance",o)),js.push(()=>zs(e,"value",a)),{c(){lo(e.$$.fragment)},m(r,_){oo(e,r,_),i=!0},p(r,[_]){const u=_&15?tu(s,[_&1&&{_id:r[0]?.id},_&1&&{component:r[0].component},_&1&&{elem_id:"elem_id"in r[0].props&&r[0].props.elem_id||`component-${r[0].id}`},_&1&&{elem_classes:"elem_classes"in r[0].props&&r[0].props.elem_classes||[]},_&4&&{target:r[2]},_&1&&eu(r[0].props),_&8&&{theme_mode:r[3]},_&2&&{root:r[1]},_&1&&{visible:typeof r[0].props.visible=="boolean"?r[0].props.visible:!0}]):{};_&262207&&(u.$$scope={dirty:_,ctx:r}),!t&&_&1&&(t=!0,u.instance=r[0].instance,Ss(()=>t=!1)),!n&&_&1&&(n=!0,u.value=r[0].props.value,Ss(()=>n=!1)),e.$set(u)},i(r){i||(Wt(e.$$.fragment,r),i=!0)},o(r){dn(e.$$.fragment,r),i=!1},d(r){io(e,r)}}}function uu(l,e,t){let{root:n}=e,{node:i}=e,{parent:s=null}=e,{target:o}=e,{theme_mode:a}=e,{version:c}=e,{autoscroll:r}=e,{max_file_size:_}=e,{client:u}=e;const d=ru();let p=[];ou(()=>{d("mount",i.id);for(const k of p)d("mount",k.id);return()=>{d("destroy",i.id);for(const k of p)d("mount",k.id)}}),au("BLOCK_KEY",s);function b(k){Ls.call(this,l,k)}function m(k){Ls.call(this,l,k)}function $(k){l.$$.not_equal(i.instance,k)&&(i.instance=k,t(0,i),t(14,p),t(2,o),t(3,a),t(7,c),t(1,n),t(8,r),t(4,_),t(5,u))}function f(k){l.$$.not_equal(i.props.value,k)&&(i.props.value=k,t(0,i),t(14,p),t(2,o),t(3,a),t(7,c),t(1,n),t(8,r),t(4,_),t(5,u))}return l.$$set=k=>{"root"in k&&t(1,n=k.root),"node"in k&&t(0,i=k.node),"parent"in k&&t(6,s=k.parent),"target"in k&&t(2,o=k.target),"theme_mode"in k&&t(3,a=k.theme_mode),"version"in k&&t(7,c=k.version),"autoscroll"in k&&t(8,r=k.autoscroll),"max_file_size"in k&&t(4,_=k.max_file_size),"client"in k&&t(5,u=k.client)},l.$$.update=()=>{l.$$.dirty&1&&i&&t(0,i.children=i.children&&i.children.filter(k=>{const y=i.type!=="statustracker";return y||p.push(k),y}),i),l.$$.dirty&1&&i&&i.type==="form"&&(i.children?.every(k=>!k.props.visible)?t(0,i.props.visible=!1,i):t(0,i.props.visible=!0,i)),l.$$.dirty&447&&t(0,i.props.gradio=new Go(i.id,o,a,c,n,r,_,L_,u,Fo),i)},[i,n,o,a,_,u,s,c,r,b,m,$,f]}class ro extends X_{constructor(e){super(),nu(this,e,uu,_u,iu,{root:1,node:0,parent:6,target:2,theme_mode:3,version:7,autoscroll:8,max_file_size:4,client:5})}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),ct()}get node(){return this.$$.ctx[0]}set node(e){this.$$set({node:e}),ct()}get parent(){return this.$$.ctx[6]}set parent(e){this.$$set({parent:e}),ct()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),ct()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),ct()}get version(){return this.$$.ctx[7]}set version(e){this.$$set({version:e}),ct()}get autoscroll(){return this.$$.ctx[8]}set autoscroll(e){this.$$set({autoscroll:e}),ct()}get max_file_size(){return this.$$.ctx[4]}set max_file_size(e){this.$$set({max_file_size:e}),ct()}get client(){return this.$$.ctx[5]}set client(e){this.$$set({client:e}),ct()}}const{SvelteComponent:fu,check_outros:pu,create_component:mu,destroy_component:du,detach:hu,empty:gu,flush:ft,group_outros:bu,init:vu,insert:$u,mount_component:ku,safe_not_equal:wu,transition_in:In,transition_out:Ml}=window.__gradio__svelte__internal,{onMount:yu,createEventDispatcher:Cu}=window.__gradio__svelte__internal;function Ps(l){let e,t;return e=new ro({props:{node:l[0],root:l[1],target:l[2],theme_mode:l[3],version:l[4],autoscroll:l[5],max_file_size:l[6],client:l[7]}}),{c(){mu(e.$$.fragment)},m(n,i){ku(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.node=n[0]),i&2&&(s.root=n[1]),i&4&&(s.target=n[2]),i&8&&(s.theme_mode=n[3]),i&16&&(s.version=n[4]),i&32&&(s.autoscroll=n[5]),i&64&&(s.max_file_size=n[6]),i&128&&(s.client=n[7]),e.$set(s)},i(n){t||(In(e.$$.fragment,n),t=!0)},o(n){Ml(e.$$.fragment,n),t=!1},d(n){du(e,n)}}}function qu(l){let e,t,n=l[0]&&Ps(l);return{c(){n&&n.c(),e=gu()},m(i,s){n&&n.m(i,s),$u(i,e,s),t=!0},p(i,[s]){i[0]?n?(n.p(i,s),s&1&&In(n,1)):(n=Ps(i),n.c(),In(n,1),n.m(e.parentNode,e)):n&&(bu(),Ml(n,1,1,()=>{n=null}),pu())},i(i){t||(In(n),t=!0)},o(i){Ml(n),t=!1},d(i){i&&hu(e),n&&n.d(i)}}}function Eu(l,e,t){let{rootNode:n}=e,{root:i}=e,{target:s}=e,{theme_mode:o}=e,{version:a}=e,{autoscroll:c}=e,{max_file_size:r=null}=e,{client:_}=e;const u=Cu();return yu(()=>{u("mount")}),l.$$set=d=>{"rootNode"in d&&t(0,n=d.rootNode),"root"in d&&t(1,i=d.root),"target"in d&&t(2,s=d.target),"theme_mode"in d&&t(3,o=d.theme_mode),"version"in d&&t(4,a=d.version),"autoscroll"in d&&t(5,c=d.autoscroll),"max_file_size"in d&&t(6,r=d.max_file_size),"client"in d&&t(7,_=d.client)},[n,i,s,o,a,c,r,_]}class Su extends fu{constructor(e){super(),vu(this,e,Eu,qu,wu,{rootNode:0,root:1,target:2,theme_mode:3,version:4,autoscroll:5,max_file_size:6,client:7})}get rootNode(){return this.$$.ctx[0]}set rootNode(e){this.$$set({rootNode:e}),ft()}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),ft()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),ft()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),ft()}get version(){return this.$$.ctx[4]}set version(e){this.$$set({version:e}),ft()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),ft()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),ft()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),ft()}}const zu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='576'%20height='576'%20viewBox='0%200%20576%20576'%20fill='none'%3e%3cpath%20d='M287.5%20229L86%20344.5L287.5%20460L489%20344.5L287.5%20229Z'%20stroke='url(%23paint0_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M287.5%20116L86%20231.5L287.5%20347L489%20231.5L287.5%20116Z'%20stroke='url(%23paint1_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M86%20344L288%20229'%20stroke='url(%23paint2_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='bevel'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_102_7'%20x1='60'%20y1='341'%20x2='429.5'%20y2='344'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_102_7'%20x1='513.5'%20y1='231'%20x2='143.5'%20y2='231'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_102_7'%20x1='60'%20y1='344'%20x2='428.987'%20y2='341.811'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",{HtmlTag:ju,SvelteComponent:Lu,append:oe,attr:ee,check_outros:an,component_subscribe:cn,create_component:gn,destroy_component:bn,detach:Ee,element:ye,empty:On,flush:se,globals:Nu,group_outros:_n,init:Au,insert:De,listen:vn,mount_component:$n,noop:Cl,safe_not_equal:Tu,set_data:Pl,set_style:An,space:Fe,src_url_equal:Il,text:Ol,transition_in:ge,transition_out:Oe}=window.__gradio__svelte__internal,{document:pn}=Nu,{tick:Tn,onMount:Mu}=window.__gradio__svelte__internal;function Is(l){return pn.title=l[2],{c:Cl,m:Cl,d:Cl}}function Os(l){let e,t=`<style>${ti(l[15],l[12])}</style>`,n;return{c(){e=new ju(!1),n=On(),e.a=n},m(i,s){e.m(t,i,s),De(i,n,s)},p(i,s){s[0]&36864&&t!==(t=`<style>${ti(i[15],i[12])}</style>`)&&e.p(t)},d(i){i&&(Ee(n),e.d())}}}function Ds(l){let e,t;return e=new Su({props:{rootNode:l[16],root:l[0],target:l[3],theme_mode:l[9],version:l[12],autoscroll:l[4],max_file_size:l[14],client:l[10]}}),e.$on("mount",l[30]),{c(){gn(e.$$.fragment)},m(n,i){$n(e,n,i),t=!0},p(n,i){const s={};i[0]&65536&&(s.rootNode=n[16]),i[0]&1&&(s.root=n[0]),i[0]&8&&(s.target=n[3]),i[0]&512&&(s.theme_mode=n[9]),i[0]&4096&&(s.version=n[12]),i[0]&16&&(s.autoscroll=n[4]),i[0]&16384&&(s.max_file_size=n[14]),i[0]&1024&&(s.client=n[10]),e.$set(s)},i(n){t||(ge(e.$$.fragment,n),t=!0)},o(n){Oe(e.$$.fragment,n),t=!1},d(n){bn(e,n)}}}function Fs(l){let e,t,n,i=l[22]("common.built_with_gradio")+"",s,o,a,c,r,_,u,d,p,b=l[22]("common.settings")+"",m,$,f,k,y,g,w,v=l[5]&&Us(l);return{c(){e=ye("footer"),v&&v.c(),t=Fe(),n=ye("a"),s=Ol(i),o=Fe(),a=ye("img"),_=Fe(),u=ye("div"),u.textContent="·",d=Fe(),p=ye("button"),m=Ol(b),$=Fe(),f=ye("img"),Il(a.src,c=zu)||ee(a,"src",c),ee(a,"alt",r=l[22]("common.logo")),ee(a,"class","svelte-1byz9vf"),ee(n,"href","https://gradio.app"),ee(n,"class","built-with 
95svelte-1byz9vf"),ee(n,"target","_blank"),ee(n,"rel","noreferrer"),ee(u,"class","divider svelte-1byz9vf"),Il(f.src,k=to)||ee(f,"src",k),ee(f,"alt",y=l[22]("common.settings")),ee(f,"class","svelte-1byz9vf"),ee(p,"class","settings svelte-1byz9vf"),ee(e,"class","svelte-1byz9vf")},m(h,E){De(h,e,E),v&&v.m(e,null),oe(e,t),oe(e,n),oe(n,s),oe(n,o),oe(n,a),oe(e,_),oe(e,u),oe(e,d),oe(e,p),oe(p,m),oe(p,$),oe(p,f),g||(w=vn(p,"click",l[44]),g=!0)},p(h,E){h[5]?v?v.p(h,E):(v=Us(h),v.c(),v.m(e,t)):v&&(v.d(1),v=null),E[0]&4194304&&i!==(i=h[22]("common.built_with_gradio")+"")&&Pl(s,i),E[0]&4194304&&r!==(r=h[22]("common.logo"))&&ee(a,"alt",r),E[0]&4194304&&b!==(b=h[22]("common.settings")+"")&&Pl(m,b),E[0]&4194304&&y!==(y=h[22]("common.settings"))&&ee(f,"alt",y)},d(h){h&&Ee(e),v&&v.d(),g=!1,w()}}}function Us(l){let e,t=l[22]("errors.use_via_api")+"",n,i,s,o,a,c,r,_,u;return{c(){e=ye("button"),n=Ol(t),i=Fe(),s=ye("img"),c=Fe(),r=ye("div"),r.textContent="·",Il(s.src,o=Zs)||ee(s,"src",o),ee(s,"alt",a=l[22]("common.logo")),ee(s,"class","svelte-1byz9vf"),ee(e,"class","show-api svelte-1byz9vf"),ee(r,"class","divider show-api-divider svelte-1byz9vf")},m(d,p){De(d,e,p),oe(e,n),oe(e,i),oe(e,s),De(d,c,p),De(d,r,p),_||(u=vn(e,"click",l[43]),_=!0)},p(d,p){p[0]&4194304&&t!==(t=d[22]("errors.use_via_api")+"")&&Pl(n,t),p[0]&4194304&&a!==(a=d[22]("common.logo"))&&ee(s,"alt",a)},d(d){d&&(Ee(e),Ee(c),Ee(r)),_=!1,u()}}}function Rs(l){let e,t,n,i,s;return t=new e_({props:{api_calls:l[20],dependencies:l[1]}}
vendor: 4,262 bytes, line 95
95),{c(){e=ye("div"),gn(t.$$.fragment),ee(e,"id","api-recorder-container"),ee(e,"class","svelte-1byz9vf")},m(o,a){De(o,e,a),$n(t,e,null),n=!0,i||(s=vn(e,"click",l[45]),i=!0)},p(o,a){const c={};a[0]&1048576&&(c.api_calls=o[20]),a[0]&2&&(c.dependencies=o[1]),t.$set(c)},i(o){n||(ge(t.$$.fragment,o),n=!0)},o(o){Oe(t.$$.fragment,o),n=!1},d(o){o&&Ee(e),bn(t),i=!1,s()}}}function Bs(l){let e,t,n,i,s,o,a,c;return s=new Bc({props:{root_node:l[16],dependencies:l[1],root:l[0],app:l[10],space_id:l[11],api_calls:l[20],username:l[13]}}),s.$on("close",l[47]),{c(){e=ye("div"),t=ye("div"),n=Fe(),i=ye("div"),gn(s.$$.fragment),ee(t,"class","backdrop svelte-1byz9vf"),ee(i,"class","api-docs-wrap svelte-1byz9vf"),ee(e,"class","api-docs svelte-1byz9vf")},m(r,_){De(r,e,_),oe(e,t),oe(e,n),oe(e,i),$n(s,i,null),o=!0,a||(c=vn(t,"click",l[46]),a=!0)},p(r,_){const u={};_[0]&65536&&(u.root_node=r[16]),_[0]&2&&(u.dependencies=r[1]),_[0]&1&&(u.root=r[0]),_[0]&1024&&(u.app=r[10]),_[0]&2048&&(u.space_id=r[11]),_[0]&1048576&&(u.api_calls=r[20]),_[0]&8192&&(u.username=r[13]),s.$set(u)},i(r){o||(ge(s.$$.fragment,r),o=!0)},o(r){Oe(s.$$.fragment,r),o=!1},d(r){r&&Ee(e),bn(s),a=!1,c()}}}function Gs(l){let e,t,n,i,s,o,a,c;return s=new j_({props:{pwa_enabled:l[10].config.pwa,root:l[0],space_id:l[11]}}),s.$on("close",l[49]),{c(){e=ye("div"),t=ye("div"),n=Fe(),i=ye("div"),gn(s.$$.fragment),ee(t,"class","backdrop svelte-1byz9vf"),ee(i,"class","api-docs-wrap svelte-1byz9vf"),ee(e,"class","api-docs svelte-1byz9vf")},m(r,_){De(r,e,_),oe(e,t),oe(e,n),oe(e,i),$n(s,i,null),o=!0,a||(c=vn(t,"click",l[48]),a=!0)},p(r,_){const u={};_[0]&1024&&(u.pwa_enabled=r[10].config.pwa),_[0]&1&&(u.root=r[0]),_[0]&2048&&(u.space_id=r[11]),s.$set(u)},i(r){o||(ge(s.$$.fragment,r),o=!0)},o(r){Oe(s.$$.fragment,r),o=!1},d(r){r&&Ee(e),bn(s),a=!1,c()}}}function Hs(l){let e,t;return e=new Bo({props:{messages:l[21]}}),e.$on("close",l[29]),{c(){gn(e.$$.fragment)},m(n,i){$n(e,n,i),t=!0},p(n,i){const s={};i[0]&2097152&&(s.messages=n[21]),e.$set(s)},i(n){t||(ge(e.$$.fragment,n),t=!0)},o(n){Oe(e.$$.fragment,n),t=!1},d(n){bn(e,n)}}}function Pu(l){let e,t,n,i,s,o,a,c,r,_,u,d,p=l[7]&&Is(l),b=l[15]&&Os(l),m=l[16]&&l[10].config&&Ds(l),$=l[6]&&Fs(l),f=l[19]&&Rs(l),k=l[17]&&l[16]&&Bs(l),y=l[18]&&l[16]&&l[10].config&&Gs(l),g=l[21]&&Hs(l);return{c(){p&&p.c(),e=On(),b&&b.c(),t=On(),n=Fe(),i=ye("div"),s=ye("div"),m&&m.c(),o=Fe(),$&&$.c(),a=Fe(),f&&f.c(),c=Fe(),k&&k.c(),r=Fe(),y&&y.c(),_=Fe(),g&&g.c(),u=On(),ee(s,"class","contain svelte-1byz9vf"),An(s,"flex-grow",l[8]?"1":"auto"),ee(i,"class","wrap svelte-1byz9vf"),An(i,"min-height",l[8]?"100%":"auto")},m(w,v){p&&p.m(pn.head,null),oe(pn.head,e),b&&b.m(pn.head,null),oe(pn.head,t),De(w,n,v),De(w,i,v),oe(i,s),m&&m.m(s,null),oe(i,o),$&&$.m(i,null),De(w,a,v),f&&f.m(w,v),De(w,c,v),k&&k.m(w,v),De(w,r,v),y&&y.m(w,v),De(w,_,v),g&&g.m(w,v),De(w,u,v),d=!0},p(w,v){w[7]?p||(p=Is(w),p.c(),p.m(e.parentNode,e)):p&&(p.d(1),p=null),w[15]?b?b.p(w,v):(b=Os(w),b.c(),b.m(t.parentNode,t)):b&&(b.d(1),b=null),w[16]&&w[10].config?m?(m.p(w,v),v[0]&66560&&ge(m,1)):(m=Ds(w),m.c(),ge(m,1),m.m(s,null)):m&&(_n(),Oe(m,1,1,()=>{m=null}),an()),v[0]&256&&An(s,"flex-grow",w[8]?"1":"auto"),w[6]?$?$.p(w,v):($=Fs(w),$.c(),$.m(i,null)):$&&($.d(1),$=null),v[0]&256&&An(i,"min-height",w[8]?"100%":"auto"),w[19]?f?(f.p(w,v),v[0]&524288&&ge(f,1)):(f=Rs(w),f.c(),ge(f,1),f.m(c.parentNode,c)):f&&(_n(),Oe(f,1,1,()=>{f=null}),an()),w[17]&&w[16]?k?(k.p(w,v),v[0]&196608&&ge(k,1)):(k=Bs(w),k.c(),ge(k,1),k.m(r.parentNode,r)):k&&(_n(),Oe(k,1,1,()=>{k=null}),an()),w[18]&&w[16]&&w[10].config?y?(y.p(w,v),v[0]&328704&&ge(y,1)):(y=Gs(w),y.c(),ge(y,1),y.m(_.parentNode,_)):y&&(_n(),Oe(y,1,1,()=>{y=null}),an()),w[21]?g?(g.p(w,v),v[0]&2097152&&ge(g,1)):(g=Hs(w),g.c(),ge(g,1),g.m(u.parentNode,u)):g&&(_n(),Oe(g,1,1,()=>{g=null}),an())},i(w){d||(ge(m),ge(f),ge(k),ge(y),ge(g),d=!0)},o(w){Oe(m),Oe(f),Oe(k),Oe(y),Oe(g),d=!1},d(w){w&&(Ee(n),Ee(i),Ee(a),Ee(c),Ee(r),Ee(_),Ee(u)),p&&p.d(w),Ee(e),b&&b.d(w),Ee(t),m&&m.d(),$&&$.d(),f&&f.d(w),k&&k.d(w),y&&y.d(w),g&&g.d(w)}}}const Iu=/^'([^]+)'$/,Ou=15,Du=10;function Vs(l){return"detail"in l}function Fu(l,e,t){let n,i,s,o,a;cn(l,Qn,q=>t(22,o=q)),Dl();let{root:c}=e,{components:r}=e,{layout:_}=e,{dependencies:u}=e,{title:d="Gradio"}=e,{target:p}=e,{autoscroll:b}
95=e,{show_api:m=!0}=e,{show_footer:$=!0}=e,{control_page_title:f=!1}=e,{app_mode:k}=e,{theme_mode:y}=e,{app:g}=e,{space_id:w}=e,{version:v}=e,{js:h}=e,{fill_height:E=!1}=e,{ready:S}=e,{username:C}=e,{api_prefix:z=""}=e,{max_file_size:A=void 0}=e,{initial_layout:L=void 0}=e,{css:M=null}=e,{layout:Z,targets:ke,update_value:K,get_data:W,modify_stream:te,get_stream_state:R,set_time_limit:ie,loading_status:Ce,scheduled_updates:Te,create_layout:kn,rerender_layout:ao}=Uo(L);cn(l,Z,q=>t(16,a=q)),cn(l,ke,q=>t(56,i=q)),cn(l,Ce,q=>t(42,n=q)),cn(l,Te,q=>t(57,s=q));let il=u;async function co(){await kn({components:r,layout:_,dependencies:u,root:c+z,app:g,options:{fill_height:E}})}let{search_params:xt}=e,sl=xt.get("view")==="api"&&m,wn=xt.get("view")==="settings",en=xt.get("view")==="api-recorder"&&m;function tn(q){t(19,en=!1),t(17,sl=q);let B=new URLSearchParams(window.location.search);q?B.set("view","api"):B.delete("view"),history.replaceState(null,"","?"+B.toString())}function yn(q){let B=new URLSearchParams(window.location.search);q?B.set("view","settings"):B.delete("view"),history.replaceState(null,"","?"+B.toString()),t(18,wn=!wn)}let Cn=[],{render_complete:nn=!1}=e;async function ol(q,B){const G=u.find(U=>U.id==B).outputs,P=q?.map((U,qe)=>({id:G[qe],prop:"value_is_output",value:!0}));K(P),await Tn();const ne=[];q?.forEach((U,qe)=>{if(typeof U=="object"&&U!==null&&U.__type__==="update")for(const[Me,F]of Object.entries(U))Me!=="__type__"&&ne.push({id:G[qe],prop:Me,value:F});else ne.push({id:G[qe],prop:"value",value:U})}),K(ne),await Tn()}let it=new Map,ae=[];function st(q,B,G,P,ne=10,U=!0){return{title:q,message:B,fn_index:G,type:P,id:++_o,duration:ne,visible:U}}function Yl(q,B,G){t(21,ae=[st(q,B,-1,G),...ae])}let _o=-1,rl=!1;const uo=o("blocks.long_requests_queue"),fo=o("blocks.connection_can_break"),po=o("blocks.lost_connection"),mo=o("blocks.waiting_for_inputs");let al=!1,Kl=!1,Xl=!1,ln=[];function Ut(q,B=null,G=null){let P=()=>{};function ne(){P()}s?P=Te.subscribe(U=>{U||Tn().then(()=>{xl(q,B,G),ne()})}):xl(q,B,G)}async function ho(q,B,G){return q===B&&G&&G.is_value_data===!0?G.value:W(q)}async function xl(q,B=null,G=null){let P=u.find(F=>F.id===q);if(ln.length>0){for(const F of ln)if(P.inputs.includes(F)){Yl("Warning",mo,"warning");return}}const ne=Ce.get_status_for_fn(q);t(21,ae=ae.filter(({fn_index:F})=>F!==q)),(ne==="pending"||ne==="generating")&&(P.pending_request=!0);let U={fn_index:q,data:await Promise.all(P.inputs.map(F=>ho(F,B,G))),event_data:P.collects_event_data?G:null,trigger_id:B};P.frontend_fn&&typeof P.frontend_fn!="boolean"?P.frontend_fn(U.data.concat(await Promise.all(P.outputs.map(F=>W(F))))).then(F=>{P.backend_fn?(U.data=F,qe(P,U)):ol(F,q)}):P.types.cancel&&P.cancels?await Promise.all(P.cancels.map(async F=>{const Re=it.get(F);return Re?.cancel(),Re})):P.backend_fn&&(P.js_implementation&&new ni(`let result = await (${P.js_implementation})(...arguments);
96						return (!Array.isArray(result)) ? [result] : result;`)(...U.data).then(Re=>{ol(Re,q),U.js_implementation=!0}).catch(Re=>{console.error(Re),U.js_implementation=!1}),qe(P,U));function qe(F,Re){F.trigger_mode==="once"?F.pending_request||Me(Re,F.connection=="stream"):F.trigger_mode==="multiple"?Me(Re,F.connection=="stream"):F.trigger_mode==="always_last"&&(F.pending_request?F.final_event=Re:Me(Re,F.connection=="stream"))}async function Me(F,Re=!1){en&&t(20,Cn=[...Cn,JSON.parse(JSON.stringify(F))]);let cl;if(g.set_current_payload(F),Re)if(!it.has(q))P.inputs.forEach(le=>te(le,"waiting"));else{if(it.has(q)&&P.inputs.some(le=>R(le)==="waiting"))return;if(it.has(q)&&P.inputs.some(le=>R(le)==="open")){await g.send_ws_message(`${g.config.root+g.config.api_prefix}/stream/${it.get(q).event_id()}`,{...F,session_hash:g.session_hash});return}}try{cl=g.submit(F.fn_index,F.data,F.event_data,F.trigger_id)}catch(le){if(!g.stream_status.open)return;t(21,ae=[st("Error",String(le),0,"error"),...ae]),Ce.update({status:"error",fn_index:0,eta:0,queue:!1,queue_position:null}),qn(n);return}it.set(q,cl);for await(const le of cl){if(F.js_implementation)return;le.type==="data"?jo(le):le.type==="render"?Lo(le):le.type==="status"?To(le):le.type==="log"&&No(le)}function jo(le){const{data:$e,fn_index:X}=le;P.pending_request&&P.final_event&&(P.pending_request=!1,Me(P.final_event,P.connection=="stream")),P.pending_request=!1,ol($e,X),qn(n)}function Lo(le){const{data:$e}=le;
96let X=$e.components,he=$e.layout,ot=$e.dependencies,Ct=$e.render_id,qt=[];u.forEach((sn,Mo)=>{sn.rendered_in===Ct&&qt.push(Mo)}),qt.reverse().forEach(sn=>{u.splice(sn,1)}),ot.forEach(sn=>{u.push(sn)}),ao({components:X,layout:he,root:c+z,dependencies:u,render_id:Ct})}function No(le){const{title:$e,log:X,fn_index:he,level:ot,duration:Ct,visible:qt}=le;t(21,ae=[st($e,X,he,ot,Ct,qt),...ae])}function Ao(le,$e,X){le.original_msg==="process_starts"&&X.connection==="stream"&&te($e,"open")}function To(le){const{fn_index:$e,...X}=le;if(X.stage==="streaming"&&X.time_limit&&P.inputs.forEach(he=>{ie(he,X.time_limit)}),P.inputs.forEach(he=>{Ao(le,he,P)}),Ce.update({...X,time_limit:X.time_limit,status:X.stage,progress:X.progress_data,fn_index:$e}),qn(n),!Kl&&w!==null&&X.position!==void 0&&X.position>=2&&X.eta!==void 0&&X.eta>Ou&&(Kl=!0,t(21,ae=[st("Warning",uo,$e,"warning"),...ae])),!Xl&&al&&X.eta!==void 0&&X.eta>Du&&(Xl=!0,t(21,ae=[st("Warning",fo,$e,"warning"),...ae])),(X.stage==="complete"||X.stage==="generating")&&X.changed_state_ids?.forEach(he=>{u.filter(ot=>ot.targets.some(([Ct,qt])=>
96Ct===he)).forEach(ot=>{Ut(ot.id,F.trigger_id)})}),X.stage==="complete"&&(u.forEach(async he=>{he.trigger_after===$e&&Ut(he.id,F.trigger_id)}),P.inputs.forEach(he=>{te(he,"closed")}),it.delete(q)),X.broken&&al&&rl)window.setTimeout(()=>{t(21,ae=[st("Error",po,$e,"error"),...ae])},0),Ut(P.id,F.trigger_id,G),rl=!1;else if(X.stage==="error"){if(X.message){const he=X.message.replace(Iu,(Ct,qt)=>qt),ot=X.title??"Error";t(21,ae=[st(ot,he,$e,"error",X.duration,X.visible),...ae])}u.map(async he=>{he.trigger_after===$e&&!he.trigger_only_on_success&&Ut(he.id,F.trigger_id)})}}}}function go(q,B){if(w===null)return;const G=new URL(`https://huggingface.co/spaces/${w}/discussions/new`);q!==void 0&&q.length>0&&G.searchParams.set("title",q),G.searchParams.set("description",B),window.open(G.toString(),"_blank")}function bo(q){const B=q.detail;t(21,ae=ae.filter(G=>G.id!==B))}const vo=q=>!!(q&&new URL(q,location.href).origin!==location.origin);async function $o(){h&&await new ni(`let result = await (${h})();
97					return (!Array.isArray(result)) ? [result] : result;`)(),await Tn();for(var q=p.getElementsByTagName("a"),B=0;B<q.length;B++){const G=q[B].getAttribute("target"),P=q[B].getAttribute("href");vo(P)&&G!=="_blank"&&q[B].setAttribute("target","_blank")}ei(),!(!p||nn)&&(p.addEventListener("prop_change",G=>{if(!Vs(G))throw new Error("not a custom event");const{id:P,prop:ne,value:U}=G.detail;K([{id:P,prop:ne,value:U}]),ne==="input_ready"&&U===!1&&ln.push(P),ne==="input_ready"&&U===!0&&(ln=ln.filter(qe=>qe!==P))}),p.addEventListener("gradio",G=>{if(!Vs(G))throw new Error("not a custom event");const{id:P,event:ne,data:U}=G.detail;if(ne==="share"){const{title:qe,description:Me}=U;go(qe,Me)}else ne==="error"?t(21,ae=[st("Error",U,-1,ne),...ae]):ne==="warning"?t(21,ae=[st("Warning",U,-1,ne),...ae]):ne=="clear_status"?ko(P,"complete",U):ne=="close_stream"?i[P]?.[U]?.forEach(Me=>{if(it.has(Me)){const F=`${g.config.root+g.config.api_prefix}/stream/${it.get(Me).event_id()}`;g.post_data(`${F}/close`,{}),g.close_ws(F)}}):i[P]?.[ne]?.forEach(Me=>{requestAnimationFrame(()=>{Ut(Me,P,U)})})}),t(31,nn=!0))}const ei=()=>{u.forEach(q=>{q.targets.some(B=>B[1]==="load")&&Ut(q.id)})};function ko(q,B,G){G.status=B,K([{id:q,prop:"loading_status",value:G}])}function qn(q){let B=[];Object.entries(q).forEach(([ne,U])=>{if(!g.stream_status.open&&U.status==="error")return;let qe=u.find(Me=>Me.id==U.fn_index);qe!==void 0&&(U.scroll_to_output=qe.scroll_to_output,U.show_progress=qe.show_progress,B.push({id:parseInt(ne),prop:"loading_status",value:U}))});const G=Ce.get_inputs_to_update(),P=Array.from(G).map(([ne,U])=>({id:ne,prop:"pending",value:U==="pending"}));K([...B,...P])}Mu(()=>{document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&(rl=!0)}),al=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)});const wo=()=>{tn(!sl)},yo=()=>{yn(!wn)},Co=()=>{tn(!0),t(19,en=!1)},qo=()=>{tn(!1)},Eo=q=>{tn(!1),t(20,Cn=[]),t(19,en=q.detail?.api_recorder_visible)},So=()=>{yn(!1)},zo=q=>{yn(!1)};return l.$$set=q=>{"root"in q&&t(0,c=q.root),"components"in q&&t(33,r=q.components),"layout"in q&&t(34,_=q.layout),"dependencies"in q&&t(1,u=q.dependencies),"title"in q&&t(2,d=q.title),"target"in q&&t(3,p=q.target),"autoscroll"in q&&t(4,b=q.autoscroll),"show_api"in q&&t(5,m=q.show_api),"show_footer"in q&&t(6,$=q.show_footer),"control_page_title"in q&&t(7,f=q.control_page_title),"app_mode"in q&&t(8,k=q.app_mode),"theme_mode"in q&&t(9,y=q.theme_mode),"app"in q&&t(10,g=q.app),"space_id"in q&&t(11,w=q.space_id),"version"in q&&t(12,v=q.version),"js"in q&&t(35,h=q.js),"fill_height"in q&&t(36,E=q.fill_height),"ready"in q&&t(32,S=q.ready),"username"in q&&t(13,C=q.username),"api_prefix"in q&&t(37,z=q.api_prefix),"max_file_size"in q&&t(14,A=q.max_file_size),"initial_layout"in q&&t(38,L=q.initial_layout),"css"in q&&t(15,M=q.css),"search_params"in q&&t(39,xt=q.search_params),"render_complete"in q&&t(31,nn=q.render_complete)},l.$$.update=()=>{l.$$.dirty[0]&1035|l.$$.dirty[1]&44&&co(),l.$$.dirty[0]&65536&&t(32,S=!!a),l.$$.dirty[0]&2|l.$$.dirty[1]&1025&&u!==il&&nn&&(ei(),t(41,il=u)),l.$$.dirty[1]&2048&&qn(n)},[c,u,d,p,b,m,$,f,k,y,g,w,v,C,A,M,a,sl,wn,en,Cn,ae,o,Z,ke,Ce,Te,tn,yn,bo,$o,nn,S,r,_,h,E,z,L,xt,Yl,il,n,wo,yo,Co,qo,Eo,So,zo]}class ff extends Lu{constructor(e){super(),Au(this,e,Fu,Pu,Tu,{root:0,components:33,layout:34,dependencies:1,title:2,target:3,autoscroll:4,show_api:5,show_footer
97:6,control_page_title:7,app_mode:8,theme_mode:9,app:10,space_id:11,version:12,js:35,fill_height:36,ready:32,username:13,api_prefix:37,max_file_size:14,initial_layout:38,css:15,search_params:39,render_complete:31,add_new_message:40},null,[-1,-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),se()}get components(){return this.$$.ctx[33]}set components(e){this.$$set({components:e}),se()}get layout(){return this.$$.ctx[34]}set layout(e){this.$$set({layout:e}),se()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),se()}get title(){return this.$$.ctx[2]}set title(e){this.$$set({title:e}),se()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),se()}get autoscroll(){return this.$$.ctx[4]}set autoscroll(e){this.$$set({autoscroll:e}),se()}get show_api(){return this.$$.ctx[5]}set show_api(e){this.$$set({show_api:e}),se()}get show_footer(){return this.$$.ctx[6]}set show_footer(e){this.$$set({show_footer:e}),se()}get control_page_title(){return this.$$.ctx[7]}set control_page_title(e){this.$$set({control_page_title:e}),se()}get app_mode(){return this.$$.ctx[8]}set app_mode(e){this.$$set({app_mode:e}),se()}get theme_mode(){return this.$$.ctx[9]}set theme_mode(e){this.$$set({theme_mode:e}),se()}get app(){return this.$$.ctx[10]}set app(e){this.$$set({app:e}),se()}get space_id(){return this.$$.ctx[11]}set space_id(e){this.$$set({space_id:e}),se()}get version(){return this.$$.ctx[12]}set version(e){this.$$set({version:e}),se()}get js(){return this.$$.ctx[35]}set js(e){this.$$set({js:e}),se()}get fill_height(){return this.$$.ctx[36]}set fill_height(e){this.$$set({fill_height:e}),se()}get ready(){return this.$$.ctx[32]}set ready(e){this.$$set({ready:e}),se()}get username(){return this.$$.ctx[13]}set username(e){this.$$set({username:e}),se()}get api_prefix(){return this.$$.ctx[37]}set api_prefix(e){this.$$set({api_prefix:e}),se()}get max_file_size(){return this.$$.ctx[14]}set max_file_size(e){this.$$set({max_file_size:e}),se()}get initial_layout(){return this.$$.ctx[38]}set initial_layout(e){this.$$set({initial_layout:e}),se()}get css(){return this.$$.ctx[15]}set css(e){this.$$set({css:e}),se()}get search_params(){return this.$$.ctx[39]}set search_params(e){this.$$set({search_params:e}),se()}get render_complete(){return this.$$.ctx[31]}set render_complete(e){this.$$set({render_complete:e}),se()}get add_new_message(){return this.$$.ctx[40]}}export{ff as default};
98//# sourceMappingURL=Blocks-BXkusghy.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.