12 |
- (this["webpackJsonpreact-21-22"]=this["webpackJsonpreact-21-22"]||[]).push([[1],{498:function(e,a,n){"use strict";n.r(a);var t=n(1),o=n.n(t),c=n(5),i=n(142),r=n(7),d=n(0),l=n(21),s=n.p+"static/media/qrCode_telegram.bb0caf3c.png",m=n(476),u=n(489),b=Object(m.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:350,margin:"0 auto",paddingTop:64,paddingBottom:24},picture:{marginBottom:16},title:{textAlign:"center",marginBottom:16},titleSpan:{display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center",width:25,height:25,position:"absolute",left:780,backgroundColor:"#5497f0",borderRadius:"50%",color:"#ffffff"},button:{marginTop:20,height:50,color:"#5497f0"}}),p=function(e){var a=e.handleIsQR,n=b();return Object(r.jsxs)("div",{className:n.container,children:[Object(r.jsx)("img",{className:n.picture,alt:"QRCode",src:s,width:"300",height:"300"}),Object(r.jsx)("h2",{className:n.title,children:"Log in to Telegram by QR Code"}),Object(r.jsxs)("h3",{className:n.title,children:[Object(r.jsx)("span",{className:n.titleSpan,children:"1"}),"Open Telegram on your phone"]}),Object(r.jsxs)("h3",{className:n.title,children:[Object(r.jsx)("span",{className:n.titleSpan,children:"2"}),"Go to Settings > Devices > Link Desktop Device"]}),Object(r.jsxs)("h3",{className:n.title,children:[Object(r.jsx)("span",{className:n.titleSpan,children:"3"}),"Log in to Telegram by QR Code"]}),Object(r.jsx)(u.a,{onClick:a,className:n.button,variant:"text",color:"default",fullWidth:!0,children:"LOG IN BY PHONE NUMBER"})]})},h=n.p+"static/media/icons8-telegram-app.be023370.svg",g=n(495),j=n(141),f=n(179),O=n(2),v=n(23),x=n(146),y=n(505),C=n(280),N=n(172),I=n(213),S=n(22),k="undefined"===typeof window?d.useEffect:d.useLayoutEffect,w=d.forwardRef((function(e,a){var n=e.alignItems,t=void 0===n?"center":n,o=e.autoFocus,c=void 0!==o&&o,i=e.button,r=void 0!==i&&i,l=e.children,s=e.classes,m=e.className,u=e.component,b=e.ContainerComponent,p=void 0===b?"li":b,h=e.ContainerProps,g=(h=void 0===h?{}:h).className,f=Object(j.a)(h,["className"]),x=e.dense,w=void 0!==x&&x,T=e.disabled,B=void 0!==T&&T,R=e.disableGutters,P=void 0!==R&&R,A=e.divider,L=void 0!==A&&A,M=e.focusVisibleClassName,E=e.selected,F=void 0!==E&&E,G=Object(j.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),D=d.useContext(I.a),z={dense:w||D.dense||!1,alignItems:t},V=d.useRef(null);k((function(){c&&V.current&&V.current.focus()}),[c]);var W=d.Children.toArray(l),Q=W.length&&Object(C.a)(W[W.length-1],["ListItemSecondaryAction"]),K=d.useCallback((function(e){V.current=S.findDOMNode(e)}),[]),U=Object(N.a)(K,a),H=Object(O.a)({className:Object(v.a)(s.root,m,z.dense&&s.dense,!P&&s.gutters,L&&s.divider,B&&s.disabled,r&&s.button,"center"!==t&&s.alignItemsFlexStart,Q&&s.secondaryAction,F&&s.selected),disabled:B},G),Z=u||"li";return r&&(H.component=u||"div",H.focusVisibleClassName=Object(v.a)(s.focusVisible,M),Z=y.a),Q?(Z=H.component||u?Z:"div","li"===p&&("li"===Z?Z="div":"li"===H.component&&(H.component="div")),d.createElement(I.a.Provider,{value:z},d.createElement(p,Object(O.a)({className:Object(v.a)(s.container,g),ref:U},f),d.createElement(Z,H,W),W.pop()))):d.createElement(I.a.Provider,{value:z},d.createElement(Z,Object(O.a)({ref:U},H),W))})),T=Object(x.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(w),B=d.forwardRef((function(e,a){var n,t=e.classes,o=e.className,c=e.component,i=void 0===c?"li":c,r=e.disableGutters,l=void 0!==r&&r,s=e.ListItemClasses,m=e.role,u=void 0===m?"menuitem":m,b=e.selected,p=e.tabIndex,h=Object(j.a)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==p?p:-1),d.createElement(T,Object(O.a)({button:!0,role:u,tabIndex:n,component:i,selected:b,disableGutters:l,classes:Object(O.a)({dense:t.dense},s),className:Object(v.a)(t.root,o,b&&t.selected,!l&&t.gutters),ref:a},h))})),R=Object(x.a)((function(e){return{root:Object(O.a)({},e.typography.body1,Object(f.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(O.a)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(B),P=n(503),A=n(6),L=n(14),M=n(466),E=n(281),F=n(519),G=n(166),D=n(144),z=n(145),V=n(467),W=n(468);function Q(e){return Object(V.a)("MuiFormControlLabel",e)}var K=Object(W.a)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]),U=n(283),H=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],Z=Object(D.a)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:function(e,a){var n=e.ownerState;return[Object(A.a)({},"& .".concat(K.label),a.label),a.root,a["labelPlacement".concat(Object(G.a)(n.labelPlacement))]]}})((function(e){var a=e.theme,n=e.ownerState;return Object(O.a)(Object(A.a)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16},"&.".concat(K.disabled),{cursor:"default"}),"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},Object(A.a)({},"& .".concat(K.label),Object(A.a)({},"&.".concat(K.disabled),{color:a.palette.text.disabled})))})),q=d.forwardRef((function(e,a){var n=Object(z.a)({props:e,name:"MuiFormControlLabel"}),t=n.className,o=n.componentsProps,c=void 0===o?{}:o,i=n.control,l=n.disabled,s=n.disableTypography,m=n.label,u=n.labelPlacement,b=void 0===u?"end":u,p=Object(L.a)(n,H),h=Object(E.a)(),g=l;"undefined"===typeof g&&"undefined"!==typeof i.props.disabled&&(g=i.props.disabled),"undefined"===typeof g&&h&&(g=h.disabled);var j={disabled:g};["checked","name","onChange","value","inputRef"].forEach((function(e){"undefined"===typeof i.props[e]&&"undefined"!==typeof n[e]&&(j[e]=n[e])}));var f=Object(U.a)({props:n,muiFormControl:h,states:["error"]}),x=Object(O.a)({},n,{disabled:g,label:m,labelPlacement:b,error:f.error}),y=function(e){var a=e.classes,n=e.disabled,t=e.labelPlacement,o=e.error,c={root:["root",n&&"disabled","labelPlacement".concat(Object(G.a)(t)),o&&"error"],label:["label",n&&"disabled"]};return Object(M.a)(c,Q,a)}(x);return Object(r.jsxs)(Z,Object(O.a)({className:Object(v.a)(y.root,t),ownerState:x,ref:a},p,{children:[d.cloneElement(i,j),m.type===F.a||s?m:Object(r.jsx)(F.a,Object(O.a)({component:"span",className:y.label},c.typography,{children:m}))]}))})),J=[{code:"+7 840",name:"Abkhazia"},{code:"+93",name:"Afghanistan"},{code:"+355",name:"Albania"},{code:"+213",name:"Algeria"},{code:"+1 684",name:"American Samoa"},{code:"+376",name:"Andorra"},{code:"+244",name:"Angola"},{code:"+1 264",name:"Anguilla"},{code:"+1 268",name:"Antigua and Barbuda"},{code:"+54",name:"Argentina"},{code:"+374",name:"Armenia"},{code:"+297",name:"Aruba"},{code:"+247",name:"Ascension"},{code:"+61",name:"Australia"},{code:"+672",name:"Australian External Territories"},{code:"+43",name:"Austria"},{code:"+994",name:"Azerbaijan"},{code:"+1 242",name:"Bahamas"},{code:"+973",name:"Bahrain"},{code:"+880",name:"Bangladesh"},{code:"+1 246",name:"Barbados"},{code:"+1 268",name:"Barbuda"},{code:"+375",name:"Belarus"},{code:"+32",name:"Belgium"},{code:"+501",name:"Belize"},{code:"+229",name:"Benin"},{code:"+1 441",name:"Bermuda"},{code:"+975",name:"Bhutan"},{code:"+591",name:"Bolivia"},{code:"+387",name:"Bosnia and Herzegovina"},{code:"+267",name:"Botswana"},{code:"+55",name:"Brazil"},{code:"+246",name:"British Indian Ocean Territory"},{code:"+1 284",name:"British Virgin Islands"},{code:"+673",name:"Brunei"},{code:"+359",name:"Bulgaria"},{code:"+226",name:"Burkina Faso"},{code:"+257",name:"Burundi"},{code:"+855",name:"Cambodia"},{code:"+237",name:"Cameroon"},{code:"+1",name:"Canada"},{code:"+238",name:"Cape Verde"},{code:"+ 345",name:"Cayman Islands"},{code:"+236",name:"Central African Republic"},{code:"+235",name:"Chad"},{code:"+56",name:"Chile"},{code:"+86",name:"China"},{code:"+61",name:"Christmas Island"},{code:"+61",name:"Cocos-Keeling Islands"},{code:"+57",name:"Colombia"},{code:"+269",name:"Comoros"},{code:"+242",name:"Congo"},{code:"+243",name:"Congo, Dem. Rep. of (Zaire)"},{code:"+682",name:"Cook Islands"},{code:"+506",name:"Costa Rica"},{code:"+385",name:"Croatia"},{code:"+53",name:"Cuba"},{code:"+599",name:"Curacao"},{code:"+537",name:"Cyprus"},{code:"+420",name:"Czech Republic"},{code:"+45",name:"Denmark"},{code:"+246",name:"Diego Garcia"},{code:"+253",name:"Djibouti"},{code:"+1 767",name:"Dominica"},{code:"+1 809",name:"Dominican Republic"},{code:"+670",name:"East Timor"},{code:"+56",name:"Easter Island"},{code:"+593",name:"Ecuador"},{code:"+20",name:"Egypt"},{code:"+503",name:"El Salvador"},{code:"+240",name:"Equatorial Guinea"},{code:"+291",name:"Eritrea"},{code:"+372",name:"Estonia"},{code:"+251",name:"Ethiopia"},{code:"+500",name:"Falkland Islands"},{code:"+298",name:"Faroe Islands"},{code:"+679",name:"Fiji"},{code:"+358",name:"Finland"},{code:"+33",name:"France"},{code:"+596",name:"French Antilles"},{code:"+594",name:"French Guiana"},{code:"+689",name:"French Polynesia"},{code:"+241",name:"Gabon"},{code:"+220",name:"Gambia"},{code:"+995",name:"Georgia"},{code:"+49",name:"Germany"},{code:"+233",name:"Ghana"},{code:"+350",name:"Gibraltar"},{code:"+30",name:"Greece"},{code:"+299",name:"Greenland"},{code:"+1 473",name:"Grenada"},{code:"+590",name:"Guadeloupe"},{code:"+1 671",name:"Guam"},{code:"+502",name:"Guatemala"},{code:"+224",name:"Guinea"},{code:"+245",name:"Guinea-Bissau"},{code:"+595",name:"Guyana"},{code:"+509",name:"Haiti"},{code:"+504",name:"Honduras"},{code:"+852",name:"Hong Kong SAR China"},{code:"+36",name:"Hungary"},{code:"+354",name:"Iceland"},{code:"+91",name:"India"},{code:"+62",name:"Indonesia"},{code:"+98",name:"Iran"},{code:"+964",name:"Iraq"},{code:"+353",name:"Ireland"},{code:"+972",name:"Israel"},{code:"+39",name:"Italy"},{code:"+225",name:"Ivory Coast"},{code:"+1 876",name:"Jamaica"},{code:"+81",name:"Japan"},{code:"+962",name:"Jordan"},{code:"+7 7",name:"Kazakhstan"},{code:"+254",name:"Kenya"},{code:"+686",name:"Kiribati"},{code:"+965",name:"Kuwait"},{code:"+996",name:"Kyrgyzstan"},{code:"+856",name:"Laos"},{code:"+371",name:"Latvia"},{code:"+961",name:"Lebanon"},{code:"+266",name:"Lesotho"},{code:"+231",name:"Liberia"},{code:"+218",name:"Libya"},{code:"+423",name:"Liechtenstein"},{code:"+370",name:"Lithuania"},{code:"+352",name:"Luxembourg"},{code:"+853",name:"Macau SAR China"},{code:"+389",name:"Macedonia"},{code:"+261",name:"Madagascar"},{code:"+265",name:"Malawi"},{code:"+60",name:"Malaysia"},{code:"+960",name:"Maldives"},{code:"+223",name:"Mali"},{code:"+356",name:"Malta"},{code:"+692",name:"Marshall Islands"},{code:"+596",name:"Martinique"},{code:"+222",name:"Mauritania"},{code:"+230",name:"Mauritius"},{code:"+262",name:"Mayotte"},{code:"+52",name:"Mexico"},{code:"+691",name:"Micronesia"},{code:"+1 808",name:"Midway Island"},{code:"+373",name:"Moldova"},{code:"+377",name:"Monaco"},{code:"+976",name:"Mongolia"},{code:"+382",name:"Montenegro"},{code:"+1664",name:"Montserrat"},{code:"+212",name:"Morocco"},{code:"+95",name:"Myanmar"},{code:"+264",name:"Namibia"},{code:"+674",name:"Nauru"},{code:"+977",name:"Nepal"},{code:"+31",name:"Netherlands"},{code:"+599",name:"Netherlands Antilles"},{code:"+1 869",name:"Nevis"},{code:"+687",name:"New Caledonia"},{code:"+64",name:"New Zealand"},{code:"+505",name:"Nicaragua"},{code:"+227",name:"Niger"},{code:"+234",name:"Nigeria"},{code:"+683",name:"Niue"},{code:"+672",name:"Norfolk Island"},{code:"+850",name:"North Korea"},{code:"+1 670",name:"Northern Mariana Islands"},{code:"+47",name:"Norway"},{code:"+968",name:"Oman"},{code:"+92",name:"Pakistan"},{code:"+680",name:"Palau"},{code:"+970",name:"Palestinian Territory"},{code:"+507",name:"Panama"},{code:"+675",name:"Papua New Guinea"},{code:"+595",name:"Paraguay"},{code:"+51",name:"Peru"},{code:"+63",name:"Philippines"},{code:"+48",name:"Poland"},{code:"+351",name:"Portugal"},{code:"+1 787",name:"Puerto Rico"},{code:"+974",name:"Qatar"},{code:"+262",name:"Reunion"},{code:"+40",name:"Romania"},{code:"+7",name:"Russia"},{code:"+250",name:"Rwanda"},{code:"+685",name:"Samoa"},{code:"+378",name:"San Marino"},{code:"+966",name:"Saudi Arabia"},{code:"+221",name:"Senegal"},{code:"+381",name:"Serbia"},{code:"+248",name:"Seychelles"},{code:"+232",name:"Sierra Leone"},{code:"+65",name:"Singapore"},{code:"+421",name:"Slovakia"},{code:"+386",name:"Slovenia"},{code:"+677",name:"Solomon Islands"},{code:"+27",name:"South Africa"},{code:"+500",name:"South Georgia and the South Sandwich Islands"},{code:"+82",name:"South Korea"},{code:"+34",name:"Spain"},{code:"+94",name:"Sri Lanka"},{code:"+249",name:"Sudan"},{code:"+597",name:"Suriname"},{code:"+268",name:"Swaziland"},{code:"+46",name:"Sweden"},{code:"+41",name:"Switzerland"},{code:"+963",name:"Syria"},{code:"+886",name:"Taiwan"},{code:"+992",name:"Tajikistan"},{code:"+255",name:"Tanzania"},{code:"+66",name:"Thailand"},{code:"+670",name:"Timor Leste"},{code:"+228",name:"Togo"},{code:"+690",name:"Tokelau"},{code:"+676",name:"Tonga"},{code:"+1 868",name:"Trinidad and Tobago"},{code:"+216",name:"Tunisia"},{code:"+90",name:"Turkey"},{code:"+993",name:"Turkmenistan"},{code:"+1 649",name:"Turks and Caicos Islands"},{code:"+688",name:"Tuvalu"},{code:"+1 340",name:"U.S. Virgin Islands"},{code:"+256",name:"Uganda"},{code:"+380",name:"Ukraine"},{code:"+971",name:"United Arab Emirates"},{code:"+44",name:"United Kingdom"},{code:"+1",name:"United States"},{code:"+598",name:"Uruguay"},{code:"+998",name:"Uzbekistan"},{code:"+678",name:"Vanuatu"},{code:"+58",name:"Venezuela"},{code:"+84",name:"Vietnam"},{code:"+1 808",name:"Wake Island"},{code:"+681",name:"Wallis and Futuna"},{code:"+967",name:"Yemen"},{code:"+260",name:"Zambia"},{code:"+255",name:"Zanzibar"},{code:"+263",name:"Zimbabwe"}],Y=Object(m.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:350,margin:"0 auto",paddingTop:64,paddingBottom:24},picture:{marginBottom:16,paddingLeft:45},title:{textAlign:"center",marginBottom:16},titleConfirm:{color:"#b4b4b4",fontWeight:400},buttonQR:{marginTop:20,height:50,color:"#5497f0"},buttonNext:{marginTop:20,height:50,color:"#f8f8f8",backgroundColor:"#1d74c5"},textField:{marginBottom:20}}),$=function(e){var a=e.handleIsQR,n=e.handleIsCheck,t=e.handleSendCode,o=e.number,c=e.setNumber,i=(e.country,e.setCountry),d=e.isChecked,l=e.isValidCredentials,s=Y(),m=function(e){var a,n=e.target.value;switch(e.target.name){case"country":i(n);var t=null===(a=J.find((function(e){return e.name===n})))||void 0===a?void 0:a.code;t&&c(t);break;case"number":c(n)}};return Object(r.jsxs)("div",{className:s.container,children:[Object(r.jsx)("img",{className:s.picture,alt:"QRCode",src:h,width:"270",height:"270"}),Object(r.jsx)("h2",{className:s.title,children:"Telegram"}),Object(r.jsx)("h4",{className:s.title+" "+s.titleConfirm,children:"Please confirm your country code and enter your phone number."}),Object(r.jsx)(g.a,{id:"country",name:"country",label:"Country",fullWidth:!0,variant:"outlined",defaultValue:"",select:!0,className:s.textField,onChange:m,children:J.map((function(e){var a=e.name;return Object(r.jsx)(R,{value:a,children:a},a)}))}),Object(r.jsx)(g.a,{id:"number",name:"number",label:"Your phone number",value:o,fullWidth:!0,variant:"outlined",onChange:m}),Object(r.jsx)(q,{label:"Keep me signed in",control:Object(r.jsx)(P.a,{checked:d,onChange:n,inputProps:{"aria-label":"controlled"}})}),l()&&Object(r.jsx)(u.a,{onClick:t,className:s.buttonNext,color:"primary",variant:"contained",fullWidth:!0,children:"NEXT"}),Object(r.jsx)(u.a,{onClick:a,className:s.buttonQR,variant:"text",color:"default",fullWidth:!0,children:"LOG IN BY QR CODE"})]})},X=n.p+"static/media/monkey.ded8ac2a.png",_=n(480),ee=n(491),ae=n(270),ne=n.n(ae),te=Object(m.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:350,margin:"0 auto",paddingTop:64,paddingBottom:24},picture:{marginBottom:70},titleConfirm:{color:"#b4b4b4",fontWeight:400,textAlign:"center",marginBottom:20},buttonSubmit:{marginTop:20,height:50,color:"#5497f0"},textField:{marginBottom:20}}),oe=function(e){var a=e.handleIsValidCode,n=e.number,t=e.handleResetState,o=te();return Object(r.jsxs)("div",{className:o.container,children:[Object(r.jsx)("img",{className:o.picture,alt:"QRCode",src:X,width:"150",height:"150"}),Object(r.jsxs)(_.a,{variant:"h4",color:"initial",children:[n,Object(r.jsx)(ee.a,{size:"medium","aria-label":"secondary",onClick:t,children:Object(r.jsx)(ne.a,{})})]}),Object(r.jsx)("h3",{className:o.titleConfirm,children:"We've sent the code to the Telegram app on your other device."}),Object(r.jsx)(g.a,{id:"code",name:"code",label:"Code",variant:"outlined",fullWidth:!0,className:o.textField,onChange:a})]})},ce=n(15),ie=d.forwardRef((function(e,a){var n=e.classes,t=e.className,o=Object(j.a)(e,["classes","className"]),c=d.useContext(I.a);return d.createElement("div",Object(O.a)({className:Object(v.a)(n.root,t,"flex-start"===c.alignItems&&n.alignItemsFlexStart),ref:a},o))})),re=Object(x.a)((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(ie),de=d.forwardRef((function(e,a){var n=e.children,t=e.classes,o=e.className,c=e.disableTypography,i=void 0!==c&&c,r=e.inset,l=void 0!==r&&r,s=e.primary,m=e.primaryTypographyProps,u=e.secondary,b=e.secondaryTypographyProps,p=Object(j.a)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),h=d.useContext(I.a).dense,g=null!=s?s:n;null==g||g.type===_.a||i||(g=d.createElement(_.a,Object(O.a)({variant:h?"body2":"body1",className:t.primary,component:"span",display:"block"},m),g));var f=u;return null==f||f.type===_.a||i||(f=d.createElement(_.a,Object(O.a)({variant:"body2",className:t.secondary,color:"textSecondary",display:"block"},b),f)),d.createElement("div",Object(O.a)({className:Object(v.a)(t.root,o,h&&t.dense,l&&t.inset,g&&f&&t.multiline),ref:a},p),g,f)})),le=Object(x.a)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(de),se=n(513),me=n(241),ue=n.n(me),be=n(254),pe=Object(m.a)({container:{width:"100%"},dropZone:{display:"flex",flexDirection:"column",alignItems:"center",alignContent:"center",justifyContent:"center",width:"100%",padding:"10px",borderRadius:10,cursor:"pointer",marginBottom:20,outline:"2px solid #959696","&:hover":{outline:"dashed #0040b8"}}}),he=function(e){var a=e.setUpload,n=Object(be.a)({accept:"image/*"}),t=n.acceptedFiles,o=n.getRootProps,c=n.getInputProps;Object(d.useEffect)((function(){a(t[0])}),[a,t]);var i=pe(),l=t.map((function(e){return Object(r.jsxs)(T,{children:[Object(r.jsx)(re,{children:Object(r.jsx)(ue.a,{})}),Object(r.jsx)(le,{primary:"Avatar uploaded",secondary:"".concat(e.path," -").concat(e.size," bytes")})]},e.path)}));return Object(r.jsxs)("section",{className:i.container,children:[Object(r.jsxs)("div",Object(ce.a)(Object(ce.a)({},o({className:i.dropZone})),{},{children:[Object(r.jsx)(se.a,{children:"Drag or drop avatar*"}),Object(r.jsx)("input",Object(ce.a)({},c())),Object(r.jsx)("img",{alt:"drop zone img",src:"https://imagga.com/static/images/upload.svg",width:88,height:72}),Object(r.jsx)(_.a,{variant:"h6",color:"initial",children:"image/*"})]})),Object(r.jsx)("aside",{children:Object(r.jsx)("ul",{children:l})})]})},ge=n(39),je=n(50),fe=Object(m.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:350,margin:"0 auto",paddingTop:64,paddingBottom:24},title:{marginBottom:20,textAlign:"center"},buttonNext:{marginTop:20,height:50,color:"#f8f8f8",backgroundColor:"#1d74c5"},textField:{marginBottom:20}}),Oe=function(){var e=fe(),a=Object(d.useState)(""),n=Object(i.a)(a,2),t=n[0],s=n[1],m=Object(d.useState)(""),b=Object(i.a)(m,2),p=b[0],h=b[1],j=Object(d.useState)(null),f=Object(i.a)(j,2),O=f[0],v=f[1],x=Object(l.b)(),y=function(e){var a=Object(je.d)(e.target.value);switch(e.target.name){case"name":s(a);break;case"lastName":h(a)}},C=function(){var e=Object(c.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",x(Object(ge.a)(t,p,O)));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(r.jsxs)("div",{className:e.container,children:[Object(r.jsx)(_.a,{className:e.title,variant:"h5",color:"initial",children:"Please upload avatar and fill credentials*"}),Object(r.jsx)(he,{setUpload:v}),Object(r.jsx)(g.a,{id:"name",name:"name",label:"Name",value:t,fullWidth:!0,variant:"outlined",onChange:y,className:e.textField,required:!0}),Object(r.jsx)(g.a,{id:"lastName",name:"lastName",label:"LastName",value:p,fullWidth:!0,variant:"outlined",onChange:y,className:e.textField,required:!0}),function(){var e=t.length,a=p.length;return!(e<3||e>30)&&(!(a<3||a>30)&&!!O)}()&&Object(r.jsx)(u.a,{onClick:C,className:e.buttonNext,color:"primary",variant:"contained",fullWidth:!0,children:" NEXT"})]})},ve=n(17);a.default=function(){var e=Object(d.useState)(!1),a=Object(i.a)(e,2),n=a[0],t=a[1],s=Object(d.useState)(""),m=Object(i.a)(s,2),u=m[0],b=m[1],h=Object(d.useState)(!0),g=Object(i.a)(h,2),j=g[0],f=g[1],O=Object(d.useState)(!1),v=Object(i.a)(O,2),x=v[0],y=v[1],C=Object(d.useState)("Country"),N=Object(i.a)(C,2),I=N[0],S=N[1],k=Object(d.useState)(""),w=Object(i.a)(k,2),T=w[0],B=w[1],R=Object(l.b)(),P=function(){return t(!n)},A=function(){var e=Object(c.a)(o.a.mark((function e(a){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u||Object(je.d)(a.target.value)!==u){e.next=6;break}return e.t0=R,e.next=4,Object(ge.c)(T,u,(function(){return y(!x)}));case 4:e.t1=e.sent,(0,e.t0)(e.t1);case 6:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),L=function(){var e=Object(c.a)(o.a.mark((function e(){var a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ve.b)(Object(je.d)(T),I);case 2:(a=e.sent)&&b(a);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(d.useEffect)((function(){var e=localStorage.isChecked;e?f("true"===e):localStorage.setItem("isChecked","true")}),[]),x?Object(r.jsx)(Oe,{}):u?Object(r.jsx)(oe,{handleIsValidCode:A,number:T,handleResetState:function(){b(""),S("Country"),B("")}}):n?Object(r.jsx)(p,{handleIsQR:P}):Object(r.jsx)($,{handleIsQR:P,handleSendCode:L,handleIsCheck:function(e){var a=e.target.checked;f(a),localStorage.isChecked=a},setNumber:B,number:T,country:I,setCountry:S,isChecked:j,isValidCredentials:function(){var e=T.split(" ").join("").trim().length;return!(e<13||e>13)&&(!(!I||"Country"===I)&&(T.slice(0,1),!0))}})}}}]);
- //# sourceMappingURL=AuthPage.def78fff.chunk.js.map
|