PageSourceSearch

https://geekflare.com/_next/static/chunks/1_3mqepdz9za5.js

js geekflare.com collected 2026-09-24 07:22:39 UTC 59,027 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,30581,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(43531),a=e.i(64659),s=e.i(70756),l=e.i(31343);let i="https://challenges.cloudflare.com/turnstile/v0/api.js";function o(e){let{siteKey:r,onSuccess:a,onError:s,onExpired:l,theme:o="auto",size:c="normal",scale:d=.6,className:u="",resetKey:p=0,executeKey:h=0}=e,m=(0,n.useRef)(null),f=(0,n.useRef)(null),[x,g]=(0,n.useState)(!0),[b,w]=(0,n.useState)(null),v=(0,n.useRef)(0),y=(0,n.useRef)(a),k=(0,n.useRef)(s),j=(0,n.useRef)(l);return((0,n.useEffect)(()=>{y.current=a,k.current=s,j.current=l},[a,s,l]),(0,n.useEffect)(()=>{if(h>v.current&&f.current&&window.turnstile){v.current=h;try{window.turnstile.reset(f.current),w(null)}catch(e){}}},[h]),(0,n.useEffect)(()=>{if(p>0&&f.current&&window.turnstile)try{window.turnstile.reset(f.current),w(null),v.current=0}catch(e){}},[p]),(0,n.useEffect)(()=>{if(!r){w("Turnstile site key is not configured"),g(!1);return}let e=!0;return(async()=>{try{if(await new Promise((e,t)=>{if(window.turnstile)return void e();let n=document.querySelector('script[src="'.concat(i,'"]'));if(n){n.addEventListener("load",()=>e()),n.addEventListener("error",()=>t(Error("Failed to load Turnstile script")));return}let r=document.createElement("script");r.src=i,r.async=!0,r.defer=!0,r.onload=()=>e(),r.onerror=()=>t(Error("Failed to load Turnstile script")),document.head.appendChild(r)}),!e||!m.current||!window.turnstile)return;if(f.current)try{window.turnstile.remove(f.current)}catch(e){}m.current.innerHTML="",f.current=window.turnstile.render(m.current,{sitekey:r,callback:t=>{e&&(w(null),y.current(t))},"error-callback":()=>{if(e){var t;w("Turnstile verification failed"),null==(t=k.current)||t.call(k)}},"expired-callback":()=>{if(e){var t;w("Turnstile token expired"),null==(t=j.current)||t.call(j)}},theme:o,size:c}),g(!1)}catch(t){e&&(w(t instanceof Error?t.message:"Failed to load Turnstile"),g(!1))}})(),()=>{if(e=!1,f.current&&window.turnstile){try{window.turnstile.remove(f.current)}catch(e){}f.current=null}}},[r,o,c]),b)?(0,t.jsx)("div",{className:u,style:{transform:"scale(".concat(d,")"),transformOrigin:"top left"}}):(0,t.jsx)("div",{ref:m,className:u,style:{transform:"scale(".concat(d,")"),transformOrigin:"top left"}})}var c=e.i(94909),d=e.i(99264),u=e.i(44828),p=e.i(47163),h=e.i(90111),m=e.i(47027);function f(e){return e-Math.floor(e)}function x(e,t){let n=Math.floor(e),r=Math.floor(t),a=e-n,s=t-r;a=a*a*(3-2*a),s=s*s*(3-2*s);let l=g(n,r),i=g(n+1,r),o=g(n,r+1);return l+(i-l)*a+(o-l)*s+(l-i-o+g(n+1,r+1))*a*s}function g(e,t){let n=43758.5453*Math.sin(12.9898*e+78.233*t);return n-Math.floor(n)}function b(e,t){let n=1-2*(e+.5)/t,r=Math.sqrt(1-n*n),a=Math.PI*(3-Math.sqrt(5))*e;return[r*Math.cos(a),n,r*Math.sin(a)]}function w(e,t,n,r,a){let s=Math.sin(t),l=Math.cos(t),i=Math.sin(e),o=Math.cos(e);return(e,t,c)=>{let d=-e*i+c*o;return[n+(e*o+c*i)*a,r-(t*l-d*s)*a,t*s+d*l]}}function v(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.3,a=[];for(let t of e)(null!=(n=t.a)?n:1)<.02||(t.r=Math.max(r,t.r),a.push(t));return a.sort((e,t)=>e.z-t.z),{dots:a,lines:t.filter(e=>{var t;return(null!=(t=e.a)?t:1)>=.02})}}function y(e,t){return(e/300)**t}function k(e){let t=e.length,n=[],r=0;for(let a=0;a<t;a++){let s=e[a],l=e[(a+1)%t],i=Math.hypot(l[0]-s[0],l[1]-s[1]);n.push(i),r+=i}return a=>{let s=a*r,l=0;for(;s>n[l]&&l<t-1;)s-=n[l],l++;let i=e[l],o=e[(l+1)%t],c=n[l]?Math.min(1,s/n[l]):0;return[i[0]+(o[0]-i[0])*c,i[1]+(o[1]-i[1])*c]}}let j=[e=>{let t=-Math.PI/2+2*e*Math.PI;return[.24*Math.cos(t),.24*Math.sin(t)]},k([[0,-.26],[.24,.16],[-.24,.16]]),k([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]])],M=(e,t,n)=>{var r,a,s,l,i,o,c,d,u,p;let h=e/2*.78,m=null!=(r=n.spin)?r:1,f=w(.1*t*m,.3,e/2,e/2,1),x=y(e,null!=(a=n.rsPow)?a:.6),g=[],k=null!=(s=n.ghostN)?s:150;for(let e=0;e<k;e++){let t=b(e,k),[n,r,a]=f(t[0]*h,t[1]*h,t[2]*h),s=(a/h+1)/2;g.push({x:n,y:r,z:a,r:.8*x,white:.78,a:.1+.22*s})}let j=.24*t*m,M=n.faceOn?-.3:.55+.3*Math.sin(.18*t)*m,N=Math.cos(j),S=Math.sin(j),P=-S*Math.sin(M),C=Math.cos(M),R=N*Math.sin(M),L=0*R-S*C,z=S*P-N*R,E=N*C-0*P,I=.23*(null!=(l=n.wobMul)?l:1),_=n.faceOn?h/(1+.85*I):h,T=null!=(i=n.lanes)?i:5,A=null!=(o=n.segs)?o:88,D=Math.max(1,Math.round(T*(null!=(c=n.bandMul)?c:1)));for(let e=0;e<D;e++){let r=(e-(D-1)/2)*.075,a=Math.abs(e-(D-1)/2)/Math.max(1,(D-1)/2);for(let s=0;s<A;
1s++){let l=s/A*2*Math.PI,i=(.16*Math.sin(3*l-1.7*t+.22*e)+.07*Math.sin(5*l+1.1*t))*(null!=(d=n.wobMul)?d:1),o=n.faceOn?1+i:1,c=n.faceOn?r:r+i,m=N*Math.cos(l)+P*Math.sin(l)+L*c,b=0*Math.cos(l)+C*Math.sin(l)+z*c,w=S*Math.cos(l)+R*Math.sin(l)+E*c,v=Math.sqrt(m*m+b*b+w*w),y=_*o,[k,j,M]=f(m/v*y,b/v*y,w/v*y),I=(M/h+1)/2;g.push({x:k,y:j,z:M,r:((null!=(u=n.rBase)?u:1.1)+(null!=(p=n.rDepth)?p:1.7)*I)*(1-.25*a)*x,white:.52-.44*I+.18*a,a:.4+.6*I})}}return v(g,[],n.rMin)},N=Object.fromEntries(Object.entries({orbits:(e,t,n)=>{var r,a,s,l,i,o,c,d;let u=e/2*.82,p=w(.12*t,.3,e/2,e/2,1),h=y(e,null!=(r=n.rsPow)?r:.6),m=[],f=null!=(a=n.orbitN)?a:12,x=null!=(s=n.ghostN)?s:40,b=null!=(l=n.particles)?l:3;for(let e=0;e<f;e++){let r=g(e,1.7),a=g(e,5.2),s=g(e,8.9),l=u*(.45+.52*r),f=2*r*Math.PI,w=Math.acos(2*a-1),v=Math.sin(w)*Math.cos(f),y=Math.cos(w),k=Math.sin(w)*Math.sin(f),j=-y,M=v,N=Math.max(1e-6,Math.sqrt(j*j+M*M));j/=N;let S=0*y-k*(M/=N),P=k*j-0*v,C=v*M-y*j,R=(.25+.55*s)*(s>.5?1:-1);for(let e=0;e<x;e++){let t=e/x*2*Math.PI,[r,a,s]=p((j*Math.cos(t)+S*Math.sin(t))*l,(M*Math.cos(t)+P*Math.sin(t))*l,(0*Math.cos(t)+C*Math.sin(t))*l),c=(s/l+1)/2;m.push({x:r,y:a,z:s,r:(null!=(i=n.ghostR)?i:.9)*h,white:.72,a:(null!=(o=n.ghostA)?o:.5)*(.4+.6*c)})}for(let e=0;e<b;e++){let r=t*R+e/b*2*Math.PI+6*a,[s,i,o]=p((j*Math.cos(r)+S*Math.sin(r))*l,(M*Math.cos(r)+P*Math.sin(r))*l,(0*Math.cos(r)+C*Math.sin(r))*l),u=(o/l+1)/2;m.push({x:s,y:i,z:o,r:((null!=(c=n.partR)?c:1.2)+(null!=(d=n.partRDepth)?d:1.6)*u)*h,white:.3-.22*u})}}return v(m,[],n.rMin)},globe:(e,t,n)=>{var r,a,s,l,i,o,c,d,u,p,h;let m=.4+.06*Math.sin(.35*t),f=w(.5*t,m,e/2,e/2,e/2*.82),x=t*(.5+1.2*(null!=(r=n.scanMul)?r:1)),g=y(e,null!=(a=n.rsPow)?a:.6),b=null!=(s=n.dimBase)?s:1,k=[],j=null!=(l=n.latRings)?l:17,M=null!=(i=n.lonDensity)?i:44;for(let e=0;e<=j;e++){let r=-Math.PI/2+e/j*Math.PI,a=Math.cos(r),s=Math.sin(r),l=Math.max(1,Math.round(Math.abs(a)*M));for(let e=0;e<l;e++){let r=e/l*2*Math.PI,[i,m,w]=f(a*Math.cos(r),s,a*Math.sin(r)),v=(w+1)/2,y=Math.atan2(Math.sin((h=r+.5*t)-x),Math.cos(h-x)),j=Math.exp(-(y*y)/.18)*Math.max(0,w);k.push({x:i,y:m,z:w,r:((null!=(o=n.rBase)?o:.6)+(null!=(c=n.rDepth)?c:1.7)*v+(null!=(d=n.rBoost)?d:1)*j)*g,white:(null!=(u=n.inkFar)?u:.62)-(null!=(p=n.inkSpan)?p:.54)*v,a:b+(1-b)*Math.min(1,j)})}}return v(k,[],n.rMin)},rubik:(e,t,n)=>{var r,a,s,l,i,o,c,d,u;let p=w(.55*t,.35+.1*Math.sin(.9*t),e/2,e/2,e/2*.82),h=y(e,null!=(r=n.rsPow)?r:.6),m=null!=(a=n.moveCount)?a:14,f=function(e){let t=[];for(let n=0;n<e;n++){let e=Math.min(2,Math.floor(3*g(n,2.3))),r=-1+.5*Math.min(3,Math.floor(4*g(n,5.9))),a=.5>g(n,7.7)?1:-1;t.push({axis:e,lo:r,hi:r+.5,ang:a*Math.PI/2})}return t}(m),x=function(e,t){let n=e%(2*t*.42+1.2),r=Array(t).fill(0),a=-1;if(n<2*t*.42){let e=Math.floor(n/.42),s=1-(1-Math.min(1,(n-.42*e)/.42/.7))**3;if(e<t){for(let t=0;t<e;t++)r[t]=1;r[e]=s,a=e}else{let n=2*t-1-e;for(let e=0;e<n;e++)r[e]=1;r[n]=1-s,a=n}}return{amount:r,active:a}}(t,m),b=[],k=null!=(s=n.latRings)?s:15,j=null!=(l=n.lonDensity)?l:40;for(let e=0;e<=k;e++){let t=-Math.PI/2+e/k*Math.PI,r=Math.cos(t),a=Math.sin(t),s=Math.max(1,Math.round(Math.abs(r)*j));for(let e=0;e<s;e++){let t=e/s*2*Math.PI,[l,m,g,w]=function(e,t,n){let[r,a,s]=e,l=!1;for(let e=0;e<t.length;e++){if(n.amount[e]<=0)continue;let i=t[e],o=0===i.axis?r:1===i.axis?a:s;if(o<i.lo||o>=i.hi)continue;e===n.active&&(l=!0);let c=i.ang*n.amount[e],d=Math.cos(c),u=Math.sin(c);if(0===i.axis){let e=a*d-s*u;s=a*u+s*d,a=e}else if(1===i.axis){let e=r*d+s*u;s=-r*u+s*d,r=e}else{let e=r*d-a*u;a=r*u+a*d,r=e}}return[r,a,s,l]}([r*Math.cos(t),a,r*Math.sin(t)],f,x),[v,y,k]=p(l,m,g),j=(k+1)/2;b.push({x:v,y:y,z:k,r:((null!=(i=n.rBase)?i:.6)+(null!=(o=n.rDepth)?o:1.7)*j+(w?null!=(c=n.rActive)?c:.3:0))*h,white:(null!=(d=n.inkFar)?d:.62)-(null!=(u=n.inkSpan)?u:.54)*j-.14*!!w}
1)}}return v(b,[],n.rMin)},wave:(e,t,n)=>{var r,a,s,l,i;let o=e/2*.874,c=w(.18*t,.38,e/2,e/2,1),d=y(e,null!=(r=n.rsPow)?r:.6),u=[],p=null!=(a=n.rings)?a:15,h=null!=(s=n.lonDensity)?s:40;for(let e=0;e<=p;e++){let r=-Math.PI/2+e/p*Math.PI,a=Math.cos(r),s=Math.sin(r),m=.62*Math.sin(2.1*t-.52*e)+.38*Math.sin(1.27*t+.83*e),f=o*(.88+.105*m),x=Math.max(1,Math.round(Math.abs(a)*h));for(let e=0;e<x;e++){let t=e/x*2*Math.PI,[r,p,h]=c(a*Math.cos(t)*f,s*f,a*Math.sin(t)*f),g=(h/o+1)/2,b=Math.max(0,m);u.push({x:r,y:p,z:h,r:((null!=(l=n.rBase)?l:.6)+(null!=(i=n.rDepth)?i:1.7)*g)*(1+.4*b)*d,white:.66-.56*g-.1*b})}}return v(u,[],n.rMin)},web:(e,t,n)=>{var r,a,s,l,i,o,c,d,u,p,h;let m=e/2*.8*(null!=(r=n.spread)?r:1),k=w(.12*t,.32,e/2,e/2,m),j=y(e,null!=(a=n.rsPow)?a:.6),M=null!=(s=n.nodeN)?s:30,N=null!=(l=n.thr)?l:.72,S=null!=(i=n.nodeR)?i:1.4,P=null!=(o=n.nodeRDepth)?o:1.8,C=[];for(let e=0;e<M;e++){let n=b(e,M),r=n[0]+.3*(x(.31*e+9,.24*t)-.5)*2,a=n[1]+.3*(x(.53*e+27,.21*t)-.5)*2,s=n[2]+.3*(x(.77*e+55,.27*t)-.5)*2,l=Math.sqrt(r*r+a*a+s*s);C.push([r/l,a/l,s/l])}let R=[],L=[];for(let e=0;e<M;e++)for(let t=e+1;t<M;t++){let r=C[e][0]-C[t][0],a=C[e][1]-C[t][1],s=C[e][2]-C[t][2],l=Math.sqrt(r*r+a*a+s*s);if(l>=N)continue;let[i,o,c]=k(C[e][0],C[e][1],C[e][2]),[u,p,h]=k(C[t][0],C[t][1],C[t][2]),m=((c+h)/2+1)/2;R.push({x1:i,y1:o,x2:u,y2:p,white:.42,a:(1-l/N)*(.3+.55*m),w:Math.max(.6,(null!=(d=n.lineW)?d:.8)*j)})}for(let e=0;e<M;e++){let[n,r,a]=k(C[e][0],C[e][1],C[e][2]),s=(a+1)/2,l=1+.25*Math.sin(1.4*t+2.7*e);L.push({x:n,y:r,z:a,r:(S+P*s)*l*j,white:.55-.45*s})}let z=null!=(c=n.signals)?c:5;for(let e=0;e<z;e++){let n=Math.floor(.55*t+7.31*e),r=Math.floor(g(n,3.1*e+1.7)*M),a=Math.floor(g(n,5.7*e+4.2)*M);if(r===a)continue;let s=f(.55*t+7.31*e),l=(u=C[r][0],u+(C[a][0]-u)*s),i=(p=C[r][1],p+(C[a][1]-p)*s),o=(h=C[r][2],h+(C[a][2]-h)*s),c=Math.max(1e-6,Math.sqrt(l*l+i*i+o*o)),[d,m,x]=k(l/c,i/c,o/c),b=(x+1)/2;L.push({x:d,y:m,z:x,r:(1.5*S+P*b)*j,white:.05,a:.5+.5*b})}return v(L,R,n.rMin)},braid:(e,t,n)=>{var r,a,s,l,i,o;let c=e/2*.76,d=w(.4*t,.3,e/2,e/2,1),u=y(e,null!=(r=n.rsPow)?r:.6),p=[],h=null!=(a=n.ghostN)?a:150;for(let e=0;e<h;e++){let t=b(e,h),[n,r,a]=d(t[0]*c,t[1]*c,t[2]*c),s=(a/c+1)/2;p.push({x:n,y:r,z:a,r:.8*u,white:.78,a:.1+.22*s})}let m=null!=(s=n.strandN)?s:52,x=null!=(l=n.turns)?l:3;for(let e=0;e<3;e++){let r=e/3*2*Math.PI;for(let e=0;e<m;e++){let a=(2*f(e/m+.045*t)-1)*.96,s=Math.sqrt(Math.max(0,1-a*a)),l=Math.min(1,(1-Math.abs(a))/.1),h=a*Math.PI*x+r,g=1+.075*Math.sin(a*Math.PI*x*2+2*r+.8*t),b=s*c*g,[w,v,y]=d(Math.cos(h)*b,a*c*g,Math.sin(h)*b),k=(y/c+1)/2;p.push({x:w,y:v,z:y,r:((null!=(i=n.rBase)?i:1.2)+(null!=(o=n.rDepth)?o:1.8)*k)*u,white:.55-.45*k,a:l*(.45+.55*k)})}}return v(p,[],n.rMin)},ribbon:M,ring:M,morph:(e,t,n)=>{var r,a,s,l;let i=j.length,o=t%(2.3*i),c=Math.floor(o/2.3),d=o-2.3*c,u=d>1.4?(l=(d-1.4)/.9)*l*(3-2*l):0,p=null!=(r=n.spread)?r:1,h=j[c],m=j[(c+1)%i],f=[];for(let e=0;e<160;e++){let t=e/160,n=h(t),r=m(t);f.push([(n[0]+(r[0]-n[0])*u)*p,(n[1]+(r[1]-n[1])*u)*p])}let x=[],g=0;for(let e=0;e<160;e++){let t=f[e],n=f[(e+1)%160],r=Math.hypot(n[0]-t[0],n[1]-t[1]);x.push(r),g+=r}let b=Math.max(6,Math.round(34*(null!=(a=n.iconD)?a:1))),w=(null!=(s=n.rDot)?s:.021)*1.35*p,y=1+.02*Math.sin(3.1*d),k=[],M=e/2,N=0,S=0;for(let t=0;t<b;t++){let n=t/b*g;for(;S+x[N]<n&&N<159;)S+=x[N],N++;let r=f[N],a=f[(N+1)%160],s=x[N]?Math.min(1,(n-S)/x[N]):0,l=(r[0]+(a[0]-r[0])*s)*y,i=(r[1]+(a[1]-r[1])*s)*y;k.push({x:M+l*e,y:M+i*e,z:0,r:Math.max(.35,w*e),white:.1})}return v(k,[],n.rMin)}}).map(e=>{let[t,n]=e;return[t,(e,t,r,a,s)=>{var l;return l=n(t,r,s),void(l.lines.length&&function(e,t,n){for(let a of t){var r;let t=null!=(r=a.a)?r:1,s=Math.min(1,Math.max(0,a.white)),l=Math.round((n?1-s:s)*255);e.strokeStyle="rgba(".concat(l,",").concat(l,",").concat(l,",").concat(t,")"),e.lineWidth=a.w,e.beginPath(),e.moveTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.stroke()}}(e,l.lines,a),function(e,t,n){for(let a of(arguments.length>3&&void 0!==arguments[3]&&arguments[3],t)){var r;let t=null!=(r=a.a)?r:1,s=Math.min(1,Math.max(0,a.white)),l=Math.round((n?1-s:s)*255);e.fillStyle="rgba(".concat(l,",").concat(l,",").concat(l,",").concat(t,")"),e.beginPath(),e.arc(a.x,a.y,a.r,0,2*Math.PI),e.fill()}}(e,l.dots,a))}]})),S=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],P=["orbitN","ghostN","nodeN","strandN","signals"],C=["iconD"],R=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","
1nodeR","nodeRDepth"],L={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}},z={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},E={orbits:{64:{speed:1.885,count:1,size:1},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},I=new Map,_={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function T(e){let{state:r="working",size:a=64,theme:s="auto",speed:l=1,paused:i=!1,style:o,"aria-label":c,...d}=e,u=(0,n.useRef)(null),p=function(e,t){let[r,a]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{if("dark"===e)return void a(!0);if("light"===e)return void a(!1);let n=()=>{let e=function(e){let t=e;for(;t;){let e=t.getAttribute("data-theme");if("dark"===e)return!0;if("light"===e)return!1;if(t.classList.contains("dark"))return!0;if(t.classList.contains("light"))return!1;t=t.parentElement}return null}(t.current);a(null!=e?e:typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches)};n();let r="u">typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null,s=()=>n();null==r||r.addEventListener("change",s);let l=null;return"u">typeof MutationObserver&&t.current&&(l=new MutationObserver(n)).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0}),()=>{null==r||r.removeEventListener("change",s),null==l||l.disconnect()}},[e,t]),r}(s,u),h=function(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(typeof matchMedia>"u")return;let e=matchMedia("(prefers-reduced-motion: reduce)");t(e.matches);let n=e=>t(e.matches);return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),e}();return(0,n.useEffect)(()=>{let e=u.current;if(!e)return;let t=Math.min(2,"u">typeof devicePixelRatio&&devicePixelRatio||1);e.width=Math.round(a*t),e.height=Math.round(a*t);let n=e.getContext("2d");if(!n)return;let{mode:s,speed:o,opts:c}=function(e,t){let n="".concat(e,"-").concat(t),r=I.get(n);if(r)return r;let a=z[e],s=E[a][t],l={...L[a]};1!==s.count&&(l=function(e,t){let n={...e},r=new Set,a=Math.sqrt(t);for(let[e,t]of S){let s=n[e],l=n[t];null==s||null==l||r.has(e)||r.has(t)||(n[e]=Math.max(2,Math.round(s*a)),n[t]=Math.max(2,Math.round(l*a)),r.add(e),r.add(t))}for(let e of P){let a=n[e];null==a||0===a||r.has(e)||(n[e]=Math.max(1,Math.round(a*t)))}for(let e of C){let r=n[e];null!=r&&(n[e]=Math.max(.02,r*t))}return n}(l,s.count)),1!==s.size&&(l=function(e,t){var n;let r={...e};for(let e of R){let n=r[e];null!=n&&(r[e]=n*t)}
1return r.rSizeMul=(null!=(n=r.rSizeMul)?n:1)*t,r}(l,s.size)),s.extra&&(l={...l,...s.extra});let i={mode:a,speed:s.speed,opts:l};return I.set(n,i),i}(r,a),d=N[s],m=o*l,f=e=>{n.setTransform(t,0,0,t,0,0),n.clearRect(0,0,a,a),d(n,a,e,p,c)};if(h)return void f(.6);let x=0,g=!1,b=()=>{f(performance.now()/1e3*m),g&&(x=requestAnimationFrame(b))},w=()=>{g||i||(g=!0,x=requestAnimationFrame(b))},v=()=>{g=!1,cancelAnimationFrame(x)};f(performance.now()/1e3*m);let y=!0,k="u">typeof IntersectionObserver?new IntersectionObserver(e=>{let[t]=e;(y=t.isIntersecting)&&"hidden"!==document.visibilityState?w():v()}):null;null==k||k.observe(e);let j=()=>{"hidden"===document.visibilityState?v():y&&w()};return document.addEventListener("visibilitychange",j),k||w(),()=>{v(),null==k||k.disconnect(),document.removeEventListener("visibilitychange",j)}},[r,a,p,l,i,h]),(0,t.jsx)("canvas",{ref:u,role:"img","aria-label":null!=c?c:_[r],style:{width:a,height:a,display:"block",...o},...d})}var A=e.i(17318);let D=["Sending request…","Fetching data…","Building results…"];function q(e){let{steps:r=D,size:a=64,className:s}=e,[l,i]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(l>=r.length-1)return;let e=setTimeout(()=>i(e=>e+1),1800);return()=>clearTimeout(e)},[l,r.length]);let o=r[l];return(0,t.jsxs)("div",{className:(0,A.cn)("flex flex-col items-center gap-4 text-center",s),children:[(0,t.jsx)(T,{state:"connecting",size:a,"aria-label":o}),(0,t.jsx)("div",{className:"animate-gf-fade-up font-gf-sans text-[13.5px] font-medium text-gf-dim",children:o},l)]})}let O=["Sending request…","Rendering content…","Structuring response…"];function U(){return(0,t.jsx)("div",{className:"absolute inset-0 grid place-items-center p-6",children:(0,t.jsx)(q,{steps:O})})}let B=[{id:"webscraping",label:"scrape",inputLabel:"URL to scrape"},{id:"search",label:"search",inputLabel:"Search query"},{id:"screenshot",label:"screenshot",inputLabel:"URL to capture"},{id:"metascraping",label:"meta",inputLabel:"URL to inspect"},{id:"dnsrecord",label:"dns",inputLabel:"Domain to resolve"},{id:"url2pdf",label:"pdf",inputLabel:"URL to convert"},{id:"brokenlink",label:"links",inputLabel:"URL to check"},{id:"lighthouse",label:"lighthouse",inputLabel:"URL to audit"},{id:"loadtime",label:"load time",inputLabel:"URL to time"},{id:"redirectchecker",label:"redirects",inputLabel:"URL to follow"},{id:"tlsscan",label:"tls",inputLabel:"Domain to scan"},{id:"openport",label:"ports",inputLabel:"Domain to scan"}
1,{id:"up",label:"status",inputLabel:"URL to check"}],F=B.slice(0,5),W={webscraping:["stripe.com","news.ycombinator.com","testingurl.dev","github.com","wikipedia.org"],search:["stripe payments api","best running shoes","vector database benchmarks","top ai agent frameworks"],screenshot:["stripe.com","apple.com","shopify.com","paypal.com"],metascraping:["stripe.com","github.com","news.ycombinator.com","vercel.com"],dnsrecord:["stripe.com","github.com","cloudflare.com","google.com"],url2pdf:["stripe.com","github.com","wikipedia.org","vercel.com"],brokenlink:["stripe.com","github.com","wikipedia.org","vercel.com"],lighthouse:["stripe.com","github.com","vercel.com","wikipedia.org"],loadtime:["stripe.com","github.com","vercel.com","wikipedia.org"],redirectchecker:["github.com","stripe.com","google.com","wikipedia.org"],tlsscan:["stripe.com","github.com","cloudflare.com","google.com"],openport:["stripe.com","github.com","cloudflare.com","google.com"],up:["stripe.com","github.com","vercel.com","wikipedia.org"]},K={"stripe.com":"https://cdn.geekflare.com/api-assets/playground/stripe.png","apple.com":"https://cdn.geekflare.com/api-assets/playground/apple.png","shopify.com":"https://cdn.geekflare.com/api-assets/playground/shopify.png","paypal.com":"https://cdn.geekflare.com/api-assets/playground/paypal.png"},G=new Map,Y=[{id:"markdown-llm",note:"for LLMs & RAG",view:"markdown"},{id:"markdown",note:"full page",view:"markdown"},{id:"html-llm",note:"cleaned HTML",view:"html"},{id:"html",note:"post-render DOM",view:"html"},{id:"text-llm",note:"main content",view:"text"},{id:"text",note:"all visible text",view:"text"},{id:"json",note:"structured fields",view:"json"}],$=["url2pdf","redirectchecker","brokenlink","loadtime","lighthouse","tlsscan","openport","up"],J=[{key:"markdown",fields:["markdownLlm","markdown"]},{key:"html",fields:["htmlLlm","html"]},{key:"text",fields:["textLlm","text"]}];function H(e,t){let{format:n,sample:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=function(e,t){let n=[];if(!e)return n;let r=e.data;if("string"==typeof r&&/^https?:\/\//i.test(r)&&("screenshot"===t||/\.(png|jpe?g|webp)(\?|$)/i.test(r))&&n.push({key:"preview",text:r}),r&&"object"==typeof r&&!Array.isArray(r))for(let e of J){let t=e.fields.find(e=>"string"==typeof r[e]&&r[e]);t&&n.push({key:e.key,text:r[t]})}return n.push({key:"json",text:JSON.stringify(e,null,2)}),n}(e,t);if("webscraping"===t&&n){var s,l;let e=null!=(s=null==(l=Y.find(e=>e.id===n))?void 0:l.view)?s:"markdown",t=a.filter(t=>t.key===e);return t.length?t:a.filter(e=>"json"===e.key)}if("screenshot"===t&&r){let e=a.filter(e=>"preview"===e.key);return e.length?e:a}return a}let Q=/("(?:\\.|[^"\\])*")(\s*:)?|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g;function X(e){let n=[],r=0;for(let s of e.matchAll(Q)){var a;let l=null!=(a=s.index)?a:0;l>r&&n.push(e.slice(r,l)),s[1]&&s[2]?n.push((0,t.jsx)("span",{className:"text-gf-2-text",children:s[1]},l),s[2]):s[1]?n.push((0,t.jsx)("span",{children:s[1]},l)):n.push((0,t.jsx)("span",{className:"text-gf-accent",children:s[0]},l)),r=l+s[0].length}return r<e.length&&n.push(e.slice(r)),n}function Z(e){if(/^#{1,6}\s/.test(e))return(0,t.jsx)("span",{className:"font-medium text-gf-2-text",children:e});if(/^\s*([-*+]|\d+\.)\s/.test(e)){var n;let[,r,a]=null!=(n=e.match(/^(\s*(?:[-*+]|\d+\.)\s)(.*)$/))?n:[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-gf-accent",children:r}),a]})}return e}e.s(["Playground",0,function(){var e,i,f,x;let{api:g,format:b,proxyMode:w}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[v,y]=(0,n.useState)(null!=g?g:"webscraping"),[k,j]=(0,n.useState)(""),[M,N]=(0,n.useState)(!1),[S,P]=(0,n.useState)(()=>{var e,t;return null!=(e=null==(t=Y.find(e=>e.id===b))?void 0:t.id)?e:Y[0].id}),[C,R]=(0,n.useState)(!1),[L,z]=(0,n.useState)(!1),[E,I]=(0,n.useState)("sample"),[_,T]=(0,n.useState)(null),[A,D]=(0,n.useState)({}),q=(0,n.useRef)(null),O=(0,n.useRef)({apiId:null!=g?g:"webscraping",phase:"sample"}
1),[J,Q]=(0,n.useState)(null),[V,ee]=(0,n.useState)(null),[et,en]=(0,n.useState)(()=>new Set(["stripe.com"])),[er,ea]=(0,n.useState)("markdown"),[es,el]=(0,n.useState)(1/0),[ei,eo]=(0,n.useState)(!0),[ec,ed]=(0,n.useState)(!1),[eu,ep]=(0,n.useState)(!1),[eh,em]=(0,n.useState)(!1),ef="0x4AAAAAAAIQIQuvjbyy0UZK",[ex,eg]=(0,n.useState)(null),[eb,ew]=(0,n.useState)(0),ev=(0,n.useRef)(!1),ey=(0,n.useRef)(!1),ek=(0,n.useRef)(null),ej=(0,n.useRef)(async()=>{}),eM=(0,n.useRef)(null),eN=(0,n.useRef)(null),eS=(0,n.useRef)(null),eP=B.find(e=>e.id===v),eC=(0,n.useMemo)(()=>H(_,v,{format:null!=V?V:S,sample:"sample"===E}),[_,v,V,S,E]),eR=null!=(e=eC.find(e=>e.key===er))?e:eC[0],eL=null!=(i=null==eR?void 0:eR.text)?i:"",ez="webscraping"===v,eE=A[v],eI=function(e,t){let[r,a]=(0,n.useState)({items:e,index:0,text:"",typed:null}),s=r.items===e?r:{index:0,text:"",typed:null};(0,n.useEffect)(()=>{let n;if(t||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let r=0,s=0,l=!1,i=()=>{let t=e[r];if(l){if(s-=1,a(n=>({items:e,index:r,text:t.slice(0,s),typed:n.typed})),s<=0){l=!1,r=(r+1)%e.length,n=setTimeout(i,350);return}n=setTimeout(i,28)}else{let o=(s+=1)>=t.length;if(a(n=>({items:e,index:r,text:t.slice(0,s),typed:o?t:n.items===e?n.typed:null})),o){l=!0,n=setTimeout(i,1800);return}n=setTimeout(i,65)}};return n=setTimeout(i,400),()=>clearTimeout(n)},[e,t]);let l=e[s.index%e.length];return{placeholder:!t&&s.text.length>0?s.text:l,target:l,typed:s.typed}}(W[v],M||k.length>0);(0,n.useEffect)(()=>{if("screenshot"===v)for(let[e,t]of Object.entries(K)){let n=new Image;n.onload=()=>en(t=>t.has(e)?t:new Set(t).add(e)),n.src=t}},[v]);let e_="screenshot"===v&&eI.typed&&et.has(eI.typed)?eI.typed:null==eE?void 0:eE.input,eT=null!=(f=Y.find(e=>e.id===S))?f:Y[0],eA=(0,n.useMemo)(()=>(0,c.buildPlaygroundPayload)(v,k.trim()||eI.target,ez?{format:[S],...w?{proxyMode:w}:{}}:{}),[v,k,ez,S,w,eI.target]),eD="POST /".concat((0,d.getApiEndpoint)(v),"\n").concat(JSON.stringify(eA,null,2)),eq=["curl -X POST ".concat((0,d.getApiEndpointUrl)(v)," \\"),'  -H "x-api-key: YOUR_API_KEY" \\\n  -H "Content-Type: application/json" \\',"  -d '".concat(JSON.stringify(eA),"'")].join("\n"),eO=(0,n.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=window.posthog&&"function"==typeof window.posthog.capture?window.posthog:null;if(n)try{n.capture(e,t)}catch(e){}}(e,{api_id:v,playground_version:"v3_home",...t})},[v]),eU=()=>{eM.current&&clearInterval(eM.current),eM.current=null};(0,n.useEffect)(()=>()=>{eU(),ek.current&&clearTimeout(ek.current)},[]),(0,n.useEffect)(()=>{if(!eh&&!C)return;let e=e=>{let t=e.target;eN.current&&!eN.current.contains(t)&&em(!1),eS.current&&!eS.current.contains(t)&&R(!1)},t=e=>{"Escape"===e.key&&(em(!1),R(!1))};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[eh,C]);let eB=(e,t)=>{var n,r,a,s;let l=null!=(n=null==t?void 0:t.response)?n:null;T(l);let i=H(l,e,{sample:!0}),o="webscraping"===e?eT.view:null==(s=i[0])?void 0:s.key,c=null!=(r=i.find(e=>e.key===o))?r:i[0];ea(null!=(a=null==c?void 0:c.key)?a:"json")},eF=e=>{(eU(),Q(null),ee(null),el(1/0),I("sample"),O.current={apiId:e,phase:"sample"},eB(e,A[e]),!A[e])&&(!G.has(e)&&G.set(e,fetch("/playground-examples/".concat(e,".json")).then(e=>e.ok?e.json():null).catch(()=>null)),G.get(e)).then(t=>{t&&(D(n=>({...n,[e]:t})),O.current.apiId===e&&"sample"===O.current.phase&&eB(e,t))})};(0,n.useEffect)(()=>{O.current={apiId:v,phase:E}},[v,E]),(0,n.useEffect)(()=>{let e=q.current;if(!e)return;let t=new IntersectionObserver(e=>{let[n]=e;n.isIntersecting&&(t.disconnect(),"sample"===O.current.phase&&eF(O.current.apiId))},{rootMargin:"600px"});return t.observe(e),()=>t.disconnect()},[]);let eW=async()=>{try{await navigator.clipboard.writeText(eq),z(!0),setTimeout(()=>z(!1),1400),eO("playground_copy_curl")}catch(e){}},eK=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=k.trim()||eI.target;if(!t||"waiting"===E&&!e)return;if(k.trim()||j(t),ef&&!ex&&!ev.current&&!e){ey.current=!0,I("waiting"),ew(e=>e+1),ek.current=setTimeout(()=>{ey.current&&(ey.current=!1,ev.current=!0,ej.current(!0))},8e3);return}ek.current&&clearTimeout(ek.current),eU(),I("waiting"),Q(null),eO("playground_run_started",{input_length:t.length});let n=performance.now();try{var r,a;let e=await fetch("/playground/",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiId:v,url:t,...ez?{format:[S],...w?{proxyMode:w}:{}}:{},turnstileToken:ex||void 0})}),s=await e.json(),l=Math.round(performance.now()-n);if(eg(null),!e.ok){if(429===e.status){I("limited"),Q(s.error||"You've reached the playground limit."),eO("playground_run_rate_limited",{http_status:429});return}403===e.status&&s.botDetected&&ew(e=>e+1);let t="string"==typeof s.message?s.message:s.error;Q(t||"The request failed. Try another URL."),T({error:null!=(a=s.error)?a:"Request failed",status:e.status,message:s.message}),ea("json"),I("error"),eO("playground_run_failed",{http_status:e.status,duration_ms:l});return}let i=s.data,o=H(i,v,{format:ez?S:void 0}),c=null!=(r=o.find(e=>e.key===er))?r:o[0];ee(ez?S:null),T(i),ea(c.key),eO("playground_run_succeeded",{http_status:e.status,duration_ms:l}),"preview"===c.key?I("done"):(e=>{if(eU(),window.matchMedia("(prefers-reduced-motion: reduce)").matches){el(1/0),I("done");return}let t=Math.max(26,Math.ceil(e/75));el(0),I("typing"),eM.current=setInterval(()=>{el(n=>{let r=n+t;return r>=e?(eU(),I("done"),1/0):r})},16)})(c.text.length)}catch(e){Q("Network error. Check your connection and try again."),I("error")}};(0,n.useEffect)(()=>{ej.current=eK}),(0,n.useEffect)(()=>{ex&&ey.current&&(ey.current=!1,eK(!0))},[ex]);let eG=async()=>{try{await navigator.clipboard.writeText(eL),ep(!0),setTimeout(()=>ep(!1),1400)}catch(e){}}
1,eY="waiting"===E?"":eL.slice(0,es),e$=eY?eY.split("\n"):[],eJ=(null==eR?void 0:eR.key)==="json"?X:(null==eR?void 0:eR.key)==="markdown"?Z:e=>e,eH="waiting"===E?{text:"waiting for response…",tone:"text-gf-quiet"}:"sample"===E?{text:eE?"example · ".concat(e_):"loading example…",tone:"text-gf-quiet"}:"error"===E||"limited"===E?{text:"request failed",tone:"text-gf-accent"}:{text:"200 OK",tone:"text-gf-2-text"};return(0,t.jsx)("section",{id:"playground",ref:q,className:"scroll-mt-20",children:(0,t.jsx)(m.Container,{className:"pt-11 pb-16 md:pb-[78px]",children:(0,t.jsxs)("div",{className:"rounded-gf border border-gf-line bg-gf-panel shadow-gf-lg",children:[(0,t.jsxs)("div",{className:"flex min-h-12 flex-wrap items-center gap-x-3.5 gap-y-2 rounded-t-gf border-b border-gf-line px-4 py-2",children:[(0,t.jsx)("span",{className:"text-[13.5px] font-semibold whitespace-nowrap",children:"Playground"}),(0,t.jsx)("span",{className:"flex-1"}),!g&&(0,t.jsxs)("div",{className:"relative flex flex-wrap items-center gap-[5px]",ref:eN,children:[F.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{var t;y(t=e.id),j(""),eF(t),ep(!1),z(!1),eO("playground_api_selected",{api_id:t})},"aria-pressed":e.id===v,className:(0,p.cn)("cursor-pointer rounded-full px-[11px] py-1.5 font-gf-mono text-[11.5px] whitespace-nowrap transition-colors",e.id===v?"bg-gf-2 text-gf-2-on":"bg-gf-sunk text-gf-dim hover:text-gf-text"),children:e.label},e.id)),(0,t.jsxs)("button",{type:"button","aria-expanded":eh,onClick:()=>em(!eh),className:"inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-dashed border-gf-line-2 px-[11px] py-1.5 font-gf-mono text-[11.5px] whitespace-nowrap text-gf-dim transition-colors hover:border-gf-2 hover:text-gf-2-text",children:["+",$.length," more",(0,t.jsx)(a.ChevronDown,{"aria-hidden":!0,className:(0,p.cn)("size-[11px] transition-transform",eh&&"rotate-180"),strokeWidth:2.4})]}),eh&&(0,t.jsxs)("div",{className:"absolute top-full right-0 z-40 mt-2.5 w-[290px] rounded-gf border border-gf-line bg-gf-panel p-4 text-left shadow-gf-lg",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 text-[14.5px] font-bold",children:[(0,t.jsx)(s.Lock,{"aria-hidden":!0,className:"size-3.5 text-gf-quiet"}),"Try every endpoint"]}),(0,t.jsx)("p",{className:"mb-3 text-[13px] leading-[1.55] text-gf-dim",children:"Sign up free to run every API in the full playground, with all options and saved requests."}),(0,t.jsx)("div",{className:"mb-3.5 flex flex-wrap gap-[5px]",children:$.map(e=>(0,t.jsxs)("span",{className:"rounded-full bg-gf-sunk px-2 py-[3px] font-gf-mono text-[10.5px] text-gf-dim",children:["/",(0,d.getApiEndpoint)(e)]},e))}),(0,t.jsx)(h.Button,{href:u.LINKS.signup,size:"sm",arrow:!0,children:"Sign up free"})]})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)] wide:grid-cols-[minmax(0,380px)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"min-w-0 p-5",children:[(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),eK()},children:[(0,t.jsx)("label",{htmlFor:"gf-playground-input",className:"gf-label mb-2 block text-[11px]",children:eP.inputLabel}),(0,t.jsx)("input",{id:"gf-playground-input",value:k,onChange:e=>j(e.target.value),onFocus:()=>N(!0),onBlur:()=>N(!1),placeholder:eI.placeholder,spellCheck:!1,autoComplete:"off",className:"h-[42px] w-full rounded-gf-sm border border-gf-line bg-gf-sunk px-[13px] font-gf-mono text-[13px] text-gf-text caret-gf-brand outline-none placeholder:text-gf-quiet focus:border-gf-2"}),ez&&(0,t.jsxs)("div",{ref:eS,className:"relative mt-3.5 flex items-center gap-2.5",children:[(0,t.jsx)("span",{id:"gf-format-label",className:"gf-label text-[11px]",children:"format"}),(0,t.jsxs)("button",{type:"button","aria-haspopup":"listbox","aria-expanded":C,"aria-labelledby":"gf-format-label",onClick:()=>R(!C),className:"inline-flex h-10 min-w-0 flex-1 cursor-pointer items-center gap-[9px] rounded-gf-sm border border-gf-line bg-gf-sunk px-[13px] font-gf-mono text-[13px] whitespace-nowrap text-gf-text transition-colors hover:border-gf-2 hover:text-gf-2-text",children:[(0,t.jsx)("span",{children:eT.id}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"truncate text-[11px] text-gf-quiet",children:eT.note}
1),(0,t.jsx)(a.ChevronDown,{"aria-hidden":!0,className:(0,p.cn)("size-3 shrink-0 transition-transform",C&&"rotate-180"),strokeWidth:2.4})]}),C&&(0,t.jsx)("div",{role:"listbox","aria-labelledby":"gf-format-label",className:"absolute top-full right-0 left-0 z-40 mt-1.5 flex flex-col rounded-gf-sm border border-gf-line bg-gf-panel p-1.5 shadow-gf-lg",children:Y.map(e=>{let n=e.id===S;return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":n,onClick:()=>{var t,n;let r;return t=e.id,void(P((r=null!=(n=Y.find(e=>e.id===t))?n:Y[0]).id),R(!1),z(!1),"sample"===E&&ea(r.view),eO("playground_format_selected",{format:r.id}))},className:(0,p.cn)("flex cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-2 text-left font-gf-mono text-[12.5px] whitespace-nowrap transition-colors hover:bg-gf-sunk",n?"bg-gf-2-soft text-gf-2-text":"text-gf-text"),children:[(0,t.jsx)("span",{className:(0,p.cn)("size-[5px] shrink-0 rounded-full",n?"bg-gf-2":"bg-gf-line-2")}),e.id,(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"truncate text-[11px] text-gf-quiet",children:e.note}),n&&(0,t.jsx)(r.Check,{"aria-hidden":!0,className:"size-3 shrink-0",strokeWidth:2.6})]},e.id)})})]}),(0,t.jsxs)("button",{type:"submit",disabled:"waiting"===E,className:"mt-2.5 inline-flex h-[42px] w-full cursor-pointer items-center justify-center gap-[9px] rounded-gf-sm bg-gf-2 text-[14px] font-semibold text-gf-2-on transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",children:[(0,t.jsx)(l.Play,{"aria-hidden":!0,className:"size-3.5 fill-current",strokeWidth:0}
1),"waiting"===E?"Sending…":"Run request"]})]}),(0,t.jsxs)("div",{className:"mt-5 border-t border-gf-line pt-4",children:[(0,t.jsxs)("div",{className:"mb-2.5 flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"gf-label text-[11px]",children:"Request"}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("button",{type:"button",onClick:eW,className:"cursor-pointer py-1 font-gf-mono text-[11px] whitespace-nowrap text-gf-link hover:underline",children:L?"copied":"copy cURL"})]}),(0,t.jsx)("pre",{className:"m-0 font-gf-mono text-[12px] leading-[1.65] break-words whitespace-pre-wrap text-gf-dim",children:eD})]}),ef&&(0,t.jsx)("div",{className:"mt-3 h-[40px] overflow-hidden",children:(0,t.jsx)(o,{siteKey:ef,onSuccess:eg,onError:()=>{eg(null),ev.current=!0,ey.current&&(ey.current=!1,ej.current(!0))},onExpired:()=>eg(null),executeKey:eb})})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col border-t border-gf-line bg-gf-sunk wide:border-t-0 wide:border-l",children:[(0,t.jsxs)("div",{className:"flex min-h-11 flex-wrap items-center gap-x-2 gap-y-1 border-b border-gf-line px-3.5 py-1.5",children:[(0,t.jsx)("span",{className:(0,p.cn)("min-w-0 truncate font-gf-mono text-[11.5px]",eH.tone),children:eH.text}),(0,t.jsx)("span",{className:"flex-1"}),eC.length>1&&(0,t.jsx)("div",{className:"mr-1 flex gap-0.5 rounded-full border border-gf-line bg-gf-bg p-0.5",children:eC.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{eU(),el(1/0),"typing"===E&&I("done"),ea(e.key)},"aria-pressed":e.key===(null==eR?void 0:eR.key),className:(0,p.cn)("cursor-pointer rounded-full px-2 py-0.5 font-gf-mono text-[10.5px] transition-colors",e.key===(null==eR?void 0:eR.key)?"bg-gf-panel text-gf-text shadow-gf":"text-gf-quiet hover:text-gf-text"),children:e.key},e.key))}),(null==eR?void 0:eR.key)!=="preview"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>eo(!ei),className:"hidden cursor-pointer px-1.5 py-1 font-gf-mono text-[11px] text-gf-dim hover:text-gf-accent sm:block",children:ei?"no wrap":"wrap"}),(0,t.jsx)("button",{type:"button",onClick:()=>ed(!ec),className:"hidden cursor-pointer px-1.5 py-1 font-gf-mono text-[11px] text-gf-dim hover:text-gf-accent sm:block",children:ec?"collapse":"expand"})]}),("sample"!==E||(null==eR?void 0:eR.key)!=="preview")&&(0,t.jsx)("button",{type:"button",onClick:eG,className:"cursor-pointer px-1.5 py-1 font-gf-mono text-[11px] text-gf-accent",children:eu?"copied":"copy"})]}),(0,t.jsxs)("div",{className:(0,p.cn)("relative",ec?"h-[658px]":"min-h-[374px] flex-1"),children:["limited"===E?(0,t.jsx)("div",{className:"absolute inset-0 grid place-items-center p-6 text-center",children:(0,t.jsxs)("div",{className:"max-w-[40ch]",children:[(0,t.jsx)("div",{className:"mb-2 text-[16px] font-bold",children:"You've used the free runs"}),(0,t.jsx)("p",{className:"mb-4 text-[13.5px] leading-relaxed text-gf-dim",children:J}),(0,t.jsx)(h.Button,{href:u.LINKS.signup,arrow:!0,children:"Get 500 free credits"})]})}):(null==eR?void 0:eR.key)==="preview"?(0,t.jsx)("div",{className:"absolute inset-0 overflow-auto p-4",children:(0,t.jsx)("img",{src:"sample"===E&&null!=(x=K[null!=e_?e_:""])?x:eR.text,alt:"Screenshot of ".concat("sample"===E?e_:k),className:"w-full rounded-gf-sm border border-gf-line"})}):(0,t.jsxs)("div",{className:"absolute inset-0 overflow-auto py-3.5 pr-3.5 font-gf-mono text-[12.5px] leading-[1.65]","aria-live":"polite","aria-busy":"waiting"===E||"typing"===E,children:["waiting"===E&&(0,t.jsx)(U,{}),e$.map((e,n)=>(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"min-w-[42px] shrink-0 text-right text-gf-quiet select-none",children:n+1}),(0,t.jsxs)("pre",{className:(0,p.cn)("m-0 min-w-0 flex-1 font-[inherit] text-gf-text",ei?"break-words whitespace-pre-wrap":"whitespace-pre"),children:[eJ(e)||" ","typing"===E&&n===e$.length-1&&(0,t.jsx)("span",{"aria-hidden":!0,className:"animate-gf-caret text-gf-brand",children:"▍"})]})]},n))]}),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-9 bg-linear-to-b from-transparent to-gf-sunk"})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-3.5 rounded-b-gf border-t border-gf-line bg-gf-sunk px-5 py-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"mb-[3px] text-[14.5px] font-semibold",children:"Want every endpoint and every parameter?"}),(0,t.jsx)("div",{className:"text-[13px] text-gf-dim",children:"The Geekflare playground has every API and option, plus saved requests. Free with 500 credits a month."})]}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(h.Button,{href:u.LINKS.playground,arrow:!0,children:"Open the playground"})]})]})})})}],30581)},41658,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(40630),a=e.i(64091),s=e.i(44828),l=e.i(47163),i=e.i(90111),o=e.i(47027);let c=Math.log10(500),d=Math.log10(2e6),u=e=>
1{let t=10**(c+(d-c)*e/100),n=t<5e3?100:t<5e4?1e3:t<5e5?5e3:5e4;return Math.max(500,Math.round(t/n)*n)},p=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1});e.s(["PricingTeaser",0,function(){var e,c;let{eyebrow:d="Credits & pricing",title:h="One pool. Published prices.",lead:m="One credit balance across every API. Use it wherever you need it, and never pay for failed requests.",unit:f,ground:x="sunk"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},g=null!=(e=null==f?void 0:f.credits)?e:1,[b,w]=(0,n.useState)(()=>(e=>{let t=0;for(let n=0;n<=100;n++)Math.abs(u(n)-e)<Math.abs(u(t)-e)&&(t=n);return t})(6e4/g)),v=null!=(c=null==f?void 0:f.plural)?c:"credits",y=u(b),k=y*g,j=function(e,t){let n=r.pricingPlans.find(t=>e<=t.monthlyCredits);if(!n)return{plan:null,label:"Enterprise",note:"Above a million credits a month we size committed-use pricing and concurrency with you."};if(0===n.monthlyPrice)return{plan:n.name,label:"Free",note:"Covered by the free tier. It renews every month and needs no card."};let a=n.monthlyPrice/n.monthlyCredits*1e3,s=t?"up to ~".concat(Math.floor(n.monthlyCredits/t.credits).toLocaleString()," ").concat(t.plural," a month (").concat(p.format(n.monthlyCredits)," credits), about $").concat((a*t.credits).toFixed(2)," per 1,000 ").concat(t.plural):"this with ".concat(p.format(n.monthlyCredits)," credits a month, about $").concat(a.toFixed(2)," per 1,000 credits");return{plan:n.name,label:"".concat(n.name," · $").concat(n.monthlyPrice,"/mo"),note:"".concat(n.name," covers ").concat(s,". Or $").concat(n.yearlyPrice,"/mo billed yearly.")}}(k,f),M=r.topUpAddons[0];return(0,t.jsxs)(o.Section,{id:"pricing",ground:x,children:[(0,t.jsx)(o.SectionIntro,{eyebrow:d,title:h,lead:m,leadClassName:"max-w-[52ch]"}),(0,t.jsx)(o.Card,{className:"mb-6 p-6",children:(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)] gap-7 wide:grid-cols-[minmax(0,380px)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("label",{htmlFor:"gf-volume",className:"mb-3 block text-[13.5px] text-gf-dim",children:[v[0].toUpperCase()+v.slice(1)," per month"]}),(0,t.jsx)("input",{id:"gf-volume",type:"range",min:0,max:100,value:b,onChange:e=>w(Number(e.target.value)),"aria-valuetext":"".concat(y.toLocaleString()," ").concat(v),className:"mb-2 w-full cursor-pointer accent-gf-brand"}),(0,t.jsxs)("div",{className:"flex justify-between font-gf-mono text-[11px] text-gf-quiet",children:[(0,t.jsx)("span",{children:"500"}),(0,t.jsx)("span",{children:"2M"})]}),(0,t.jsx)("p",{className:"mt-5 text-[13.5px] leading-[1.58] text-gf-dim","aria-live":"polite",children:j.note})]}),(0,t.jsx)("div",{className:"grid min-w-0 grid-cols-2 content-start gap-4",children:[f?{label:1===g?v:"".concat(v," · ").concat(k.toLocaleString()," credits"),value:y.toLocaleString()}:{label:"Credits",value:y.toLocaleString()},{label:"Plan",value:j.label,highlight:!0}].map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"gf-label mb-[7px]",children:e.label}),(0,t.jsx)("div",{className:(0,l.cn)("text-[clamp(20px,2.4vw,28px)] leading-tight font-bold tracking-[-0.02em] tabular-nums",e.highlight&&"text-gf-2-text"),children:e.value}),e.highlight&&!j.plan&&(0,t.jsx)(i.Button,{href:"/contact/?product=api&topic=sales",size:"sm",variant:"ink",arrow:!0,className:"mt-2.5",children:"Talk to sales"})]},e.label))})]})}),(0,t.jsx)("div",{className:"grid grid-cols-[minmax(0,1fr)] gap-4 sm:grid-cols-2 wide:grid-cols-4",children:r.pricingPlans.map(e=>{let n=!!e.isHighlighted,r=e.name===j.plan;return(0,t.jsxs)(o.Card,{emphasis:r,className:"flex flex-col gap-3.5 p-[22px] transition-[border-color,box-shadow] duration-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("span",{className:"text-[16px] font-bold",children:e.name}),n?(0,t.jsx)(o.Badge,{tone:"accent",upper:!0,children:"Most popular"}):0===e.monthlyPrice?(0,t.jsx)(o.Badge,{upper:!0,className:"text-gf-quiet",children:"No card"}):null]}),(0,t.jsxs)("div",{className:"flex items-baseline gap-1",children:[(0,t.jsxs)("span",{className:"font-gf-display text-[34px] leading-none font-bold tracking-[-0.03em]",children:["$",e.monthlyPrice]}),(0,t.jsx)("span",{className:"text-[13px] text-gf-quiet",children:"/mo"})]}),f&&(0,t.jsxs)("div",{className:"rounded-gf-sm bg-gf-sunk px-3 py-2.5",children:[(0,t.jsxs)("div",{className:"font-gf-display text-[20px] leading-none font-bold tracking-[-0.02em] tabular-nums",children:["~",Math.floor(e.monthlyCredits/g).toLocaleStr
1ing()]}),(0,t.jsxs)("div",{className:"mt-1 text-[12.5px] text-gf-dim",children:[v," / month"]})]}),(0,t.jsx)("ul",{className:"flex flex-1 flex-col gap-2 text-[13.5px] text-gf-dim",children:e.features.filter(e=>!/support/i.test(e.label)).slice(0,4).map(e=>(0,t.jsx)("li",{children:e.label.replace("Monthly Credits","credits / month").replace(/\b[A-Z][a-z]+\b/g,e=>e.toLowerCase())},e.label))})]},e.name)})}),(0,t.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-x-[22px] gap-y-3.5",children:[(0,t.jsx)(i.Button,{href:s.LINKS.signup,size:"lg",arrow:!0,onClick:()=>(0,a.trackEvent)("signup_free_button_click"),children:"Start free"}),(0,t.jsx)(i.ArrowLink,{href:"/pricing/",className:"text-[14.5px]",children:"Compare plans and credit packs"}),(0,t.jsxs)("span",{className:"text-[13.5px] text-gf-dim",children:["Every account starts free. Upgrade from the dashboard when you need more, or buy a credit pack from $",M.price,"."]})]})]})}])},46549,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(72520),a=e.i(43531),s=e.i(64659),l=e.i(74886),i=e.i(99264),o=e.i(47163),c=e.i(15057),d=e.i(31343),u=e.i(83086),p=e.i(44828);let h=[{key:"cursor",name:"Cursor",logo:"https://cdn.geekflare.com/general/cursor.svg",mono:!0},{key:"claude",name:"Claude Code",logo:"https://cdn.geekflare.com/general/claude.svg",mono:!1},{key:"codex",name:"Codex",logo:"https://cdn.geekflare.com/general/codex.svg",mono:!0}],m={webscraping:"Use the Geekflare webScrape tool to get https://stripe.com as markdown, then summarize the page in 5 bullet points.",search:"Use the Geekflare search tool to find the latest news about Stripe and list the top 5 results with their links.",screenshot:"Use the Geekflare screenshot tool to capture https://stripe.com and describe what is on the page.",metascraping:"Use the Geekflare metaScrape tool on https://stripe.com and list its title, description and Open Graph tags.",url2pdf:"Use the Geekflare url2Pdf tool to convert https://stripe.com to a PDF and give me the download link.",dnsrecord:"Use the Geekflare dnsRecord tool to look up the MX and TXT records for stripe.com."};function f(e){let{id:n,text:r,copied:s,onCopy:i}=e;return(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-white/10 bg-black/30 py-2 pr-1.5 pl-2.5",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 font-gf-mono text-[11.5px] leading-[1.55] break-all whitespace-pre-wrap text-[#e8e4e1]",children:r}),(0,t.jsx)("button",{type:"button",onClick:()=>i(n,r),"aria-label":"Copy",className:"grid size-6 shrink-0 cursor-pointer place-items-center rounded text-white/55 hover:bg-white/8 hover:text-white",children:s===n?(0,t.jsx)(a.Check,{className:"size-3.5 text-[#ffb094]",strokeWidth:2.4}):(0,t.jsx)(l.Copy,{className:"size-3.5",strokeWidth:2})})]})}function x(e){let{n,title:r,children:a}=e;return(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-full bg-gf-brand/20 font-gf-mono text-[10.5px] text-[#ffb094]",children:n}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"mb-2 text-[12.5px] font-semibold text-[#f2efed]",children:r}),a]})]})}function g(e){var r;let{apiId:a}=e,[l,i]=(0,n.useState)(!1),[g,b]=(0,n.useState)("cursor"),[w,v]=(0,n.use
1State)(""),{copied:y,copy:k}=function(){let[e,t]=(0,n.useState)(null);return{copied:e,copy:async(e,n)=>{try{await navigator.clipboard.writeText(n),t(e),setTimeout(()=>t(t=>t===e?null:t),1400)}catch(e){}}}}(),j=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!l)return;let e=e=>j.current&&!j.current.contains(e.target)&&i(!1),t=e=>"Escape"===e.key&&i(!1);return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[l]);let M=w.trim().replace(/[^A-Za-z0-9_-]/g,"")||"YOUR_API_KEY",N="https://mcp.geekflare.com/".concat(M,"/mcp"),S=null!=(r=m[a])?r:m.webscraping,P="cursor://anysphere.cursor-deeplink/mcp/install?name=geekflare&config=".concat(encodeURIComponent(btoa(JSON.stringify({url:N})))),C="https://cursor.com/link/prompt?text=".concat(encodeURIComponent(S)),R="claude mcp add --transport http geekflare ".concat(N);return(0,t.jsxs)("div",{ref:j,className:"relative",children:[(0,t.jsxs)("button",{type:"button","aria-expanded":l,onClick:()=>i(!l),className:"inline-flex h-[30px] cursor-pointer items-center gap-2 rounded-gf-sm border border-white/16 bg-white/6 px-[11px] font-gf-mono text-[11.5px] whitespace-nowrap text-[#f2efed] transition-colors hover:border-white/34",children:[(0,t.jsx)(u.Sparkles,{"aria-hidden":!0,className:"size-3",strokeWidth:2.2}),"Use with AI agent",(0,t.jsx)(s.ChevronDown,{"aria-hidden":!0,className:(0,o.cn)("size-[11px] transition-transform",l&&"rotate-180"),strokeWidth:2.4})]}),l&&(0,t.jsxs)("div",{className:"absolute top-full left-0 z-40 mt-2 w-[min(400px,calc(100vw-4.5rem))] sm:right-0 sm:left-auto rounded-gf-sm border border-white/14 bg-[#1c1a19] p-3.5 text-left shadow-[0_24px_48px_-20px_rgba(0,0,0,0.8)]",children:[(0,t.jsx)("div",{className:"mb-3.5 flex gap-1 rounded-full border border-white/10 bg-black/25 p-[3px]",role:"tablist","aria-label":"AI agent",children:h.map(e=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":g===e.key,onClick:()=>b(e.key),className:(0,o.cn)("flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-full px-2 py-1.5 text-[12px] font-medium transition-colors",g===e.key?"bg-white/10 text-white":"text-white/55 hover:text-white/85"),children:[(0,t.jsx)("img",{src:e.logo,alt:"",width:13,height:13,className:(0,o.cn)("size-[13px] object-contain",e.mono&&"invert")}),e.name]},e.key))}),(0,t.jsxs)("label",{className:"mb-3.5 block",children:[(0,t.jsxs)("span",{className:"mb-1.5 flex items-center justify-between text-[11.5px] text-white/55",children:["Your API key ",(0,t.jsx)("span",{className:"text-white/35",children:"fills in the commands, stays on this page"})]}),(0,t.jsx)("input",{value:w,onChange:e=>v(e.target.value),placeholder:"YOUR_API_KEY",spellCheck:!1,autoComplete:"off",className:"h-8 w-full rounded-md border border-white/12 bg-black/30 px-2.5 font-gf-mono text-[12px] text-[#f2efed] outline-none placeholder:text-white/30 focus:border-gf-brand/60"}),(0,t.jsxs)("a",{href:p.LINKS.signup,target:"_blank",rel:"noopener noreferrer",className:"mt-1.5 inline-flex items-center gap-1 text-[11.5px] text-[#ff8258] hover:text-[#ffb094]",children:["No key yet? Get one free ",(0,t.jsx)(c.ArrowUpRight,{className:"size-3"})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 border-t border-white/9 pt-3.5",children:[(0,t.jsxs)(x,{n:1,title:"Connect Geekflare MCP (once)",children:["cursor"===g&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,t.jsx)("a",{href:P,className:"inline-flex h-8 items-center gap-2 rounded-md bg-gf-brand px-3 text-[12.5px] font-semibold text-white hover:bg-gf-brand-hover hover:text-white",children:"Add to Cursor"}),(0,t.jsx)("button",{type:"button",onClick:()=>k("cursor-json",JSON.stringify({mcpServers:{geekflare:{url:N}}},null,2)),className:"cursor-pointer text-[11.5px] text-white/55 hover:text-white",children:"cursor-json"===y?"config copied":"or copy config for Settings → MCP"})]}),"claude"===g&&(0,t.jsx)(f,{id:"claude-add",text:R,copied:y,onCopy:k}
1),"codex"===g&&(0,t.jsx)(f,{id:"codex-add",text:"codex mcp add geekflare --env API_KEY=".concat(M," -- npx -y @geekflare/mcp"),copied:y,onCopy:k}),"cursor"!==g&&(0,t.jsx)("p",{className:"mt-1.5 text-[11px] text-white/40",children:"Run in your terminal, then start a new session."})]}),(0,t.jsx)(x,{n:2,title:"Ask for it",children:"cursor"===g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f,{id:"cursor-task",text:S,copied:y,onCopy:k}),(0,t.jsxs)("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-flex items-center gap-1 text-[11.5px] text-[#ff8258] hover:text-[#ffb094]",children:["Open this prompt in Cursor ",(0,t.jsx)(c.ArrowUpRight,{className:"size-3"})]})]}):(0,t.jsx)(f,{id:"".concat(g,"-task"),text:"".concat("claude"===g?"claude":"codex"," ").concat('"'.concat(S.replace(/(["\\$`])/g,"\\$1"),'"')),copied:y,onCopy:k})})]}),(0,t.jsxs)("div",{className:"mt-3.5 flex items-center gap-3 border-t border-white/9 pt-3 text-[11.5px]",children:[(0,t.jsxs)("a",{href:"https://docs.geekflare.com/mcp/overview",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-white/55 hover:text-white",children:["MCP setup guides ",(0,t.jsx)(c.ArrowUpRight,{className:"size-3"})]}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("a",{href:p.LINKS.playground,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-white/55 hover:text-white",children:[(0,t.jsx)(d.Play,{className:"size-3",strokeWidth:2.2}),"Or try in Playground"]})]})]})]})}let b=[{key:"Python",label:"Python",file:"quickstart.py",icon:"python.svg",hl:"python",sdk:!0},{key:"NodeJS",label:"Node",file:"quickstart.mjs",icon:"nodejs.svg",hl:"javascript",sdk:!0},{key:"Go",label:"Go",file:"main.go",icon:"go.svg",hl:"go",sdk:!1},{key:"PHP",label:"PHP",file:"quickstart.php",icon:"php.svg",hl:"php",sdk:!1},{key:"Java",label:"Java",file:"Quickstart.java",icon:"java.svg",hl:"java",sdk:!1},{key:"Ruby",label:"Ruby",file:"quickstart.rb",icon:"ruby.svg",hl:"ruby",sdk:!1},{key:"cURL",label:"cURL",file:"terminal",icon:"curl.svg",hl:"bash",sdk:!1}];var w=e.i(47027);let v="inline-flex h-[30px] cursor-pointer items-center gap-2 rounded-gf-sm border border-white/16 bg-white/6 px-[11px] font-gf-mono text-[11.5px] whitespace-nowrap text-[#f2efed] transition-colors hover:border-white/34";e.s(["QuickstartPanel",0,function(e){var c;let d,{snippets:u,endpoints:p,title:h="Make your first request in a few lines.",ground:m="sunk"}=e,[f,x]=(0,n.useState)("Python"),[y,k]=(0,n.useState)(p[0].id),[j,M]=(0,n.useState)(!1),[N,S]=(0,n.useState)(!1),P=(c=()=>M(!1),d=(0,n.useRef)(null),(0,n.useEffect)(()=>{if(!j)return;let e=e=>d.current&&!d.current.contains(e.target)&&c(),t=e=>"Escape"===e.key&&c();return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[j,c]),d),C=b.find(e=>e.key===f),R=p.find(e=>e.id===y),{code:L,html:z}=u[y][f],E=(0,i.getApiDocsUrl)(y),I=async()=>{try{await navigator.clipboard.writeText(L),S(!0),setTimeout(()=>S(!1),1400)}catch(e){}};return(0,t.jsx)("section",{id:"start",className:(0,o.cn)("scroll-mt-20 border-t border-gf-line","sunk"===m?"bg-gf-sunk":"bg-gf-bg"),children:(0,t.jsxs)(w.Container,{className:"py-16 md:py-[84px]",children:[(0,t.jsx)("div",{className:"gf-eyebrow mb-3.5",children:"Quickstart"}),(0,t.jsx)("h2",{className:"gf-h2 mb-[30px] max-w-[20ch]",children:h}),(0,t.jsxs)("div",{className:"rounded-gf border border-white/10 bg-gf-ink shadow-gf-lg",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3.5 rounded-t-gf border-b border-white/9 px-4 py-[13px]",children:[(0,t.jsx)("div",{className:"flex flex-wrap gap-[5px]",role:"tablist","aria-label":"Language",children:b.map(e=>{let n=e.key===f;return(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":n,onClick:()=>{x(e.key),S(!1)},className:(0,o.cn)("inline-flex cursor-pointer items-center gap-[7px] rounded-full border py-1.5 pr-3 pl-[9px] font-gf-mono text-[12.5px] whitespace-nowrap transition-colors",n?"border-gf-brand/55 bg-gf-brand/16 text-[#ffb094]":"border-white/12 text-white/60 hover:text-white/85"),children:[(0,t.jsx)("img",{src:"https://cdn.geekflare.com/api-assets/".concat(e.icon),alt:"",width:15,height:15,className:(0,o.cn)("size-[15px] object-contain",!n&&"opacity-50")}),e.label]},e.key)})}),(0,t.jsx)("span",{className:"flex-1"}),p.length>1&&(0,t.jsxs)("div",{ref:P,className:"relative flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-gf-mono text-[11px] whitespace-nowrap text-white/45",children:"endpoint"}),(0,t.jsxs)("button",{type:"button","aria-expanded":j,onClick:()=>M(!j),className:(0,o.cn)(v,"h-8 text-[12px]"),children:[R.label,(0,t.jsx)(s.ChevronDown,{"aria-hidden":!0,
1className:"size-[11px]",strokeWidth:2.4})]}),j&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-40 mt-2 flex min-w-[220px] flex-col rounded-gf-sm border border-white/14 bg-[#1c1a19] p-1.5 shadow-[0_24px_48px_-20px_rgba(0,0,0,0.8)]",children:p.map(e=>{let n=e.id===y;return(0,t.jsxs)("button",{type:"button",onClick:()=>{k(e.id),M(!1),S(!1)},className:(0,o.cn)("flex cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-2 text-left font-gf-mono text-[12px] whitespace-nowrap hover:bg-white/7",n?"bg-gf-brand/14 text-[#ffb094]":"text-[#e8e4e1]"),children:[(0,t.jsx)("span",{className:(0,o.cn)("size-[5px] shrink-0 rounded-full",n?"bg-gf-brand":"bg-white/22")}),e.label]},e.id)})})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5 border-b border-white/6 px-4 py-[11px]",children:[(0,t.jsx)("span",{className:"font-gf-mono text-[11.5px] text-white/52",children:C.file}),(0,t.jsx)("span",{className:"rounded-full border border-white/12 px-2 py-px font-gf-mono text-[10px] text-white/45",children:C.sdk?"official SDK":"plain REST"}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(g,{apiId:y}),(0,t.jsxs)("button",{type:"button",onClick:I,className:(0,o.cn)(v,"bg-transparent"),children:[N?(0,t.jsx)(a.Check,{"aria-hidden":!0,className:"size-3",strokeWidth:2.4}):(0,t.jsx)(l.Copy,{"aria-hidden":!0,className:"size-3",strokeWidth:2}),N?"copied":"copy"]})]}),(0,t.jsx)("pre",{className:"gf-code m-0 overflow-auto px-[18px] pt-5 pb-[22px] font-gf-mono text-[13px] leading-[1.72] text-[#e8e4e1]",children:(0,t.jsx)("code",{dangerouslySetInnerHTML:{__html:z}})}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-x-[18px] gap-y-2.5 rounded-b-gf border-t border-white/9 bg-white/[0.025] px-4 py-[13px]",children:(0,t.jsxs)("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2 text-[13.5px] font-semibold whitespace-nowrap text-[#ff8258] hover:text-[#ffb094]",children:[R.label," Reference",(0,t.jsx)(r.ArrowRight,{"aria-hidden":!0,className:"size-3.5 transition-transform group-hover:translate-x-0.5",strokeWidth:2.2})]})})]})]})})}],46549)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.