-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9880.cc55966a.iframe.bundle.js
1 lines (1 loc) · 31.4 KB
/
9880.cc55966a.iframe.bundle.js
1
"use strict";(self.webpackChunk_haaretz_a_htz_sg=self.webpackChunk_haaretz_a_htz_sg||[]).push([[9880],{"../../ds-atoms/s-button/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-button/src/Button.tsx").ZP},"../../ds-atoms/s-text-field/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-text-field/src/TextField.tsx").ZP},"../../ds-molecules/s-form-fields/src/EmailField/EmailField.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>EmailField});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),_haaretz_s_text_field__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../ds-atoms/s-text-field/src/index.ts"),_haaretz_s_validators_emailValidator__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../utils/s-validators/src/emailValidator/index.ts"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js");const _excluded=["externalState","styleExtend","inlineStyle"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={field:{height:"iIftcP",width:"cRUUAa"},fullWidthColumn:{gridColumnStart:"DIEXk"}};function EmailField(_ref){var _textFieldRef$current;let{externalState,styleExtend=[],inlineStyle}=_ref,props=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__.Z)(_ref,_excluded);const[internalState,internalSetState]=react__WEBPACK_IMPORTED_MODULE_2__.useState("default"),state=null!=externalState&&externalState.stateProp?externalState.stateProp:internalState,setState=null!=externalState&&externalState.setStateProp?externalState.setStateProp:internalSetState,textFieldRef=react__WEBPACK_IMPORTED_MODULE_2__.useRef(null),value=(null===(_textFieldRef$current=textFieldRef.current)||void 0===_textFieldRef$current?void 0:_textFieldRef$current.value)||"",description=(null==externalState?void 0:externalState.descriptionState)||(0,_haaretz_s_validators_emailValidator__WEBPACK_IMPORTED_MODULE_4__.Z)(value).text;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_haaretz_s_text_field__WEBPACK_IMPORTED_MODULE_5__.ZP,_objectSpread(_objectSpread({},props),{},{autoFocus:!0,name:"email","data-testid":"email-field",required:!0,maxLength:64,description,isInvalid:"default"!==state,label:"אימייל",placeholder:"[email protected]",type:"email",pattern:"\\S+@\\S+\\.\\S+",onInput:()=>{"default"!==state&&(setState("default"),(null==externalState?void 0:externalState.setDescriptionProp)&&externalState.setDescriptionProp(""))},styleExtend:[c.field,c.fullWidthColumn,...styleExtend],inlineStyle,onInvalid:e=>{e.preventDefault(),setState(e.currentTarget.value?"invalid":"empty")},ref:textFieldRef}))}try{EmailField.displayName="EmailField",EmailField.__docgenInfo={description:"",displayName:"EmailField",props:{description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\n\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyTextField(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <TextField\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<TextField styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},state:{defaultValue:null,description:"The input's functional state\n@defaultValue 'default'",name:"state",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"disabled"'},{value:'"default"'}]}},variant:{defaultValue:null,description:"Sets the basic visual appearance of the input.\n@defaultValue 'default'",name:"variant",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"default"'},{value:'"inverse"'}]}},isInvalid:{defaultValue:null,description:"Indicate the input is in an invalid state",name:"isInvalid",required:!1,type:{name:"boolean | undefined"}},opaque:{defaultValue:null,description:"Give input a solid opaque background\n@defaultValue false",name:"opaque",required:!1,type:{name:"boolean | undefined"}},type:{defaultValue:null,description:"The input's type attribue\n@defaultValue 'text'",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"number"'},{value:'"hidden"'},{value:'"search"'},{value:'"text"'},{value:'"tel"'},{value:'"email"'},{value:'"password"'}]}},label:{defaultValue:null,description:"The input's label",name:"label",required:!1,type:{name:"string | undefined"}},sharp:{defaultValue:null,description:"Sets sharp corners (without border-radius) on two or more corners",name:"sharp",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bottom"'},{value:'"top"'},{value:'"all"'},{value:'"end"'},{value:'"start"'}]}},startIcon:{defaultValue:null,description:"An icon component to place at the beginning of the input.",name:"startIcon",required:!1,type:{name:"ReactNode"}},endIcon:{defaultValue:null,description:"An icon component to place at the end of the input.",name:"endIcon",required:!1,type:{name:"ReactNode"}},required:{defaultValue:null,description:"Indicates if the input is required\n@defaultValue false",name:"required",required:!1,type:{name:"boolean | undefined"}},hideBorder:{defaultValue:null,description:"An input edge (or edges) on which the border is invisible\n(e.g. for grouping with a button)",name:"hideBorder",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bottom"'},{value:'"top"'},{value:'"all"'},{value:'"inline"'},{value:'"end"'},{value:'"start"'},{value:'"block"'}]}},externalState:{defaultValue:null,description:"",name:"externalState",required:!1,type:{name:"SetState | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-form-fields/src/EmailField/EmailField.tsx#EmailField"]={docgenInfo:EmailField.__docgenInfo,name:"EmailField",path:"../../ds-molecules/s-form-fields/src/EmailField/EmailField.tsx#EmailField"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-molecules/s-form-fields/src/EmailField/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-molecules/s-form-fields/src/EmailField/EmailField.tsx").Z},"../../ds-molecules/s-modal/src/Modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["children","inlineStyle","isOpen","labelledBy","onClick","onToggle","onOpen","onClose","styleExtend"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c_wrapper={position:"bEvNbr",bottom:"bLIxaN",left:"bOjOhu",right:"kLKrsq",top:"WhAZY",zIndex:"iYxGWt"},Modal=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function Modal(_ref,ref){let{children,inlineStyle,isOpen=!1,labelledBy,onClick,onToggle,onOpen,onClose:onCloseProp,styleExtend=[]}=_ref,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref,_excluded);const currentOpenState=react__WEBPACK_IMPORTED_MODULE_2__.useRef(!1),_modalRef=react__WEBPACK_IMPORTED_MODULE_2__.useRef(null),modalRef=null!=ref?ref:_modalRef;react__WEBPACK_IMPORTED_MODULE_2__.useEffect((()=>{const modalElem="current"in modalRef&&modalRef.current;modalElem&&(isOpen&&!currentOpenState.current?(modalElem.showModal(),currentOpenState.current=!0,onOpen&&onOpen(modalElem),onToggle&&onToggle(!0)):!isOpen&¤tOpenState.current&&(modalElem.close(),currentOpenState.current=!1))}),[isOpen,onOpen,onToggle,modalRef]);const onClose=react__WEBPACK_IMPORTED_MODULE_2__.useCallback((evt=>{currentOpenState.current=!1,onCloseProp&&onCloseProp(evt),onToggle&&onToggle(!1)}),[onCloseProp,onToggle]),handleClick=react__WEBPACK_IMPORTED_MODULE_2__.useCallback((evt=>{evt.target===evt.currentTarget&&evt.currentTarget.close(),onClick&&onClick(evt)}),[onClick]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("dialog",_objectSpread(_objectSpread({ref:modalRef,onClick:handleClick,tabIndex:-1,onClose},attrs),{},{"aria-labelledby":labelledBy||void 0,className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(...styleExtend),style:inlineStyle,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c_wrapper)}),children]}))}));Modal.__docgenInfo={description:"",methods:[],displayName:"Modal",props:{isOpen:{defaultValue:{value:"false",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Modal;try{Modal.displayName="Modal",Modal.__docgenInfo={description:"",displayName:"Modal",props:{children:{defaultValue:null,description:"The Children to be rendered inside `<Modal>`",name:"children",required:!1,type:{name:"ReactNode"}},labelledBy:{defaultValue:null,description:"The ID of the element (usually an h*) that is the title of the modal.\n\nIn the **RARE** cases where labeling isn't required, manually pass `null`.",name:"labelledBy",required:!0,type:{name:"string | null"}},isOpen:{defaultValue:{value:"false"},description:"Controls whether the modal is open or closed",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"A callback that is fired whenever the modal is opened or closed,\nand takes an `isOpen` boolean argument indicating if the modal is open",name:"onToggle",required:!1,type:{name:"((isOpen: boolean) => void) | undefined"}},onOpen:{defaultValue:null,description:"A callback that's fired whenever a modal window is opened and passed\na reference to the modal's underlying `dialog` element.",name:"onOpen",required:!1,type:{name:"((elem: HTMLDialogElement) => void) | undefined"}},inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyModal(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Modal\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<Modal styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-modal/src/Modal.tsx#Modal"]={docgenInfo:Modal.__docgenInfo,name:"Modal",path:"../../ds-molecules/s-modal/src/Modal.tsx#Modal"})}catch(__react_docgen_typescript_loader_error){}},"../../pp-organisms/s-pp-forgot-password/src/PpForgotPassword.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>PpForgotPassword});var defineProperty=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),jsx_runtime=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js");var useMutation=__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@tanstack/react-query/build/lib/useMutation.mjs"),GraphqlFetcher=__webpack_require__("../../graphql/s-graphql-fetcher/src/GraphqlFetcher.tsx");const ForgotPasswordMutationDocument="\n mutation ForgotPasswordMutation($input: ForgotPasswordInputType!) {\n forgotPassword(input: $input) {\n ...ForgotPassowrdResponseTypeFragment\n }\n}\n \n fragment ForgotPassowrdResponseTypeFragment on ForgotPassowrdResponseType {\n __typename\n success\n code\n message\n status\n}\n ",useForgotPasswordMutation=options=>(0,useMutation.D)(["ForgotPasswordMutation"],(variables=>(0,GraphqlFetcher.Z)(ForgotPasswordMutationDocument,variables)()),options);function useForgotPassword(options){return useForgotPasswordMutation(options)}useForgotPasswordMutation.getKey=()=>["ForgotPasswordMutation"],useForgotPasswordMutation.fetcher=(variables,options)=>(0,GraphqlFetcher.Z)(ForgotPasswordMutationDocument,variables,options);try{useForgotPassword.displayName="useForgotPassword",useForgotPassword.__docgenInfo={description:"",displayName:"useForgotPassword",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../hooks/s-auth-hooks/src/use-forgot-password/useForgotPassword.tsx#useForgotPassword"]={docgenInfo:useForgotPassword.__docgenInfo,name:"useForgotPassword",path:"../../hooks/s-auth-hooks/src/use-forgot-password/useForgotPassword.tsx#useForgotPassword"})}catch(__react_docgen_typescript_loader_error){}const use_forgot_password=useForgotPassword;var src=__webpack_require__("../../ds-atoms/s-button/src/index.ts"),s_consts_src=__webpack_require__("../../shared/s-consts/src/index.ts"),EmailField=__webpack_require__("../../ds-molecules/s-form-fields/src/EmailField/index.ts"),s_pp_modal_src=__webpack_require__("../../pp-organisms/s-pp-modal/src/index.ts"),react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={base:{"@media all and (min-width:37.5em)":{width:"kVOAQx"},"@media all and (max-width:37.4375em)":{paddingInlineStart:"fihjOS",paddingInlineEnd:"brNnsa"}},wrapper:{display:"gSBWlu",flexDirection:"iMkoWi",justifyContent:"IVbXa",alignItems:"foGVKH",marginInlineStart:"bMPiZO",marginInlineEnd:"gzedBA",minHeight:"gBLKjS",width:"fNvXVe","@media all and (max-width:37.4375em)":{minHeight:"ddAsqy",width:"eOgiUb"}},form:{display:"gSBWlu",flexDirection:"iMkoWi",justifyContent:"IVbXa",alignItems:"foGVKH"},emailField:{marginBottom:"cMjA_dD",width:"fNvXVe","@media all and (max-width:37.4375em)":{width:"eOgiUb"}},title:{fontSize:"dGDAum",lineHeight:"dRpeUM",marginBottom:"fmeKjt"},continueButton:{marginTop:"crUZPJ","@media all and (max-width:37.4375em)":{marginTop:"gmgMpi"}},loginButton:{marginTop:"ha_DTbp"},instructionsText:{textAlign:"kooHYa"}};function EmailStage(_ref){let{setStage,describedBy,email}=_ref;const[description,setDescription]=react.useState(""),[state,setState]=react.useState("default"),forgotPassword=use_forgot_password(),buttonStateProps=forgotPassword.isLoading?{state:"busy",busyNotice:"ממתין לתשובה"}:{state:"auto"};return(0,jsx_runtime.jsxs)("form",{className:(0,style9.Z)(c.form),onSubmit:e=>{e.preventDefault();const emailInput=e.currentTarget.elements.namedItem("email");emailInput&&forgotPassword.mutate({input:{site:s_consts_src.OE,userMail:emailInput.value}},{onSuccess:data=>{data.forgotPassword.success?setStage("insturctions"):(setDescription(data.forgotPassword.message||'עשינו בדיקה ומצאנו שכתובת הדוא"ל שהזנתם אינה קיימת.'),setState("invalid"))},onError:()=>{setDescription("אירעה שגיאה, אנא נסו מאוחר יותר"),setState("invalid")}})},"aria-describedby":describedBy,children:[(0,jsx_runtime.jsx)(EmailField.Z,{defaultValue:email,externalState:{descriptionState:description,stateProp:state,setStateProp:setState,setDescriptionProp:setDescription},"data-testid":"forgot-password-email-input",styleExtend:[c.emailField]}),(0,jsx_runtime.jsx)(src.ZP,_objectSpread(_objectSpread({styleExtend:[c.continueButton],type:"submit"},buttonStateProps),{},{"data-testid":"pp-forgot-password-continue",children:"המשך"}))]})}function InsturctionsStage(_ref2){let{onClick}=_ref2;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("p",{className:(0,style9.Z)(c.instructionsText),"data-testid":"pp-forgot-password-instructions-stage",children:"הוראות לאיפוס הסיסמא נשלחו לתיבת האימייל שלך"}),(0,jsx_runtime.jsx)(src.ZP,{onClick,styleExtend:[c.loginButton],"data-testid":"pp-forgot-password-close-btn",children:"סגור"})]})}function PpForgotPassword(_ref3){let{email,isOpen,onToggle}=_ref3;const[stage,setStage]=react.useState("email"),closeBtnHandler=()=>{onToggle(!1),setStage("email")};return(0,jsx_runtime.jsx)(s_pp_modal_src.Z,{onToggle,isOpen,labelledBy:"change_password_title",closeBtnOnClick:closeBtnHandler,styleExtend:[c.base],children:(0,jsx_runtime.jsxs)("div",{className:(0,style9.Z)(c.wrapper),children:[(0,jsx_runtime.jsx)("h1",{id:"change_password_title",className:(0,style9.Z)(c.title),"data-testid":"pp-forgot-password-header",children:"החלפת סיסמה"}),"email"===stage?(0,jsx_runtime.jsx)(EmailStage,{email,setStage,describedBy:"change_password_title"}):(0,jsx_runtime.jsx)(InsturctionsStage,{onClick:closeBtnHandler})]})})}try{PpForgotPassword.displayName="PpForgotPassword",PpForgotPassword.__docgenInfo={description:"",displayName:"PpForgotPassword",props:{isOpen:{defaultValue:null,description:"Controls the opening and closing of the modal",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"A callback that is fired whenever the modal is opened or closed,\nand takes an `isOpen` boolean argument indicating if the modal is open",name:"onToggle",required:!0,type:{name:"(isOpen: boolean) => void"}},email:{defaultValue:null,description:"",name:"email",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../pp-organisms/s-pp-forgot-password/src/PpForgotPassword.tsx#PpForgotPassword"]={docgenInfo:PpForgotPassword.__docgenInfo,name:"PpForgotPassword",path:"../../pp-organisms/s-pp-forgot-password/src/PpForgotPassword.tsx#PpForgotPassword"})}catch(__react_docgen_typescript_loader_error){}},"../../pp-organisms/s-pp-modal/src/PpModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>src_PpModal});var defineProperty=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),objectWithoutProperties=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),jsx_runtime=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),src=__webpack_require__("../../ds-atoms/s-click-area/src/index.ts"),s_icon_src=__webpack_require__("../../ds-atoms/s-icon/src/index.ts");const s_modal_src=__webpack_require__("../../ds-molecules/s-modal/src/Modal.tsx").Z;var react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["children","isOpen","labelledBy","styleExtend","inlineStyle","onToggle","closeBtnOnClick","closeBtnStyle"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={base:{borderTopStyle:"jAobFs",borderRightStyle:"dQbyJV",borderBottomStyle:"oTbqa",borderLeftStyle:"gwsGKP",borderTopLeftRadius:"kjdjaJ",borderTopRightRadius:"OUBEB",backgroundColor:"hXoEex",paddingTop:"icKiSN",paddingInlineStart:"dwXqlO",paddingInlineEnd:"kwGEcy",paddingBottom:"izetJs",overflowX:"dUvWpK",overflowY:"hRLVFh","::backdrop":{"--bgc":"jnXWKX",backdropFilter:"fNdmJG",backgroundColor:"jvkdtx",animationName:"bCIYPq",animationPlayState:"hiPugQ",animationDuration:"iGOlqW",animationDirection:"GNuRI",animationFillMode:"dRDwYY"},"@media all and (max-width:37.4375em)":{marginBottom:"gVzGtB",minWidth:"hkWxRA"},"@media all and (min-width:37.5em)":{"::backdrop":{"--bgc":"iJTkLm"},borderTopLeftRadius:"jYVHaP",borderTopRightRadius:"gTufyh",borderBottomRightRadius:"bdSBAK",borderBottomLeftRadius:"fSITDU",width:"cHYRhi"},"@media all and (min-width:64em)":{width:"kncOoy"}},onOpenKeyFrames:{"--trsfrm-a":"gvOsMs","--trsfrm-b":"ecTztE",animationName:"cnLsGC",animationDuration:"dbaUeh",animationFillMode:"hMOwcK",animationTimingFunction:"dDrDcI",opacity:"UXrzu","@media all and (min-width:37.5em)":{"--trsfrm-a":"gbAXaG","--trsfrm-b":"ekGltn"}},closeBtnClickArea:{display:"gSBWlu",justifyContent:"IVbXa",alignItems:"foGVKH",insetInlineEnd:"laZGxq",position:"bEvNbr",top:"WhAZY"},closeButtonCircle:{backgroundColor:"fIcjCT",borderTopLeftRadius:"eCJvpO",borderTopRightRadius:"KuLii",borderBottomRightRadius:"cPOOyy",borderBottomLeftRadius:"dJEuaT",display:"gSBWlu",justifyContent:"IVbXa",alignItems:"foGVKH",height:"fdoezE",width:"byQvkk"}},PpModal=react.forwardRef((function PpModal(_ref,ref){let{children,isOpen=!1,labelledBy,styleExtend=[],inlineStyle,onToggle,closeBtnOnClick,closeBtnStyle="blueCircle"}=_ref,attrs=(0,objectWithoutProperties.Z)(_ref,_excluded);const closeBtnBlueCircle="blueCircle"===closeBtnStyle;return(0,jsx_runtime.jsxs)(s_modal_src,_objectSpread(_objectSpread({onToggle,isOpen,styleExtend:[c.base,isOpen&&c.onOpenKeyFrames,...styleExtend],inlineStyle},attrs),{},{labelledBy,ref,children:[(0,jsx_runtime.jsx)(src.ZP,{size:"large",onClick:closeBtnOnClick,styleExtend:[c.closeBtnClickArea],"data-testid":"pp-modal-close-btn",children:(0,jsx_runtime.jsx)("div",{className:(0,style9.Z)(closeBtnBlueCircle&&c.closeButtonCircle),children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"close",variant:closeBtnBlueCircle?"inverse":"neutral"})})}),children]}))}));PpModal.__docgenInfo={description:"",methods:[],displayName:"PpModal",props:{isOpen:{defaultValue:{value:"false",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1},closeBtnStyle:{defaultValue:{value:"'blueCircle'",computed:!1},required:!1}}};const src_PpModal=PpModal;try{PpModal.displayName="PpModal",PpModal.__docgenInfo={description:"",displayName:"PpModal",props:{children:{defaultValue:null,description:"The Children to be rendered inside `<PpModal>`",name:"children",required:!1,type:{name:"ReactNode"}},inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyModal(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Modal\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<Modal styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},isOpen:{defaultValue:{value:"false"},description:"Controls the opening and closing of the modal",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"A callback to update ascendant state when a modal by and action inside it",name:"onToggle",required:!0,type:{name:"((isOpen: boolean) => void) | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!0,type:{name:"string | null"}},closeBtnOnClick:{defaultValue:null,description:"",name:"closeBtnOnClick",required:!0,type:{name:"MouseEventHandler<HTMLButtonElement>"}},closeBtnStyle:{defaultValue:{value:"blueCircle"},description:"",name:"closeBtnStyle",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"neutral"'},{value:'"blueCircle"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../pp-organisms/s-pp-modal/src/PpModal.tsx#PpModal"]={docgenInfo:PpModal.__docgenInfo,name:"PpModal",path:"../../pp-organisms/s-pp-modal/src/PpModal.tsx#PpModal"})}catch(__react_docgen_typescript_loader_error){}},"../../pp-organisms/s-pp-modal/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../pp-organisms/s-pp-modal/src/PpModal.tsx").Z},"../../utils/s-validators/src/emailValidator/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>src_emailValidator});const src_emailValidator=function emailValidator(email){return email?/\S+@\S+\.\S+/.test(email)?email.length>64?{valid:!1,text:"תווים 64 יש להזין אימייל מעלה"}:{valid:!0,text:"אנא הזינו אימייל"}:{valid:!1,text:"יש להזין אימייל תקין"}:{valid:!1,text:"אנא הזינו אימייל"}}}}]);