Spaces:
Runtime error
Runtime error
import{j as xs,$ as _s,l as eo,s as to,c as no,p as Nl,A as lo}from"./index-CP09mL-w.js";import{B as Ln}from"./Button-B0q4NsZL.js";import{L as us}from"./index-BhihDgyz.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-BiUMvbOz.js";import"./MarkdownCode.svelte_svelte_type_style_lang-zyyENBrq.js";import"./StreamingBar.svelte_svelte_type_style_lang-CxOfZBE-.js";import{B as tn}from"./Block-CB3nIXHA.js";import{T as io}from"./Toast-DgYC2eSU.js";import{G as so}from"./utils-BsGrhMNe.js";import"./svelte/svelte.js";import"./IconButton-B3BI2i6T.js";import"./Clear-By3xiIwg.js";import"./prism-python-D3jiSh5d.js";import"./index-DY56glHo.js";const{SvelteComponent:oo,append:Zn,attr:tt,detach:ro,init:ao,insert:co,noop:Qn,safe_not_equal:_o,set_style:Qt,svg_element:an}=window.__gradio__svelte__internal;function uo(l){let e,t,n,i;return{c(){e=an("svg"),t=an("g"),n=an("path"),i=an("path"),tt(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"),tt(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"),tt(e,"width","100%"),tt(e,"height","100%"),tt(e,"viewBox","0 0 5 5"),tt(e,"version","1.1"),tt(e,"xmlns","http://www.w3.org/2000/svg"),tt(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),tt(e,"xml:space","preserve"),Qt(e,"fill","currentColor"),Qt(e,"fill-rule","evenodd"),Qt(e,"clip-rule","evenodd"),Qt(e,"stroke-linejoin","round"),Qt(e,"stroke-miterlimit","2")},m(s,o){co(s,e,o),Zn(e,t),Zn(t,n),Zn(t,i)},p:Qn,i:Qn,o:Qn,d(s){s&&ro(e)}}}class fs extends oo{constructor(e){super(),ao(this,e,null,uo,_o,{})}}const{SvelteComponent:fo,append:ot,attr:cn,create_component:po,destroy_component:mo,detach:Jn,element:Tt,flush:ho,init:go,insert:Yn,listen:bo,mount_component:vo,safe_not_equal:$o,set_data:ko,space:Kn,text:Al,transition_in:wo,transition_out:yo}=window.__gradio__svelte__internal,{createEventDispatcher:Co}=window.__gradio__svelte__internal;function jo(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,d;return f=new fs({}),{c(){e=Tt("div"),t=Tt("h1"),t.textContent="API Docs",n=Kn(),i=Tt("p"),s=Al(`No API Routes found for | |
`),o=Tt("code"),a=Al(l[0]),c=Kn(),r=Tt("p"),r.innerHTML=`To expose an API endpoint of your app in this page, set the <code>api_name</code> | |
parameter of the event listener. | |
<br/> | |
For more information, visit the | |
<a href="https://gradio.app/sharing_your_app/#api-page" target="_blank">API Page guide</a> | |
. To hide the API documentation button and this page, set | |
<code>show_api=False</code> | |
in the | |
<code>Blocks.launch()</code> | |
method.`,_=Kn(),u=Tt("button"),po(f.$$.fragment),cn(o,"class","svelte-e1ha0f"),cn(i,"class","attention svelte-e1ha0f"),cn(e,"class","wrap prose svelte-e1ha0f"),cn(u,"class","svelte-e1ha0f")},m(b,p){Yn(b,e,p),ot(e,t),ot(e,n),ot(e,i),ot(i,s),ot(i,o),ot(o,a),ot(e,c),ot(e,r),Yn(b,_,p),Yn(b,u,p),vo(f,u,null),m=!0,g||(d=bo(u,"click",l[2]),g=!0)},p(b,[p]){(!m||p&1)&&ko(a,b[0])},i(b){m||(wo(f.$$.fragment,b),m=!0)},o(b){yo(f.$$.fragment,b),m=!1},d(b){b&&(Jn(e),Jn(_),Jn(u)),mo(f),g=!1,d()}}}function qo(l,e,t){const n=Co();let{root:i}=e;const s=()=>n("close");return l.$$set=o=>{"root"in o&&t(0,i=o.root)},[i,n,s]}class Eo extends fo{constructor(e){super(),go(this,e,qo,jo,$o,{root:0})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),ho()}}const ps="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:So,append:ze,attr:He,create_component:Ll,destroy_component:Tl,detach:Et,element:Ve,flush:zl,init:No,insert:St,listen:Ao,mount_component:Ml,noop:Lo,safe_not_equal:To,set_data:Il,space:Yt,src_url_equal:zo,text:Kt,transition_in:Pl,transition_out:Ol}=window.__gradio__svelte__internal,{createEventDispatcher:Mo}=window.__gradio__svelte__internal;function Io(l){let e,t,n;return{c(){e=Ve("div"),t=Yt(),n=Ve("p"),n.textContent="API Recorder",He(e,"class","loading-dot self-baseline svelte-1i1gjw2"),He(n,"class","self-baseline btn-text svelte-1i1gjw2")},m(i,s){St(i,e,s),St(i,t,s),St(i,n,s)},p:Lo,d(i){i&&(Et(e),Et(t),Et(n))}}}function Dl(l){let e;return{c(){e=Kt("s")},m(t,n){St(t,e,n)},d(t){t&&Et(e)}}}function Po(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,d,b,p,w,$,v,j,h,k;u=new Ln({props:{size:"sm",variant:"secondary",elem_id:"start-api-recorder",$$slots:{default:[Io]},$$scope:{ctx:l}}}),u.$on("click",l[3]);let A=l[1]>1&&Dl();return v=new fs({}),{c(){e=Ve("h2"),t=Ve("img"),i=Yt(),s=Ve("div"),o=Kt(`API documentation | |
`),a=Ve("div"),c=Kt(l[0]),r=Yt(),_=Ve("span"),Ll(u.$$.fragment),f=Yt(),m=Ve("p"),g=Ve("span"),d=Kt(l[1]),b=Kt(" API endpoint"),A&&A.c(),p=Ve("br"),w=Yt(),$=Ve("button"),Ll(v.$$.fragment),zo(t.src,n=ps)||He(t,"src",n),He(t,"alt",""),He(t,"class","svelte-1i1gjw2"),He(a,"class","url svelte-1i1gjw2"),He(s,"class","title svelte-1i1gjw2"),He(g,"class","url svelte-1i1gjw2"),He(_,"class","counts svelte-1i1gjw2"),He(e,"class","svelte-1i1gjw2"),He($,"class","svelte-1i1gjw2")},m(q,y){St(q,e,y),ze(e,t),ze(e,i),ze(e,s),ze(s,o),ze(s,a),ze(a,c),ze(e,r),ze(e,_),Ml(u,_,null),ze(_,f),ze(_,m),ze(m,g),ze(g,d),ze(m,b),A&&A.m(m,null),ze(m,p),St(q,w,y),St(q,$,y),Ml(v,$,null),j=!0,h||(k=Ao($,"click",l[4]),h=!0)},p(q,[y]){(!j||y&1)&&Il(c,q[0]);const S={};y&32&&(S.$$scope={dirty:y,ctx:q}),u.$set(S),(!j||y&2)&&Il(d,q[1]),q[1]>1?A||(A=Dl(),A.c(),A.m(m,p)):A&&(A.d(1),A=null)},i(q){j||(Pl(u.$$.fragment,q),Pl(v.$$.fragment,q),j=!0)},o(q){Ol(u.$$.fragment,q),Ol(v.$$.fragment,q),j=!1},d(q){q&&(Et(e),Et(w),Et($)),Tl(u),A&&A.d(),Tl(v),h=!1,k()}}}function Oo(l,e,t){let{root:n}=e,{api_count:i}=e;const s=Mo(),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 Do extends So{constructor(e){super(),No(this,e,Oo,Po,To,{root:0,api_count:1})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),zl()}get api_count(){return this.$$.ctx[1]}set api_count(e){this.$$set({api_count:e}),zl()}}function Ue(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=ll(l)),t==="py"&&(l=il(l)),Fo(l))}function ms(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"&&ms(l[e]))return!0}return!1}function ll(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]=ll(e))}):typeof l=="object"&&l!==null&&Object.keys(l).forEach(e=>{l[e]=ll(l[e])}),l)}function il(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]=il(e))}):typeof l=="object"&&l!==null&&Object.keys(l).forEach(e=>{l[e]=il(l[e])}),l)}function Fo(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:Uo,append:ae,attr:at,check_outros:Ro,create_component:Bo,destroy_component:Go,destroy_each:Ho,detach:$e,element:Ie,empty:ds,ensure_array_like:Fl,flush:_n,group_outros:Vo,init:Wo,insert:ke,mount_component:Zo,noop:Qo,safe_not_equal:Jo,set_data:ct,set_style:wt,space:yt,text:Ne,toggle_class:Ul,transition_in:bn,transition_out:sl}=window.__gradio__svelte__internal;function Rl(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 Bl(l){let e;return{c(){e=Ne("s")},m(t,n){ke(t,e,n)},d(t){t&&$e(e)}}}function Yo(l){let e=(l[2][l[11]].type||"any")+"",t;return{c(){t=Ne(e)},m(n,i){ke(n,t,i)},p(n,i){i&4&&e!==(e=(n[2][n[11]].type||"any")+"")&&ct(t,e)},d(n){n&&$e(t)}}}function Ko(l){let e=l[5].type+"",t,n,i=l[8]&&l[9]===null&&Gl();return{c(){t=Ne(e),i&&i.c(),n=ds()},m(s,o){ke(s,t,o),i&&i.m(s,o),ke(s,n,o)},p(s,o){o&2&&e!==(e=s[5].type+"")&&ct(t,e),s[8]&&s[9]===null?i||(i=Gl(),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(s){s&&($e(t),$e(n)),i&&i.d(s)}}}function Gl(l){let e;return{c(){e=Ne(` | | |
None`)},m(t,n){ke(t,e,n)},d(t){t&&$e(e)}}}function Xo(l){let e,t,n=Ue(l[9],l[5].type,"py")+"",i;return{c(){e=Ie("span"),e.textContent="Default: ",t=Ie("span"),i=Ne(n),at(t,"class","code svelte-1yt946s"),wt(t,"font-size","var(--text-sm)")},m(s,o){ke(s,e,o),ke(s,t,o),ae(t,i)},p(s,o){o&2&&n!==(n=Ue(s[9],s[5].type,"py")+"")&&ct(i,n)},d(s){s&&($e(e),$e(t))}}}function xo(l){let e;return{c(){e=Ie("span"),e.textContent="Required",wt(e,"font-weight","bold")},m(t,n){ke(t,e,n)},p:Qo,d(t){t&&$e(e)}}}function Hl(l){let e,t,n,i,s,o=(l[3]!=="bash"&&l[7]?l[7]:"["+l[11]+"]")+"",a,c,r,_,u,f,m,g=l[4]+"",d,b,p=l[6]+"",w,$,v=l[5].description+"",j,h;function k(E,M){return E[3]==="python"?Ko:Yo}let A=k(l),q=A(l);function y(E,M){return!E[8]||E[3]=="bash"?xo:Xo}let S=y(l),T=S(l);return{c(){e=Ie("hr"),t=yt(),n=Ie("div"),i=Ie("p"),s=Ie("span"),a=Ne(o),c=yt(),r=Ie("span"),q.c(),_=yt(),T.c(),u=yt(),f=Ie("p"),m=Ne('The input value that is provided in the "'),d=Ne(g),b=Ne('" '),w=Ne(p),$=Ne(` | |
component. `),j=Ne(v),h=yt(),at(e,"class","hr svelte-1yt946s"),at(s,"class","code svelte-1yt946s"),wt(s,"margin-right","10px"),at(r,"class","code highlight svelte-1yt946s"),wt(r,"margin-right","10px"),wt(i,"white-space","nowrap"),wt(i,"overflow-x","auto"),at(f,"class","desc svelte-1yt946s"),wt(n,"margin","10px")},m(E,M){ke(E,e,M),ke(E,t,M),ke(E,n,M),ae(n,i),ae(i,s),ae(s,a),ae(i,c),ae(i,r),q.m(r,null),ae(i,_),T.m(i,null),ae(n,u),ae(n,f),ae(f,m),ae(f,d),ae(f,b),ae(f,w),ae(f,$),ae(f,j),ae(n,h)},p(E,M){M&10&&o!==(o=(E[3]!=="bash"&&E[7]?E[7]:"["+E[11]+"]")+"")&&ct(a,o),A===(A=k(E))&&q?q.p(E,M):(q.d(1),q=A(E),q&&(q.c(),q.m(r,null))),S===(S=y(E))&&T?T.p(E,M):(T.d(1),T=S(E),T&&(T.c(),T.m(i,null))),M&2&&g!==(g=E[4]+"")&&ct(d,g),M&2&&p!==(p=E[6]+"")&&ct(w,p),M&2&&v!==(v=E[5].description+"")&&ct(j,v)},d(E){E&&($e(e),$e(t),$e(n)),q.d(),T.d()}}}function Vl(l){let e,t,n;return t=new us({props:{margin:!1}}),{c(){e=Ie("div"),Bo(t.$$.fragment),at(e,"class","load-wrap")},m(i,s){ke(i,e,s),Zo(t,e,null),n=!0},i(i){n||(bn(t.$$.fragment,i),n=!0)},o(i){sl(t.$$.fragment,i),n=!1},d(i){i&&$e(e),Go(t)}}}function er(l){let e,t,n,i=l[1].length+"",s,o,a,c,r,_,u,f,m=l[1].length!=1&&Bl(),g=Fl(l[1]),d=[];for(let p=0;p<g.length;p+=1)d[p]=Hl(Rl(l,g,p));let b=l[0]&&Vl();return{c(){e=Ie("h4"),t=Ie("div"),t.innerHTML='<div class="toggle-dot svelte-1yt946s"></div>',n=Ne(` | |
Accepts `),s=Ne(i),o=Ne(" parameter"),m&&m.c(),a=Ne(":"),c=yt(),r=Ie("div");for(let p=0;p<d.length;p+=1)d[p].c();_=yt(),b&&b.c(),u=ds(),at(t,"class","toggle-icon svelte-1yt946s"),at(e,"class","svelte-1yt946s"),Ul(r,"hide",l[0])},m(p,w){ke(p,e,w),ae(e,t),ae(e,n),ae(e,s),ae(e,o),m&&m.m(e,null),ae(e,a),ke(p,c,w),ke(p,r,w);for(let $=0;$<d.length;$+=1)d[$]&&d[$].m(r,null);ke(p,_,w),b&&b.m(p,w),ke(p,u,w),f=!0},p(p,[w]){if((!f||w&2)&&i!==(i=p[1].length+"")&&ct(s,i),p[1].length!=1?m||(m=Bl(),m.c(),m.m(e,a)):m&&(m.d(1),m=null),w&14){g=Fl(p[1]);let $;for($=0;$<g.length;$+=1){const v=Rl(p,g,$);d[$]?d[$].p(v,w):(d[$]=Hl(v),d[$].c(),d[$].m(r,null))}for(;$<d.length;$+=1)d[$].d(1);d.length=g.length}(!f||w&1)&&Ul(r,"hide",p[0]),p[0]?b?w&1&&bn(b,1):(b=Vl(),b.c(),bn(b,1),b.m(u.parentNode,u)):b&&(Vo(),sl(b,1,1,()=>{b=null}),Ro())},i(p){f||(bn(b),f=!0)},o(p){sl(b),f=!1},d(p){p&&($e(e),$e(c),$e(r),$e(_),$e(u)),m&&m.d(),Ho(d,p),b&&b.d(p)}}}function tr(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 nr extends Uo{constructor(e){super(),Wo(this,e,tr,er,Jo,{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}),_n()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),_n()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),_n()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),_n()}}const{SvelteComponent:lr,create_component:ir,destroy_component:sr,detach:or,flush:rr,init:ar,insert:cr,mount_component:_r,safe_not_equal:ur,set_data:fr,text:pr,transition_in:mr,transition_out:dr}=window.__gradio__svelte__internal;function hr(l){let e;return{c(){e=pr(l[0])},m(t,n){cr(t,e,n)},p(t,n){n&1&&fr(e,t[0])},d(t){t&&or(e)}}}function gr(l){let e,t;return e=new Ln({props:{size:"sm",$$slots:{default:[hr]},$$scope:{ctx:l}}}),e.$on("click",l[1]),{c(){ir(e.$$.fragment)},m(n,i){_r(e,n,i),t=!0},p(n,[i]){const s={};i&9&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(mr(e.$$.fragment,n),t=!0)},o(n){dr(e.$$.fragment,n),t=!1},d(n){sr(e,n)}}}function br(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 st extends lr{constructor(e){super(),ar(this,e,br,gr,ur,{code:2})}get code(){return this.$$.ctx[2]}set code(e){this.$$set({code:e}),rr()}}const{SvelteComponent:vr,append:pl,attr:At,check_outros:$r,create_component:Tn,destroy_component:zn,detach:Qe,element:Je,flush:kr,group_outros:wr,init:yr,insert:Ye,mount_component:Mn,noop:ml,safe_not_equal:Cr,space:dl,transition_in:Dt,transition_out:Ft}=window.__gradio__svelte__internal;function jr(l){let e,t,n,i,s,o;return t=new st({props:{code:Ql}}),{c(){e=Je("div"),Tn(t.$$.fragment),n=dl(),i=Je("div"),s=Je("pre"),s.textContent=`$ ${Ql}`,At(e,"class","copy svelte-hq8ezf"),At(s,"class","svelte-hq8ezf")},m(a,c){Ye(a,e,c),Mn(t,e,null),Ye(a,n,c),Ye(a,i,c),pl(i,s),o=!0},p:ml,i(a){o||(Dt(t.$$.fragment,a),o=!0)},o(a){Ft(t.$$.fragment,a),o=!1},d(a){a&&(Qe(e),Qe(n),Qe(i)),zn(t)}}}function qr(l){let e,t,n,i,s,o;return t=new st({props:{code:Zl}}),{c(){e=Je("div"),Tn(t.$$.fragment),n=dl(),i=Je("div"),s=Je("pre"),s.textContent=`$ ${Zl}`,At(e,"class","copy svelte-hq8ezf"),At(s,"class","svelte-hq8ezf")},m(a,c){Ye(a,e,c),Mn(t,e,null),Ye(a,n,c),Ye(a,i,c),pl(i,s),o=!0},p:ml,i(a){o||(Dt(t.$$.fragment,a),o=!0)},o(a){Ft(t.$$.fragment,a),o=!1},d(a){a&&(Qe(e),Qe(n),Qe(i)),zn(t)}}}function Er(l){let e,t,n,i,s,o;return t=new st({props:{code:Wl}}),{c(){e=Je("div"),Tn(t.$$.fragment),n=dl(),i=Je("div"),s=Je("pre"),s.textContent=`$ ${Wl}`,At(e,"class","copy svelte-hq8ezf"),At(s,"class","svelte-hq8ezf")},m(a,c){Ye(a,e,c),Mn(t,e,null),Ye(a,n,c),Ye(a,i,c),pl(i,s),o=!0},p:ml,i(a){o||(Dt(t.$$.fragment,a),o=!0)},o(a){Ft(t.$$.fragment,a),o=!1},d(a){a&&(Qe(e),Qe(n),Qe(i)),zn(t)}}}function Sr(l){let e,t,n,i;const s=[Er,qr,jr],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=Je("code"),n&&n.c(),At(e,"class","svelte-hq8ezf")},m(c,r){Ye(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&&(wr(),Ft(o[_],1,1,()=>{o[_]=null}),$r()),~t?(n=o[t],n?n.p(c,r):(n=o[t]=s[t](c),n.c()),Dt(n,1),n.m(e,null)):n=null)},i(c){i||(Dt(n),i=!0)},o(c){Ft(n),i=!1},d(c){c&&Qe(e),~t&&o[t].d()}}}function Nr(l){let e,t;return e=new tn({props:{border_mode:"contrast",$$slots:{default:[Sr]},$$scope:{ctx:l}}}),{c(){Tn(e.$$.fragment)},m(n,i){Mn(e,n,i),t=!0},p(n,[i]){const s={};i&3&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Dt(e.$$.fragment,n),t=!0)},o(n){Ft(e.$$.fragment,n),t=!1},d(n){zn(e,n)}}}let Wl="pip install gradio_client",Zl="npm i -D @gradio/client",Ql="curl --version";function Ar(l,e,t){let{current_language:n}=e;return l.$$set=i=>{"current_language"in i&&t(0,n=i.current_language)},[n]}class Lr extends vr{constructor(e){super(),yr(this,e,Ar,Nr,Cr,{current_language:0})}get current_language(){return this.$$.ctx[0]}set current_language(e){this.$$set({current_language:e}),kr()}}const{SvelteComponent:Tr,append:Pt,attr:wn,detach:hl,element:yn,empty:zr,flush:Xn,init:Mr,insert:gl,noop:Jl,safe_not_equal:Ir,set_data:hs,text:Cn}=window.__gradio__svelte__internal;function Pr(l){let e,t,n,i;return{c(){e=yn("h3"),t=Cn(`fn_index: | |
`),n=yn("span"),i=Cn(l[1]),wn(n,"class","post svelte-41kcm6"),wn(e,"class","svelte-41kcm6")},m(s,o){gl(s,e,o),Pt(e,t),Pt(e,n),Pt(n,i)},p(s,o){o&2&&hs(i,s[1])},d(s){s&&hl(e)}}}function Or(l){let e,t,n,i="/"+l[0],s;return{c(){e=yn("h3"),t=Cn(`api_name: | |
`),n=yn("span"),s=Cn(i),wn(n,"class","post svelte-41kcm6"),wn(e,"class","svelte-41kcm6")},m(o,a){gl(o,e,a),Pt(e,t),Pt(e,n),Pt(n,s)},p(o,a){a&1&&i!==(i="/"+o[0])&&hs(s,i)},d(o){o&&hl(e)}}}function Dr(l){let e;function t(s,o){return s[2]?Or:Pr}let n=t(l),i=n(l);return{c(){i.c(),e=zr()},m(s,o){i.m(s,o),gl(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:Jl,o:Jl,d(s){s&&hl(e),i.d(s)}}}function Fr(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 gs extends Tr{constructor(e){super(),Mr(this,e,Fr,Dr,Ir,{api_name:0,fn_index:1,named:2})}get api_name(){return this.$$.ctx[0]}set api_name(e){this.$$set({api_name:e}),Xn()}get fn_index(){return this.$$.ctx[1]}set fn_index(e){this.$$set({fn_index:e}),Xn()}get named(){return this.$$.ctx[2]}set named(e){this.$$set({named:e}),Xn()}}const{SvelteComponent:Ur,append:L,attr:ce,binding_callbacks:xn,check_outros:Yl,create_component:mt,destroy_component:dt,destroy_each:jn,detach:B,element:se,empty:bs,ensure_array_like:_t,flush:nt,group_outros:Kl,init:Rr,insert:G,mount_component:ht,noop:Br,safe_not_equal:Gr,set_data:me,space:In,text:N,transition_in:Re,transition_out:Be}=window.__gradio__svelte__internal;function Xl(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 xl(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[30]=e[t].component,n[22]=e[t].example_input,n[27]=t,n}function ti(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 Hr(l){let e,t;return e=new gs({props:{named:l[5],fn_index:l[1]}}),{c(){mt(e.$$.fragment)},m(n,i){ht(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||(Re(e.$$.fragment,n),t=!0)},o(n){Be(e.$$.fragment,n),t=!1},d(n){dt(e,n)}}}function Vr(l){let e,t;return e=new gs({props:{named:l[5],api_name:l[0].api_name}}),{c(){mt(e.$$.fragment)},m(n,i){ht(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||(Re(e.$$.fragment,n),t=!0)},o(n){Be(e.$$.fragment,n),t=!1},d(n){dt(e,n)}}}function Wr(l){let e,t;return e=new tn({props:{$$slots:{default:[Jr]},$$scope:{ctx:l}}}),{c(){mt(e.$$.fragment)},m(n,i){ht(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||(Re(e.$$.fragment,n),t=!0)},o(n){Be(e.$$.fragment,n),t=!1},d(n){dt(e,n)}}}function Zr(l){let e,t;return e=new tn({props:{$$slots:{default:[ea]},$$scope:{ctx:l}}}),{c(){mt(e.$$.fragment)},m(n,i){ht(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||(Re(e.$$.fragment,n),t=!0)},o(n){Be(e.$$.fragment,n),t=!1},d(n){dt(e,n)}}}function Qr(l){let e,t;return e=new tn({props:{$$slots:{default:[na]},$$scope:{ctx:l}}}),{c(){mt(e.$$.fragment)},m(n,i){ht(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||(Re(e.$$.fragment,n),t=!0)},o(n){Be(e.$$.fragment,n),t=!1},d(n){dt(e,n)}}}function ni(l){let e;return{c(){e=N(",")},m(t,n){G(t,e,n)},d(t){t&&B(e)}}}function li(l){let e,t=Ue(l[22],l[21].type,"bash")+"",n,i,s=l[27]<l[4].length-1&&ni();return{c(){e=N(` | |
`),n=N(t),s&&s.c(),i=bs()},m(o,a){G(o,e,a),G(o,n,a),s&&s.m(o,a),G(o,i,a)},p(o,a){a[0]&16&&t!==(t=Ue(o[22],o[21].type,"bash")+"")&&me(n,t),o[27]<o[4].length-1?s||(s=ni(),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&(B(e),B(n),B(i)),s&&s.d(o)}}}function Jr(l){let e,t,n,i,s,o,a,c,r,_,u=l[0].api_name+"",f,m,g="{",d,b,p,w="}",$,v,j="{",h,k,A="}",q,y,S,T,E,M=l[0].api_name+"",V,je,Y;n=new st({props:{code:l[10]?.innerText}});let H=_t(l[4]),ee=[];for(let R=0;R<H.length;R+=1)ee[R]=li(Xl(l,H,R));return{c(){e=se("code"),t=se("div"),mt(n.$$.fragment),i=In(),s=se("div"),o=se("pre"),a=N("curl -X POST "),c=N(l[11]),r=N(l[12]),_=N("/call/"),f=N(u),m=N(` -s -H "Content-Type: application/json" -d '`),d=N(g),b=N(` | |
"data": [`);for(let R=0;R<ee.length;R+=1)ee[R].c();p=N(` | |
]`),$=N(w),v=N(`' \\ | |
| awk -F'"' '`),h=N(j),k=N(" print $4"),q=N(A),y=N(`' \\ | |
| read EVENT_ID; curl -N `),S=N(l[11]),T=N(l[12]),E=N("/call/"),V=N(M),je=N("/$EVENT_ID"),ce(t,"class","copy svelte-114qcyq"),ce(o,"class","svelte-114qcyq"),ce(e,"class","svelte-114qcyq")},m(R,le){G(R,e,le),L(e,t),ht(n,t,null),L(e,i),L(e,s),L(s,o),L(o,a),L(o,c),L(o,r),L(o,_),L(o,f),L(o,m),L(o,d),L(o,b);for(let ge=0;ge<ee.length;ge+=1)ee[ge]&&ee[ge].m(o,null);L(o,p),L(o,$),L(o,v),L(o,h),L(o,k),L(o,q),L(o,y),L(o,S),L(o,T),L(o,E),L(o,V),L(o,je),l[19](s),Y=!0},p(R,le){const ge={};if(le[0]&1024&&(ge.code=R[10]?.innerText),n.$set(ge),(!Y||le[0]&2048)&&me(c,R[11]),(!Y||le[0]&4096)&&me(r,R[12]),(!Y||le[0]&1)&&u!==(u=R[0].api_name+"")&&me(f,u),le[0]&16){H=_t(R[4]);let qe;for(qe=0;qe<H.length;qe+=1){const nn=Xl(R,H,qe);ee[qe]?ee[qe].p(nn,le):(ee[qe]=li(nn),ee[qe].c(),ee[qe].m(o,p))}for(;qe<ee.length;qe+=1)ee[qe].d(1);ee.length=H.length}(!Y||le[0]&2048)&&me(S,R[11]),(!Y||le[0]&4096)&&me(T,R[12]),(!Y||le[0]&1)&&M!==(M=R[0].api_name+"")&&me(V,M)},i(R){Y||(Re(n.$$.fragment,R),Y=!0)},o(R){Be(n.$$.fragment,R),Y=!1},d(R){R&&B(e),dt(n),jn(ee,R),l[19](null)}}}function ii(l){let e,t,n,i=l[22].url+"",s,o,a=l[30]+"",c,r,_,u;return{c(){e=N(` | |
const response_`),t=N(l[27]),n=N(' = await fetch("'),s=N(i),o=N(`"); | |
const example`),c=N(a),r=N(" = await response_"),_=N(l[27]),u=N(`.blob(); | |
`)},m(f,m){G(f,e,m),G(f,t,m),G(f,n,m),G(f,s,m),G(f,o,m),G(f,c,m),G(f,r,m),G(f,_,m),G(f,u,m)},p:Br,d(f){f&&(B(e),B(t),B(n),B(s),B(o),B(c),B(r),B(_),B(u))}}}function si(l){let e,t,n;return{c(){e=N(', {auth: ["'),t=N(l[6]),n=N('", **password**]}')},m(i,s){G(i,e,s),G(i,t,s),G(i,n,s)},p(i,s){s[0]&64&&me(t,i[6])},d(i){i&&(B(e),B(t),B(n))}}}function Yr(l){let e;return{c(){e=N(l[1])},m(t,n){G(t,e,n)},p(t,n){n[0]&2&&me(e,t[1])},d(t){t&&B(e)}}}function Kr(l){let e,t,n=l[0].api_name+"",i,s;return{c(){e=se("span"),t=N('"/'),i=N(n),s=N('"'),ce(e,"class","api-name svelte-114qcyq")},m(o,a){G(o,e,a),L(e,t),L(e,i),L(e,s)},p(o,a){a[0]&1&&n!==(n=o[0].api_name+"")&&me(i,n)},d(o){o&&B(e)}}}function Xr(l){let e,t,n=l[23]+"",i,s,o=Ue(l[22],l[21].type,"js")+"",a,c;return{c(){e=N(` | |
`),t=se("span"),i=N(n),s=N(": "),a=N(o),c=N(", "),ce(t,"class","example-inputs")},m(r,_){G(r,e,_),G(r,t,_),L(t,i),L(t,s),L(t,a),G(r,c,_)},p(r,_){_[0]&16&&n!==(n=r[23]+"")&&me(i,n),_[0]&16&&o!==(o=Ue(r[22],r[21].type,"js")+"")&&me(a,o)},d(r){r&&(B(e),B(t),B(c))}}}function xr(l){let e,t,n=l[23]+"",i,s,o=l[30]+"",a,c,r;return{c(){e=N(` | |
`),t=se("span"),i=N(n),s=N(": example"),a=N(o),c=N(", "),r=se("span"),r.innerHTML="",ce(t,"class","example-inputs"),ce(r,"class","desc svelte-114qcyq")},m(_,u){G(_,e,u),G(_,t,u),L(t,i),L(t,s),L(t,a),G(_,c,u),G(_,r,u)},p(_,u){u[0]&16&&n!==(n=_[23]+"")&&me(i,n),u[0]&16&&o!==(o=_[30]+"")&&me(a,o)},d(_){_&&(B(e),B(t),B(c),B(r))}}}function oi(l){let e,t;function n(o,a){return a[0]&16&&(e=null),e==null&&(e=!!o[14].includes(o[30])),e?xr:Xr}let i=n(l,[-1,-1]),s=i(l);return{c(){s.c(),t=bs()},m(o,a){s.m(o,a),G(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&&B(t),s.d(o)}}}function ea(l){let e,t,n,i,s,o,a,c,r,_,u=(l[3]||l[2])+"",f,m,g,d,b,p;n=new st({props:{code:l[9]?.innerText}});let w=_t(l[15]),$=[];for(let y=0;y<w.length;y+=1)$[y]=ii(ei(l,w,y));let v=l[6]!==null&&si(l);function j(y,S){return y[5]?Kr:Yr}let h=j(l),k=h(l),A=_t(l[4]),q=[];for(let y=0;y<A.length;y+=1)q[y]=oi(xl(l,A,y));return{c(){e=se("code"),t=se("div"),mt(n.$$.fragment),i=In(),s=se("div"),o=se("pre"),a=N(`import { Client } from "@gradio/client"; | |
`);for(let y=0;y<$.length;y+=1)$[y].c();c=N(` | |
const client = await Client.connect(`),r=se("span"),_=N('"'),f=N(u),m=N('"'),v&&v.c(),g=N(`); | |
const result = await client.predict(`),k.c(),d=N(", { ");for(let y=0;y<q.length;y+=1)q[y].c();b=N(` | |
}); | |
console.log(result.data); | |
`),ce(t,"class","copy svelte-114qcyq"),ce(r,"class","token string svelte-114qcyq"),ce(o,"class","svelte-114qcyq"),ce(e,"class","svelte-114qcyq")},m(y,S){G(y,e,S),L(e,t),ht(n,t,null),L(e,i),L(e,s),L(s,o),L(o,a);for(let T=0;T<$.length;T+=1)$[T]&&$[T].m(o,null);L(o,c),L(o,r),L(r,_),L(r,f),L(r,m),v&&v.m(o,null),L(o,g),k.m(o,null),L(o,d);for(let T=0;T<q.length;T+=1)q[T]&&q[T].m(o,null);L(o,b),l[18](s),p=!0},p(y,S){const T={};if(S[0]&512&&(T.code=y[9]?.innerText),n.$set(T),S[0]&32768){w=_t(y[15]);let E;for(E=0;E<w.length;E+=1){const M=ei(y,w,E);$[E]?$[E].p(M,S):($[E]=ii(M),$[E].c(),$[E].m(o,c))}for(;E<$.length;E+=1)$[E].d(1);$.length=w.length}if((!p||S[0]&12)&&u!==(u=(y[3]||y[2])+"")&&me(f,u),y[6]!==null?v?v.p(y,S):(v=si(y),v.c(),v.m(o,g)):v&&(v.d(1),v=null),h===(h=j(y))&&k?k.p(y,S):(k.d(1),k=h(y),k&&(k.c(),k.m(o,d))),S[0]&16400){A=_t(y[4]);let E;for(E=0;E<A.length;E+=1){const M=xl(y,A,E);q[E]?q[E].p(M,S):(q[E]=oi(M),q[E].c(),q[E].m(o,b))}for(;E<q.length;E+=1)q[E].d(1);q.length=A.length}},i(y){p||(Re(n.$$.fragment,y),p=!0)},o(y){Be(n.$$.fragment,y),p=!1},d(y){y&&B(e),dt(n),jn($,y),v&&v.d(),k.d(),jn(q,y),l[18](null)}}}function ta(l){let e;return{c(){e=N(", handle_file")},m(t,n){G(t,e,n)},d(t){t&&B(e)}}}function ri(l){let e,t,n;return{c(){e=N(', auth=("'),t=N(l[6]),n=N('", **password**)')},m(i,s){G(i,e,s),G(i,t,s),G(i,n,s)},p(i,s){s[0]&64&&me(t,i[6])},d(i){i&&(B(e),B(t),B(n))}}}function ai(l){let e,t=l[23]?l[23]+"=":"",n,i,s=Ue(l[24]?l[25]:l[22],l[21].type,"py")+"",o,a;return{c(){e=N(` | |
`),n=N(t),i=se("span"),o=N(s),a=N(",")},m(c,r){G(c,e,r),G(c,n,r),G(c,i,r),L(i,o),G(c,a,r)},p(c,r){r[0]&16&&t!==(t=c[23]?c[23]+"=":"")&&me(n,t),r[0]&16&&s!==(s=Ue(c[24]?c[25]:c[22],c[21].type,"py")+"")&&me(o,s)},d(c){c&&(B(e),B(n),B(i),B(a))}}}function na(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g=(l[3]||l[2])+"",d,b,p,w,$,v,j,h,k=l[0].api_name+"",A,q,y,S,T,E;n=new st({props:{code:l[8]?.innerText}});let M=l[13]&&ta(),V=l[6]!==null&&ri(l),je=_t(l[4]),Y=[];for(let H=0;H<je.length;H+=1)Y[H]=ai(ti(l,je,H));return{c(){e=se("code"),t=se("div"),mt(n.$$.fragment),i=In(),s=se("div"),o=se("pre"),a=se("span"),a.textContent="from",c=N(" gradio_client "),r=se("span"),r.textContent="import",_=N(" Client"),M&&M.c(),u=N(` | |
client = Client(`),f=se("span"),m=N('"'),d=N(g),b=N('"'),V&&V.c(),p=N(`) | |
result = client.`),w=se("span"),w.textContent="predict",$=N("(");for(let H=0;H<Y.length;H+=1)Y[H].c();v=N(` | |
api_name=`),j=se("span"),h=N('"/'),A=N(k),q=N('"'),y=N(` | |
) | |
`),S=se("span"),S.textContent="print",T=N("(result)"),ce(t,"class","copy svelte-114qcyq"),ce(a,"class","highlight"),ce(r,"class","highlight"),ce(f,"class","token string svelte-114qcyq"),ce(w,"class","highlight"),ce(j,"class","api-name svelte-114qcyq"),ce(S,"class","highlight"),ce(o,"class","svelte-114qcyq"),ce(e,"class","svelte-114qcyq")},m(H,ee){G(H,e,ee),L(e,t),ht(n,t,null),L(e,i),L(e,s),L(s,o),L(o,a),L(o,c),L(o,r),L(o,_),M&&M.m(o,null),L(o,u),L(o,f),L(f,m),L(f,d),L(f,b),V&&V.m(o,null),L(o,p),L(o,w),L(o,$);for(let R=0;R<Y.length;R+=1)Y[R]&&Y[R].m(o,null);L(o,v),L(o,j),L(j,h),L(j,A),L(j,q),L(o,y),L(o,S),L(o,T),l[17](s),E=!0},p(H,ee){const R={};if(ee[0]&256&&(R.code=H[8]?.innerText),n.$set(R),(!E||ee[0]&12)&&g!==(g=(H[3]||H[2])+"")&&me(d,g),H[6]!==null?V?V.p(H,ee):(V=ri(H),V.c(),V.m(o,p)):V&&(V.d(1),V=null),ee[0]&16){je=_t(H[4]);let le;for(le=0;le<je.length;le+=1){const ge=ti(H,je,le);Y[le]?Y[le].p(ge,ee):(Y[le]=ai(ge),Y[le].c(),Y[le].m(o,v))}for(;le<Y.length;le+=1)Y[le].d(1);Y.length=je.length}(!E||ee[0]&1)&&k!==(k=H[0].api_name+"")&&me(A,k)},i(H){E||(Re(n.$$.fragment,H),E=!0)},o(H){Be(n.$$.fragment,H),E=!1},d(H){H&&B(e),dt(n),M&&M.d(),V&&V.d(),jn(Y,H),l[17](null)}}}function la(l){let e,t,n,i,s,o,a;const c=[Vr,Hr],r=[];function _(g,d){return g[5]?0:1}t=_(l),n=r[t]=c[t](l);const u=[Qr,Zr,Wr],f=[];function m(g,d){return g[7]==="python"?0:g[7]==="javascript"?1:g[7]==="bash"?2:-1}return~(s=m(l))&&(o=f[s]=u[s](l)),{c(){e=se("div"),n.c(),i=In(),o&&o.c(),ce(e,"class","container svelte-114qcyq")},m(g,d){G(g,e,d),r[t].m(e,null),L(e,i),~s&&f[s].m(e,null),a=!0},p(g,d){let b=t;t=_(g),t===b?r[t].p(g,d):(Kl(),Be(r[b],1,1,()=>{r[b]=null}),Yl(),n=r[t],n?n.p(g,d):(n=r[t]=c[t](g),n.c()),Re(n,1),n.m(e,i));let p=s;s=m(g),s===p?~s&&f[s].p(g,d):(o&&(Kl(),Be(f[p],1,1,()=>{f[p]=null}),Yl()),~s?(o=f[s],o?o.p(g,d):(o=f[s]=u[s](g),o.c()),Re(o,1),o.m(e,null)):o=null)},i(g){a||(Re(n),Re(o),a=!0)},o(g){Be(n),Be(o),a=!1},d(g){g&&B(e),r[t].d(),~s&&f[s].d()}}}function ia(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:f}=e,{current_language:m}=e,g,d,b,p=_.some(k=>ms(k.example_input)),w=["Audio","File","Image","Video"],$=_.filter(k=>w.includes(k.component));function v(k){xn[k?"unshift":"push"](()=>{g=k,t(8,g)})}function j(k){xn[k?"unshift":"push"](()=>{d=k,t(9,d)})}function h(k){xn[k?"unshift":"push"](()=>{b=k,t(10,b)})}return l.$$set=k=>{"dependency"in k&&t(0,s=k.dependency),"dependency_index"in k&&t(1,o=k.dependency_index),"root"in k&&t(2,a=k.root),"api_prefix"in k&&t(16,c=k.api_prefix),"space_id"in k&&t(3,r=k.space_id),"endpoint_parameters"in k&&t(4,_=k.endpoint_parameters),"named"in k&&t(5,u=k.named),"username"in k&&t(6,f=k.username),"current_language"in k&&t(7,m=k.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,f,m,g,d,b,i,n,p,w,$,c,v,j,h]}class sa extends Ur{constructor(e){super(),Rr(this,e,ia,la,Gr,{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}),nt()}get dependency_index(){return this.$$.ctx[1]}set dependency_index(e){this.$$set({dependency_index:e}),nt()}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),nt()}get api_prefix(){return this.$$.ctx[16]}set api_prefix(e){this.$$set({api_prefix:e}),nt()}get space_id(){return this.$$.ctx[3]}set space_id(e){this.$$set({space_id:e}),nt()}get endpoint_parameters(){return this.$$.ctx[4]}set endpoint_parameters(e){this.$$set({endpoint_parameters:e}),nt()}get named(){return this.$$.ctx[5]}set named(e){this.$$set({named:e}),nt()}get username(){return this.$$.ctx[6]}set username(e){this.$$set({username:e}),nt()}get current_language(){return this.$$.ctx[7]}set current_language(e){this.$$set({current_language:e}),nt()}}const{SvelteComponent:oa,append:z,attr:ve,binding_callbacks:el,check_outros:ra,create_component:Pn,destroy_component:On,destroy_each:bl,detach:ue,element:_e,empty:aa,ensure_array_like:Ut,flush:vt,group_outros:ca,init:_a,insert:fe,mount_component:Dn,safe_not_equal:ua,set_data:Oe,space:Fn,text:O,transition_in:Rt,transition_out:Bt}=window.__gradio__svelte__internal,{onMount:fa,tick:pa}=window.__gradio__svelte__internal;function ci(l,e,t){const n=l.slice();return n[20]=e[t].call,n[21]=e[t].api_name,n}function _i(l,e,t){const n=l.slice();return n[20]=e[t].call,n[21]=e[t].api_name,n}function ui(l,e,t){const n=l.slice();return n[20]=e[t].call,n[21]=e[t].api_name,n}function ma(l){let e,t,n,i,s,o;n=new st({props:{code:l[6]?.innerText}});let a=Ut(l[9]),c=[];for(let r=0;r<a.length;r+=1)c[r]=fi(ci(l,a,r));return{c(){e=_e("code"),t=_e("div"),Pn(n.$$.fragment),i=Fn(),s=_e("div");for(let r=0;r<c.length;r+=1)c[r].c();ve(t,"class","copy svelte-j71ub0"),ve(e,"class","svelte-j71ub0")},m(r,_){fe(r,e,_),z(e,t),Dn(n,t,null),z(e,i),z(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=Ut(r[9]);let f;for(f=0;f<a.length;f+=1){const m=ci(r,a,f);c[f]?c[f].p(m,_):(c[f]=fi(m),c[f].c(),c[f].m(s,null))}for(;f<c.length;f+=1)c[f].d(1);c.length=a.length}},i(r){o||(Rt(n.$$.fragment,r),o=!0)},o(r){Bt(n.$$.fragment,r),o=!1},d(r){r&&ue(e),On(n),bl(c,r),l[16](null)}}}function da(l){let e,t,n,i,s,o,a,c,r,_,u,f,m;n=new st({props:{code:l[5]?.innerText}});let g=l[2]!==null&&pi(l),d=Ut(l[8]),b=[];for(let p=0;p<d.length;p+=1)b[p]=di(_i(l,d,p));return{c(){e=_e("code"),t=_e("div"),Pn(n.$$.fragment),i=Fn(),s=_e("div"),o=_e("pre"),a=O(`import { Client } from "@gradio/client"; | |
const app = await Client.connect(`),c=_e("span"),r=O('"'),_=O(l[0]),u=O('"'),g&&g.c(),f=O(`); | |
`);for(let p=0;p<b.length;p+=1)b[p].c();ve(t,"class","copy svelte-j71ub0"),ve(c,"class","token string svelte-j71ub0"),ve(o,"class","svelte-j71ub0"),ve(e,"class","svelte-j71ub0")},m(p,w){fe(p,e,w),z(e,t),Dn(n,t,null),z(e,i),z(e,s),z(s,o),z(o,a),z(o,c),z(c,r),z(c,_),z(c,u),g&&g.m(o,null),z(o,f);for(let $=0;$<b.length;$+=1)b[$]&&b[$].m(o,null);l[15](s),m=!0},p(p,w){const $={};if(w&32&&($.code=p[5]?.innerText),n.$set($),(!m||w&1)&&Oe(_,p[0]),p[2]!==null?g?g.p(p,w):(g=pi(p),g.c(),g.m(o,f)):g&&(g.d(1),g=null),w&256){d=Ut(p[8]);let v;for(v=0;v<d.length;v+=1){const j=_i(p,d,v);b[v]?b[v].p(j,w):(b[v]=di(j),b[v].c(),b[v].m(o,null))}for(;v<b.length;v+=1)b[v].d(1);b.length=d.length}},i(p){m||(Rt(n.$$.fragment,p),m=!0)},o(p){Bt(n.$$.fragment,p),m=!1},d(p){p&&ue(e),On(n),g&&g.d(),bl(b,p),l[15](null)}}}function ha(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,d,b;n=new st({props:{code:l[4]}});let p=l[2]!==null&&hi(l),w=Ut(l[7]),$=[];for(let v=0;v<w.length;v+=1)$[v]=gi(ui(l,w,v));return{c(){e=_e("code"),t=_e("div"),Pn(n.$$.fragment),i=Fn(),s=_e("div"),o=_e("pre"),a=_e("span"),a.textContent="from",c=O(" gradio_client "),r=_e("span"),r.textContent="import",_=O(` Client, file | |
client = Client(`),u=_e("span"),f=O('"'),m=O(l[0]),g=O('"'),p&&p.c(),d=O(`) | |
`);for(let v=0;v<$.length;v+=1)$[v].c();ve(t,"class","copy svelte-j71ub0"),ve(a,"class","highlight"),ve(r,"class","highlight"),ve(u,"class","token string svelte-j71ub0"),ve(o,"class","svelte-j71ub0"),ve(e,"class","svelte-j71ub0")},m(v,j){fe(v,e,j),z(e,t),Dn(n,t,null),z(e,i),z(e,s),z(s,o),z(o,a),z(o,c),z(o,r),z(o,_),z(o,u),z(u,f),z(u,m),z(u,g),p&&p.m(o,null),z(o,d);for(let h=0;h<$.length;h+=1)$[h]&&$[h].m(o,null);l[14](s),b=!0},p(v,j){const h={};if(j&16&&(h.code=v[4]),n.$set(h),(!b||j&1)&&Oe(m,v[0]),v[2]!==null?p?p.p(v,j):(p=hi(v),p.c(),p.m(o,d)):p&&(p.d(1),p=null),j&128){w=Ut(v[7]);let k;for(k=0;k<w.length;k+=1){const A=ui(v,w,k);$[k]?$[k].p(A,j):($[k]=gi(A),$[k].c(),$[k].m(o,null))}for(;k<$.length;k+=1)$[k].d(1);$.length=w.length}},i(v){b||(Rt(n.$$.fragment,v),b=!0)},o(v){Bt(n.$$.fragment,v),b=!1},d(v){v&&ue(e),On(n),p&&p.d(),bl($,v),l[14](null)}}}function fi(l){let e,t,n,i,s=l[21]+"",o,a,c="{",r,_,u=l[20]+"",f,m,g="}",d,b,p="{",w,$,v="}",j,h,k,A,q=l[21]+"",y,S,T,E;return{c(){e=_e("pre"),t=O("curl -X POST "),n=O(l[0]),i=O("call/"),o=O(s),a=O(` -s -H "Content-Type: application/json" -d '`),r=O(c),_=O(` | |
"data": [`),f=O(u),m=O("]"),d=O(g),b=O(`' \\ | |
| awk -F'"' '`),w=O(p),$=O(" print $4"),j=O(v),h=O(`' \\ | |
| read EVENT_ID; curl -N `),k=O(l[0]),A=O("call/"),y=O(q),S=O("/$EVENT_ID"),T=Fn(),E=_e("br"),ve(e,"class","svelte-j71ub0")},m(M,V){fe(M,e,V),z(e,t),z(e,n),z(e,i),z(e,o),z(e,a),z(e,r),z(e,_),z(e,f),z(e,m),z(e,d),z(e,b),z(e,w),z(e,$),z(e,j),z(e,h),z(e,k),z(e,A),z(e,y),z(e,S),fe(M,T,V),fe(M,E,V)},p(M,V){V&1&&Oe(n,M[0]),V&512&&s!==(s=M[21]+"")&&Oe(o,s),V&512&&u!==(u=M[20]+"")&&Oe(f,u),V&1&&Oe(k,M[0]),V&512&&q!==(q=M[21]+"")&&Oe(y,q)},d(M){M&&(ue(e),ue(T),ue(E))}}}function pi(l){let e,t,n;return{c(){e=O(', {auth: ["'),t=O(l[2]),n=O('", **password**]}')},m(i,s){fe(i,e,s),fe(i,t,s),fe(i,n,s)},p(i,s){s&4&&Oe(t,i[2])},d(i){i&&(ue(e),ue(t),ue(n))}}}function mi(l){let e,t=l[20]+"",n;return{c(){e=O(", "),n=O(t)},m(i,s){fe(i,e,s),fe(i,n,s)},p(i,s){s&256&&t!==(t=i[20]+"")&&Oe(n,t)},d(i){i&&(ue(e),ue(n))}}}function di(l){let e,t,n,i=l[21]+"",s,o,a,c=l[20]&&mi(l);return{c(){e=O(` | |
await client.predict(`),t=_e("span"),n=O(` | |
"/`),s=O(i),o=O('"'),c&&c.c(),a=O(`); | |
`),ve(t,"class","api-name svelte-j71ub0")},m(r,_){fe(r,e,_),fe(r,t,_),z(t,n),z(t,s),z(t,o),c&&c.m(r,_),fe(r,a,_)},p(r,_){_&256&&i!==(i=r[21]+"")&&Oe(s,i),r[20]?c?c.p(r,_):(c=mi(r),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(r){r&&(ue(e),ue(t),ue(a)),c&&c.d(r)}}}function hi(l){let e,t,n;return{c(){e=O(', auth=("'),t=O(l[2]),n=O('", **password**)')},m(i,s){fe(i,e,s),fe(i,t,s),fe(i,n,s)},p(i,s){s&4&&Oe(t,i[2])},d(i){i&&(ue(e),ue(t),ue(n))}}}function gi(l){let e,t,n,i=l[20]+"",s,o,a,c,r=l[21]+"",_,u,f;return{c(){e=O(` | |
client.`),t=_e("span"),n=O(`predict( | |
`),s=O(i),o=O(" api_name="),a=_e("span"),c=O('"/'),_=O(r),u=O('"'),f=O(` | |
) | |
`),ve(a,"class","api-name svelte-j71ub0"),ve(t,"class","highlight")},m(m,g){fe(m,e,g),fe(m,t,g),z(t,n),z(t,s),z(t,o),z(t,a),z(a,c),z(a,_),z(a,u),z(t,f)},p(m,g){g&128&&i!==(i=m[20]+"")&&Oe(s,i),g&128&&r!==(r=m[21]+"")&&Oe(_,r)},d(m){m&&(ue(e),ue(t))}}}function ga(l){let e,t,n,i;const s=[ha,da,ma],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=aa()},m(c,r){~e&&o[e].m(c,r),fe(c,n,r),i=!0},p(c,r){let _=e;e=a(c),e===_?~e&&o[e].p(c,r):(t&&(ca(),Bt(o[_],1,1,()=>{o[_]=null}),ra()),~e?(t=o[e],t?t.p(c,r):(t=o[e]=s[e](c),t.c()),Rt(t,1),t.m(n.parentNode,n)):t=null)},i(c){i||(Rt(t),i=!0)},o(c){Bt(t),i=!1},d(c){c&&ue(n),~e&&o[e].d(c)}}}function ba(l){let e,t,n;return t=new tn({props:{border_mode:"focus",$$slots:{default:[ga]},$$scope:{ctx:l}}}),{c(){e=_e("div"),Pn(t.$$.fragment),ve(e,"class","container svelte-j71ub0")},m(i,s){fe(i,e,s),Dn(t,e,null),n=!0},p(i,[s]){const o={};s&268436479&&(o.$$scope={dirty:s,ctx:i}),t.$set(o)},i(i){n||(Rt(t.$$.fragment,i),n=!0)},o(i){Bt(t.$$.fragment,i),n=!1},d(i){i&&ue(e),On(t)}}}function va(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,f,{api_calls:m=[]}=e;async function g(){return await(await fetch(s.replace(/\/$/,"")+o+"/info/?all_endpoints=true")).json()}let d,b=[],p=[],w=[];function $(k,A){const q=`/${n[k.fn_index].api_name}`,S=k.data.filter(T=>typeof T<"u").map((T,E)=>{if(d[q]){const M=d[q].parameters[E];if(!M)return;const V=M.parameter_name,je=M.python_type.type;if(A==="py")return` ${V}=${Ue(T,je,"py")}`;if(A==="js")return` ${V}: ${Ue(T,je,"js")}`;if(A==="bash")return` ${Ue(T,je,"bash")}`}return` ${Ue(T,void 0,A)}`}).filter(T=>typeof T<"u").join(`, | |
`);if(S){if(A==="py")return`${S}, | |
`;if(A==="js")return`{ | |
${S}, | |
}`;if(A==="bash")return` | |
${S} | |
`}return A==="py"?"":` | |
`}fa(async()=>{d=(await g()).named_endpoints;let A=m.map(T=>$(T,"py")),q=m.map(T=>$(T,"js")),y=m.map(T=>$(T,"bash")),S=m.map(T=>n[T.fn_index].api_name||"");t(7,b=A.map((T,E)=>({call:T,api_name:S[E]}))),t(8,p=q.map((T,E)=>({call:T,api_name:S[E]}))),t(9,w=y.map((T,E)=>({call:T,api_name:S[E]}))),await pa(),t(4,_=r.innerText)});function v(k){el[k?"unshift":"push"](()=>{r=k,t(3,r)})}function j(k){el[k?"unshift":"push"](()=>{u=k,t(5,u)})}function h(k){el[k?"unshift":"push"](()=>{f=k,t(6,f)})}return l.$$set=k=>{"dependencies"in k&&t(10,n=k.dependencies),"short_root"in k&&t(0,i=k.short_root),"root"in k&&t(11,s=k.root),"api_prefix"in k&&t(12,o=k.api_prefix),"current_language"in k&&t(1,a=k.current_language),"username"in k&&t(2,c=k.username),"api_calls"in k&&t(13,m=k.api_calls)},[i,a,c,r,_,u,f,b,p,w,n,s,o,m,v,j,h]}class $a extends oa{constructor(e){super(),_a(this,e,va,ba,ua,{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}),vt()}get short_root(){return this.$$.ctx[0]}set short_root(e){this.$$set({short_root:e}),vt()}get root(){return this.$$.ctx[11]}set root(e){this.$$set({root:e}),vt()}get api_prefix(){return this.$$.ctx[12]}set api_prefix(e){this.$$set({api_prefix:e}),vt()}get current_language(){return this.$$.ctx[1]}set current_language(e){this.$$set({current_language:e}),vt()}get username(){return this.$$.ctx[2]}set username(e){this.$$set({username:e}),vt()}get api_calls(){return this.$$.ctx[13]}set api_calls(e){this.$$set({api_calls:e}),vt()}}const ka="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",wa="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",ya="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.6,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:Ca,append:Me,attr:Nt,check_outros:ja,create_component:qa,destroy_component:Ea,destroy_each:Sa,detach:we,element:We,empty:Na,ensure_array_like:bi,flush:un,group_outros:Aa,init:La,insert:ye,mount_component:Ta,noop:za,safe_not_equal:Ma,set_data:Gt,set_style:Ia,space:zt,text:De,toggle_class:vi,transition_in:vn,transition_out:ol}=window.__gradio__svelte__internal;function $i(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 Pa(l){let e;return{c(){e=De("1 element")},m(t,n){ye(t,e,n)},p:za,d(t){t&&we(e)}}}function Oa(l){let e=l[3]=="python"?"tuple":"list",t,n,i=l[1].length+"",s,o;return{c(){t=De(e),n=De(" of "),s=De(i),o=De(` | |
elements`)},m(a,c){ye(a,t,c),ye(a,n,c),ye(a,s,c),ye(a,o,c)},p(a,c){c&8&&e!==(e=a[3]=="python"?"tuple":"list")&&Gt(t,e),c&2&&i!==(i=a[1].length+"")&&Gt(s,i)},d(a){a&&(we(t),we(n),we(s),we(o))}}}function ki(l){let e;return{c(){e=We("span"),e.textContent=`[${l[10]}]`,Nt(e,"class","code svelte-16h224k")},m(t,n){ye(t,e,n)},d(t){t&&we(e)}}}function Da(l){let e=l[2][l[10]].type+"",t;return{c(){t=De(e)},m(n,i){ye(n,t,i)},p(n,i){i&4&&e!==(e=n[2][n[10]].type+"")&&Gt(t,e)},d(n){n&&we(t)}}}function Fa(l){let e=l[6].type+"",t;return{c(){t=De(e)},m(n,i){ye(n,t,i)},p(n,i){i&2&&e!==(e=n[6].type+"")&&Gt(t,e)},d(n){n&&we(t)}}}function wi(l){let e,t,n,i,s,o,a,c,r,_=l[4]+"",u,f,m=l[7]+"",g,d,b,p=l[1].length>1&&ki(l);function w(j,h){return j[3]==="python"?Fa:Da}let $=w(l),v=$(l);return{c(){e=We("hr"),t=zt(),n=We("div"),i=We("p"),p&&p.c(),s=zt(),o=We("span"),v.c(),a=zt(),c=We("p"),r=De('The output value that appears in the "'),u=De(_),f=De('" '),g=De(m),d=De(` | |
component.`),b=zt(),Nt(e,"class","hr svelte-16h224k"),Nt(o,"class","code highlight svelte-16h224k"),Nt(c,"class","desc svelte-16h224k"),Ia(n,"margin","10px")},m(j,h){ye(j,e,h),ye(j,t,h),ye(j,n,h),Me(n,i),p&&p.m(i,null),Me(i,s),Me(i,o),v.m(o,null),Me(n,a),Me(n,c),Me(c,r),Me(c,u),Me(c,f),Me(c,g),Me(c,d),Me(n,b)},p(j,h){j[1].length>1?p||(p=ki(j),p.c(),p.m(i,s)):p&&(p.d(1),p=null),$===($=w(j))&&v?v.p(j,h):(v.d(1),v=$(j),v&&(v.c(),v.m(o,null))),h&2&&_!==(_=j[4]+"")&&Gt(u,_),h&2&&m!==(m=j[7]+"")&&Gt(g,m)},d(j){j&&(we(e),we(t),we(n)),p&&p.d(),v.d()}}}function yi(l){let e,t,n;return t=new us({props:{margin:!1}}),{c(){e=We("div"),qa(t.$$.fragment),Nt(e,"class","load-wrap")},m(i,s){ye(i,e,s),Ta(t,e,null),n=!0},i(i){n||(vn(t.$$.fragment,i),n=!0)},o(i){ol(t.$$.fragment,i),n=!1},d(i){i&&we(e),Ea(t)}}}function Ua(l){let e,t,n,i,s,o,a,c;function r(d,b){return d[1].length>1?Oa:Pa}let _=r(l),u=_(l),f=bi(l[1]),m=[];for(let d=0;d<f.length;d+=1)m[d]=wi($i(l,f,d));let g=l[0]&&yi();return{c(){e=We("h4"),t=We("div"),t.innerHTML='<div class="toggle-dot toggle-right svelte-16h224k"></div>',n=De(` | |
Returns `),u.c(),i=zt(),s=We("div");for(let d=0;d<m.length;d+=1)m[d].c();o=zt(),g&&g.c(),a=Na(),Nt(t,"class","toggle-icon svelte-16h224k"),Nt(e,"class","svelte-16h224k"),vi(s,"hide",l[0])},m(d,b){ye(d,e,b),Me(e,t),Me(e,n),u.m(e,null),ye(d,i,b),ye(d,s,b);for(let p=0;p<m.length;p+=1)m[p]&&m[p].m(s,null);ye(d,o,b),g&&g.m(d,b),ye(d,a,b),c=!0},p(d,[b]){if(_===(_=r(d))&&u?u.p(d,b):(u.d(1),u=_(d),u&&(u.c(),u.m(e,null))),b&14){f=bi(d[1]);let p;for(p=0;p<f.length;p+=1){const w=$i(d,f,p);m[p]?m[p].p(w,b):(m[p]=wi(w),m[p].c(),m[p].m(s,null))}for(;p<m.length;p+=1)m[p].d(1);m.length=f.length}(!c||b&1)&&vi(s,"hide",d[0]),d[0]?g?b&1&&vn(g,1):(g=yi(),g.c(),vn(g,1),g.m(a.parentNode,a)):g&&(Aa(),ol(g,1,1,()=>{g=null}),ja())},i(d){c||(vn(g),c=!0)},o(d){ol(g),c=!1},d(d){d&&(we(e),we(i),we(s),we(o),we(a)),u.d(),Sa(m,d),g&&g.d(d)}}}function Ra(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 Ba extends Ca{constructor(e){super(),La(this,e,Ra,Ua,Ma,{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}),un()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),un()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),un()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),un()}}const{SvelteComponent:Ga,append:Q,attr:Z,bubble:Ci,check_outros:qn,create_component:ut,destroy_component:ft,destroy_each:ji,detach:I,element:x,empty:vl,ensure_array_like:fn,flush:$t,group_outros:En,init:Ha,insert:P,listen:Va,mount_component:pt,noop:vs,safe_not_equal:Wa,set_data:rl,set_style:kt,space:Ae,src_url_equal:Za,text:J,transition_in:de,transition_out:Ce}=window.__gradio__svelte__internal,{onMount:Qa,createEventDispatcher:Ja}=window.__gradio__svelte__internal;function qi(l,e,t){const n=l.slice();return n[19]=e[t],n[21]=t,n}function Ei(l,e,t){const n=l.slice();return n[22]=e[t][0],n[23]=e[t][1],n}function Si(l){let e,t,n,i;const s=[Ka,Ya],o=[];function a(c,r){return c[9]?0:1}return e=a(l),t=o[e]=s[e](l),{c(){t.c(),n=vl()},m(c,r){o[e].m(c,r),P(c,n,r),i=!0},p(c,r){t.p(c,r)},i(c){i||(de(t),i=!0)},o(c){Ce(t),i=!1},d(c){c&&I(n),o[e].d(c)}}}function Ya(l){let e,t;return e=new Eo({props:{root:l[0]}}),e.$on("close",l[16]),{c(){ut(e.$$.fragment)},m(n,i){pt(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.root=n[0]),e.$set(s)},i(n){t||(de(e.$$.fragment,n),t=!0)},o(n){Ce(e.$$.fragment,n),t=!1},d(n){ft(e,n)}}}function Ka(l){let e,t,n,i,s,o,a,c,r,_,u,f,m;t=new Do({props:{root:l[3]||l[0],api_count:l[9]}}),t.$on("close",l[13]);let g=fn(l[10]),d=[];for(let h=0;h<g.length;h+=1)d[h]=Ni(Ei(l,g,h));const b=[xa,Xa],p=[];function w(h,k){return h[5].length?0:1}_=w(l),u=p[_]=b[_](l);let $=fn(l[1]),v=[];for(let h=0;h<$.length;h+=1)v[h]=Mi(qi(l,$,h));const j=h=>Ce(v[h],1,1,()=>{v[h]=null});return{c(){e=x("div"),ut(t.$$.fragment),n=Ae(),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 | |
API.</p>`,o=Ae(),a=x("div"),c=x("div");for(let h=0;h<d.length;h+=1)d[h].c();r=Ae(),u.c(),f=Ae();for(let h=0;h<v.length;h+=1)v[h].c();Z(e,"class","banner-wrap svelte-v3jjme"),Z(s,"class","client-doc svelte-v3jjme"),Z(c,"class","snippets svelte-v3jjme"),Z(a,"class","endpoint svelte-v3jjme"),Z(i,"class","docs-wrap svelte-v3jjme")},m(h,k){P(h,e,k),pt(t,e,null),P(h,n,k),P(h,i,k),Q(i,s),Q(i,o),Q(i,a),Q(a,c);for(let A=0;A<d.length;A+=1)d[A]&&d[A].m(c,null);Q(a,r),p[_].m(a,null),Q(a,f);for(let A=0;A<v.length;A+=1)v[A]&&v[A].m(a,null);m=!0},p(h,k){const A={};if(k&9&&(A.root=h[3]||h[0]),t.$set(A),k&1088){g=fn(h[10]);let y;for(y=0;y<g.length;y+=1){const S=Ei(h,g,y);d[y]?d[y].p(S,k):(d[y]=Ni(S),d[y].c(),d[y].m(c,null))}for(;y<d.length;y+=1)d[y].d(1);d.length=g.length}let q=_;if(_=w(h),_===q?p[_].p(h,k):(En(),Ce(p[q],1,1,()=>{p[q]=null}),qn(),u=p[_],u?u.p(h,k):(u=p[_]=b[_](h),u.c()),de(u,1),u.m(a,f)),k&479){$=fn(h[1]);let y;for(y=0;y<$.length;y+=1){const S=qi(h,$,y);v[y]?(v[y].p(S,k),de(v[y],1)):(v[y]=Mi(S),v[y].c(),de(v[y],1),v[y].m(a,null))}for(En(),y=$.length;y<v.length;y+=1)j(y);qn()}},i(h){if(!m){de(t.$$.fragment,h),de(u);for(let k=0;k<$.length;k+=1)de(v[k]);m=!0}},o(h){Ce(t.$$.fragment,h),Ce(u),v=v.filter(Boolean);for(let k=0;k<v.length;k+=1)Ce(v[k]);m=!1},d(h){h&&(I(e),I(n),I(i)),ft(t),ji(d,h),p[_].d(),ji(v,h)}}}function Ni(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=Ae(),o=J(s),a=Ae(),Za(t.src,n=l[23])||Z(t,"src",n),Z(t,"alt",""),Z(t,"class","svelte-v3jjme"),Z(e,"class",c="snippet "+(l[6]===l[22]?"current-lang":"inactive-lang")+" svelte-v3jjme")},m(f,m){P(f,e,m),Q(e,t),Q(e,i),Q(e,o),Q(e,a),r||(_=Va(e,"click",u),r=!0)},p(f,m){l=f,m&64&&c!==(c="snippet "+(l[6]===l[22]?"current-lang":"inactive-lang")+" svelte-v3jjme")&&Z(e,"class",c)},d(f){f&&I(e),r=!1,_()}}}function Xa(l){let e,t,n,i,s,o,a,c,r,_;function u(b,p){return b[6]=="python"||b[6]=="javascript"?tc:ec}let f=u(l),m=f(l);n=new Lr({props:{current_language:l[6]}});let g=l[3]&&Ai(l);c=new Ln({props:{size:"sm",variant:"secondary",$$slots:{default:[nc]},$$scope:{ctx:l}}}),c.$on("click",l[15]);let d=l[6]=="bash"&&Li(l);return{c(){e=x("p"),m.c(),t=Ae(),ut(n.$$.fragment),i=Ae(),s=x("p"),o=J(`2. Find the API endpoint below corresponding to your desired | |
function in the app. Copy the code snippet, replacing the | |
placeholder values with your own input data. | |
`),g&&g.c(),a=J(` | |
Or use the | |
`),ut(c.$$.fragment),r=J(` | |
to automatically generate your API requests. | |
`),d&&d.c(),Z(e,"class","padded svelte-v3jjme"),Z(s,"class","padded svelte-v3jjme")},m(b,p){P(b,e,p),m.m(e,null),P(b,t,p),pt(n,b,p),P(b,i,p),P(b,s,p),Q(s,o),g&&g.m(s,null),Q(s,a),pt(c,s,null),Q(s,r),d&&d.m(s,null),_=!0},p(b,p){f===(f=u(b))&&m?m.p(b,p):(m.d(1),m=f(b),m&&(m.c(),m.m(e,null)));const w={};p&64&&(w.current_language=b[6]),n.$set(w),b[3]?g?g.p(b,p):(g=Ai(b),g.c(),g.m(s,a)):g&&(g.d(1),g=null);const $={};p&67108864&&($.$$scope={dirty:p,ctx:b}),c.$set($),b[6]=="bash"?d?d.p(b,p):(d=Li(b),d.c(),d.m(s,null)):d&&(d.d(1),d=null)},i(b){_||(de(n.$$.fragment,b),de(c.$$.fragment,b),_=!0)},o(b){Ce(n.$$.fragment,b),Ce(c.$$.fragment,b),_=!1},d(b){b&&(I(e),I(t),I(i),I(s)),m.d(),ft(n,b),g&&g.d(),ft(c),d&&d.d()}}}function xa(l){let e,t,n,i,s,o=l[5].length+"",a,c,r,_,u,f,m,g,d,b,p,w,$,v;return d=new $a({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=J("🪄 Recorded API Calls "),i=x("span"),s=J("["),a=J(o),c=J("]"),r=Ae(),_=x("p"),u=J(`Here is the code snippet to replay the most recently recorded API | |
calls using the `),f=J(l[6]),m=J(` | |
client.`),g=Ae(),ut(d.$$.fragment),b=Ae(),p=x("p"),p.textContent=`Note: Some API calls only affect the UI, so when using the | |
clients, the desired result may be achieved with only a subset of | |
the recorded calls.`,w=Ae(),$=x("p"),$.textContent="API Documentation",Z(i,"class","api-count svelte-v3jjme"),Z(t,"id","num-recorded-api-calls"),kt(t,"font-size","var(--text-lg)"),kt(t,"font-weight","bold"),kt(t,"margin","10px 0px"),kt($,"font-size","var(--text-lg)"),kt($,"font-weight","bold"),kt($,"margin","30px 0px 10px")},m(j,h){P(j,e,h),Q(e,t),Q(t,n),Q(t,i),Q(i,s),Q(i,a),Q(i,c),Q(e,r),Q(e,_),Q(_,u),Q(_,f),Q(_,m),Q(e,g),pt(d,e,null),Q(e,b),Q(e,p),P(j,w,h),P(j,$,h),v=!0},p(j,h){(!v||h&32)&&o!==(o=j[5].length+"")&&rl(a,o),(!v||h&64)&&rl(f,j[6]);const k={};h&64&&(k.current_language=j[6]),h&32&&(k.api_calls=j[5]),h&2&&(k.dependencies=j[1]),h&1&&(k.root=j[0]),h&4&&(k.api_prefix=j[2].api_prefix),h&9&&(k.short_root=j[3]||j[0]),h&16&&(k.username=j[4]),d.$set(k)},i(j){v||(de(d.$$.fragment,j),v=!0)},o(j){Ce(d.$$.fragment,j),v=!1},d(j){j&&(I(e),I(w),I($)),ft(d)}}}function ec(l){let e;return{c(){e=J("1. Confirm that you have cURL installed on your system.")},m(t,n){P(t,e,n)},p:vs,d(t){t&&I(e)}}}function tc(l){let e,t,n,i,s,o,a,c;return{c(){e=J(`1. Install the | |
`),t=x("span"),n=J(l[6]),i=J(` | |
client (`),s=x("a"),o=J("docs"),c=J(") if you don't already have it installed."),kt(t,"text-transform","capitalize"),Z(s,"href",a=l[6]=="python"?Nn:Sn),Z(s,"target","_blank"),Z(s,"class","svelte-v3jjme")},m(r,_){P(r,e,_),P(r,t,_),Q(t,n),P(r,i,_),P(r,s,_),Q(s,o),P(r,c,_)},p(r,_){_&64&&rl(n,r[6]),_&64&&a!==(a=r[6]=="python"?Nn:Sn)&&Z(s,"href",a)},d(r){r&&(I(e),I(t),I(i),I(s),I(c))}}}function Ai(l){let e,t,n,i,s;return{c(){e=J(`If this is a private Space, you may need to pass your | |
Hugging Face token as well (`),t=x("a"),n=J("read more"),s=J(")."),Z(t,"href",i=l[6]=="python"?Nn+pn:l[6]=="javascript"?Sn+pn:al),Z(t,"class","underline svelte-v3jjme"),Z(t,"target","_blank")},m(o,a){P(o,e,a),P(o,t,a),Q(t,n),P(o,s,a)},p(o,a){a&64&&i!==(i=o[6]=="python"?Nn+pn:o[6]=="javascript"?Sn+pn:al)&&Z(t,"href",i)},d(o){o&&(I(e),I(t),I(s))}}}function nc(l){let e,t,n;return{c(){e=x("div"),t=Ae(),n=x("p"),n.textContent="API Recorder",Z(e,"class","loading-dot svelte-v3jjme"),Z(n,"class","self-baseline svelte-v3jjme")},m(i,s){P(i,e,s),P(i,t,s),P(i,n,s)},p:vs,d(i){i&&(I(e),I(t),I(n))}}}function Li(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,d,b,p,w,$,v,j,h,k,A,q=l[4]!==null&&Ti();return{c(){e=x("br"),t=J(" "),n=x("br"),i=J(`Making a | |
prediction and getting a result requires | |
`),s=x("strong"),s.textContent="2 requests",o=J(`: a | |
`),a=x("code"),a.textContent="POST",c=J(` | |
and a `),r=x("code"),r.textContent="GET",_=J(" request. The "),u=x("code"),u.textContent="POST",f=J(` request | |
returns an `),m=x("code"),m.textContent="EVENT_ID",g=J(`, which is used in the second | |
`),d=x("code"),d.textContent="GET",b=J(` request to fetch the results. In these snippets, | |
we've used `),p=x("code"),p.textContent="awk",w=J(" and "),$=x("code"),$.textContent="read",v=J(` to parse the | |
results, combining these two requests into one command for ease of | |
use. `),q&&q.c(),j=J(` See | |
`),h=x("a"),k=J("curl docs"),A=J("."),Z(a,"class","svelte-v3jjme"),Z(r,"class","svelte-v3jjme"),Z(u,"class","svelte-v3jjme"),Z(m,"class","svelte-v3jjme"),Z(d,"class","svelte-v3jjme"),Z(p,"class","svelte-v3jjme"),Z($,"class","svelte-v3jjme"),Z(h,"href",al),Z(h,"target","_blank"),Z(h,"class","svelte-v3jjme")},m(y,S){P(y,e,S),P(y,t,S),P(y,n,S),P(y,i,S),P(y,s,S),P(y,o,S),P(y,a,S),P(y,c,S),P(y,r,S),P(y,_,S),P(y,u,S),P(y,f,S),P(y,m,S),P(y,g,S),P(y,d,S),P(y,b,S),P(y,p,S),P(y,w,S),P(y,$,S),P(y,v,S),q&&q.m(y,S),P(y,j,S),P(y,h,S),Q(h,k),P(y,A,S)},p(y,S){y[4]!==null?q||(q=Ti(),q.c(),q.m(j.parentNode,j)):q&&(q.d(1),q=null)},d(y){y&&(I(e),I(t),I(n),I(i),I(s),I(o),I(a),I(c),I(r),I(_),I(u),I(f),I(m),I(g),I(d),I(b),I(p),I(w),I($),I(v),I(j),I(h),I(A)),q&&q.d(y)}}}function Ti(l){let e;return{c(){e=J(`Note: connecting to an authenticated app requires an additional | |
request.`)},m(t,n){P(t,e,n)},d(t){t&&I(e)}}}function zi(l){let e,t,n,i,s,o,a,c;return t=new sa({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 nr({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:Ii,current_language:l[6]}}),o=new Ba({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:Ii,current_language:l[6]}}),{c(){e=x("div"),ut(t.$$.fragment),n=Ae(),ut(i.$$.fragment),s=Ae(),ut(o.$$.fragment),a=Ae(),Z(e,"class","endpoint-container svelte-v3jjme")},m(r,_){P(r,e,_),pt(t,e,null),Q(e,n),pt(i,e,null),Q(e,s),pt(o,e,null),Q(e,a),c=!0},p(r,_){const u={};_&130&&(u.endpoint_parameters=r[7].named_endpoints["/"+r[19].api_name].parameters),_&2&&(u.dependency=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 f={};_&130&&(f.endpoint_returns=r[7].named_endpoints["/"+r[19].api_name].parameters),_&258&&(f.js_returns=r[8].named_endpoints["/"+r[19].api_name].parameters),_&64&&(f.current_language=r[6]),i.$set(f);const m={};_&130&&(m.endpoint_returns=r[7].named_endpoints["/"+r[19].api_name].returns),_&258&&(m.js_returns=r[8].named_endpoints["/"+r[19].api_name].returns),_&64&&(m.current_language=r[6]),o.$set(m)},i(r){c||(de(t.$$.fragment,r),de(i.$$.fragment,r),de(o.$$.fragment,r),c=!0)},o(r){Ce(t.$$.fragment,r),Ce(i.$$.fragment,r),Ce(o.$$.fragment,r),c=!1},d(r){r&&I(e),ft(t),ft(i),ft(o)}}}function Mi(l){let e,t,n=l[19].show_api&&l[7].named_endpoints["/"+l[19].api_name]&&zi(l);return{c(){n&&n.c(),e=vl()},m(i,s){n&&n.m(i,s),P(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&&de(n,1)):(n=zi(i),n.c(),de(n,1),n.m(e.parentNode,e)):n&&(En(),Ce(n,1,1,()=>{n=null}),qn())},i(i){t||(de(n),t=!0)},o(i){Ce(n),t=!1},d(i){i&&I(e),n&&n.d(i)}}}function lc(l){let e,t,n=l[7]&&Si(l);return{c(){n&&n.c(),e=vl()},m(i,s){n&&n.m(i,s),P(i,e,s),t=!0},p(i,[s]){i[7]?n?(n.p(i,s),s&128&&de(n,1)):(n=Si(i),n.c(),de(n,1),n.m(e.parentNode,e)):n&&(En(),Ce(n,1,1,()=>{n=null}),qn())},i(i){t||(de(n),t=!0)},o(i){Ce(n),t=!1},d(i){i&&I(e),n&&n.d(i)}}}const Sn="https://www.gradio.app/guides/getting-started-with-the-js-client",Nn="https://www.gradio.app/guides/getting-started-with-the-python-client",al="https://www.gradio.app/guides/querying-gradio-apps-with-curl",pn="#connecting-to-a-hugging-face-space";let Ii=!1;function ic(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(h=>h.show_api).length;i===""&&(i=location.protocol+"//"+location.host+location.pathname),i.endsWith("/")||(i+="/");let{api_calls:_=[]}=e,u="python";const f=[["python",ka],["javascript",wa],["bash",ya]];async function m(){return await(await fetch(i.replace(/\/$/,"")+s.api_prefix+"/info")).json()}async function g(){return await s.view_api()}let d,b;m().then(h=>{t(7,d=h)}),g().then(h=>{t(8,b=h)});const p=Ja();Qa(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));function w(h){Ci.call(this,l,h)}const $=h=>t(6,u=h),v=()=>p("close",{api_recorder_visible:!0});function j(h){Ci.call(this,l,h)}return l.$$set=h=>{"dependencies"in h&&t(1,n=h.dependencies),"root"in h&&t(0,i=h.root),"app"in h&&t(2,s=h.app),"space_id"in h&&t(3,o=h.space_id),"root_node"in h&&t(12,a=h.root_node),"username"in h&&t(4,c=h.username),"api_calls"in h&&t(5,_=h.api_calls)},[i,n,s,o,c,_,u,d,b,r,f,p,a,w,$,v,j]}class sc extends Ga{constructor(e){super(),Ha(this,e,ic,lc,Wa,{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}),$t()}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),$t()}get app(){return this.$$.ctx[2]}set app(e){this.$$set({app:e}),$t()}get space_id(){return this.$$.ctx[3]}set space_id(e){this.$$set({space_id:e}),$t()}get root_node(){return this.$$.ctx[12]}set root_node(e){this.$$set({root_node:e}),$t()}get username(){return this.$$.ctx[4]}set username(e){this.$$set({username:e}),$t()}get api_calls(){return this.$$.ctx[5]}set api_calls(e){this.$$set({api_calls:e}),$t()}}const{SvelteComponent:oc,append:Ct,attr:Mt,create_component:rc,destroy_component:ac,detach:jt,element:It,flush:Pi,init:cc,insert:qt,mount_component:_c,safe_not_equal:uc,set_data:$s,space:tl,text:xt,transition_in:fc,transition_out:pc}=window.__gradio__svelte__internal;function Oi(l){let e,t,n=l[1][l[0][l[0].length-1].fn_index].api_name+"",i;return{c(){e=It("span"),t=xt("/"),i=xt(n),Mt(e,"class","api-name svelte-sy28j6")},m(s,o){qt(s,e,o),Ct(e,t),Ct(e,i)},p(s,o){o&3&&n!==(n=s[1][s[0][s[0].length-1].fn_index].api_name+"")&&$s(i,n)},d(s){s&&jt(e)}}}function mc(l){let e,t,n,i,s,o,a,c=l[0].length+"",r,_,u,f=l[0].length>0&&Oi(l);return{c(){e=It("div"),t=tl(),n=It("p"),n.textContent="Recording API Calls:",i=tl(),s=It("p"),o=It("span"),a=xt("["),r=xt(c),_=xt("]"),u=tl(),f&&f.c(),Mt(e,"class","loading-dot self-baseline svelte-sy28j6"),Mt(n,"class","self-baseline svelte-sy28j6"),Mt(o,"class","api-count svelte-sy28j6"),Mt(s,"class","self-baseline api-section svelte-sy28j6")},m(m,g){qt(m,e,g),qt(m,t,g),qt(m,n,g),qt(m,i,g),qt(m,s,g),Ct(s,o),Ct(o,a),Ct(o,r),Ct(o,_),Ct(s,u),f&&f.m(s,null)},p(m,g){g&1&&c!==(c=m[0].length+"")&&$s(r,c),m[0].length>0?f?f.p(m,g):(f=Oi(m),f.c(),f.m(s,null)):f&&(f.d(1),f=null)},d(m){m&&(jt(e),jt(t),jt(n),jt(i),jt(s)),f&&f.d()}}}function dc(l){let e,t,n;return t=new Ln({props:{size:"sm",variant:"secondary",$$slots:{default:[mc]},$$scope:{ctx:l}}}),{c(){e=It("div"),rc(t.$$.fragment),Mt(e,"id","api-recorder")},m(i,s){qt(i,e,s),_c(t,e,null),n=!0},p(i,[s]){const o={};s&7&&(o.$$scope={dirty:s,ctx:i}),t.$set(o)},i(i){n||(fc(t.$$.fragment,i),n=!0)},o(i){pc(t.$$.fragment,i),n=!1},d(i){i&&jt(e),ac(t)}}}function hc(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 gc extends oc{constructor(e){super(),cc(this,e,hc,dc,uc,{api_calls:0,dependencies:1})}get api_calls(){return this.$$.ctx[0]}set api_calls(e){this.$$set({api_calls:e}),Pi()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),Pi()}}const bc=xs(_s),{SvelteComponent:vc,add_flush_callback:$c,assign:An,bind:Di,binding_callbacks:cl,bubble:kc,check_outros:wc,compute_rest_props:Fi,construct_svelte_component:Ui,create_component:Ri,create_slot:yc,destroy_component:Bi,detach:Cc,empty:jc,exclude_internal_props:qc,flush:lt,get_all_dirty_from_scope:Ec,get_slot_changes:Sc,get_spread_object:Gi,get_spread_update:Hi,group_outros:Nc,init:Ac,insert:Lc,mount_component:Vi,not_equal:Tc,transition_in:_l,transition_out:ul,update_slot_base:zc}=window.__gradio__svelte__internal,{bind:Mc,binding_callbacks:Ic}=window.__gradio__svelte__internal;function Pc(l){let e;const t=l[11].default,n=yc(t,l,l[15],null);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&32768)&&zc(n,t,i,i[15],e?Sc(t,i[15],s,null):Ec(i[15]),null)},i(i){e||(_l(n,i),e=!0)},o(i){ul(n,i),e=!1},d(i){n&&n.d(i)}}}function Oc(l){let e,t,n,i;const s=[{elem_id:l[5]},{elem_classes:l[6]},{target:l[3]},l[8],{theme_mode:l[4]},{root:l[2]}];function o(r){l[13](r)}var a=l[7];function c(r,_){let u={$$slots:{default:[Pc]},$$scope:{ctx:r}};for(let f=0;f<s.length;f+=1)u=An(u,s[f]);return _!==void 0&&_&380&&(u=An(u,Hi(s,[_&32&&{elem_id:r[5]},_&64&&{elem_classes:r[6]},_&8&&{target:r[3]},_&256&&Gi(r[8]),_&16&&{theme_mode:r[4]},_&4&&{root:r[2]}]))),r[1]!==void 0&&(u.value=r[1]),{props:u}}return a&&(e=Ui(a,c(l)),l[12](e),cl.push(()=>Di(e,"value",o)),e.$on("prop_change",l[14])),{c(){e&&Ri(e.$$.fragment),n=jc()},m(r,_){e&&Vi(e,r,_),Lc(r,n,_),i=!0},p(r,[_]){if(a!==(a=r[7])){if(e){Nc();const u=e;ul(u.$$.fragment,1,0,()=>{Bi(u,1)}),wc()}a?(e=Ui(a,c(r,_)),r[12](e),cl.push(()=>Di(e,"value",o)),e.$on("prop_change",r[14]),Ri(e.$$.fragment),_l(e.$$.fragment,1),Vi(e,n.parentNode,n)):e=null}else if(a){const u=_&380?Hi(s,[_&32&&{elem_id:r[5]},_&64&&{elem_classes:r[6]},_&8&&{target:r[3]},_&256&&Gi(r[8]),_&16&&{theme_mode:r[4]},_&4&&{root:r[2]}]):{};_&32768&&(u.$$scope={dirty:_,ctx:r}),!t&&_&2&&(t=!0,u.value=r[1],$c(()=>t=!1)),e.$set(u)}},i(r){i||(e&&_l(e.$$.fragment,r),i=!0)},o(r){e&&ul(e.$$.fragment,r),i=!1},d(r){r&&Cc(n),l[12](null),e&&Bi(e,r)}}}function Dc(l,e,t){const n=["root","component","target","theme_mode","instance","value","elem_id","elem_classes","_id"];let i=Fi(e,n),{$$slots:s={},$$scope:o}=e,{root:a}=e,{component:c}=e,{target:r}=e,{theme_mode:_}=e,{instance:u}=e,{value:f}=e,{elem_id:m}=e,{elem_classes:g}=e,{_id:d}=e;const b=(h,k,A)=>new CustomEvent("prop_change",{detail:{id:h,prop:k,value:A}});function p(h){return new Proxy(h,{construct(A,q){const y=new A(...q),S=Object.keys(y.$$.props);function T(E){return function(M){if(!r)return;const V=b(d,E,M);r.dispatchEvent(V)}}return S.forEach(E=>{Ic.push(()=>Mc(y,E,T(E)))}),y}})}const w=p(c);function $(h){cl[h?"unshift":"push"](()=>{u=h,t(0,u)})}function v(h){f=h,t(1,f)}function j(h){kc.call(this,l,h)}return l.$$set=h=>{e=An(An({},e),qc(h)),t(8,i=Fi(e,n)),"root"in h&&t(2,a=h.root),"component"in h&&t(9,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,f=h.value),"elem_id"in h&&t(5,m=h.elem_id),"elem_classes"in h&&t(6,g=h.elem_classes),"_id"in h&&t(10,d=h._id),"$$scope"in h&&t(15,o=h.$$scope)},[u,f,a,r,_,m,g,w,i,c,d,s,$,v,j,o]}class Fc extends vc{constructor(e){super(),Ac(this,e,Dc,Oc,Tc,{root:2,component:9,target:3,theme_mode:4,instance:0,value:1,elem_id:5,elem_classes:6,_id:10})}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),lt()}get component(){return this.$$.ctx[9]}set component(e){this.$$set({component:e}),lt()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),lt()}get theme_mode(){return this.$$.ctx[4]}set theme_mode(e){this.$$set({theme_mode:e}),lt()}get instance(){return this.$$.ctx[0]}set instance(e){this.$$set({instance:e}),lt()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),lt()}get elem_id(){return this.$$.ctx[5]}set elem_id(e){this.$$set({elem_id:e}),lt()}get elem_classes(){return this.$$.ctx[6]}set elem_classes(e){this.$$set({elem_classes:e}),lt()}get _id(){return this.$$.ctx[10]}set _id(e){this.$$set({_id:e}),lt()}}const{SvelteComponent:Uc,add_flush_callback:Wi,assign:Rc,bind:Zi,binding_callbacks:Qi,bubble:Ji,check_outros:ks,create_component:ws,destroy_component:ys,detach:$l,empty:kl,ensure_array_like:Yi,flush:it,get_spread_object:Bc,get_spread_update:Gc,group_outros:Cs,init:Hc,insert:wl,mount_component:js,outro_and_destroy_block:Vc,safe_not_equal:Wc,transition_in:Ot,transition_out:en,update_keyed_each:Zc}=window.__gradio__svelte__internal,{onMount:Qc,createEventDispatcher:Jc,setContext:Yc}=window.__gradio__svelte__internal;function Ki(l,e,t){const n=l.slice();return n[15]=e[t],n}function Xi(l){let e=[],t=new Map,n,i,s=Yi(l[0].children);const o=a=>a[15].id;for(let a=0;a<s.length;a+=1){let c=Ki(l,s,a),r=o(c);t.set(r,e[a]=xi(r,c))}return{c(){for(let a=0;a<e.length;a+=1)e[a].c();n=kl()},m(a,c){for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(a,c);wl(a,n,c),i=!0},p(a,c){c&63&&(s=Yi(a[0].children),Cs(),e=Zc(e,c,o,1,a,s,t,n.parentNode,Vc,xi,n,Ki),ks())},i(a){if(!i){for(let c=0;c<s.length;c+=1)Ot(e[c]);i=!0}},o(a){for(let c=0;c<e.length;c+=1)en(e[c]);i=!1},d(a){a&&$l(n);for(let c=0;c<e.length;c+=1)e[c].d(a)}}}function xi(l,e){let t,n,i;return n=new qs({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=kl(),ws(n.$$.fragment),this.first=t},m(s,o){wl(s,t,o),js(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||(Ot(n.$$.fragment,s),i=!0)},o(s){en(n.$$.fragment,s),i=!1},d(s){s&&$l(t),ys(n,s)}}}function Kc(l){let e,t,n=l[0].children&&l[0].children.length&&Xi(l);return{c(){n&&n.c(),e=kl()},m(i,s){n&&n.m(i,s),wl(i,e,s),t=!0},p(i,s){i[0].children&&i[0].children.length?n?(n.p(i,s),s&1&&Ot(n,1)):(n=Xi(i),n.c(),Ot(n,1),n.m(e.parentNode,e)):n&&(Cs(),en(n,1,1,()=>{n=null}),ks())},i(i){t||(Ot(n),t=!0)},o(i){en(n),t=!1},d(i){i&&$l(e),n&&n.d(i)}}}function Xc(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]}];function o(r){l[11](r)}function a(r){l[12](r)}let c={$$slots:{default:[Kc]},$$scope:{ctx:l}};for(let r=0;r<s.length;r+=1)c=Rc(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 Fc({props:c}),Qi.push(()=>Zi(e,"instance",o)),Qi.push(()=>Zi(e,"value",a)),{c(){ws(e.$$.fragment)},m(r,_){js(e,r,_),i=!0},p(r,[_]){const u=_&15?Gc(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&&Bc(r[0].props),_&8&&{theme_mode:r[3]},_&2&&{root:r[1]}]):{};_&262207&&(u.$$scope={dirty:_,ctx:r}),!t&&_&1&&(t=!0,u.instance=r[0].instance,Wi(()=>t=!1)),!n&&_&1&&(n=!0,u.value=r[0].props.value,Wi(()=>n=!1)),e.$set(u)},i(r){i||(Ot(e.$$.fragment,r),i=!0)},o(r){en(e.$$.fragment,r),i=!1},d(r){ys(e,r)}}}function xc(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 f=Jc();let m=[];Qc(()=>{f("mount",i.id);for(const w of m)f("mount",w.id);return()=>{f("destroy",i.id);for(const w of m)f("mount",w.id)}}),Yc("BLOCK_KEY",s);function g(w){Ji.call(this,l,w)}function d(w){Ji.call(this,l,w)}function b(w){l.$$.not_equal(i.instance,w)&&(i.instance=w,t(0,i),t(14,m),t(2,o),t(3,a),t(7,c),t(1,n),t(8,r),t(4,_),t(5,u))}function p(w){l.$$.not_equal(i.props.value,w)&&(i.props.value=w,t(0,i),t(14,m),t(2,o),t(3,a),t(7,c),t(1,n),t(8,r),t(4,_),t(5,u))}return l.$$set=w=>{"root"in w&&t(1,n=w.root),"node"in w&&t(0,i=w.node),"parent"in w&&t(6,s=w.parent),"target"in w&&t(2,o=w.target),"theme_mode"in w&&t(3,a=w.theme_mode),"version"in w&&t(7,c=w.version),"autoscroll"in w&&t(8,r=w.autoscroll),"max_file_size"in w&&t(4,_=w.max_file_size),"client"in w&&t(5,u=w.client)},l.$$.update=()=>{l.$$.dirty&1&&i&&t(0,i.children=i.children&&i.children.filter(w=>{const $=i.type!=="statustracker";return $||m.push(w),$}),i),l.$$.dirty&1&&i&&i.type==="form"&&(i.children?.every(w=>!w.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 so(i.id,o,a,c,n,r,_,bc,u,eo),i)},[i,n,o,a,_,u,s,c,r,g,d,b,p]}class qs extends Uc{constructor(e){super(),Hc(this,e,xc,Xc,Wc,{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}),it()}get node(){return this.$$.ctx[0]}set node(e){this.$$set({node:e}),it()}get parent(){return this.$$.ctx[6]}set parent(e){this.$$set({parent:e}),it()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),it()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),it()}get version(){return this.$$.ctx[7]}set version(e){this.$$set({version:e}),it()}get autoscroll(){return this.$$.ctx[8]}set autoscroll(e){this.$$set({autoscroll:e}),it()}get max_file_size(){return this.$$.ctx[4]}set max_file_size(e){this.$$set({max_file_size:e}),it()}get client(){return this.$$.ctx[5]}set client(e){this.$$set({client:e}),it()}}const{SvelteComponent:e_,check_outros:t_,create_component:n_,destroy_component:l_,detach:i_,empty:s_,flush:rt,group_outros:o_,init:r_,insert:a_,mount_component:c_,safe_not_equal:__,transition_in:$n,transition_out:fl}=window.__gradio__svelte__internal,{onMount:u_,createEventDispatcher:f_}=window.__gradio__svelte__internal;function es(l){let e,t;return e=new qs({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(){n_(e.$$.fragment)},m(n,i){c_(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||($n(e.$$.fragment,n),t=!0)},o(n){fl(e.$$.fragment,n),t=!1},d(n){l_(e,n)}}}function p_(l){let e,t,n=l[0]&&es(l);return{c(){n&&n.c(),e=s_()},m(i,s){n&&n.m(i,s),a_(i,e,s),t=!0},p(i,[s]){i[0]?n?(n.p(i,s),s&1&&$n(n,1)):(n=es(i),n.c(),$n(n,1),n.m(e.parentNode,e)):n&&(o_(),fl(n,1,1,()=>{n=null}),t_())},i(i){t||($n(n),t=!0)},o(i){fl(n),t=!1},d(i){i&&i_(e),n&&n.d(i)}}}function m_(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=f_();return u_(()=>{u("mount")}),l.$$set=f=>{"rootNode"in f&&t(0,n=f.rootNode),"root"in f&&t(1,i=f.root),"target"in f&&t(2,s=f.target),"theme_mode"in f&&t(3,o=f.theme_mode),"version"in f&&t(4,a=f.version),"autoscroll"in f&&t(5,c=f.autoscroll),"max_file_size"in f&&t(6,r=f.max_file_size),"client"in f&&t(7,_=f.client)},[n,i,s,o,a,c,r,_]}class d_ extends e_{constructor(e){super(),r_(this,e,m_,p_,__,{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}),rt()}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),rt()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),rt()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),rt()}get version(){return this.$$.ctx[4]}set version(e){this.$$set({version:e}),rt()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),rt()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),rt()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),rt()}}const h_="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:g_,SvelteComponent:b_,append:Te,attr:re,check_outros:mn,component_subscribe:Jt,create_component:Un,destroy_component:Rn,detach:Le,element:Ge,empty:kn,flush:ie,globals:v_,group_outros:dn,init:$_,insert:Pe,listen:yl,mount_component:Bn,noop:nl,safe_not_equal:k_,set_data:Es,set_style:hn,space:Ze,src_url_equal:Ss,text:Ns,transition_in:Se,transition_out:Fe}=window.__gradio__svelte__internal,{document:Xt}=v_,{tick:gn,onMount:w_}=window.__gradio__svelte__internal;function ts(l){return Xt.title=l[2],{c:nl,m:nl,d:nl}}function ns(l){let e,t=`<style>${Nl(l[15],l[12])}</style>`,n;return{c(){e=new g_(!1),n=kn(),e.a=n},m(i,s){e.m(t,i,s),Pe(i,n,s)},p(i,s){s[0]&36864&&t!==(t=`<style>${Nl(i[15],i[12])}</style>`)&&e.p(t)},d(i){i&&(Le(n),e.d())}}}function ls(l){let e,t;return e=new d_({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[28]),{c(){Un(e.$$.fragment)},m(n,i){Bn(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||(Se(e.$$.fragment,n),t=!0)},o(n){Fe(e.$$.fragment,n),t=!1},d(n){Rn(e,n)}}}function is(l){let e,t,n,i=l[21]("common.built_with_gradio")+"",s,o,a,c,r,_=l[5]&&ss(l);return{c(){e=Ge("footer"),_&&_.c(),t=Ze(),n=Ge("a"),s=Ns(i),o=Ze(),a=Ge("img"),Ss(a.src,c=h_)||re(a,"src",c),re(a,"alt",r=l[21]("common.logo")),re(a,"class","svelte-1rjryqp"),re(n,"href","https://gradio.app"),re(n,"class","built-with svelte-1rjryqp"),re(n,"target","_blank"),re(n,"rel","noreferrer"),re(e,"class","svelte-1rjryqp")},m(u,f){Pe(u,e,f),_&&_.m(e,null),Te(e,t),Te(e,n),Te(n,s),Te(n,o),Te(n,a)},p(u,f){u[5]?_?_.p(u,f):(_=ss(u),_.c(),_.m(e,t)):_&&(_.d(1),_=null),f[0]&2097152&&i!==(i=u[21]("common.built_with_gradio")+"")&&Es(s,i),f[0]&2097152&&r!==(r=u[21]("common.logo"))&&re(a,"alt",r)},d(u){u&&Le(e),_&&_.d()}}}function ss(l){let e,t=l[21]("errors.use_via_api")+"",n,i,s,o,a,c,r,_,u;return{c(){e=Ge("button"),n=Ns(t),i=Ze(),s=Ge("img"),c=Ze(),r=Ge("div"),r.textContent="·",Ss(s.src,o=ps)||re(s,"src",o),re(s,"alt",a=l[21]("common.logo")),re(s,"class","svelte-1rjryqp"),re(e,"class","show-api svelte-1rjryqp"),re(r,"class","svelte-1rjryqp")},m(f,m){Pe(f,e,m),Te(e,n),Te(e,i),Te(e,s),Pe(f,c,m),Pe(f,r,m),_||(u=yl(e,"click",l[40]),_=!0)},p(f,m){m[0]&2097152&&t!==(t=f[21]("errors.use_via_api")+"")&&Es(n,t),m[0]&2097152&&a!==(a=f[21]("common.logo"))&&re(s,"alt",a)},d(f){f&&(Le(e),Le(c),Le(r)),_=!1,u()}}}function os(l){let e,t,n,i,s;return t=new gc({props:{api_calls:l[19],dependencies:l[1]}}),{c(){e=Ge("div"),Un(t.$$.fragment),re(e,"id","api-recorder-container"),re(e,"class","svelte-1rjryqp")},m(o,a){Pe(o,e,a),Bn(t,e,null),n=!0,i||(s=yl(e,"click",l[41]),i=!0)},p(o,a){const c={};a[0]&524288&&(c.api_calls=o[19]),a[0]&2&&(c.dependencies=o[1]),t.$set(c)},i(o){n||(Se(t.$$.fragment,o),n=!0)},o(o){Fe(t.$$.fragment,o),n=!1},d(o){o&&Le(e),Rn(t),i=!1,s()}}}function rs(l){let e,t,n,i,s,o,a,c;return s=new sc({props:{root_node:l[16],dependencies:l[1],root:l[0],app:l[10],space_id:l[11],api_calls:l[19],username:l[13]}}),s.$on("close",l[43]),{c(){e=Ge("div"),t=Ge("div"),n=Ze(),i=Ge("div"),Un(s.$$.fragment),re(t,"class","backdrop svelte-1rjryqp"),re(i,"class","api-docs-wrap svelte-1rjryqp"),re(e,"class","api-docs svelte-1rjryqp")},m(r,_){Pe(r,e,_),Te(e,t),Te(e,n),Te(e,i),Bn(s,i,null),o=!0,a||(c=yl(t,"click",l[42]),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]&524288&&(u.api_calls=r[19]),_[0]&8192&&(u.username=r[13]),s.$set(u)},i(r){o||(Se(s.$$.fragment,r),o=!0)},o(r){Fe(s.$$.fragment,r),o=!1},d(r){r&&Le(e),Rn(s),a=!1,c()}}}function as(l){let e,t;return e=new io({props:{messages:l[20]}}),e.$on("close",l[27]),{c(){Un(e.$$.fragment)},m(n,i){Bn(e,n,i),t=!0},p(n,i){const s={};i[0]&1048576&&(s.messages=n[20]),e.$set(s)},i(n){t||(Se(e.$$.fragment,n),t=!0)},o(n){Fe(e.$$.fragment,n),t=!1},d(n){Rn(e,n)}}}function y_(l){let e,t,n,i,s,o,a,c,r,_,u,f=l[7]&&ts(l),m=l[15]&&ns(l),g=l[16]&&l[10].config&&ls(l),d=l[6]&&is(l),b=l[18]&&os(l),p=l[17]&&l[16]&&rs(l),w=l[20]&&as(l);return{c(){f&&f.c(),e=kn(),m&&m.c(),t=kn(),n=Ze(),i=Ge("div"),s=Ge("div"),g&&g.c(),o=Ze(),d&&d.c(),a=Ze(),b&&b.c(),c=Ze(),p&&p.c(),r=Ze(),w&&w.c(),_=kn(),re(s,"class","contain svelte-1rjryqp"),hn(s,"flex-grow",l[8]?"1":"auto"),re(i,"class","wrap svelte-1rjryqp"),hn(i,"min-height",l[8]?"100%":"auto")},m($,v){f&&f.m(Xt.head,null),Te(Xt.head,e),m&&m.m(Xt.head,null),Te(Xt.head,t),Pe($,n,v),Pe($,i,v),Te(i,s),g&&g.m(s,null),Te(i,o),d&&d.m(i,null),Pe($,a,v),b&&b.m($,v),Pe($,c,v),p&&p.m($,v),Pe($,r,v),w&&w.m($,v),Pe($,_,v),u=!0},p($,v){$[7]?f||(f=ts($),f.c(),f.m(e.parentNode,e)):f&&(f.d(1),f=null),$[15]?m?m.p($,v):(m=ns($),m.c(),m.m(t.parentNode,t)):m&&(m.d(1),m=null),$[16]&&$[10].config?g?(g.p($,v),v[0]&66560&&Se(g,1)):(g=ls($),g.c(),Se(g,1),g.m(s,null)):g&&(dn(),Fe(g,1,1,()=>{g=null}),mn()),v[0]&256&&hn(s,"flex-grow",$[8]?"1":"auto"),$[6]?d?d.p($,v):(d=is($),d.c(),d.m(i,null)):d&&(d.d(1),d=null),v[0]&256&&hn(i,"min-height",$[8]?"100%":"auto"),$[18]?b?(b.p($,v),v[0]&262144&&Se(b,1)):(b=os($),b.c(),Se(b,1),b.m(c.parentNode,c)):b&&(dn(),Fe(b,1,1,()=>{b=null}),mn()),$[17]&&$[16]?p?(p.p($,v),v[0]&196608&&Se(p,1)):(p=rs($),p.c(),Se(p,1),p.m(r.parentNode,r)):p&&(dn(),Fe(p,1,1,()=>{p=null}),mn()),$[20]?w?(w.p($,v),v[0]&1048576&&Se(w,1)):(w=as($),w.c(),Se(w,1),w.m(_.parentNode,_)):w&&(dn(),Fe(w,1,1,()=>{w=null}),mn())},i($){u||(Se(g),Se(b),Se(p),Se(w),u=!0)},o($){Fe(g),Fe(b),Fe(p),Fe(w),u=!1},d($){$&&(Le(n),Le(i),Le(a),Le(c),Le(r),Le(_)),f&&f.d($),Le(e),m&&m.d($),Le(t),g&&g.d(),d&&d.d(),b&&b.d($),p&&p.d($),w&&w.d($)}}}const C_=/^'([^]+)'$/,j_=15,q_=10;function cs(l){return"detail"in l}function E_(l,e,t){let n,i,s,o,a;Jt(l,_s,C=>t(21,o=C)),to();let{root:c}=e,{components:r}=e,{layout:_}=e,{dependencies:u}=e,{title:f="Gradio"}=e,{target:m}=e,{autoscroll:g}=e,{show_api:d=!0}=e,{show_footer:b=!0}=e,{control_page_title:p=!1}=e,{app_mode:w}=e,{theme_mode:$}=e,{app:v}=e,{space_id:j}=e,{version:h}=e,{js:k}=e,{fill_height:A=!1}=e,{ready:q}=e,{username:y}=e,{api_prefix:S=""}=e,{max_file_size:T=void 0}=e,{initial_layout:E=void 0}=e,{css:M=null}=e,{layout:V,targets:je,update_value:Y,get_data:H,modify_stream:ee,get_stream_state:R,set_time_limit:le,loading_status:ge,scheduled_updates:qe,create_layout:nn,rerender_layout:As}=no(E);Jt(l,V,C=>t(16,a=C)),Jt(l,je,C=>t(50,i=C)),Jt(l,ge,C=>t(39,n=C)),Jt(l,qe,C=>t(51,s=C));async function Ls(){await nn({components:r,layout:_,dependencies:u,root:c+S,app:v,options:{fill_height:A}})}let{search_params:ln}=e,Gn=ln.get("view")==="api"&&d,Ht=ln.get("view")==="api-recorder"&&d;function Vt(C){t(18,Ht=!1),t(17,Gn=C);let K=new URLSearchParams(window.location.search);C?K.set("view","api"):K.delete("view"),history.replaceState(null,"","?"+K.toString())}let sn=[],{render_complete:on=!1}=e;async function Cl(C,K){const F=u.find(W=>W.id==K).outputs,D=C?.map((W,be)=>({id:F[be],prop:"value_is_output",value:!0}));Y(D),await gn();const te=[];C?.forEach((W,be)=>{if(typeof W=="object"&&W!==null&&W.__type__==="update")for(const[Ee,U]of Object.entries(W))Ee!=="__type__"&&te.push({id:F[be],prop:Ee,value:U});else te.push({id:F[be],prop:"value",value:W})}),Y(te),await gn()}let Ke=new Map,oe=[];function Xe(C,K,F,D,te=10,W=!0){return{title:C,message:K,fn_index:F,type:D,id:++Ts,duration:te,visible:W}}function jl(C,K,F){t(20,oe=[Xe(C,K,-1,F),...oe])}let Ts=-1,Hn=!1;const zs=o("blocks.long_requests_queue"),Ms=o("blocks.connection_can_break"),Is=o("blocks.lost_connection"),Ps=o("blocks.waiting_for_inputs");let Vn=!1,ql=!1,El=!1,Wt=[];function Lt(C,K=null,F=null){let D=()=>{};function te(){D()}s?D=qe.subscribe(W=>{W||gn().then(()=>{Sl(C,K,F),te()})}):Sl(C,K,F)}async function Os(C,K,F){return C===K&&F&&F.is_value_data===!0?F.value:H(C)}async function Sl(C,K=null,F=null){let D=u.find(U=>U.id===C);if(Wt.length>0){for(const U of Wt)if(D.inputs.includes(U)){jl("Warning",Ps,"warning");return}}const te=ge.get_status_for_fn(C);t(20,oe=oe.filter(({fn_index:U})=>U!==C)),(te==="pending"||te==="generating")&&(D.pending_request=!0);let W={fn_index:C,data:await Promise.all(D.inputs.map(U=>Os(U,K,F))),event_data:D.collects_event_data?F:null,trigger_id:K};D.frontend_fn?D.frontend_fn(W.data.concat(await Promise.all(D.outputs.map(U=>H(U))))).then(U=>{D.backend_fn?(W.data=U,be(D,W)):Cl(U,C)}):D.types.cancel&&D.cancels?await Promise.all(D.cancels.map(async U=>{const xe=Ke.get(U);return xe?.cancel(),xe})):D.backend_fn&&be(D,W);function be(U,xe){U.trigger_mode==="once"?U.pending_request||Ee(xe,U.connection=="stream"):U.trigger_mode==="multiple"?Ee(xe,U.connection=="stream"):U.trigger_mode==="always_last"&&(U.pending_request?U.final_event=xe:Ee(xe,U.connection=="stream"))}async function Ee(U,xe=!1){Ht&&t(19,sn=[...sn,JSON.parse(JSON.stringify(U))]);let Wn;if(v.set_current_payload(U),xe)if(!Ke.has(C))D.inputs.forEach(ne=>ee(ne,"waiting"));else{if(Ke.has(C)&&D.inputs.some(ne=>R(ne)==="waiting"))return;if(Ke.has(C)&&D.inputs.some(ne=>R(ne)==="open")){await v.send_ws_message(`${v.config.root+v.config.api_prefix}/stream/${Ke.get(C).event_id()}`,{...U,session_hash:v.session_hash});return}}try{Wn=v.submit(U.fn_index,U.data,U.event_data,U.trigger_id)}catch(ne){t(20,oe=[Xe("Error",String(ne),0,"error"),...oe]),ge.update({status:"error",fn_index:0,eta:0,queue:!1,queue_position:null}),rn(n);return}Ke.set(C,Wn);for await(const ne of Wn)ne.type==="data"?Zs(ne):ne.type==="render"?Qs(ne):ne.type==="status"?Ks(ne):ne.type==="log"&&Js(ne);function Zs(ne){const{data:he,fn_index:X}=ne;D.pending_request&&D.final_event&&(D.pending_request=!1,Ee(D.final_event,D.connection=="stream")),D.pending_request=!1,Cl(he,X),rn(n)}function Qs(ne){const{data:he}=ne;let X=he.components,pe=he.layout,et=he.dependencies,gt=he.render_id,bt=[];u.forEach((Zt,Xs)=>{Zt.rendered_in===gt&&bt.push(Xs)}),bt.reverse().forEach(Zt=>{u.splice(Zt,1)}),et.forEach(Zt=>{u.push(Zt)}),As({components:X,layout:pe,root:c+S,dependencies:u,render_id:gt})}function Js(ne){const{title:he,log:X,fn_index:pe,level:et,duration:gt,visible:bt}=ne;t(20,oe=[Xe(he,X,pe,et,gt,bt),...oe])}function Ys(ne,he,X){ne.original_msg==="process_starts"&&X.connection==="stream"&&ee(he,"open")}function Ks(ne){const{fn_index:he,...X}=ne;if(X.stage==="streaming"&&X.time_limit&&D.inputs.forEach(pe=>{le(pe,X.time_limit)}),D.inputs.forEach(pe=>{Ys(ne,pe,D)}),ge.update({...X,time_limit:X.time_limit,status:X.stage,progress:X.progress_data,fn_index:he}),rn(n),!ql&&j!==null&&X.position!==void 0&&X.position>=2&&X.eta!==void 0&&X.eta>j_&&(ql=!0,t(20,oe=[Xe("Warning",zs,he,"warning"),...oe])),!El&&Vn&&X.eta!==void 0&&X.eta>q_&&(El=!0,t(20,oe=[Xe("Warning",Ms,he,"warning"),...oe])),(X.stage==="complete"||X.stage==="generating")&&X.changed_state_ids?.forEach(pe=>{u.filter(et=>et.targets.some(([gt,bt])=>gt===pe)).forEach(et=>{Lt(et.id,U.trigger_id)})}),X.stage==="complete"&&(u.forEach(async pe=>{pe.trigger_after===he&&Lt(pe.id,U.trigger_id)}),D.inputs.forEach(pe=>{ee(pe,"closed")}),Ke.delete(C)),X.broken&&Vn&&Hn)window.setTimeout(()=>{t(20,oe=[Xe("Error",Is,he,"error"),...oe])},0),Lt(D.id,U.trigger_id,F),Hn=!1;else if(X.stage==="error"){if(X.message){const pe=X.message.replace(C_,(gt,bt)=>bt),et=X.title??"Error";t(20,oe=[Xe(et,pe,he,"error",X.duration,X.visible),...oe])}u.map(async pe=>{pe.trigger_after===he&&!pe.trigger_only_on_success&&Lt(pe.id,U.trigger_id)})}}}}function Ds(C,K){if(j===null)return;const F=new URL(`https://huggingface.co/spaces/${j}/discussions/new`);C!==void 0&&C.length>0&&F.searchParams.set("title",C),F.searchParams.set("description",K),window.open(F.toString(),"_blank")}function Fs(C){const K=C.detail;t(20,oe=oe.filter(F=>F.id!==K))}const Us=C=>!!(C&&new URL(C,location.href).origin!==location.origin);async function Rs(){k&&await new lo(`let result = await (${k})(); | |
return (!Array.isArray(result)) ? [result] : result;`)(),await gn();for(var C=m.getElementsByTagName("a"),K=0;K<C.length;K++){const F=C[K].getAttribute("target"),D=C[K].getAttribute("href");Us(D)&&F!=="_blank"&&C[K].setAttribute("target","_blank")}u.forEach(F=>{F.targets.some(D=>D[1]==="load")&&Lt(F.id)}),!(!m||on)&&(m.addEventListener("prop_change",F=>{if(!cs(F))throw new Error("not a custom event");const{id:D,prop:te,value:W}=F.detail;Y([{id:D,prop:te,value:W}]),te==="input_ready"&&W===!1&&Wt.push(D),te==="input_ready"&&W===!0&&(Wt=Wt.filter(be=>be!==D))}),m.addEventListener("gradio",F=>{if(!cs(F))throw new Error("not a custom event");const{id:D,event:te,data:W}=F.detail;if(te==="share"){const{title:be,description:Ee}=W;Ds(be,Ee)}else te==="error"?t(20,oe=[Xe("Error",W,-1,te),...oe]):te==="warning"?t(20,oe=[Xe("Warning",W,-1,te),...oe]):te=="clear_status"?Bs(D,"complete",W):te=="close_stream"?i[D]?.[W]?.forEach(Ee=>{if(Ke.has(Ee)){const U=`${v.config.root+v.config.api_prefix}/stream/${Ke.get(Ee).event_id()}`;v.post_data(`${U}/close`,{}),v.close_ws(U)}}):i[D]?.[te]?.forEach(Ee=>{requestAnimationFrame(()=>{Lt(Ee,D,W)})})}),t(30,on=!0))}function Bs(C,K,F){F.status=K,Y([{id:C,prop:"loading_status",value:F}])}function rn(C){let K=[];Object.entries(C).forEach(([te,W])=>{let be=u.find(Ee=>Ee.id==W.fn_index);be!==void 0&&(W.scroll_to_output=be.scroll_to_output,W.show_progress=be.show_progress,K.push({id:parseInt(te),prop:"loading_status",value:W}))});const F=ge.get_inputs_to_update(),D=Array.from(F).map(([te,W])=>({id:te,prop:"pending",value:W==="pending"}));Y([...K,...D])}w_(()=>{document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&(Hn=!0)}),Vn=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)});const Gs=()=>{Vt(!Gn)},Hs=()=>{Vt(!0),t(18,Ht=!1)},Vs=()=>{Vt(!1)},Ws=C=>{Vt(!1),t(19,sn=[]),t(18,Ht=C.detail?.api_recorder_visible)};return l.$$set=C=>{"root"in C&&t(0,c=C.root),"components"in C&&t(31,r=C.components),"layout"in C&&t(32,_=C.layout),"dependencies"in C&&t(1,u=C.dependencies),"title"in C&&t(2,f=C.title),"target"in C&&t(3,m=C.target),"autoscroll"in C&&t(4,g=C.autoscroll),"show_api"in C&&t(5,d=C.show_api),"show_footer"in C&&t(6,b=C.show_footer),"control_page_title"in C&&t(7,p=C.control_page_title),"app_mode"in C&&t(8,w=C.app_mode),"theme_mode"in C&&t(9,$=C.theme_mode),"app"in C&&t(10,v=C.app),"space_id"in C&&t(11,j=C.space_id),"version"in C&&t(12,h=C.version),"js"in C&&t(33,k=C.js),"fill_height"in C&&t(34,A=C.fill_height),"ready"in C&&t(29,q=C.ready),"username"in C&&t(13,y=C.username),"api_prefix"in C&&t(35,S=C.api_prefix),"max_file_size"in C&&t(14,T=C.max_file_size),"initial_layout"in C&&t(36,E=C.initial_layout),"css"in C&&t(15,M=C.css),"search_params"in C&&t(37,ln=C.search_params),"render_complete"in C&&t(30,on=C.render_complete)},l.$$.update=()=>{l.$$.dirty[0]&1035|l.$$.dirty[1]&11&&Ls(),l.$$.dirty[0]&65536&&t(29,q=!!a),l.$$.dirty[1]&256&&rn(n)},[c,u,f,m,g,d,b,p,w,$,v,j,h,y,T,M,a,Gn,Ht,sn,oe,o,V,je,ge,qe,Vt,Fs,Rs,q,on,r,_,k,A,S,E,ln,jl,n,Gs,Hs,Vs,Ws]}class B_ extends b_{constructor(e){super(),$_(this,e,E_,y_,k_,{root:0,components:31,layout:32,dependencies:1,title:2,target:3,autoscroll:4,show_api:5,show_footer:6,control_page_title:7,app_mode:8,theme_mode:9,app:10,space_id:11,version:12,js:33,fill_height:34,ready:29,username:13,api_prefix:35,max_file_size:14,initial_layout:36,css:15,search_params:37,render_complete:30,add_new_message:38},null,[-1,-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),ie()}get components(){return this.$$.ctx[31]}set components(e){this.$$set({components:e}),ie()}get layout(){return this.$$.ctx[32]}set layout(e){this.$$set({layout:e}),ie()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),ie()}get title(){return this.$$.ctx[2]}set title(e){this.$$set({title:e}),ie()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),ie()}get autoscroll(){return this.$$.ctx[4]}set autoscroll(e){this.$$set({autoscroll:e}),ie()}get show_api(){return this.$$.ctx[5]}set show_api(e){this.$$set({show_api:e}),ie()}get show_footer(){return this.$$.ctx[6]}set show_footer(e){this.$$set({show_footer:e}),ie()}get control_page_title(){return this.$$.ctx[7]}set control_page_title(e){this.$$set({control_page_title:e}),ie()}get app_mode(){return this.$$.ctx[8]}set app_mode(e){this.$$set({app_mode:e}),ie()}get theme_mode(){return this.$$.ctx[9]}set theme_mode(e){this.$$set({theme_mode:e}),ie()}get app(){return this.$$.ctx[10]}set app(e){this.$$set({app:e}),ie()}get space_id(){return this.$$.ctx[11]}set space_id(e){this.$$set({space_id:e}),ie()}get version(){return this.$$.ctx[12]}set version(e){this.$$set({version:e}),ie()}get js(){return this.$$.ctx[33]}set js(e){this.$$set({js:e}),ie()}get fill_height(){return this.$$.ctx[34]}set fill_height(e){this.$$set({fill_height:e}),ie()}get ready(){return this.$$.ctx[29]}set ready(e){this.$$set({ready:e}),ie()}get username(){return this.$$.ctx[13]}set username(e){this.$$set({username:e}),ie()}get api_prefix(){return this.$$.ctx[35]}set api_prefix(e){this.$$set({api_prefix:e}),ie()}get max_file_size(){return this.$$.ctx[14]}set max_file_size(e){this.$$set({max_file_size:e}),ie()}get initial_layout(){return this.$$.ctx[36]}set initial_layout(e){this.$$set({initial_layout:e}),ie()}get css(){return this.$$.ctx[15]}set css(e){this.$$set({css:e}),ie()}get search_params(){return this.$$.ctx[37]}set search_params(e){this.$$set({search_params:e}),ie()}get render_complete(){return this.$$.ctx[30]}set render_complete(e){this.$$set({render_complete:e}),ie()}get add_new_message(){return this.$$.ctx[38]}}export{B_ as default}; | |
//# sourceMappingURL=Blocks-eAEYTYjb.js.map | |