PageSourceSearch

https://www.dawnfoods.com/assets/index-D36dkIAa.js

js dawnfoods.com collected 2026-10-04 00:18:07 UTC 13,210 bytes, 2 lines download raw bytes

1import{B as F,u as Z,j as e,r as d,Z as M,h as g,k as fe,i as ce,I as je,d as J,a as D,w as le,bL as de,R as $,x as me,e7 as Ne,y as ye,aK as B,aN as ee,e as j,e8 as Ce,e9 as Se,ea as Ae,q as L,G as ue,X as _e,E as X,F as pe,T as G,ba as ge,S as he,J as ve,eb as Ie,M as be,ec as Ee,ed as Fe,ds as te,ee as se,ef as ke,eg as we,af as ie,eh as Me,cF as Le,cG as Ve,cH as Ke,ei as Re,ej as Te,ek as Pe,aP as z,el as $e,c6 as W,b as Be}from"./index-BOt2GVR3.js";import{A as Ge}from"./auth-page-DbSo8u4k.js";import{R as De}from"./rich-text-content-svavx59X.js";import{L as He}from"./location-card-CE2E6WoO.js";import{P as ne}from"./personal-information-form-DRtfBYPE.js";import"./login-marketing-section-DvliC5h-.js";import"./render-if-non-empty-content-ZC0TFR7W.js";const P=({index:t,active:s,completed:l,disabled:i,icon:n,label:o,descriptionKey:r,children:a})=>{let h=F("step",{"step--active":s,"step--completed":l,"step--disabled":i});const{isMobile:p}=Z();return e.jsxs("div",{className:h,children:[e.jsxs("div",{className:"step__label-icon",children:[e.jsx("div",{className:F("step__label",{"step__label-active":s&&!l}),children:o}),e.jsx("div",{className:F("step__icon",{" step__icon-active":s&&!l}),children:n&&e.jsx("img",{src:n.url,alt:n.alt})})]}),e.jsxs("div",{className:"step__content",children:[s&&r&&!l&&e.jsx("div",{className:"step__content-description",children:e.jsx(De,{contentKey:r})}),e.jsx("div",{className:F("step__content-seperator-line",{" step__content-seperator-line--active-step":s&&p," step__content-seperator-line--active-last-step":s&&t===2})}),e.jsxs("div",{className:"step__children",children:[" ",s&&p&&a]})]})]})},Ue=({children:t,activeStep:s=0})=>{const i=d.Children.toArray(t).filter(o=>d.isValidElement(o)&&o.type===P),n=d.Children.map(i,(o,r)=>{const a={active:r===s,completed:r<s,disabled:r>s,index:r};return d.cloneElement(o,{...a,...o.props})});return e.jsx("div",{className:"stepper",children:n})},qe=6,Oe=3,oe=({locations:t,initialExpanded:s=!1})=>{const{isDesktop:l}=Z(),i=l?qe:Oe,[n,o]=d.useState(s?t:t.slice(0,i)),r=t.length>i&&n.length<=i,a=d.useCallback(()=>{o(t)},[t]);return e.jsxs(e.Fragment,{children:[e.jsx("ul",{className:"grid-x locations-list",children:n.map((h,p)=>e.jsx("li",{className:"locations-list__item",children:e.jsx(He,{...h})},p))}),r&&e.jsx("div",{className:"grid-x",children:e.jsx(M,{className:"link-2 locations-list__view-more-cta",onClick:a,children:e.jsx(g,{contentKey:"common[0].locations_list_view_more_button"})})})]})},re=({email:t})=>e.jsxs("section",{className:"customer-registration-confirmation","data-testid":"customer-registration-confirmation",children:[e.jsx("div",{className:"customer-registration-confirmation__title",children:e.jsx(g,{contentKey:"page_content.registration_confirmation.heading"})}),e.jsxs("div",{className:"customer-registration-confirmation__sub-title",children:[e.jsx("div",{className:"customer-registration-confirmation__icon",children:e.jsx(fe,{contentKey:"page_content.registration_confirmation.icon"})}),e.jsx(g,{contentKey:"page_content.registration_confirmation.sub_heading"})]}),e.jsxs("div",{className:"customer-registration-confirmation__message",children:[e.jsx(ce,{contentKey:"page_content.registration_confirmation.message",interpolateParams:{email:t}}),e.jsx(je,{className:"customer-registration-confirmation__link",contentKey:"page_content.registration_confirmation.resend_link"})]})]}),ze={invoiceId:"",invoiceAmount:""},We=()=>{const t=J(),[s,l]=d.useState(!1),{getContentByKey:i,getMessageText:n}=D(),[o]=le("locale",null),r=n("error","MSG041"),a=n("error","MSG028"),h=n("error","MSG027"),p=n("error","MSG053"),{getTranslatedUrl:m}=de(),v=m({usEnglishUrl:$.LoginPage,caFrenchUrl:$.CanadaFrenchLoginPage}),b=me({invoiceId:ye(h).matches(/^[0-9]*$/,p),invoiceAmount:Ne({required:a,wrongFormat:r})}),u="page_content.stepper.step_1.account_retrieval_form[0]";d.useEffect(()=>(t(B()),()=>{t(ee(!1))}),[t]);const N=j(Ce),x=j(Se),y=j(Ae),C=!L(x)||!L(y),H=c=>{t(Ie.request({invoiceId:c.invoiceId,invoiceAmount:c.invoiceAmount}))},U=d.useCallback(()=>{l(!1),C&&t(B())},[t,C]),V=c=>Object.values(c).some(S=>S===""),K=c=>e.jsx("img",{src:i(`${u}.${c}.url`,""),alt:i(`${u}.${c}.title`,"")}),q=F("account-retrieval-form",{"account-retrieval-form--error":C}),O=n("error","MSG019"),f=c=>{be(c,b,l)},k=async(c,S,A,I)=>{var E;const _=(E=c.target)==null?void 0:E.value;if(L(_)){A(c);return}const R=(_==null?void 0:_.replace(/^0+(?=\d)/,""))||"0";S("invoiceAmount",R),await I("invoiceAmount"),A(c)};return e.jsx("div",{className:q,children:e.jsx(ue,{validateOnChange:!1,initialValues:ze,validationSchema:b,onSubmit:H,children:({dirty:c,handleSubmit:S,values:A,errors:I,setErrors:_,setFieldValue:R,isValid:E,handleBlur:T,validateField:xe})=>e.jsx(_e,{className:"create-password",onChange:w=>{t(ee(!0)),U(),_(ve(I,w.target.name))},onBlur:w=>{var Y;((Y=w.relatedTarget)==null?void 0:Y.getAttribute("type"))==="submit"&&f(A)},handleSubmit:S,isValid:E,dirty:c,children:({invalidFormIsSubmitted:w})=>e.jsxs(e.Fragment,{children:[(w||C||s)&&e.jsx(X,{messageId:x,interpolateParams:{localeUrl:pe(o)},message:(y==null?void 0:y[0])??O}),e.jsxs("div",{className:"grid-x grid-margin-x account-retrieval-form__field-group",children:[e.jsx("div",{className:"cell account-retrieval-form__field",children:e.jsx(G,{id:"invoiceId",disabled:N,label:i(`${u}.invoice_id_field_label`,""),name:"invoiceId",placeholder:i(`${u}.invoice_id_field_placeholder`,""),withHint:!0,renderHintContent:()=>K("invoice_id_field_hint_image")})}),e.jsx("div",{className:"cell account-retrieval-form__field",children:e.jsx(G,{id:"invoiceAmount",disabled:N,label:i(`${u}.invoice_amount_field_label`,""),name:"invoiceAmount",placeholder:i(`${u}.invoice_amount_field_placeholder`,""),description:i(`${u}.invoice_amount_field_description`,""),adornment:"$",onBlur:Q=>k(Q,R,T,xe),renderHintContent:()=>K("invoice_amount_field_hint_image"),withHint:!0})})]}),e.jsx("div",{className:"grid-x",children:e.jsxs("div",{className:"cell account-retrieval-form__field-buttons",children:[e.jsx(ge,{className:"button button--cancel",to:v,children:e.jsx(g,{contentKey:`${u}.cancel_button_label`})}),e.jsx(he,{isDisabled:V(A)||N||!E||C,children:e.jsx(g,{contentKey:`${u}.${N?"submit_button_processing_label":"submit_button_label"}`})})]})})]})})})})},Xe={customerNumber:"",zipcode:""},Ze=()=>
1{const t="page_content.stepper.step_1.validate_user_without_invoice_form.0",s=J(),[l,i]=d.useState(!1),{getContentByKey:n,getMessageText:o}=D(),r=j(Ee),a=j(Fe),{getTranslatedUrl:h}=de(),p=h({usEnglishUrl:$.LoginPage,caFrenchUrl:$.CanadaFrenchLoginPage}),m=a!=="",v=f=>Object.values(f).some(k=>k===""),b=F("validate-user-without-invoice-form",{"validate-user-without-invoice-form--error":m}),[u,N]=d.useState(!1),[x]=le("locale",null),y=x===te.FRENCH_CANADA||x===te.ENGLISH_CANADA;d.useEffect(()=>(s(B()),()=>{s(se(!1))}),[s]);const C=o("error","MSG100"),H=o("error","MSG019"),U=o("error","MSG183"),V=me({customerNumber:we({required:C,wrongFormat:o("error_two","MSG053a")}),zipcode:ke({required:o("error","MSG101"),wrongFormat:U,isUserCountryCanada:y})}),K=f=>{s(Me.request({customerNumber:f.customerNumber,zipcode:f.zipcode,onSuccessCallBack:()=>{N(!0)}}))},q=f=>{be(f,V,i)},O=d.useCallback(()=>{i(!1),m&&s(B())},[s,m]);return e.jsx("div",{className:b,children:e.jsx(ue,{validateOnChange:!1,initialValues:Xe,validationSchema:V,onSubmit:K,children:({dirty:f,handleSubmit:k,values:c,errors:S,setErrors:A,isValid:I})=>e.jsx(_e,{onChange:_=>{s(se(!0)),O(),A(ve(S,_.target.name))},onBlur:_=>{var T;((T=_.relatedTarget)==null?void 0:T.getAttribute("type"))==="submit"&&q(c)},handleSubmit:k,isValid:I,dirty:f,children:({invalidFormIsSubmitted:_})=>e.jsxs(e.Fragment,{children:[(_||m||l)&&e.jsx(X,{message:H,messageId:a,interpolateParams:{localeUrl:pe(x)}}),u&&e.jsx(X,{messageId:"MSG142"}),e.jsxs("div",{className:"grid-x grid-margin-x validate-user-without-invoice-form__field-group",children:[e.jsx("div",{className:"cell validate-user-without-invoice-form__field",children:e.jsx(G,{id:"customerNumber",name:"customerNumber",disabled:r,label:n(`${t}.fields.customer_number_field.label`,""),placeholder:n(`${t}.fields.customer_number_field.placeholder`,""),withHint:!0,renderHintContent:()=>e.jsx(ie,{type:"tooltips",messageId:"MSG128"})})}),e.jsx("div",{className:"cell validate-user-without-invoice-form__field",children:e.jsx(G,{id:"zipcode",name:"zipcode",disabled:r,label:n(`${t}.fields.zip_code_field.label`,""),description:o("notifications","MSG216"),placeholder:n(`${t}.fields.zip_code_field.placeholder`,""),withHint:!0,renderHintContent:()=>e.jsx(ie,{type:"tooltips",messageId:"MSG129"})})})]}),e.jsx("div",{className:"grid-x",children:e.jsxs("div",{className:"cell validate-user-without-invoice-form__buttons",children:[e.jsx(ge,{className:"button button--cancel",to:p,children:e.jsx(g,{contentKey:`${t}.buttons.cancel_button_label`})}),e.jsx(he,{isDisabled:v(c)||!I||r||_||m,children:e.jsx(g,{contentKey:`${t}.buttons.${r?"submit_button_processing_label":"submit_button_label"}`})})]})})]})})})})},ae=({setActiveInvoiceCustomerTab:t})=>{const{getContentByKey:s}=D(),l=s("common[0].leaving_page_modal.leaving_page_confirmation_modal_text",""),i=j(Le),n=j(Ve),[o,r]=d.useState(""),a=s("step_1_tabs",[]);d.useEffect(()=>{L(a)||r(a[0].tab.tab_key)},[a]);const h={by_invoice_number:e.jsx(We,{}),by_customer_number:e.jsx(Ze,{})},p=a.map(m=>{const v=m.tab.tab_key;return{isSelected:o===v,text:m.tab.title,clickHandler:()=>{let b=!0;t(v===a[0].tab.tab_key),(i||n)&&(b=window.confirm(l)),b&&r(v)}}});return e.jsxs("div",{className:"account-retrieval-step",children:[e.jsx("div",{className:"account-retrieval-step__tabs",children:e.jsx(Ke,{tabsList:p})}),h[o]]})},Je=()=>{const t=J(),s=j(Re),l=j(Te),i=j(Pe),{getContentByKey:n}=D(),{isDesktop:o}=Z(),r="page_content.stepper.step_1.account_retrieval_form[0].form_description",a="page_content.stepper.step_1.validate_user_without_invoice_form[0].form_hint",[h,p]=d.useState(!0),m=x=>{p(x)};d.useEffect(()=>()=>{t(z(0)),t($e())},[t]);const v=()=>{const x=n("common[0].leaving_page_modal.leaving_page_confirmation_modal_text","");window.confirm(x)&&t(z(s-1))},b=()=>{t(z(s+1)),window.scrollTo({top:0,behavior:"smooth"})},u={0:e.jsx(ae,{setActiveInvoiceCustomerTab:m}),1:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"customer-registration-form__locations",children:e.jsx(oe,{locations:l})}),e.jsxs("div",{className:"customer-registration-form__locations-buttons",children:[e.jsx(M,{className:"link-1",onClick:v,children:e.jsx(g,{contentKey:"page_content.stepper.step_2.cancel_button_label"})}),e.jsx(M,{className:"customer-registration-form__verify-button",onClick:b,children:e.jsx(g,{contentKey:"page_content.stepper.step_2.verify_button_label"})})]})]}),2:e.jsx(ne,{contentstackPath:"page_content.stepper.step_3.personal_information_form[0]"})},N=()=>i?e.jsx(re,{...i}):u[s];return e.jsx(e.Fragment,{children:e.jsx("div",{className:"customer-registration-form",children:e.jsx("div",{className:"customer-registration-form__steps",children:e.jsxs("div",{className:"grid-x",children:[e.jsxs("div",{className:"cell small-12 medium-4",children:[e.jsx("h1",{className:"customer-registration-form__title",children:e.jsx(g,{contentKey:"page_content.heading"})}),e.jsx("div",{className:"customer-registration-form__description",children:e.jsx(ce,{contentKey:"page_content.registration_description"})}),e.jsx("div",{className:"customer-registration-form__container","data-testid":"customer-registration-form",children:e.jsxs(Ue,{activeStep:s,children:[e.jsx(P,{label:n("page_content.stepper.step_1.heading",""),icon:{url:W,alt:"icon chevron"},index:s,descriptionKey:h?r:a,children:e.jsx(ae,{setActiveInvoiceCustomerTab:m})}),e.jsx(P,{label:n("page_content.stepper.step_2.heading",""),icon:{url:W,alt:"icon chevron"},descriptionKey:"page_content.stepper.step_2.description",children:e.jsx("div",{className:"customer-registration-form__verify-locations",children:e.jsx("div",{children:e.jsxs("div",{className:"customer-registration-form__locations",children:[e.jsx(oe,{locations:l}),e.jsxs("div",{className:"customer-registration-form__locations-buttons",children:[e.jsx(M,{className:"link-1",onClick:v,children:e.jsx(g,{contentKey:"page_content.stepper.step_2.cancel_button_label"})}),e.jsx(M,{className:"customer-registration-form__verify-button",onClick:b,children:e.jsx(g,{contentKey:"page_content.stepper.step_2.verify_button_label"})})]})]})})})}),e.jsx(P,{label:n("page_content.stepper.step_3.heading",""),icon:{url:W,alt:"icon chevron"},completed:!L(i),descriptionKey:"page_content.stepper.step_3.personal_information_form[0].all_fields_required_message",children:i?e.jsx(re,{...i}):e.jsx(ne,{contentstackPath:"page_content.stepper.step_3.personal_information_form[0]"})})]})})]}),o&&e.jsx("div",{className:"cell auto medium-offset-1",children:N()})]})})})})},rt=()=>{const{breadcrumbs:t}=Be();return e.jsx(Ge,{withMarketingContent:!0,withBreadcrumbs:!0,withLoginCreateAccountTab:!0,selectedTabIndex:"1",breadcrumbs:t,children:e.jsx("div",{className:"customer-registration",children:e.jsx("div",{className:"customer-registration__forms",children:e.jsx(Je,{})})})})};export{rt as default};
2//# sourceMappingURL=index-D36dkIAa.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.