1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7990],{27990:function(e,s,a){a.r(s),a.d(s,{default:function(){return p}});var n=a(85893),l=a(67294),i=a(4696),r=a(68901),t=a(67814),c=a(59417),o=a(47041),m=a(25675),d=a.n(m);function p(){let e=(0,o.getCookie)("STYXKEY_USER_EMAIL"),s=e?e.toString():"",[a,m]=(0,l.useState)(""),[p,u]=(0,l.useState)(null),[h,j]=(0,l.useState)(""),[x,g]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1),[v,N]=(0,l.useState)([]),[w,y]=(0,l.useState)([]),_=(0,l.useCallback)((e,s)=>{(null==e?void 0:e.length)&&N(s=>[...s,...e.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)}))]),(null==s?void 0:s.length)&&y(e=>[...e,...s])},[]),{getRootProps:E,getInputProps:S,isDragActive:k}=(0,r.uI)({accept:{"image/jpeg":[],"image/png":[],"application/pdf":[],"application/msword":[],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[]},maxSize:20971520,maxFiles:3,onDrop:_});(0,l.useEffect)(()=>()=>v.forEach(e=>URL.revokeObjectURL(e.preview)),[v]);let F=e=>{N(s=>s.filter(s=>s.name!==e))},L=()=>{N([]),y([])},R=e=>{y(s=>s.filter(s=>{let{file:a}=s;return a.name!==e}))},C=async e=>{m(""),j(""),u("");let s=new FormData(e.target);(null==v?void 0:v.length)&&v.forEach((e,a)=>{0==a&&s.append("input_7",e),1==a&&s.append("input_8",e),2==a&&s.append("input_9",e)}),e.preventDefault(),g(!0);try{let a=await fetch("".concat(i.wQ,"gf/v2/forms/").concat(i.Rg,"/submissions"),{method:"POST",body:s}),n=await a.json();if(g(!1),n&&n.is_valid)b(!0),j(n.message),e.target.reset(),L(),j(n.confirmation_message);else{let e=n&&n.validation_messages?n.validation_messages:[];return u(e),!1}}catch(e){console.error("Error while fetching PWS API:",e),m("There was a problem with your submission")}g(!1)};return(0,n.jsxs)("section",{className:"form-ss",children:[(0,n.jsx)("h3",{children:"Thanks for dropping us a note! We love hearing from you. You can also call the show between 12pm and 3pm Eastern Time: 1-800-282-2882"}),(0,n.jsx)("hr",{}),(0,n.jsxs)("form",{onSubmit:C,encType:"multipart/form-data",children:[(0,n.jsx)("input",{type:"hidden",name:"input_6",value:s}),(0,n.jsxs)("div",{className:"form-group",children:[(0,n.jsx)("label",{htmlFor:"cnb-name",children:"Name *"}),(0,n.jsx)("input",{type:"text",id:"cnb-name",name:"input_1",placeholder:"Enter your name",required:!0})]}),(0,n.jsxs)("div",{className:"form-group",children:[(0,n.jsx)("label",{htmlFor:"cnb-email",children:"Email *"}),(0,n.jsx)("input",{type:"email",id:"cnb-email",name:"input_3",placeholder:"Enter your email address",required:!0})]}),(0,n.jsxs)("div",{className:"form-group",children:[(0,n.jsx)("label",{htmlFor:"cnb-subject",children:"Subject *"}),(0,n.jsx)("input",{type:"text",id:"cnb-subject",name:"input_4",placeholder:"Enter subject",required:!0})]}),(0,n.jsxs)("div",{className:"form-group",children:[(0,n.jsx)("label",{htmlFor:"cnb-message",children:"Note to Clay and Buck"}),(0,n.jsx)("textarea",{id:"cnb-message",name:"input_5",placeholder:"Enter your message"})]}),(0,n.jsxs)("div",{className:"form-group",children:[(0,n.jsx)("label",{children:"Attach a file"}),(0,n.jsxs)("div",{...E({className:"cnb-file-upload"}),children:[(0,n.jsx)("input",{...S()}),(0,n.jsxs)("div",{className:"drop-area",children:[(0,n.jsx)(t.G,{icon:c.cf$}),k?(0,n.jsx)("p",{children:"Drop a file here ..."}):(0,n.jsx)("p",{children:"Drag & drop a file here, or click to select a file"}),(0,n.jsx)("em",{children:"(MaxFiles: 3, Maxsize: 20mb and File allowed: .jpg, .png, .doc, .docx, .pdf)"})]})]}),(0,n.jsxs)("section",{className:"",children:[(0,n.jsx)("ul",{className:"accepted-files",children:v.map(e=>(0,n.jsxs)("li",{children:[(0,n.jsxs)("div",{children:["application/pdf"==e.type&&(0,n.jsx)(t.G,{className:"pdf-file",icon:c.gSj}),("application/msword"==e.type||"application/vnd.openxmlformats-officedocument.wordprocessingml.document"==e.type)&&(0,n.jsx)(t.G,{className:"word-file",icon:c.Mfv}),("image/jpeg"==e.type||"image/png"==e.type)&&(0,n.jsx)(d(),{className:"image-file",src:e.preview,alt:e.name,width:30,height:30,onLoad:()=>{URL.revokeObjectURL(e.preview)}}),(0,n.jsx)("p",{children:e.name})]}),(0,n.jsx)("button",{type:"button",className:"btn-remove",onClick:()=>F(e.name),children:(0,n.jsx)(t.G,{icon:c.$9F})})]},e.name))}),w.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h3",{className:"error-files-head",children:"Error Files"}),(0,n.jsx)("ul",{className:"error-files",children:w.map(e=>{let{file:s,errors:a}=e;return(0,n.jsx)("li",{children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"top-row",children:[(0,n.jsx)("p",{children:s.name}),(0,n.jsx)("button",{className:"btn-remove",type:"button",onClick:()=>R(s.name),children:"REMOVE"})]}),(0,n.jsx)("ul",{className:"error-msg",children:a.map(e=>(0,n.jsxs)("li",{children:["- ",e.message]},e.code))})]})},s.name)})})]})]})]}),a&&(0,n.jsx)("p",{className:"error-msg",children:a}),p&&(0,n.jsxs)("p",{className:"error-msg",children:[p[1]&&(0,n.jsxs)("span",{children:["Name: ",p[1]]}),p[3]&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{children:["Email: ",p[3]]}),(0,n.jsx)("br",{})]}),p[4]&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{children:["Subject: ",p[4]]}),(0,n.jsx)("br",{})]})]}),(0,n.jsx)("div",{className:"form-group",children:(0,n.jsx)("button",{type:"submit",className:x?"btn-submit loading":"btn-submit",children:x?(0,n.jsx)("span",{className:"cnb-spinner-loading"}):(0,n.jsx)("span",{children:"Send a message"})})})]}),f&&h&&(0,n.jsx)("div",{className:"success-msg",dangerouslySetInnerHTML:{__html:h}})]})}}}]);
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.