PageSourceSearch

https://pionflo.ru/build/assets/RegisterForm-DNtFMCJl.js

js pionflo.ru collected 2026-10-09 21:34:35 UTC 5,831 bytes, 1 lines download raw bytes

1import{u as E,b as A,c as H,d as R,r as o,j as e,a as V,P as W,C as z,D}from"./main-CVX6rXa_.js";import"./index-B9ygI19o.js";const G=({onBack:k,onClose:y,onSwitchToLogin:C,onSuccess:w})=>{var g,N,v;const{register:P,loading:c,error:h,clearError:d}=E(),{selectedCityId:u,selectedStoreId:S}=A(),{stores:m}=H({city_id:u||void 0}),F=S||(m.length>0?m[0].id:null),{store:s}=R(F),[f,O]=o.useState(!1),[_,p]=o.useState(!1),[I,x]=o.useState(!1),[L,b]=o.useState(!1),[n,j]=o.useState({name:"",phone:"",email:"",password:"",password_confirmation:""}),M=async a=>{a.preventDefault();try{await P({...n,city_id:u||void 0}),w()}catch{}},i=a=>{j({...n,[a.target.name]:a.target.value})},q=a=>{const t=a.replace(/\D/g,"");let l="+7";return t.length>1&&(l+="("+t.substring(1,4)),t.length>=5&&(l+=")"+t.substring(4,7)),t.length>=8&&(l+="-"+t.substring(7,9)),t.length>=10&&(l+="-"+t.substring(9,11)),l},B=a=>{const t=q(a.target.value);j({...n,phone:t})},r={legalName:((g=s==null?void 0:s.legal_info)==null?void 0:g.legal_name)||null,inn:((N=s==null?void 0:s.legal_info)==null?void 0:N.inn)||null,ogrn:((v=s==null?void 0:s.legal_info)==null?void 0:v.ogrn)||null,email:(s==null?void 0:s.email)||null,phone:(s==null?void 0:s.phone)||null};return e.jsxs("div",{className:"profile-section-container profile-section-container-tall hide-scrollbar",children:[e.jsxs("div",{className:"profile-modal-header",children:[e.jsx("button",{onClick:()=>{d(),k()},className:"profile-section-back btn-circle-35 bg-white",children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M8 2L4 6L8 10",stroke:"#222222",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),e.jsx("h2",{className:"profile-modal-title",children:"Регистрация"}),e.jsx("button",{onClick:y,className:"profile-modal-close btn-circle-35 bg-white",children:e.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",children:e.jsx("path",{d:"M1 1L7 7M1 7L7 1",stroke:"#737373",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e.jsxs("form",{onSubmit:M,className:"auth-form",children:[e.jsxs("div",{className:"auth-form-fields white-block",children:[e.jsxs("div",{className:"auth-form-field",children:[e.jsx("label",{className:"auth-form-label form-label",children:"Имя"}),e.jsx("input",{type:"text",name:"name",value:n.name,onChange:i,className:"auth-form-input input-field",required:!0})]}),e.jsxs("div",{className:"auth-form-field",children:[e.jsx("label",{className:"auth-form-label form-label",children:"Телефон"}),e.jsx("input",{type:"tel",name:"phone",value:n.phone,onChange:B,className:"auth-form-input input-field",placeholder:"+7(999)999-99-99",required:!0})]}),e.jsxs("div",{className:"auth-form-field",children:[e.jsx("label",{className:"auth-form-label form-label",children:"Электронная почта"}),e.jsx("input",{type:"email",name:"email",value:n.email,onChange:i,className:"auth-form-input input-field",required:!0})]}),e.jsxs("div",{className:"auth-form-field",children:[e.jsx("label",{className:"auth-form-label form-label",children:"Пароль"}),e.jsx("input",{type:"password",name:"password",value:n.password,onChange:i,className:"auth-form-input input-field",required:!0})]}),e.jsxs("div",{className:"auth-form-field",children:[e.jsx("label",{className:"auth-form-label form-label",children:"Подтверждение пароля"}),e.jsx("input",{type:"password",name:"password_confirmation",value:n.password_confirmation,onChange:i,className:"auth-form-input input-field",required:!0})]})]}),e.jsxs("label",{className:"auth-form-consent-label",children:[e.jsx("input",{type:"checkbox",checked:f,onChange:a=>O(a.target.checked),className:"checkout-checkbox"}),e.jsxs("span",{className:"auth-form-consent-text",children:["Я соглашаюсь на ",e.jsx("button",{type:"button",className:"cookie-consent-link",onClick:()=>b(!0),children:"обработку персональных данных"})," и с ",e.jsx("button",{type:"button",className:"cookie-consent-link",onClick:()=>p(!0),children:"политикой конфиденциальности"})," и ",e.jsx("button",{type:"button",className:"cookie-consent-link",onClick:()=>x(!0),children:"политикой использования файлов cookie"})]})]}),h&&e.jsx("div",{className:"auth-form-error error-message",children:h}),e.jsx("button",{type:"submit",disabled:c||!f,className:"auth-form-submit btn-primary",children:c?"Регистрация...":"Зарегистрироваться"}),e.jsxs("div",{className:"auth-form-divider",children:[e.jsx("span",{className:"auth-form-divider-line"}),e.jsx("span",{className:"auth-form-divider-text",children:"или"}),e.jsx("span",{className:"auth-form-divider-line"})]}),e.jsxs("button",{type:"button",className:"auth-form-yandex-btn",onClick:async()=>{try{const a=await V.getYandexAuthUrl();window.location.href=a}catch{}},children:[e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"#FC3F1D"}),e.jsx("path",{d:"M13.32 7.666h-.924c-1.694 0-2.585.858-2.585 2.123 0 1.43.616 2.09 1.893 2.981l1.056.726-3.014 4.504H7.718l2.75-4.043C9.2 13.018 8.283 11.907 8.283 10.009c0-2.354 1.628-3.897 4.112-3.897H15.5V18h-2.18V7.666z",fill:"#FFFFFF"})]}),"Войти через Яндекс ID"]}),e.jsx("div",{className:"auth-form-switch",children:e.jsxs("span",{className:"auth-form-switch-text",children:["Уже зарегистрированы?",e.jsx("br",{}),e.jsx("button",{type:"button",onClick:()=>{d(),C()},className:"auth-form-switch-link",children:"Войти"})]})})]}),e.jsx(W,{isOpen:_,onClose:()=>p(!1),storeInfo:r}),e.jsx(z,{isOpen:I,onClose:()=>x(!1),storeInfo:r}),e.jsx(D,{isOpen:L,onClose:()=>b(!1),storeInfo:r})]})};export{G as default};

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.