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KVN,GACgB,YAAjBJ,EAASW,UACQ,YAAjBX,EAASW,SAUJ7F,EAAAA,cAACiF,EAASV,OAAAuB,OAAA,CAACZ,SAAUA,EAAUK,QAASA,GAAaJ,IARpC,KAAlBD,EAASa,OACXC,EAAAA,EAAAA,UAAS,UAAUd,EAASe,OAASf,EAASa,MACvC,QAETC,EAAAA,EAAAA,UAAS,WACF,KAG2D,E,sBCzBtE,MAAME,GAAUC,EAAAA,EAAAA,OAAK,IAAM,iCACrBC,GAAWD,EAAAA,EAAAA,OAAK,IAAM,iCACtBE,GAAiBF,EAAAA,EAAAA,OAAK,IAAM,iCAC5BG,GAAYH,EAAAA,EAAAA,OAAK,IAAM,6FACvBI,GAAQJ,EAAAA,EAAAA,OAAK,IAAM,iCA+BzB,MA7BYK,KACV,MAAMC,EAA0B,oBAAXC,OACrB,OACE1G,EAAAA,cAAAA,EAAAA,SAAA,MACIyG,GACAzG,EAAAA,cAAC2G,EAAAA,SAAQ,CACPC,SACE5G,EAAAA,cAAC0F,EAAAA,EAAM,CAACC,MAAM,gBACZ3F,EAAAA,cAAC4F,EAAAA,EAAM,QAIX5F,EAAAA,cAAC6G,EAAAA,OAAM,CAACC,SAAS,QACf9G,EAAAA,cAAC+G,EAAY,CACXC,KAAK,wBACLhC,UAAWiC,EAAAA,IAEbjH,EAAAA,cAAC+G,EAAY,CAACC,KAAK,YAAYhC,UAAWoB,IAC1CpG,EAAAA,cAAC+G,EAAY,CAACC,KAAK,kBAAkBhC,UAAWqB,IAChDrG,EAAAA,cAAC+G,EAAY,CAACC,KAAK,WAAWhC,UAAWkB,IACzClG,EAAAA,cAAC+G,EAAY,CAACC,KAAK,aAAahC,UAAWsB,IAC3CtG,EAAAA,cAAC+G,EAAY,CAACC,KAAK,SAAShC,UAAWuB,MAI5C,C","sources":["webpack://benahmed-education/./src/components/molecules/Modals/CompleteRegistration/UserType.js","webpack://benahmed-education/./src/components/molecules/Modals/CompleteRegistration/TeacherOption.js","webpack://benahmed-education/./src/components/molecules/Modals/CompleteRegistration/StudentOptions.js","webpack://benahmed-education/./src/components/molecules/Modals/CompleteRegistration/StarsOffer.js","webpack://benahmed-education/./src/components/molecules/Modals/CompleteRegistration/CompleteRegistration.js","webpack://benahmed-education/./src/components/molecules/Modals/CompleteRegistration/index.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://benahmed-education/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://benahmed-education/./src/components/privateRoute.js","webpack://benahmed-education/./src/pages/App.js"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"components/atomes\";\nimport { StaticImage } from \"gatsby-plugin-image\";\n\nconst UserType = ({ handelPreSignup, className }) => {\n return (\n <>\n

هل أنت:

\n
\n
\n \n \n \n \n \n );\n};\n\nexport default UserType;\n","import React from \"react\";\nimport { getSubjects } from \"utility/helper\";\nimport { NewSelect } from \"components/atomes\";\n\nconst TeacherOption = ({ className, values, setValues, setValuesAndForm }) => {\n return (\n <>\n

إختر الطور

\n
\n \n

إختر المادة

\n \n
\n \n );\n};\n\nexport default TeacherOption;\n","import React from \"react\";\nimport { getLevels, getDivisions } from \"utility/helper\";\nimport { NewSelect } from \"components/atomes\";\n\nconst StudentOptions = ({\n className = \"card--signUp\",\n values,\n setValues,\n setValuesAndForm,\n}) => {\n const getNextStep = values => {\n const { level, division } = values;\n const today = new Date().toISOString();\n if (\n level[1] === 3 &&\n (division[1] === 1 || division[1] === 2 || division[1] === 3) &&\n !today.startsWith(\"2024-10-12\")\n ) {\n return \"tutoring\";\n }\n return \"info\";\n };\n return (\n <>\n

إختر الطور

