GraphRag
/
graphrag-ollama
/lib
/python3.12
/site-packages
/gradio
/templates
/frontend
/assets
/Blocks-De4Elmu4.js
import{h as xs,$ as _s,l as eo,s as to,c as no,p as Nl,A as lo}from"./index-D1QgYocY.js";import{B as Ln}from"./Button-BRXMFX5x.js";import{L as us}from"./index-SrVOu9jq.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-C4XokFl6.js";import"./MarkdownCode.svelte_svelte_type_style_lang-B6nUFujk.js";import"./StreamingBar.svelte_svelte_type_style_lang-CxOfZBE-.js";import{B as tn}from"./Block-D1C0o69k.js";import{T as io}from"./Toast-hJBvFIM8.js";import{G as so}from"./utils-BsGrhMNe.js";import"./svelte/svelte.js";import"./IconButton-BXOoAoAD.js";import"./Clear-By3xiIwg.js";import"./prism-python-BMY0kVse.js";import"./index-BaLWN1yV.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:Lt,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,h;return f=new fs({}),{c(){e=Lt("div"),t=Lt("h1"),t.textContent="API Docs",n=Kn(),i=Lt("p"),s=Al(`No API Routes found for | |
`),o=Lt("code"),a=Al(l[0]),c=Kn(),r=Lt("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=Lt("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||(h=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,h()}}}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:Te,attr:He,create_component:Ll,destroy_component:Tl,detach:qt,element:Ve,flush:zl,init:No,insert:Et,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){Et(i,e,s),Et(i,t,s),Et(i,n,s)},p:Lo,d(i){i&&(qt(e),qt(t),qt(n))}}}function Dl(l){let e;return{c(){e=Kt("s")},m(t,n){Et(t,e,n)},d(t){t&&qt(e)}}}function Po(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,h,b,p,k,$,v,j,d,y;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 L=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"),h=Kt(l[1]),b=Kt(" API endpoint"),L&&L.c(),p=Ve("br"),k=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(E,w){Et(E,e,w),Te(e,t),Te(e,i),Te(e,s),Te(s,o),Te(s,a),Te(a,c),Te(e,r),Te(e,_),Ml(u,_,null),Te(_,f),Te(_,m),Te(m,g),Te(g,h),Te(m,b),L&&L.m(m,null),Te(m,p),Et(E,k,w),Et(E,$,w),Ml(v,$,null),j=!0,d||(y=Ao($,"click",l[4]),d=!0)},p(E,[w]){(!j||w&1)&&Il(c,E[0]);const q={};w&32&&(q.$$scope={dirty:w,ctx:E}),u.$set(q),(!j||w&2)&&Il(h,E[1]),E[1]>1?L||(L=Dl(),L.c(),L.m(m,p)):L&&(L.d(1),L=null)},i(E){j||(Pl(u.$$.fragment,E),Pl(v.$$.fragment,E),j=!0)},o(E){Ol(u.$$.fragment,E),Ol(v.$$.fragment,E),j=!1},d(E){E&&(qt(e),qt(k),qt($)),Tl(u),L&&L.d(),Tl(v),d=!1,y()}}}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 ds(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"&&ds(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:Me,empty:ms,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:kt,space:wt,text:Se,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=Se("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=Se(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=Se(e),i&&i.c(),n=ms()},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=Se(` | | |
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=Me("span"),e.textContent="Default: ",t=Me("span"),i=Se(n),at(t,"class","code svelte-1yt946s"),kt(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=Me("span"),e.textContent="Required",kt(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]+"",h,b,p=l[6]+"",k,$,v=l[5].description+"",j,d;function y(N,P){return N[3]==="python"?Ko:Yo}let L=y(l),E=L(l);function w(N,P){return!N[8]||N[3]=="bash"?xo:Xo}let q=w(l),D=q(l);return{c(){e=Me("hr"),t=wt(),n=Me("div"),i=Me("p"),s=Me("span"),a=Se(o),c=wt(),r=Me("span"),E.c(),_=wt(),D.c(),u=wt(),f=Me("p"),m=Se('The input value that is provided in the "'),h=Se(g),b=Se('" '),k=Se(p),$=Se(` | |
component. `),j=Se(v),d=wt(),at(e,"class","hr svelte-1yt946s"),at(s,"class","code svelte-1yt946s"),kt(s,"margin-right","10px"),at(r,"class","code highlight svelte-1yt946s"),kt(r,"margin-right","10px"),kt(i,"white-space","nowrap"),kt(i,"overflow-x","auto"),at(f,"class","desc svelte-1yt946s"),kt(n,"margin","10px")},m(N,P){ke(N,e,P),ke(N,t,P),ke(N,n,P),ae(n,i),ae(i,s),ae(s,a),ae(i,c),ae(i,r),E.m(r,null),ae(i,_),D.m(i,null),ae(n,u),ae(n,f),ae(f,m),ae(f,h),ae(f,b),ae(f,k),ae(f,$),ae(f,j),ae(n,d)},p(N,P){P&10&&o!==(o=(N[3]!=="bash"&&N[7]?N[7]:"["+N[11]+"]")+"")&&ct(a,o),L===(L=y(N))&&E?E.p(N,P):(E.d(1),E=L(N),E&&(E.c(),E.m(r,null))),q===(q=w(N))&&D?D.p(N,P):(D.d(1),D=q(N),D&&(D.c(),D.m(i,null))),P&2&&g!==(g=N[4]+"")&&ct(h,g),P&2&&p!==(p=N[6]+"")&&ct(k,p),P&2&&v!==(v=N[5].description+"")&&ct(j,v)},d(N){N&&($e(e),$e(t),$e(n)),E.d(),D.d()}}}function Vl(l){let e,t,n;return t=new us({props:{margin:!1}}),{c(){e=Me("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]),h=[];for(let p=0;p<g.length;p+=1)h[p]=Hl(Rl(l,g,p));let b=l[0]&&Vl();return{c(){e=Me("h4"),t=Me("div"),t.innerHTML='<div class="toggle-dot svelte-1yt946s"></div>',n=Se(` | |
Accepts `),s=Se(i),o=Se(" parameter"),m&&m.c(),a=Se(":"),c=wt(),r=Me("div");for(let p=0;p<h.length;p+=1)h[p].c();_=wt(),b&&b.c(),u=ms(),at(t,"class","toggle-icon svelte-1yt946s"),at(e,"class","svelte-1yt946s"),Ul(r,"hide",l[0])},m(p,k){ke(p,e,k),ae(e,t),ae(e,n),ae(e,s),ae(e,o),m&&m.m(e,null),ae(e,a),ke(p,c,k),ke(p,r,k);for(let $=0;$<h.length;$+=1)h[$]&&h[$].m(r,null);ke(p,_,k),b&&b.m(p,k),ke(p,u,k),f=!0},p(p,[k]){if((!f||k&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),k&14){g=Fl(p[1]);let $;for($=0;$<g.length;$+=1){const v=Rl(p,g,$);h[$]?h[$].p(v,k):(h[$]=Hl(v),h[$].c(),h[$].m(r,null))}for(;$<h.length;$+=1)h[$].d(1);h.length=g.length}(!f||k&1)&&Ul(r,"hide",p[0]),p[0]?b?k&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(h,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:dr,transition_out:mr}=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||(dr(e.$$.fragment,n),t=!0)},o(n){mr(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:Nt,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:dl,safe_not_equal:Cr,space:ml,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=ml(),i=Je("div"),s=Je("pre"),s.textContent=`$ ${Ql}`,Nt(e,"class","copy svelte-hq8ezf"),Nt(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:dl,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=ml(),i=Je("div"),s=Je("pre"),s.textContent=`$ ${Zl}`,Nt(e,"class","copy svelte-hq8ezf"),Nt(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:dl,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=ml(),i=Je("div"),s=Je("pre"),s.textContent=`$ ${Wl}`,Nt(e,"class","copy svelte-hq8ezf"),Nt(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:dl,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(),Nt(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:A,attr:ce,binding_callbacks:xn,check_outros:Yl,create_component:dt,destroy_component:mt,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:de,space:In,text:S,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(){dt(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){mt(e,n)}}}function Vr(l){let e,t;return e=new gs({props:{named:l[5],api_name:l[0].api_name}}),{c(){dt(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){mt(e,n)}}}function Wr(l){let e,t;return e=new tn({props:{$$slots:{default:[Jr]},$$scope:{ctx:l}}}),{c(){dt(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){mt(e,n)}}}function Zr(l){let e,t;return e=new tn({props:{$$slots:{default:[ea]},$$scope:{ctx:l}}}),{c(){dt(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){mt(e,n)}}}function Qr(l){let e,t;return e=new tn({props:{$$slots:{default:[na]},$$scope:{ctx:l}}}),{c(){dt(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){mt(e,n)}}}function ni(l){let e;return{c(){e=S(",")},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=S(` | |
`),n=S(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")+"")&&de(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="{",h,b,p,k="}",$,v,j="{",d,y,L="}",E,w,q,D,N,P=l[0].api_name+"",H,De,Y;n=new st({props:{code:l[10]?.innerText}});let V=_t(l[4]),ee=[];for(let R=0;R<V.length;R+=1)ee[R]=li(Xl(l,V,R));return{c(){e=se("code"),t=se("div"),dt(n.$$.fragment),i=In(),s=se("div"),o=se("pre"),a=S("curl -X POST "),c=S(l[11]),r=S(l[12]),_=S("/call/"),f=S(u),m=S(` -s -H "Content-Type: application/json" -d '`),h=S(g),b=S(` | |
"data": [`);for(let R=0;R<ee.length;R+=1)ee[R].c();p=S(` | |
]`),$=S(k),v=S(`' \\ | |
| awk -F'"' '`),d=S(j),y=S(" print $4"),E=S(L),w=S(`' \\ | |
| read EVENT_ID; curl -N `),q=S(l[11]),D=S(l[12]),N=S("/call/"),H=S(P),De=S("/$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),A(e,t),ht(n,t,null),A(e,i),A(e,s),A(s,o),A(o,a),A(o,c),A(o,r),A(o,_),A(o,f),A(o,m),A(o,h),A(o,b);for(let ge=0;ge<ee.length;ge+=1)ee[ge]&&ee[ge].m(o,null);A(o,p),A(o,$),A(o,v),A(o,d),A(o,y),A(o,E),A(o,w),A(o,q),A(o,D),A(o,N),A(o,H),A(o,De),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)&&de(c,R[11]),(!Y||le[0]&4096)&&de(r,R[12]),(!Y||le[0]&1)&&u!==(u=R[0].api_name+"")&&de(f,u),le[0]&16){V=_t(R[4]);let je;for(je=0;je<V.length;je+=1){const nn=Xl(R,V,je);ee[je]?ee[je].p(nn,le):(ee[je]=li(nn),ee[je].c(),ee[je].m(o,p))}for(;je<ee.length;je+=1)ee[je].d(1);ee.length=V.length}(!Y||le[0]&2048)&&de(q,R[11]),(!Y||le[0]&4096)&&de(D,R[12]),(!Y||le[0]&1)&&P!==(P=R[0].api_name+"")&&de(H,P)},i(R){Y||(Re(n.$$.fragment,R),Y=!0)},o(R){Be(n.$$.fragment,R),Y=!1},d(R){R&&B(e),mt(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=S(` | |
const response_`),t=S(l[27]),n=S(' = await fetch("'),s=S(i),o=S(`"); | |
const example`),c=S(a),r=S(" = await response_"),_=S(l[27]),u=S(`.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=S(', {auth: ["'),t=S(l[6]),n=S('", **password**]}')},m(i,s){G(i,e,s),G(i,t,s),G(i,n,s)},p(i,s){s[0]&64&&de(t,i[6])},d(i){i&&(B(e),B(t),B(n))}}}function Yr(l){let e;return{c(){e=S(l[1])},m(t,n){G(t,e,n)},p(t,n){n[0]&2&&de(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=S('"/'),i=S(n),s=S('"'),ce(e,"class","api-name svelte-114qcyq")},m(o,a){G(o,e,a),A(e,t),A(e,i),A(e,s)},p(o,a){a[0]&1&&n!==(n=o[0].api_name+"")&&de(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=S(` | |
`),t=se("span"),i=S(n),s=S(": "),a=S(o),c=S(", "),ce(t,"class","example-inputs")},m(r,_){G(r,e,_),G(r,t,_),A(t,i),A(t,s),A(t,a),G(r,c,_)},p(r,_){_[0]&16&&n!==(n=r[23]+"")&&de(i,n),_[0]&16&&o!==(o=Ue(r[22],r[21].type,"js")+"")&&de(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=S(` | |
`),t=se("span"),i=S(n),s=S(": example"),a=S(o),c=S(", "),r=se("span"),r.innerHTML="",ce(t,"class","example-inputs"),ce(r,"class","desc svelte-114qcyq")},m(_,u){G(_,e,u),G(_,t,u),A(t,i),A(t,s),A(t,a),G(_,c,u),G(_,r,u)},p(_,u){u[0]&16&&n!==(n=_[23]+"")&&de(i,n),u[0]&16&&o!==(o=_[30]+"")&&de(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,h,b,p;n=new st({props:{code:l[9]?.innerText}});let k=_t(l[15]),$=[];for(let w=0;w<k.length;w+=1)$[w]=ii(ei(l,k,w));let v=l[6]!==null&&si(l);function j(w,q){return w[5]?Kr:Yr}let d=j(l),y=d(l),L=_t(l[4]),E=[];for(let w=0;w<L.length;w+=1)E[w]=oi(xl(l,L,w));return{c(){e=se("code"),t=se("div"),dt(n.$$.fragment),i=In(),s=se("div"),o=se("pre"),a=S(`import { Client } from "@gradio/client"; | |
`);for(let w=0;w<$.length;w+=1)$[w].c();c=S(` | |
const client = await Client.connect(`),r=se("span"),_=S('"'),f=S(u),m=S('"'),v&&v.c(),g=S(`); | |
const result = await client.predict(`),y.c(),h=S(", { ");for(let w=0;w<E.length;w+=1)E[w].c();b=S(` | |
}); | |
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(w,q){G(w,e,q),A(e,t),ht(n,t,null),A(e,i),A(e,s),A(s,o),A(o,a);for(let D=0;D<$.length;D+=1)$[D]&&$[D].m(o,null);A(o,c),A(o,r),A(r,_),A(r,f),A(r,m),v&&v.m(o,null),A(o,g),y.m(o,null),A(o,h);for(let D=0;D<E.length;D+=1)E[D]&&E[D].m(o,null);A(o,b),l[18](s),p=!0},p(w,q){const D={};if(q[0]&512&&(D.code=w[9]?.innerText),n.$set(D),q[0]&32768){k=_t(w[15]);let N;for(N=0;N<k.length;N+=1){const P=ei(w,k,N);$[N]?$[N].p(P,q):($[N]=ii(P),$[N].c(),$[N].m(o,c))}for(;N<$.length;N+=1)$[N].d(1);$.length=k.length}if((!p||q[0]&12)&&u!==(u=(w[3]||w[2])+"")&&de(f,u),w[6]!==null?v?v.p(w,q):(v=si(w),v.c(),v.m(o,g)):v&&(v.d(1),v=null),d===(d=j(w))&&y?y.p(w,q):(y.d(1),y=d(w),y&&(y.c(),y.m(o,h))),q[0]&16400){L=_t(w[4]);let N;for(N=0;N<L.length;N+=1){const P=xl(w,L,N);E[N]?E[N].p(P,q):(E[N]=oi(P),E[N].c(),E[N].m(o,b))}for(;N<E.length;N+=1)E[N].d(1);E.length=L.length}},i(w){p||(Re(n.$$.fragment,w),p=!0)},o(w){Be(n.$$.fragment,w),p=!1},d(w){w&&B(e),mt(n),jn($,w),v&&v.d(),y.d(),jn(E,w),l[18](null)}}}function ta(l){let e;return{c(){e=S(", handle_file")},m(t,n){G(t,e,n)},d(t){t&&B(e)}}}function ri(l){let e,t,n;return{c(){e=S(', auth=("'),t=S(l[6]),n=S('", **password**)')},m(i,s){G(i,e,s),G(i,t,s),G(i,n,s)},p(i,s){s[0]&64&&de(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=S(` | |
`),n=S(t),i=se("span"),o=S(s),a=S(",")},m(c,r){G(c,e,r),G(c,n,r),G(c,i,r),A(i,o),G(c,a,r)},p(c,r){r[0]&16&&t!==(t=c[23]?c[23]+"=":"")&&de(n,t),r[0]&16&&s!==(s=Ue(c[24]?c[25]:c[22],c[21].type,"py")+"")&&de(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])+"",h,b,p,k,$,v,j,d,y=l[0].api_name+"",L,E,w,q,D,N;n=new st({props:{code:l[8]?.innerText}});let P=l[13]&&ta(),H=l[6]!==null&&ri(l),De=_t(l[4]),Y=[];for(let V=0;V<De.length;V+=1)Y[V]=ai(ti(l,De,V));return{c(){e=se("code"),t=se("div"),dt(n.$$.fragment),i=In(),s=se("div"),o=se("pre"),a=se("span"),a.textContent="from",c=S(" gradio_client "),r=se("span"),r.textContent="import",_=S(" Client"),P&&P.c(),u=S(` | |
client = Client(`),f=se("span"),m=S('"'),h=S(g),b=S('"'),H&&H.c(),p=S(`) | |
result = client.`),k=se("span"),k.textContent="predict",$=S("(");for(let V=0;V<Y.length;V+=1)Y[V].c();v=S(` | |
api_name=`),j=se("span"),d=S('"/'),L=S(y),E=S('"'),w=S(` | |
) | |
`),q=se("span"),q.textContent="print",D=S("(result)"),ce(t,"class","copy svelte-114qcyq"),ce(a,"class","highlight"),ce(r,"class","highlight"),ce(f,"class","token string svelte-114qcyq"),ce(k,"class","highlight"),ce(j,"class","api-name svelte-114qcyq"),ce(q,"class","highlight"),ce(o,"class","svelte-114qcyq"),ce(e,"class","svelte-114qcyq")},m(V,ee){G(V,e,ee),A(e,t),ht(n,t,null),A(e,i),A(e,s),A(s,o),A(o,a),A(o,c),A(o,r),A(o,_),P&&P.m(o,null),A(o,u),A(o,f),A(f,m),A(f,h),A(f,b),H&&H.m(o,null),A(o,p),A(o,k),A(o,$);for(let R=0;R<Y.length;R+=1)Y[R]&&Y[R].m(o,null);A(o,v),A(o,j),A(j,d),A(j,L),A(j,E),A(o,w),A(o,q),A(o,D),l[17](s),N=!0},p(V,ee){const R={};if(ee[0]&256&&(R.code=V[8]?.innerText),n.$set(R),(!N||ee[0]&12)&&g!==(g=(V[3]||V[2])+"")&&de(h,g),V[6]!==null?H?H.p(V,ee):(H=ri(V),H.c(),H.m(o,p)):H&&(H.d(1),H=null),ee[0]&16){De=_t(V[4]);let le;for(le=0;le<De.length;le+=1){const ge=ti(V,De,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=De.length}(!N||ee[0]&1)&&y!==(y=V[0].api_name+"")&&de(L,y)},i(V){N||(Re(n.$$.fragment,V),N=!0)},o(V){Be(n.$$.fragment,V),N=!1},d(V){V&&B(e),mt(n),P&&P.d(),H&&H.d(),jn(Y,V),l[17](null)}}}function la(l){let e,t,n,i,s,o,a;const c=[Vr,Hr],r=[];function _(g,h){return g[5]?0:1}t=_(l),n=r[t]=c[t](l);const u=[Qr,Zr,Wr],f=[];function m(g,h){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,h){G(g,e,h),r[t].m(e,null),A(e,i),~s&&f[s].m(e,null),a=!0},p(g,h){let b=t;t=_(g),t===b?r[t].p(g,h):(Kl(),Be(r[b],1,1,()=>{r[b]=null}),Yl(),n=r[t],n?n.p(g,h):(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,h):(o&&(Kl(),Be(f[p],1,1,()=>{f[p]=null}),Yl()),~s?(o=f[s],o?o.p(g,h):(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,h,b,p=_.some(y=>ds(y.example_input)),k=["Audio","File","Image","Video"],$=_.filter(y=>k.includes(y.component));function v(y){xn[y?"unshift":"push"](()=>{g=y,t(8,g)})}function j(y){xn[y?"unshift":"push"](()=>{h=y,t(9,h)})}function d(y){xn[y?"unshift":"push"](()=>{b=y,t(10,b)})}return l.$$set=y=>{"dependency"in y&&t(0,s=y.dependency),"dependency_index"in y&&t(1,o=y.dependency_index),"root"in y&&t(2,a=y.root),"api_prefix"in y&&t(16,c=y.api_prefix),"space_id"in y&&t(3,r=y.space_id),"endpoint_parameters"in y&&t(4,_=y.endpoint_parameters),"named"in y&&t(5,u=y.named),"username"in y&&t(6,f=y.username),"current_language"in y&&t(7,m=y.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,h,b,i,n,p,k,$,c,v,j,d]}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:T,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:Tt,group_outros:ca,init:_a,insert:fe,mount_component:Dn,safe_not_equal:ua,set_data:Pe,space:Fn,text:I,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[19]=e[t].call,n[20]=e[t].api_name,n}function _i(l,e,t){const n=l.slice();return n[19]=e[t].call,n[20]=e[t].api_name,n}function ui(l,e,t){const n=l.slice();return n[19]=e[t].call,n[20]=e[t].api_name,n}function da(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,_),T(e,t),Dn(n,t,null),T(e,i),T(e,s);for(let u=0;u<c.length;u+=1)c[u]&&c[u].m(s,null);l[15](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[15](null)}}}function ma(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),h=Ut(l[8]),b=[];for(let p=0;p<h.length;p+=1)b[p]=mi(_i(l,h,p));return{c(){e=_e("code"),t=_e("div"),Pn(n.$$.fragment),i=Fn(),s=_e("div"),o=_e("pre"),a=I(`import { Client } from "@gradio/client"; | |
const app = await Client.connect(`),c=_e("span"),r=I('"'),_=I(l[0]),u=I('"'),g&&g.c(),f=I(`); | |
`);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,k){fe(p,e,k),T(e,t),Dn(n,t,null),T(e,i),T(e,s),T(s,o),T(o,a),T(o,c),T(c,r),T(c,_),T(c,u),g&&g.m(o,null),T(o,f);for(let $=0;$<b.length;$+=1)b[$]&&b[$].m(o,null);l[14](s),m=!0},p(p,k){const $={};if(k&32&&($.code=p[5]?.innerText),n.$set($),(!m||k&1)&&Pe(_,p[0]),p[2]!==null?g?g.p(p,k):(g=pi(p),g.c(),g.m(o,f)):g&&(g.d(1),g=null),k&256){h=Ut(p[8]);let v;for(v=0;v<h.length;v+=1){const j=_i(p,h,v);b[v]?b[v].p(j,k):(b[v]=mi(j),b[v].c(),b[v].m(o,null))}for(;v<b.length;v+=1)b[v].d(1);b.length=h.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[14](null)}}}function ha(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,h,b;n=new st({props:{code:l[4]}});let p=l[2]!==null&&hi(l),k=Ut(l[7]),$=[];for(let v=0;v<k.length;v+=1)$[v]=gi(ui(l,k,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=I(" gradio_client "),r=_e("span"),r.textContent="import",_=I(` Client, file | |
client = Client(`),u=_e("span"),f=I('"'),m=I(l[0]),g=I('"'),p&&p.c(),h=I(`) | |
`);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),T(e,t),Dn(n,t,null),T(e,i),T(e,s),T(s,o),T(o,a),T(o,c),T(o,r),T(o,_),T(o,u),T(u,f),T(u,m),T(u,g),p&&p.m(o,null),T(o,h);for(let d=0;d<$.length;d+=1)$[d]&&$[d].m(o,null);l[13](s),b=!0},p(v,j){const d={};if(j&16&&(d.code=v[4]),n.$set(d),(!b||j&1)&&Pe(m,v[0]),v[2]!==null?p?p.p(v,j):(p=hi(v),p.c(),p.m(o,h)):p&&(p.d(1),p=null),j&128){k=Ut(v[7]);let y;for(y=0;y<k.length;y+=1){const L=ui(v,k,y);$[y]?$[y].p(L,j):($[y]=gi(L),$[y].c(),$[y].m(o,null))}for(;y<$.length;y+=1)$[y].d(1);$.length=k.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[13](null)}}}function fi(l){let e,t,n,i,s=l[20]+"",o,a,c="{",r,_,u=l[19]+"",f,m,g="}",h,b,p="{",k,$,v="}",j,d,y,L,E=l[20]+"",w,q,D,N;return{c(){e=_e("pre"),t=I("curl -X POST "),n=I(l[0]),i=I("call/"),o=I(s),a=I(` -s -H "Content-Type: application/json" -d '`),r=I(c),_=I(` | |
"data": [`),f=I(u),m=I("]"),h=I(g),b=I(`' \\ | |
| awk -F'"' '`),k=I(p),$=I(" print $4"),j=I(v),d=I(`' \\ | |
| read EVENT_ID; curl -N `),y=I(l[0]),L=I("call/"),w=I(E),q=I("/$EVENT_ID"),D=Fn(),N=_e("br"),ve(e,"class","svelte-j71ub0")},m(P,H){fe(P,e,H),T(e,t),T(e,n),T(e,i),T(e,o),T(e,a),T(e,r),T(e,_),T(e,f),T(e,m),T(e,h),T(e,b),T(e,k),T(e,$),T(e,j),T(e,d),T(e,y),T(e,L),T(e,w),T(e,q),fe(P,D,H),fe(P,N,H)},p(P,H){H&1&&Pe(n,P[0]),H&512&&s!==(s=P[20]+"")&&Pe(o,s),H&512&&u!==(u=P[19]+"")&&Pe(f,u),H&1&&Pe(y,P[0]),H&512&&E!==(E=P[20]+"")&&Pe(w,E)},d(P){P&&(ue(e),ue(D),ue(N))}}}function pi(l){let e,t,n;return{c(){e=I(', {auth: ["'),t=I(l[2]),n=I('", **password**]}')},m(i,s){fe(i,e,s),fe(i,t,s),fe(i,n,s)},p(i,s){s&4&&Pe(t,i[2])},d(i){i&&(ue(e),ue(t),ue(n))}}}function di(l){let e;return{c(){e=I(`, | |
`)},m(t,n){fe(t,e,n)},d(t){t&&ue(e)}}}function mi(l){let e,t,n,i=l[20]+"",s,o,a=l[19]+"",c,r,_=l[19]&&di();return{c(){e=I(` | |
await client.predict(`),t=_e("span"),n=I(` | |
"/`),s=I(i),o=I('"'),_&&_.c(),c=I(a),r=I(`); | |
`),ve(t,"class","api-name svelte-j71ub0")},m(u,f){fe(u,e,f),fe(u,t,f),T(t,n),T(t,s),T(t,o),_&&_.m(u,f),fe(u,c,f),fe(u,r,f)},p(u,f){f&256&&i!==(i=u[20]+"")&&Pe(s,i),u[19]?_||(_=di(),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null),f&256&&a!==(a=u[19]+"")&&Pe(c,a)},d(u){u&&(ue(e),ue(t),ue(c),ue(r)),_&&_.d(u)}}}function hi(l){let e,t,n;return{c(){e=I(', auth=("'),t=I(l[2]),n=I('", **password**)')},m(i,s){fe(i,e,s),fe(i,t,s),fe(i,n,s)},p(i,s){s&4&&Pe(t,i[2])},d(i){i&&(ue(e),ue(t),ue(n))}}}function gi(l){let e,t,n,i=l[19]+"",s,o,a,c,r=l[20]+"",_,u,f;return{c(){e=I(` | |
client.`),t=_e("span"),n=I(`predict( | |
`),s=I(i),o=I(" api_name="),a=_e("span"),c=I('"/'),_=I(r),u=I('"'),f=I(` | |
) | |
`),ve(a,"class","api-name svelte-j71ub0"),ve(t,"class","highlight")},m(m,g){fe(m,e,g),fe(m,t,g),T(t,n),T(t,s),T(t,o),T(t,a),T(a,c),T(a,_),T(a,u),T(t,f)},p(m,g){g&128&&i!==(i=m[19]+"")&&Pe(s,i),g&128&&r!==(r=m[20]+"")&&Pe(_,r)},d(m){m&&(ue(e),ue(t))}}}function ga(l){let e,t,n,i;const s=[ha,ma,da],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&134218751&&(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,{current_language:o}=e,{username:a}=e,c,r,_,u,{api_calls:f=[]}=e;async function m(){return await(await fetch(s+"info/?all_endpoints=true")).json()}let g,h=[],b=[],p=[];function k(d,y){const L=`/${n[d.fn_index].api_name}`,w=d.data.filter(q=>typeof q<"u").map((q,D)=>{if(g[L]){const N=g[L].parameters[D];if(!N)return;const P=N.parameter_name,H=N.python_type.type;if(y==="py")return` ${P}=${Ue(q,H,"py")}`;if(y==="js")return` ${P}: ${Ue(q,H,"js")}`;if(y==="bash")return` ${Ue(q,H,"bash")}`}return` ${Ue(q,void 0,y)}`}).filter(q=>typeof q<"u").join(`, | |
`);if(w){if(y==="py")return`${w}, | |
`;if(y==="js")return`{ | |
${w}, | |
}`;if(y==="bash")return` | |
${w} | |
`}return y==="py"?"":` | |
`}fa(async()=>{g=(await m()).named_endpoints;let y=f.map(q=>k(q,"py")),L=f.map(q=>k(q,"js")),E=f.map(q=>k(q,"bash")),w=f.map(q=>n[q.fn_index].api_name||"");t(7,h=y.map((q,D)=>({call:q,api_name:w[D]}))),t(8,b=L.map((q,D)=>({call:q,api_name:w[D]}))),t(9,p=E.map((q,D)=>({call:q,api_name:w[D]}))),await pa(),t(4,r=c.innerText)});function $(d){el[d?"unshift":"push"](()=>{c=d,t(3,c)})}function v(d){el[d?"unshift":"push"](()=>{_=d,t(5,_)})}function j(d){el[d?"unshift":"push"](()=>{u=d,t(6,u)})}return l.$$set=d=>{"dependencies"in d&&t(10,n=d.dependencies),"short_root"in d&&t(0,i=d.short_root),"root"in d&&t(11,s=d.root),"current_language"in d&&t(1,o=d.current_language),"username"in d&&t(2,a=d.username),"api_calls"in d&&t(12,f=d.api_calls)},[i,o,a,c,r,_,u,h,b,p,n,s,f,$,v,j]}class $a extends oa{constructor(e){super(),_a(this,e,va,ba,ua,{dependencies:10,short_root:0,root:11,current_language:1,username:2,api_calls:12})}get dependencies(){return this.$$.ctx[10]}set dependencies(e){this.$$set({dependencies:e}),Tt()}get short_root(){return this.$$.ctx[0]}set short_root(e){this.$$set({short_root:e}),Tt()}get root(){return this.$$.ctx[11]}set root(e){this.$$set({root:e}),Tt()}get current_language(){return this.$$.ctx[1]}set current_language(e){this.$$set({current_language:e}),Tt()}get username(){return this.$$.ctx[2]}set username(e){this.$$set({username:e}),Tt()}get api_calls(){return this.$$.ctx[12]}set api_calls(e){this.$$set({api_calls:e}),Tt()}}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:ze,attr:St,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:Oe,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=Oe("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=Oe(e),n=Oe(" of "),s=Oe(i),o=Oe(` | |
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]}]`,St(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=Oe(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=Oe(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,h,b,p=l[1].length>1&&ki(l);function k(j,d){return j[3]==="python"?Fa:Da}let $=k(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=Oe('The output value that appears in the "'),u=Oe(_),f=Oe('" '),g=Oe(m),h=Oe(` | |
component.`),b=zt(),St(e,"class","hr svelte-16h224k"),St(o,"class","code highlight svelte-16h224k"),St(c,"class","desc svelte-16h224k"),Ia(n,"margin","10px")},m(j,d){ye(j,e,d),ye(j,t,d),ye(j,n,d),ze(n,i),p&&p.m(i,null),ze(i,s),ze(i,o),v.m(o,null),ze(n,a),ze(n,c),ze(c,r),ze(c,u),ze(c,f),ze(c,g),ze(c,h),ze(n,b)},p(j,d){j[1].length>1?p||(p=ki(j),p.c(),p.m(i,s)):p&&(p.d(1),p=null),$===($=k(j))&&v?v.p(j,d):(v.d(1),v=$(j),v&&(v.c(),v.m(o,null))),d&2&&_!==(_=j[4]+"")&&Gt(u,_),d&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),St(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(h,b){return h[1].length>1?Oa:Pa}let _=r(l),u=_(l),f=bi(l[1]),m=[];for(let h=0;h<f.length;h+=1)m[h]=wi($i(l,f,h));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=Oe(` | |
Returns `),u.c(),i=zt(),s=We("div");for(let h=0;h<m.length;h+=1)m[h].c();o=zt(),g&&g.c(),a=Na(),St(t,"class","toggle-icon svelte-16h224k"),St(e,"class","svelte-16h224k"),vi(s,"hide",l[0])},m(h,b){ye(h,e,b),ze(e,t),ze(e,n),u.m(e,null),ye(h,i,b),ye(h,s,b);for(let p=0;p<m.length;p+=1)m[p]&&m[p].m(s,null);ye(h,o,b),g&&g.m(h,b),ye(h,a,b),c=!0},p(h,[b]){if(_===(_=r(h))&&u?u.p(h,b):(u.d(1),u=_(h),u&&(u.c(),u.m(e,null))),b&14){f=bi(h[1]);let p;for(p=0;p<f.length;p+=1){const k=$i(h,f,p);m[p]?m[p].p(k,b):(m[p]=wi(k),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",h[0]),h[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(h){c||(vn(g),c=!0)},o(h){ol(g),c=!1},d(h){h&&(we(e),we(i),we(s),we(o),we(a)),u.d(),Sa(m,h),g&&g.d(h)}}}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:z,element:x,empty:vl,ensure_array_like:fn,flush:vt,group_outros:En,init:Ha,insert:M,listen:Va,mount_component:pt,noop:vs,safe_not_equal:Wa,set_data:rl,set_style:$t,space:Ne,src_url_equal:Za,text:J,transition_in:me,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),M(c,n,r),i=!0},p(c,r){t.p(c,r)},i(c){i||(me(t),i=!0)},o(c){Ce(t),i=!1},d(c){c&&z(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||(me(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]),h=[];for(let d=0;d<g.length;d+=1)h[d]=Ni(Ei(l,g,d));const b=[xa,Xa],p=[];function k(d,y){return d[5].length?0:1}_=k(l),u=p[_]=b[_](l);let $=fn(l[1]),v=[];for(let d=0;d<$.length;d+=1)v[d]=Mi(qi(l,$,d));const j=d=>Ce(v[d],1,1,()=>{v[d]=null});return{c(){e=x("div"),ut(t.$$.fragment),n=Ne(),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=Ne(),a=x("div"),c=x("div");for(let d=0;d<h.length;d+=1)h[d].c();r=Ne(),u.c(),f=Ne();for(let d=0;d<v.length;d+=1)v[d].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(d,y){M(d,e,y),pt(t,e,null),M(d,n,y),M(d,i,y),Q(i,s),Q(i,o),Q(i,a),Q(a,c);for(let L=0;L<h.length;L+=1)h[L]&&h[L].m(c,null);Q(a,r),p[_].m(a,null),Q(a,f);for(let L=0;L<v.length;L+=1)v[L]&&v[L].m(a,null);m=!0},p(d,y){const L={};if(y&9&&(L.root=d[3]||d[0]),t.$set(L),y&1088){g=fn(d[10]);let w;for(w=0;w<g.length;w+=1){const q=Ei(d,g,w);h[w]?h[w].p(q,y):(h[w]=Ni(q),h[w].c(),h[w].m(c,null))}for(;w<h.length;w+=1)h[w].d(1);h.length=g.length}let E=_;if(_=k(d),_===E?p[_].p(d,y):(En(),Ce(p[E],1,1,()=>{p[E]=null}),qn(),u=p[_],u?u.p(d,y):(u=p[_]=b[_](d),u.c()),me(u,1),u.m(a,f)),y&479){$=fn(d[1]);let w;for(w=0;w<$.length;w+=1){const q=qi(d,$,w);v[w]?(v[w].p(q,y),me(v[w],1)):(v[w]=Mi(q),v[w].c(),me(v[w],1),v[w].m(a,null))}for(En(),w=$.length;w<v.length;w+=1)j(w);qn()}},i(d){if(!m){me(t.$$.fragment,d),me(u);for(let y=0;y<$.length;y+=1)me(v[y]);m=!0}},o(d){Ce(t.$$.fragment,d),Ce(u),v=v.filter(Boolean);for(let y=0;y<v.length;y+=1)Ce(v[y]);m=!1},d(d){d&&(z(e),z(n),z(i)),ft(t),ji(h,d),p[_].d(),ji(v,d)}}}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=Ne(),o=J(s),a=Ne(),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){M(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&&z(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 h=l[6]=="bash"&&Li(l);return{c(){e=x("p"),m.c(),t=Ne(),ut(n.$$.fragment),i=Ne(),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. | |
`),h&&h.c(),Z(e,"class","padded svelte-v3jjme"),Z(s,"class","padded svelte-v3jjme")},m(b,p){M(b,e,p),m.m(e,null),M(b,t,p),pt(n,b,p),M(b,i,p),M(b,s,p),Q(s,o),g&&g.m(s,null),Q(s,a),pt(c,s,null),Q(s,r),h&&h.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 k={};p&64&&(k.current_language=b[6]),n.$set(k),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"?h?h.p(b,p):(h=Li(b),h.c(),h.m(s,null)):h&&(h.d(1),h=null)},i(b){_||(me(n.$$.fragment,b),me(c.$$.fragment,b),_=!0)},o(b){Ce(n.$$.fragment,b),Ce(c.$$.fragment,b),_=!1},d(b){b&&(z(e),z(t),z(i),z(s)),m.d(),ft(n,b),g&&g.d(),ft(c),h&&h.d()}}}function xa(l){let e,t,n,i,s,o=l[5].length+"",a,c,r,_,u,f,m,g,h,b,p,k,$,v;return h=new $a({props:{current_language:l[6],api_calls:l[5],dependencies:l[1],root:l[0],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=Ne(),_=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=Ne(),ut(h.$$.fragment),b=Ne(),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.`,k=Ne(),$=x("p"),$.textContent="API Documentation",Z(i,"class","api-count svelte-v3jjme"),Z(t,"id","num-recorded-api-calls"),$t(t,"font-size","var(--text-lg)"),$t(t,"font-weight","bold"),$t(t,"margin","10px 0px"),$t($,"font-size","var(--text-lg)"),$t($,"font-weight","bold"),$t($,"margin","30px 0px 10px")},m(j,d){M(j,e,d),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(h,e,null),Q(e,b),Q(e,p),M(j,k,d),M(j,$,d),v=!0},p(j,d){(!v||d&32)&&o!==(o=j[5].length+"")&&rl(a,o),(!v||d&64)&&rl(f,j[6]);const y={};d&64&&(y.current_language=j[6]),d&32&&(y.api_calls=j[5]),d&2&&(y.dependencies=j[1]),d&1&&(y.root=j[0]),d&9&&(y.short_root=j[3]||j[0]),d&16&&(y.username=j[4]),h.$set(y)},i(j){v||(me(h.$$.fragment,j),v=!0)},o(j){Ce(h.$$.fragment,j),v=!1},d(j){j&&(z(e),z(k),z($)),ft(h)}}}function ec(l){let e;return{c(){e=J("1. Confirm that you have cURL installed on your system.")},m(t,n){M(t,e,n)},p:vs,d(t){t&&z(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."),$t(t,"text-transform","capitalize"),Z(s,"href",a=l[6]=="python"?Nn:Sn),Z(s,"target","_blank"),Z(s,"class","svelte-v3jjme")},m(r,_){M(r,e,_),M(r,t,_),Q(t,n),M(r,i,_),M(r,s,_),Q(s,o),M(r,c,_)},p(r,_){_&64&&rl(n,r[6]),_&64&&a!==(a=r[6]=="python"?Nn:Sn)&&Z(s,"href",a)},d(r){r&&(z(e),z(t),z(i),z(s),z(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){M(o,e,a),M(o,t,a),Q(t,n),M(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&&(z(e),z(t),z(s))}}}function nc(l){let e,t,n;return{c(){e=x("div"),t=Ne(),n=x("p"),n.textContent="API Recorder",Z(e,"class","loading-dot svelte-v3jjme"),Z(n,"class","self-baseline svelte-v3jjme")},m(i,s){M(i,e,s),M(i,t,s),M(i,n,s)},p:vs,d(i){i&&(z(e),z(t),z(n))}}}function Li(l){let e,t,n,i,s,o,a,c,r,_,u,f,m,g,h,b,p,k,$,v,j,d,y,L,E=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 | |
`),h=x("code"),h.textContent="GET",b=J(` request to fetch the results. In these snippets, | |
we've used `),p=x("code"),p.textContent="awk",k=J(" and "),$=x("code"),$.textContent="read",v=J(` to parse the | |
results, combining these two requests into one command for ease of | |
use. `),E&&E.c(),j=J(` See | |
`),d=x("a"),y=J("curl docs"),L=J("."),Z(a,"class","svelte-v3jjme"),Z(r,"class","svelte-v3jjme"),Z(u,"class","svelte-v3jjme"),Z(m,"class","svelte-v3jjme"),Z(h,"class","svelte-v3jjme"),Z(p,"class","svelte-v3jjme"),Z($,"class","svelte-v3jjme"),Z(d,"href",al),Z(d,"target","_blank"),Z(d,"class","svelte-v3jjme")},m(w,q){M(w,e,q),M(w,t,q),M(w,n,q),M(w,i,q),M(w,s,q),M(w,o,q),M(w,a,q),M(w,c,q),M(w,r,q),M(w,_,q),M(w,u,q),M(w,f,q),M(w,m,q),M(w,g,q),M(w,h,q),M(w,b,q),M(w,p,q),M(w,k,q),M(w,$,q),M(w,v,q),E&&E.m(w,q),M(w,j,q),M(w,d,q),Q(d,y),M(w,L,q)},p(w,q){w[4]!==null?E||(E=Ti(),E.c(),E.m(j.parentNode,j)):E&&(E.d(1),E=null)},d(w){w&&(z(e),z(t),z(n),z(i),z(s),z(o),z(a),z(c),z(r),z(_),z(u),z(f),z(m),z(g),z(h),z(b),z(p),z(k),z($),z(v),z(j),z(d),z(L)),E&&E.d(w)}}}function Ti(l){let e;return{c(){e=J(`Note: connecting to an authenticated app requires an additional | |
request.`)},m(t,n){M(t,e,n)},d(t){t&&z(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=Ne(),ut(i.$$.fragment),s=Ne(),ut(o.$$.fragment),a=Ne(),Z(e,"class","endpoint-container svelte-v3jjme")},m(r,_){M(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||(me(t.$$.fragment,r),me(i.$$.fragment,r),me(o.$$.fragment,r),c=!0)},o(r){Ce(t.$$.fragment,r),Ce(i.$$.fragment,r),Ce(o.$$.fragment,r),c=!1},d(r){r&&z(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),M(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&&me(n,1)):(n=zi(i),n.c(),me(n,1),n.m(e.parentNode,e)):n&&(En(),Ce(n,1,1,()=>{n=null}),qn())},i(i){t||(me(n),t=!0)},o(i){Ce(n),t=!1},d(i){i&&z(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),M(i,e,s),t=!0},p(i,[s]){i[7]?n?(n.p(i,s),s&128&&me(n,1)):(n=Si(i),n.c(),me(n,1),n.m(e.parentNode,e)):n&&(En(),Ce(n,1,1,()=>{n=null}),qn())},i(i){t||(me(n),t=!0)},o(i){Ce(n),t=!1},d(i){i&&z(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(d=>d.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 h,b;m().then(d=>{t(7,h=d)}),g().then(d=>{t(8,b=d)});const p=Ja();Qa(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));function k(d){Ci.call(this,l,d)}const $=d=>t(6,u=d),v=()=>p("close",{api_recorder_visible:!0});function j(d){Ci.call(this,l,d)}return l.$$set=d=>{"dependencies"in d&&t(1,n=d.dependencies),"root"in d&&t(0,i=d.root),"app"in d&&t(2,s=d.app),"space_id"in d&&t(3,o=d.space_id),"root_node"in d&&t(12,a=d.root_node),"username"in d&&t(4,c=d.username),"api_calls"in d&&t(5,_=d.api_calls)},[i,n,s,o,c,_,u,h,b,r,f,p,a,k,$,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}),vt()}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),vt()}get app(){return this.$$.ctx[2]}set app(e){this.$$set({app:e}),vt()}get space_id(){return this.$$.ctx[3]}set space_id(e){this.$$set({space_id:e}),vt()}get root_node(){return this.$$.ctx[12]}set root_node(e){this.$$set({root_node:e}),vt()}get username(){return this.$$.ctx[4]}set username(e){this.$$set({username:e}),vt()}get api_calls(){return this.$$.ctx[5]}set api_calls(e){this.$$set({api_calls:e}),vt()}}const{SvelteComponent:oc,append:yt,attr:Mt,create_component:rc,destroy_component:ac,detach:Ct,element:It,flush:Pi,init:cc,insert:jt,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){jt(s,e,o),yt(e,t),yt(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&&Ct(e)}}}function dc(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){jt(m,e,g),jt(m,t,g),jt(m,n,g),jt(m,i,g),jt(m,s,g),yt(s,o),yt(o,a),yt(o,r),yt(o,_),yt(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&&(Ct(e),Ct(t),Ct(n),Ct(i),Ct(s)),f&&f.d()}}}function mc(l){let e,t,n;return t=new Ln({props:{size:"sm",variant:"secondary",$$slots:{default:[dc]},$$scope:{ctx:l}}}),{c(){e=It("div"),rc(t.$$.fragment),Mt(e,"id","api-recorder")},m(i,s){jt(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&&Ct(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,mc,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:h}=e;const b=(d,y,L)=>new CustomEvent("prop_change",{detail:{id:d,prop:y,value:L}});function p(d){return new Proxy(d,{construct(L,E){const w=new L(...E),q=Object.keys(w.$$.props);function D(N){return function(P){if(!r)return;const H=b(h,N,P);r.dispatchEvent(H)}}return q.forEach(N=>{Ic.push(()=>Mc(w,N,D(N)))}),w}})}const k=p(c);function $(d){cl[d?"unshift":"push"](()=>{u=d,t(0,u)})}function v(d){f=d,t(1,f)}function j(d){kc.call(this,l,d)}return l.$$set=d=>{e=An(An({},e),qc(d)),t(8,i=Fi(e,n)),"root"in d&&t(2,a=d.root),"component"in d&&t(9,c=d.component),"target"in d&&t(3,r=d.target),"theme_mode"in d&&t(4,_=d.theme_mode),"instance"in d&&t(0,u=d.instance),"value"in d&&t(1,f=d.value),"elem_id"in d&&t(5,m=d.elem_id),"elem_classes"in d&&t(6,g=d.elem_classes),"_id"in d&&t(10,h=d._id),"$$scope"in d&&t(15,o=d.$$scope)},[u,f,a,r,_,m,g,k,i,c,h,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 k of m)f("mount",k.id);return()=>{f("destroy",i.id);for(const k of m)f("mount",k.id)}}),Yc("BLOCK_KEY",s);function g(k){Ji.call(this,l,k)}function h(k){Ji.call(this,l,k)}function b(k){l.$$.not_equal(i.instance,k)&&(i.instance=k,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(k){l.$$.not_equal(i.props.value,k)&&(i.props.value=k,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=k=>{"root"in k&&t(1,n=k.root),"node"in k&&t(0,i=k.node),"parent"in k&&t(6,s=k.parent),"target"in k&&t(2,o=k.target),"theme_mode"in k&&t(3,a=k.theme_mode),"version"in k&&t(7,c=k.version),"autoscroll"in k&&t(8,r=k.autoscroll),"max_file_size"in k&&t(4,_=k.max_file_size),"client"in k&&t(5,u=k.client)},l.$$.update=()=>{l.$$.dirty&1&&i&&t(0,i.children=i.children&&i.children.filter(k=>{const $=i.type!=="statustracker";return $||m.push(k),$}),i),l.$$.dirty&1&&i&&i.type==="form"&&(i.children?.every(k=>!k.props.visible)?t(0,i.props.visible=!1,i):t(0,i.props.visible=!0,i)),l.$$.dirty&447&&t(0,i.props.gradio=new so(i.id,o,a,c,n,r,_,bc,u,eo),i)},[i,n,o,a,_,u,s,c,r,g,h,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 d_(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 m_ extends e_{constructor(e){super(),r_(this,e,d_,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:Le,attr:re,check_outros:dn,component_subscribe:Jt,create_component:Un,destroy_component:Rn,detach:Ae,element:Ge,empty:kn,flush:ie,globals:v_,group_outros:mn,init:$_,insert:Ie,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:Ee,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),Ie(i,n,s)},p(i,s){s[0]&36864&&t!==(t=`<style>${Nl(i[15],i[12])}</style>`)&&e.p(t)},d(i){i&&(Ae(n),e.d())}}}function ls(l){let e,t;return e=new m_({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||(Ee(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){Ie(u,e,f),_&&_.m(e,null),Le(e,t),Le(e,n),Le(n,s),Le(n,o),Le(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&&Ae(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){Ie(f,e,m),Le(e,n),Le(e,i),Le(e,s),Ie(f,c,m),Ie(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&&(Ae(e),Ae(c),Ae(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){Ie(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||(Ee(t.$$.fragment,o),n=!0)},o(o){Fe(t.$$.fragment,o),n=!1},d(o){o&&Ae(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,_){Ie(r,e,_),Le(e,t),Le(e,n),Le(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||(Ee(s.$$.fragment,r),o=!0)},o(r){Fe(s.$$.fragment,r),o=!1},d(r){r&&Ae(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||(Ee(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),h=l[6]&&is(l),b=l[18]&&os(l),p=l[17]&&l[16]&&rs(l),k=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(),h&&h.c(),a=Ze(),b&&b.c(),c=Ze(),p&&p.c(),r=Ze(),k&&k.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),Le(Xt.head,e),m&&m.m(Xt.head,null),Le(Xt.head,t),Ie($,n,v),Ie($,i,v),Le(i,s),g&&g.m(s,null),Le(i,o),h&&h.m(i,null),Ie($,a,v),b&&b.m($,v),Ie($,c,v),p&&p.m($,v),Ie($,r,v),k&&k.m($,v),Ie($,_,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&&Ee(g,1)):(g=ls($),g.c(),Ee(g,1),g.m(s,null)):g&&(mn(),Fe(g,1,1,()=>{g=null}),dn()),v[0]&256&&hn(s,"flex-grow",$[8]?"1":"auto"),$[6]?h?h.p($,v):(h=is($),h.c(),h.m(i,null)):h&&(h.d(1),h=null),v[0]&256&&hn(i,"min-height",$[8]?"100%":"auto"),$[18]?b?(b.p($,v),v[0]&262144&&Ee(b,1)):(b=os($),b.c(),Ee(b,1),b.m(c.parentNode,c)):b&&(mn(),Fe(b,1,1,()=>{b=null}),dn()),$[17]&&$[16]?p?(p.p($,v),v[0]&196608&&Ee(p,1)):(p=rs($),p.c(),Ee(p,1),p.m(r.parentNode,r)):p&&(mn(),Fe(p,1,1,()=>{p=null}),dn()),$[20]?k?(k.p($,v),v[0]&1048576&&Ee(k,1)):(k=as($),k.c(),Ee(k,1),k.m(_.parentNode,_)):k&&(mn(),Fe(k,1,1,()=>{k=null}),dn())},i($){u||(Ee(g),Ee(b),Ee(p),Ee(k),u=!0)},o($){Fe(g),Fe(b),Fe(p),Fe(k),u=!1},d($){$&&(Ae(n),Ae(i),Ae(a),Ae(c),Ae(r),Ae(_)),f&&f.d($),Ae(e),m&&m.d($),Ae(t),g&&g.d(),h&&h.d(),b&&b.d($),p&&p.d($),k&&k.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:h=!0}=e,{show_footer:b=!0}=e,{control_page_title:p=!1}=e,{app_mode:k}=e,{theme_mode:$}=e,{app:v}=e,{space_id:j}=e,{version:d}=e,{js:y}=e,{fill_height:L=!1}=e,{ready:E}=e,{username:w}=e,{api_prefix:q=""}=e,{max_file_size:D=void 0}=e,{initial_layout:N=void 0}=e,{css:P=null}=e,{layout:H,targets:De,update_value:Y,get_data:V,modify_stream:ee,get_stream_state:R,set_time_limit:le,loading_status:ge,scheduled_updates:je,create_layout:nn,rerender_layout:As}=no(N);Jt(l,H,C=>t(16,a=C)),Jt(l,De,C=>t(50,i=C)),Jt(l,ge,C=>t(39,n=C)),Jt(l,je,C=>t(51,s=C));async function Ls(){await nn({components:r,layout:_,dependencies:u,root:c+q,app:v,options:{fill_height:L}})}let{search_params:ln}=e,Gn=ln.get("view")==="api"&&h,Ht=ln.get("view")==="api-recorder"&&h;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,O=C?.map((W,be)=>({id:F[be],prop:"value_is_output",value:!0}));Y(O),await gn();const te=[];C?.forEach((W,be)=>{if(typeof W=="object"&&W!==null&&W.__type__==="update")for(const[qe,U]of Object.entries(W))qe!=="__type__"&&te.push({id:F[be],prop:qe,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,O,te=10,W=!0){return{title:C,message:K,fn_index:F,type:O,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 At(C,K=null,F=null){let O=()=>{};function te(){O()}s?O=je.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:V(C)}async function Sl(C,K=null,F=null){let O=u.find(U=>U.id===C);if(Wt.length>0){for(const U of Wt)if(O.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")&&(O.pending_request=!0);let W={fn_index:C,data:await Promise.all(O.inputs.map(U=>Os(U,K,F))),event_data:O.collects_event_data?F:null,trigger_id:K};O.frontend_fn?O.frontend_fn(W.data.concat(await Promise.all(O.outputs.map(U=>V(U))))).then(U=>{O.backend_fn?(W.data=U,be(O,W)):Cl(U,C)}):O.types.cancel&&O.cancels?await Promise.all(O.cancels.map(async U=>{const xe=Ke.get(U);return xe?.cancel(),xe})):O.backend_fn&&be(O,W);function be(U,xe){U.trigger_mode==="once"?U.pending_request||qe(xe,U.connection=="stream"):U.trigger_mode==="multiple"?qe(xe,U.connection=="stream"):U.trigger_mode==="always_last"&&(U.pending_request?U.final_event=xe:qe(xe,U.connection=="stream"))}async function qe(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))O.inputs.forEach(ne=>ee(ne,"waiting"));else{if(Ke.has(C)&&O.inputs.some(ne=>R(ne)==="waiting"))return;if(Ke.has(C)&&O.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;O.pending_request&&O.final_event&&(O.pending_request=!1,qe(O.final_event,O.connection=="stream")),O.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,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&&O.inputs.forEach(pe=>{le(pe,X.time_limit)}),O.inputs.forEach(pe=>{Ys(ne,pe,O)}),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=>{At(et.id,U.trigger_id)})}),X.stage==="complete"&&(u.forEach(async pe=>{pe.trigger_after===he&&At(pe.id,U.trigger_id)}),O.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),At(O.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&&At(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(){y&&await new lo(`let result = await (${y})(); | |
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"),O=C[K].getAttribute("href");Us(O)&&F!=="_blank"&&C[K].setAttribute("target","_blank")}u.forEach(F=>{F.targets.some(O=>O[1]==="load")&&At(F.id)}),!(!m||on)&&(m.addEventListener("prop_change",F=>{if(!cs(F))throw new Error("not a custom event");const{id:O,prop:te,value:W}=F.detail;Y([{id:O,prop:te,value:W}]),te==="input_ready"&&W===!1&&Wt.push(O),te==="input_ready"&&W===!0&&(Wt=Wt.filter(be=>be!==O))}),m.addEventListener("gradio",F=>{if(!cs(F))throw new Error("not a custom event");const{id:O,event:te,data:W}=F.detail;if(te==="share"){const{title:be,description:qe}=W;Ds(be,qe)}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(O,"complete",W):te=="close_stream"?i[O]?.[W]?.forEach(qe=>{if(Ke.has(qe)){const U=`${v.config.root+v.config.api_prefix}/stream/${Ke.get(qe).event_id()}`;v.post_data(`${U}/close`,{}),v.close_ws(U)}}):i[O]?.[te]?.forEach(qe=>{requestAnimationFrame(()=>{At(qe,O,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(qe=>qe.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(),O=Array.from(F).map(([te,W])=>({id:te,prop:"pending",value:W==="pending"}));Y([...K,...O])}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,h=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,k=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,d=C.version),"js"in C&&t(33,y=C.js),"fill_height"in C&&t(34,L=C.fill_height),"ready"in C&&t(29,E=C.ready),"username"in C&&t(13,w=C.username),"api_prefix"in C&&t(35,q=C.api_prefix),"max_file_size"in C&&t(14,D=C.max_file_size),"initial_layout"in C&&t(36,N=C.initial_layout),"css"in C&&t(15,P=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,E=!!a),l.$$.dirty[1]&256&&rn(n)},[c,u,f,m,g,h,b,p,k,$,v,j,d,w,D,P,a,Gn,Ht,sn,oe,o,H,De,ge,je,Vt,Fs,Rs,E,on,r,_,y,L,q,N,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-De4Elmu4.js.map | |