PageSourceSearch

https://cropmap.ru/assets/chunks/chunk-hl0CHUHt.js

js cropmap.ru collected 2026-10-02 01:09:43 UTC 5,540 bytes, 1 lines download raw bytes

1import{j as e,n as s}from"./chunk-CHPXP26E.js";import{u as a,v as i,l as r,s as t,w as n,H as c,g as d,a9 as l,ap as o,r as m,ag as h,ar as u,az as j,Y as p,a5 as v,aA as x,h as f,k,aB as F,C as N,O as g,o as C,ak as w,n as y}from"./chunk-BIodJjId.js";import{f as A}from"./chunk-BxDgbgO6.js";import{I as D}from"../entries/src_pages.ajikvuZU.js";import{a as T}from"./chunk-Dkjvrxnc.js";import{F as S}from"./chunk-DF2ia5Bw.js";import{M as I}from"./chunk-CSlnKOwZ.js";import{Y as R}from"./chunk-gWZ7C_bP.js";import{T as Y}from"./chunk-CsJoaQxl.js";import{s as b}from"./chunk-CeFMUgER.js";import{L as M}from"./chunk-Biqc47oa.js";import"./chunk-BhLMWRjL.js";import"./chunk-d5pl6CS0.js";import"./chunk-CrgSjA09.js";import"./chunk-BLZMmKYD.js";import"./chunk-CZd-ntFb.js";import"./chunk-xhCkp7uf.js";import"./chunk-DYycXddY.js";import"./chunk-BZdPK2Gl.js";import"./chunk-C_NABtUk.js";import"./chunk-jAowUkwz.js";import"./chunk-I3GkG-TK.js";import"./chunk-D8A3YXSB.js";const E="GuuP3-55",G="o4SVawbv",$="NULMJgt-",P="rB1ZZuDz",_="X4k7t-hp",B="y3C4nN-T",V="L5EBS1X8",q=()=>{const q=a(),{t:z}=i(),{root:U}=r(t),O=r(n),{fieldsStep:X,fields:Z=[]}=r(c),H=r(b),{farms:J=[],isLoading:K}=r(d),{kadastrFromMap:Q}=r(l),W=r(o),{lat:ee,lon:se}=Q?.clickedCoords||{},ae=m.useRef(null),[ie,re]=m.useState("watch"),[te,ne]=m.useState(),[ce,de]=m.useState(Z),[le,oe]=m.useState(),[me,he]=m.useState(!1),ue=void 0!==ee&&void 0!==se&&X!==h.FIELD_MODIFY;m.useEffect(()=>{(te?.id||H?.id)&&(he(!0),A.API_GET_FARM_FIELDS({farmId:te?.id||H?.id,year:(new Date).getFullYear(),withGhosts:!1}).then(({actualFields:e=[]})=>{de(e.map(e=>{const s=u(e?.fcr||{},W);return{...e?.fieldVersion,foundCrop:e?.fcr,isSamePrevCrop:e?.fcr?.detectedPlant?.id??e?.fcr?.plant?.id===e?.prevFcr?.detectedPlant?.id??e?.prevFcr?.plant?.id,cultureName:s,color:s===v.s?j:p(s)}}))}).finally(()=>he(!1)))},[te?.id,H?.id]);m.useEffect(()=>(ae.current&&ae.current(),ue?ae.current=(()=>{const e=f();if(e&&Q?.jsonGeometry){const s=M(k(Q?.jsonGeometry||"")?.coordinates||[]);if(s?.length){const a=L.polygon(s,{weight:3,color:"#FFFFFF",interactive:!1});return e.addLayer(a),()=>a.remove()}}})():ae.current&&ae.current(),()=>{ae.current&&ae.current()}),[ue,Q?.jsonGeometry]);return e.jsx(I,{lat:ee,lon:se,visible:ue,onClose:()=>{q(x())},children:e.jsx("div",{className:E,children:(()=>{switch(ie){case"watch":return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:$,children:[e.jsx("strong",{children:Q?.code}),!!Q?.readableAdress&&e.jsx("div",{style:{maxWidth:500},className:G,children:Q?.readableAdress}),!!Q?.landRecordCategoryTypeName&&e.jsx("div",{children:Q?.landRecordCategoryTypeName}),!!Q?.statusName&&e.jsx("div",{className:G,children:Q?.statusName}),e.jsx("br",{}),e.jsxs("div",{className:_,children:[!!Q?.permittedUseDocumentName&&e.jsxs(e.Fragment,{children:[z("Вид разрешенного использования"),":",e.jsx("div",{className:B,children:Q?.permittedUseDocumentName})]}),!!Q?.specifiedArea&&e.jsxs(e.Fragment,{children:[z("Площадь уточненная"),":",e.jsx("div",{className:B,children:g(Q?.specifiedArea)})]}),!!Q?.landRecordRegDate&&e.jsxs(e.Fragment,{children:[z("Дата присвоения"),":",e.jsx("div",{className:B,children:C(Q?.landRecordRegDate).format("YYYY-MM-DD")})]}),!!Q?.ownershipTypeName&&e.jsxs(e.Fragment,{children:[z("Форма собственности"),":",e.jsx("div",{className:B,children:Q?.ownershipTypeName})]}),!!Q?.costValue&&e.jsxs(e.Fragment,{children:[z("Кадастровая стоимость"),":",e.jsx("div",{className:B,children:w(y(Q?.costValue,0))})]})]})]}),e.jsxs("div",{className:V,children:[e.jsx(T,{view:"ascent",onClick:()=>{H?.id?q(F()):re("addField")},children:z("Создать поле")}),e.jsx(T,{view:"slaveAscent",onClick:()=>re("addNum"),children:z("Добавить номер к полю")})]})]});case"addNum":return e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("div",{children:z("Добавить кадастровый номер к существующему полю")}),e.jsxs("div",{className:P,children:[e.jsx(D,{style:{position:"relative",top:3}}),z("При добавлении кадастрового номера существующий контур поля не изменяется")]}),!H?.id&&e.jsxs("div",{children:[e.jsx(R,{loading:K,items:J.map(e=>({title:e.name,value:e})),customTitle:z("Выберите ферму"),onChange:({value:e})=>{ne(e)}}),te?.id&&e.jsx(Y,{noClip:!0,item:te})]}),e.jsxs("div",{children:[e.jsx(R,{customTitle:z("Выберите поле"),loading:me,items:ce.map(e=>({title:e.name,value:e})),onChange:({value:e})=>{oe(e)}}),le?.fieldId&&e.jsx(Y,{noClip:!0,item:le})]})]}),e.jsxs("div",{className:V,children:[e.jsx(T,{view:"ascent",disabled:!le?.fieldId,onClick:()=>{le?.fieldId&&(q(s(`${U}${O}/${H?.id||te.id}`)),requestAnimationFrame(()=>{q(N(le)),ne(),oe()}))},children:z("Добавить")}),e.jsx(T,{view:"slaveAscent",onClick:()=>{ne(),re("watch")},children:z("Отмена")})]})]});case"addField":return e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(S,{value:te,customTitle:z("Выберите ферму"),onChange:({value:e})=>{ne(e)}}),te?.id&&e.jsx(Y,{noClip:!0,item:te})]}),e.jsxs("div",{className:V,children:[e.jsx(T,{disabled:!te?.id,view:"ascent",onClick:()=>{q(s(`${U}${O}/${te.id}`)),requestAnimationFrame(()=>{ne(),q(F())})},children:z("Создать поле")}),e.jsx(T,{view:"slaveAscent",onClick:()=>{ne(),re("watch")},children:z("Отмена")})]})]})}})()})})};export{q 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.