\n
\n \n \n {values.phase[1] === \"3\" && (\n \n )}\n
\n \n );\n};\n\nexport default StudentOptions;\n","import React from \"react\";\n\nconst StarsOffer = ({ values, setValues, setValuesAndForm }) => {\n return
StarsOffer
;\n};\n\nexport default StarsOffer;\n","import React, { useEffect, useState } from \"react\";\n\nimport UserType from \"./UserType\";\nimport Logo from \"components/Logo\";\nimport TeacherOption from \"./TeacherOption\";\nimport StudentOptions from \"./StudentOptions\";\nimport PersonalInfos from \"./PersonalInfos\";\nimport Summary from \"./Summary\";\nimport Tutoring from \"./Tutoring\";\nimport StarsOffer from \"./StarsOffer\";\n\nconst CompleteRegistration = ({ id }) => {\n const [values, setValues] = useState({\n subject: \"إختر المادة\",\n level: \"إختر المستوى\",\n division: \"إختر الشعبة\",\n phase: [\"إختر الطور\", \"إختر الطور\"],\n userType: \"user\",\n firstName: \"\",\n lastName: \"\",\n phone: \"\",\n day: \"\",\n time: \"\",\n });\n const [formState, setFormState] = useState(\"preSignup\");\n\n const setValuesAndForm = step => fn => {\n setValues(state => {\n const newState = fn(state);\n if (typeof step === \"function\") {\n setFormState(step(newState));\n } else {\n setFormState(step);\n }\n return newState;\n });\n };\n const handelPreSignup = userType => e => {\n e.preventDefault();\n setFormState(\n userType === \"user\" || userType === \"parent\" ? \"info\" : userType\n );\n setValues(state => ({ ...state, userType }));\n };\n\n return (\n \n \n \n {formState === \"preSignup\" && (\n \n )}\n {formState === \"teacher\" && (\n \n )}\n {formState === \"student\" && (\n \n )}\n {formState === \"tutoring\" && (\n \n )}\n {formState === \"offer\" && (\n \n )}\n {formState === \"info\" && (\n \n )}\n\n {formState === \"signup\" && }\n \n \n );\n};\n\nexport default CompleteRegistration;\n","import CompleteRegistration from \"./CompleteRegistration\";\n\nexport default CompleteRegistration;\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import React from \"react\";\nimport { navigate } from \"gatsby\";\n\nimport { useUser } from \"../context/userContext\";\nimport Layout from \"components/layout\";\nimport Loader from \"components/loader\";\n\nconst PrivateRoute = ({ component: Component, location, ...rest }) => {\n const {\n userDetail: { isLoggedIn, profile, isLoading },\n } = useUser();\n\n if (isLoading) {\n return (\n \n \n \n );\n }\n if (\n !isLoggedIn &&\n location.pathname !== `/Signin` &&\n location.pathname !== `/Signup`\n ) {\n if (location.hash !== \"\") {\n navigate(`/Signup${location.search}${location.hash}`);\n return null;\n }\n navigate(\"/Signin\");\n return null;\n }\n\n return ;\n};\nexport default PrivateRoute;\n","import React, { lazy, Suspense } from \"react\";\nimport { Router } from \"@reach/router\";\n\nimport PrivateRoute from \"../components/privateRoute\";\nimport Loader from \"components/loader/Loader\";\nimport Layout from \"components/layout\";\nimport CompleteRegistration from \"components/molecules/Modals/CompleteRegistration\";\nconst Profile = lazy(() => import(\"../components/profile\"));\nconst ThankYou = lazy(() => import(\"../components/thankyou\"));\nconst PaymentsResult = lazy(() => import(\"../components/PaymentsResult\"));\nconst Dashboard = lazy(() => import(\"../components/dashboard\"));\nconst Admin = lazy(() => import(\"components/dashboard/AdminDashboard\"));\n\nconst App = () => {\n const isSSR = typeof window === \"undefined\";\n return (\n <>\n {!isSSR && (\n \n \n \n }\n >\n \n \n \n \n \n \n \n \n \n )}\n \n );\n};\n\nexport default App;\n"],"names":["_ref","handelPreSignup","className","React","Button","handelClick","style","display","flexDirection","padding","StaticImage","src","alt","objectFit","__imageData","require","values","setValues","setValuesAndForm","NewSelect","name","value","phase","options","setValue","subject","getSubjects","level","getLevels","division","getDivisions","today","Date","toISOString","startsWith","id","useState","userType","firstName","lastName","phone","day","time","formState","setFormState","step","fn","state","newState","backgroundColor","gap","paddingTop","alignItems","Logo","width","justifyContent","UserType","e","preventDefault","_objectSpread","TeacherOption","StudentOptions","Tutoring","setForm","StarsOffer","PersonalInfos","Summary","_objectWithoutProperties","source","excluded","key","i","target","sourceKeys","Object","keys","length","indexOf","getOwnPropertySymbols","sourceSymbolKeys","prototype","propertyIsEnumerable","call","component","Component","location","rest","_excluded","userDetail","isLoggedIn","profile","isLoading","useUser","Layout","title","Loader","pathname","assign","hash","navigate","search","Profile","lazy","ThankYou","PaymentsResult","Dashboard","Admin","App","isSSR","window","Suspense","fallback","Router","basepath","PrivateRoute","path","CompleteRegistration"],"sourceRoot":""}