PageSourceSearch

https://nopk.com/_next/static/chunks/pages/rate-estimate-1dd33bde92f9f70b.js

js nopk.com collected 2026-10-04 12:37:38 UTC 50,221 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[669],{86010:function(e,t,i){"use strict";t.Z=function(){for(var e,t,i=0,n="";i<arguments.length;)(e=arguments[i++])&&(t=function e(t){var i,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t){if(Array.isArray(t))for(i=0;i<t.length;i++)t[i]&&(n=e(t[i]))&&(a&&(a+=" "),a+=n);else for(i in t)t[i]&&(a&&(a+=" "),a+=i)}return a}(e))&&(n&&(n+=" "),n+=t);return n}},18054:function(e,t,i){let n=i(67294);e.exports={attributes:{ogImage:"img/npt_metamobile.svg"},react:function(e){return Object.keys(e).forEach(function(t){this[t]=e[t]}),n.createElement("div",{className:"frontmatter-markdown"})}}},11482:function(e,t,i){let n=i(67294);e.exports={attributes:{metaTitle:"Rate Estimate",metaDescription:"Use the rate calculator below to get an estimate. If you need a customer specific estimate then please give us a call at 303-295-0300 and ask to speak with an account executive.",title:"Rate Estimate",supportEmail:"[email protected]"},react:function(e){return Object.keys(e).forEach(function(t){this[t]=e[t]}),n.createElement("div",{className:"frontmatter-markdown"},n.createElement("p",null,"Use the *rate calculator below to get an estimate. If you need a customer-specific estimate then please give us a call at 303-295-0300 and ask to speak with an account executive Mon-Fri 8am-9pm MST."),n.createElement("p",null,"*This estimate gives general estimates and does not include other accessorial charges such as extended delivery locations, etc."),n.createElement("p",null,"If the shipment occupies more than 14 feet of trailer space, additional charges will apply. Please call the terminal for details."))}}},40423:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rate-estimate",function(){return i(52002)}])},68846:function(e,t,i){"use strict";var n=i(85893),a=i(9008),l=i.n(a),s=i(4298),r=i.n(s);i(67294);var o=i(18054);t.Z=e=>{let{title:t,description:i,robots:a}=e,{ogImage:s}=o.attributes;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l(),{children:[(0,n.jsx)("meta",{charSet:"utf-8"}),(0,n.jsx)("title",{children:"North Park Transportation: ".concat(t)}),(0,n.jsx)("meta",{name:"description",content:i}),a&&(0,n.jsx)("meta",{name:"robots",content:a}),(0,n.jsx)("meta",{property:"og:url",content:"https://nopk.com"}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{property:"og:title",content:"North Park Transportation: ".concat(t)}),(0,n.jsx)("meta",{property:"og:description",content:i}),(0,n.jsx)("meta",{property:"og:image",content:s}),(0,n.jsx)("meta",{itemProp:"name",content:"North Park Transportation: ".concat(t)}),(0,n.jsx)("meta",{itemProp:"description",content:i}),(0,n.jsx)("meta",{itemProp:"image",content:s}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesItalic/font.woff",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesItalic/font.woff2",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesRegular/font.woff",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesRegular/font.woff2",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesBold/font.woff",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesBold/font.woff2",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesBoldItalic/font.woff",as:"font"}),(0,n.jsx)("link",{rel:"preload",href:"/fonts/TTHovesBoldItalic/font.woff2",as:"font"})]}),(0,n.jsx)(r(),{id:"structured-data",async:!0,type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"LocalBusiness",name:"North Park Transportation",image:s,"@id":"https://nopk.com",url:"https://nopk.com",telephone:"303-295-0300",address:{"@type":"PostalAddress",streetAddress:"5150 Columbine St",addressLocality:"Denver",addressRegion:"CO",postalCode:"80216",addressCountry:"US"},geo:{"@type":"GeoCoordinates",latitude:39.7899671,longitude:-104.9555869}})}),(0,n.jsx)(r(),{id:"netlify-identity-widget",children:"\n          if (/(invite_token|confirmation_token|recovery_token|email_change_token)=/.test(window.location.hash)) {\n            var s = document.createElement('script');\n            s.src = 'https://identity.netlify.com/v1/netlify-identity-widget.js';\n            s.async = true;\n            document.head.appendChild(s);\n          }\n        "})]})}},46352:function(e,t,i){"use strict";var n=i(85893);
1i(67294);var a=i(49039);let l=[{min:"N/A",max:"N/A",freightClass:"500"},{min:"0.0",max:"1.0",freightClass:"400"},{min:"1.1",max:"2.0",freightClass:"300"},{min:"2.1",max:"4.0",freightClass:"250"},{min:"4.1",max:"6.0",freightClass:"175"},{min:"6.1",max:"8.0",freightClass:"125"},{min:"8.1",max:"10.0",freightClass:"100"},{min:"10.1",max:"12.0",freightClass:"92.5"},{min:"12.1",max:"15.0",freightClass:"85"},{min:"N/A",max:"N/A",freightClass:"77.5"},{min:"15.1",max:"22.5",freightClass:"70"},{min:"22.5",max:"30.0",freightClass:"65"},{min:"30.1",max:"35.0",freightClass:"60"},{min:"35.1",max:"50.0",freightClass:"55"},{min:"50.1",max:"greater",freightClass:"50"}],s=()=>(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"font-ttHovesMedium text-[12px] mb-2",children:"Density-Based Freight Class"}),(0,n.jsxs)("table",{className:"w-full text-[11px] border-collapse",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"border-b border-gray-400",children:[(0,n.jsx)("th",{className:"py-1 pr-2 text-left font-ttHovesMedium",children:"Min PCF"}),(0,n.jsx)("th",{className:"py-1 pr-2 text-left font-ttHovesMedium",children:"Max PCF"}),(0,n.jsx)("th",{className:"py-1 text-left font-ttHovesMedium",children:"Class"})]})}),(0,n.jsx)("tbody",{children:l.map((e,t)=>(0,n.jsxs)("tr",{className:"border-b border-gray-200 last:border-0",children:[(0,n.jsx)("td",{className:"py-[3px]",children:e.min}),(0,n.jsx)("td",{className:"py-[3px]",children:e.max}),(0,n.jsx)("td",{className:"py-[3px]",children:e.freightClass})]},t))})]})]});t.Z=()=>(0,n.jsx)(a.Z,{content:(0,n.jsx)(s,{}),width:"220px",align:"left",position:"bottom"})},89832:function(e,t,i){"use strict";var n=i(85893);let a=i(67294).forwardRef((e,t)=>{let{additionalContainerClasses:i="",additionalLabelClasses:a="",error:l,disabled:s=!1,font:r="font-ttHovesMedium",hideLabel:o=!1,hideError:d=!1,inputFontSize:c="text-sm",label:u,labelTextSize:h="text-sm",min:m,max:p,maxLength:g,placeholder:x,touched:f,type:v="text",value:b,width:y="w-full",required:w,name:C,id:j,readOnly:N,handleBlur:S,handleChange:F}=e,A=!!(f&&l);return(0,n.jsxs)("div",{className:"flex relative flex-col mb-2 ".concat(i," ").concat(y),children:[!o&&(0,n.jsxs)("label",{htmlFor:j||void 0,className:"text-green-100 ".concat(h," mb-[7px] ").concat(r," ").concat(a),children:[u," ",w&&(0,n.jsx)("span",{className:"",children:"*"})]}),(0,n.jsx)("input",{ref:t||void 0,"aria-describedby":j?"".concat(j,"_hint"):void 0,"aria-invalid":A?"true":"false",className:"rounded-[4px] border ".concat(A?"border-red-brand focus:ring-red-brand":"border-[#BDBDBD] focus:ring-nptDGreen"," focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-300 ").concat(c," disabled:bg-gray-100"),disabled:s,id:j||void 0,min:m,max:p,maxLength:g,name:C||void 0,onBlur:S,onChange:F,placeholder:x,type:v,value:b,readOnly:N}),A&&(0,n.jsx)("p",{id:j?"".concat(j,"_hint"):void 0,className:[l?"opacity-100":"hidden opacity-0","absolute top-full left-0 mt-1 max-w-[475px] text-xs text-red-brand"].filter(Boolean).join(" "),children:l})]})});t.Z=a,a.displayName="InputGroup"},85522:function(e,t,i){"use strict";var n=i(85893);i(67294),t.Z=e=>{let{additionalContainerClasses:t="",disabled:i,error:a,font:l,handleBlur:s,handleChange:r,id:o,labelText:d,marginBottom:c="mb-2",name:u,options:h,placeholder:m="Select",required:p,showDefaultOption:g=!1,tooltip:x,touched:f,value:v,width:b="w-full"}=e,y=!!(f&&a);return(0,n.jsxs)("div",{className:"flex relative flex-col ".concat(t," ").concat(b," ").concat(c),children:[(0,n.jsxs)("label",{htmlFor:o||void 0,className:"flex items-center gap-1 text-sm text-gray-copy mb-[6px] ".concat(l||""),children:[(0,n.jsxs)("span",{children:[d," ",p&&(0,n.jsx)("span",{className:"",children:"*"})]}),x]}),(0,n.jsxs)("select",{"aria-describedby":"".concat(o,"_hint"),"aria-invalid":y?"true":"false",name:u||void 0,id:o||void 0,value:v,disabled:i,onBlur:s,onChange:r,className:"rounded-md ".concat(y?"border-red-brand focus:ring-red-brand":"border-[#BDBDBD] focus:ring-nptDGreen"," focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-300 text-sm disabled:bg-gray-100 disabled:border-gray-400"),children:[(0,n.jsx)("option",{value:"",disabled:g,hidden:!g,children:m}),h.map((e,t)=>(0,n.jsx)("option",{value:e.value,disabled:e.disabled,children:e.text},"".concat(e.value,"-").concat(t)))]}),y&&(0,n.jsx)("p",{id:o?"".concat(o,"_hint"):void 0,className:"".concat(a?"opacity-100":"hidden opacity-0"," absolute top-full left-0 mt-1 max-w-[270px] text-xs text-red-brand"),children:a})]})}},69751:function(e,t,i){"use strict";i.d(t,{K:function(){return l}});var n=i(67294);let a=["pointerdown","keydown","touchstart","scroll","wheel"];
1function l(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(e)return;let i=()=>t(!0);return a.forEach(e=>window.addEventListener(e,i,{once:!0,passive:!0})),()=>a.forEach(e=>window.removeEventListener(e,i))},[e]),e}},23837:function(e,t,i){"use strict";var n=i(85893);i(67294),t.Z=e=>{let{height:t="h-6",width:i="w-6",additionalClasses:a="",color:l="currentColor",bgColor:s="bg-transparent"}=e;return(0,n.jsxs)("svg",{className:"".concat(t," ").concat(i," ").concat(a),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"12",fill:s}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z",fill:l})]})}},49039:function(e,t,i){"use strict";i.d(t,{Z:function(){return r}});var n=i(85893),a=i(67294),l=e=>{let{height:t="h-[18px]",width:i="w-[18px]",additionalClasses:a=""}=e;return(0,n.jsx)("svg",{className:"hover:cursor-pointer ".concat(t," ").concat(i," ").concat(a),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"})})},s=i(73935),r=e=>{let{text:t,content:i,position:r="top",additionalClasses:o,width:d="213px",align:c="center",children:u,wrapperClassName:h="relative inline-block"}=e,[m,p]=(0,a.useState)(!1),[g,x]=(0,a.useState)({top:0,left:0}),f=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(m&&f.current){let e=f.current.getBoundingClientRect(),t=window.scrollY||document.documentElement.scrollTop,i=window.scrollX||document.documentElement.scrollLeft,n=0,a=0;switch(r){case"top":n=e.top+t,a=e.left+i+e.width/2;break;case"bottom":n=e.bottom+t,a=e.left+i+e.width/2;break;case"left":n=e.top+t+e.height/2,a=e.left+i-10;break;case"right":n=e.top+t+e.height/2,a=e.right+i+10}x({top:n,left:a})}},[m,r]),(0,n.jsxs)("span",{ref:f,className:h,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[null!=u?u:(0,n.jsx)(l,{additionalClasses:o}),m&&s.createPortal((0,n.jsx)("div",{style:(()=>{let e={position:"absolute",zIndex:9999,backgroundColor:"white",color:"#4F4F4F",padding:"16px",borderRadius:"0.5rem",fontSize:"14px",boxShadow:"0 4px 10px rgba(0,0,0,0.2)",transform:"translate(-50%, -50%)",width:d,border:"0.5px solid #4F4F4F",textAlign:c};switch(r){case"top":e.transform="translate(-50%, -100%)",e.marginTop="-5px";break;case"bottom":e.transform="translate(-50%, 0)",e.marginTop="5px";break;case"left":e.transform="translate(-100%, -50%)",e.marginLeft="-5px";break;case"right":e.transform="translate(0, -50%)",e.marginLeft="5px"}return{...e,top:"".concat(g.top,"px"),left:"".concat(g.left,"px")}})(),children:(0,n.jsx)("div",{style:{width:"100%",height:"100%",overflowWrap:"break-word"},children:null!=i?i:t})}),document.body)]})}},39165:function(e,t,i){"use strict";var n=i(85893);i(67294),t.Z=e=>{let{additionalClasses:t,width:i="w-6",height:a="h-6"}=e;return(0,n.jsx)("div",{className:"flex justify-center items-center",children:(0,n.jsxs)("svg",{role:"status",className:"mr-2 text-gray-200 animate-spin ".concat(a," ").concat(i," dark:text-gray-600 fill-nptClassic ").concat(t),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
11071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})}},26444:function(e,t,i){"use strict";var n=i(85893),a=i(67294),l=i(86010),s=i(23837);t.Z=function(e){let{message:t,visible:i,icon:r="check",onClose:o,duration:d=5e3}=e,[c,u]=(0,a.useState)(i?"visible":"hidden");return((0,a.useEffect)(()=>{if(i){u("enter");let e=setTimeout(()=>u("visible"),20),t=setTimeout(()=>u("exit"),d),i=setTimeout(()=>{u("hidden"),o()},d+300);return()=>{clearTimeout(e),clearTimeout(t),clearTimeout(i)}}u("hidden")},[i,d,o]),"hidden"===c)?null:(0,n.jsxs)("output",{role:"status","aria-live":"polite",className:(0,l.Z)("fixed bottom-[73px] left-1/2 -translate-x-1/2 z-50","bg-gray-0 text-white rounded-[4px] p-3","text-[14px] font-medium leading-[1.2] tracking-[0.0025em]","flex items-center gap-3","transition-all duration-300 ease-out","enter"===c&&"translate-y-4 opacity-0","visible"===c&&"translate-y-0 opacity-100","exit"===c&&"translate-y-4 opacity-0"),children:[(0,n.jsx)("span",{className:"min-h-[20px] flex items-center",children:t}),"check"===r&&(0,n.jsx)(s.Z,{height:"h-5",width:"w-5"})]})}},52002:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(85893),a=i(68846),l=i(67294),s=i(96383),r=i(16310),o=i(89832),d=i(85522),c=i(46352),u=i(53281),h=i(82334),m=i(11163),p=i(88767),g=i(33299),x=i(39165),f=i(26444),v=i(55240),b=i(64417),y=i(23748);let w="HAZM",C={weight:1e4,width:98,height:108},j={length:72,width:48,height:96,weight:2500},N=[{code:"AIRP",label:"Airport Delivery"},{code:"LIFD",label:"Lift Gate Delivery"},{code:"NOTI",label:"Notification Charge"},{code:"RESI",label:"Residential Delivery"},{code:"BILL",label:"Bill Of Lading"},{code:"LIPU",label:"Lift Gate Pickup"},{code:"POD1",label:"POD Required w/ Invoice"},{code:"RWGH",label:"Reweigh"},{code:"HAZM",label:"Hazardous Material Fee"},{code:"LIMI",label:"Limited Access Delivery"},{code:"FREE",label:"Protect From Freezing"},{code:"APPT",label:"Scheduled Appointment Delivery"},{code:"INSI",label:"Inside Service Delivery"},{code:"LIMP",label:"Limited Access Pickup"},{code:"REDE",label:"Redelivery"},{code:"STGD",label:"Storage Destination"},{code:"INPU",label:"Inside Service Pickup"},{code:"MARK",label:"Marking And Tagging"},{code:"REPU",label:"Residential Pickup"},{code:"STGO",label:"Storage Origin"}],S=[{text:"50",value:"50"},{text:"55",value:"55"},{text:"60",value:"60"},{text:"65",value:"65"},{text:"70",value:"70"},{text:"77.5",value:"77.5"},{text:"85",value:"85"},{text:"92.5",value:"92.5"},{text:"100",value:"100"},{text:"125",value:"125"},{text:"150",value:"150"},{text:"175",value:"175"},{text:"250",value:"250"},{text:"300",value:"300"}],F=r.Rx().nullable().required("Required").moreThan(0,"Must be greater than 0"),A=r.Rx().nullable().required("Required").min(1,"Must be greater than or equal to 1"),Z=r.Ry({originAddressLine1:r.Z_().when("originAddressNotFound",(e,t)=>e[0]?t:t.required("Required")),originZip:r.Z_().required("Required"),destinationAddressLine1:r.Z_().when("destinationAddressNotFound",(e,t)=>e[0]?t:t.required("Required")),destinationZip:r.Z_().required("Required"),shipmentItems:r.IX().of(r.Ry({weight:F,freightClass:r.Z_().required("Required"),length:F,width:F,height:F,handlingUnits:A}))}),k=async e=>{try{let t=await e.json();if((null==t?void 0:t.error)==="No active agreement"&&"string"==typeof t.body)return t.body}catch(e){}return"Rate estimate request failed. Please try again."},I=[{field:"weight",label:"Total Weight"},{field:"freightClass",label:"Freight Class"},{field:"length",label:"Length"},{field:"width",label:"Width"},{field:"height",label:"Height"},{field:"handlingUnits",label:"Handling Units"}],B=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.originAddressLine1)return"Please complete Origin Address.";if(e.originZip)return"Please complete Origin Zip.";if(e.destinationAddressLine1)return"Please complete Destination Address.";if(e.destinationZip)return"Please complete Destination Zip.";if(t&&Array.isArray(e.shipmentItems))for(let t=0;t<e.shipmentItems.length;t+=1){let i=e.shipmentItems[t];if(i&&"string"!=typeof i)for(let e=0;e<I.length;e+=1){let{field:n,label:a}=I[e];if(i[n])return"Please complete Shipment Item ".concat(t+1," ").concat(a,".")}}return null};var L=e=>{var t,i,a;let{initialValues:r,googlePlacesReady:F=!1}=e,A=(0,m.useRouter)(),I=(0,p.useQueryClient)(),{status:L}=(0,g.useSession)(),[D,P]=(0,l.useState)(!1),[T,R]=(0,l.useState)(null),[q,_]=(0,l.useState)(!1),[H,M]=(0,l.useState)(null),[E,V]=(0,l.useState)(!1),[U,z]=(0,l.useState)(0),[O,G]=(0,l.useState)([]),[Q,W]=(0,l.useState)([]),[K,X]=(0,l.useState)(-1),[J,Y]=(0,l.useState)(-1),[$,ee]=(0,l.useState)(!1),[et,ei]=(0,l.useState)(!1),[en,ea]=(0,l.useState)(null),[el,es]=(0,l.useState)(""),er=(0,l.useRef)(null),eo=(0,l.useRef)(null),ed=(0,l.useRef)(null),ec=(0,l.useRef)(null),eu=(0,l.useRef)(null),eh=(0,l.useRef)(null),em=(0,l.useRef)(0),[ep,eg]=(0,l.useState)(null),[ex,ef]=(0,l.useState)(!1),[ev,eb]=(0,l.useState)(0),ey=(0,l.useCallback)(()=>ef(!1),[]),ew=(0,l.useRef)(!1);(0,l.useEffect)(()=>{var e,t;er.current&&(er.current.value=null!==(e=null==r?void 0:r.originAddressLine1)&&void 0!==e?e:""),eo.current&&(eo.current.value=null!==(t=null==r?void 0:r.destinationAddressLine1)&&void 0!==t?t:"")},[r]);let eC=(0,s.TA)({validationSchema:Z,enableReinitialize:!0,initialValues:{originAddressLine1:"",originAddressLine2:"",originAddressNotFound:!1,originZip:"",originCity:"",originState:"",originCountry:"US",destinationAddressLine1:"",destinationAddressLine2:"",destinationAddressNotFound:!1,destinationZip:"",destinationCity:"",destinationState:"",destinationCountry:"US",shipmentItems:[{weight:"",freightClass:"",length:null,width:null,height:null,handlingUnits:null,hazardous:!1,description:""}],accessorials:[],...r},onSubmit:async e=>{let t={...e,totalCubicFeet:eE.toFixed(2)};await eR(t)}}),ej=!!(null==en?void 0:en.is3plUser),eN=null!==(t=null==en?void 0:en.accountNamesAndIds)&&void 0!==t?t:[],eS=ej&&eN.length>0,eF=eN.map(e=>{var t;return{text:e.name,value:null!==(t=e.nopk600BillToCode)&&void 0!==t?t:"",disabled:!e.nopk600BillToCode}}),eA=e=>{e.target.value.includes("-")&&(e.target.value=e.target.value.replace(/-/g,"")),eC.handleChange(e)};(0,l.useEffect)(()=>
1{if("authenticated"!==L){ea(null),es("");return}let e=!1;return fetch("/api/internal-api/quote-customers").then(async t=>{if(e||!t.ok)return;let i=await t.json();e||ea({is3plUser:!!(null==i?void 0:i.is3plUser),accountNamesAndIds:Array.isArray(null==i?void 0:i.accountNamesAndIds)?i.accountNamesAndIds:[]})}).catch(()=>void 0),()=>{e=!0}},[L]),(0,l.useEffect)(()=>{var e;if(!A.isReady)return;let t=null!==(e=null==en?void 0:en.accountNamesAndIds)&&void 0!==e?e:[];(null==en?void 0:en.is3plUser)&&0!==t.length&&es(e=>{var i,n,a;if(e)return e;let l=Array.isArray(A.query.accountNumber)?A.query.accountNumber[0]:A.query.accountNumber,s=null===(i=t.find(e=>e.nopk600BillToCode&&e.nopk600BillToCode===l))||void 0===i?void 0:i.nopk600BillToCode;return null!==(a=null!=s?s:null===(n=t.find(e=>e.nopk600BillToCode))||void 0===n?void 0:n.nopk600BillToCode)&&void 0!==a?a:""})},[A.isReady,en,A.query.accountNumber]);let eZ=!!((eC.submitCount>0||eC.touched.originAddressLine1)&&eC.errors.originAddressLine1),ek=!!((eC.submitCount>0||eC.touched.destinationAddressLine1)&&eC.errors.destinationAddressLine1);(0,l.useEffect)(()=>{var e,t;if(!F||!(null===(t=window.google)||void 0===t?void 0:null===(e=t.maps)||void 0===e?void 0:e.importLibrary))return;let i=!1;return window.google.maps.importLibrary("places").then(e=>{let{AutocompleteSuggestion:t,AutocompleteSessionToken:n}=e;i||(ed.current=t,ec.current=()=>new n,eu.current=ec.current())}).catch(()=>{ed.current=null}),()=>{i=!0,eh.current&&clearTimeout(eh.current),ed.current=null,ec.current=null,eu.current=null}},[F]);let eI=(e,t)=>{if("origin"===e){G(t),X(-1);return}W(t),Y(-1)},eB=(e,t)=>{let i="origin"===e?O:Q,n="origin"===e?K:J,a="origin"===e?X:Y;if("ArrowDown"===t.key){if(t.preventDefault(),0===i.length)return;a(e=>e<i.length-1?e+1:0)}else if("ArrowUp"===t.key){if(t.preventDefault(),0===i.length)return;a(e=>e>0?e-1:i.length-1)}else"Enter"===t.key&&n>=0&&i[n]?(t.preventDefault(),eT(e,i[n]),a(-1)):"Escape"===t.key&&eI(e,[])},eL=(e,t)=>{let i="origin"===e?$:et;if(eh.current&&clearTimeout(eh.current),V(!1),R(null),i){eC.setFieldValue("".concat(e,"AddressLine1"),t),eI(e,[]);return}eC.setFieldValue("".concat(e,"AddressLine1"),""),eC.setFieldValue("".concat(e,"City"),""),eC.setFieldValue("".concat(e,"State"),""),eC.setFieldValue("".concat(e,"Zip"),""),eC.setFieldValue("".concat(e,"Country"),"US");let n=t.trim();if(n.length<3||!ed.current){eI(e,[]);return}let a=++em.current;eh.current=setTimeout(()=>{var t;null===(t=ed.current)||void 0===t||t.fetchAutocompleteSuggestions({input:n,includedRegionCodes:["us"],sessionToken:eu.current}).then(t=>{let{suggestions:i}=t;if(a!==em.current)return;let l=i.map(e=>e.placePrediction).filter(Boolean);0===l.length&&("origin"===e?ee(!0):ei(!0),eC.setFieldValue("".concat(e,"AddressLine1"),n)),eI(e,l)}).catch(()=>{eI(e,[])})},250)},eD=(e,t)=>{var i,n,a,l;if("origin"===e){ee(t),eC.setFieldValue("originAddressNotFound",t),t&&(eC.setFieldValue("originAddressLine1",null!==(n=null===(i=er.current)||void 0===i?void 0:i.value)&&void 0!==n?n:""),G([]));return}ei(t),eC.setFieldValue("destinationAddressNotFound",t),t&&(eC.setFieldValue("destinationAddressLine1",null!==(l=null===(a=eo.current)||void 0===a?void 0:a.value)&&void 0!==l?l:""),W([]))},eP=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(!A.isReady||eP.current)return;eP.current=!0;let e=Array.isArray(A.query.originZip)?A.query.originZip[0]:A.query.originZip,t=Array.isArray(A.query.destZip)?A.query.destZip[0]:A.query.destZip;e&&(eC.setFieldValue("originZip",e),eD("origin",!0)),t&&(eC.setFieldValue("destinationZip",t),eD("destination",!0))},[A.isReady,A.query.originZip,A.query.destZip]);let eT=async(e,t)=>{let i=t.text.toString(),n="origin"===e?er.current:eo.current;eI(e,[]);try{var a,l,s;let r=t.toPlace();await (null===(a=r.fetchFields)||void 0===a?void 0:a.call(r,{fields:["addressComponents"]}));let o=(0,y.s)(r);n&&(n.value=o.street||i),"origin"===e?ee(!1):ei(!1),o.street&&eC.setFieldValue("".concat(e,"AddressLine1"),o.street),o.zip&&eC.setFieldValue("".concat(e,"Zip"),o.zip),o.city&&eC.setFieldValue("".concat(e,"City"),o.city),o.state&&eC.setFieldValue("".concat(e,"State"),o.state),eC.setFieldValue("".concat(e,"Country"),o.country||"US"),z(e=>e+1),eu.current=null!==(s=null===(l=ec.current)||void 0===l?void 0:l.call(ec))&&void 0!==s?s:null}catch(e){n&&(n.value=i)}},eR=async e=>{if(D){M("Please wait while we validate the ZIP codes.");return}if(T){M(T);return}if(!E){M("Please enter valid origin and destination ZIP codes.");return}if(eG){M(eG);return}if(eQ){M(eQ);return}if(ej&&!el){M("Please select a customer to quote for.");return}try{M(null);let t=await fetch("/api/internal-api/rate-estimate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,accountNumber:ej?el:Array.isArray(A.query.accountNumber)?A.query.accountNumber[0]:A.query.accountNumber})});if(!t.ok){M(await k(t));return}let i=await t.json(),n=null==i?void 0:i.quote,a=(0,b.h2)(n);if(!a){M("Rate estimate request failed. Please try again.");return}I.setQueryData((0,b.It)(a),i),(null==n?void 0:n.quoteId)&&n.quoteId!==a&&I.setQueryData((0,b.It)(n.quoteId),i),(0,v.B)({action:"rate_estimate_submit",category:"quote",label:"".concat(e.originZip,"-").concat(e.destinationZip)}),await A.push("/rate-estimate/".concat(encodeURIComponent(a),"/results"))}catch(e){M("Rate estimate request failed. Please try again.")}},eq=async(e,t)=>{try{let i=await fetch("/api/internal-api/validate-zipcodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({originZipCode:Number(e),destinationZipCode:Number(t)})});if(!i.ok)return null;return await i.json()}catch(e){return null}},e_=e=>{let t=eC.values.shipmentItems.filter((t,i)=>i!==e);eC.setFieldValue("shipmentItems",t),eH(t)},eH=e=>{let t=e.some(e=>e.hazardous),i=eC.values.accessorials.includes(w);t&&!i?eC.setFieldValue("accessorials",[...eC.values.accessorials,w]):!t&&i&&eC.setFieldValue("accessorials",eC.values.accessorials.filter(e=>e!==w))},eM=e=>{let t=eC.values.shipmentItems.map((t,i)=>i===e?{...t,hazardous:!t.hazardous}:t);eC.setFieldValue("shipmentItems",t),eH(t)},eE=eC.values.shipmentItems.reduce((e,t)=>
1{let i=Number(t.length)||0;return e+i*(Number(t.width)||0)*(Number(t.height)||0)/1728*(Number(t.handlingUnits)||1)},0),eV=eC.values.shipmentItems.reduce((e,t)=>e+(parseFloat(t.weight)||0),0),eU=eC.values.shipmentItems.reduce((e,t)=>e+(Number(t.handlingUnits)||0),0),ez=eC.values.shipmentItems.reduce((e,t)=>e+(Number(t.length)||0)*(Number(t.handlingUnits)||1)/12,0),eO=eE>0?eV/eE:0,eG=eV>C.weight||ez>45||eC.values.shipmentItems.some(e=>{let t=Number(e.width)||0,i=Number(e.height)||0;return t>C.width||i>C.height})?"Shipments over ".concat(45," linear feet, width over ").concat(C.width," inches, height over ").concat(C.height," inches, or weight over ").concat(C.weight.toLocaleString()," lbs require volume pricing. Please contact our Corporate Rate department at 303.295.0300"):null,eQ=(eC.values.accessorials.includes("LIPU")||eC.values.accessorials.includes("LIFD"))&&eC.values.shipmentItems.some(e=>{let t=Number(e.length)||0,i=Number(e.width)||0,n=Number(e.height)||0,a=parseFloat(e.weight)||0;return t>j.length||i>j.width||n>j.height||a>j.weight})?"Liftgate Pickup and Liftgate Delivery are limited to handling units under ".concat(j.length,"x").concat(j.width,"x").concat(j.height," inches and no more than ").concat(j.weight.toLocaleString()," lbs each. Please adjust your shipment details or remove the liftgate service."):null,eW=eC.submitCount>0?B(eC.errors,E):null,eK=!(eC.submitCount>0)||eW||E?null:null!=T?T:"Please enter valid origin and destination ZIP codes.",eX=null!==(a=null!==(i=null!=eK?eK:eC.submitCount>0?eG:null)&&void 0!==i?i:eC.submitCount>0?eQ:null)&&void 0!==a?a:H;return(0,l.useEffect)(()=>{eW&&(eg(eW),eb(e=>e+1),ef(!0),requestAnimationFrame(()=>{let e=document.querySelector('[aria-invalid="true"]');null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}))},[eW,eC.submitCount]),(0,l.useEffect)(()=>{eX&&window.scrollTo({top:0,behavior:"smooth"})},[eX]),(0,l.useEffect)(()=>{let{originZip:e,destinationZip:t}=eC.values;e.length<5&&(V(!1),eC.setFieldValue("originCity",""),eC.setFieldValue("originState","")),t.length<5&&(V(!1),_(!1),eC.setFieldValue("destinationCity",""),eC.setFieldValue("destinationState","")),5===e.length&&5===t.length&&(P(!0),R(null),eq(e,t).then(i=>{var n;P(!1);let a=null==i?void 0:null===(n=i.destinationServicePoint)||void 0===n?void 0:n.serviceType;if(_("N"===a||"I"===a),!(null==i?void 0:i.originServicePoint)||!(null==i?void 0:i.destinationServicePoint)){let n=!(null==i?void 0:i.originServicePoint),a=!(null==i?void 0:i.destinationServicePoint);(0,v.B)({action:"rate_estimate_not_serviceable",category:"quote",label:"".concat(e,"-").concat(t)}),n&&a?R("Origin and destination ZIP codes are invalid or not serviceable."):n?R("Origin ZIP code is invalid or not serviceable."):R("Destination ZIP code is invalid or not serviceable."),n&&(eC.setFieldValue("originCity",""),eC.setFieldValue("originState","")),a&&(eC.setFieldValue("destinationCity",""),eC.setFieldValue("destinationState",""));return}let l="D"===i.originServicePoint.serviceType,s="D"===i.destinationServicePoint.serviceType;if(eC.setFieldValue("originCity",i.originServicePoint.city),eC.setFieldValue("originState",i.originServicePoint.state),eC.setFieldValue("destinationCity",i.destinationServicePoint.city),eC.setFieldValue("destinationState",i.destinationServicePoint.state),!l&&!s){(0,v.B)({action:"rate_estimate_not_serviceable",category:"quote",label:"interline:".concat(e,"-").concat(t)});let n=e=>e.toLowerCase().replace(/\b\w/g,e=>e.toUpperCase()),a=n(i.originServicePoint.city),l=n(i.destinationServicePoint.city);R("".concat(a," and ").concat(l," are both outside our direct service area, but we can still accommodate your shipment. Please contact sales at [email protected]."));return}R(null),V(!0)}))},[eC.values.originZip,eC.values.destinationZip,U]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Z,{message:null!=ep?ep:"",visible:ex,onClose:ey},ev),(0,n.jsxs)("form",{onSubmit:eC.handleSubmit,onFocusCapture:()=>{ew.current||(ew.current=!0,(0,v.B)({action:"rate_estimate_start",category:"quote"}))}
1,className:"flex flex-col gap-10 md:gap-[60px] w-full [&_input:disabled]:bg-gray-100 [&_input:disabled]:cursor-not-allowed",children:[eX&&(0,n.jsx)("div",{role:"alert",className:"w-full max-w-[1130px] rounded-[6px] border border-red-brand bg-red-50 px-5 py-4 text-sm text-red-brand font-ttHovesRegular",children:eX}),(0,n.jsxs)("section",{className:"flex flex-col gap-5",children:[(0,n.jsx)("div",{className:"text-3xl md:text-5xl text-[#2D433F] font-ttHovesBold",children:"Freight Cost Estimate"}),"unauthenticated"===L&&(0,n.jsxs)("div",{className:"px-5 md:px-[30px] py-5 border-[#1F5C48] border-[0.33px] bg-[#F1F9F5] rounded-[6px] w-full max-w-[1130px] flex flex-col gap-4 md:flex-row md:justify-between md:items-center",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)("div",{className:"font-ttHovesDemiBold text-[#1F5C48] text-xl md:text-[24px]",children:"New to North Park?"}),(0,n.jsx)("div",{className:"font-ttHovesRegular text-sm md:text-[16px]",children:"Setting up an account connects you with our team to establish custom rates built around your lanes and volume."}),(0,n.jsxs)("div",{className:"font-ttHovesRegular text-sm md:text-[16px]",children:["Already have an account? Please"," ",(0,n.jsx)("button",{type:"button",onClick:()=>A.push("/login"),className:"underline",children:"sign in."})]})]}),(0,n.jsx)("a",{href:"mailto:[email protected]?subject=Freight%20Cost%20Estimate%20Inquiry&body=Hello",className:"px-4 py-2 rounded bg-[#53AC7F] text-white font-ttHovesMedium leading-none w-full md:w-auto md:shrink-0 text-center",children:"Contact Sales To Get Going"})]})]}),eS&&(0,n.jsxs)("section",{className:"flex flex-col gap-5",children:[(0,n.jsx)("div",{className:"text-[#2D433F] font-ttHovesMedium text-xl md:text-2xl",children:"Customer"}),(0,n.jsx)(d.Z,{id:"quoteCustomer",name:"quoteCustomer",labelText:"Select Your Customer",placeholder:"Select a customer",options:eF,value:el,handleChange:e=>{es(e.target.value)},handleBlur:()=>void 0,disabled:eC.isSubmitting,width:"w-full sm:w-[320px]",required:!0,showDefaultOption:!0})]}),(0,n.jsxs)("section",{className:"flex flex-col gap-8 md:gap-[40px]",children:[(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("div",{className:"text-[#2D433F] font-ttHovesMedium text-xl md:text-2xl",children:"Pickup & Delivery Information"}),D&&(0,n.jsx)(x.Z,{})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-start md:gap-6",children:[(0,n.jsxs)("div",{className:"flex relative flex-col mb-2 w-full sm:w-[320px]",children:[(0,n.jsxs)("label",{htmlFor:"originAddressSearch",className:"text-green-100 text-sm mb-[7px] font-ttHovesMedium",children:["Origin Address ",(0,n.jsx)("span",{className:"",children:"*"})]}),(0,n.jsx)("input",{ref:er,"aria-invalid":eZ?"true":"false",className:"rounded-[4px] border ".concat(eZ?"border-red-brand focus:ring-red-brand":"border-[#BDBDBD] focus:ring-nptDGreen"," focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-300 text-sm disabled:bg-gray-100"),disabled:eC.isSubmitting,id:"originAddressSearch",name:"originAddressSearch",onBlur:()=>eC.setFieldTouched("originAddressLine1",!0),onChange:e=>eL("origin",e.target.value),onKeyDown:e=>eB("origin",e),placeholder:"Start typing an address",type:"text",autoComplete:"new-password"}),O.length>0&&(0,n.jsx)("div",{className:"absolute top-full left-0 z-20 mt-1 w-full rounded border border-[#BDBDBD] bg-white shadow-md",children:O.map((e,t)=>{var i;return(0,n.jsx)("button",{type:"button",className:"block w-full px-3 py-2 text-left text-sm text-[#2D433F] hover:bg-[#F1F9F5] ".concat(t===K?"bg-[#F1F9F5]":""),onMouseDown:t=>{t.preventDefault(),eT("origin",e)},children:e.text.toString()},null!==(i=e.placeId)&&void 0!==i?i:e.text.toString())})}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(h.o2,{name:"originAddressNotFound",labelText:"Address not found",checked:$,fontSize:"text-xs",onChange:()=>eD("origin",!$)})})]}),(0,n.jsx)(o.Z,{label:"Origin Address Line 2",type:"text",placeholder:"Suite, unit, dock, etc. (optional)",name:"originAddressLine2",value:eC.values.originAddressLine2,width:"w-full sm:w-[320px]",handleChange:eC.handleChange,handleBlur:eC.handleBlur,disabled:eC.isSubmitting})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-start md:gap-6",children:[(0,n.jsx)(o.Z,{label:"Origin Zip",max:5,type:"text",placeholder:"",name:"originZip",value:eC.values.originZip,width:"w-full sm:w-[150px]",handleChange:eC.handleChange,handleBlur:eC.handleBlur,required:!0,error:eC.errors.originZip,touched:eC.submitCount>
10||eC.touched.originZip,disabled:!$}),(0,n.jsx)(o.Z,{label:"City",name:"originCity",font:"font-ttHovesMedium",handleBlur:eC.handleBlur,handleChange:eC.handleChange,placeholder:"",value:eC.values.originCity,width:"w-[calc(70%-0.5rem)] sm:w-[150px]",disabled:!$||!E}),(0,n.jsx)(o.Z,{label:"State",name:"originState",font:"font-ttHovesMedium",handleBlur:eC.handleBlur,handleChange:eC.handleChange,placeholder:"",value:eC.values.originState,width:"w-[calc(30%-0.5rem)] sm:w-[80px]",disabled:!$||!E})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-start md:gap-6",children:[(0,n.jsxs)("div",{className:"flex relative flex-col mb-2 w-full sm:w-[320px]",children:[(0,n.jsxs)("label",{htmlFor:"destinationAddressSearch",className:"text-green-100 text-sm mb-[7px] font-ttHovesMedium",children:["Destination Address ",(0,n.jsx)("span",{className:"",children:"*"})]}),(0,n.jsx)("input",{ref:eo,"aria-invalid":ek?"true":"false",className:"rounded-[4px] border ".concat(ek?"border-red-brand focus:ring-red-brand":"border-[#BDBDBD] focus:ring-nptDGreen"," focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-300 text-sm disabled:bg-gray-100"),disabled:eC.isSubmitting,id:"destinationAddressSearch",name:"destinationAddressSearch",onBlur:()=>eC.setFieldTouched("destinationAddressLine1",!0),onChange:e=>eL("destination",e.target.value),onKeyDown:e=>eB("destination",e),placeholder:"Start typing an address",type:"text",autoComplete:"new-password"}),Q.length>0&&(0,n.jsx)("div",{className:"absolute top-full left-0 z-20 mt-1 w-full rounded border border-[#BDBDBD] bg-white shadow-md",children:Q.map((e,t)=>{var i;return(0,n.jsx)("button",{type:"button",className:"block w-full px-3 py-2 text-left text-sm text-[#2D433F] hover:bg-[#F1F9F5] ".concat(t===J?"bg-[#F1F9F5]":""),onMouseDown:t=>{t.preventDefault(),eT("destination",e)},children:e.text.toString()},null!==(i=e.placeId)&&void 0!==i?i:e.text.toString())})}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(h.o2,{name:"destinationAddressNotFound",labelText:"Address not found",checked:et,fontSize:"text-xs",onChange:()=>eD("destination",!et)})})]}),(0,n.jsx)(o.Z,{label:"Destination Address Line 2",type:"text",placeholder:"Suite, unit, dock, etc. (optional)",name:"destinationAddressLine2",value:eC.values.destinationAddressLine2,width:"w-full sm:w-[320px]",handleChange:eC.handleChange,handleBlur:eC.handleBlur,disabled:eC.isSubmitting})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-end md:gap-6",children:[(0,n.jsx)(o.Z,{label:"Destination Zip",max:5,type:"text",placeholder:"",name:"destinationZip",value:eC.values.destinationZip,width:"w-full sm:w-[150px]",handleChange:eC.handleChange,handleBlur:eC.handleBlur,required:!0,error:eC.errors.destinationZip,touched:eC.submitCount>0||eC.touched.destinationZip,disabled:!et}),(0,n.jsx)(o.Z,{name:"destinationCity",font:"font-ttHovesMedium",handleBlur:eC.handleBlur,handleChange:eC.handleChange,label:"City",placeholder:"",value:eC.values.destinationCity,width:"w-[calc(70%-0.5rem)] sm:w-[150px]",disabled:!et||!E}),(0,n.jsx)(o.Z,{label:"State",name:"destinationState",font:"font-ttHovesMedium",handleBlur:eC.handleBlur,handleChange:eC.handleChange,placeholder:"",value:eC.values.destinationState,width:"w-[calc(30%-0.5rem)] sm:w-[80px]",disabled:!et||!E})]}),q&&(0,n.jsx)("div",{className:"text-sm text-gray-60 font-ttHovesRegular",children:"NPT uses an Interline Partner for delivery to this zip code."}),T&&(0,n.jsx)("div",{className:"text-sm text-red-brand font-ttHovesRegular",children:T}),(0,n.jsx)("hr",{className:"border border-gray-[#4F4F4F]"})]}),(0,n.jsxs)("section",{className:"flex flex-col gap-8 md:gap-[40px]",children:[(0,n.jsx)("div",{className:"text-[#2D433F] font-ttHovesMedium text-xl md:text-2xl",children:"Shipment Details"}),(0,n.jsx)("div",{className:"flex flex-col gap-4",children:eC.values.shipmentItems.map((e,t)=>{var i,a,l,s,r,u,m,p,g,x,f,v,b,y,w,C;let j=eC.errors.shipmentItems,N=eC.touched.shipmentItems,F=eC.submitCount>0;return(0,n.jsxs)("div",{className:"flex flex-col gap-4 px-4 py-4 rounded-md border-[0.33px] border-gray-400 md:flex-row md:gap-5 md:justify-between md:items-center md:px-6",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-end md:gap-6",children:[(0,n.jsx)(o.Z,{label:"Total Weight (lbs)",type:"number",placeholder:"",name:"shipmentItems[".concat(t,"].weight"),value:e.weight,width:"w-full sm:w-[150px]",handleChange:eA,handleBlur:eC.handleBlur,required:!0,error:null==j?void 0:null===(i=j[t])||void 0===i?void 0:i.weight,touched:F||
1(null==N?void 0:null===(a=N[t])||void 0===a?void 0:a.weight),disabled:!E||eC.isSubmitting}),(0,n.jsx)(d.Z,{name:"shipmentItems[".concat(t,"].freightClass"),font:"font-ttHovesMedium",marginBottom:"mb-2",handleBlur:eC.handleBlur,handleChange:eC.handleChange,labelText:"Freight Class",tooltip:(0,n.jsx)(c.Z,{}),placeholder:"",options:S,value:e.freightClass,width:"w-full sm:w-[150px]",showDefaultOption:!0,required:!0,error:null==j?void 0:null===(l=j[t])||void 0===l?void 0:l.freightClass,touched:F||(null==N?void 0:null===(s=N[t])||void 0===s?void 0:s.freightClass),disabled:!E||eC.isSubmitting})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-end md:gap-6",children:[(0,n.jsx)(o.Z,{label:"Length (In.)",type:"number",placeholder:"",name:"shipmentItems[".concat(t,"].length"),value:null!==(b=e.length)&&void 0!==b?b:"",width:"w-[calc(50%-0.5rem)] sm:w-[150px]",handleChange:eA,handleBlur:eC.handleBlur,required:!0,error:null==j?void 0:null===(r=j[t])||void 0===r?void 0:r.length,touched:F||(null==N?void 0:null===(u=N[t])||void 0===u?void 0:u.length),disabled:!E||eC.isSubmitting}),(0,n.jsx)(o.Z,{label:"Width (In.)",type:"number",placeholder:"",name:"shipmentItems[".concat(t,"].width"),value:null!==(y=e.width)&&void 0!==y?y:"",width:"w-[calc(50%-0.5rem)] sm:w-[150px]",handleChange:eA,handleBlur:eC.handleBlur,required:!0,error:null==j?void 0:null===(m=j[t])||void 0===m?void 0:m.width,touched:F||(null==N?void 0:null===(p=N[t])||void 0===p?void 0:p.width),disabled:!E||eC.isSubmitting}),(0,n.jsx)(o.Z,{label:"Height (In.)",type:"number",placeholder:"",name:"shipmentItems[".concat(t,"].height"),value:null!==(w=e.height)&&void 0!==w?w:"",width:"w-[calc(50%-0.5rem)] sm:w-[150px]",handleChange:eA,handleBlur:eC.handleBlur,required:!0,error:null==j?void 0:null===(g=j[t])||void 0===g?void 0:g.height,touched:F||(null==N?void 0:null===(x=N[t])||void 0===x?void 0:x.height),disabled:!E||eC.isSubmitting}),(0,n.jsx)(o.Z,{label:"Handling Units",type:"number",placeholder:"",name:"shipmentItems[".concat(t,"].handlingUnits"),value:null!==(C=e.handlingUnits)&&void 0!==C?C:"",width:"w-[calc(50%-0.5rem)] sm:w-[150px]",handleChange:eA,handleBlur:eC.handleBlur,required:!0,error:null==j?void 0:null===(f=j[t])||void 0===f?void 0:f.handlingUnits,touched:F||(null==N?void 0:null===(v=N[t])||void 0===v?void 0:v.handlingUnits),disabled:!E||eC.isSubmitting})]}),(0,n.jsx)("div",{className:"flex items-center my-2",children:(0,n.jsx)(h.o2,{name:"shipmentItems[".concat(t,"].hazardous"),labelText:"Contains Hazardous Materials?",checked:e.hazardous,onChange:()=>eM(t)})}),(0,n.jsx)(o.Z,{label:"Brief description of freight",placeholder:"",name:"shipmentItems[".concat(t,"].description"),width:"",value:e.description,handleChange:eC.handleChange,handleBlur:eC.handleBlur,disabled:!E||eC.isSubmitting})]}),(0,n.jsx)("div",{className:"flex justify-end md:block md:shrink-0 ".concat(0===t?"hidden md:block":""),children:(0,n.jsx)("button",{type:"button",onClick:t>0?()=>e_(t):void 0,tabIndex:t>0?void 0:-1,"aria-hidden":0===t?"true":void 0,"aria-label":"Remove item",className:"p-1 md:mb-[10px] font-ttHovesMedium text-sm transition-colors ".concat(0===t?"invisible pointer-events-none":"hover:text-red-500 text-[#2D433F]"),children:"Remove Item"})})]},t)})}),(0,n.jsxs)("button",{type:"button",onClick:()=>{eC.setFieldValue("shipmentItems",[...eC.values.shipmentItems,{weight:"",freightClass:"",length:null,width:null,height:null,handlingUnits:null,hazardous:!1}])},className:"bg-[#F1F9F5] px-4 py-2 rounded gap-2 flex w-fit",disabled:!E||eC.isSubmitting,children:[(0,n.jsx)(u.i,{additionalClasses:"rotate-45",width:"w-[16px]",height:"h-[16px]"}),(0,n.jsx)("span",{className:"font-ttHovesMedium text-sm text-[#2D433F]",children:"Add Item"})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-8",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("div",{className:"text-xs font-ttHovesMedium text-[#2D433F]",children:"Total Cubic Feet"}),(0,n.jsx)("div",{className:"text-sm font-ttHovesMedium text-[#2D433F]",children:eE>0?eE.toFixed(2):"—"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("div",{className:"text-xs font-ttHovesMedium text-[#2D433F]",children:"Total Pounds"}),(0,n.jsx)("div",{className:"text-sm font-ttHovesMedium text-[#2D433F]",children:eV>
10?eV.toLocaleString():"—"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("div",{className:"text-xs font-ttHovesMedium text-[#2D433F]",children:"PCF (lbs/cu ft)"}),(0,n.jsx)("div",{className:"text-sm font-ttHovesMedium text-[#2D433F]",children:eO>0?eO.toFixed(2):"—"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("div",{className:"text-xs font-ttHovesMedium text-[#2D433F]",children:"Total Handling Units"}),(0,n.jsx)("div",{className:"text-sm font-ttHovesMedium text-[#2D433F]",children:eU>0?eU.toLocaleString():"—"})]})]}),eG&&(0,n.jsx)("div",{className:"text-sm text-red-brand font-ttHovesRegular",children:eG}),(0,n.jsx)("hr",{className:"border border-gray-[#4F4F4F]"})]}),(0,n.jsxs)("section",{className:"flex flex-col gap-8 md:gap-[40px]",children:[(0,n.jsx)("div",{className:"text-[#2D433F] font-ttHovesMedium text-xl md:text-2xl",children:"Additional Services"}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-y-4 gap-x-6 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:N.map(e=>{let{code:t,label:i}=e,a=eC.values.accessorials.includes(t);return(0,n.jsx)(h.o2,{name:"accessorials.".concat(t),labelText:i,checked:a,onChange:()=>eC.setFieldValue("accessorials",a?eC.values.accessorials.filter(e=>e!==t):[...eC.values.accessorials,t])},t)})}),eQ&&(0,n.jsx)("div",{className:"text-sm text-red-brand font-ttHovesRegular",children:eQ})]}),(0,n.jsx)("section",{className:"pt-8 pb-16 md:pt-[40px] md:pb-[120px] flex flex-col gap-4 sm:items-end",children:(0,n.jsx)("button",{type:"submit",disabled:eC.isSubmitting,className:"px-6 py-3 bg-[#2D433F] rounded w-full sm:w-fit disabled:opacity-50 disabled:cursor-not-allowed",children:(0,n.jsx)("span",{className:"text-white font-ttHovesMedium",children:eC.isSubmitting?"Loading...":"Get Your Estimate"})})})]})]})},D=i(11482),P=i(69751),T=i(4298),R=i.n(T);let q=e=>{var t;let i={};null!=e.originZipCode&&(i.originZip=String(e.originZipCode)),e.originAddressLine1&&(i.originAddressLine1=e.originAddressLine1),e.originAddressLine2&&(i.originAddressLine2=e.originAddressLine2),e.originCity&&(i.originCity=e.originCity),e.originState&&(i.originState=e.originState),null!=e.originZip&&(i.originZip=String(e.originZip)),e.originCountry&&(i.originCountry=e.originCountry),null!=e.destinationZipCode&&(i.destinationZip=String(e.destinationZipCode)),e.destinationAddressLine1&&(i.destinationAddressLine1=e.destinationAddressLine1),e.destinationAddressLine2&&(i.destinationAddressLine2=e.destinationAddressLine2),e.destinationCity&&(i.destinationCity=e.destinationCity),e.destinationState&&(i.destinationState=e.destinationState),null!=e.destinationZip&&(i.destinationZip=String(e.destinationZip)),e.destinationCountry&&(i.destinationCountry=e.destinationCountry);let n=(null!==(t=e.details)&&void 0!==t?t:[]).map(e=>({weight:null!=e.weight?String(e.weight):"",freightClass:null!=e.nmfcClass?String(e.nmfcClass):"",length:null!=e.length?Number(e.length):null,width:null!=e.width?Number(e.width):null,height:null!=e.height?Number(e.height):null,handlingUnits:null!=e.units?Number(e.units):null,hazardous:!1,description:""})).filter(e=>[e.weight,e.freightClass,e.length,e.width,e.height,e.handlingUnits].some(e=>""!==e));if(n.length>0&&(i.shipmentItems=n),Array.isArray(e.accessorials)&&e.accessorials.length>0){let t=e.accessorials.filter(e=>N.some(t=>t.code===e));t.length>0&&(i.accessorials=t)}return i};function _(){let e=(0,m.useRouter)(),{metaTitle:t,metaDescription:i}=D.attributes,s="AIzaSyB0Psz4QdAxoZzLSS2_LrFv1cwmGV1BnPQ",[r,o]=(0,l.useState)(void 0),[d,c]=(0,l.useState)(!1),u=(0,P.K)(),h=e.query.requote,p=e.query.quoteId,g=null!=p?p:h;return(0,l.useEffect)(()=>{if(!e.isReady)return;if(!g||"string"==typeof g&&""===g.trim()){o(void 0);return}let t=Array.isArray(g)?g[0]:g,i=!1;return fetch("/api/internal-api/quotes/".concat(encodeURIComponent(t))).then(async e=>{if(i||!e.ok)return;let t=(await e.json()).quote;t&&o(q(t))}).catch(()=>{if(i)return}),()=>{i=!0}},[e.isReady,g]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{title:t,description:i}),s&&u&&(0,n.jsx)(R(),{id:"google-places",src:"https://maps.googleapis.com/ma
1ps/api/js?key=".concat(encodeURIComponent(s),"&v=weekly&libraries=places"),strategy:"afterInteractive",onLoad:()=>c(!0),onReady:()=>c(!0)}),(0,n.jsx)("main",{children:(0,n.jsx)("section",{className:"px-4 py-8 m-auto md:px-11 md:py-12 lg:py-20 max-w-[1440px] w-full flex items-start",children:(0,n.jsx)(L,{initialValues:r,googlePlacesReady:d})})})]})}},23748:function(e,t,i){"use strict";i.d(t,{Q:function(){return l},s:function(){return a}});let n=function(e,t){var i,n,a,l;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"long_name",r=e.find(e=>e.types.includes(t));return r?"short_name"===s?null!==(n=null!==(i=r.short_name)&&void 0!==i?i:r.shortText)&&void 0!==n?n:"":null!==(l=null!==(a=r.long_name)&&void 0!==a?a:r.longText)&&void 0!==l?l:"":""},a=e=>{var t,i;let a=null!==(i=null!==(t=e.address_components)&&void 0!==t?t:e.addressComponents)&&void 0!==i?i:[];return{street:[n(a,"street_number"),n(a,"route")].filter(Boolean).join(" "),city:n(a,"locality")||n(a,"postal_town")||n(a,"sublocality")||n(a,"administrative_area_level_2"),state:n(a,"administrative_area_level_1","short_name"),zip:n(a,"postal_code","short_name"),country:n(a,"country","short_name")||"US"}},l=e=>{var t,i;return null!==(i=null==e?void 0:null===(t=e.toString().match(/\d{5}/))||void 0===t?void 0:t[0])&&void 0!==i?i:""}},55240:function(e,t,i){"use strict";i.d(t,{B:function(){return n}});let n=async e=>{let{action:t,category:i,label:n,value:a}=e;try{var l;window.gtag&&(null===(l=window)||void 0===l||l.gtag("event",t,{event_category:i,event_label:n,value:a}))}catch(e){console.log("GA Error",e)}}},64417:function(e,t,i){"use strict";i.d(t,{It:function(){return a},RW:function(){return r},h2:function(){return n},i$:function(){return l}});let n=e=>(null==e?void 0:e.quoteNumber)||(null==e?void 0:e.quoteId)||void 0,a=e=>["quote",e];class l extends Error{constructor(e){super("Quote ".concat(e," was not found")),this.name="QuoteNotFoundError"}}let s=async e=>{let t=await fetch("/api/internal-api/quotes/".concat(encodeURIComponent(e)));if(404===t.status)throw new l(e);if(!t.ok)throw Error("Failed to fetch quote ".concat(e));let i=await t.json();if(!i.quote)throw new l(e);return i},r=async e=>{try{return await s(e)}catch(t){return await new Promise(e=>setTimeout(e,2e3)),s(e)}}},9008:function(e,t,i){e.exports=i(23867)}},function(e){e.O(0,[501,888,774,179],function(){return e(e.s=40423)}),_N_E=e.O()}]);
2//# sourceMappingURL=rate-estimate-1dd33bde92f9f70b.js.map

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.