PageSourceSearch

https://dashboard.goldenvolunteer.com/_next/static/chunks/2551-196205ec4f607b78.js

js goldenvolunteer.com collected 2026-09-24 10:55:16 UTC 47,743 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2551],{6602:(e,t,i)=>{"use strict";i.d(t,{A:()=>tn});var a,n=i(37876),r=i(14232),o=i(41946),l=i.n(o),s=i(63847),p=i.n(s),d=i(7766),c=i.n(d),u=i(45182),m=i(58103),g=i.n(m),h=i(87701),f=i(67906),y=i(80553),v=i(44395),b=i(92003),x=i(71733),j=i(10841),w=i.n(j),C=i(93007),A=i.n(C),S=i(30054),k=i.n(S);let T=["images","waivers","timeslots","futureTimeslots","pastTimeslots","location","targetAffiliations","targetGroups","nextAvailableTimeslot","timeslot","dayOfService","credential"].reduce((e,t)=>(e[t]=!0,e),{}),W=(e,t)=>k()(e,t,(e,t,i)=>w().isMoment(t)?t.clone():A()(t)||T[i]?t:void 0);var L=i(53674),R=i(26330),B=i(91810),z=i(75620),N=i(54208),M=i(74098),P=i(41510);let O=e=>{let t,{keyToFocus:i,prevValues:a={},values:n={}}=e;a&&(t=i||Object.keys((0,P.A)(n,a))[0],setTimeout(()=>{let e=t&&document.getElementsByName(t)[0];e&&(0,M.A)(e)},50))};var I=i(40435),F=i(15758),E=i(35883),D=i(44725);let H=e=>{let{t,toggleVisibility:i}=e;return(0,n.jsx)(z.A,{open:!0,title:t("whoopsOppTypes","Whooops! Missing opportunity types"),toggleVisibility:i,children:t("cantCreateAnyType","Your org does not support the creation of any opportunities. Contact your adminstrator or [email protected]")})},G=e=>{let{t,toggleVisibility:i}=e;return(0,n.jsx)(z.A,{open:!0,title:t("whoopsOppTypes","Whooops! Missing opportunity types"),toggleVisibility:i,children:t("cantCreateThatTypePermissions","You cannot edit that opportunity type in the new experience, either because we do not support it yet or your org no longer has support for this opportunity type. Sorry about that!")})};var V=i(12815),U=i(53221),_=i(35268),q=i(77573),Y=i(13227),K=i(18723);function X(e){return(0,K.Ay)("MuiStepper",e)}(0,Y.A)("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);var J=i(98428),Q=i(34723);let Z=r.createContext({}),$=r.createContext({});function ee(e){return(0,K.Ay)("MuiStepConnector",e)}(0,Y.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);let et=(0,_.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.root,t[i.orientation],i.alternativeLabel&&t.alternativeLabel,i.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),ei=(0,_.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.line,t["line".concat((0,J.A)(i.orientation))]]}})((0,Q.A)(e=>{let{theme:t}=e,i="light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[600];return{display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:i,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),ea=r.forwardRef(function(e,t){let i=(0,q.b)({props:e,name:"MuiStepConnector"}),{className:a,...o}=i,{alternativeLabel:l,orientation:s="horizontal"}=r.useContext(Z),{active:p,disabled:d,completed:c}=r.useContext($),u={...i,alternativeLabel:l,orientation:s,active:p,completed:c,disabled:d},m=(e=>{let{classes:t,orientation:i,alternativeLabel:a,active:n,completed:r,disabled:o}=e,l={root:["root",i,a&&"alternativeLabel",n&&"active",r&&"completed",o&&"disabled"],line:["line","line".concat((0,J.A)(i))]};return(0,U.A)(l,ee,t)})(u);return(0,n.jsx)(et,{className:(0,V.A)(m.root,a),ref:t,ownerState:u,...o,children:(0,n.jsx)(ei,{className:m.line,ownerState:u})})}),en=(0,_.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.root,t[i.orientation],i.alternativeLabel&&t.alternativeLabel,i.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),er=(0,n.jsx)(ea,{}),eo=r.forwardRef(function(e,t){let i=(0,q.b)({props:e,name:"MuiStepper"}),{activeStep:a=0,alternativeLabel:o=!1,children:l,className:s,component:p="div",connector:d=er,n
1onLinear:c=!1,orientation:u="horizontal",...m}=i,g={...i,nonLinear:c,alternativeLabel:o,orientation:u,component:p},h=(e=>{let{orientation:t,nonLinear:i,alternativeLabel:a,classes:n}=e;return(0,U.A)({root:["root",t,i&&"nonLinear",a&&"alternativeLabel"]},X,n)})(g),f=r.Children.toArray(l).filter(Boolean),y=f.map((e,t)=>r.cloneElement(e,{index:t,last:t+1===f.length,...e.props})),v=r.useMemo(()=>({activeStep:a,alternativeLabel:o,connector:d,nonLinear:c,orientation:u}),[a,o,d,c,u]);return(0,n.jsx)(Z.Provider,{value:v,children:(0,n.jsx)(en,{as:p,ownerState:g,className:(0,V.A)(h.root,s),ref:t,...m,children:y})})});function el(e){return(0,K.Ay)("MuiStep",e)}(0,Y.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);let es=(0,_.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.root,t[i.orientation],i.alternativeLabel&&t.alternativeLabel,i.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),ep=r.forwardRef(function(e,t){let i=(0,q.b)({props:e,name:"MuiStep"}),{active:a,children:o,className:l,component:s="div",completed:p,disabled:d,expanded:c=!1,index:u,last:m,...g}=i,{activeStep:h,connector:f,alternativeLabel:y,orientation:v,nonLinear:b}=r.useContext(Z),[x=!1,j=!1,w=!1]=[a,p,d];h===u?x=void 0===a||a:!b&&h>u?j=void 0===p||p:!b&&h<u&&(w=void 0===d||d);let C=r.useMemo(()=>({index:u,last:m,expanded:c,icon:u+1,active:x,completed:j,disabled:w}),[u,m,c,x,j,w]),A={...i,active:x,orientation:v,alternativeLabel:y,completed:j,disabled:w,expanded:c,component:s},S=(e=>{let{classes:t,orientation:i,alternativeLabel:a,completed:n}=e;return(0,U.A)({root:["root",i,a&&"alternativeLabel",n&&"completed"]},el,t)})(A),k=(0,n.jsxs)(es,{as:s,className:(0,V.A)(S.root,l),ref:t,ownerState:A,...g,children:[f&&y&&0!==u?f:null,o]});return(0,n.jsx)($.Provider,{value:C,children:f&&!y&&0!==u?(0,n.jsxs)(r.Fragment,{children:[f,k]}):k})});var ed=i(15247),ec=i(87225);let eu=(0,ec.A)((0,n.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),em=(0,ec.A)((0,n.jsx)("path",{d:"M1 21h22L12 2 
11 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var eg=i(37387);function eh(e){return(0,K.Ay)("MuiStepIcon",e)}let ef=(0,Y.A)("MuiStepIcon",["root","active","completed","error","text"]),ey=(0,_.Ay)(eg.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})((0,Q.A)(e=>{let{theme:t}=e;return{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,["&.".concat(ef.completed)]:{color:(t.vars||t).palette.primary.main},["&.".concat(ef.active)]:{color:(t.vars||t).palette.primary.main},["&.".concat(ef.error)]:{color:(t.vars||t).palette.error.main}}})),ev=(0,_.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})((0,Q.A)(e=>{let{theme:t}=e;return{fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}})),eb=r.forwardRef(function(e,t){let i=(0,q.b)({props:e,name:"MuiStepIcon"}),{active:r=!1,className:o,completed:l=!1,error:s=!1,icon:p,...d}=i,c={...i,active:r,completed:l,error:s},u=(e=>{let{classes:t,active:i,completed:a,error:n}=e;return(0,U.A)({root:["root",i&&"active",a&&"completed",n&&"error"],text:["text"]},eh,t)})(c);if("number"==typeof p||"string"==typeof p){let e=(0,V.A)(o,u.root);return s?(0,n.jsx)(ey,{as:em,className:e,ref:t,ownerState:c,...d}):l?(0,n.jsx)(ey,{as:eu,className:e,ref:t,ownerState:c,...d}):(0,n.jsxs)(ey,{className:e,ref:t,ownerState:c,...d,children:[a||(a=(0,n.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,n.jsx)(ev,{className:u.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:c,children:p})]})}return p});function ex(e){return(0,K.Ay)("MuiStepLabel",e)}let ej=(0,Y.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]);var ew=i(24369);
1let eC=(0,_.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.root,t[i.orientation]]}})({display:"flex",alignItems:"center",["&.".concat(ej.alternativeLabel)]:{flexDirection:"column"},["&.".concat(ej.disabled)]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),eA=(0,_.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})((0,Q.A)(e=>{let{theme:t}=e;return{...t.typography.body2,display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),["&.".concat(ej.active)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(ej.completed)]:{color:(t.vars||t).palette.text.primary,fontWeight:500},["&.".concat(ej.alternativeLabel)]:{marginTop:16},["&.".concat(ej.error)]:{color:(t.vars||t).palette.error.main}}})),eS=(0,_.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,["&.".concat(ej.alternativeLabel)]:{paddingRight:0}}),ek=(0,_.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((0,Q.A)(e=>{let{theme:t}=e;return{width:"100%",color:(t.vars||t).palette.text.secondary,["&.".concat(ej.alternativeLabel)]:{textAlign:"center"}}})),eT=r.forwardRef(function(e,t){let i=(0,q.b)({props:e,name:"MuiStepLabel"}),{children:a,className:o,componentsProps:l={},error:s=!1,icon:p,optional:d,slots:c={},slotProps:u={},StepIconComponent:m,StepIconProps:g,...h}=i,{alternativeLabel:f,orientation:y}=r.useContext(Z),{active:v,disabled:b,completed:x,icon:j}=r.useContext($),w=p||j,C=m;w&&!C&&(C=eb);let A={...i,active:v,alternativeLabel:f,completed:x,disabled:b,error:s,orientation:y},S=(e=>{let{classes:t,orientation:i,active:a,completed:n,error:r,disabled:o,alternativeLabel:l}=e;return(0,U.A)({root:["root",i,r&&"error",o&&"disabled",l&&"alternativeLabel"],label:["label",a&&"active",n&&"completed",r&&"error",o&&"disabled",l&&"alternativeLabel"],iconContainer:["iconContainer",a&&"active",n&&"completed",r&&"error",o&&"disabled",l&&"alternativeLabel"],labelContainer:["labelContainer",l&&"alternativeLabel"]},ex,t)})(A),k={slots:c,slotProps:{stepIcon:g,...l,...u}},[T,W]=(0,ew.A)("root",{elementType:eC,externalForwardedProps:{...k,...h},ownerState:A,ref:t,className:(0,V.A)(S.root,o)}),[L,R]=(0,ew.A)("label",{elementType:eA,externalForwardedProps:k,ownerState:A}),[B,z]=(0,ew.A)("stepIcon",{elementType:C,externalForwardedProps:k,ownerState:A});return(0,n.jsxs)(T,{...W,children:[w||B?(0,n.jsx)(eS,{className:S.iconContainer,ownerState:A,children:(0,n.jsx)(B,{completed:x,active:v,error:s,icon:w,...z})}):null,(0,n.jsxs)(ek,{className:S.labelContainer,ownerState:A,children:[a?(0,n.jsx)(L,{...R,className:(0,V.A)(S.label,null==R?void 0:R.className),children:a}):null,d]})]})});eT.muiName="StepLabel";var eW=i(23556);function eL(e){return(0,K.Ay)("MuiStepButton",e)}let eR=(0,Y.A)("MuiStepButton",["root","horizontal","vertical","touchRipple"]),eB=(0,_.Ay)(ed.A,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[{["& .".concat(eR.touchRipple)]:t.touchRipple},t.root,t[i.orientation]]}})({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box",["& .".concat(eR.touchRipple)]:{color:"rgba(0, 0, 0, 0.3)"},variants:[{props:{orientation:"vertical"},style:{justifyContent:"flex-start",padding:"8px",margin:"-8px"}}]}),ez=r.forwardRef(function(e,t){let i=(0,q.b)({props:e,name:"MuiStepButton"}),{children:a,className:o,icon:l,optional:s,...p}=i,{disabled:d,active:c}=r.useContext($),{orientation:u}=r.useContext(Z),m={...i,orientation:u},g=(e=>{let{classes:t,orientation:i}=e;return(0,U.A)({root:["root",i],touchRipple:["touchRipple"]},eL,t)})(m),h={icon:l,optional:s},f=(0,eW.A)(a,["StepLabel"])?r.cloneElement(a,h):(0,n.jsx)(eT,{...h,children:a});return(0,n.jsx)(eB,{focusRipple:!0,disabled:d,TouchRippleProps:{className:g.touchRipple},className:(0,V.A)(g.root,o),ref:t,ownerState:m,"aria-current":c?"step":void 0,...p,children:f})});var eN=i(28993);let eM=(0,eN.n9)()(e=>({stepperWrapper:{backgroundColor:"#fff",paddingTop:40,paddingBottom:24,overflowX:"auto"},stepButtonWrapper:{"& > div > span":{borderTopWidth:3,borderColor:e.custom.colors.shimmer,marginLeft:-25,marginRight:-25,zIndex:0}},stepButton:{pointerEvents:"none",userSelect:"none",position:"relative",zIndex:1,"& > span > span":{fontWeight:"bold"},"& svg":{color:e.custom.colors.amberjack,width:30,height:30}},stepButtonCompleteWrapper:{pointerEvents:"auto",userSelect:"normal"},stepButtonComplete:{pointerEvents:"auto",userSelect:"normal","& svg":{color:"".concat(e.palette.secondary.main,"!important")}},stepButtonActiveAndComplete:{pointerEvents:"none",userSelect:"none","& svg":{color:"".concat(e.palette.primary.main,"!important")}},stepLabel:{fontFamily:"Gotham Medium, Gotham Rounded Medium, Gotham",transform:"translate(0,0)"},stepLabelActiveAndComplete:{"& svg":{color:e.palette.secondary.main}}})),eP=e=>
1{let{activeStep:t,steps:i,completed:a,handleStep:r}=e,{classes:o}=eM(),l=e=>a.has(e),s=i.length-1,p=a.size===s,d=e=>l(e)||e===s&&p;return(0,n.jsx)(eo,{alternativeLabel:!0,nonLinear:!0,activeStep:t,className:g()(o.stepperWrapper,"stepperWrapper"),children:i.map((e,i)=>(0,n.jsx)(ep,{...{},classes:{root:g()(o.stepButtonWrapper,d(i)&&o.stepButtonWrapperComplete,t===i&&o.stepButtonWrapperActive&&t===i&&d(i)&&o.stepButtonWrapperActiveAndComplete)},children:(0,n.jsx)(ez,{onClick:r(i),completed:l(i)&&t!==i,...{},classes:{root:g()(o.stepButton,d(i)&&o.stepButtonComplete,t===i&&o.stepButtonActive,t===i&&d(i)&&o.stepButtonActiveAndComplete)},children:(0,n.jsx)("span",{className:g()(o.stepLabel,t===i&&o.stepLabelActive,t===i&&l(i)&&o.stepLabelActiveAndComplete),children:e})})},e))})},eO=(0,eN.n9)()(e=>({simpleStepperWrapper:{display:"flex",justifyContent:"space-between",marginTop:32,padding:"0 10px",alignItems:"center",[e.breakpoints.up("md")]:{marginTop:40}},firstStep:{overflow:"hidden",visibility:"hidden",marginTop:0,[e.breakpoints.up("md")]:{height:"unset",maxHeight:"unset",overflow:"unset",marginTop:0}},closeIconButtonWrapper:{[e.breakpoints.up("md")]:{display:"none"}},wrapper:{display:"flex",alignItems:"center","& p":{margin:"0 15px 0 0"}},bar:{backgroundColor:"#fff",width:150,height:10,borderRadius:8},progress:{height:10,backgroundColor:e.custom.colors.tertiary,borderRadius:8,minWidth:5}}));var eI=i(94314),eF=i(29151),eE=i(44878);let eD=e=>{let{activeStep:t,steps:i,t:a=(0,eE.k3)(),onCancelClick:r}=e,{classes:o}=eO(),l=t+1,s=i.length;return(0,n.jsxs)("div",{className:g()(o.simpleStepperWrapper,1===l&&o.firstStep),children:[(0,n.jsxs)("div",{className:o.wrapper,children:[(0,n.jsxs)(eI.A,{children:[a("Step","Step")," ",l," ",a("of","of")," ",s]}),(0,n.jsx)("div",{className:o.bar,children:(0,n.jsx)("div",{className:o.progress,style:{width:"".concat(l/s*100,"%")}})})]}),r&&(0,n.jsx)("div",{className:o.closeIconButtonWrapper,children:(0,n.jsx)(eF.A,{explanation:a("cancel","Cancel"),onClick:r,className:o.closeIconButton,size:"large",children:(0,n.jsx)(D.A,{})})})]})};var eH=i(40123),eG=i.n(eH),eV=i(50046),eU=i.n(eV),e_=i(48370),eq=i.n(e_),eY=i(87959),eK=i.n(eY),eX=i(68768),eJ=i(65013),eQ=i.n(eJ),eZ=i(76601),e$=i(34571);let e0=e=>{var t,i,a;let{t:o,form:l}=e,{organization:s}=(0,r.useContext)(e$.A),p=eQ()(null==(t=s.limits)?void 0:t.displayRules,{rule:"totalOpportunities"}),d=(null==l||null==(i=l.values)?void 0:i.type)==="local"&&eQ()(null==(a=s.limits)?void 0:a.displayRules,{rule:"localOpportunities"});return p||d?(0,n.jsxs)("div",{className:"batchWarning",children:[(0,n.jsx)(eZ.A,{}),(0,n.jsx)("b",{children:o("opp-wizard-organization-limits-opportunity","Heads Up on Opportunity Creation!")}),(0,n.jsx)("br",{}),(0,n.jsxs)("ul",{children:[p&&(0,n.jsx)("li",{children:p.label}),d&&(0,n.jsx)("li",{children:d.label})]}),(0,n.jsx)("div",{children:o("opp-wizard-limits on submit","These limits will be checked when you submit your Opportunity")})]}):null};var e1=i(64003),e2=i.n(e1),e5=i(84800),e3=i(49312);let e4=(0,eN.n9)()(e=>({pageWrapper:{scrollBehavior:"smooth",padding:"25px 50px",width:"auto",maxWidth:"100%",minHeight:325,[e.breakpoints.down("xl")]:{marginBottom:40},"& .optionContainerWithIcons":{maxWidth:"none !important"}},simplePreviewFormWrapper:{marginTop:40," & > div > div":{flex:1}},formPage:{display:"flex",flexDirection:"column",gap:40,"& [data-field]":{marginTop:0,marginBottom:"0!important","&:first-of-type":{marginTop:15}},"& [data-row=p2p-host-name]":{display:"flex",alignItems:"flex-end","& [data-field=hostLastName]":{marginBottom:15},"& > div":{flex:1}},"& [data-field=hideShareButton]":{marginTop:8},'& [data-field="dummy"], [data-field="rangeGroup"], [data-field="deadlineGroup"]':{display:"flex",flexDirection:"column",gap:40,'& .formFieldWrapper:has(input[type="checkbox"])':{transform:"translateY(-24px)"}}}}));var e6=i(71680),e8=i(60336),e7=i(73963);let e9=e=>{let t,i,a,o,l,{isEditMode:s,isLastStep:p,opportunityTypes:d,values:m,currentOpportunityType:h,currentOrganization:f,onFormSubmit:y,activeStep:v,submitForm:b,onChange:x,scrollElement:j=".wizardContent",onImageSelected:w=null,onFileSelected:C=null,fetching:A,t:S,displayAs:k,mode:T,parentMode:W,TypePageHeader:L}=e,{classes:R}=e4(),z=(0,r.useContext)(e7.A);if((0,r.useEffect)(()=>
1{if(document){let e=document.getElementsByClassName("modal"===k?"wizardContent":"currentPage")[0];e&&(e.scrollTop=0,e.focus())}},[v]),!eG()(m)&&null!=v&&h){a=eU()({},h.defaultValues,m,h.requiredValues),o=(l=h.pages[v]).data;let e=h.validationSchema&&h.validationSchema({t:S,values:a,isDraftPost:!1,mode:T,currentOpportunityType:h}),t=(0,e8.Y)(o),n={};t.forEach(t=>{let i=t;i.includes(".")&&(i=eK()(i.split(".")).join(".")),eq()(n,i,c()(e,i))}),l.pageValidations&&(n={...n,...l.pageValidations({values:a,page:l,currentOpportunityType:h})}),i=u.object(n)}else{var N;i=u.object().shape({type:u.string().trim().required(S("Wizard.pleaseSelectType","Please select an opportunity type"))}),o=(e=>{let{opportunityTypes:t,t:i,parentMode:a,currentOrganization:r,theme:o={}}=e,{links:l}=o;return[{type:"radiogroup",name:"type",label:i("opportunity-type-label","What type of opportunity are you creating?"),valueType:"string",options:((e,t)=>{let i=[];return e2()(e,e=>{let{name:a,displayName:r,description:o,pages:l,promptUpgrade:s}=e,p=r||a,d={label:(0,e3.A)(p,t),value:(0,eE.Yv)(a),icon:(0,n.jsx)(e5.A,{notip:!0,type:p}),help:o};s&&(d.badge=(0,n.jsx)("div",{className:"upgradeBadge",children:t("upgrade","Upgrade")})),(s||(null==l?void 0:l.length))&&i.push(d)}),i})(t,i)},"dashboard"===a&&{type:"callback",name:"limits-warning",content:e=>{let{form:t}=e;return(0,n.jsx)(e0,{t:i,form:t})}},{key:"flex-type-label",type:"label",name:"flexTypeHeader",label:i("flex-opportunity-type-flexible-header","Flexible Timing and Location"),hide:e=>{let{values:t}=e;return"flexible"!==t.type},help:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("flexible-type-help-line1","Can be completed at any time")}),(0,n.jsx)("li",{children:i("flexible-type-help-line2","May be location-based, digital, or have no location at all")}),(0,n.jsx)("li",{children:i("flexible-type-help-line3","May include “On Your Own” opportunities where participants track and submit their own hours")})]}),(0,n.jsx)("span",{style:{fontWeight:"bold"},children:i("great-for-labelling","Great for:")}),"\xa0",i("flexible-type-help-line4","Drop-off donations, creative tasks, nature beautification, scheduling, assembling packages/kits, etc."),"\xa0",(0,n.jsx)("br",{}),(0,n.jsx)(eX.A,{newTab:!0,href:(null==l?void 0:l.helpFlexibleOpportunities)||(null==l?void 0:l.helpLink)||"https://support.goldenvolunteer.com/knowledge_base/creating-great-flexible-opportunities",children:i("check-out-tips","Check out our tips for more ideas")})]})},{key:"virtual-type-label",type:"label",name:"virtualTypeHeader",label:i("flex-opportunity-type-virtual-header","Webinar, Phone or Conference Call, etc."),hide:e=>{let{values:t}=e;return"virtual"!==t.type},help:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("virtual-type-help-line1","Have set time(s) of when opportunity is to be completed")}),(0,n.jsx)("li",{children:i("virtual-type-help-line2","No physical location")}),(0,n.jsx)("li",{children:i("virtual-type-help-line3","Digital location (web address, video chat, etc…) or phone number required")})]}),(0,n.jsx)("span",{style:{fontWeight:"bold"},children:i("great-for-labelling","Great for:")}),"\xa0",i("virtual-type-help-line4","Tutoring, orientation, training, etc."),"\xa0",(0,n.jsx)("br",{}),(0,n.jsx)(eX.A,{newTab:!0,href:(null==l?void 0:l.helpVirtualOpportunities)||(null==l?void 0:l.helpLink)||"https://support.goldenvolunteer.com/knowledge_base/how-do-i-get-the-right-volunteer-locations-for-a-virtual-opportunity",children:i("check-out-tips","Check out our tips for more ideas")})]})},{key:"fundraiser-type-label",type:"label",name:"fundraiserTypeHeader",label:i("fundraiser","Fundraiser"),hide:e=>{let{values:t}=e;return"fundraiser"!==t.type},help:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("fundraiser-type-help-beta-warning","BETA: released early for experimentation, please let us know what you think")}),(0,n.jsx)("li",{children:i("fundraiser-type-help-line1","Fund a new project")}),(0,n.jsx)("li",{children:i("fundraiser-type-help-line2","Respond to a disaster event")}),(0,n.jsx)("li",{children:i("fundraiser-type-help-line3","Provide financial resources to people in need")}),(0,n.jsx)("li",{children:i("fundraiser-type-help-line4","Meet your organization's development goals")})]})},{key:"petition-type-label",type:"label",name:"petitionTypeHeader",label:i("micro-action","Micro Action"),hide:e=>{let{values:t}=e;return"petition"!==t.type},help:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("petition-type-help-line1","Commit to taking a small step toward a big mission")}),(0,n.jsx)("li",{children:i("petition-type-help-line2","Sign a petition")}),(0,n.jsx)("li",{children:i("petition-type-help-line3","Indicate interest in something happening in the future")}),(0,n.jsx)("li",{children:i("petition-type-help-line4","Collect standard information from signers")})]})},{key:"on-campus-label",type:"label",name:"onCampusTypeHeader",label:i("on-campus","On-Campus"),hide:e=>{let{values:t}=e;return"on-campus"!==t.type},help:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("on-campus-type-help-line1","Host opportunities at your facility")}),(0,n.jsx)("li",{children:i("on-campus-type-help-line2","See what rooms are available and book them in your scheduling system")})]}),(0,n.jsx)("span",{style:{fontWeight:"bold"},children:i("great-for-labelling","Great for:")}),"\xa0",i("on-campus-type-help-line3","Corporate and academic campuses, on-site events, etc."),"\xa0"]})},{key:"all-nothing-label",type:"label",name:"allNothingTypeHeader",label:i("all-nothing","All-or-Nothing"),hide:e=>{let{values:t}=e;return!/all-nothing/.test(t.type)},help:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("all-nothing-help-line1",'This opportunity is similar to Local or Webinar, except it requires a volunteer to sign-up for every timeslot associated with the opportunity, without the ability to "unselect" individual time slots')}),(0,n.jsx)("li",{children:i("all-nothing-help-line2","Can be local or virtual")}),(0,n.jsx)("li",{children:i("all-nothing-help-line3","Note: A new opportunity should be created for EACH sequence of bundled timeslots which will be required")})]}),(0,n.jsx)("span",{style:{fontWeight:"bold"},children:i("great-for-labelling","Great for:")}),"\xa0",i("all-nothing-great-for-help","one-on-one tutoring pairings, or when you'd like volunteers to commit to multiple sessions (e.g., opportunities which require meaningful upfront training)"),"\xa0"]})},{key:"dos-upsell-label",type:"label",name:"dosTypeHeader",label:i("day-of-service","Day of Service"),hide:e=>{let{values:t}=e;return"day-of-service-upsell"!==t.type},help:(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("dos-help-line1","Simplify logistics across multiple activities within a single day of service or longer campaign period")}),(0,n.jsx)("li",{children:i("dos-help-line2","Ensure smoother coordination and execution of volunteer activities campaign with streamlined processes")}),(0,n.jsx)("li",{children:i("dos-help-line3","Enhance communication channels to facilitate clearer and more effective interaction between organizers and participants, allowing for a unified experience")}),(0,n.jsx)("li",{children:i("dos-help-line4","Dive-deep into specific data points related to your Day of Service, gaining valuable insights to enhance planning and execution strategies effectively")})]})})},{key:"sigevent-upsell-label",type:"label",name:"sigeventTypeHeader",label:i("signature-event","Signature Event"),hide:e=>{let{values:t}=e;return"signature-event-upsell"!==t.type},help:(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("sigevent-help-line1","Streamline shift scheduling processes, ensuring efficient coordination of participant availability and task assignments within a single opportunity")}),(0,n.jsx)("li",{children:i("sigevent-help-line2","Customize participant roles with flexibility and precision, tailoring assignments to match individual skills and preferences seamlessly")}),(0,n.jsx)("li",{children:i("sigevent-help-line3","Dive-deep into specific data points related to your Signature Event, gaining valuable insights to enhance planning and execution strategies")})]})})},{key:"learning-upsell-label",type:"label",name:"learningTypeHeader",label:i("video","Video"),hide:e=>{let{values:t}=e;return"learning"!==t.type},help:(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:i("learning-help-line1","Streamline training with on-demand access to pre-recorded modules, ensuring participants learn at their convenience before taking their next steps")}),(0,n.jsx)("li",{children:i("learning-help-line2","Welcome new participants warmly and personally through video, fostering deeper engagement with your organization's mission and values")}),(0,n.jsx)("li",{children:i("learning-help-line3","Generate excitement for events by dynamically showcasing past highlights, testimonials, and upcoming objectives")})]})})},{key:"upgrade-prompt",type:"callback",name:"upgradePrompt",hide:e=>{let{values:i}=e;if(!(null==i?void 0:i.type)||!o.isGoldenDashboard)return!0;let a=null==t?void 0:t.find(e=>e.name===(null==i?void 0:i.type));return!(null==a?void 0:a.promptUpgrade)},content:()=>(0,n.jsx)(B.A,{newTab:!0,component:eX.A,href:"/".concat(null==r?void 0:r.id,"/settings/billing?tab=plans"),size:"mondo",children:i("activate-feature","Activate Feature")})}
1].filter(Boolean)})({opportunityTypes:d,t:S,parentMode:W,theme:z,currentOrganization:f}),l=null==(N=d[0].pages)?void 0:N[0],a=eU()({},m),t=L}let M={t:S,fetching:A,data:o,onSubmit:y,initialValues:a,submitForm:b,scrollElement:j,className:null!=v?R.formPage:R.pageOpportunityTypes};if(p){let e=o[o.length-1],t=e[e.length-1];t&&t.isPreviewPage&&(M.className=g()(M.className,R.simplePreviewFormWrapper,"simplePreviewFormWrapper"))}let P=null==l?void 0:l.name;return(0,n.jsxs)("div",{"data-page":P,className:g()("currentPage",R.pageWrapper),children:[t&&(0,n.jsx)(t,{}),(0,n.jsx)(e6.A,{scrollToError:!s,validateOnMount:!1,validateOnChange:!1,validateOnBlur:!1,enableReinitialize:!0,validate:void 0,additionalFieldsContext:{currentOpportunityType:h},additionalHideData:{mode:T},validationSchema:i,onChange:x,onImageSelected:w,onFileSelected:C,...M},"wizard-form-".concat(v))]})},te={display:"flex",alignItems:"center",width:"100%",margin:"0 auto","& .btnWrapper":{marginRight:16,"&:last-of-type":{marginRight:0}}},tt=(0,eN.n9)({name:"OpportunityWizard"})(e=>({opaqueBackdrop:{backgroundColor:"rgba(18, 32, 41, 0.55)"},paper:{borderRadius:3,margin:5},paperFullScreen:{backgroundColor:"transparent"},pageContainer:{display:"flex",flexDirection:"column"},header:{backgroundColor:e.custom.colors.secondary,padding:0,minHeight:65,borderRadius:"3px 3px 0 0",textAlign:"center",position:"relative","& h2":{color:"#fff"}
1,"& h3":{color:"#fff"},"& h4":{color:"#fff"}},pageHeader:{padding:"0 10px","& .MuiPaper-root":{borderRadius:80},"&.page":{"& .stepperWrapper":{backgroundColor:"rgba(255,255,255, 0.5)"}}},titleWrapper:{padding:"24px 24px 16px",position:"relative",textAlign:"center"},content:{scrollBehavior:"smooth",scrollMarginTop:"24px",backgroundColor:e.custom.colors.background,outline:"none","&.isPreviewContent":{backgroundColor:"#fff"},"&.page":{flex:"auto",marginBottom:40,"& .currentPage":{padding:"15px 10px 25px",overflow:"initial","& .simplePreviewFormWrapper":{marginTop:40},"& .previewContent":{margin:"0 auto","& .banner":{left:-1e3,right:-1e3,position:"absolute"},"& .slick-slider":{paddingTop:48}}},"&.isPreviewContent":{marginTop:40}},"& [data-page=about]":{marginBottom:100},'& [data-field="type"]':{"& .option.optionWithIcon":{width:235,"& .radio-label":{padding:"16px 12px"}}},"& .optionWithIcon .upgradeBadge":{top:0,left:0,position:"absolute",padding:5,textTransform:"uppercase",color:"#fff",backgroundColor:e.palette.primaryVariant.main,borderRadius:2},'& .optionWithIcon[data-is-checked="true"] .upgradeBadge':{backgroundColor:e.palette.primary.main,borderRadius:2},"& [data-field=original-language-help]":{marginTop:28},"& [data-field=original-language-name]":{marginTop:28},"& [data-field*=TypeHeader] ul, [data-field=limits-warning] ul":{paddingInlineStart:16},"& [data-field*=TypeHeader] label":{display:"block",borderTop:"1px solid ".concat(e.custom.colors.amberjack),marginTop:40,paddingTop:24},"& [data-field=recurringDetails]":{display:"flex",alignItems:"flex-end","& [data-field]":{margin:0,width:"auto"},"& [data-field=recurringCount]":{maxWidth:80,marginRight:16,"& .textFieldGutterWrapper":{maxWidth:80},"& label":{whiteSpace:"nowrap"}},"& [data-field=recurringUnit]":{"& .rootWrapper":{minWidth:125}}},"& [data-page*=post]":{padding:"0!important",overflowX:"hidden","& .simplePreviewFormWrapper":{background:"#fff",marginTop:0,"& .banner":{left:0,right:0}},"& [data-field]":{marginTop:"0!important",paddingBottom:50}},'& [data-field="flexible.defaultHours"]':{"& .labelHelp":{marginBottom:16}},'& [data-field="ageWarning"]':{marginTop:16},'& [data-field="agerestrictions"]':{marginTop:16,'& [data-field="maxAgeLimit"]':{paddingTop:0}},'& [data-field="backgroundCheckPayer"], & [data-field="motorVehicleCheckPayer"]':{marginTop:16,"& > div":{padding:"32px 24px",backgroundColor:"rgba(255, 255, 255, 0.6)",borderRadius:10,"& .checkOrgPaysSelectWrapper":{"& label":{marginTop:16}}}},'& [data-field="guestAccess"]':{"& input.count":{maxWidth:75}},'& [data-field="isTemplate"] .template-hint .MuiSvgIcon-root':{transform:"translate(8px, 5px)"},'& [data-field="minAgeLimit"]':{backgroundColor:"rgba(255, 255, 255, 0.5)",padding:24,borderTopLeftRadius:10,borderTopRightRadius:10,"&:empty":{display:"none"}},'& [data-field="maxAgeLimit"]':{backgroundColor:"rgba(255, 255, 255, 0.5)",padding:24,marginTop:0,borderBottomLeftRadius:10,borderBottomRightRadius:10,"&:empty":{display:"none"}},'& [data-field="custom-completion-message-fields"], & [data-field="custom-cancel-message-fields"]':{"&:empty":{display:"none"},padding:32,background:"rgba(255,255,255,0.6)",borderRadius:10,marginTop:24,'& [data-field="donationSettings.completionMessageTitle"]':{marginTop:0}},'& [data-field="custom-cancel-message-fields"]':{'& [data-field="donationSettings.completionMessage"]':{marginTop:0}},'& [data-field="groupVisibilityOptions"], & [data-field="groupAccessibilityOptions"]':{marginTop:"-16px!important","& hr":{margin:0},'& [data-field="visibility.affiliations"], & [data-field="accessibility.affiliations"]':{marginTop:"-16px!important"}},"& .time-container + .batchWarning":{marginTop:24},"& .batchWarning":{backgroundColor:"rgba(255, 255, 255, 0.5)",padding:24,marginBottom:16,"& ul":{paddingInlineStart:16},"& svg":{color:e.custom.colors.alert,width:18,height:18,transform:"translateY(4px)",marginRight:4}}},pageFooter:{position:"fixed",bottom:0,padding:16,[e.breakpoints.up("md")]:{padding:"16px ".concat(e.custom.MainPadding,"px")},backgroundColor:e.custom.colors.background,borderTop:"1px solid ".concat(e.custom.colors.amberjack),zIndex:1200,"& .wrapper":{...te}},draftFooterButton:{marginRight:"10px!important"},zeroGutter:{padding:0},footer:{padding:e.custom.GutterWidth,margin:0,backgroundColor:e.custom.colors.background,"& .wrapper":{...te}},leftRightSplitter:{margin:"0 auto"},iconButton:{right:e.custom.GutterWidth,...e.mixins.verticalCenter,padding:0,boxShadow:"none"},closeIcon:{color:"#fff",cursor:"pointer",transform:"scale(1.65)",border:"2px dashed transparent"},left:{textAlign:"left"},root:{backgroundColor:e.custom.colors.background,overflowY:"auto",'& [class*="MuiStepConnector-line"]':{borderWidth:3,borderColor:"#e4e6ec"}},stepperWrapper:{backgroundColor:"#fff",paddingTop:40},button:{textTransform:"capitalize"},backButton:{marginRight:10},completed:{display:"inline-block"},instructions:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},whoopsWrapper:{padding:"25px 50px",width:500},actionsWrapper:{display:"flex",flexDirection:"row",justifyContent:"flex-end",align:"center",flexWrap:"wrap",marginTop:15,padding:"0px 50px 25px"},simplePreviewOpportunityName:{marginBottom:5},simplePreviewOpportunityOwner:{fontWeight:"bold",opacity:.65,marginBottom:15,fontSize:13,letterSpacing:"-0.33px",color:"#142a44"},simplePreviewOpportunityLocation:{display:"flex",fontWeight:"bold",fontSize:13,letterSpacing:"-0.33px","& svg":{marginRight:20,transform:"translate(0px, 1px)"}}
1,simplePreviewOpportunityLocationDetails:{fontWeight:"normal",fontSize:13,color:"rgba(20, 42, 68, 0.65)",marginTop:-15,marginLeft:30},simplePreviewOpportunityTimeAndDayWrapper:{display:"flex",alignItems:"flex-start",flexDirection:"row","& svg":{marginRight:20,transform:"translate(0px, 6px)"}},cancelFooterButton:{display:"none",[e.breakpoints.up("md")]:{display:"unset"}},draftFooterButtonWithCancelSibling:{[e.breakpoints.up("md")]:{marginLeft:"unset"}},footerButton:{minWidth:120}}));var ti=i(19990);let ta=["name","description","purpose","role","images","audience"].reduce((e,t)=>(e[t]=!0,e),{}),tn=e=>{var t,i,a;let o,s,d,m,j,w,C,A,S,k,{t:T,opportunityTypes:M,toggleVisibility:P,currentOrganization:V,onSaveDraftClick:U,onSubmitOpportunityClick:_,initialValues:q={},open:Y=!0,displayAs:K="modal",onImageSelected:X=null,onFileSelected:J=null,fetching:Q={},bottomFooterOffset:Z=0,leftFooterOffset:$=0,parentMode:ee="dashboard",hideDraftButton:et=!1,onCancelClick:ei=null,overrideMode:ea,centeredFooter:en=!1,onRequestEditClick:er=null,isClosing:eo=!1,TypePageHeader:el}=e,{classes:es}=tt(),ep=q.id?"editing":"default",ed="portal"===ee,ec="editing"===ep,eu=q.__duplicatedOpportunity,em=q.__templatedOpportunity,eg="cancelled"===q.oldStatus&&"submitted"===q.status,eh=ed||ec||eu||em,[ef,ey]=(0,r.useState)(),[ev,eb]=(0,r.useState)(!1),[ex,ej]=(0,r.useState)(eh?0:null),[ew,eC]=(0,r.useState)(new Set([0])),[eA,eS]=(0,R.A)(),ek=(0,r.useRef)(W({},q)),eT=ek.current,[eW,eL]=(0,r.useState)(!1);(0,L.A)({promptActive:!eW&&!eo});let[eR,eB]=(0,r.useState)(!ec||eg),ez=(0,r.useRef)(),eN="draft"===eT.status;eT.type&&eT.type.includes("p2p")?eT.type="p2p":eT.type&&eT.type.includes("random-selection")?eT.type=eT.type.replace("random-selection-",""):eT.type||(null==M?void 0:M.length)!==1||(eT.type=M[0].name);let eM=eT.type&&(M||[]).find(e=>e.name===eT.type||e.type===eT.type),eO=eM&&"p2p"===eM.name,eI=eM&&eM.validationSchema,eF=(null==eM||null==(t=eM.pages)?void 0:t.length)||0,eE=e=>{let t;eM.pages.forEach((i,a)=>{i.name===e&&(t=a)}),null!=t&&ej(t)};if((0,r.useEffect)(()=>{if((ec||eu)&&eM&&!ev&&"number"!=typeof q.initialPage){let e=eM.pages.length-1,t=new Set(ew);for(let i=0;i<e;i++)t.add(i);eb(!0),ej(e),eC(t)}},[eM]),(0,r.useEffect)(()=>{"cancelled"===q.oldStatus&&"dummy"!==q.timeType&&eE("time")},[q.oldStatus]),(0,r.useEffect)(()=>{ev||"number"!=typeof q.initialPage||(eb(!0),ej(q.initialPage))},[q.initialPage]),!M)return(0,n.jsx)(H,{t:T,toggleVisibility:P});if(eT.type&&!eM)return(0,n.jsx)(G,{t:T,toggleVisibility:P});let eH="dos-approval"===ea,eG="edit-template"===ea,eV="duplicate-template"===ea,eU="all-template"===ea,e_=eG||eV||eU,eq=e.submitButtonLabel||T("post","Post");"submitted"===eT.status&&(eH||eO)?eq=T("saveAndApprove","Save & Approve"):eT.isTemplate?eq=ec?T("update-template","Update Template"):T("create-template","Create Template"):eH&&"submitted"===eT.status?eq=T("approve","Approve"):ez.current||!eH&&eT.dayOfService?eq=ec?T("re-submit","Re-Submit"):T("submit","Submit"):eO?ec?"active"===eT.status?eq=T("saveNeed","Save Need"):"submitted"===eT.status&&(eq=T("approve","Approve")):eq=T("listNeed","List Need"):ec&&(eq=T("save","Save"));let eY=e.draftButtonLabel;!eY&&ec?eY=T("save-edits","Save Edits"):eY||(eY=T("save-as-draft","Save as Draft"));let eK=(null==eM||null==(i=eM.pages)?void 0:i.map(e=>e.label?e.label:(console.warn("Missing page label for ".concat(e.name)),e.name)))||[],eX=(0,r.useCallback)(()=>ew.size,[ew]),eJ=(0,r.useCallback)(()=>eX()===eF,[eX,eF]),eQ=(0,r.useCallback)(()=>ex===eF-1,[ex,eF]),eZ=(0,r.useCallback)(async()=>{let e=c()(eM,"pages[".concat(ex,"].nextActions"));if(e){let{action:t,saveDraft:i}=e;if(t){let e=i&&U&&!eT.id?await U(eT,{suppressClickEvent:!0}):eT;ek.current.id=e.id,await t({values:ek.current})}}ej(eT.type&&null!==ex?eQ()&&!eJ()?eK.findIndex((e,t)=>!ew.has(t)):ex+1:0)},[ex,eM,eT,U,eQ,eJ,eK,ew]),e$=(0,r.useCallback)(()=>{ej(e=>0===e?null:e-1)},[]),e0=(0,r.useCallback)(e=>()=>{ej(e)},[]),e1=async(e,t)=>{let i=t||eT;if(_&&(eQ()||e)){try{let e=eI&&u.object(eI({t:T,values:i,isDraftPost:!1,mode:ep,currentOpportunityType:eM}));await e.validate(i,{context:i})}catch(e){throw console.warn("Wizard has validation error, skipping submission",e),ey(e),e}_(i,eR),eL(!0)}},e2=async e=>{let t={...eT};return t.fromTemplateId||(t.fromTemplateId=t.id),t.postingTemplate=!0,delete t.id,delete t.isTemplate,t.organizationId=V.id,t.organizationName=V.name,t.status="submitted",e1(e,t)},e5=async e=>{let t={...eT};return t.fromTemplateId||(t.fromTemplateId=t.id),t.isTemplate=!0,delete t.id,t.organizationId=V.id,t.organizationName=V.name,t.status="template",e1(e,t)},e3=async()=>
1{if(U){try{let e=eI&&u.object(eI({t:T,values:eT,isDraftPost:!0,mode:ep,currentOpportunityType:eM}));await e.validate(eT,{context:eT})}catch(e){throw ey(e),e}U(eT,{suppressClickEvent:!1})}},[e4,e6]=(0,r.useState)(!1),e8=(0,r.useRef)(!0);(0,r.useEffect)(()=>(e8.current=!0,()=>{e8.current=!1}),[]);let e7=(0,r.useCallback)(e=>{if(e4)return;e6(!0),W(ek.current,e);let t=new Set(ew);null==ex||t.has(ex)||eQ()||t.add(ex),eC(t),eZ(),eS(!1),setTimeout(()=>{e8.current&&e6(!1)},100)},[ex,ew,eZ,eQ,e4]);if(eV?o=T("create-template","Create Template"):eG?o=T("edit-template","Edit Template"):"default"===ep?o=T("oppWizardTitle","Create Opportunity"):ec&&(o=eT&&eN?T("edit-draft-opportunity","Edit Draft Opportunity"):T("edit-opportunity","Edit Opportunity")),null==o)throw Error("Unrecognized mode: ".concat(ep));let te=!et&&"active"!==q.status&&"submitted"!==q.status&&!eJ()&&eT.name&&!eT.isTemplate,tn=Q.saveDraft||Q.submitOpportunity||(null==eM?void 0:eM.promptUpgrade),tr=null==V||null==(a=V.permissions)?void 0:a.has(ti.Jj.CREATE_OPPORTUNITIES),to=!eR&&!eH&&!eN||!tr&&!ec,tl=e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.code&&(tn||eQ()?!to&&eQ()&&e1(!0):e1())};if("modal"===K)s=h.A,w={"aria-labelledby":"responsive-dialog-title",classes:{paper:g()(es.paper),paperFullScreen:g()(es.paperFullScreen),c
1ontainer:es.opaqueBackdrop},open:Y,maxWidth:"md",fullWidth:!0,fullScreen:!0,onKeyDown:tl},d=v.A,C={disableTypography:!0,id:"responsive-dialog-title",className:g()(es.header,es.left)},m=y.A,A={className:g()(es.content,es.left,es.zeroGutter,"wizardContent",eQ()&&"isPreviewContent"),tabIndex:0},j=f.A,S={className:es.footer};else if("page"===K)s="div",w={className:es.pageContainer,onKeyDown:tl},d="div",C={className:g()(es.pageHeader,"page")},m="div",A={className:g()(es.content,"wizardContent","page",eQ()&&"portal"!==ee&&"isPreviewContent"),tabIndex:0},j="div",S={className:g()(es.pageFooter,"wizardFooter"),style:{bottom:Z,left:$,width:"calc(100% - ".concat($,"px)")}};else throw Error("Unrecognized displayAs mode = ".concat(K));let ts="template"===eT.status,tp=!ts||eT.organizationId&&eT.organizationId===c()(V,"id"),td=eQ()||ec,tc=!!ei,tu="t-".concat(eT.type,"-p-").concat(ex),tm=ed&&"editing"!==ep?(0,n.jsx)(eD,{activeStep:ex,steps:eK,completed:ew,handleStep:e0,t:T,onCancelClick:ei}):(0,n.jsx)(eP,{activeStep:ex,steps:eK,completed:ew,handleStep:e0,t:T}),tg={xs:12,className:g()("wrapper","container"),justify:"flex-end"};en&&(tg={...tg,sm:10,md:8,lg:7}),k=eh?ex>0&&null!=ex:ex>=0&&null!=ex;let th=(eH||"network-approval"===ea)&&eQ()&&"submitted"===eT.status;return(0,n.jsxs)(n.Fragment,{children:[(Q.saveDraft||Q.submitOpportunity)&&(0,n.jsx)(I.A,{}),(0,n.jsxs)(s,{...w,children:[(0,n.jsxs)(d,{...C,children:["modal"===K&&(0,n.jsxs)("div",{className:es.titleWrapper,children:[(0,n.jsx)(b.A,{variant:"h3",children:eJ()&&eM?T("oppWizardTitleSubmitted","Your opportunity was submitted!"):o}),(0,n.jsx)(x.A,{color:"inherit","aria-label":T("close","Close"),onClick:P,className:es.iconButton,size:"large",children:(0,n.jsx)(D.A,{className:es.closeIcon})})]}),eT&&null!=ex&&tm]}),(0,n.jsx)(m,{...A,children:(0,n.jsx)(N.Ay,{currentOpportunityType:eM,jumpToStep:eE,organization:V,parentMode:ee,onLocationUpdated:e=>{W(ek.current,e)},onCharacteristicUpdated:e=>{W(ek.current,e)},fetching:Q,onImageSelected:X,onFileSelected:J,mode:ep,approvalNeeded:ez.current,activeStep:ex,refocusElement:O,children:(0,n.jsx)(e9,{onChange:e=>{var t;let i=ek.current,a=null==i?void 0:i.isTemplate,{dirty:n,values:r,setFieldValue:o}=e,s=r&&r.isTemplate,d=n&&!l()(r,i),c=!1;if(s?!a&&ez.current&&(ez.current=!1):!ez.current&&d&&((e,t)=>(!e||!e.isTemplate)&&!p()(e,t,(e,t,i)=>{if(i)return!ta[i]||l()(e,t)}))(r,i)&&(ez.current=!0),(null==r?void 0:r.requiresBackgroundCheck)&&("ageRestricted"!==r.ageConsiderations&&(r.ageRestrictions=!0,o("ageRestrictions",!0)),!r.minAgeLimit)){let e={allowed:"limited",limit:18};r.minAgeLimit=e,o("minAgeLimit",e)}(null==r||null==(t=r.visibility)?void 0:t.setting)!=="private"&&r.hideShareButton&&(r.hideShareButton=!1,o("hideShareButton",!1)),(null==r?void 0:r.type)!==(null==i?void 0:i.type)&&(c=!0),!eR&&d&&(console.log("Wizard is dirty! Update save action"),eB(!0),c=!0),c&&d&&O({prevValues:i,values:r}),W(ek.current,r)},opportunityTypes:M,allStepsCompleted:eJ,values:eT,currentOpportunityType:eM,currentOrganization:V,onFormSubmit:e7,activeStep:ex,submitForm:eA,scrollElement:".wizardContent",t:T,isEditMode:ec,isLastStep:eQ(),onImageSelected:X,onFileSelected:J,fetching:Q,displayAs:K,mode:ep,parentMode:ee,TypePageHeader:el})},tu)}),(0,n.jsx)(j,{...S,children:(0,n.jsx)(E.A,{justifyContent:"center",children:(0,n.jsxs)(F.A,{...tg,children:[tc&&(0,n.jsx)(B.A,{variant:"tertiary",size:"mondo",onClick:ei,wrapperClass:g()(es.footerButton,"footerCancelButton"),fullWidth:!0,children:T("cancel","Cancel")}),th&&(0,n.jsx)(B.A,{variant:"secondary",size:"mondo",onClick:er,children:T("returnForEdits","Return for Edits")}),te&&(0,n.jsx)(B.A,{size:"mondo",variant:"tertiary",disabled:Q.saveDraft||Q.submitOpportunity,onClick:()=>{e3()},children:eY}),(0,n.jsx)("div",{className:es.leftRightSplitter}),k&&(0,n.jsx)(B.A,{variant:"secondary",size:"mondo",onClick:e$,wrapperClass:es.footerButton,fullWidth:!0,children:T("back","Back")}),!eQ()&&(0,n.jsx)(B.A,{size:"mondo",variant:td?"secondary":"primary",onClick:()=>eS(!0),disabled:tn,wrapperClass:es.footerButton,fullWidth:!0,children:T("next","Next")}),td&&tp&&(!e_||eG)&&(0,n.jsx)(B.A,{size:"mondo",onClick:()=>e1(!0),className:es.submitFooterButton,wrapperClass:!eH&&es.footerButton,fullWidth:!eH,disabled:to,children:eq}),ts&&(eV||eU)&&eQ()&&(0,n.jsx)(B.A,{variant:eV?"primary":"secondary",size:"mondo",onClick:()=>e5(!0),className:es.submitFooterButton,wrapperClass:es.footerButton,fullWidth:!0,disabled:!eR&&!eH,children:T("create-new-template","Create New Template")}),td&&ts&&eU&&(0,n.jsx)(B.A,{size:"mondo",onClick:()=>e2(!0),className:es.submitFooterButton,wrapperClass:es.footerButton,fullWidth:!0,disabled:!eR&&!eH,children:T("post-new-opportunity","Post New Opportunity")})]})})})]}),ef&&(0,n.jsx)(z.A,{title:T("error","Error"),open:!!ef,toggleVisibility:()=>ey(null),children:ef.message})]})}},15758:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var a=i(37876);i(14232);var n=i(95062),r=i.n(n),o=i(41316);let l=e=>(0,a.jsx)(o.Ay,{...e,item:!0});l.propTypes={children:r().node,block:r().bool};let s=l},30054:(e,t,i)=>{var a=i(91030);e.exports=i(23469)(function(e,t,i,n){a(e,t,i,n)})},35883:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var a=i(37876);i(14232);var n=i(17518),r=i.n(n),o=i(95062),l=i.n(o),s=i(41316);let p=(0,i(28993).n9)({name:"GridLayout"})(e=>({root:{...e.mixins.gridLayout}})),d=e=>{let{classes:t,cx:i}=p(),n=e.spacing||0,o=r()(e.wrap)?"wrap":e.wrap,l={};e.applyBodyScrollbackHack&&(l={width:"100%",margin:0});let d={...e,container:!0,spacing:n,className:i(t.root,e.className),style:l,wrap:o};
1return e.direction||(d.direction="row"),(0,a.jsx)(s.Ay,{...d})};d.propTypes={children:l().node,block:l().bool};let c=d},41510:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});let a=function(e,t){let i;if(!t||"[object Object]"!==Object.prototype.toString.call(t))return e;let n={},r=function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0};for(i in e)e.hasOwnProperty(i)&&function(e,t,i){let o=Object.prototype.toString.call(e),l=Object.prototype.toString.call(t);if("[object Undefined]"===l){n[i]=null;return}if(o!==l){n[i]=t;return}if("[object Object]"===o){let r=a(e,t);Object.keys(r).length>1&&(n[i]=r);return}if("[object Array]"===o){r(e,t)||(n[i]=t);return}"[object Function]"===o?e.toString()!==t.toString()&&(n[i]=t):e!==t&&(n[i]=t)}(e[i],t[i],i);for(i in t)t.hasOwnProperty(i)&&!e[i]&&e[i]!==t[i]&&(n[i]=t[i]);return n},n=a},52551:(e,t,i)=>{"use strict";i.d(t,{A:()=>a.A});var a=i(6602)},53674:(e,t,i)=>{"use strict";i.d(t,{A:()=>a.A});var a=i(81017)},63847:(e,t,i)=>{var a=i(5051),n=i(39234);e.exports=function(e,t,i){return i="function"==typeof i?i:void 0,a(e,t,n(t),i)}},81017:(e,t,i)=>{"use strict";i.d(t,{A:()=>s,r:()=>l});var a=i(14232);let n=(0,i(44878).k3)(),r=[],o=e=>{let t=r.indexOf(e);-1!==t&&r.splice(t,1)};window.onbeforeunload=()=>{if(r.length)return r[0].message};let l=(e,t)=>{let i;n=e,(0,a.useEffect)(()=>{i=t.asPath},[t&&t.asPath]),i=t.asPath,t.beforePopState(e=>{let{url:t,as:a,options:n}=e;return!r.length||!!window.confirm(r[0].message)||(history.replaceState(null,null,i),!1)})},s=function(){let{message:e,promptActive:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={message:e||n("are-you-sure-preventing-navigation","Are you sure you want to navigate away? Unsaved changes will be lost")};(0,a.useEffect)(()=>(t?r.push(i):o(i),()=>o(i)),[t])}},87959:(e,t,i)=>{var a=i(19204),n=i(13051);e.exports=function(e,t,i){var r=null==e?0:e.length;return r?a(e,0,(t=r-(t=i||void 0===t?1:n(t)))<0?0:t):[]}}}]);

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.