var Ut=Object.defineProperty,Yt=Object.defineProperties;var Qt=Object.getOwnPropertyDescriptors;var Ue=Object.getOwnPropertySymbols;var Jt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable;var Ye=(l,a,r)=>a in l?Ut(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)&&Ye(l,r,a[r]);if(Ue)for(var r of Ue(a))Xt.call(a,r)&&Ye(l,r,a[r]);return l},B=(l,a)=>Yt(l,Qt(a));var V=(l,a,r)=>new Promise((k,T)=>{var f=y=>{try{w(r.next(y))}catch($){T($)}},u=y=>{try{w(r.throw(y))}catch($){T($)}},w=y=>y.done?k(y.value):Promise.resolve(y.value).then(f,u);w((r=r.apply(l,a)).next())});import{g as Qe}from"./index-e9f36657-1784074877048.js";import{A as Zt}from"./assets-34f9bc99-1784074877048.js";/* empty css */import{f as en,c as Je,b as tn,g as Xe}from"./townshipBoundaries-1b068bef-1784074877048.js";import{g as nn,b as sn,a as an,c as rn}from"./openApi-7e2310e1-1784074877048.js";import{c as ln,F as un,g as on,a as cn}from"./featurePanelLayout-dc118942-1784074877048.js";import{q as Ze,r as dn,s as vn}from"./screen2Standard-9c6af3a2-1784074877048.js";import{M as fn}from"./index-b4ec1ae2-1784074877048.js";import{_ as gn}from"./TopicSwitcher-3ee7ffcb-1784074877048.js";import{_ as mn}from"./LayerPanel-9c0c5952-1784074877048.js";import{a as et,_ as hn}from"./FeatureInfoPanel-8e9f606e-1784074877048.js";import{_ as wn,g as c,o as _,c as S,a as b,t as Te,F as Ne,y as xe,n as de,J as ve,d as m,q as yn,h as bn,w as q,A as ee,b as G,C as tt,x as nt,u as Se,j as ce,z as kn}from"./index-1784074877048.js";import{_ as st}from"./index-1f5d6021-1784074877048.js";import"./index-bc047bb3-1784074877048.js";import"./geoserver-a50e4f20-1784074877048.js";const _n="/jsyApi/api/map/ndvi_timeline";function pn(){return V(this,null,function*(){const l=yield fetch(_n,{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 Ln(r)})}function Ln(l=[]){const a=new Set;return l.map((r,k)=>{const T=Sn(at(r,["url","layerName","layer_name","layer","name"]));if(!T)return null;const f=at(r,["date","month","time","label"])||T,u=Tn(f);return{key:`${T}-${f||k}`,label:u,date:String(f),layerName:T,source:r}}).filter(Boolean).filter(r=>a.has(r.key)?!1:(a.add(r.key),!0))}function at(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 Sn(l){const a=String(l||"").trim();return a?a.includes(":")||/^https?:\/\//i.test(a)?a:`ne:${a}`:""}function Tn(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 Nn={class:"grassland-ndvi-timeline-head"},xn={key:0,class:"grassland-ndvi-timeline-state"},Pn={key:1,class:"grassland-ndvi-timeline-state"},Cn={key:2,class:"grassland-ndvi-timeline-body"},$n=["aria-checked","title","onClick"],Mn={class:"grassland-ndvi-timeline-label"},Fn=42,An=28,In={__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,T=c(()=>r.items.findIndex(d=>d.key===r.modelValue)),f=c(()=>T.value===-1?Math.max(0,r.items.length-1):T.value),u=c(()=>r.items[f.value]||null),w=c(()=>r.loading?"加载中":"未选择"),y=c(()=>r.items.length>7),$=c(()=>y.value?An:Fn),te=c(()=>U(f.value)),ne=c(()=>R(f.value));function H(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 K(d){return!r.items.length||d<0?0:r.items.length===1?.5:d/(r.items.length-1)}function U(d){const v=K(d),P=L(v*100),h=$.value*(1-v*2);return`calc(${P}% ${h<0?"-":"+"} ${L(Math.abs(h))}px)`}function R(d){const v=K(d);return v<=0?"0px":`calc(${L(v*100)}% - ${L($.value*2*v)}px)`}function L(d){return Number(d.toFixed(4)).toString()}return(d,v)=>{var P;return _(),S("div",{class:de(["grassland-ndvi-timeline",{"is-dense":y.value}])},[b("div",Nn,[v[2]||(v[2]=b("span",null,"草地健康/退化",-1)),b("strong",null,Te(((P=u.value)==null?void 0:P.label)||w.value),1)]),l.loading?(_(),S("div",xn,"加载月份数据")):l.items.length?(_(),S("div",Cn,[b("button",{class:"grassland-ndvi-timeline-nav",type:"button",title:"上一期",onClick:v[0]||(v[0]=h=>H(-1))},"‹"),b("div",{class:"grassland-ndvi-timeline-track",style:ve({"--timeline-active-left":te.value,"--timeline-fill-width":ne.value,"--timeline-edge-offset":`${$.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)),(_(!0),S(Ne,null,xe(l.items,(h,j)=>{var D,N;return _(),S("button",{key:h.key,class:de(["grassland-ndvi-timeline-mark",{"is-active":h.key===((D=u.value)==null?void 0:D.key),"is-past":j<=f.value,"is-staggered":y.value&&j%2===1}]),type:"button",role:"radio","aria-checked":h.key===((N=u.value)==null?void 0:N.key),style:ve({left:U(j)}),title:h.date,onClick:Y=>se(h)},[v[3]||(v[3]=b("span",{class:"grassland-ndvi-timeline-tick"},null,-1)),b("span",Mn,Te(h.label),1)],14,$n)}),128))],4),b("button",{class:"grassland-ndvi-timeline-nav",type:"button",title:"下一期",onClick:v[1]||(v[1]=h=>H(1))},"›")])):(_(),S("div",Pn,"暂无月份数据"))],2)}}},Vn=wn(In,[["__scopeId","data-v-86212a95"]]),En={class:"forest-grass-wet"},Bn={class:"forest-grass-wet-ui",id:"forest-grass-wet-ui"},qn={class:"fgw-left"},Gn={class:"fgw-side-stack is-left"},Rn={class:"fgw-right"},jn={class:"fgw-side-stack is-right"},Dn={key:1,class:"fgw-ndvi-timeline"},zn={class:"fgw-bottom-topic"},Wn={key:0,class:"loading"},On={class:"loading-progress"},Hn={class:"value"},os={__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,T=r,f=m(null),u=m(en[0].key),w=m(""),y=m([]),$=m([]),te=m("idle"),ne=m(!1),H=m({title:"业务统计",rows:[]}),se=m({title:"业务统计",rows:[]}),K=m([]),U=m([]),R=m(null),L=m(""),d=m(null),v=m(!1),P=m(!1),h=m(null),j=m(0),D=m(k.showLoading),N=m([]),Y=m("idle"),M=m(""),E=m({type:"idle",text:"等待 GeoServer 图层加载"});let Q=null,C=!1,fe=!1,z=!1,F=null,Pe=0,Ce=0,ge=0,W=0,ae=!1,me=!1;const it={图斑编号:"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"},rt=new Set(["grassland-distribution","wetland-distribution","woodland-distribution","woodland-protection","woodland-type","woodland-quality","woodland-ownership"]),lt=[{topicKey:"wetland",layerKey:"wetland-distribution",name:"湿地分布",legendName:"湿地资源"},{topicKey:"grassland",layerKey:"grassland-distribution",name:"草地分布",legendName:"草地资源"},{topicKey:"woodland",layerKey:"woodland-distribution",name:"林地分布",legendName:"林地资源"}],ut=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())),ot=c(()=>Je(u.value)),ct=c(()=>tn(u.value)),ie=c(()=>lt.map(e=>pt(e)).filter(Boolean)),re=c(()=>u.value==="overview"?ie.value:ct.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||"")}}),J=c(()=>w.value?Xe(u.value,w.value):null),X=c(()=>u.value==="grassland"&&w.value==="grassland-health"),dt=c(()=>X.value),vt=c(()=>N.value.find(e=>e.key===M.value)||null),O=c(()=>{var e;return(((e=J.value)==null?void 0:e.legends)||[]).find(t=>t.key===L.value)||null}),ft=c(()=>ie.value.flatMap(e=>e.legends||[])),he=c(()=>{var e;return u.value==="overview"?ft.value:((e=J.value)==null?void 0:e.legends)||[]}),gt=c(()=>re.value.length>0),Me=c(()=>re.value.length<=6&&he.value.length<=8),Fe=c(()=>{if(!Me.value)return 430;const e=Math.max(1,re.value.length),t=Math.max(1,he.value.length),n=e*32,s=30+t*28;return Math.max(272,Math.min(520,96+n+s))}),mt=c(()=>{var s;if(u.value==="overview"){const i=new Set(y.value),o=ie.value.filter(g=>i.has(g.key));return Lt(o)}const e=J.value;if(!e)return null;let t=(s=O.value)!=null&&s.cqlFilter?B(I({},e),{cqlFilter:O.value.cqlFilter,activeLegend:O.value,name:O.value.name||e.name}):e;const n=vt.value;return X.value&&(n!=null&&n.layerName)&&(t=B(I({},t),{layerName:n.layerName,name:`${e.name} ${n.label}`,timelineDate:n.label,timelineItem:n})),t}),Ae=m(typeof window=="undefined"?1080:window.innerHeight),Ie=Ze.sideCardWidth;c(()=>Ze.sideCardGap);const Ve=c(()=>dn(Ae.value)),ht=c(()=>vn(Ve.value,2)),we=c(()=>!!h.value),wt=un,Ee=c(()=>ln({point:h.value?_t(h.value):null,rowCount:d.value?pe(d.value):0,loading:P.value,empty:v.value||!d.value})),yt=c(()=>Ee.value.height),bt=c(()=>Ee.value.style),kt=c(()=>{var n,s,i,o,g,A,p;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)||((p=ot.value)==null?void 0:p.name)||"资源"}详情`});function _t(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 ye(){Ae.value=typeof window=="undefined"?1080:window.innerHeight}function pt({topicKey:e,layerKey:t,name:n,legendName:s}){var g;const i=Xe(e,t);if(!i||i.key!==t)return null;const o=((g=i.legends)==null?void 0:g[0])||{};return B(I({},i),{name:n,overviewTopicKey:e,legends:[B(I({},o),{key:`overview-${t}`,name:s,selectable:!1})]})}function Lt(e=[]){const t=e.filter(Boolean);if(!t.length)return null;const[n,...s]=t;return B(I({},n),{overlayLayers:s})}yn(()=>{ye(),window.addEventListener("resize",ye),document.addEventListener("pointerdown",Oe,!0),St(),ke(u.value,""),le(u.value,"")}),bn(()=>{C=!0,F&&window.clearTimeout(F),window.removeEventListener("resize",ye),document.removeEventListener("pointerdown",Oe,!0)}),q(u,e=>{ae=!0,L.value="",w.value="",e==="overview"&&(y.value=[]),x(),E.value={type:"idle",text:"等待 GeoServer 图层加载"},ke(e,""),le(e,"",null),ee(()=>{ae=!1})}),q(w,()=>{ae||(me=!0,L.value="",x(),E.value={type:w.value?"loading":"idle",text:w.value?"正在加载 GeoServer 图层":"等待 GeoServer 图层加载"},u.value!=="woodland"&&ke(u.value,w.value),le(u.value,w.value,null),ee(()=>{me=!1}))}),q(y,()=>{u.value==="overview"&&(L.value="",x(),E.value={type:y.value.length?"loading":"idle",text:y.value.length?"正在加载 GeoServer 图层":"等待 GeoServer 图层加载"},R.value=We("overview",y.value.join(",")))},{deep:!0}),q(L,()=>{ae||me||(x(),le(u.value,w.value,O.value))}),q(X,e=>{if(e){xt();return}M.value=""}),q(M,()=>{X.value&&x()}),q(()=>k.active,e=>{var t,n,s,i;f.value&&(e?(be(),(n=(t=f.value).resume)==null||n.call(t)):(i=(s=f.value).pause)==null||i.call(s))});function St(){var n;Q=new Zt;const e={progress:0};Q.instance.on("onProgress",(s,i,o)=>{const g=Math.floor(i/o*100);Qe.to(e,{progress:g,onUpdate:()=>{j.value=Math.floor(e.progress)}})});const t=()=>{C||fe||(fe=!0,be())};Q.instance.on("onLoad",t),(n=Q.ready)==null||n.then(t).catch(()=>{C||(E.value={type:"error",text:"地图资源加载失败"})})}function be(){C||!k.active||!fe||z||(z=!0,F&&window.clearTimeout(F),F=window.setTimeout(()=>{F=null,Be()},600))}function Be(e=0){return V(this,null,function*(){var n,s,i,o,g;if(C)return;if(!k.active){z=!1;return}if(yield ee(),!k.active){z=!1;return}if(!!((s=(n=f.value)==null?void 0:n.loadMap)!=null&&s.call(n,Q)||(o=(i=f.value)==null?void 0:i.hasMap)!=null&&o.call(i))){yield Kt(),yield ee(),(g=f.value)==null||g.play();return}if(e<24){window.setTimeout(()=>Be(e+1),120);return}z=!1})}function Tt(){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 Nt(){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}Tt(),z=!1,ee(()=>{be()})}a({refreshMapView:qe,resetMap:Nt});function ke(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 nn(e,s);C||i!==Ce||e===u.value&&(e!=="woodland"&&(s||"")!==(w.value||"")||Pt(o,e))})}function xt(e=!1){return V(this,null,function*(){if(!X.value)return;if(!e&&N.value.length){Ge();return}const t=++ge;Y.value="loading";try{const n=yield pn();if(C||t!==ge)return;N.value=n,Y.value=n.length?"success":"empty",Ge()}catch(n){if(C||t!==ge)return;N.value=[],M.value="",Y.value="error"}})}function Ge(){if(!N.value.length){M.value="";return}N.value.some(t=>t.key===M.value)||(M.value=N.value[N.value.length-1].key)}function Pt(e,t){var s,i,o;const n=Ct(e);$.value=n.core||[],H.value=n.left||{title:"业务统计",rows:[]},se.value=n.right||{title:"业务统计",rows:[]},K.value=(s=n.leftPanels)!=null&&s.length?n.leftPanels:[H.value],U.value=(i=n.rightPanels)!=null&&i.length?n.rightPanels:[se.value],te.value=n.status,ne.value=!1,T("topic-stats",{topicKey:t,topicName:Je(t).name,items:((o=n.top)!=null&&o.length?n.top:n.core||[]).slice(0,4)})}function Ct(e){return e||{}}function Re(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 je(e){return _e(e)?ht.value:Ve.value}function pe(e){const t=(e==null?void 0:e.properties)||{};return Object.keys(t).filter(s=>De(s,t[s])).length}function De(e,t){return t==null||t===""||Array.isArray(t)||typeof t=="object"?!1:!ut.has(String(e||"").toLowerCase())}function $t(){if(u.value==="overview"){const e=new Set(y.value);return ie.value.filter(t=>e.has(t.key)).slice().reverse()}return J.value?[J.value]:[]}function Mt(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 Ft(e={}){const t=ze(e.lng),n=ze(e.lat);return t===""||n===""?"":`POINT(${t} ${n})`}function ze(e){const t=Number(e);return Number.isFinite(t)?t.toFixed(8).replace(/\.?0+$/,""):""}function At(){return V(this,arguments,function*(e={}){var g,A,p,Z,ue,He;const t=Number((g=e==null?void 0:e.lngLat)==null?void 0:g.lng),n=Number((A=e==null?void 0:e.lngLat)==null?void 0:A.lat),s=$t();if(!Number.isFinite(t)||!Number.isFinite(n)||!s.length){x();return}const i=++W,o=e.screen||{x:960,y:540};h.value=null,d.value=null,v.value=!1,P.value=!0,(Z=(p=f.value)==null?void 0:p.clearSelectedFeature)==null||Z.call(p);try{for(const Ke of s){const oe=yield It(Ke,{lng:t,lat:n});if(i!==W||C)return;if(oe){d.value=oe,h.value=Le(oe,o),v.value=!1,(He=(ue=f.value)==null?void 0:ue.highlightFeature)==null||He.call(ue,oe,{highlightTone:"v21"});return}}i===W&&x()}catch(Ke){i===W&&x()}finally{i===W&&(P.value=!1)}})}function It(e,t){return V(this,null,function*(){const n=Mt(e);if(!n)return null;const s=Ft(t);let i=null;n==="grassland"?i=yield on({wkt:s}):n==="wetland"?i=yield cn({wkt:s}):n==="woodland"?i=yield an(s):n==="basicGrassland"&&(i=yield rn(s));const o=Vt(i,n);if(!Bt(o))return null;const g=Gt(o,e,t,n);return pe(g)>0?g:null})}function Vt(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 p of n){const Z=Et(p);if(Z)return Z}return null}function Et(e){return Array.isArray(e)?e.find(t=>t&&typeof t=="object")||null:e&&typeof e=="object"?e:null}function Bt(e){return!e||typeof e!="object"?!1:Array.isArray(e.dyColumn)&&e.dyColumn.some(qt)?!0:Object.keys(e).some(t=>De(t,e[t]))}function qt(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 Gt(e,t,n,s){const i=jt(e),o=Rt(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 Rt(e={}){return e.geometry||e.geom||e.wkt||e.the_geom||e.theGeom||e.geo||e.geometryWkt||e.geometry_wkt||e.shape||null}function jt(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=it[String((s==null?void 0:s.title)||"").trim()],g=String((s==null?void 0:s.field)||"").trim();[g,Dt(g),o].filter(Boolean).forEach(p=>{(t[p]===void 0||t[p]===null||t[p]==="")&&(t[p]=i)})}),t}function Dt(e){return String(e||"").replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function le(s,i){return V(this,arguments,function*(e,t,n=O.value){const o=++Pe;if(!t||!zt(t,n)){R.value=We(e,t);return}const g=yield sn(e,t,n);C||o!==Pe||e!==u.value||t!==w.value||((n==null?void 0:n.key)||"")===L.value&&(R.value=B(I({},g),{hideTownLabelStats:!0}))})}function zt(e,t=null){return!!(t!=null&&t.key)||rt.has(e)}function We(e,t){return{status:"disabled",topicKey:e,layerKey:t,title:"",unit:"",hideTownLabelStats:!0,rows:[]}}function Wt(e){var n,s;const t=(s=(n=e==null?void 0:e.feature)!=null?n:e)!=null?s:null;if(!t||pe(t)<=0){x();return}d.value=t,v.value=!1,h.value=Le(t,(e==null?void 0:e.screen)||h.value)}function Le(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 Ot(){if(!we.value||!d.value)return;const e=Le(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 Ht(e){E.value=e}function x(){var e,t;W+=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 Oe(e){if(!we.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 Kt(){return D.value?new Promise(e=>{Qe.to(".forest-grass-wet .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{D.value=!1,e()}})}):Promise.resolve()}return(e,t)=>(_(),S("div",En,[G(fn,{ref_key:"mapSceneRef",ref:f,"active-layer":mt.value,"map-ranking":R.value,"admin-boundary-line-scale":2.4,"initial-zoom":9.55,"max-zoom":21,"hide-town-label-stats":"","enable-imagery-feature-pick":!1,"enable-town-polygon-pick":!1,onFeatureLoading:t[0]||(t[0]=n=>P.value=n),onFeatureInfo:Wt,onMapClick:At,onLayerStatus:Ht,onViewChange:Ot},null,8,["active-layer","map-ranking"]),b("div",Bn,[b("div",qn,[b("div",Gn,[(_(!0),S(Ne,null,xe(K.value,n=>(_(),tt(st,{key:Re(n,"left"),class:de(["fgw-side-card left-card",{"is-double":_e(n)}]),title:n.title,width:Se(Ie),height:je(n)},{default:nt(()=>[G(et,{panel:n,compact:"","column-label-standard":"","visual-version":"v21"},null,8,["panel"])]),_:2},1032,["class","title","width","height"]))),128))])]),b("div",Rn,[b("div",jn,[(_(!0),S(Ne,null,xe(U.value,n=>(_(),tt(st,{key:Re(n,"right"),class:de(["fgw-side-card right-card",{"is-double":_e(n)}]),title:n.title,width:Se(Ie),height:je(n)},{default:nt(()=>[G(et,{panel:n,compact:"","column-label-standard":"","visual-version":"v21"},null,8,["panel"])]),_:2},1032,["class","title","width","height"]))),128))])]),gt.value?(_(),S("div",{key:0,class:"fgw-map-layer-tools",style:ve({height:`${Fe.value}px`})},[G(mn,{modelValue:$e.value,"onUpdate:modelValue":t[1]||(t[1]=n=>$e.value=n),"selected-legend-key":L.value,"onUpdate:selectedLegendKey":t[2]||(t[2]=n=>L.value=n),"topic-key":u.value,layers:re.value,legends:he.value,multiple:u.value==="overview",width:248,height:Fe.value,compact:Me.value},null,8,["modelValue","selected-legend-key","topic-key","layers","legends","multiple","height","compact"])],4)):ce("",!0),dt.value?(_(),S("div",Dn,[G(Vn,{modelValue:M.value,"onUpdate:modelValue":t[3]||(t[3]=n=>M.value=n),items:N.value,loading:Y.value==="loading"},null,8,["modelValue","items","loading"])])):ce("",!0),we.value?(_(),S("div",{key:2,class:"fgw-map-feature-info",style:ve(bt.value)},[G(hn,{title:kt.value,feature:d.value,empty:v.value,loading:P.value,width:Se(wt),height:yt.value,closable:"",onClose:x},null,8,["title","feature","empty","loading","width","height"])],4)):ce("",!0),b("div",zn,[G(gn,{modelValue:u.value,"onUpdate:modelValue":t[4]||(t[4]=n=>u.value=n)},null,8,["modelValue"])])]),D.value?(_(),S("div",Wn,[t[6]||(t[6]=kn('