You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hy-screen-2.0/docs/assets/index-81cb110f-178572677844...

1 lines
23 KiB

var Qt=Object.defineProperty,Xt=Object.defineProperties;var Zt=Object.getOwnPropertyDescriptors;var Qe=Object.getOwnPropertySymbols;var Jt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable;var Xe=(l,a,r)=>a in l?Qt(l,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[a]=r,I=(l,a)=>{for(var r in a||(a={}))Jt.call(a,r)&&Xe(l,r,a[r]);if(Qe)for(var r of Qe(a))en.call(a,r)&&Xe(l,r,a[r]);return l},R=(l,a)=>Xt(l,Zt(a));var V=(l,a,r)=>new Promise((k,S)=>{var f=y=>{try{w(r.next(y))}catch(C){S(C)}},u=y=>{try{w(r.throw(y))}catch(C){S(C)}},w=y=>y.done?k(y.value):Promise.resolve(y.value).then(f,u);w((r=r.apply(l,a)).next())});import{g as Ze}from"./index-e9f36657-1785726778446.js";import{A as tn}from"./assets-5661f996-1785726778446.js";/* empty css */import{f as nn,c as Je,b as sn,g as et}from"./townshipBoundaries-8867fad4-1785726778446.js";import{g as an,b as rn,a as ln,c as un}from"./openApi-70e9578a-1785726778446.js";import{c as on,F as cn,g as dn,a as vn}from"./featurePanelLayout-b5234356-1785726778446.js";import{q as tt,r as fn,s as gn}from"./screen2Standard-f38b9a2d-1785726778446.js";import{M as mn}from"./index-7b548b42-1785726778446.js";import{_ as hn}from"./TopicSwitcher-0aae51d1-1785726778446.js";import{_ as wn}from"./LayerPanel-921f9e3d-1785726778446.js";import{a as nt,_ as yn}from"./FeatureInfoPanel-e0a0d741-1785726778446.js";import{_ as bn,g as c,o as p,c as L,a as b,t as xe,F as Ne,y as Pe,n as ve,K as fe,d as m,q as kn,h as pn,w as q,A as ee,b as G,C as st,x as at,u as Te,j as de,z as _n}from"./index-1785726778446.js";import{_ as it}from"./index-7b46d381-1785726778446.js";import"./index-e33f4373-1785726778446.js";import"./geoserver-d05ee620-1785726778446.js";const Ln="/jsyApi/api/map/ndvi_timeline";function Sn(){return V(this,null,function*(){const l=yield fetch(Ln,{credentials:"include",headers:{Accept:"application/json"}});if(!l.ok){const k=new Error(`HTTP ${l.status}`);throw k.status=l.status,k}const a=yield l.json().catch(()=>({}));if((a==null?void 0:a.code)===401||(a==null?void 0:a.code)==="401"){const k=new Error((a==null?void 0:a.msg)||(a==null?void 0:a.message)||"NDVI 时间轴未授权");throw k.status=401,k}const r=Array.isArray(a==null?void 0:a.data)?a.data:Array.isArray(a)?a:[];return Tn(r)})}function Tn(l=[]){const a=new Set;return l.map((r,k)=>{const S=xn(rt(r,["url","layerName","layer_name","layer","name"]));if(!S)return null;const f=rt(r,["date","month","time","label"])||S,u=Nn(f);return{key:`${S}-${f||k}`,label:u,date:String(f),layerName:S,source:r}}).filter(Boolean).filter(r=>a.has(r.key)?!1:(a.add(r.key),!0))}function rt(l,a){for(const r of a)if((l==null?void 0:l[r])!==void 0&&(l==null?void 0:l[r])!==null&&(l==null?void 0:l[r])!=="")return l[r]}function xn(l){const a=String(l||"").trim();return a?a.includes(":")||/^https?:\/\//i.test(a)?a:`ne:${a}`:""}function Nn(l){const a=String(l||"").trim();if(!a)return"";const r=a.match(/(\d{4})[-_/年. ]?(0?[1-9]|1[0-2])(?:月)?/);return r?`${r[1]}.${String(Number(r[2])).padStart(2,"0")}`:a}const Pn={class:"grassland-ndvi-timeline-head"},Mn={key:0,class:"grassland-ndvi-timeline-state"},Cn={key:1,class:"grassland-ndvi-timeline-state"},$n={key:2,class:"grassland-ndvi-timeline-body"},Fn=["aria-checked","title","onClick"],An={class:"grassland-ndvi-timeline-label"},In=42,Vn=28,En={__name:"GrasslandNdviTimeline",props:{items:{type:Array,default:()=>[]},modelValue:{type:String,default:""},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(l,{emit:a}){const r=l,k=a,S=c(()=>r.items.findIndex(d=>d.key===r.modelValue)),f=c(()=>S.value===-1?Math.max(0,r.items.length-1):S.value),u=c(()=>r.items[f.value]||null),w=c(()=>r.loading?"加载中":"未选择"),y=c(()=>r.items.length>7),C=c(()=>y.value?Vn:In),te=c(()=>Y(f.value)),ne=c(()=>j(f.value));function K(d){if(!r.items.length)return;const v=Math.min(r.items.length-1,Math.max(0,f.value+d));k("update:modelValue",r.items[v].key)}function se(d){!d||d.key===r.modelValue||k("update:modelValue",d.key)}function U(d){return!r.items.length||d<0?0:r.items.length===1?.5:d/(r.items.length-1)}function Y(d){const v=U(d),P=_(v*100),h=C.value*(1-v*2);return`calc(${P}% ${h<0?"-":"+"} ${_(Math.abs(h))}px)`}function j(d){const v=U(d);return v<=0?"0px":`calc(${_(v*100)}% - ${_(C.value*2*v)}px)`}function _(d){return Number(d.toFixed(4)).toString()}return(d,v)=>{var P;return p(),L("div",{class:ve(["grassland-ndvi-timeline",{"is-dense":y.value}])},[b("div",Pn,[v[2]||(v[2]=b("span",null,"草地健康/退化",-1)),b("strong",null,xe(((P=u.value)==null?void 0:P.label)||w.value),1)]),l.loading?(p(),L("div",Mn,"加载月份数据")):l.items.length?(p(),L("div",$n,[b("button",{class:"grassland-ndvi-timeline-nav",type:"button",title:"上一期",onClick:v[0]||(v[0]=h=>K(-1))},"‹"),b("div",{class:"grassland-ndvi-timeline-track",style:fe({"--timeline-active-left":te.value,"--timeline-fill-width":ne.value,"--timeline-edge-offset":`${C.value}px`}),role:"radiogroup","aria-label":"草地健康退化月份"},[v[4]||(v[4]=b("div",{class:"grassland-ndvi-timeline-line"},null,-1)),v[5]||(v[5]=b("div",{class:"grassland-ndvi-timeline-fill"},null,-1)),v[6]||(v[6]=b("div",{class:"grassland-ndvi-timeline-thumb"},[b("i")],-1)),(p(!0),L(Ne,null,Pe(l.items,(h,D)=>{var z,T;return p(),L("button",{key:h.key,class:ve(["grassland-ndvi-timeline-mark",{"is-active":h.key===((z=u.value)==null?void 0:z.key),"is-past":D<=f.value,"is-staggered":y.value&&D%2===1}]),type:"button",role:"radio","aria-checked":h.key===((T=u.value)==null?void 0:T.key),style:fe({left:Y(D)}),title:h.date,onClick:Q=>se(h)},[v[3]||(v[3]=b("span",{class:"grassland-ndvi-timeline-tick"},null,-1)),b("span",An,xe(h.label),1)],14,Fn)}),128))],4),b("button",{class:"grassland-ndvi-timeline-nav",type:"button",title:"下一期",onClick:v[1]||(v[1]=h=>K(1))},"›")])):(p(),L("div",Cn,"暂无月份数据"))],2)}}},Bn=bn(En,[["__scopeId","data-v-3b86bca9"]]),Rn={class:"forest-grass-wet"},qn={class:"forest-grass-wet-ui",id:"forest-grass-wet-ui"},Gn={class:"fgw-left"},jn={class:"fgw-side-stack is-left"},Dn={class:"fgw-right"},zn={class:"fgw-side-stack is-right"},Wn={key:1,class:"fgw-ndvi-timeline"},On={class:"fgw-bottom-topic"},Hn={key:0,class:"loading"},Kn={class:"loading-progress"},Un={class:"value"},ds={__name:"index",props:{showLoading:{type:Boolean,default:!0},active:{type:Boolean,default:!0}},emits:["topic-stats"],setup(l,{expose:a,emit:r}){const k=l,S=r,f=m(null),u=m(nn[0].key),w=m(""),y=m([]),C=m([]),te=m("idle"),ne=m(!1),K=m({title:"业务统计",rows:[]}),se=m({title:"业务统计",rows:[]}),U=m([]),Y=m([]),j=m(null),_=m(""),d=m(null),v=m(!1),P=m(!1),h=m(null),D=m(0),z=m(k.showLoading),T=m([]),Q=m("idle"),$=m(""),E=m({type:"idle",text:"等待 GeoServer 图层加载"});let X=null,M=!1,ge=!1,W=!1,F=null,Me=0,Ce=0,me=0,O=0,ae=0,ie=!1,he=!1;const lt={图斑编号:"patch_no",图斑号:"patch_no",湿地编号:"land_number",草地编号:"land_number",林地类型:"dlmc",地类:"landUseName",地类名称:"landUseName",所在乡镇:"townName",所在区域:"full_name",面积:"acreage",图斑面积:"acreage",湿地面积:"acreage",草场面积:"acreage",草原类:"grassTypeName",草原型:"grassMinType",草原等级:"grasslandLevel",草原类型:"basic_type_name",小斑干草产量:"xbGcYield",小斑鲜草产量:"xbXcYield",鲜草产量:"xcYield",干草产量:"gcYield",海拔:"elevation",地貌:"landformName",权属单位:"qsdwmc",坐落单位:"zldwmc",林班:"lin_ban",小班:"xiao_ban",森林类别:"sen_lin_lb",林种:"lin_zhong",公益林等级:"gjgyl_bhdj",保护等级:"bh_dj",质量等级:"zl_dj",优势树种:"you_shi_sz",起源:"qi_yuan",龄组:"ling_zu",郁闭度:"yu_bi_du",林地权属:"ld_qs",土地使用权属:"tdsyqs",林木权属:"lmqs",生态区位:"stqwmc",坡度等级:"slope"},ut=new Set(["grassland-distribution","wetland-distribution","woodland-distribution","woodland-protection","woodland-type","woodland-quality","woodland-ownership"]),ot=[{topicKey:"wetland",layerKey:"wetland-distribution",name:"湿地分布",legendName:"湿地资源"},{topicKey:"grassland",layerKey:"grassland-distribution",name:"草地分布",legendName:"草地资源"},{topicKey:"woodland",layerKey:"woodland-distribution",name:"林地分布",legendName:"林地资源"}],ct=new Set(["code","msg","message","success","data","result","grassland","wetland","woodland","basicGrassland","dyColumn","geom","wkt","geometry","the_geom","theGeom","shape","shape_leng","shape_length","length","perimeter","gid","id","objectid","object_id","fid","key_uid","bsm","ysdm"].map(e=>e.toLowerCase())),dt=c(()=>Je(u.value)),vt=c(()=>sn(u.value)),re=c(()=>ot.map(e=>St(e)).filter(Boolean)),le=c(()=>u.value==="overview"?re.value:vt.value),$e=c({get(){return u.value==="overview"?y.value:w.value},set(e){if(u.value==="overview"){y.value=Array.isArray(e)?e.map(String).filter(Boolean):[];return}w.value=String(e||"")}}),Z=c(()=>w.value?et(u.value,w.value):null),J=c(()=>u.value==="grassland"&&w.value==="grassland-health"),ft=c(()=>J.value),gt=c(()=>T.value.find(e=>e.key===$.value)||null),H=c(()=>{var e;return(((e=Z.value)==null?void 0:e.legends)||[]).find(t=>t.key===_.value)||null}),mt=c(()=>re.value.flatMap(e=>e.legends||[])),we=c(()=>{var e;return u.value==="overview"?mt.value:((e=Z.value)==null?void 0:e.legends)||[]}),ht=c(()=>le.value.length>0),Fe=c(()=>le.value.length<=6&&we.value.length<=8),Ae=c(()=>{if(!Fe.value)return 430;const e=Math.max(1,le.value.length),t=Math.max(1,Math.ceil(we.value.length/2)),n=e*34+Math.max(0,e-1)*5,s=30+t*28;return Math.max(220,Math.min(430,72+n+s))}),wt=c(()=>{var s;if(u.value==="overview"){const i=new Set(y.value),o=re.value.filter(g=>i.has(g.key));return Tt(o)}const e=Z.value;if(!e)return null;let t=(s=H.value)!=null&&s.cqlFilter?R(I({},e),{cqlFilter:H.value.cqlFilter,activeLegend:H.value,name:H.value.name||e.name}):e;const n=gt.value;return J.value&&(n!=null&&n.layerName)&&(t=R(I({},t),{layerName:n.layerName,name:`${e.name} ${n.label}`,timelineDate:n.label,timelineItem:n})),t}),Ie=m(typeof window=="undefined"?1080:window.innerHeight),Ve=tt.sideCardWidth;c(()=>tt.sideCardGap);const Ee=c(()=>fn(Ie.value)),yt=c(()=>gn(Ee.value,2)),ye=c(()=>!!h.value),bt=cn,Be=c(()=>on({point:h.value?Lt(h.value):null,rowCount:d.value?Le(d.value):0,loading:P.value,empty:v.value||!d.value})),kt=c(()=>Be.value.height),pt=c(()=>Be.value.style),_t=c(()=>{var n,s,i,o,g,A,N;const e=((s=(n=d.value)==null?void 0:n.layer)==null?void 0:s.overviewTopicKey)||((o=(i=d.value)==null?void 0:i.layer)==null?void 0:o.topicKey)||u.value;return{grassland:"草地详情",wetland:"湿地详情",woodland:"林地详情"}[e]||`${((A=(g=d.value)==null?void 0:g.layer)==null?void 0:A.name)||((N=dt.value)==null?void 0:N.name)||"资源"}详情`});function Lt(e){const t=document.querySelector(".forest-grass-wet"),n=t==null?void 0:t.getBoundingClientRect();return!(n!=null&&n.width)||!(n!=null&&n.height)?e:{x:(e.x-n.left)/n.width*1920,y:(e.y-n.top)/n.height*1080}}function be(){Ie.value=typeof window=="undefined"?1080:window.innerHeight}function St({topicKey:e,layerKey:t,name:n,legendName:s}){var g;const i=et(e,t);if(!i||i.key!==t)return null;const o=((g=i.legends)==null?void 0:g[0])||{};return R(I({},i),{name:n,overviewTopicKey:e,legends:[R(I({},o),{key:`overview-${t}`,name:s,selectable:!1})]})}function Tt(e=[]){const t=e.filter(Boolean);if(!t.length)return null;const[n,...s]=t;return R(I({},n),{overlayLayers:s})}kn(()=>{be(),window.addEventListener("resize",be),document.addEventListener("pointerdown",He,!0),xt(),pe(u.value,""),ue(u.value,"")}),pn(()=>{M=!0,F&&window.clearTimeout(F),window.removeEventListener("resize",be),document.removeEventListener("pointerdown",He,!0)}),q(u,e=>{ie=!0,_.value="",w.value="",e==="overview"&&(y.value=[]),x(),E.value={type:"idle",text:"等待 GeoServer 图层加载"},pe(e,""),ue(e,"",null),ee(()=>{ie=!1})}),q(w,()=>{ie||(he=!0,_.value="",x(),E.value={type:w.value?"loading":"idle",text:w.value?"正在加载 GeoServer 图层":"等待 GeoServer 图层加载"},u.value!=="woodland"&&pe(u.value,w.value),ue(u.value,w.value,null),ee(()=>{he=!1}))}),q(y,()=>{u.value==="overview"&&(_.value="",x(),E.value={type:y.value.length?"loading":"idle",text:y.value.length?"正在加载 GeoServer 图层":"等待 GeoServer 图层加载"},j.value=Oe("overview",y.value.join(",")))},{deep:!0}),q(_,()=>{ie||he||(x(),ue(u.value,w.value,H.value))}),q(J,e=>{if(e){Mt();return}$.value=""}),q($,()=>{J.value&&x()}),q(()=>k.active,e=>{var t,n,s,i;f.value&&(e?(ke(),(n=(t=f.value).resume)==null||n.call(t)):(i=(s=f.value).pause)==null||i.call(s))});function xt(){var n;X=new tn;const e={progress:0};X.instance.on("onProgress",(s,i,o)=>{const g=Math.floor(i/o*100);Ze.to(e,{progress:g,onUpdate:()=>{D.value=Math.floor(e.progress)}})});const t=()=>{M||ge||(ge=!0,ke())};X.instance.on("onLoad",t),(n=X.ready)==null||n.then(t).catch(()=>{M||(E.value={type:"error",text:"地图资源加载失败"})})}function ke(){M||!k.active||!ge||W||(W=!0,F&&window.clearTimeout(F),F=window.setTimeout(()=>{F=null,Re()},600))}function Re(e=0){return V(this,null,function*(){var n,s,i,o,g;if(M)return;if(!k.active){W=!1;return}if(yield ee(),!k.active){W=!1;return}if(!!((s=(n=f.value)==null?void 0:n.loadMap)!=null&&s.call(n,X)||(o=(i=f.value)==null?void 0:i.hasMap)!=null&&o.call(i))){yield Yt(),yield ee(),(g=f.value)==null||g.play();return}if(e<24){window.setTimeout(()=>Re(e+1),120);return}W=!1})}function Nt(){F&&(window.clearTimeout(F),F=null)}function qe(){var e,t,n,s;(t=(e=f.value)==null?void 0:e.resume)==null||t.call(e),(s=(n=f.value)==null?void 0:n.refreshView)==null||s.call(n)}function Pt(){var e,t;if(x(),E.value={type:"loading",text:"地图正在复位"},(t=(e=f.value)==null?void 0:e.hasMap)!=null&&t.call(e)){qe(),E.value={type:"success",text:"地图已复位"};return}Nt(),W=!1,ee(()=>{ke()})}a({refreshMapView:qe,resetMap:Pt});function pe(n){return V(this,arguments,function*(e,t=w.value){const s=e==="woodland"?"":t,i=++Ce;ne.value=!0,te.value="loading";const o=yield an(e,s);M||i!==Ce||e===u.value&&(e!=="woodland"&&(s||"")!==(w.value||"")||Ct(o,e))})}function Mt(e=!1){return V(this,null,function*(){if(!J.value)return;if(!e&&T.value.length){Ge();return}const t=++me;Q.value="loading";try{const n=yield Sn();if(M||t!==me)return;T.value=n,Q.value=n.length?"success":"empty",Ge()}catch(n){if(M||t!==me)return;T.value=[],$.value="",Q.value="error"}})}function Ge(){if(!T.value.length){$.value="";return}T.value.some(t=>t.key===$.value)||($.value=T.value[T.value.length-1].key)}function Ct(e,t){var s,i,o;const n=$t(e);C.value=n.core||[],K.value=n.left||{title:"业务统计",rows:[]},se.value=n.right||{title:"业务统计",rows:[]},U.value=(s=n.leftPanels)!=null&&s.length?n.leftPanels:[K.value],Y.value=(i=n.rightPanels)!=null&&i.length?n.rightPanels:[se.value],te.value=n.status,ne.value=!1,S("topic-stats",{topicKey:t,topicName:Je(t).name,items:((o=n.top)!=null&&o.length?n.top:n.core||[]).slice(0,4)})}function $t(e){return e||{}}function je(e,t){return`${u.value}-${t}-${(e==null?void 0:e.key)||(e==null?void 0:e.title)||"panel"}`}function _e(e){var n;const t=((n=e==null?void 0:e.rows)==null?void 0:n.length)||0;return(e==null?void 0:e.span)===1?!1:(e==null?void 0:e.span)===2?!0:(e==null?void 0:e.type)==="spotlight"||(e==null?void 0:e.type)==="metric"||(e==null?void 0:e.type)==="column"&&t<=5?!1:(e==null?void 0:e.type)==="rank"&&t>4||(e==null?void 0:e.type)==="split"&&t>4||(e==null?void 0:e.type)==="donut"&&t>5||(e==null?void 0:e.type)==="structure"&&t>4||(e==null?void 0:e.type)==="bar"&&t>4||(e==null?void 0:e.type)==="line"&&t>6}function De(e){return _e(e)?yt.value:Ee.value}function Le(e){const t=(e==null?void 0:e.properties)||{};return Object.keys(t).filter(s=>ze(s,t[s])).length}function ze(e,t){return t==null||t===""||Array.isArray(t)||typeof t=="object"?!1:!ct.has(String(e||"").toLowerCase())}function Ft(){if(u.value==="overview"){const e=new Set(y.value);return re.value.filter(t=>e.has(t.key)).slice().reverse()}return Z.value?[Z.value]:[]}function At(e={}){const t=String(e.overviewTopicKey||u.value||"").toLowerCase(),n=`${e.key||""} ${e.layerName||""} ${t}`.toLowerCase();return n.includes("basic-grassland")||n.includes("t_basic_grassland")?"basicGrassland":t==="woodland"||n.includes("woodland")||n.includes("t_woodland")?"woodland":t==="wetland"||n.includes("wetland")||n.includes("shidi")?"wetland":t==="grassland"||n.includes("grassland")||n.includes("caodi")?"grassland":""}function It(e={}){const t=We(e.lng),n=We(e.lat);return t===""||n===""?"":`POINT(${t} ${n})`}function We(e){const t=Number(e);return Number.isFinite(t)?t.toFixed(8).replace(/\.?0+$/,""):""}function Vt(){return V(this,arguments,function*(e={}){var A,N,B,Ke,oe,Ue;const t=Number((A=e==null?void 0:e.lngLat)==null?void 0:A.lng),n=Number((N=e==null?void 0:e.lngLat)==null?void 0:N.lat),s=Ft();if(!Number.isFinite(t)||!Number.isFinite(n)||!s.length){x();return}const i=++O,o=ae,g=e.screen||{x:960,y:540};h.value=null,d.value=null,v.value=!1,P.value=!0,(Ke=(B=f.value)==null?void 0:B.clearSelectedFeature)==null||Ke.call(B);try{for(const Ye of s){const ce=yield Et(Ye,{lng:t,lat:n});if(i!==O||M)return;if(ce){d.value=ce,h.value=Se(ce,g),v.value=!1,(Ue=(oe=f.value)==null?void 0:oe.highlightFeature)==null||Ue.call(oe,ce,{highlightTone:"v21"});return}}i===O&&ae===o&&x()}catch(Ye){i===O&&ae===o&&x()}finally{i===O&&(P.value=!1)}})}function Et(e,t){return V(this,null,function*(){const n=At(e);if(!n)return null;const s=It(t);let i=null;n==="grassland"?i=yield dn({wkt:s}):n==="wetland"?i=yield vn({wkt:s}):n==="woodland"?i=yield ln(s):n==="basicGrassland"&&(i=yield un(s));const o=Bt(i,n);if(!qt(o))return null;const g=jt(o,e,t,n);return Le(g)>0?g:null})}function Bt(e,t){var s,i,o,g,A;const n=[e==null?void 0:e[t],e==null?void 0:e.grassland,e==null?void 0:e.wetland,e==null?void 0:e.woodland,e==null?void 0:e.basicGrassland,(s=e==null?void 0:e.data)==null?void 0:s[t],(i=e==null?void 0:e.data)==null?void 0:i.grassland,(o=e==null?void 0:e.data)==null?void 0:o.wetland,(g=e==null?void 0:e.data)==null?void 0:g.woodland,(A=e==null?void 0:e.data)==null?void 0:A.basicGrassland,e==null?void 0:e.data,e==null?void 0:e.result,e];for(const N of n){const B=Rt(N);if(B)return B}return null}function Rt(e){return Array.isArray(e)?e.find(t=>t&&typeof t=="object")||null:e&&typeof e=="object"?e:null}function qt(e){return!e||typeof e!="object"?!1:Array.isArray(e.dyColumn)&&e.dyColumn.some(Gt)?!0:Object.keys(e).some(t=>ze(t,e[t]))}function Gt(e={}){const t=e==null?void 0:e.value;return t==null||t===""?!1:!!String((e==null?void 0:e.field)||(e==null?void 0:e.title)||"").trim()}function jt(e,t,n,s){const i=zt(e),o=Dt(e);return{id:e.id||e.patchNo||e.patch_no||e.landNumber||e.land_number||`${s}-${n.lng}-${n.lat}`,properties:i,feature:{type:"Feature",properties:i,geometry:o},geometry:o,layer:t,lngLat:n}}function Dt(e={}){return e.geometry||e.geom||e.wkt||e.the_geom||e.theGeom||e.geo||e.geometryWkt||e.geometry_wkt||e.shape||null}function zt(e={}){const t=I({},e);return(Array.isArray(e.dyColumn)?e.dyColumn:[]).forEach(s=>{const i=s==null?void 0:s.value;if(i==null||i==="")return;const o=lt[String((s==null?void 0:s.title)||"").trim()],g=String((s==null?void 0:s.field)||"").trim();[g,Wt(g),o].filter(Boolean).forEach(N=>{(t[N]===void 0||t[N]===null||t[N]==="")&&(t[N]=i)})}),t}function Wt(e){return String(e||"").replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function ue(s,i){return V(this,arguments,function*(e,t,n=H.value){const o=++Me;if(!t||!Ot(t,n)){j.value=Oe(e,t);return}const g=yield rn(e,t,n);M||o!==Me||e!==u.value||t!==w.value||((n==null?void 0:n.key)||"")===_.value&&(j.value=R(I({},g),{hideTownLabelStats:!0}))})}function Ot(e,t=null){return!!(t!=null&&t.key)||ut.has(e)}function Oe(e,t){return{status:"disabled",topicKey:e,layerKey:t,title:"",unit:"",hideTownLabelStats:!0,rows:[]}}function Ht(e){var n,s;ae+=1;const t=(s=(n=e==null?void 0:e.feature)!=null?n:e)!=null?s:null;if(!t||Le(t)<=0){x();return}d.value=t,v.value=!1,h.value=Se(t,(e==null?void 0:e.screen)||h.value)}function Se(e,t=null){var n,s,i,o;return((s=(n=f.value)==null?void 0:n.getVectorFeatureAnchorScreen)==null?void 0:s.call(n,e))||((o=(i=f.value)==null?void 0:i.getVectorFeatureScreen)==null?void 0:o.call(i,e))||t}function Kt(){if(!ye.value||!d.value)return;const e=Se(d.value,h.value);if(!e)return;const t=h.value;t&&Math.abs(Number(t.x)-Number(e.x))<.5&&Math.abs(Number(t.y)-Number(e.y))<.5||(h.value=e)}function Ut(e){E.value=e}function x(){var e,t;O+=1,d.value=null,v.value=!1,P.value=!1,h.value=null,(t=(e=f.value)==null?void 0:e.clearSelectedFeature)==null||t.call(e)}function He(e){if(!ye.value)return;const t=document.querySelector(".fgw-map-feature-info"),n=document.querySelector(".forest-grass-wet .cesium-map"),s=e.target;t&&s instanceof Node&&t.contains(s)||n&&s instanceof Node&&n.contains(s)||x()}function Yt(){return z.value?new Promise(e=>{Ze.to(".forest-grass-wet .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{z.value=!1,e()}})}):Promise.resolve()}return(e,t)=>(p(),L("div",Rn,[G(mn,{ref_key:"mapSceneRef",ref:f,"active-layer":wt.value,"map-ranking":j.value,"admin-boundary-line-scale":1.65,"initial-zoom":9,"auto-apply-layer-map-view":!1,"max-zoom":21,"hide-town-label-stats":"","enable-imagery-feature-pick":!0,"emit-empty-feature-info-on-miss":!1,"enable-town-polygon-pick":!1,onFeatureLoading:t[0]||(t[0]=n=>P.value=n),onFeatureInfo:Ht,onMapClick:Vt,onLayerStatus:Ut,onViewChange:Kt},null,8,["active-layer","map-ranking"]),b("div",qn,[b("div",Gn,[b("div",jn,[(p(!0),L(Ne,null,Pe(U.value,n=>(p(),st(it,{key:je(n,"left"),class:ve(["fgw-side-card left-card",{"is-double":_e(n)}]),title:n.title,width:Te(Ve),height:De(n)},{default:at(()=>[G(nt,{panel:n,compact:"","column-label-standard":"","visual-version":"v21"},null,8,["panel"])]),_:2},1032,["class","title","width","height"]))),128))])]),b("div",Dn,[b("div",zn,[(p(!0),L(Ne,null,Pe(Y.value,n=>(p(),st(it,{key:je(n,"right"),class:ve(["fgw-side-card right-card",{"is-double":_e(n)}]),title:n.title,width:Te(Ve),height:De(n)},{default:at(()=>[G(nt,{panel:n,compact:"","column-label-standard":"","visual-version":"v21"},null,8,["panel"])]),_:2},1032,["class","title","width","height"]))),128))])]),ht.value?(p(),L("div",{key:0,class:"fgw-map-layer-tools",style:fe({height:`${Ae.value}px`})},[G(wn,{modelValue:$e.value,"onUpdate:modelValue":t[1]||(t[1]=n=>$e.value=n),"selected-legend-key":_.value,"onUpdate:selectedLegendKey":t[2]||(t[2]=n=>_.value=n),"topic-key":u.value,layers:le.value,legends:we.value,multiple:u.value==="overview",width:248,height:Ae.value,compact:Fe.value},null,8,["modelValue","selected-legend-key","topic-key","layers","legends","multiple","height","compact"])],4)):de("",!0),ft.value?(p(),L("div",Wn,[G(Bn,{modelValue:$.value,"onUpdate:modelValue":t[3]||(t[3]=n=>$.value=n),items:T.value,loading:Q.value==="loading"},null,8,["modelValue","items","loading"])])):de("",!0),ye.value?(p(),L("div",{key:2,class:"fgw-map-feature-info",style:fe(pt.value)},[G(yn,{title:_t.value,feature:d.value,empty:v.value,loading:P.value,width:Te(bt),height:kt.value,closable:"",onClose:x},null,8,["title","feature","empty","loading","width","height"])],4)):de("",!0),b("div",On,[G(hn,{modelValue:u.value,"onUpdate:modelValue":t[4]||(t[4]=n=>u.value=n)},null,8,["modelValue"])])]),z.value?(p(),L("div",Hn,[t[6]||(t[6]=_n('<div class="loading-text"><span style="--index:1;">L</span><span style="--index:2;">O</span><span style="--index:3;">A</span><span style="--index:4;">D</span><span style="--index:5;">I</span><span style="--index:6;">N</span><span style="--index:7;">G</span></div>',1)),b("div",Kn,[b("span",Un,xe(D.value),1),t[5]||(t[5]=b("span",{class:"unit"},"%",-1))])])):de("",!0)]))}};export{ds as default};