1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8946],{8299:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(96540);let r=e=>{let t=n.useRef({});return n.useEffect(()=>{t.current=e}),t.current}},12409:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M21 9v2h-2V3h-2v2h-2V3h-2v2h-2V3H9v2H7V3H5v8H3V9H1v12h9v-3c0-1.1.9-2 2-2s2 .9 2 2v3h9V9zm-10 3H9V9h2zm4 0h-2V9h2z"}),"Castle")},50331:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat")},89806:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},91370:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M7.02 13c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4M13 13v8h8v-8zM7 2l-5 9h10zm12.25.5c-1.06 0-1.81.56-2.25 1.17-.44-.61-1.19-1.17-2.25-1.17C13.19 2.5 12 3.78 12 5.25c0 2 2.42 3.42 5 5.75 2.58-2.33 5-3.75 5-5.75 0-1.47-1.19-2.75-2.75-2.75"}),"Interests")},84105:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"}),"KeyboardBackspace")},95777:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M15 11V5l-3-3-3 3v2H3v14h18V11zm-8 8H5v-2h2zm0-4H5v-2h2zm0-4H5V9h2zm6 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V9h2zm0-4h-2V5h2zm6 12h-2v-2h2zm0-4h-2v-2h2z"}),"LocationCity")},85623:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)([(0,r.jsx)("path",{fillRule:"evenodd",d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87"},"0"),(0,r.jsx)("circle",{cx:"9",cy:"8",r:"4",fillRule:"evenodd"},"1"),(0,r.jsx)("path",{fillRule:"evenodd",d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24m-6 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"},"2")],"PeopleAlt")},16988:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(57657),r=i(74848);let s=(0,n.A)((0,r.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save")},38965:(e,t,i)=>{i.d(t,{$:()=>o});var n=i(74848),r=i(96540),s=i(41917),a=i(91106),l=i.n(a);let o=(0,r.forwardRef)((e,t)=>{let{linkTo:i,...r}=e;return(0,n.jsx)(s.A,{ref:t,...r,variant:r.variant??"outlined",component:void 0!==i?l():"button",href:i,sx:{fontWeight:500,fontSize:"16px",letterSpacing:"0.02em",borderRadius:"8px",borderWidth:"2px","&:hover":{borderWidth:"2px"},color:"contained"!==r.variant?"secondary.contrastText":"white",py:"0.6em",px:"3em",...r.sx},children:r.children})});o.displayName="Button"},68396:(e,t,i)=>{i.r(t),i.d(t,{default:()=>P});var n=i(74848),r=i(53384),s=i(67330),a=i(66247),l=i(52064),o=i(50761),d=i(72665),c=i(4439),h=i(96540),x=i(80842),m=i(32895),p=i(86715),A=i(45835),j=i(38965),u=i(41917),v=i(16540),f=i(89806),g=i(91106),y=i.n(g),b=i(84105),z=i(45875),w=i(16988),C=i(82542),H=i(98780),S=i(95835);let V=()=>{let e=(0,p.useRouter)(),t=e.query.id,i=!!t&&"new"!==t,{handleSubmit:n}=(0,x.xW)(),r=(0,H.j)(),[s,a]=(0,h.useState)(!1),[l,o]=(0,h.useState)(!1),d=e=>{r((0,C.W9)({alertProps:{title:"ÐÑибка!",description:e,variant:"standard",severity:"error"},snackbarProps:{}}))},c=e=>{r((0,C.W9)({alertProps:{title:"УÑпеÑ
!",description:e,variant:"standard",severity:"success"},snackbarProps:{}}))};return{handleDelete:()=>{if(i&&!l)return o(!0),S.A.delete(t).then(()=>{o(!1),c("ÐоÑод бÑл ÑÑпеÑно Ñдален."),e.push("/administration/regions")}).catch(()=>{o(!1),d("ÐÑибка пÑи Ñдалении гоÑода. Ðозможно он Ñже иÑполÑзÑеÑÑÑ Ð² некоÑоÑÑÑ
ÑкÑкÑÑÑиÑÑ
...")})},handleSave:()=>{s||(a(!0),n(n=>{let r={titleTranslations:n.titleTranslations};(i?()=>S.A.update(t,r):()=>S.A.create(r))().then(()=>{a(!1),i?c("ÐоÑод бÑл ÑÑпеÑно обновлен."):c("ÐоÑод бÑл ÑÑпеÑно Ñоздан."),e.push("/administration/cities")}).catch(()=>{a(!1),i?d("ÐÑибка пÑи обновлении гоÑода."):d("ÐÑибка пÑи Ñоздании гоÑода.")})})())},editMode:i,loading:s,loadingDelete:l}},k=()=>{let e=V(),{watch:t,formState:i}=(0,x.xW)(),o=t("titleTranslations")[0].text;return(0,n.jsxs)(r.A,{gap:"1em",direction:{sm:"row"},width:"100%",alignItems:"center",justifyContent:"space-between",bgcolor:v.nf,px:{xs:"1em",lg:"2em"},py:"2em",children:[(0,n.jsxs)(r.A,{alignItems:{xs:"center",sm:"start"},width:"100%",children:[(0,n.jsx)(A.P.div,{initial:{x:20,opacity:0}
1,animate:{x:0,opacity:1,transition:{delay:.3}},children:(0,n.jsxs)(a.A,{fontWeight:500,sx:{display:"flex",alignItems:"center",mb:"0.5em",textDecoration:"none"},component:y(),role:"button",href:"/administration/cities",color:"inherit",children:[(0,n.jsx)(b.A,{}),(0,n.jsx)(l.A,{component:"span",mx:"0.2em",children:"гоÑода"})]})}),(0,n.jsxs)(r.A,{direction:"row",alignItems:"center",component:A.P.div,initial:{scale:0},animate:{scale:1,transition:{delay:.3}},children:[(0,n.jsx)(l.A,{display:{xs:"none",sm:"block"},children:(0,n.jsx)(z.A,{sx:{color:"divider",width:{xs:"32px",sm:"48px"},height:{xs:"32px",sm:"48px"}}})}),(0,n.jsxs)(r.A,{component:A.P.div,alignItems:{xs:"center",sm:"start"},mx:{xs:"0.5em",sm:"1em"},initial:{x:-20},animate:{x:0,transition:{delay:.3}},children:[(0,n.jsx)(a.A,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},fontSize:{xs:"20px",md:"25px"},fontWeight:600,children:o||"ÐовÑй гоÑод"}),(0,n.jsx)(a.A,{variant:"caption",fontSize:"12px",fontWeight:500,children:"ÐаÑÑÑойки гоÑода"})]})]})]}),(0,n.jsx)(r.A,{gap:"1em",direction:{md:"row"},alignItems:"center",justifyContent:"end",children:(0,n.jsxs)(l.A,{component:A.P.div,sx:{display:"flex",gap:"1em"},initial:{opacity:0,x:20},animate:{opacity:1,x:0,transition:{delay:.2}},children:[e.editMode&&(0,n.jsx)(u.A,{sx:{fontWeight:600,boxShadow:"unset",borderRadius:"20px",py:"0.6em"},variant:"outlined",color:"error",onClick:e.handleDelete,startIcon:e.loadingDelete?(0,n.jsx)(s.A,{color:"inherit",size:20}):(0,n.jsx)(f.A,{}),children:"УдалиÑÑ"}),(0,n.jsx)(u.A,{sx:{fontWeight:600,boxShadow:"unset",borderRadius:"20px",py:"0.6em"},variant:"contained",color:"primary",disabled:!i.isDirty,onClick:e.handleSave,startIcon:e.loading?(0,n.jsx)(s.A,{color:"inherit",size:20}):(0,n.jsx)(w.A,{}),children:e.editMode?"ÐбновиÑÑ":"СоÑ
ÑаниÑÑ"})]})})]})},I=()=>{let{watch:e,setValue:t}=(0,x.xW)(),i=(0,m.A)(),s=e("titleTranslations");return(0,n.jsx)(r.A,{gap:"1em",children:(0,n.jsxs)(r.A,{children:[(0,n.jsx)(a.A,{variant:"h6",mb:"1.5em",children:"Ðазвание гоÑода"}),(0,n.jsx)(r.A,{direction:{md:"row"},gap:{xs:"1.5em",md:"1em"},children:s.map((e,t)=>(0,n.jsx)(x.gO,{label:i.find(t=>t.id===e.langId)?.label||"ЯзÑк",name:`titleTranslations.${t}.text`,required:!0,variant:"outlined",fullWidth:!0,rules:{required:!0},parseError:()=>"ÐÑо поле обÑзаÑелÑно к заполнениÑ"},t))})]})})},P=()=>{let[e,t]=(0,h.useState)(0),[i,u]=(0,h.useState)(!1),[v,f]=(0,h.useState)(!0),g=(0,m.A)(),{query:y}=(0,p.useRouter)(),b=y.id,z=(0,x.mN)({defaultValues:{titleTranslations:g.map(e=>({langId:e.id,text:""}))},mode:"onChange"});return((0,h.useEffect)(()=>{if(!b||"new"===b){f(!1);return}S.A.getOneAdmin(b).then(e=>{let{data:t}=e;u(!1),z.reset({titleTranslations:t.titleTranslations.map(e=>({langId:e.language,text:e.text}))}),f(!1)}).catch(()=>{u(!0),f(!1)})},[b]),v)?(0,n.jsxs)(r.A,{direction:"row",alignItems:"center",justifyContent:"center",gap:"0.5em",height:"50vh",children:[(0,n.jsx)(s.A,{size:30}),(0,n.jsx)(a.A,{fontSize:"18px",color:"secondary.main",fontWeight:600,children:"ÐагÑÑзка..."})]}):i?(0,n.jsxs)(r.A,{component:A.P.div,flexGrow:1,alignItems:"center",height:"50vh",justifyContent:"center",initial:{opacity:0}
1,animate:{opacity:1,transition:{delay:.1}},children:[(0,n.jsx)(a.A,{color:"text.secondary",variant:"h5",children:"ÐаннÑй гоÑод не найден!"}),(0,n.jsx)(j.$,{sx:{mt:"2em"},variant:"outlined",linkTo:"/administration/cities",color:"inherit",children:"СпиÑок гоÑодов"})]}):(0,n.jsx)(c.A,{children:(0,n.jsx)(x.Op,{...z,children:(0,n.jsxs)(r.A,{children:[(0,n.jsx)(k,{}),(0,n.jsxs)(l.A,{children:[(0,n.jsx)(o.A,{value:e,onChange:function(e,i){t(i)},indicatorColor:"primary",textColor:"primary",variant:"scrollable",scrollButtons:"auto",sx:{width:"100%",height:"64px"},children:(0,n.jsx)(d.A,{sx:{height:"64px"},label:"ÐÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð¸Ð½ÑоÑмаÑиÑ"})}),(0,n.jsx)(l.A,{p:{xs:"1em",sm:"1.5em"},children:(0,n.jsx)(l.A,{sx:{display:0!==e?"none":"block"},children:(0,n.jsx)(I,{})})})]})]})})})}},4439:(e,t,i)=>{i.d(t,{A:()=>k});var n=i(74848),r=i(56483),s=i(4682),a=i(91703),l=i(95082),o=i(62023),d=i(32825),c=i(53384),h=i(52064),x=i(94191),m=i(35441),p=i(86715),A=i(12409),j=i(91370),u=i(99237),v=i(85623),f=i(50331),g=i(56998),y=i(15450),b=i(45875),z=i(95777);let w=()=>[{title:"ÐолÑзоваÑели",href:u.J.administrationUsers,icon:(0,n.jsx)(v.A,{})},{title:"ÐбÑаÑÐ½Ð°Ñ ÑвÑзÑ",href:u.J.administrationFeedbackList,icon:(0,n.jsx)(f.A,{})},{title:"ÐеÑÑа",href:u.J.administrationPlaces,icon:(0,n.jsx)(g.A,{})},{title:"ÐкÑкÑÑÑии",href:u.J.administrationExcursions,icon:(0,n.jsx)(y.A,{})},{title:"Ð¢Ð¸Ð¿Ñ Ð¼ÐµÑÑ",href:u.J.administrationPlaceTypes,icon:(0,n.jsx)(A.A,{})},{title:"ÐаÑегоÑии меÑÑ",href:u.J.administrationPlaceCategories,icon:(0,n.jsx)(j.A,{})},{title:"ÐблаÑÑи",href:u.J.administrationRegions,icon:(0,n.jsx)(b.A,{})},{title:"ÐоÑода",href:u.J.administrationCities,icon:(0,n.jsx)(z.A,{})}];var C=i(50242),H=i(96540),S=i(37148);let V=()=>{let e=(0,S.A)(),t=w(),i=(0,p.useRouter)(),r=e.split("/").filter((e,t)=>t<=2).join("/"),s=(0,n.jsx)(a.A,{sx:{position:"fixed",py:"0.2em",px:"0.5em",display:{xs:"flex",sm:"block"},justifyContent:{sm:"center"},bottom:0,left:0,right:0,overflowX:"auto"},elevation:3,children:(0,n.jsx)(o.A,{showLabels:!0,value:t.findIndex(e=>e.href===r),onChange:(e,n)=>{i.push(t[n]?.href||"/")},children:t.map(e=>(0,n.jsx)(d.A,{label:e.title,icon:e.icon},e.href))})}),l=(0,n.jsx)(c.A,{position:"sticky",top:"5.2em",px:"1em",py:"1.5em",border:"2px solid rgb(225, 228, 241)",borderRadius:"10px",width:"100%",children:t.map((e,i)=>(0,n.jsxs)(h.A,{children:[(0,n.jsx)(C.A,{href:e.href,sx:{textDecoration:"none",fontWeight:500,fontSize:"18px",cursor:e.href===r?"unset":"pointer",color:e.href===r?"secondary.dark":"primary.main"},children:e.title}),(0,n.jsx)(x.A,{sx:{my:"1em",opacity:.5,display:i===t.length-1?"none":"block"}})]},i))});return(0,n.jsxs)(H.Fragment,{children:[(0,n.jsx)(m.A,{xlUp:!0,children:s}),(0,n.jsx)(m.A,{xlDown:!0,children:l})]})},k=e=>{let{children:t,paperProps:i}=e;return(0,n.jsx)(r.A,{mode:"redirectPermanent",children:(0,n.jsx)(s.A,{wrapperSx:{px:{xs:"1.5em",md:"3em"}},children:(0,n.jsxs)(l.A,{container:!0,columnSpacing:"2em",mt:"1em",mb:"5em",position:"relative",children:[(0,n.jsx)(l.A,{size:{xs:12,xl:2},sx:{zIndex:10},children:(0,n.jsx)(V,{})}),(0,n.jsx)(l.A,{size:{xs:12,xl:10},children:(0,n.jsx)(a.A,{...i,children:t})})]})})})}},56483:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(74848),r=i(96540),s=i(98780),a=i(99237);let l=()=>localStorage;var o=i(86715),d=i(96398),c=i(38493);let h=function(e){let{children:t,redirectPath:i,mode:h}=e,x=l().getItem(c.A.token),m=(0,o.useRouter)(),p=(0,s.G)(d.BN),A=(0,s.j)();return(0,r.useEffect)(()=>{x&&(x||p)||(A((0,d.HS)({loginRedirect:i??m.asPath,redirectHomeOnCancel:"redirectAfter"===h})),"redirectPermanent"===h&&m.push(a.J.home))},[x,i,p,h]),(0,n.jsx)(r.Fragment,{children:t})}}}]);
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.