import{s as Q,n as W,o as X}from"../chunks/scheduler.d6170356.js";import{S as Z,i as ee,g as l,s as n,r as z,A as te,h as o,f as a,c as i,j as R,u as F,x as _,k as G,y as ae,a as s,v as J,d as V,t as Y,w as B}from"../chunks/index.fcd4cc08.js";import{H as K}from"../chunks/Heading.8660bd0e.js";function se(k){let c,H,b,S,r,L,p,D="Spaces also accommodate custom HTML for your app instead of using Streamlit or Gradio. Set <code>sdk: static</code> inside the <code>YAML</code> block at the top of your Spaces <strong>README.md</strong> file. Then you can place your HTML code within an <strong>index.html</strong> file.",x,u,I="Here are some examples of Spaces using custom HTML:",M,m,U='<li><a href="https://huggingface.co/spaces/mishig/smarter_npc" rel="nofollow">Smarter NPC</a>: Display a PlayCanvas project with an iframe in Spaces.</li> <li><a href="https://huggingface.co/spaces/pierreant-p/huggingfab" rel="nofollow">Huggingfab</a>: Display a Sketchfab model in Spaces.</li>',y,f,$,h,j='Custom <a href="./spaces-overview#managing-secrets">environment variables</a> can be passed to your Space. OAuth information such as the client ID and scope are also available as environment variables, if you have <a href="./spaces-oauth">enabled OAuth</a> for your Space.',w,v,O="To use these variables in JavaScript, you can use the <code>window.huggingface.variables</code> object. For example, to access the <code>OAUTH_CLIENT_ID</code> variable, you can use <code>window.huggingface.variables.OAUTH_CLIENT_ID</code>.",C,d,N="Here is an example of a Space using custom environment variables and oauth enabled and displaying the variables in the HTML:",P,g,q='<li><a href="https://huggingface.co/spaces/huggingfacejs/static-variables" rel="nofollow">Static Variables</a></li>',A,T,E;return r=new K({props:{title:"Static HTML Spaces",local:"static-html-spaces",headingTag:"h1"}}),f=new K({props:{title:"Space variables",local:"space-variables",headingTag:"h2"}}),{c(){c=l("meta"),H=n(),b=l("p"),S=n(),z(r.$$.fragment),L=n(),p=l("p"),p.innerHTML=D,x=n(),u=l("p"),u.textContent=I,M=n(),m=l("ul"),m.innerHTML=U,y=n(),z(f.$$.fragment),$=n(),h=l("p"),h.innerHTML=j,w=n(),v=l("p"),v.innerHTML=O,C=n(),d=l("p"),d.textContent=N,P=n(),g=l("ul"),g.innerHTML=q,A=n(),T=l("p"),this.h()},l(e){const t=te("svelte-u9bgzb",document.head);c=o(t,"META",{name:!0,content:!0}),t.forEach(a),H=i(e),b=o(e,"P",{}),R(b).forEach(a),S=i(e),F(r.$$.fragment,e),L=i(e),p=o(e,"P",{"data-svelte-h":!0}),_(p)!=="svelte-1qcbiku"&&(p.innerHTML=D),x=i(e),u=o(e,"P",{"data-svelte-h":!0}),_(u)!=="svelte-eya07n"&&(u.textContent=I),M=i(e),m=o(e,"UL",{"data-svelte-h":!0}),_(m)!=="svelte-1mc4va3"&&(m.innerHTML=U),y=i(e),F(f.$$.fragment,e),$=i(e),h=o(e,"P",{"data-svelte-h":!0}),_(h)!=="svelte-g74v4h"&&(h.innerHTML=j),w=i(e),v=o(e,"P",{"data-svelte-h":!0}),_(v)!=="svelte-z1bh12"&&(v.innerHTML=O),C=i(e),d=o(e,"P",{"data-svelte-h":!0}),_(d)!=="svelte-1xu7v31"&&(d.textContent=N),P=i(e),g=o(e,"UL",{"data-svelte-h":!0}),_(g)!=="svelte-y7kl17"&&(g.innerHTML=q),A=i(e),T=o(e,"P",{}),R(T).forEach(a),this.h()},h(){G(c,"name","hf:doc:metadata"),G(c,"content",ne)},m(e,t){ae(document.head,c),s(e,H,t),s(e,b,t),s(e,S,t),J(r,e,t),s(e,L,t),s(e,p,t),s(e,x,t),s(e,u,t),s(e,M,t),s(e,m,t),s(e,y,t),J(f,e,t),s(e,$,t),s(e,h,t),s(e,w,t),s(e,v,t),s(e,C,t),s(e,d,t),s(e,P,t),s(e,g,t),s(e,A,t),s(e,T,t),E=!0},p:W,i(e){E||(V(r.$$.fragment,e),V(f.$$.fragment,e),E=!0)},o(e){Y(r.$$.fragment,e),Y(f.$$.fragment,e),E=!1},d(e){e&&(a(H),a(b),a(S),a(L),a(p),a(x),a(u),a(M),a(m),a(y),a($),a(h),a(w),a(v),a(C),a(d),a(P),a(g),a(A),a(T)),a(c),B(r,e),B(f,e)}}}const ne='{"title":"Static HTML Spaces","local":"static-html-spaces","sections":[{"title":"Space variables","local":"space-variables","sections":[],"depth":2}],"depth":1}';function ie(k){return X(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class re extends Z{constructor(c){super(),ee(this,c,ie,se,Q,{})}}export{re as component};
