1"use strict";(self.webpackChunkplatform_web=self.webpackChunkplatform_web||[]).push([[217],{217:function(e,n,t){t.r(n),t.d(n,{NewExternalContentRequestPage:function(){return de}});var r,i,o,a,l,d,s,c,u,p,x,h,m,f,b,g,v,j,Z,q,w,y,P,k,z=t(74165),S=t(15861),_=t(4942),C=t(1413),N=t(29439),F=t(30168),T=t(50390),D=t(15545),I=t(96692),A=t(32804),R=t(62559),E=I.ZP.div(r||(r=(0,F.Z)(["\n min-height: 100vh;\n background: #f5f6f8;\n padding: 40px 20px;\n"]))),L=I.ZP.div(i||(i=(0,F.Z)(["\n max-width: 720px;\n margin: 0 auto;\n background: #fff;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n padding: 32px;\n"]))),U=I.ZP.div(o||(o=(0,F.Z)(["\n margin-bottom: 24px;\n border-bottom: 1px solid #e8eaed;\n padding-bottom: 16px;\n"]))),G=I.ZP.div(a||(a=(0,F.Z)(["\n font-size: 13px;\n color: #6b7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 8px;\n"]))),O=I.ZP.h1(l||(l=(0,F.Z)(["\n font-size: 24px;\n font-weight: 600;\n color: #1a1a2e;\n margin: 0;\n"]))),V=I.ZP.p(d||(d=(0,F.Z)(["\n font-size: 14px;\n color: #6b7280;\n margin: 8px 0 0;\n line-height: 1.5;\n"]))),W=I.ZP.div(s||(s=(0,F.Z)(["\n background: #fef3cd;\n border: 1px solid #ffc107;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 20px;\n color: #856404;\n font-size: 14px;\n"]))),Y=I.ZP.div(c||(c=(0,F.Z)(["\n margin-bottom: 20px;\n"]))),B=I.ZP.label(u||(u=(0,F.Z)(["\n display: block;\n font-size: 12px;\n font-weight: 600;\n color: #6b7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 6px;\n"]))),H=I.ZP.span(p||(p=(0,F.Z)(["\n color: #dc2626;\n margin-left: 2px;\n"]))),J=I.ZP.input(x||(x=(0,F.Z)(["\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 15px;\n font-family: inherit;\n color: #1a1a2e;\n box-sizing: border-box;\n\n &:focus {\n outline: none;\n border-color: #2563eb;\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n }\n"]))),K=I.ZP.select(h||(h=(0,F.Z)(["\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 15px;\n font-family: inherit;\n color: #1a1a2e;\n box-sizing: border-box;\n background: #fff;\n\n &:focus {\n outline: none;\n border-color: #2563eb;\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n }\n"]))),M=I.ZP.p(m||(m=(0,F.Z)(["\n font-size: 15px;\n color: #4b5563;\n line-height: 1.5;\n white-space: pre-line;\n margin: 0 0 8px;\n"]))),Q=I.ZP.a(f||(f=(0,F.Z)(["\n font-size: 15px;\n color: #2563eb;\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n"]))),X=I.ZP.textarea(b||(b=(0,F.Z)(["\n width: 100%;\n padding: 10px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 15px;\n font-family: inherit;\n color: #1a1a2e;\n resize: vertical;\n min-height: 120px;\n box-sizing: border-box;\n\n &:focus {\n outline: none;\n border-color: #2563eb;\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);\n }\n"]))),$=I.ZP.div(g||(g=(0,F.Z)(["\n display: flex;\n gap: 24px;\n flex-wrap: wrap;\n\n & > "," {\n flex: 1;\n min-width: 200px;\n }\n"])),Y),ee=I.ZP.label(v||(v=(0,F.Z)(["\n display: flex;\n align-items: flex-start;\n gap: 8px;\n font-size: 14px;\n color: #374151;\n margin-bottom: 20px;\n cursor: pointer;\n line-height: 1.5;\n"]))),ne=I.ZP.button(j||(j=(0,F.Z)(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 12px 28px;\n background: #2563eb;\n color: #fff;\n border: none;\n border-radius: 6px;\n font-size: 15px;\n font-weight: 600;\n cursor: pointer;\n\n &:hover:not(:disabled) {\n background: #1d4ed8;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n"]))),te=I.ZP.div(Z||(Z=(0,F.Z)(["\n background: #fee2e2;\n border: 1px solid #fca5a5;\n color: #b91c1c;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 20px;\n font-size: 14px;\n"]))),re=I.ZP.div(q||(q=(0,F.Z)(["\n text-align: center;\n padding: 40px 0;\n"]))),ie=I.ZP.h2(w||(w=(0,F.Z)(["\n font-size: 22px;\n font-weight: 600;\n color: #1a7f37;\n margin: 0 0 8px;\n"]))),oe=I.ZP.p(y||(y=(0,F.Z)(["\n font-size: 15px;\n color: #4b5563;\n margin: 0;\n"]))),ae=I.ZP.div(P||(P=(0,F.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 300px;\n font-size: 16px;\n color: #6b7280;\n"]))),le=I.ZP.div(k||(k=(0,F.Z)(["\n max-width: 720px;\n margin: 60px auto;\n text-align: center;
1\n color: #dc2626;\n font-size: 16px;\n"]))),de=function(){var e,n,t,r,i,o,a,l,d,s=(0,D.UO)().shareToken,c=(0,D.s0)(),u=(0,T.useRef)(s),p=(0,T.useState)(null),x=(0,N.Z)(p,2),h=x[0],m=x[1],f=(0,T.useState)(!0),b=(0,N.Z)(f,2),g=b[0],v=b[1],j=(0,T.useState)(null),Z=(0,N.Z)(j,2),q=Z[0],w=Z[1],y=(0,T.useState)({projectTitle:"",description:"",firstName:"",lastName:"",email:"",department:"",dueDate:"",audienceId:"",pillarId:"",termsAccepted:!1}),P=(0,N.Z)(y,2),k=P[0],F=P[1],I=(0,T.useState)({}),de=(0,N.Z)(I,2),se=de[0],ce=de[1],ue=(0,T.useState)(!1),pe=(0,N.Z)(ue,2),xe=pe[0],he=pe[1],me=(0,T.useState)(null),fe=(0,N.Z)(me,2),be=fe[0],ge=fe[1],ve=(0,T.useState)(!1),je=(0,N.Z)(ve,2),Ze=je[0],qe=je[1];(0,T.useEffect)((function(){s&&(u.current=s,v(!0),w(null),m(null),ce({}),F({projectTitle:"",description:"",firstName:"",lastName:"",email:"",department:"",dueDate:"",audienceId:"",pillarId:"",termsAccepted:!1}),qe(!1),ge(null),he(!1),A.ZP.get("/ext/content_requests/new/".concat(s,".json")).then((function(e){m(e.data.contentRequestForm)})).catch((function(e){var n;404===(null===(n=e.response)||void 0===n?void 0:n.status)?w("This content request form could not be found."):w("Something went wrong loading this content request form.")})).finally((function(){return v(!1)})))}),[s]);var we=function(e,n){F((function(t){return(0,C.Z)((0,C.Z)({},t),{},(0,_.Z)({},e,n))}))},ye=function(){var e=(0,S.Z)((0,z.Z)().mark((function e(n){var t,r,i,o,a,l,d,p,x,m,f;return(0,z.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.preventDefault(),h&&s){e.next=3;break}return e.abrupt("return");case 3:if(t=s,void 0!==h.id&&null!==h.id){e.next=7;break}return ge("Something went wrong loading this form. Please refresh and try again."),e.abrupt("return");case 7:return he(!0),ge(null),r=(h.questions||[]).map((function(e,n){return{label:e.label,required:e.required,value:se[n]||""}})),"/api/v1/external/content_requests",e.prev=11,e.next=14,A.ZP.post("/api/v1/external/content_requests",{content_request_form_id:String(h.id),project_title:k.projectTitle,description:k.description,external_user:{first_name:k.firstName,last_name:k.lastName,email:k.email},department:k.department||void 0,due_date:k.dueDate||void 0,audience_id:k.audienceId||void 0,pillar_id:k.pillarId||void 0,questions:r,terms_and_conditions:k.termsAccepted});case 14:if(l=e.sent,u.current===t){e.next=17;break}return e.abrupt("return");case 17:if(!(d=null===l||void 0===l||null===(i=l.data)||void 0===i||null===(o=i.data)||void 0===o||null===(a=o.attributes)||void 0===a?void 0:a.shareToken)){e.next=21;break}return c("/ext/content_requests/".concat(d)),e.abrupt("return");case 21:qe(!0),e.next=32;break;case 24:if(e.prev=24,e.t0=e.catch(11),u.current===t){e.next=28;break}return e.abrupt("return");case 28:m=e.t0,f=null===(p=m.response)||void 0===p||null===(x=p.data)||void 0===x?void 0:x.errors,ge("string"===typeof f?f:"We could not submit your content request. Please check the form and try again.");case 32:return e.prev=32,u.current===t&&he(!1),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[11,24,32,35]])})));return function(n){return e.apply(this,arguments)}}();if(g)return(0,R.jsx)(E,{children:(0,R.jsx)(ae,{children:"Loading..."})});if(q||!h)return(0,R.jsx)(E,{children:(0,R.jsx)(le,{children:q||"Content request form not found."})});if(h.deleted)return(0,R.jsx)(E,{children:(0,R.jsxs)(L,{children:[(0,R.jsxs)(U,{children:[(0,R.jsx)(G,{children:"Content Request"}),(0,R.jsx)(O,{children:"This form is no longer accepting submissions"})]}),(0,R.jsx)(W,{children:"This content request form has been removed and can no longer receive new submissions."})]})});if(Ze)return(0,R.jsx)(E,{children:(0,R.jsx)(L,{children:(0,R.jsxs)(re,{children:[(0,R.jsx)(ie,{children:"Thank you!"}),(0,R.jsx)(oe,{children:"Your content request has been submitted. The team will review it shortly."})]})})});var Pe=(h.questions||[]).every((function(e,n){return!e.required||""!==(se[n]||"").trim()})),ke=""!==k.projectTitle.trim()&&""!==k.description.trim()&&""!==k.firstName.trim()&&""!==k.lastName.trim()&&""!==k.email.trim()&&k.termsAccepted&&Pe&&!xe;return(0,R.jsx)(E,{children:(0,R.jsxs)(L,{children:[(0,R.jsxs)(U,{children:[(0,R.jsx)(G,{children:h.publicationName||"Content Request"}),(0,R.jsx)(O,{children:h.name||"Submit a content request"}),(0,R.jsx)(V,{children:"Fill out the form below to submit your content request. Fields marked with an asterisk are required."}),h.instructions&&(0,R.jsx)(M,{children:h.instructions}),h.fileUrl&&(0,R.jsx)(Q,{href:h.fileUrl,target:"_blank",rel:"noopener noreferrer",children:"Download attached materials"})]}),be&&(0,R.jsx)(te,{children:be}),(0,R.jsxs)("form",{onSubmit:ye,noValidate:!0,children:[(0,R.jsxs)(Y,{children:[(0,R.jsxs)(B,{htmlFor:"cr-project-title",children:["Project Title",(0,R.jsx)(H,{children:"*"})]}),(0,R.jsx)(J,{id:"cr-project-title",type:"text",value:k.projectTitle,maxLength:255,onChange:function(e){return we("projectTitle",e.target.value)},placeholder:"Give your request a title",required:!0})]}),(0,R.jsxs)($,{children:[(0,R.jsxs)(Y,{children:[(0,R.jsxs)(B,{htmlFor:"cr-first-name",children:["First Name",(0,R.jsx)(H,{children:"*"})]}),(0,R.jsx)(J,{id:"cr-first-name",type:"text",value:k.firstName,onChange:function(e){return we("firstName",e.target.value)},required:!0})]}),(0,R.jsxs)(Y,{children:[(0,R.jsxs)(B,{htmlFor:"cr-last-name",children:["Last Name",(0,R.jsx)(H,{children:"*"})]}),(0,R.jsx)(J,{id:"cr-last-name",type:"text",value:k.lastName,onChange:function(e){return we("lastName",e.target.value)},required:!0})]})]}),(0,R.jsxs)(Y,{children:[(0,R.jsxs)(B,{htmlFor:"cr-email",children:["Email",(0,R.jsx)(H,{children:"*"})]}),(0,R.jsx)(J,{id:"cr-email",type:"email",value:k.email,onChange:function(e){return we("email",e.target.value)},placeholder:"[email protected]",required:!0})]}),(0,R.jsxs)(Y,{children:[(0,R.jsx)(B,{htmlFor:"cr-department",children:"Department"}),(0,R.jsx)(J,{id:"cr-department",type:"text",value:k.department,onChange:function(e){return we("department",e.target.value)}})]}),(0,R.jsxs)(Y,{children:[(0,R.jsx)(B,{htmlFor:"cr-due-date",children:"Due Date"}),(0,R.jsx)(J,{id:"cr-due-date",type:"date",value:k.dueDate,onChange:function(e){return we("dueDate",e.target.value)}})]}),(0,R.jsxs)(Y,{children:[(0,R.jsxs)(B,{htmlFor:"cr-description",children:["Description",(0,R.jsx)(H,{children:"*"})]}),(0,R.jsx)(X,{id:"cr-description",value:k.description,onChange:function(e){return we("description",e.target.value)},placeholder:"Describe what you need...",required:!0})]}),h.includeAudience&&(null!==(e=null===(n=h.audiences)||void 0===n?void 0:n.length)&&void 0!==e?e:0)>0&&(0,R.jsxs)(Y,{children:[(0,R.jsx)(B,{htmlFor:"cr-audience",children:"Audience"}),(0,R.jsxs)(K,{id:"cr-audience",value:k.audienceId,onChange:function(e){return we("audienceId",e.target.value)},children:[(0,R.jsx)("option",{value:"",children:"Select an audie
1nce"}),null===(t=h.audiences)||void 0===t?void 0:t.map((function(e){return(0,R.jsx)("option",{value:String(e.id),children:e.name},e.id)}))]})]}),h.includePillar&&(null!==(r=null===(i=h.pillars)||void 0===i?void 0:i.length)&&void 0!==r?r:0)>0&&(0,R.jsxs)(Y,{children:[(0,R.jsx)(B,{htmlFor:"cr-pillar",children:"Pillar"}),(0,R.jsxs)(K,{id:"cr-pillar",value:k.pillarId,onChange:function(e){return we("pillarId",e.target.value)},children:[(0,R.jsx)("option",{value:"",children:"Select a pillar"}),null===(o=h.pillars)||void 0===o?void 0:o.map((function(e){return(0,R.jsx)("option",{value:String(e.id),children:e.name},e.id)}))]})]}),(null!==(a=null===(l=h.questions)||void 0===l?void 0:l.length)&&void 0!==a?a:0)>0&&(null===(d=h.questions)||void 0===d?void 0:d.map((function(e,n){return(0,R.jsxs)(Y,{children:[(0,R.jsxs)(B,{htmlFor:"cr-question-".concat(n),children:[e.label,e.required&&(0,R.jsx)(H,{children:"*"})]}),(0,R.jsx)(J,{id:"cr-question-".concat(n),type:"text",value:se[n]||"",required:e.required,onChange:function(e){return ce((function(t){return(0,C.Z)((0,C.Z)({},t),{},(0,_.Z)({},n,e.target.value))}))}})]},"".concat(e.label,"-").concat(n))}))),(0,R.jsxs)(ee,{children:[(0,R.jsx)("input",{type:"checkbox",checked:k.termsAccepted,onChange:function(e){return we("termsAccepted",e.target.checked)}}),(0,R.jsxs)("span",{children:["I agree to the terms and conditions.",(0,R.jsx)(H,{children:"*"})]})]}),(0,R.jsx)(ne,{type:"submit",disabled:!ke,children:xe?"Submitting...":"Submit Request"})]})]})})};n.default=de}}]); 2//# sourceMappingURL=217.5b801fee.chunk.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.