1import{D as j,$ as r,a0 as T,a1 as H,a2 as B,a3 as I,a4 as M,a5 as $,a6 as D,a7 as A,a8 as P,r as _,k as l,l as c,L as s,q as e,v as h,C as u,K as w,F as S,B as V,c as d,j as E,u as N}from"./Cp7topWd.js";import{u as q}from"./C7aHm8Z3.js";import{a as z}from"./XQJ0_uWl.js";const F={class:"rounded-xl overflow-hidden border border-gray-200 shadow-sm"},J={key:0,class:"flex items-center bg-[#1e2d3d] border-b border-white/10 px-3 py-2"},O={class:"flex items-center gap-1.5 text-[12px] font-semibold text-slate-300"},W=["innerHTML"],G={class:"ml-auto flex items-center gap-1"},K={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},U={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2.5"},Q={key:1,class:"flex items-center bg-[#1e2d3d] border-b border-white/10 px-1 overflow-x-auto scrollbar-hide"},R=["onClick"],X=["innerHTML"],Y={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Z={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2.5"},ee={class:"code-bg overflow-x-auto"},te={class:"p-5 text-[12.5px] leading-[1.75] font-mono m-0 whitespace-pre"},se=["innerHTML"],oe={__name:"CodeTabs",props:{tabs:{type:Array,required:!0}},setup(t){r.registerLanguage("python",T),r.registerLanguage("bash",H),r.registerLanguage("go",B),r.registerLanguage("java",I),r.registerLanguage("javascript",M),r.registerLanguage("php",$),r.registerLanguage("ruby",D),r.registerLanguage("json",A),r.registerLanguage("xml",P);const n={python:"python",curl:"bash",go:"go",java:"java",nodejs:"javascript",php:"php",ruby:"ruby",json:"json",raw:"xml"},o=t,v=d(()=>o.tabs.some(i=>i.id==="python")),{lang:k}=q(),x=_(o.tabs[0]?.id??""),y=d(()=>v.value?k.value:x.value),m=d(()=>o.tabs.find(i=>i.id===y.value)??o.tabs[0]),b=d(()=>m.value?.code??""),L=d(()=>{const i=b.value,a=n[y.value]||"plaintext";try{return r.highlight(i,{language:a}).value}catch{return C(i)}});function C(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}const p=_(!1);async function f(){try{await navigator.clipboard.writeText(b.value),p.value=!0,setTimeout(()=>p.value=!1,2e3)}catch{}}return(i,a)=>(l(),c("div",F,[s(v)?(l(),c("div",J,[e("span",O,[e("span",{class:"w-[13px] h-[13px] flex items-center justify-center opacity-70",innerHTML:s(m)?.icon},null,8,W),h(" "+u(s(m)?.label),1)]),e("div",G,[e("button",{onClick:f,class:w(["flex items-center gap-1 text-[11px] font-medium transition-colors py-1 px-2 rounded",s(p)?"text-green-400":"text-slate-400 hover:text-slate-200 hover:bg-white/5"])},[s(p)?(l(),c("svg",U,[...a[1]||(a[1]=[e("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(l(),c("svg",K,[...a[0]||(a[0]=[e("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),h(" "+u(s(p)?"Copied!":"Copy"),1)],2)])])):(l(),c("div",Q,[(l(!0),c(S,null,V(t.tabs,g=>(l(),c("button",{key:g.id,onClick:ae=>x.value=g.id,class:w(["flex items-center gap-1.5 px-3 py-2.5 text-[12px] font-semibold transition-all whitespace-nowrap border-b-2 -mb-px",s(x)===g.id?"text-white border-brand":"text-slate-400 border-transparent hover:text-slate-200 hover:border-slate-500"])},[e("span",{class:"w-[13px] h-[13px] flex-shrink-0 flex items-center justify-center",innerHTML:g.icon},null,8,X),h(" "+u(g.label),1)],10,R))),128)),e("button",{onClick:f,class:w(["ml-auto flex items-center gap-1 text-[11px] font-medium transition-colors py-2.5 px-3 whitespace-nowrap flex-shrink-0 rounded mx-1",s(p)?"text-green-400":"text-slate-400 hover:text-slate-200 hover:bg-white/5"])},[s(p)?(l(),c("svg",Z,[...a[3]||(a[3]=[e("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):(l(),c("svg",Y,[...a[2]||(a[2]=[e("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},null,-1),e("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},null,-1)])])),h(" "+u(s(p)?"Copied!":"Copy"),1)],2)])),e("div",ee,[e("pre",te,[e("code",{innerHTML:s(L)},null,8,se)])])]))}},le=j(oe,[["__scopeId","data-v-8f6e8abf"]]);function ce(t){const n="https://www.sparkproxy.io",o=`${n}${t.path}`;E({link:[{rel:"canonical",href:o}]}),N({ogTitle:t.title,ogDescription:t.description,ogType:"article",ogUrl:o,ogImage:`${n}
1/sparkproxy-og.jpg`,ogImageWidth:"1200",ogImageHeight:"630",twitterCard:"summary_large_image",twitterTitle:t.title,twitterDescription:t.description,twitterImage:`${n}/sparkproxy-og.jpg`}),z([{"@context":"https://schema.org","@type":"TechArticle",headline:t.title,description:t.description,url:o,inLanguage:"en",isPartOf:{"@id":`${n}/#website`},publisher:{"@id":`${n}/#organization`},mainEntityOfPage:{"@type":"WebPage","@id":o}},{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:`${n}/`},{"@type":"ListItem",position:2,name:"API Docs",item:`${n}/docs/scraping-api/`},{"@type":"ListItem",position:3,name:t.crumb,item:o}]}])}export{le as _,ce as u};
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.