1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3927],{3774:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>A,default:()=>M});var r=s(37876),a=s(14232),n=s(89099),l=s(77328),i=s.n(l),o=s(96851),c=s(93131),d=s(90606),m=s(61606),x=s(35088),u=s(39593),g=s(36503);let h=e=>{let{gameName:t,setFieldValue:s}=e,n="My ".concat(t," Server"),[l,i]=(0,a.useState)(n),c=(0,o.c3)("order");return(0,a.useEffect)(()=>{s("name",n)},[s,n]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-orange-500/20 rounded-lg flex items-center justify-center",children:(0,r.jsx)(g.A,{className:"w-5 h-5 text-orange-500"})}),(0,r.jsx)("h3",{className:"text-lg font-bold text-white",children:c("nameYourServer")})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{htmlFor:"server-name",className:"sr-only",children:c("nameYourServer")}),(0,r.jsx)(u.D0,{id:"server-name",name:"name",className:"w-full h-12 py-3 pl-4 pr-16 bg-gray-800/50 border border-gray-600 rounded-lg text-white font-medium transition-all duration-200 focus:border-red-500 focus:ring-2 focus:ring-red-500/20 focus:outline-none",type:"text",value:l,onChange:e=>{i(e.target.value),s("name",e.target.value)},maxLength:60,placeholder:"Enter a unique server name...","aria-describedby":"server-name-error"}),(0,r.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,r.jsxs)("span",{className:"text-xs ".concat(l.length>50?"text-yellow-500":"text-gray-500"),children:[l.length,"/60"]})})]}),(0,r.jsx)("div",{id:"server-name-error",className:"text-sm text-red-500",role:"alert",children:(0,r.jsx)(u.Kw,{name:"name"})})]})]})};var p=s(77743),y=s(91408),j=s(91040),v=s(80080),f=s(47896),b=s(38377),N=s(94348),_=s(67914),w=s(84449),S=s(63894),k=s(97471),q=s(24420),C=s(7446),L=s(96157),P=s(78572);let V=e=>{var t;let{server:s,values:a,locations:n,isSubmitting:l,pricingPerUnit:i,currency:o,currencyFormat:c,params:d,t:m,tVoice:x}=e,u=n.find(e=>e.id===a.location),g=a.billingCycle,h=(null==i||null==(t=i.slots)?void 0:t.monthly)||0,p=(0,q.VI)(g),y=h*a.slots*p,j=(0,q.LL)(g),v=(null==d?void 0:d.discount_percent)||0,f="monthly"===g?v:j,b=h*(1-f/100);return(0,r.jsxs)("div",{className:"bg-dark-secondary rounded-xl border border-gray-700 p-6",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-white font-oxanium mb-6",children:m("orderSummary")}),(0,r.jsxs)("div",{className:"space-y-4 mb-6",children:[s.image_url&&(0,r.jsx)("div",{className:"flex justify-center mb-4",children:(0,r.jsx)("img",{src:s.image_url,width:120,height:120,alt:s.name,className:"opacity-70"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-lg font-bold text-white mb-2",children:s.name}),(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:s.description})]}),(0,r.jsxs)("div",{className:"border-t border-gray-700 pt-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,r.jsxs)("span",{className:"text-gray-400",children:[m("serverName"),":"]}),(0,r.jsx)("span",{className:"text-white truncate max-w-[150px]",children:a.name})]}),(0,r.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,r.jsxs)("span",{className:"text-gray-400",children:[x("slots"),":"]}),(0,r.jsxs)("span",{className:"text-white",children:[a.slots," ",x("users")]})]}),(0,r.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,r.jsxs)("span",{className:"text-gray-400",children:[m("location"),":"]}),(0,r.jsx)("span",{className:"text-white flex items-center gap-2",children:u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S.A,{code:(0,k.q)(u.country)||u.code,size:20}),u.city]})})]}),(0,r.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,r.jsxs)("span",{className:"text-gray-400",children:[m("billingCycle"),":"]}),(0,r.jsx)("span",{className:"text-white",children:m(g)})]})]})]}),(0,r.jsx)("div",{className:"border-t border-gray-700 pt-4 mb-6",children:(0,r.jsxs)("div",{className:"flex justify-between items-end",children:[(0,r.jsxs)("span",{className:"text-gray-400",children:[m("totalPrice"),":"]}),(0,r.jsxs)("div",{className:"text-right",children:[(0,r.jsx)("div",{className:"text-3xl font-bold text-white font-oxanium",children:c(y*(1-f/100))}),(0,r.jsx)("div",{className:"text-sm text-gray-400",children:"monthly"===g?"/month":"quarterly"===g?"/3 months":"semi_annually"===g?"/6 months":"annually"===g?"/year":""}),b>0&&(0,r.jsxs)("div",{className:"text-xs text-gray-500 mt-1",children:[c(b)," per slot/month"]})]})]})}),(0,r.jsxs)("button",{type:"submit",disabled:l,className:"w-full bg-gradient-to-r from-red-600 to-red-500 hover:from-red-700 hover:to-red-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold py-3 rounded-lg transition-all duration-300 font-oxanium uppercase flex items-center justify-center",children:[l?(0,r.jsx)(C.A,{className:"animate-mr-2 animate-spin"}):(0,r.jsx)(L.A,{className:"mr-2"}),m(l?"processing":"continueToCheckout")]}),(0,r.jsxs)("div",{className:"mt-4 p-4 bg-blue-500/10 border border-blue-500/20 rounded-lg",children:[(0,r.jsx)(P.A,{className:"text-blue-500 mr-2"}),(0,r.jsx)("span",{className:"text-sm text-gray-300",children:m("instantSetupInfo")})]})]})};var A=!0;let M=()=>{var e,t;let s=(0,n.useRouter)(),{slug:l}=s.query,g=(0,o.c3)("order"),S=(0,o.c3)("voiceServers"),{currency:k,format:C}=(0,f.H)(),{startCheckout:L}=(0,b.Q)(),[P,A]=(0,a.useState)(null),[M,E]=(0,a.useState)(!0),[F,I]=(0,a.useState)([]),[R,T]=(0,a.useState)(),{data:O}=(0,_.I)({queryKey:["global_params"],queryFn:N.tI});(0,a.useEffect)(()=>{l&&(async()=>
1{try{let e=(await j.A.get((0,v.e9)("/voice-servers/".concat(l)))).data;if(!e)return void s.push("/voiceservers");A(e);let t=await (0,N.Vs)();I(t),t.length>0&&T(t[0]),E(!1)}catch(e){console.error("Error fetching data:",e),s.push("/voiceservers")}})()},[l,s]);let Y=(0,y.Ik)().shape({name:(0,y.Yj)().required(g("serverNameRequired")).min(3,g("serverNameMinLength")).max(60,g("serverNameMaxLength")),slots:(0,y.ai)().required(g("slotsRequired")).min((null==P?void 0:P.min_slots)||1,g("slotsMinimum",{min:(null==P?void 0:P.min_slots)||1})).max((null==P?void 0:P.max_slots)||1e3,g("slotsMaximum",{max:(null==P?void 0:P.max_slots)||1e3})),location:(0,y.ai)().required(g("locationRequired")),billingCycle:(0,y.Yj)().required(g("billingCycleRequired"))}),z="string"==typeof s.query.slots?parseInt(s.query.slots,10):NaN,D=!isNaN(z)&&P?Math.max(P.min_slots,Math.min(P.max_slots,z)):(null==P?void 0:P.min_slots)||25,U={name:"My ".concat((null==P?void 0:P.name)||"Voice"," Server"),slots:D,location:(null==R?void 0:R.id)||(null==(e=F[0])?void 0:e.id)||0,billingCycle:"monthly"};if(M||!P)return(0,r.jsx)("div",{className:"min-h-screen bg-dark-primary flex items-center justify-center",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-red-500"})});let B=null!=(t=(()=>{if(!P||!P.starting_price||P.min_slots<=0)return null;let e=k.code.toLowerCase(),t=P.starting_price[e]||P.starting_price.eur;return{slots:{monthly:t,quarterly:t,semi_annually:t,annually:t},cpu:{monthly:0,quarterly:0,semi_annually:0,annually:0},ram:{monthly:0,quarterly:0,semi_annually:0,annually:0},disk:{monthly:0,quarterly:0,semi_annually:0,annually:0}}})())?t:{slots:{monthly:0,quarterly:0,semi_annually:0,annually:0},cpu:{monthly:0,quarterly:0,semi_annually:0,annually:0},ram:{monthly:0,quarterly:0,semi_annually:0,annually:0},disk:{monthly:0,quarterly:0,semi_annually:0,annually:0}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{title:"Order ".concat(P.name," Server"),description:"Configure and order your ".concat(P.name," voice server with instant setup and DDoS protection.")}),(0,r.jsx)(w.q,{children:(0,r.jsx)(u.l1,{onSubmit:(e,t)=>{var s,r;let{setSubmitting:a}=t;if(!P||!O)return void a(!1);let n=F.find(t=>t.id===e.location);if(!n)return void a(!1);let l={};if("mumble"===P.slug)l["500263"]=String(n.config_option);else if("teamspeak3"===P.slug){let t={1:502343,2:502340,3:502307,4:502334,5:502325,6:502298,7:502301,8:502319,9:502310,10:502331,11:502322,12:502337,13:502328,14:502346,15:502313,16:502316,17:502340,18:502340,19:502340,20:502355,21:502340},s=t[e.location]||t[2];l["500372"]=String(s)}else O.location_config_option&&(l[String(O.location_config_option)]=String(n.config_option));l["teamspeak3"===P.slug?"500532":"mumble"===P.slug?"500531":String(P.config_id)]=String(e.slots);let i=k.code.toLowerCase(),o=((null==(s=P.starting_price)?void 0:s[i])||(null==(r=P.starting_price)?void 0:r.eur)||0)*e.slots,c=e.billingCycle,d=o*(0,q.VI)(c),m=(0,q.LL)(c),x="monthly"===c&&O.discount_percent||0,u=d*(1-("monthly"===c?x:m)/100),g="monthly"===c&&O.discount_code||void 0;L({productId:{teamspeak3:500416,mumble:500294}[P.slug]||P.config_id,billingCycle:e.billingCycle,serverName:e.name,configOptions:l,promoCode:g,gameSlug:P.slug,gameName:P.name,locationName:"".concat(n.city,", ").concat(n.country),price:u,originalPrice:d>u?d:void 0,referrer:"configuration",configurationParams:{billingCycle:e.billingCycle,name:e.name,location:String(e.location),slots:String(e.slots)},currencyCode:k.code,discountPercent:g?x:0,pricingSource:"voice-package",voiceSlots:e.slots,voiceStartingPrice:P.starting_price?{eur:P.starting_price.eur,usd:P.starting_price.usd,gbp:P.starting_price.gbp,sek:P.starting_price.sek}:void 0},g,g?x:0),a(!1)},initialValues:U,validationSchema:Y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,values:a,setFieldValue:n}=e;return(0,r.jsx)(u.lV,{children:(0,r.jsxs)("div",{className:"xl:grid xl:grid-cols-7 xl:gap-6 container mx-auto pt-24 md:pt-32 relative",children:[(0,r.jsxs)("div",{className:"xl:col-span-5 text-white px-4 md:px-10",children:[(0,r.jsx)(i(),{children:(0,r.jsxs)("title",{children:[g("configureYour")," ",P.name," ",g("voiceServer")]})}),(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>s.push("/voiceservers"),className:"group flex items-center gap-2 text-gray-400 hover:text-white transition-all duration-200 mb-8",children:[(0,r.jsx)("svg",{className:"w-5 h-5 transform group-hover:-translate-x-1 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),(0,r.jsx)("span",{className:"font-manrope",children:g("backToVoiceServers")})]}),(0,r.jsx)("div",{className:"bg-gradient-to-r from-dark-secondary to-transparent roun
1ded-xl p-6 md:p-8 mb-8",children:(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-8 items-start",children:[P.image_url&&(0,r.jsx)("div",{className:"w-full lg:w-48 flex-shrink-0",children:(0,r.jsx)("img",{src:P.image_url,alt:P.name,className:"rounded-xl shadow-2xl object-cover w-full h-32 lg:h-48"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold font-oxanium bg-gradient-to-r from-white to-gray-300 bg-clip-text text-transparent mb-4",children:P.name}),(0,r.jsxs)("p",{className:"text-xl text-gray-300 font-manrope",children:[g("configureYour")," ",S("voiceServer")]})]})]})}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"bg-dark-secondary rounded-xl p-6 md:p-8 border border-gray-800",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-10 h-10 bg-red-500/20 rounded-lg border border-red-500/30",children:(0,r.jsx)("span",{className:"text-red-500 font-bold",children:"1"})}),(0,r.jsx)("h2",{className:"text-xl font-bold text-white",children:g("chooseLocation")})]}),(0,r.jsx)(m.A,{locations:F,locationValue:a.location,setFieldValue:n,priceType:"performance"})]}),(0,r.jsx)("div",{className:"bg-dark-secondary rounded-xl p-6 md:p-8 border border-gray-800",children:(0,r.jsx)(h,{gameName:P.name,setFieldValue:n})}),(0,r.jsxs)("div",{className:"bg-dark-secondary rounded-xl p-6 md:p-8 border border-gray-800",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-10 h-10 bg-red-500/20 rounded-lg border border-red-500/30",children:(0,r.jsx)("span",{className:"text-red-500 font-bold",children:"3"})}),(0,r.jsx)("h2",{className:"text-xl font-bold text-white",children:S("configureSlots")})]}),(0,r.jsx)(p.hC,{slotValue:a.slots,setFieldValue:n,slotsMin:P.min_slots,slotsMax:P.max_slots,quickSelectValues:"teamspeak3"===P.slug?[10,25,64,250,512]:"mumble"===P.slug?[10,25,64,100,300]:[10,25,50,100]})]}),(0,r.jsxs)("div",{className:"bg-dark-secondary rounded-xl p-6 md:p-8 border border-gray-800",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-10 h-10 bg-red-500/20 rounded-lg border border-red-500/30",children:(0,r.jsx)("span",{className:"text-red-500 font-bold",children:"4"})}),(0,r.jsx)("h2",{className:"text-xl font-bold text-white",children:g("billingCycle")})]}),(0,r.jsx)(x.A,{game:{name:P.name,slots_min:P.min_slots},values:a,setFieldValue:n,pricingPerUnit:B,params:O})]})]})]})]}),(0,r.jsx)("div",{className:"xl:col-span-2 order-1 xl:order-2 px-5 xl:px-0",children:(0,r.jsx)("div",{className:"xl:sticky xl:top-24 z-10 mb-8 xl:mb-0",children:(0,r.jsx)(V,{server:P,values:a,locations:F,isSubmitting:t,pricingPerUnit:B,currency:k,currencyFormat:C,params:O,t:g,tVoice:S})})})]})})}})}),(0,r.jsx)(c.A,{})]})}},8945:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/voiceservers/[slug]/order",function(){return s(3774)}])},90606:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(37876),a=s(77328),n=s.n(a),l=s(89099),i=s(65364);let o=e=>{let{title:t,description:s,keywords:a,ogImage:o="https://fragnet.net/images/og-default.jpg",ogType:c="website",twitterCard:d="summary_large_image",noindex:m=!1,canonicalUrl:x,jsonLd:u}=e,{locale:g,locales:h,defaultLocale:p,asPath:y}=(0,l.useRouter)(),j=i.env.NEXT_PUBLIC_BASE_URL||"https://fragnet.net",v="".concat(j).concat(y),f=x||v,b=(null==h?void 0:h.map(e=>({locale:e,url:"".concat(j).concat(e===p?"":"/".concat(e)).concat(y)})))||[];return(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:t}),(0,r.jsx)("meta",{name:"description",content:s}),a&&(0,r.jsx)("meta",{name:"keywords",content:a}),(0,r.jsx)("meta",{name:"robots",content:m?"noindex, nofollow":"index, follow"}),(0,r.jsx)("link",{rel:"canonical",href:f}),b.map(e=>{let{locale:t,url:s}=e;return(0,r.jsx)("link",{rel:"alternate",hrefLang:t,href:s},t)}),(0,r.jsx)("link",{rel:"alternate",hrefLang:"x-default",href:"".concat(j).concat(y)}),(0,r.jsx)("meta",{property:"og:type",content:c}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{property:"og:description",content:s}),(0,r.jsx)("meta",{property:"og:url",content:v}),(0,r.jsx)("meta",{property:"og:site_name",content:"Fragnet"}),(0,r.jsx)("meta",{property:"og:image",content:o}
1),(0,r.jsx)("meta",{property:"og:image:width",content:"1200"}),(0,r.jsx)("meta",{property:"og:image:height",content:"630"}),(0,r.jsx)("meta",{property:"og:locale",content:null==g?void 0:g.replace("-","_")}),null==h?void 0:h.filter(e=>e!==g).map(e=>(0,r.jsx)("meta",{property:"og:locale:alternate",content:e.replace("-","_")},e)),(0,r.jsx)("meta",{name:"twitter:card",content:d}),(0,r.jsx)("meta",{name:"twitter:site",content:"@fragnet"}),(0,r.jsx)("meta",{name:"twitter:title",content:t}),(0,r.jsx)("meta",{name:"twitter:description",content:s}),(0,r.jsx)("meta",{name:"twitter:image",content:o}),u&&(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(u).replace(/</g,"\\u003c")}}),(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:"Fragnet",url:j,logo:"".concat(j,"/images/logo.png"),sameAs:["https://twitter.com/fragnet","https://www.facebook.com/fragnet","https://www.linkedin.com/company/fragnet"],contactPoint:{"@type":"ContactPoint",telephone:"+1-support-number",contactType:"customer support",availableLanguage:["English","Swedish","Spanish","Russian","Dutch","Polish","German","French","Portuguese"],areaServed:"Worldwide"}}).replace(/</g,"\\u003c")}})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[2710,9176,4630,3131,4589,636,6593,8792],()=>t(8945)),_N_E=e.O()}]);
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.