1import{_ as rs}from"./BfxGbLiA.js";import{_ as ds}from"./ClLUkeUU.js";import{_ as ps,A as us}from"./20lM1C0b.js";import{K as M,o as n,c as r,F as N,a as h,f as s,e as c,i as v,q as H,J as cs,T as ms,v as vs,x as _s,y as fs,u as o,j as P,b as F,n as p,E as d,G as m,aA as ys,S as L,r as G,R as bs,t as gs,I as ks,g as U}from"./C7lwBsaI.js";import{u as K}from"./pqvJozyl.js";/* empty css */import{_ as ws}from"./CZyHP8tD.js";import"./5NNwYznA.js";import"./D7WRpNgT.js";import"./dg1dVfJE.js";import{_ as hs,a as Cs}from"./D4BpTj_g.js";import{_ as xs}from"./CWL8szQ5.js";import{u as Us}from"./D5952JMP.js";import"./BBAnpVQJ.js";import"./C7-K8M5I.js";import"./BiqYpvmi.js";import"./BFqpzpW1.js";import"./Cpj98o6Y.js";import"./2Zyeh90e.js";import"./D7y17fnr.js";import"./C6bD9w-6.js";import"./DaUckBT0.js";import"./ju8t1pDW.js";const Vs={class:"personal-cover-placeholder _active"},Ts=["src"],Ss={__name:"CoverCompany",props:{user:[String,Object],userWorker:[String,Object]},emits:["remove","update"],setup(C,{emit:V}){const{addTip:B}=K(),{checkAuthUser:T}=M(),R=C,w=V,u=v(!1),k=v(!1),l=v(!1),S=()=>{w("update"),T(),u.value=!1,k.value=!1,l.value=!1},t=async()=>{const A={action:"remove-cover"},{data:a}=await H("/users/settings-company",{method:"post",headers:{"Content-Type":"application/json"},body:A,watch:!1});await T(),w("update"),b()},b=()=>{k.value=!k.value};return(A,a)=>{const q=xs;return n(),r("div",Vs,[C.user?.cover?.length&&!k.value?(n(),r("img",{key:0,src:C.user?.cover,loading:"lazy"},null,8,Ts)):(n(),r(N,{key:1},[h(q,{collection:"user_cover",itemid:R.user.id,onUpdate:a[0]||(a[0]=g=>S())},null,8,["itemid"]),a[2]||(a[2]=s("svg",{fill:"none",height:"28",viewBox:"0 0 35 28",width:"35",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"m25.4166.666016c4.7842 0 8.6714 3.839544 8.7487 8.605314l.0013.14469v4.58328c0 1.8411-1.4923 3.3334-3.3333 3.3334h-2.5c-2.7615 0-5 2.2385-5 5v1.6666c0 1.8411-1.4923 3.3334-3.3334 3.3334h-10.41665c-4.8325 0-8.749998-3.9175-8.749998-8.75v-9.16668c0-4.8325 3.917498-8.750004 8.749998-8.750004zm4.1667 18.749984c.6904 0 1.25.5596 1.25 1.25v1.25h1.25c.6904 0 1.25.5596 1.25 1.25s-.5596 1.25-1.25 1.25h-1.25v1.25c0 .6904-.5596 1.25-1.25 1.25-.6905 0-1.25-.5596-1.25-1.25v-1.25h-1.25c-.6905 0-1.25-.5596-1.25-1.25s.5595-1.25 1.25-1.25h1.25v-1.25c0-.6904.5595-1.25 1.25-1.25zm-4.1667-14.58332h-15.83335c-2.53131 0-4.58333 2.05202-4.58333 4.58334v9.16668c0 .0302.00029.0604.00087.0904.00834-.4894.12465-.971.34059-1.4106l1.14235-2.3257c.10733-.2184.24592-.4201.41142-.5986.94068-1.0148 2.52585-1.0748 3.54065-.1341l2.794 2.5902c.0513.0475.1041.0934.1582.1375 1.4262 1.1642 3.526.9519 4.6902-.4741l3.8723-4.7438c.0353-.043.0713-.0851.1086-.1263 1.2339-1.3662 3.3419-1.4734 4.7079-.2394l1.6598 1.4991c.669.6042 1.2006 1.3304 1.5735 2.1298l-.0004-5.56108c0-2.53132-2.0521-4.58334-4.5833-4.58334zm-11.4583 2.5c1.7258 0 3.125 1.39911 3.125 3.12502 0 1.7259-1.3992 3.125-3.125 3.125-1.7259 0-3.125-1.3991-3.125-3.125 0-1.72591 1.3991-3.12502 3.125-3.12502z",fill:"var(--color1)"})],-1)),a[3]||(a[3]=s("div",{class:"personal-cover-line-1"},"ÐагÑÑзиÑе Ð¾Ð±Ð»Ð¾Ð¶ÐºÑ Ð²Ð°Ñего пÑблиÑного пÑоÑилÑ",-1)),a[4]||(a[4]=s("div",{class:"personal-cover-line-2"}," ÐÐ¾Ð¼Ð¾Ð³Ð°ÐµÑ Ð²ÑделиÑÑÑÑ Ð½Ð° Ñоне конкÑÑенÑов, ÑÑоÑмиÑоваÑÑ Ñвой бÑенд. ФоÑмаÑ: jpg, jpeg, png. ÐакÑималÑнÑй ÑÐ°Ð·Ð¼ÐµÑ 2624Ñ
600, Ð²ÐµÑ Ð½Ðµ более 10 ÐÐ. ÐинимаÑнÑй ÑÐ°Ð·Ð¼ÐµÑ 1312Ñ
300 ",-1))],64)),s("a",{href:"javascript:void(0)",onClick:b,class:"user-cover__edit","aria-label":"ÐзмениÑÑ Ð¾Ð±Ð»Ð¾Ð¶ÐºÑ"},[...a[5]||(a[5]=[s("i",{class:"icon icon-edit"},null,-1)])]),C.user?.cover?.length?(n(),r("a",{key:2,href:"javascript:void(0)",onClick:a[1]||(a[1]=g=>t()),class:"user-cover__delete","aria-label":"УдалиÑÑ Ð¾Ð±Ð»Ð¾Ð¶ÐºÑ"},[...a[6]||(a[6]=[s("i",{class:"icon icon-trash red"},null,-1)])])):c("",!0)])}}},As={class:"main inner"},js={class:"profile-lk-page aside-body _reverse _nb-hidden"},$s={class:"aside"},Os={key:0,class:"user-info _big aside__bg"},Es={class:"blocks__list"},Ps={class:"blocks__list"},Ms={key:0,class:"blocks__list"},Ns={class:"inputs"},Bs={class:"radio"},Rs=["disabled"],qs=["disabled"],zs={key:1,class:"blocks__list"},Js={class:"inputs"},Fs=["disabled"],Ls=["disabled"],Ds=["disabled"],Is=["disabled"],Ws={class:"blocks__list"},Gs={class:"inputs"},Hs=["disabled"],Ks={key:0,class:"input__icon"},Qs={key:1,class:"input__icon"},Xs=["disabled"],Ys={class:"blocks__list"},Zs={class:"inputs"},se=["type","disabled"],ee=["type","disabled"],oe=["type","disabled"],le={key:2,class:"auth-errors"},ie={class:"section__btns"},te=["disabled"],Ae={__name:"index",async setup(C){let V,B;const{checkAuthUser:T}=M(),{logUserOut:R}=M(),{addTip:w}=K(),{user:u}
1=cs(M()),{hasTariffLimitAccess:k}=Us();ms();const l=v({}),S=v({}),t=v([]),b=v("save"),A=v(!1),a=v(""),{$appToolTitle:q,$appAllowedInWorkerSettings:g}=vs();_s({title:q("ÐаÑÑÑойки полÑзоваÑелÑ")});const j=async()=>{const{data:f,error:e}=await ks("/users/settings-company",{method:"POST",headers:{"Content-Type":"application/json"},watch:!1});l.value=f.value.user,S.value=JSON.parse(JSON.stringify(f.value.user))};[V,B]=fs(()=>j()),await V,B();const Q=()=>{R()},D=async()=>{if(!I.value)return;var f=b.value;const e=l.value;e.action=f;const{data:_}=await H("/users/settings-company",{method:"post",headers:{"Content-Type":"application/json"},body:e,watch:!1});l.value.email_confirmed=_.value.user.email_confirmed,l.value.phone_confirmed=_.value.user.phone_confirmed,l.value.phone2_confirmed=_.value.user.phone2_confirmed,l.value.tg_confirmed=_.value.user.tg_confirmed,l.value.info=_.value.user.info,t.value=[],_.value.saved_success&&(l.value.password="",l.value.old_password="",l.value.passwordConfirm="",w({type:"success",text:"ÐаннÑе ÑÑпеÑно ÑоÑ
ÑаненÑ"})),_.value.errors&&(t.value=_.value.errors),S.value=JSON.parse(JSON.stringify(_.value.user)),b.value==="remove-avatar"&&T(),b.value==="remove-account"&&(w({type:"success",text:"ÐÐ°Ñ Ð°ÐºÐºÐ°ÑÐ½Ñ Ð±Ñл ÑÑпеÑно Ñдален"}),Q()),b.value="save",setTimeout(()=>{A.value=!1},200)},$=v(!1),O=v(!1),E=v(!1),X=()=>{$.value=!$.value},Y=()=>{O.value=!O.value},Z=()=>{E.value=!E.value},ss=()=>{l.value.email_confirmed=!0,a.value="",w({type:"success",text:"ÐÐ°Ñ Email ÑÑпеÑно подÑвеÑжден"})},es=f=>{l.value.company_name=f.name,l.value.company_name_official=f.name,l.value.ogrn=f.ogrn,l.value.address=f.address},os=()=>{b.value="remove-avatar",D(),j()},z=U(()=>g("block_management_section_company_profile_editing",null,u.value)&&g("block_management_section_company_profile_editing_option_company_profile_editing_list","edit_avatar",u.value)),y=U(()=>g("block_management_section_company_profile_editing",null,u.value)&&g("block_management_section_company_profile_editing_option_company_profile_editing_list","edit_details",u.value)),x=U(()=>g("block_management_section_company_profile_editing",null,u.value)&&g("block_management_section_company_profile_editing_option_company_profile_editing_list","edit_credentials",u.value)),I=U(()=>y.value||x.value),W=U(()=>u.value?.is_worker?k(u.value?.worker?.company?.tariff?.settings?.limits?.unique_design)&&z:k(u.value?.tariff?.settings?.limits?.unique_design));return(f,e)=>{const _=rs,ls=ds,is=ps,J=bs("mask");return n(),r("main",As,[s("div",js,[s("aside",$s,[h(hs,{user:o(u)},null,8,["user"]),h(Cs,{user:o(u)},null,8,["user"])]),s("form",{class:"blocks",onSubmit:P(D,["prevent"]),autocomplete:"off"},[h(_),e[48]||(e[48]=s("h1",{class:"h2"},"ÐÑоÑÐ¸Ð»Ñ ÐºÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ð¸",-1)),o(z)?(n(),r("div",Os,[h(ls,{user:o(l),onRemove:os,onUpdate:j},null,8,["user"])])):c("",!0),o(z)?(n(),r(N,{key:1},[o(W)?(n(),F(Ss,{key:0,user:o(l),"user-worker":o(u),onUpdate:j},null,8,["user","user-worker"])):c("",!0),o(W)?c("",!0):(n(),F(us,{key:1}))],64)):c("",!0),s("div",Es,[s("div",{class:p(["input",{"_has-error":o(t).login}])},[d(s("input",{type:"text",placeholder:"ÐведиÑе логин","onUpdate:modelValue":e[0]||(e[0]=i=>o(l).login=i),disabled:""},null,512),[[m,o(l).login]]),e[20]||(e[20]=s("div",{class:"input__placeholder"},[s("span",null,"Ðогин")],-1))],2)]),s("div",Ps,[o(l).type==="ul"?(n(),r("div",Ms,[e[28]||(e[28]=s("div",{class:"h5"},"ÐÑновнÑе",-1)),s("div",Ns,[h(ws,{error:o(t).inn,modelValue:o(l).inn,"onUpdate:modelValue":e[1]||(e[1]=i=>o(l).inn=i),inn:o(l).inn,disabled:!o(y),onSelectedOrganizationName:es},null,8,["error","modelValue","inn","disabled"]),s("div",{class:p(["input",{"_has-error":o(t).company_name}])},[d(s("input",{type:"text",placeholder:"ÐÑблиÑное название оÑганизаÑии","onUpdate:modelValue":e[2]||(e[2]=i=>o(l).company_name=i),disabled:""},null,512),[[m,o(l).company_name]]),e[21]||(e[21]=s("div",{class:"input__placeholder"},[s("span",null,"ÐÑблиÑное название")],-1))],2),s("div",{class:p(["input _disabled",{"_has-error":o(t).ogrn}])},[d(s("input",{type:"text",placeholder:"ÐÐРРзаполниÑÑÑ Ð°Ð²ÑомаÑиÑеÑки по ÐÐÐ","onUpdate:modelValue":e[3]||(e[3]=i=>o(l).ogrn=i),disabled:""},null,512),[[m,o(l).ogrn]]),e[22]||(e[22]=s("div",{class:"input__placeholder"},[s("span",null,"ÐÐÐ Ð")],-1))],2)]),s("div",{class:p(["input _disabled",{"_has-error":o(t).company_name_official}])},[d(s("input",{type:"text",placeholder:"ÐÑиÑиалÑное название оÑганизаÑии","onUpdate:modelValue":e[4]||(e[4]=i=>o(l).company_name_official=i),disabled:""},null,512),[[m,o(l).company_name_official]]),e[23]||(e[23]=s("div",{class:"input__placeholder"},[s("span",null,"ÐÑиÑиалÑное название оÑганизаÑии")],-1))],2),s("div",{class:p(["input _disabled",{"_has-error":o(t).address}])},[d(s("input",{type:"text",placeholder:"ЮÑидиÑеÑкий адÑÐµÑ Ð¾ÑганизаÑии","onUpdate:modelValue":e[5]||(e[5]=i=>o(l).address=i),disabled:""},null,512),[[m,o(l).address]]),e[24]||(e[24]=s("div",{class:"input__placeholder"},[s("span",null,"ЮÑидиÑеÑкий адÑÐµÑ Ð¾ÑганизаÑии")],-1))],2),s("label",Bs,[d(s("input",{type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=i=>o(l).address_fact_match=i),disabled:!o(y)},null,8,Rs),[[ys,o(l).address_fact_match]]),e[25]||(e[25]=s("span",{class:"radio__mask"},null,-1)),e[26]||(e[26]=s("b",{class:"radio__label"},"Ð¡Ð¾Ð²Ð¿Ð°Ð´Ð°ÐµÑ Ñ ÑакÑиÑеÑким адÑеÑом",-1))]),o(l).address_fact_match?c("",!0):(n(),r("div",{key:0,class:p(["input",{"_has-error":o(t).address_fact}])},[d(s("input",{type:"text",placeholder:"ФакÑиÑеÑкий адÑÐµÑ Ð¾ÑганизаÑии","onUpdate:modelValue":e[7]||
1(e[7]=i=>o(l).address_fact=i),disabled:!o(y)},null,8,qs),[[m,o(l).address_fact]]),e[27]||(e[27]=s("div",{class:"input__placeholder"},[s("span",null,"ФакÑиÑеÑкий адÑÐµÑ Ð¾ÑганизаÑии")],-1))],2))])):c("",!0),o(l).type==="ul"?(n(),r("div",zs,[e[33]||(e[33]=s("div",{class:"h5"},"ÐанковÑкие ÑеквизиÑÑ",-1)),s("div",Js,[s("div",{class:p(["input",{"_has-error":o(t).company_rs}])},[d(s("input",{type:"text",placeholder:"РаÑÑеÑнÑй ÑÑеÑ","onUpdate:modelValue":e[8]||(e[8]=i=>o(l).company_rs=i),disabled:!o(y)},null,8,Fs),[[m,o(l).company_rs],[J,"####################"]]),e[29]||(e[29]=s("div",{class:"input__placeholder"},[s("span",null,"РаÑÑеÑнÑй ÑÑеÑ")],-1))],2),s("div",{class:p(["input",{"_has-error":o(t).company_bik}])},[d(s("input",{type:"text",placeholder:"ÐÐÐ","onUpdate:modelValue":e[9]||(e[9]=i=>o(l).company_bik=i),disabled:!o(y)},null,8,Ls),[[m,o(l).company_bik],[J,"#########"]]),e[30]||(e[30]=s("div",{class:"input__placeholder"},[s("span",null,"ÐÐÐ")],-1))],2),s("div",{class:p(["input",{"_has-error":o(t).company_bank}
1])},[d(s("input",{type:"text",placeholder:"Ðаименование банка","onUpdate:modelValue":e[10]||(e[10]=i=>o(l).company_bank=i),disabled:!o(y)},null,8,Ds),[[m,o(l).company_bank]]),e[31]||(e[31]=s("div",{class:"input__placeholder"},[s("span",null,"Ðаименование банка")],-1))],2),d((n(),r("div",{class:p(["input",{"_has-error":o(t).company_ks}])},[d(s("input",{type:"text",placeholder:"ÐоÑÑеÑпонденÑÑкий ÑÑеÑ","onUpdate:modelValue":e[11]||(e[11]=i=>o(l).company_ks=i),disabled:!o(y)},null,8,Is),[[m,o(l).company_ks]]),e[32]||(e[32]=s("div",{class:"input__placeholder"},[s("span",null,"ÐоÑÑеÑпонденÑÑкий ÑÑеÑ")],-1))],2)),[[J,"####################"]])])])):c("",!0),s("div",Ws,[e[38]||(e[38]=s("div",{class:"h5"},"ÐонÑакÑнÑе даннÑе",-1)),o(a).length?(n(),F(is,{key:0,email:o(a),onClose:e[12]||(e[12]=i=>a.value=""),onConfirmed:ss},null,8,["email"])):c("",!0),s("div",Gs,[s("div",{class:p(["input",{"_has-error":o(t).email}])},[d(s("input",{type:"text",placeholder:"[email protected]","onUpdate:modelValue":e[13]||(e[13]=i=>o(l).email=i),disabled:!o(x)},null,8,Hs),[[m,o(l).email]]),e[36]||(e[36]=s("div",{class:"input__placeholder"},[s("span",null,"E-mail")],-1)),o(l).email_confirmed?c("",!0):(n(),r("div",Ks,[s("a",{class:"c1 color",href:"javascript:void(0)",onClick:e[14]||(e[14]=i=>a.value=o(l).email)}," ÐодÑвеÑдиÑÑ "),e[34]||(e[34]=s("i",{class:"icon icon-label"},null,-1))])),o(l).email_confirmed?(n(),r("div",Qs,[...e[35]||(e[35]=[s("i",{class:"icon icon-label color"},null,-1)])])):c("",!0)],2),o(l).type==="ul"?(n(),r("div",{key:0,class:p(["input",{"_has-error":o(t).company_site}])},[d(s("input",{type:"text",placeholder:"Ð¡Ð°Ð¹Ñ ÐºÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ð¸","onUpdate:modelValue":e[15]||(e[15]=i=>o(l).company_site=i),disabled:!o(y)},null,8,Xs),[[m,o(l).company_site]]),e[37]||(e[37]=s("div",{class:"input__placeholder"},[s("span",null,"Ð¡Ð°Ð¹Ñ ÐºÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ð¸")],-1))],2)):c("",!0)])]),c("",!0),s("div",Ys,[e[46]||(e[46]=s("div",{class:"h5"},"УпÑавление паÑолем",-1)),s("div",Zs,[s("div",{class:p(["input _password",{"_has-error":o(t).password,_show:o(E)}])},[d(s("input",{type:o(E)?"text":"password","onUpdate:modelValue":e[17]||(e[17]=i=>o(l).old_password=i),placeholder:"ÐведиÑе паÑолÑ",autocomplete:"new-password",disabled:!o(x)},null,8,se),[[L,o(l).old_password]]),e[41]||(e[41]=s("div",{class:"input__placeholder"},[s("span",null,"СÑаÑÑй паÑолÑ"),s("div",{class:"hint"},[s("i",{class:"icon icon-info"}),s("div",{class:"hint__drop _top c1 _b"}," ЧÑÐ¾Ð±Ñ Ð·Ð°Ð´Ð°ÑÑ Ð½Ð¾Ð²Ñй паÑÐ¾Ð»Ñ ÑÑебÑеÑÑÑ Ð¿ÑовеÑиÑÑ ÑÑо ÑÑо ÑоÑно Ð²Ñ ")])],-1)),s("a",{class:"input__icon js-password-visible",href:"javascript:void(0)",onClick:P(Z,["prevent"])},[...e[40]||(e[40]=[s("i",{class:"icon icon-eye"},null,-1),s("i",{class:"icon icon-eye-close"},null,-1)])])],2),s("div",{class:p(["input _password",{"_has-error":o(t).password,_show:o($)}])},[d(s("input",{type:o($)?"text":"password","onUpdate:modelValue":e[18]||(e[18]=i=>o(l).password=i),placeholder:"ÐведиÑе паÑолÑ",autocomplete:"new-password",disabled:!o(x)},null,8,ee),[[L,o(l).password]]),e[43]||(e[43]=s("div",{class:"input__placeholder"},[s("span",null,"ÐовÑй паÑолÑ"),s("div",{class:"hint"},[s("i",{class:"icon icon-info"}),s("div",{class:"hint__drop _top c1 _b"}," ÐведиÑе новÑй паÑолÑ. ÐаÑÐ¾Ð»Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ ÑодеÑжаÑÑ Ð¾Ñ 6 до 12 Ñимволов ")])],-1)),s("a",{class:"input__icon js-password-visible",href:"javascript:void(0)",onClick:P(X,["prevent"])},[...e[42]||(e[42]=[s("i",{class:"icon icon-eye"},null,-1),s("i",{class:"icon icon-eye-close"},null,-1)])])],2),s("div",{class:p(["input _password",{"_has-error":o(t).password,_show:o(O)}])},[d(s("input",{type:o(O)?"text":"password","onUpdate:modelValue":e[19]||(e[19]=i=>o(l).passwordConfirm=i),placeholder:"ÐовÑоÑиÑе ввод паÑолÑ",autocomplete:"new-password",disabled:!o(x)},null,8,oe),[[L,o(l).passwordConfirm]]),e[45]||(e[45]=s("div",{class:"input__placeholder"},[s("span",null,"ÐовÑоÑиÑе паÑолÑ"),s("div",{class:"hint"},[s("i",{class:"icon icon-info"}),s("div",{class:"hint__drop _top c1 _b"}," ÐовÑоÑиÑе ввод паÑÐ¾Ð»Ñ ")])],-1)),s("a",{class:"input__icon js-password-visible",href:"javascript:void(0)",onClick:P(Y,["prevent"])},[...e[44]||(e[44]=[s("i",{class:"icon icon-eye"},null,-1),s("i",{class:"icon icon-eye-close"},null,-1)])])],2)])])]),o(t)?(n(),r("div",le,[(n(!0),r(N,null,G(o(t),(i,ts)=>(n(),r("div",{key:ts},[(n(!0),r(N,null,G(i,(ns,as)=>(n(),r("div",{key:as},gs(ns),1))),128))]))),128))])):c("",!0),s("div",ie,[s("button",{class:"btn",type:"submit",disabled:!o(I)}," СоÑ
ÑаниÑÑ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ",8,te),e[47]||(e[47]=s("div",{class:"_grow"},null,-1))])],32)])])}}};export{Ae 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.