1import{u as F,_ as S}from"./Bk5KJdu4.js";import{j as P,c as f,a as t,b as u,w as c,q as s,t as b,d as y,s as V,r as B,v as T,E as M,x as h,o as k,y as I,_ as j}from"./Cpx8uuql.js";import{f as z}from"./rfnSI-qY.js";import{n as A,z as E}from"./Ckfr3erf.js";import{u as H}from"./px69tvf8.js";const D=""+new URL("paymentSystems.DYgvH7AP.png",import.meta.url).href,L=""+new URL("tabletPaymentSystems.H9JtMb-K.png",import.meta.url).href,O="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%2022.5C17.5228%2022.5%2022%2018.0228%2022%2012.5C22%206.97715%2017.5228%202.5%2012%202.5C6.47715%202.5%202%206.97715%202%2012.5C2%2018.0228%206.47715%2022.5%2012%2022.5Z'%20stroke='%23F93910'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%208.5V12.5'%20stroke='%23F93910'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%2016.5H12.01'%20stroke='%23F93910'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",R={class:"payment-all__pay-container"},U={class:"payment-all__pay-top-container"},$={class:"payment-all__sum-container"},q={class:"payment-all__sum-title"},J={class:"payment-all__sum-service-rate"},K={key:0,class:"payment-all__error-container"},Y=P({__name:"PaymentCard",setup(Z){const l=H(),w=A().min(1,"СÑмма должна бÑÑÑ Ð±Ð¾Ð»ÑÑе 1 ÑÑб").max(14e4,"СÑмма должна бÑÑÑ Ð¼ÐµÐ½ÑÑе 140 000"),i=h(""),v=h({email:!0});let p=null;const g=(a,e)=>{v.value[a]?(p&&clearTimeout(p),n.setFieldValue(a,e),p=setTimeout(()=>{v.value[a]=!1,n.validateField(a,"blur")},1e3)):(n.setFieldValue(a,e),n.validateField(a,"blur"),i.value="")},_=M(()=>{const a=l.selectPayments.some(m=>m.canPay),e=l.selectPayments.some(m=>m.amount<1);return!a||e||!w.safeParse(l.totalSum).success||l.totalSum===0}),x=z({defaultValues:{email:""}}),n=F({...x,onSubmit:async({value:a})=>{l.email=a.email;try{const e=await l.orderPayments();e.successed?window.location.replace(e.url):i.value=e.errorMessage}catch(e){i.value=e.response._data[0].message}}});return(a,e)=>{const m=S,C=I;return k(),f("section",null,[t("form",{onSubmit:e[1]||(e[1]=T(o=>s(n).handleSubmit(),["prevent","stop"])),class:"payment-all"},[t("div",null,[e[2]||(e[2]=t("h2",{class:"payment-all__card-title"},"ÐлекÑÑÐ¾Ð½Ð½Ð°Ñ Ð¿Ð¾ÑÑа Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ñека",-1)),u(s(n).Field,{name:"email",validators:{onBlur:s(E).string().email("ÐекоÑÑекÑнÑй email. ÐопÑÑÑимÑй ÑоÑмаÑ: [email protected]")}},{default:c(({field:o,state:d})=>[u(m,{placeholder:"ÐведиÑе поÑÑÑ",type:"email",name:o.name,modelValue:o.state.value,onInput:r=>g(o.name,r.target.value),onChange:r=>g(o.name,r.target.value),onBlur:r=>o.handleBlur(),"error-state":d,"server-error":s(i),trim:""},null,8,["name","modelValue","onInput","onChange","onBlur","error-state","server-error"])]),_:1},8,["validators"])]),t("div",R,[t("div",U,[t("div",null,[t("div",$,[e[3]||(e[3]=t("p",{class:"payment-all__sum-subtitle"},"ÐÑого:",-1)),t("h4",q,b(s(l).getTotalSum.toFixed(2))+" â½",1)]),t("p",J," в Ñ.Ñ. ÑаÑÐ¸Ñ ÑеÑвиÑа "+b(s(l).getTotalFee.toFixed(2))+" â½ ",1)]),u(s(n).Subscribe,null,{default:c(({values:o,isSubmitting:d,isValid:r})=>[u(C,{loading:d,size:"m",width:"",class:"payment-all__payment-button",onClick:e[0]||(e[0]=()=>s(n).validateAllFields("blur")),disabled:s(_)||!o.email||!r},{default:c(()=>[...e[4]||(e[4]=[y(" ÐплаÑиÑÑ ",-1)])]),_:1},8,["loading","disabled"])]),_:1})]),e[5]||(e[5]=t("p",{class:"payment-all__pay-bottom-text"},[y(" ÐÐ°Ð¶Ð¸Ð¼Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÑ Â«ÐплаÑиÑÑ» Ñ Ð²ÑÑÐ°Ð¶Ð°Ñ ÑÐ²Ð¾Ñ ÑоглаÑие на пÑиÑоединение к "),t("a",{href:"https://кваÑÑплаÑа.онлайн/files/oferta.pdf",class:"payment-all__pay-bottom-text_link",target:"_blank"},"договоÑÑ Ð¾ÑеÑÑÑ"),y(" Ñ ÑÑловиÑми оказание ÑÑлÑг ")],-1)),e[6]||(e[6]=t("img",{class:"payment-all__payment-systems-image",src:D,alt:"ÐлаÑежнÑе ÑиÑÑемÑ."},null,-1)),t("img",{class:V(["payment-all__payment-systems-image_tablet",s(_)?"payment-all__payment-systems-image_tablet-margin":""]),src:L,alt:"ÐлаÑежнÑе ÑиÑÑемÑ."},null,2)]),s(_)?(k(),f("div",K,[...e[7]||(e[7]=[t("img",{src:O,alt:"ÐÑибка.",class:"payment-all__error-image"},null,-1),t("div",{class:"payment-all__error-text-container"},[t("h4",{class:"payment-all__error-title"},"ÐплаÑа невозможна"),t("p",{class:"payment-all__error-subtitle"}," Ð ÑожалениÑ, по вÑбÑаннÑм лиÑевÑм ÑÑеÑам оплаÑа невозможна. ")],-1)])])):B("",!0)],32)])}}}),ee=j(Y,[["__scopeId","data-v-ba34aacb"]]);export{ee 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.