<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7675],{47675:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=&gt;{__webpack_require__.d(__webpack_exports__,{A:()=&gt;QuoteForm});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74848),semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(68628),semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(76068),semantic_ui_react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(12982),semantic_ui_react__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(53604),semantic_ui_react__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(81458),semantic_ui_react__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(40916),semantic_ui_react__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(64333),_lib_dcdefinitions_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(31800),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(96540),_components_quote_formtarget_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(68398),next_router__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(86715),next_router__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_4__);function QuoteForm(props){let serviceFilter,serviceheads,serviceheadfilter,serviceCode,serviceName,serviceIcon;let headline=props.headline||"Ticket",origin=props.origin||null,pipeline=props.pipeline||"marketplace",router=(0,next_router__WEBPACK_IMPORTED_MODULE_4__.useRouter)(),[activeModal,setActiveModal]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),[service,setService]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(props.service),[target,setTarget]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(props.target),nameRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),companyRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),emailRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),phoneRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),msgRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),[formmsg,setFormmsg]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(!0),[formmsgicon,setFormmsgicon]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),[formmsgheader,setFormmsgheader]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),[formmsgcontent,setFormmsgcontent]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),[formmsglist,setFormmsglist]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(),[formmsgcolor,setFormmsgcolor]=(0,react__WEBPACK_IMPORTED_MODULE_2__.useState)();async function handleForm(e){var t,l,s,a,n;e.preventDefault(),setFormmsg(!1),setFormmsgcontent("Processing form, please wait."),setFormmsglist(""),setFormmsgcolor("blue"),setFormmsgicon("hourglass");let i=null===(t=nameRef.current)||void 0===t?void 0:t.value,c=null===(l=companyRef.current)||void 0===l?void 0:l.value,r=null===(s=emailRef.current)||void 0===s?void 0:s.value,o=null===(a=phoneRef.current)||void 0===a?void 0:a.value,u=(null===(n=msgRef.current)||void 0===n?void 0:n.value)||props.message,d=await fetch("/api/ticket/create/",{method:"POST",body:JSON.stringify({pipeline,headline,origin,fields:props.fields,service,target,name:i,company:c,email:r,phone:o,msg:u}),headers:{"Content-Type":"application/json"}}),h=await d.json();if("success"==h.result)setFormmsg(!1),setFormmsgcontent("Thank you, your request has been registered and we will get back to you as soon as possible."),setFormmsglist(""),setFormmsgcolor("green"),setFormmsgicon("check circle");else if("info"==h.result)setFormmsg(!1),setFormmsgcontent(h.message),setFormmsglist(""),setFormmsgcolor("blue"),setFormmsgicon("info circle");else if("reload"==h.result)router.reload();else{let e="",t=[];if(h.errors&amp;&amp;h.errors.fieldErrors)for(let e in h.errors.fieldErrors)t.push("".concat(e,": ").concat(h.errors.fieldErrors[e]));else h.message?e=h.message:h.errors?t.push(h.errors):t.push("An error occured, please try again!");setFormmsg(!1),setFormmsgcontent(e),setFormmsglist(t),setFormmsgcolor("red"),setFormmsgicon("attention")}}let renderLabel=e=&gt;({color:"blue",content:"".concat(e.text)}),serviceOptionsArray=[];function serviceOptions(e){let t=e.categories.split(",");return(t.includes("all")||t.includes("colo"))&amp;&amp;(e.headservice&amp;&amp;(serviceheadfilter.includes("all")||serviceheadfilter.includes("colo"))&amp;&amp;serviceOptionsArray.push({key:"colo",text:"Colocation",value:"colo",content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{icon:"i-datacenters",content:"Colocation",color:"blue"})}),e.subservices&amp;&amp;serviceCategory({category:"colo",services:"all"})),(t.includes("all")||t.includes("cloud"))&amp;&amp;(e.headservice&amp;&amp;(serviceheadfilter.includes("all")||serviceheadfilter.includes("cloud"))&amp;&amp;serviceOptionsArray.push({key:"cloud",text:"Cloud",value:"cloud",content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{icon:"i-cloud",content:"Cloud",color:"blue"})}),e.subservices&amp;&amp;serviceCategory({category:"cloud",services:"all"})),(t.includes("all")||t.includes("net"))&amp;&amp;(e.headservice&amp;&amp;(serviceheadfilter.includes("all")||serviceheadfilter.includes("net"))&amp;&amp;serviceOptionsArray.push({key:"net",text:"Connectivity",value:"net",content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{icon:"i-connectivity",content:"Connectivity",color:"blue"})}),e.subservices&amp;&amp;serviceCategory({category:"net",services:"all"})),e.headservice&amp;&amp;(serviceheadfilter.includes("all")||serviceheadfilter.includes("unspecified"))&amp;&amp;serviceOptionsArray.push({key:"unspecified",text:"Unspecified Service",value:"unspecified",content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{icon:"bars",content:"Unspecified/Unknown Service",color:"blue"})}),serviceOptionsArray}function serviceCategory(props){let services=[],rawServices=_lib_dcdefinitions_js__WEBPACK_IMPORTED_MODULE_1__.Dt,array=eval("rawServices."+props.category);return array.map((e,t)=&gt;{serviceFilter.includes(e.code)&amp;&amp;serviceOptionsArray.push({key:"".concat(props.category,".").concat(e.code),text:e.ref,value:"".concat(props.category,".").concat(e.code),icon:e.icon})}),services}serviceFilter=props.servicefilter?props.servicefilter:["suites","cages","cabinets","partialcabinets","sharedrackspace","baremetal","publiccloud","privatecloud","hybridcloud","containers","managed","iptransit","darkfiber","transport","internet","sdn"],serviceheads=!1!=props.serviceheads,serviceheadfilter=props.serviceheadfilter?props.serviceheadfilter:["all"];let serviceArray=serviceOptions({categories:"all",headservice:serviceheads,subservices:!0});if(props.service&amp;&amp;props.service.includes(".")){serviceCode=props.service.split(".");let rawServices=_lib_dcdefinitions_js__WEBPACK_IMPORTED_MODULE_1__.Dt,array=eval("rawServices."+serviceCode[0]);array.map((e,t)=&gt;{e.code==serviceCode[1]&amp;&amp;(serviceName=e.ref,serviceIcon=e.icon)})}let handleService=(e,t)=&gt;{let{value:l,options:s}=t;setService(l)},handleTarget=e=&gt;{setTarget(e)},formName,formCompany,formEmail,formPhone,formMessage=!1;return(!props.fields||props.fields.includes("name"))&amp;&amp;(formName=!0),(!props.fields||props.fields.includes("company"))&amp;&amp;(formCompany=!0),(!props.fields||props.fields.includes("email"))&amp;&amp;(formEmail=!0),(!props.fields||props.fields.includes("phone"))&amp;&amp;(formPhone=!0),(!props.fields||props.fields.includes("message"))&amp;&amp;(formMessage=!0),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__.A,{onSubmit:e=&gt;handleForm(e),children:[!props.staticservice&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:props.service?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_7__.A,{size:"large",basic:!0,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_8__.A,{color:"blue",name:serviceIcon})," ",serviceName]},props.service):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{as:"h3",content:"What are you looking for?"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_9__.A,{multiple:!0,search:!0,selection:!0,closeOnChange:!0,onChange:handleService,renderLabel:renderLabel,fluid:!0,options:serviceArray,placeholder:"Choose Service"})]})}),service&amp;&amp;!props.statictarget&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{as:"h3",content:"Where are you looking?"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_quote_formtarget_js__WEBPACK_IMPORTED_MODULE_3__.A,{callback:handleTarget})]}),(target||props.fields)&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[(!props.fields||props.titlewho)&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_5__.A,{as:"h3",content:"Who are you?"}),formName&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__.A.Field,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{children:"Full Name:"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{fluid:!0,placeholder:"Your Full Name",ref:nameRef})]}),formCompany&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__.A.Field,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{children:"Company:"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{fluid:!0,placeholder:"Your Company Name",ref:companyRef})]}),formEmail&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__.A.Field,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{children:"E-mail:"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{fluid:!0,placeholder:"Your E-mail Address",ref:emailRef})]}),formPhone&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__.A.Field,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{children:"Phone (optional):"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input",{fluid:!0,placeholder:"Your Phone Number (optional)",ref:phoneRef})]}),formMessage&amp;&amp;(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_6__.A.Field,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label",{children:"Requirements:"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("textarea",{style:{width:"100%",minHeight:100},placeholder:"Please describe your requirements as detailed as possible",ref:msgRef})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_10__.A,{hidden:formmsg,icon:formmsgicon,color:formmsgcolor,header:formmsgheader,content:formmsgcontent,list:formmsglist}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_11__.A,{primary:!0,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(semantic_ui_react__WEBPACK_IMPORTED_MODULE_8__.A,{name:"send"})," Send Request"]})]})]})})}},68398:(e,t,l)=&gt;{l.d(t,{A:()=&gt;o});var s=l(74848),a=l(68628),n=l(81458),i=l(60918),c=l(64333);l(31800);var r=l(96540);function o(e){let[t,l]=(0,r.useState)(),[o,u]=(0,r.useState)(e.defaultOptions||[]),[d,h]=(0,r.useState)(e.defaultValue||[]),[f,p]=(0,r.useState)(),[x,j]=(0,r.useState)(),[m,v]=(0,r.useState)(),[g,y]=(0,r.useState)(["all"]),[b,C]=(0,r.useState)(),[k,S]=(0,r.useState)(0),[A,F]=(0,r.useState)(),[O,w]=(0,r.useState)(),[N,R]=(0,r.useState)(),[T,E]=(0,r.useState)(),[P,q]=(0,r.useState)(),D=(0,r.useRef)(),J=(0,r.useRef)(),V=(0,r.useRef)(),Y=(0,r.useRef)(),_=(0,r.useRef)();(0,r.useEffect)(()=&gt;{},[e]);let z=e=&gt;({color:"blue",content:"".concat(e.text)}),L=(e,t)=&gt;{let l,{value:n,id:i}=t;if("country"==i?(w(),R(),E(),q(),p(n),j(),v(),C(),y(["all"]),l="market","country:usa"==n&amp;&amp;(l="state")):"state"==i?(R(),E(),q(),j(n),v(),C(),y(["all"]),l="market"):"market"==i?(E(),q(),v(n),C(),y(["all"]),l="district"):"district"==i&amp;&amp;(q(),C(n),y(["all"])),l&amp;&amp;"all"!=n&amp;&amp;fetch("/api/geos/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:l,parent:n})}).then(e=&gt;e.json()).then(e=&gt;{"country"==i&amp;&amp;"country:usa"==n?(e.unshift({key:"all",text:"No specific state",value:"all"}),w(e)):"country"==i||"state"==i?(e.unshift({key:"all",text:"No specific market",value:"all"}),R(e)):"market"==i&amp;&amp;(e&amp;&amp;e.length&gt;0?(e.unshift({key:"all",text:"No specific district",value:"all"}),S(e.length),E(e)):(S(0),E()))}),"market"==i||"district"==i){let e=i,t=n;"district"==i&amp;&amp;"all"==n&amp;&amp;(e="market",t=m),fetch("/api/dcs/geo/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({geo:t,type:e})}).then(e=&gt;e.json()).then(e=&gt;{let t=[];e.map((e,l)=&gt;{t.push({key:"datacenter:"+e.link,value:"datacenter:"+e.link,text:e.name,search:"".concat(e.name," ").concat(e.address," ").concat(e.company),content:(0,s.jsx)(a.A,{size:"tiny",content:e.name,subheader:"".concat(e.address," (").concat(e.company,").")})})}),t.unshift({key:"all",text:"No specific data center preferred",value:"all"}),q(t)})}},U=(e,t)=&gt;{let{value:l}=t;if(l&amp;&amp;l.length&gt;1&amp;&amp;"all"==l[0])y(l.splice(-1,1));else if(l.includes("all")&amp;&amp;(l.length&gt;2||"all"==l[1]))y(["all"]);else{let e=l;e&amp;&amp;0==e.length&amp;&amp;(e=["all"]),y(e)}},W=(e,t)=&gt;{let l=RegExp(t,"i");return e.filter(e=&gt;e.search.match(l))};function M(){p(),j(),v(),C(),y(),l(!1)}function H(){let t,l,s=[],a=[];s=s.concat(o),a=a.concat(d),g&amp;&amp;!g.includes("all")?(t=g,l=[],P.map((e,s)=&gt;{t.includes(e.value)&amp;&amp;l.push(e)})):b&amp;&amp;"all"!=b?(t=[b],l=[T.find(e=&gt;e.value===b)]):m&amp;&amp;"all"!=m?(t=[m],l=[N.find(e=&gt;e.value===m)]):x&amp;&amp;"all"!=x&amp;&amp;"country:usa"==f?(t=[x],l=[O.find(e=&gt;e.value===x)]):f&amp;&amp;(t=[f],l=[A.find(e=&gt;e.value===f)]),t&amp;&amp;l&amp;&amp;t.map((e,t)=&gt;{d.includes(e)||(s.push(l[t]),a.push(e))}),u(s),h(a),M(),e.callback&amp;&amp;e.callback(a)}let I=(t,l)=&gt;{let{value:s,options:a}=l,n=[];a.map((e,t)=&gt;{s.includes(e.value)&amp;&amp;n.push(e)}),u(n),h(s),e.callback&amp;&amp;e.callback(s)};function B(){A||fetch("/api/geos/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:"country"})}).then(e=&gt;e.json()).then(e=&gt;{F(e)}),l(!0)}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.A,{multiple:!0,selection:!0,closeOnChange:!0,renderLabel:z,fluid:!0,placeholder:"Add Criteria",value:d,options:o,onChange:I,onOpen:B}),(0,s.jsx)(i.A,{closeIcon:!0,size:"tiny",onClose:M,onOpen:()=&gt;l(!0),open:t,children:(0,s.jsxs)(i.A.Content,{children:[A?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:"Country:"}),(0,s.jsx)("br",{}),(0,s.jsx)(n.A,{search:!0,fluid:!0,selection:!0,closeOnChange:!0,options:A,placeholder:"Choose Country",ref:D,onChange:L,id:"country",autoComplete:"off"}),(0,s.jsx)("br",{})]}):(0,s.jsx)(s.Fragment,{children:"Loading, please wait..."}),f&amp;&amp;"country:usa"==f&amp;&amp;(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:"State:"}),(0,s.jsx)("br",{}),(0,s.jsx)(n.A,{search:!0,fluid:!0,selection:!0,closeOnChange:!0,defaultValue:"all",options:O,placeholder:"Choose State",ref:J,onChange:L,id:"state",autoComplete:"off"}),(0,s.jsx)("br",{})]}),(f&amp;&amp;"country:usa"!=f||"country:usa"==f&amp;&amp;x&amp;&amp;"all"!=x)&amp;&amp;(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:"Market:"}),(0,s.jsx)("br",{}),(0,s.jsx)(n.A,{search:!0,fluid:!0,selection:!0,closeOnChange:!0,defaultValue:"all",options:N,placeholder:"Choose Market",ref:V,onChange:L,id:"market",autoComplete:"off"}),(0,s.jsx)("br",{})]}),m&amp;&amp;k&gt;0&amp;&amp;(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:"District:"}),(0,s.jsx)("br",{}),(0,s.jsx)(n.A,{search:!0,fluid:!0,selection:!0,closeOnChange:!0,defaultValue:"all",options:T,placeholder:"Choose District",ref:Y,onChange:L,id:"district",autoComplete:"off"}),(0,s.jsx)("br",{})]}),m&amp;&amp;"all"!=m&amp;&amp;(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:"Data Centers (optional):"}),(0,s.jsx)("br",{}),(0,s.jsx)(n.A,{multiple:!0,fluid:!0,selection:!0,closeOnChange:!0,onChange:U,value:g,options:P,search:W,placeholder:"Please wait for data centers to load",ref:_,id:"datacenter",autoComplete:"off"}),(0,s.jsx)("br",{})]}),f&amp;&amp;(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(c.A,{content:"Add Targeting Criteria",primary:!0,onClick:H})})]})})]})}}}]);</pre></body></html>