gy-map
Version:
gy
2 lines • 280 kB
JavaScript
"use strict";var t,e,i,n,s,r,o,a,l,h,c,u,d,f,g,p,m,_,y,x,v,I,S,w,C,b,M,R,E,k,A,T,F,L,O,P,D,G,B,N,W,z,X,Z,Y,V,j,K,U,H,q,$,J,Q=Object.defineProperty,tt=(t,e,i)=>(((t,e,i)=>{e in t?Q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i})(t,"symbol"!=typeof e?e+"":e,i),i);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const et=require("vue-demi"),it=require("ol/Map"),nt=require("ol/layer/Tile"),st=require("ol/source/XYZ"),rt=require("ol/View"),ot=require("ol/Overlay"),at=require("ol/proj"),lt=require("@turf/turf"),ht=require("ol/interaction"),ct=require("vue"),ut=require("ol/style"),dt=require("ol/layer/Vector"),ft=require("ol/source/Vector"),gt=require("ol/format/GeoJSON"),pt=require("ol/geom/LineString"),mt=require("ol/Feature"),_t=require("ol/geom/Point"),yt=require("ol/geom"),xt=require("ol/source"),vt=require("ol/layer"),It=require("ol/events/condition"),St=t=>t&&"object"==typeof t&&"default"in t?t:{default:t};function wt(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const Ct=St(it),bt=St(nt),Mt=St(st),Rt=St(rt),Et=St(ot),kt=wt(lt),At=St(dt),Tt=St(ft),Ft=St(gt),Lt=St(pt),Ot=St(mt),Pt=St(_t);!function(){const t=Yt,e=Zt();for(;;)try{if(280488===parseInt(t(308))/1*(-parseInt(t(306))/2)+-parseInt(t(310))/3*(-parseInt(t(311))/4)+-parseInt(t(312))/5*(-parseInt(t(301))/6)+parseInt(t(304))/7+-parseInt(t(302))/8*(-parseInt(t(309))/9)+-parseInt(t(314))/10*(parseInt(t(307))/11)+-parseInt(t(313))/12*(-parseInt(t(305))/13))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Dt=52.35987755982988,Gt=3.141592653589793,Bt=6378245,Nt=.006693421622965943;function Wt(t,e){if(Kt(t,e))return[t,e];{let i=Vt(t-105,e-35),n=jt(t-105,e-35),s=e/180*Gt,r=Math.sin(s);r=1-Nt*r*r;let o=Math.sqrt(r);i=180*i/(Bt*(1-Nt)/(r*o)*Gt),n=180*n/(Bt/o*Math.cos(s)*Gt);return[t+n,e+i]}}function zt(t,e){const i=Yt;if(Kt(t,e))return[t,e];{let n=Vt(t-105,e-35),s=jt(t-105,e-35),r=e/180*Gt,o=Math.sin(r);o=1-Nt*o*o;let a=Math[i(300)](o);n=180*n/(Bt*(1-Nt)/(o*a)*Gt),s=180*s/(Bt/a*Math[i(303)](r)*Gt);return[2*t-(t+s),2*e-(e+n)]}}function Xt(t,e){const i=function(t,e){const i=Yt;let n=52.35987755982988,s=t-.0065,r=e-.006,o=Math[i(300)](s*s+r*r)-2e-5*Math[i(298)](r*n),a=Math.atan2(r,s)-3e-6*Math[i(303)](s*n);return[o*Math[i(303)](a),o*Math[i(298)](a)]}(t,e);return zt(i[0],i[1])}function Zt(){const t=["11WNqKBi","528290EgbWAB","9uBozkL","1131ZiGxPv","1828lcOFci","360UmyGGn","26844RsZnDb","2061830jvgMee","sin","abs","sqrt","462hjbmVB","3629328uWxCSt","cos","413679sSNnIy","1885UgYlnt","2nEbYZU"];return(Zt=function(){return t})()}function Yt(t,e){const i=Zt();return(Yt=function(t,e){return i[t-=298]})(t,e)}function Vt(t,e){const i=Yt;let n=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math[i(300)](Math[i(299)](t));return n+=2*(20*Math[i(298)](6*t*Gt)+20*Math.sin(2*t*Gt))/3,n+=2*(20*Math.sin(e*Gt)+40*Math.sin(e/3*Gt))/3,n+=2*(160*Math[i(298)](e/12*Gt)+320*Math.sin(e*Gt/30))/3,n}function jt(t,e){const i=Yt;let n=300+t+2*e+.1*t*t+.1*t*e+.1*Math[i(300)](Math[i(299)](t));return n+=2*(20*Math.sin(6*t*Gt)+20*Math[i(298)](2*t*Gt))/3,n+=2*(20*Math.sin(t*Gt)+40*Math.sin(t/3*Gt))/3,n+=2*(150*Math[i(298)](t/12*Gt)+300*Math.sin(t/30*Gt))/3,n}function Kt(t,e){return t<72.004||t>137.8347||e<.8293||e>55.8271||!1}function Ut(){const t=["length","98919ovNQOZ","geometry","MultiPolygon","coordinates","1455704WBWcvD","split","toUpperCase","buffer","179126iqlhEI","toString","413238mNbPuz","meters","max","Polygon","lineString","point","3366282KUQpyy","1119181JkiBdc","BD09","GCJ02","8nQTfor","isArray","1943860RjgGmg","type"];return(Ut=function(){return t})()}!function(){const t=Jt,e=Ut();for(;;)try{if(294460===parseInt(t(153))/1+parseInt(t(136))/2+parseInt(t(138))/3+-parseInt(t(157))/4+-parseInt(t(150))/5+parseInt(t(144))/6+parseInt(t(145))/7*(parseInt(t(148))/8))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();let Ht="WGS84";const qt=t=>{Ht=t},$t=(t,e)=>Array[Jt(149)](t)?$t(t[0],t[1]):e?at.fromLonLat(Qt(t,e,Ht)):[];function Jt(t,e){const i=Ut();return(Jt=function(t,e){return i[t-=133]})(t,e)}const Qt=(t,e,i)=>{const n=Jt;return t=+t,e=+e,(i=i[n(134)]())===n(147)?zt(t,e):i===n(146)?Xt(t,e):[t,e]},te={formatLonLatToPosition:$t,flortAdd:(t,e)=>{const i=Jt;let n,s,r;try{n=t[i(137)]()[i(133)](".")[1][i(152)]}catch(o){n=0}try{s=e[i(137)]().split(".")[1][i(152)]}catch(a){s=0}return r=Math.pow(10,Math[i(140)](n,s)),Math.round(t*r+e*r)/r},gcj02towgs84:zt,bd09towgs84:Xt,wgs84tobd09:function(t,e){const i=Wt(t,e);return function(t,e){const i=Yt;let n=Math[i(300)](t*t+e*e)+2e-5*Math[i(298)](e*Dt),s=Math.atan2(e,t)+3e-6*Math[i(303)](t*Dt);return[n*Math.cos(s)+.0065,n*Math[i(298)](s)+.006]}(i[0],i[1])},wgs84togcj02:Wt,lonlatToWGS84:(t,e,i)=>{const n=Jt;return t=+t,e=+e,"GCJ02"===(i=i[n(134)]())?zt(t,e):i===n(146)?Xt(t,e):[t,e]},wGS84ToLonlat:Qt,setMapLonLatType:qt,getBufferArea:(t,e=200)=>{const i=Jt;if(0===t[i(152)]||0===e)return[];let n;n=1===t[i(152)]?kt[i(143)](t[0]):t[0][0]===t[t.length-1][0]&&t[0][1]===t[t[i(152)]-1][1]?kt.polygon([t]):kt[i(142)](t);let s=kt[i(135)](n,e,{units:i(139)});return s[i(154)][i(151)]===i(141)?s.geometry[i(156)][0]:s[i(154)][i(151)]===i(155)?s[i(154)][i(156)][0][0]:[]}},ee=ie;function ie(t,e){const i=se();return(ie=function(t,e){return i[t-=402]})(t,e)}!function(){const t=ie,e=se();for(;;)try{if(956332===-parseInt(t(411))/1*(-parseInt(t(414))/2)+-parseInt(t(429))/3*(parseInt(t(402))/4)+parseInt(t(428))/5*(parseInt(t(403))/6)+parseInt(t(420))/7*(-parseInt(t(410))/8)+-parseInt(t(405))/9+parseInt(t(417))/10+parseInt(t(423))/11*(parseInt(t(419))/12))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const ne=et.defineComponent({name:ee(413),props:{mapOpt:{type:Object,default:()=>({})},center:{type:Array,default:()=>[]},maplayerIndex:{type:Number,default:0},zoom:{type:Number,default:0},layerOpacity:{type:Number,default:1},mapId:{type:String,default:ee(406)},lonlatType:{type:String,default:"WGS84"},interactionsObj:{type:Object,default:()=>({})},isShowControls:{type:Boolean,default:!1}},setup(t){const e=ee,i=Rd(t[e(422)])[e(408)];qt(t.lonlatType),et.onMounted((()=>{const n=e;i[n(418)](t[n(422)],{...t[n(407)],maplayerIndex:t[n(426)],zoom:t[n(412)],centerPoint:t.center,layerOpacity:t[n(430)],interactionsObj:t[n(409)],isShowControls:t[n(427)]})}));return et.watch((()=>t[e(412)]),(t=>{i&&i[e(416)](t)})),et.watch((()=>t[e(426)]),(t=>{i&&i[e(431)](t)})),et.watch((()=>t[e(415)]),(t=>{i&&i[e(404)](t)})),et.watch((()=>t.layerOpacity),(t=>{i&&i[e(424)](t)})),et.onBeforeUnmount((()=>{i&&i.destory()})),{id:t[e(422)],gyMapObj:i,mouseenterFun:()=>{const i=e,n=document[i(421)](t[i(422)]);n&&n[i(425)]()}}}});function se(){const t=["center","zoomSetFun","10244140rELMTK","init","12NfMnqr","721AqOcFA","getElementById","mapId","14063654xRySPu","setLayerOpacity","focus","maplayerIndex","isShowControls","531745YkTnBv","9tTVXIy","layerOpacity","changeMapLayer","1959312AsOLrU","78lTpAfV","changeCenterPoint","8083557FTMczi","map","mapOpt","value","interactionsObj","116536mMfeiT","1RxqXFF","zoom","Gymap","2277850HjRdfB"];return(se=function(){return t})()}const re=(t,e)=>{const i=t.__vccOpts||t;for(const[n,s]of e)i[n]=s;return i},oe=["id"];const ae=re(ne,[["render",function(t,e,i,n,s,r){return ct.openBlock(),ct.createElementBlock("div",{id:t.mapId,class:"map divMap",tabindex:"0",onMouseenter:e[0]||(e[0]=(...e)=>t.mouseenterFun&&t.mouseenterFun(...e))},[ct.renderSlot(t.$slots,"default",{},void 0,!0)],40,oe)}],["__scopeId","data-v-6efe64ac"]]);function le(){var t=["9488560ujNhGr","527919xvxrme","18YPMOkG","126625nKKctx","32BmZkfq","1288134uasLtN","609628EUrzbm","2910132bAWWaK","6WVvBEv","166445VYDiLO"];return(le=function(){return t})()}function he(t,e){var i=le();return(he=function(t,e){return i[t-=327]})(t,e)}function ce(){const t=["5254564MtyeJt","3ttXgyj","2002928iJWuPI","zoom","drawHtmlToMap","mapId","153BHjCOi","value","$parent","minZoom","setOffset","destory","25379230sofXqp","241208HAtkiV","3443260tbxTIB","position","offset","maxZoom","stopEvent","535627BzSeBd","152016EckYAw","setPosition","2cBhkHT","removeOverlay","mapFinish"];return(ce=function(){return t})()}function ue(t,e){const i=ce();return(ue=function(t,e){return i[t-=324]})(t,e)}!function(){for(var t=he,e=le();;)try{if(542788===-parseInt(t(334))/1+parseInt(t(331))/2*(parseInt(t(333))/3)+parseInt(t(332))/4+-parseInt(t(328))/5+parseInt(t(327))/6*(-parseInt(t(336))/7)+-parseInt(t(329))/8*(-parseInt(t(330))/9)+-parseInt(t(335))/10)break;e.push(e.shift())}catch(i){e.push(e.shift())}}(),function(){const t=ue,e=ce();for(;;)try{if(424971===-parseInt(t(339))/1*(-parseInt(t(342))/2)+parseInt(t(346))/3*(parseInt(t(347))/4)+parseInt(t(334))/5+-parseInt(t(340))/6+parseInt(t(345))/7+parseInt(t(333))/8*(parseInt(t(326))/9)+-parseInt(t(332))/10)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const de=et.defineComponent({name:"GymapHtml",props:{offset:{type:Array,default:()=>[0,0]},position:{type:Array,default:()=>[]},stopEvent:{type:Boolean,default:!0},className:{type:String,default:""},maxZoom:{type:Number,default:18},minZoom:{type:Number,default:0},mapId:{type:String,default:""}},setup(t){const e=ue,i=et.ref(null),{proxy:n}=et.getCurrentInstance(),s=t[e(325)]||n[e(328)].id,r=Rd(s).value,o=et.computed((()=>r&&r[e(344)])),a=et.computed((()=>r&&r[e(348)]));let l=!1;et.watch(o,(()=>{d()}));let h=!1;const c=i=>{const n=e;i>t[n(337)]||i<t[n(329)]?(h=!0,u&&u[n(341)](void 0)):h&&(h=!1,f(t.position))};et.watch(a,(t=>{c(t)}));let u=null;const d=()=>{const s=e;if(o.value&&!l){l=!0,u=r[s(324)](i[s(327)],{offset:t[s(336)],position:t[s(335)],stopEvent:t[s(338)],className:t.className}),c(a[s(327)]);const e=n[s(328)].runTask;e&&e(u,t)}};et.onMounted((()=>{d()}));const f=t=>{const i=e;let n=te.formatLonLatToPosition(t);u&&u[i(341)](n)};return et.watch((()=>t[e(335)]),(t=>{const i=e;f(t),c(a[i(327)])})),et.watch((()=>t[e(336)]),(t=>{u&&u[e(330)](t)})),et.onBeforeUnmount((()=>{const t=e;u&&r&&r[t(343)](u);const i=n[t(328)][t(331)];i&&i()})),{htmlDom:i,mapId:s,gyMapObj:r,mapFinish:o}}}),fe={class:"GymapHtml",ref:"htmlDom"};const ge=re(de,[["render",function(t,e,i,n,s,r){return ct.openBlock(),ct.createElementBlock("div",fe,[ct.renderSlot(t.$slots,"default")],512)}]]);function pe(t,e){var i=me();return(pe=function(t,e){return i[t-=238]})(t,e)}function me(){var t=["40HGdMvg","12bbtQZp","322570TOZRmJ","2776JBuoCt","81uItVdS","180740iiRrKP","42876XrDGGV","7726516wTLlPX","1928WeeAea","22dmamaH","695NtjFVC","51978xAgaGT","19509243RBiubO"];return(me=function(){return t})()}!function(){for(var t=pe,e=me();;)try{if(615329===parseInt(t(249))/1*(-parseInt(t(246))/2)+parseInt(t(250))/3*(-parseInt(t(238))/4)+parseInt(t(243))/5*(parseInt(t(244))/6)+parseInt(t(240))/7+-parseInt(t(241))/8*(-parseInt(t(239))/9)+parseInt(t(248))/10*(-parseInt(t(242))/11)+parseInt(t(247))/12*(-parseInt(t(245))/13))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const _e=xe;function ye(){const t=["formatLonLatToPosition","2175592OULmLx","fillColor","12448288SvTdfa","GymapPolygon","name","isArray","1098cqwQJJ","setMaxZoom","666300ATOBAN","$parent","getFeatures","minZoom","rgba(0, 0, 255, 0.1)","strokeWidth","removeLayer","value","427424GGOXmn","mapId","opacity","mapFinish","maxZoom","409922bIYKzF","Polygon","clickFun","FeatureCollection","586479kZlgMe","map","setMinZoom","setStyle","click","strokeColor","749UIcPsY","positionList"];return(ye=function(){return t})()}function xe(t,e){const i=ye();return(xe=function(t,e){return i[t-=188]})(t,e)}!function(){const t=xe,e=ye();for(;;)try{if(306690===-parseInt(t(208))/1+-parseInt(t(203))/2+-parseInt(t(212))/3+-parseInt(t(221))/4+parseInt(t(195))/5+-parseInt(t(193))/6*(parseInt(t(218))/7)+parseInt(t(189))/8)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const ve=re(et.defineComponent({name:_e(190),props:{positionList:{type:Array,default:()=>[]},className:{type:String},fillColor:{type:String,default:_e(199)},strokeColor:{type:String,default:""},strokeWidth:{type:Number,default:3},minZoom:{type:Number,default:1},maxZoom:{type:Number,default:18},opacity:{type:Number,default:1},mapId:{type:String,default:""}},emits:["clickFun"],setup(t,{emit:e}){const i=_e,{proxy:n}=et.getCurrentInstance(),s=t[i(204)]||n[i(196)].id,r=Rd(s),o=et.computed((()=>r[i(202)]&&r[i(202)][i(206)]));let a=null,l=!1;et.watch(o,(()=>{u()})),et.onMounted((()=>{u()}));const h=()=>{const n=i,s=(()=>{const e=i;let n=t[e(219)],s=n[0],r=[];return r=s&&!Array[e(192)](s[0])?[n]:n,r[e(213)]((t=>{const i=e;let n=t[i(213)]((t=>te[i(220)](t)));return{type:"Feature",geometry:{type:i(209),coordinates:[n]}}}))})();if(!s)return;const r={type:n(211),crs:{type:n(191),properties:{name:"EPSG:3857"}},features:s},o=new Tt.default({features:(new Ft.default).readFeatures(r)});let a=o[n(197)]()[0]||null;return a&&a.on(n(216),(t=>{e(n(210),t)})),o},c=()=>{const e=i;return new ut.Style({stroke:t[e(217)]?new ut.Stroke({color:t[e(217)],width:t[e(200)]}):null,fill:t[e(188)]?new ut.Fill({color:t[e(188)]}):null})},u=()=>{const e=i;if(!o[e(202)]||l)return;l=!0;const n=h();if(!n)return;const s=c();a=new At.default({source:n,style:[s],minZoom:t.minZoom,maxZoom:t[e(207)],opacity:t[e(205)]}),r[e(202)][e(213)].addLayer(a)};et.watch((()=>t[i(219)]),(()=>{const t=h();t&&a&&a.setSource(t)}),{deep:!0}),et.watch([()=>t[i(217)],()=>t[i(200)],()=>t.fillColor],(()=>{const t=i,e=c();a&&a[t(215)](e)})),et.watch((()=>t[i(205)]),(t=>{a&&a.setOpacity(t)})),et.watch((()=>t[i(198)]),(t=>{a&&a[i(214)](t)})),et.watch((()=>t[i(207)]),(t=>{a&&a[i(194)](t)}));et.onBeforeUnmount((()=>{(()=>{const t=i;a&&(r.value&&r[t(202)].map[t(201)](a),a=null)})()}))}}),[["render",function(t,e,i,n,s,r){return null}]]);function Ie(t,e){var i=Se();return(Ie=function(t,e){return i[t-=264]})(t,e)}function Se(){var t=["3391HhfWgf","1197681HoSuUr","117DeYZHW","3813955TiMfqR","4pzsnJL","12234600ayEBBZ","1140IiTXni","30919upuWKj","9295drKtKV","235032PbSUNI","10770isybUc","52phmGBs"];return(Se=function(){return t})()}!function(){for(var t=Ie,e=Se();;)try{if(507064===parseInt(t(270))/1*(-parseInt(t(269))/2)+parseInt(t(271))/3+parseInt(t(274))/4*(parseInt(t(273))/5)+-parseInt(t(264))/6*(parseInt(t(265))/7)+parseInt(t(267))/8*(parseInt(t(272))/9)+-parseInt(t(268))/10*(-parseInt(t(266))/11)+-parseInt(t(275))/12)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const we=Ce;function Ce(t,e){const i=be();return(Ce=function(t,e){return i[t-=240]})(t,e)}!function(){const t=Ce,e=be();for(;;)try{if(779643===parseInt(t(243))/1*(parseInt(t(254))/2)+-parseInt(t(240))/3+-parseInt(t(262))/4*(parseInt(t(263))/5)+parseInt(t(241))/6+-parseInt(t(267))/7*(-parseInt(t(265))/8)+parseInt(t(272))/9+parseInt(t(269))/10)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();function be(){const t=["loop","click","setMaxZoom","633134RsGYRc","clickFun","min","step","requestAnimationFrame","boolean","$parent","forEachSegment","4629844TdmFZa","5OPJymX","GymapLine","16uUROWB","arrowStep","3936457VWKeyX","getCoordinateAt","491980ZzfvRD","maxZoom","minZoom","7278264yVYldP","length","setGeometry","push","strokeWidth","animate","formatLonLatToPosition","atan2","arrow","getGeometry","mapFinish","4637010XNKFcW","7101666NvNacd","map","1mTYToF","setStyle","strokeColor","arrowAnchor","positionList","value","removeLayer","setOpacity"];return(be=function(){return t})()}const Me=re(et.defineComponent({name:we(264),props:{positionList:{type:Array,default:()=>[]},strokeColor:{type:String,default:"blue"},strokeWidth:{type:Number,default:3},minZoom:{type:Number,default:1},maxZoom:{type:Number,default:18},opacity:{type:Number,default:1},arrow:{type:[Boolean,String],default:!1},arrowAnchor:{type:Array,default:()=>[.75,.5]},animate:{type:Boolean,default:!1},step:{type:Number,default:.001},loop:{type:Boolean,default:!1},arrowStep:{type:Number,default:20},mapId:{type:String,default:""}},emits:["clickFun"],setup(t,{emit:e}){const i=we,{proxy:n}=et.getCurrentInstance(),s=t.mapId||n[i(260)].id,r=Rd(s),o=et.computed((()=>r[i(248)]&&r[i(248)][i(282)]));let a=null,l=null,h=!1,c=null,u=null,d=null,f=[],g=null,p=0,m=null;et.watch(o,(()=>{v()})),et.onMounted((()=>{v()}));const _=t=>{const e=i;let n=t[e(242)]((t=>te[e(278)](t)));return new Lt.default(n)},y=()=>{const n=i;if(l=(()=>{const n=i;let s=t.positionList;return t[n(277)]&&(s=[]),d=_(s),m=new Ot.default({type:"lineStyle",geometry:d}),m.on(n(252),(t=>{e(n(255),t)})),m})(),l[n(244)](c),l)return new Tt.default({features:[l]})},x=function(e){const n=i,s=e[n(281)](),r=[new ut.Style({stroke:new ut.Stroke({color:t[n(245)],width:t[n(276)]})})];if(t[n(280)]){let e=0,i=t.step;i=Math[n(256)](i,.01),s[n(261)]((function(s,o){const a=n,l=o[0]-s[0],h=o[1]-s[1],c=Math[a(279)](h,l);e++;let u=Math.min(t[a(266)],1/i);if(!t[a(277)]||e%(1/i/u)==0){let e=null;e=typeof t[a(280)]===a(259)?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAATCAMAAACTKxybAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAHJQTFRF//////8A//8A/6pV/79A/8wz/9Ur/9Eu/8Q7/8wz/9It/8k2/9Eu/8o1/9Av/8o1/84x/8wz/8wz/8wz/8wz/8wz/8s0/8wz/8s0/8wz/8wz/8wz/8wz/8s0/8wz/8wz/8wz/8wz/8wz/8wz/8wz/8wzo2lg3QAAACV0Uk5TAAECAwQFBgsNDxETFhgbHUNGm6Ckqa2usrW+w8fLztLV1tnc9jtYQ+sAAABdSURBVAjXZc9HDsAwCARAp/fee+X/X8wesIQVbiMELEqVU6B0VS8tocZARGvE8Edoi1leD+0Jy+2gI2U5LXRmLLuB7pxl1dBT6N4Fzf+OnJHb5B2ZwMhmpDb+kZ9+tBQLxwwvvoMAAAAASUVORK5CYII=":t.arrow,r[a(275)](new ut.Style({geometry:new Pt.default(o),image:new ut.Icon({src:e,anchor:t[a(246)],rotateWithView:!0,rotation:-c})}))}}))}return r},v=()=>{const e=i;if(!o.value||h)return;h=!0,c=x,C();const n=y();n&&(a=new At.default({source:n,minZoom:t[e(271)],maxZoom:t[e(270)],opacity:t.opacity}),r[e(248)][e(242)].addLayer(a),t[e(277)]&&(u=_(t[e(247)]),I()))},I=()=>{const e=i;if(f[e(275)](u[e(268)](Math[e(256)](p,1))),S(),p>1)return C(),void(t[e(251)]&&(f=[],p=0,I()));let n=t[e(257)];n=Math[e(256)](n,.01),p+=n,g=window[e(258)](I)},S=()=>{const e=i;let n=null;n=t[e(277)]?new Lt.default(f):_(t.positionList),m&&m[e(274)](n)},w=()=>{const t=i;a&&(r[t(248)]&&r.value[t(242)][t(249)](a),a=null),C()},C=()=>{g&&window.cancelAnimationFrame(g)};et.watch((()=>t[i(247)]),(t=>{S()})),et.watch((()=>t.opacity),(t=>{a&&a[i(250)](t)})),et.watch((()=>t[i(277)]),(t=>{h=!1,w(),v()})),et.watch((()=>t[i(271)]),(t=>{a&&a.setMinZoom(t)})),et.watch((()=>t[i(270)]),(t=>{a&&a[i(253)](t)})),et.watch([()=>t[i(245)],()=>t[i(245)],()=>t[i(280)]],(()=>{c=x,l&&l.setStyle(c)})),et.onBeforeUnmount((()=>{w()}))}}),[["render",function(t,e,i,n,s,r){return null}]]);function Re(){var t=["6331213zPwWAQ","231184ZUBXzV","67698XosWFK","409962Hutrbm","5uKCaBj","8xcSivt","718452uqRoKd","15320232ypPYTe","2383908XmFoUl","21zsYzoC","110oThGfH","11UuaCrY"];return(Re=function(){return t})()}function Ee(t,e){var i=Re();return(Ee=function(t,e){return i[t-=215]})(t,e)}!function(){for(var t=Ee,e=Re();;)try{if(489896===parseInt(t(222))/1+parseInt(t(223))/2*(parseInt(t(218))/3)+parseInt(t(217))/4*(parseInt(t(225))/5)+-parseInt(t(224))/6+parseInt(t(221))/7*(-parseInt(t(226))/8)+parseInt(t(215))/9*(-parseInt(t(219))/10)+parseInt(t(220))/11*(parseInt(t(216))/12))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const ke=Ae;function Ae(t,e){const i=Te();return(Ae=function(t,e){return i[t-=395]})(t,e)}!function(){const t=Ae,e=Te();for(;;)try{if(819447===-parseInt(t(395))/1+parseInt(t(413))/2+-parseInt(t(421))/3+-parseInt(t(424))/4+parseInt(t(403))/5*(-parseInt(t(411))/6)+-parseInt(t(401))/7*(-parseInt(t(418))/8)+parseInt(t(397))/9)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();function Te(){const t=["length","positionList","6pEeKWl","map","3121500QeQBHa","LONLAT","position","animate","pause","3699832mEijkQ","animateDataType","type","2169180YjyHgq","play","$slots","381944HDXkuZ","setPosition","823391jclGAx","GymapTask","9462420mIxjRW","stop","loop","delay","7VlrbIO","default","3066125XovvqK","min","getCoordinateAt","GymapTask组件中只允许存在一个需要执行动画的组件。","requestAnimationFrame","taskStatus"];return(Te=function(){return t})()}const Fe=re(et.defineComponent({name:ke(396),props:{mapId:{type:String,default:""},positionList:{type:Array,default:()=>[]},loop:{type:Boolean,default:!1},step:{type:Number,default:.001},taskStatus:{type:String,default:"play"},delay:{type:Number,default:3e3},animateDataType:{type:String,default:ke(414)}},emits:[ke(416)],setup(t,{emit:e}){const i=ke,{proxy:n}=et.getCurrentInstance(),s=t.mapId||n.$parent.id;let r,o=!0,a=!1,l=null,h=null;const c=(e,i)=>{const n=Ae;o&&(!a&&(!l&&(l=et.watch((()=>i[n(415)]),(()=>{f=0,_()}))),h=e),"play"===t[n(408)]&&d(),0!==t[n(400)]&&(r=setTimeout((()=>{d()}),t[n(400)])))};et.watch((()=>t[i(408)]),(t=>{const e=i;t===e(422)?d():t===e(398)?(f=0,m()):t===e(417)&&m()}));let u=null;const d=()=>{const e=i;r&&(clearTimeout(r),r=null),(a||h)&&(g||(!u&&(u=(t=>{let e=t[i(412)]((t=>te.formatLonLatToPosition(t)));return new Lt.default(e)})(t[e(410)])),p()))};let f=0,g=null;const p=()=>{const n=i;let s=u[n(405)](Math[n(404)](f,1));if(!a&&(h.geometry?h.geometry.setCoordinates(s):h[n(425)](s)),t[n(419)]===n(414)&&(s=at.toLonLat(s)),e("animate",s,f),f>1)return m(),void(t[n(399)]&&(f=0,p()));let r=t.step;f=te.flortAdd(f,r),g=window[n(407)](p)},m=()=>{l&&l(),g&&window.cancelAnimationFrame(g),g=null},_=()=>{r&&(clearTimeout(r),r=null),m()};return et.onBeforeMount((()=>{const t=i;let e=n[t(423)][t(402)];if(e){let e=n[t(423)][t(402)](),i=0;for(let n=0;n<e[t(409)];n++){if("symbol"!=typeof e[n][t(420)]&&(i++,i>1)){o=!1;break}}}else!e&&(a=!0,c())})),et.onMounted((()=>{a&&c()})),{id:s,runTask:c,destory:_}}}),[["render",function(t,e,i,n,s,r){return ct.openBlock(),ct.createElementBlock("div",null,[ct.renderSlot(t.$slots,"default")])}]]);function Le(){var t=["3eCyPtQ","651399HWppKE","2718202DQnWOi","5634607KTkoXf","3970rGcrqR","1bCDfOA","4886416jcbXzw","17989068PGIZOe","12510NxsckX","84BeKMkM","153345ZAbeMy","88gIDalB"];return(Le=function(){return t})()}function Oe(t,e){var i=Le();return(Oe=function(t,e){return i[t-=374]})(t,e)}!function(){for(var t=Oe,e=Le();;)try{if(727738===-parseInt(t(380))/1*(parseInt(t(377))/2)+-parseInt(t(375))/3*(-parseInt(t(381))/4)+-parseInt(t(385))/5*(-parseInt(t(384))/6)+-parseInt(t(376))/7*(parseInt(t(374))/8)+parseInt(t(383))/9*(-parseInt(t(379))/10)+parseInt(t(378))/11+parseInt(t(382))/12)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Pe=Be;function De(){const t=["zIndex","stylesObj","setOpacity","clusterSource","addLayerToMap","value","removeLayer","maxZoom","emit","setStyle","157428EQHKPP","isDraw","otherOpts","getFeatures","2472660nLguBD","setGeoPosition","mapId","olPositions","addFeature","click","gyMapObj","10701Djakna","48eGuyog","geometry","feature","map","mapFinish","layer","670911rcNKVA","4LUNOpI","getStyle","91kQHgRu","minZoom","opacity","clickFun","getGeometry","12012hYLCOx","source","init","addWatchFun","addPropsWatch","setMinZoom","declutter","addLayer","style","addSource","draw","222739DdQyEc","1669255XTfoZl","imageSource"];return(De=function(){return t})()}!function(){const t=Be,e=De();for(;;)try{if(314623===parseInt(t(355))/1*(parseInt(t(337))/2)+-parseInt(t(336))/3+parseInt(t(368))/4+parseInt(t(356))/5+-parseInt(t(344))/6*(parseInt(t(339))/7)+-parseInt(t(330))/8*(parseInt(t(329))/9)+-parseInt(t(372))/10)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();class Ge{constructor(p,m,_,y,x){tt(this,t),tt(this,e),tt(this,i),tt(this,n),tt(this,"source"),tt(this,s),tt(this,r),tt(this,o),tt(this,a),tt(this,l),tt(this,h),tt(this,"declutter"),tt(this,c),tt(this,u),tt(this,d),tt(this,f),tt(this,g),tt(this,"emit"),tt(this,"otherOpts");const v=Pe;this[v(352)]=void 0,this[v(331)]=void 0,this[v(332)]=new Ot.default,this[v(374)]="",this.source=void 0,this.layer=null,this[v(361)]=y,this[v(370)]=x||{},this[v(340)]=et.computed((()=>m.minZoom)),this[v(365)]=et.computed((()=>m[v(365)])),this[v(341)]=et.computed((()=>m[v(341)])),this[v(375)]=et.computed((()=>m.position)),this[v(350)]=m[v(350)],this[v(359)]=m,this[v(358)]=void 0,this[v(328)]=Rd(p),this[v(334)]=et.computed((()=>this.gyMapObj[v(363)]&&this[v(328)][v(363)][v(334)])),this.isDraw=!1,this[v(366)]=_||null}[(t=Pe(352),e=Pe(331),i=Pe(332),n=Pe(374),s=Pe(335),r=Pe(361),o=Pe(340),a=Pe(365),l=Pe(375),h=Pe(341),c=Pe(358),u=Pe(359),d=Pe(328),f=Pe(334),g=Pe(369),Pe(346))](){}[Pe(354)](){const t=Pe;this.geometry=this.getGeometry(),this.addFeature(),this[t(367)](),this[t(353)](),this[t(351)](),this[t(347)](),this[t(362)]()}[Pe(326)](){const t=Pe;this[t(332)]=new Ot.default({geometry:this[t(331)]}),this[t(332)].on(t(327),(e=>{const i=t;this.emit&&this[i(366)](i(342),e)}))}addSource(){const t=Pe;this[t(345)]=new Tt.default({features:[this[t(332)]]})}[Pe(351)](){const t=Pe;this[t(335)]=new At.default({source:this[t(345)],declutter:this[t(350)],minZoom:this[t(340)].value,maxZoom:this[t(365)][t(363)],opacity:this[t(341)][t(363)]})}addLayerToMap(){var t,e,i;const n=Pe;if(!this[n(369)]&&this[n(334)].value){let s=this[n(370)]&&this[n(370)][n(357)];if(s){let e=s[n(371)]()[0][n(338)](),i=null==(t=this[n(338)]())?void 0:t.getText();e&&i&&e.setText(i)}else this[n(361)]?this[n(361)].addFeature(this[n(332)]):(this[n(369)]=!0,null==(i=null==(e=this[n(328)][n(363)])?void 0:e.map)||i[n(351)](this.layer))}}[Pe(347)](){const t=Pe;et.watch(this[t(334)],(t=>{this.addLayerToMap()})),this.addLayerWatch(),this[t(348)]()}addLayerWatch(){const t=Pe;et.watch(this[t(340)],(e=>{var i;const n=t;null==(i=this[n(335)])||i[n(349)](e)})),et.watch(this[t(365)],(e=>{var i;null==(i=this[t(335)])||i.setMaxZoom(e)})),et.watch(this[t(341)],(e=>{var i;const n=t;null==(i=this[n(335)])||i[n(360)](e)})),et.watch(this[t(375)],(e=>{this[t(373)](e)}))}addPropsWatch(){const t=Pe;et.watch(this[t(359)],(()=>{this[t(367)]()}))}[Pe(343)](){}[Pe(373)](t){}[Pe(338)](){}[Pe(367)](){const t=Pe;this[t(352)]=this.getStyle(),this[t(352)]&&this.feature&&this[t(332)][t(367)](this[t(352)])}destory(){var t,e;const i=Pe;null==(e=null==(t=this.gyMapObj[i(363)])?void 0:t[i(333)])||e[i(364)](this[i(335)]),this.layer=null,this[i(369)]=!1}}function Be(t,e){const i=De();return(Be=function(t,e){return i[t-=326]})(t,e)}const Ne={isAuto:{type:Boolean,default:!1},declutter:{type:Boolean,default:!1},minZoom:{type:Number,default:1},maxZoom:{type:Number,default:18},opacity:{type:Number,default:1}};function We(t,e){const i=Xe();return(We=function(t,e){return i[t-=173]})(t,e)}const ze=We;function Xe(){const t=["formatLonLatToPosition","pow","479695NWxEFY","629552JhEENz","454644xzWFLm","45541eMlEAl","strokeWidth","scale","lineDash","getStyle","616820HWSnqc","getImage","33TMwpdh","692360MePfcp","rotation","geometry","18ivAfdo","fillColor","2DbngnG","draw","strokeColor","position","radius","186256GsePAX","isAuto","6zGjNgA","value"];return(Xe=function(){return t})()}!function(){const t=We,e=Xe();for(;;)try{if(108480===-parseInt(t(185))/1*(parseInt(t(198))/2)+-parseInt(t(184))/3+parseInt(t(193))/4+-parseInt(t(182))/5*(parseInt(t(178))/6)+parseInt(t(183))/7+-parseInt(t(176))/8*(parseInt(t(196))/9)+parseInt(t(190))/10*(parseInt(t(192))/11))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();class Ze extends Ge{constructor(t,e,i,n,s){const r=ze;super(t,i,n,s),tt(this,p),tt(this,m),tt(this,_),tt(this,y),tt(this,x),tt(this,"radius"),tt(this,v),tt(this,I),tt(this,S),this.position=et.computed((()=>te[r(180)](e))),this[r(197)]=et.computed((()=>i[r(197)])),this[r(173)]=et.computed((()=>i[r(173)])),this[r(186)]=et.computed((()=>i[r(186)])),this[r(175)]=et.computed((()=>i.radius)),this[r(188)]=et.computed((()=>i[r(188)])),this[r(187)]=et.computed((()=>i[r(187)])),this[r(194)]=et.computed((()=>i[r(194)])),this[r(177)]=et.computed((()=>i[r(177)])),this[r(199)]()}[(p=ze(174),m=ze(197),_=ze(173),y=ze(186),x=ze(188),v=ze(187),I=ze(194),S=ze(177),"getGeometry")](){return new yt.Point(this.position.value)}setGeoPosition(t){const e=ze;this[e(195)].setCoordinates(te[e(180)](t))}[ze(189)](){const t=ze,e=new ut.Style({image:new ut.Circle({radius:this[t(175)][t(179)]||5,fill:this[t(197)][t(179)]?new ut.Fill({color:this[t(197)][t(179)]}):void 0,stroke:this[t(173)].value?new ut.Stroke({color:this.strokeColor[t(179)],width:this[t(186)][t(179)]}):void 0,scale:this.scale[t(179)],rotation:this[t(194)].value})});return this.isAuto[t(179)]?(i,n)=>{const s=t;return e[s(191)]().setScale(1/Math[s(181)](n,1)),e}:e}}const Ye={...Ne,position:{type:Array,default:()=>[]},fillColor:{type:String,default:""},strokeColor:{type:String,default:""},strokeWidth:{type:Number,default:3},scale:{type:[Number,Array],default:1},radius:{type:Number,default:5},rotation:{type:Number,default:0},mapId:{type:String,default:""}},Ve=Ke;function je(){const t=["472TJwbOs","clickFun","24390LrcyQk","286kQHblN","183294JTPqIG","clusterSource","4VbgKCl","293vKQEwx","$parent","position","215400imEIiX","1148umgIvC","91vJPxQZ","795102arzbFd","destory","35070PifsOY","GymapCircle","runTask","25tEFyOj","467709tKISLX"];return(je=function(){return t})()}function Ke(t,e){const i=je();return(Ke=function(t,e){return i[t-=465]})(t,e)}!function(){const t=Ke,e=je();for(;;)try{if(108380===parseInt(t(484))/1*(parseInt(t(468))/2)+-parseInt(t(476))/3*(parseInt(t(483))/4)+-parseInt(t(475))/5*(-parseInt(t(481))/6)+-parseInt(t(470))/7+parseInt(t(477))/8*(-parseInt(t(479))/9)+-parseInt(t(472))/10*(-parseInt(t(480))/11)+-parseInt(t(467))/12*(-parseInt(t(469))/13))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Ue=re(et.defineComponent({name:Ve(473),props:{...Ye},emits:[Ve(478)],setup(t,{emit:e}){const i=Ve,{proxy:n}=et.getCurrentInstance(),s=t.mapId||n[i(465)].id,r=n[i(465)][i(482)],o=n[i(465)].setParentStylesByLayer;let a=null;et.onMounted((()=>{const l=i;a=new Ze(s,t[l(466)],t,e,r);const h=n[l(465)][l(474)];h&&h(a,t),o&&o(a)}));et.onBeforeUnmount((()=>{const t=i;null==a||a[i(471)](),a=null;const e=n[t(465)][t(471)];e&&e()}))}}),[["render",function(t,e,i,n,s,r){return null}]]);function He(t,e){var i=qe();return(He=function(t,e){return i[t-=494]})(t,e)}function qe(){var t=["18430THsQjV","991PwGIMf","661064KpSwkw","2859DCTHao","152FbQYZL","2273916rueWCv","878JDjFPC","5QhJEXK","204fuHXuO","121737hmPmoN","7RltlGm","153eJdFwF","1340586YyxSfv"];return(qe=function(){return t})()}!function(){for(var t=He,e=qe();;)try{if(250286===parseInt(t(505))/1*(-parseInt(t(497))/2)+-parseInt(t(494))/3*(parseInt(t(495))/4)+parseInt(t(498))/5*(parseInt(t(496))/6)+parseInt(t(501))/7*(parseInt(t(506))/8)+parseInt(t(502))/9*(-parseInt(t(504))/10)+-parseInt(t(500))/11*(-parseInt(t(499))/12)+parseInt(t(503))/13)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const $e=Je;function Je(t,e){const i=Qe();return(Je=function(t,e){return i[t-=281]})(t,e)}function Qe(){const t=["text","backgroundStrokeColor","2075700bsIXGD","1643439mzqbEE","position","260AenOFe","geometry","backgroundStrokeWidth","pow","3224416qgQIzC","formatLonLatToPosition","strokeWidth","9xJOIct","2178JYaoGq","setScale","strokeColor","isAuto","243563UpOcEn","45lJIbSg","offsetY","offsetX","textBaseline","font","692130cyBUQR","value","padding","getText","textAlign","rotation","fillColor","setGeoPosition","10525ZJoCnt","setCoordinates","backgroundFillColor","scale","draw"];return(Qe=function(){return t})()}!function(){const t=Je,e=Qe();for(;;)try{if(254289===-parseInt(t(290))/1+-parseInt(t(286))/2*(parseInt(t(285))/3)+parseInt(t(314))/4*(-parseInt(t(304))/5)+-parseInt(t(311))/6+parseInt(t(312))/7+parseInt(t(282))/8+parseInt(t(291))/9*(parseInt(t(296))/10))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();class ti extends Ge{constructor(t,e,i,n,s,r){const o=$e;super(t,i,n,s,r),tt(this,w),tt(this,C),tt(this,"font"),tt(this,b),tt(this,"offsetY"),tt(this,M),tt(this,"rotation"),tt(this,R),tt(this,E),tt(this,"fillColor"),tt(this,k),tt(this,A),tt(this,T),tt(this,F),tt(this,"backgroundStrokeWidth"),tt(this,L),tt(this,O),this[o(313)]=et.computed((()=>{const t=o;return e.length?te[t(283)](e):[]})),this.text=et.computed((()=>i[o(309)])),this[o(295)]=et.computed((()=>i[o(295)])),this[o(293)]=et.computed((()=>i.offsetX)),this[o(292)]=et.computed((()=>i[o(292)])),this[o(307)]=et.computed((()=>i[o(307)])),this.rotation=et.computed((()=>i[o(301)])),this[o(300)]=et.computed((()=>i[o(300)])),this.textBaseline=et.computed((()=>i[o(294)])),this[o(302)]=et.computed((()=>i[o(302)])),this[o(288)]=et.computed((()=>i[o(288)])),this[o(284)]=et.computed((()=>i.strokeWidth)),this[o(306)]=et.computed((()=>i[o(306)])),this[o(310)]=et.computed((()=>i[o(310)])),this.backgroundStrokeWidth=et.computed((()=>i[o(316)])),this.padding=et.computed((()=>i.padding)),this[o(289)]=et.computed((()=>i.isAuto)),this[o(308)]()}[(w=$e(313),C=$e(309),b=$e(293),M=$e(307),R=$e(300),E=$e(294),k=$e(288),A=$e(284),T=$e(306),F=$e(310),L=$e(298),O=$e(289),"getGeometry")](){const t=$e;return new yt.Point(this.position[t(297)])}[$e(303)](t){const e=$e;this[e(315)][e(305)](te[e(283)](t))}getStyle(){const t=$e,e=new ut.Style({text:new ut.Text({text:this.text[t(297)],font:this[t(295)][t(297)],offsetX:this[t(293)][t(297)],offsetY:this[t(292)][t(297)],placement:"point",scale:this[t(307)][t(297)],rotation:this[t(301)].value,textAlign:this[t(300)][t(297)],textBaseline:this.textBaseline[t(297)],fill:this.fillColor[t(297)]?new ut.Fill({color:this[t(302)][t(297)]}):void 0,stroke:this[t(288)][t(297)]?new ut.Stroke({color:this.strokeColor[t(297)],width:this[t(284)].value}):void 0,backgroundFill:this[t(306)][t(297)]?new ut.Fill({color:this[t(306)][t(297)]}):void 0,backgroundStroke:this[t(310)][t(297)]?new ut.Stroke({color:this[t(310)][t(297)],width:this[t(316)].value}):void 0,padding:this.padding[t(297)]})});return this.isAuto[t(297)]?(i,n)=>{const s=t;return e[s(299)]()[s(287)](1/Math[s(281)](n,1)),e}:e}}const ei={...Ne,position:{type:Array,default:()=>[]},text:{type:String,default:""},font:{type:String,default:""},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},scale:{type:Number,default:1},rotation:{type:Number,default:0},textAlign:{type:String,default:""},textBaseline:{type:String,default:""},fillColor:{type:String,default:""},strokeColor:{type:String,default:""},strokeWidth:{type:Number,default:5},backgroundFillColor:{type:String,default:""},backgroundStrokeColor:{type:String,default:""},backgroundStrokeWidth:{type:Number,default:5},padding:{type:Array,default:()=>[0,0,0,0]},mapId:{type:String,default:""}};function ii(){const t=["clickFun","mapId","$parent","4VcvVWW","5559600VgyMki","setParentStylesByLayer","destory","7490856aDfaDg","749MJEmVH","GymapText","clusterSource","runTask","position","929087NOoujk","imageSource","40917321TIitZr","146038fQDAiu","2785389DnVktz","89046WCMWbd"];return(ii=function(){return t})()}const ni=si;function si(t,e){const i=ii();return(si=function(t,e){return i[t-=214]})(t,e)}!function(){const t=si,e=ii();for(;;)try{if(852250===-parseInt(t(219))/1+-parseInt(t(222))/2+-parseInt(t(223))/3*(parseInt(t(228))/4)+-parseInt(t(229))/5+-parseInt(t(224))/6*(parseInt(t(214))/7)+parseInt(t(232))/8+parseInt(t(221))/9)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const ri=re(et.defineComponent({name:ni(215),props:{...ei},emits:[ni(225)],setup(t,{emit:e}){const i=ni,{proxy:n}=et.getCurrentInstance(),s=t[i(226)]||n[i(227)].id,r=n[i(227)][i(216)],o=n[i(227)][i(220)],a=n[i(227)][i(230)];let l=null;l=new ti(s,t[i(218)],t,e,r,{imageSource:o}),et.onMounted((()=>{const e=i,s=n[e(227)][e(217)];s&&s(l,t),a&&a(l)}));et.onBeforeUnmount((()=>{const t=i;l[i(231)](),l=null;const e=n.$parent[t(231)];e&&e()}))}}),[["render",function(t,e,i,n,s,r){return null}]]);function oi(){var t=["2783286YuGvft","6074152XoSzQI","2330508FiSMGJ","16bUFotS","596HQGtmF","2819CTWTgK","10BpoHyM","210yOClAm","568548VKTYCX","9TfMCqo","402010xdfFud","23052wBMfcG"];return(oi=function(){return t})()}function ai(t,e){var i=oi();return(ai=function(t,e){return i[t-=328]})(t,e)}function li(){const t=["position","490295FykorW","6641855llCcCd","pow","240wfyRsB","setGeoPosition","1589584lfjUvx","isAuto","anonymous","value","2629356FYDbPt","getStyle","formatLonLatToPosition","rotation","255HJtZLW","anchor","draw","getGeometry","scale","src","1222605GprKWc","geometry","336637vYKghQ","31560wKqmPs","displacement"];return(li=function(){return t})()}!function(){for(var t=ai,e=oi();;)try{if(445634===parseInt(t(328))/1*(parseInt(t(339))/2)+parseInt(t(337))/3+-parseInt(t(338))/4*(parseInt(t(333))/5)+parseInt(t(334))/6*(parseInt(t(330))/7)+-parseInt(t(336))/8*(parseInt(t(332))/9)+-parseInt(t(329))/10*(parseInt(t(335))/11)+parseInt(t(331))/12)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const hi=ci;function ci(t,e){const i=li();return(ci=function(t,e){return i[t-=328]})(t,e)}!function(){const t=ci,e=li();for(;;)try{if(782893===parseInt(t(344))/1+-parseInt(t(349))/2+-parseInt(t(332))/3*(-parseInt(t(341))/4)+-parseInt(t(345))/5+parseInt(t(328))/6+-parseInt(t(340))/7*(-parseInt(t(347))/8)+-parseInt(t(338))/9)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();class ui extends Ge{constructor(t,e,i,n,s){const r=hi;super(t,i,n,s),tt(this,P),tt(this,D),tt(this,G),tt(this,"displacement"),tt(this,"scale"),tt(this,B),tt(this,"isAuto"),this[r(343)]=et.computed((()=>te[r(330)](e))),this.src=et.computed((()=>i[r(337)])),this.anchor=et.computed((()=>i.anchor)),this[r(342)]=et.computed((()=>i[r(342)])),this.scale=et.computed((()=>i[r(336)])),this[r(331)]=et.computed((()=>i.rotation)),this[r(350)]=et.computed((()=>i.isAuto)),this[r(334)]()}[(P=hi(343),D=hi(337),G=hi(333),B=hi(331),hi(335))](){const t=hi;return new yt.Point(this[t(343)].value)}[hi(348)](t){const e=hi;this[e(339)].setCoordinates(te[e(330)](t))}[hi(329)](){const t=hi,e=new ut.Style({image:new ut.Icon({crossOrigin:t(351),src:this[t(337)][t(352)],anchor:this.anchor[t(352)],displacement:this[t(342)][t(352)],scale:this[t(336)][t(352)],rotation:this[t(331)][t(352)]})});return this[t(350)][t(352)]?(i,n)=>{const s=t;return e.getImage().setScale(1/Math[s(346)](n,1)),e}:e}}const di={...Ne,position:{type:Array,default:()=>[]},src:{type:String,default:""},anchor:{type:Array,default:()=>[.5,.5]},displacement:{type:Array,default:()=>[0,0]},scale:{type:Number,default:1},rotation:{type:Number,default:0},mapId:{type:String,default:""}},fi=pi;function gi(){const t=["mapId","source","935738omDFFI","$parent","GymapImage","1160159ObdcHH","92855jRvOea","370ILVFzM","667583DeBCbW","destory","40iiDyZM","setParentStylesByLayer","position","372ObPSOq","24LCooCG","231432BwYCAN","235233hFvNsI","156NcMDts","459361ZoqmtB","clusterSource"];return(gi=function(){return t})()}function pi(t,e){const i=gi();return(pi=function(t,e){return i[t-=379]})(t,e)}!function(){const t=pi,e=gi();for(;;)try{if(614219===-parseInt(t(394))/1+-parseInt(t(398))/2+-parseInt(t(390))/3*(-parseInt(t(391))/4)+-parseInt(t(382))/5*(-parseInt(t(389))/6)+-parseInt(t(384))/7*(parseInt(t(386))/8)+parseInt(t(392))/9*(-parseInt(t(383))/10)+parseInt(t(381))/11*(parseInt(t(393))/12))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const mi=re(et.defineComponent({name:fi(380),props:{...di},emits:["clickFun"],setup(t,{emit:e,expose:i}){const n=fi,s=et.ref(!1),{proxy:r}=et.getCurrentInstance(),o=t[n(396)]||r[n(379)].id,a=r[n(379)][n(395)],l=r[n(379)][n(387)];let h=null;h=new ui(o,t[n(388)],t,e,a);const c=h[n(397)];et.onMounted((()=>{const e=n;s.value=!0;const i=r[e(379)].runTask;i&&i(h,t),l&&l(h)}));return et.onBeforeUnmount((()=>{const t=n;h[n(385)](),h=null;const e=r[t(379)][t(385)];e&&e()})),{id:o,imageSource:c,showSlot:s}}}),[["render",function(t,e,i,n,s,r){return ct.openBlock(),ct.createElementBlock("div",null,[t.showSlot?ct.renderSlot(t.$slots,"default",{key:0}):ct.createCommentVNode("",!0)])}]]);function _i(){var t=["386232OlPbop","3868062XDDahR","201329XQEKoU","1533098pZYxWb","8ZpOESl","3379272MPVBfK","18Rtosqf","310895kTOOVu","6820640kIFUhc","14JxVrgM","12uFEqgc"];return(_i=function(){return t})()}function yi(t,e){var i=_i();return(yi=function(t,e){return i[t-=439]})(t,e)}!function(){for(var t=yi,e=_i();;)try{if(769027===-parseInt(t(445))/1*(-parseInt(t(441))/2)+-parseInt(t(444))/3+-parseInt(t(448))/4+-parseInt(t(439))/5*(parseInt(t(442))/6)+parseInt(t(446))/7*(parseInt(t(447))/8)+-parseInt(t(449))/9*(-parseInt(t(440))/10)+parseInt(t(443))/11)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const xi=vi;function vi(t,e){const i=Si();return(vi=function(t,e){return i[t-=378]})(t,e)}!function(){const t=vi,e=Si();for(;;)try{if(678213===-parseInt(t(403))/1+-parseInt(t(405))/2*(-parseInt(t(431))/3)+-parseInt(t(422))/4*(parseInt(t(425))/5)+-parseInt(t(380))/6+-parseInt(t(384))/7*(parseInt(t(415))/8)+-parseInt(t(427))/9*(-parseInt(t(414))/10)+parseInt(t(411))/11)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Ii=et.defineComponent({name:"GymapDraw",props:{canInsertVertexCondition:{type:Boolean,default:!0},drawTypeList:{type:Array,default:()=>{const t=vi;return[t(398),t(392),t(424),t(416)]}},drawTypeCnameList:{type:Array,default:()=>["点","线","圆",vi(382)]},btnBackground:{type:String,default:"rgb(102, 102, 102)"},btnColor:{type:String,default:xi(400)},btnActiveBackground:{type:String,default:xi(393)},btnActiveColor:{type:String,default:xi(400)},deleteActiveBackground:{type:String,default:xi(394)},deleteActiveColor:{type:String,default:xi(400)},fillColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},strokeColor:{type:String,default:xi(378)},strokeWidth:{type:Number,default:3},pointRadius:{type:Number,default:7}},emits:["drawFinish"],setup(t,{emit:e}){const i=xi,n=et.ref(null),{proxy:s}=et.getCurrentInstance(),r=s[i(421)].id,o=Rd(r),a=et.computed((()=>o[i(433)]&&o[i(433)].mapFinish));let l=null,h=null,c=null,u=et.ref(null),d=null,f=!1;const g=et.ref(i(398)),p=et.ref(""),m=et.computed((()=>u.value&&0!=u.value[i(423)]()[i(410)])),_=()=>{const e=i;p[e(433)]!==e(436)&&(p.value=e(436),!u[e(433)]&&(u[e(433)]=new xt.Vector),!f&&(f=!0,d=new vt.Vector({source:u[e(433)],style:{"fill-color":t[e(402)],"stroke-color":t.strokeColor,"stroke-width":t[e(426)],"circle-radius":t[e(379)],"circle-fill-color":t[e(419)]}}),o[e(433)][e(407)][e(395)](d),o[e(433)][e(407)].on(e(434),(t=>{const i=e;p[i(433)]===i(420)&&It.singleClick(t)&&o[i(433)][i(407)][i(413)](t.pixel,(t=>{const e=i;return d[e(432)]()[e(397)](t),!m.value&&_(),!0}),{hitTolerance:0})}))),l=new ht.Draw({source:u[e(433)],type:g[e(433)]}),h=new ht.Snap({source:u[e(433)]}),c=new ht.Modify({source:u[e(433)],deleteCondition:t=>It.altKeyOnly(t)&&It.singleClick(t),insertVertexCondition:e=>t.canInsertVertexCondition,snapToPointer:!1}),o[e(433)][e(407)][e(409)](c),o[e(433)].map[e(409)](l),o.value[e(407)][e(409)](h))},y=t=>{const e=i;"end"!==p.value&&(p.value=e(412),v(),t&&x())},x=()=>{const t=i,n=u[t(433)][t(423)]();let s=[];n[t(391)]((e=>{const i=t;let n=e[i(435)](),r=n[i(399)](),o=n[i(388)]();switch(r){case i(424):o=[n[i(430)]()];break;case i(398):o=[o];break;case i(416):o=o[0]}let a=[];o[i(391)]((t=>{a[i(383)](at.toLonLat(t))}));let l={coordinates:a,type:r};if(r===i(424)){let t=n[i(401)]();l[i(428)]=t}s.push(l)})),e("drawFinish",s)},v=()=>{const t=i;o[t(433)][t(407)].removeInteraction(c),o.value.map.removeInteraction(l),o.value[t(407)][t(417)](h)};return et.onMounted((()=>{const e=i;n[e(433)][e(381)][e(386)](e(389),t[e(406)]),n[e(433)][e(381)][e(386)]("--btnColor",t[e(429)]),n[e(433)][e(381)][e(386)](e(385),t[e(396)]),n[e(433)][e(381)][e(386)](e(404),t[e(390)]),n.value[e(381)][e(386)]("--btnActiveBackground",t[e(418)]),n[e(433)].style[e(386)](e(387),t[e(408)])})),et.onBeforeUnmount((()=>{v()})),{drawCon:n,drawType:g,status:p,gyMapObj:o,mapFinish:a,hasFeature:m,startDraw:_,deleteDraw:()=>{const t=i;"start"===p[t(433)]&&y(),p[t(433)]=t(420)},changeDrawType:t=>{const e=i;g[e(433)]=t,p[e(433)]!==e(412)&&(y(),_())},endDraw:y,submitData:x,destory:v}}});function Si(){const t=["removeInteraction","btnActiveBackground","strokeColor","delete","$parent","4XbTQHX","getFeatures","Circle","2601525OdUuGW","strokeWidth","405bCepLC","radius","btnColor","getCenter","25146JlvsFr","getSource","value","singleclick","getGeometry","start","#ffcc33","pointRadius","848364mHMmHv","style","多边形","push","82936PmgXUg","--deleteActiveBackground","setProperty","--btnActiveColor","getCoordinates","--btnBackground","deleteActiveColor","forEach","LineString","rgb(142, 142, 142)","rgb(28 137 189)","addLayer","deleteActiveBackground","removeFeature","Point","getType","#fff","getRadius","fillColor","405326DkxlfF","--deleteActiveColor","184TwUDSO","btnBackground","map","btnActiveColor","addInteraction","length","14969273XpbCni","end","forEachFeatureAtPixel","27270yupeRM","344QdBaql","Polygon"];return(Si=function(){return t})()}const wi={class:"draw-btns-list",ref:"drawCon"},Ci={class:"draw-type draw-btn draw-type-select"},bi={class:"draw-type-select-con"},Mi=["onClick"];const Ri=re(Ii,[["render",function(t,e,i,n,s,r){return ct.withDirectives((ct.openBlock(),ct.createElementBlock("div",wi,[ct.withDirectives(ct.createElementVNode("div",{class:"draw-start draw-btn",onClick:e[0]||(e[0]=(...e)=>t.startDraw&&t.startDraw(...e))},"开始绘制",512),[[ct.vShow,!t.status||"end"===t.status]]),ct.withDirectives(ct.createElementVNode("div",Ci,[e[3]||(e[3]=ct.createTextVNode(" 绘制类型 ")),ct.createElementVNode("div",bi,[(ct.openBlock(!0),ct.createElementBlock(ct.Fragment,null,ct.renderList(t.drawTypeList,((e,i)=>(ct.openBlock(),ct.createElementBlock("div",{key:"type"+i,class:ct.normalizeClass(["draw-type-option",{active:t.drawType===e}]),onClick:i=>t.changeDrawType(e)},ct.toDisplayString(t.drawTypeCnameList[i]||"待定"),11,Mi)))),128))])],512),[[ct.vShow,t.status&&"end"!==t.status]]),ct.withDirectives(ct.createElementVNode("div",{class:"draw-end draw-btn",onClick:e[1]||(e[1]=e=>t.endDraw(!0))},"绘制完成",512),[[ct.vShow,t.status&&"end"!==t.status]]),ct.withDirectives(ct.createElementVNode("div",{class:ct.normalizeClass(["draw-end","draw-btn",{active:"delete"===t.status}]),onClick:e[2]||(e[2]=(...e)=>t.deleteDraw&&t.deleteDraw(...e))},"删除图形 ",2),[[ct.vShow,t.hasFeature&&t.status&&"end"!==t.status]])],512)),[[ct.vShow,t.mapFinish]])}],["__scopeId","data-v-7b4fbe16"]]);function Ei(t,e){var i=ki();return(Ei=function(t,e){return i[t-=473]})(t,e)}function ki(){var t=["118312avWePl","569sgSbuS","7403XrHoUT","477qwPznA","31210bluEyG","9920274WBaGIS","7405230QFBRnz","2297668uckOem","7ZBQZEI","944wooCUH","2702709tMsThC"];return(ki=function(){return t})()}!function(){for(var t=Ei,e=ki();;)try{if(845229===-parseInt(t(473))/1*(-parseInt(t(481))/2)+parseInt(t(482))/3+-parseInt(t(479))/4+parseInt(t(478))/5+parseInt(t(477))/6*(parseInt(t(480))/7)+parseInt(t(483))/8*(-parseInt(t(475))/9)+parseInt(t(476))/10*(-parseInt(t(474))/11))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Ai=Oi;function Ti(){const t=["weight","#0f0","radius","gradien","data","map","maxValue","formatMinMaxValue","7885262rRIKfD","18895SujzJC","18274cKaLtJ","请传入正确的数据格式!","addPropsWatch","addLayerToMap","1017068KFFeVS","flortAdd","minValue","setRadius","setBlur","#f00","addLayer","33111VlPihb","layer","addFeature","maxZoom","#0ff","visible","error","#ff0","1144lswxpB","value","heatMapData","minZoom","addFeatures","checkData","6298836DhbXBf","subValue","stylesObj","formatLonLatToPosition","setMinZoom","6RQDjxj","blur","opacity","#00f","length","get","abs","isArray","55HQSUCg","66JKapzg","6851200kYrQku","560GxWRqq"];return(Ti=function(){return t})()}!function(){const t=Oi,e=Ti();for(;;)try{if(582933===parseInt(t(322))/1+parseInt(t(318))/2*(-parseInt(t(305))/3)+-parseInt(t(285))/4*(parseInt(t(317))/5)+parseInt(t(296))/6*(-parseInt(t(316))/7)+-parseInt(t(306))/8+-parseInt(t(277))/9*(-parseInt(t(307))/10)+-parseInt(t(304))/11*(-parseInt(t(291))/12))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();class Fi extends Ge{constructor(t,e,i,n){const s=Ai;super(t,i,n),tt(this,"visible"),tt(this,"gradien"),tt(this,N),tt(this,"blur"),tt(this,W),tt(this,z),tt(this,"maxValue"),tt(this,X),tt(this,Z),this.gradien=i[s(311)],this[s(308)]=i[s(308)],this[s(314)]=i.maxValue,this[s(272)]=i[s(272)],this.heatMapData=et.computed((()=>i[s(312)])),this[s(282)]=et.computed((()=>i[s(282)])),this.radius=et.computed((()=>i[s(310)])),this[s(297)]=et.computed((()=>i[s(297)])),this.minZoom=et.computed((()=>i[s(288)])),this[s(280)]=et.computed((()=>i[s(280)])),this[s(298)]=et.computed((()=>i[s(298)])),this[s(292)]=0,this[s(315)](),this.draw()}[(N=Ai(310),W=Ai(308),z=Ai(287),X=Ai(272),Z=Ai(292),Ai(315))](){const t=Ai;this.minValue<0&&(this[t(292)]=Math[t(302)](this[t(272)]),this.minValue=0,this[t(314)]=te.flortAdd(this.maxValue,this[t(292)]))}[Ai(290)](){const t=Ai;if(0!==this.heatMapData[t(286)][t(300)]){let e=this[t(287)][t(286)][0];return!!Array[t(303)](e)&&!(e[t(300)]<3)}return!0}[Ai(279)](){}[Ai(289)](){const t=Ai;let e=[];return this.checkData()&&(e=this[t(287)][t(286)][t(313)]((e=>{const i=t;let n=[e[0],e[1]];const s=new yt.Point(te[i(294)](n));return new Ot.default({geometry:s,data:e})}))),e}addSource(){}addLayer(){const t=Ai;let e=this[t(308)]?e=>this[t(308)](e[t(301)](t(312)),e):e=>{const i=t;let n=(e[i(301)](i(312))||[])[2];return 0!==this[i(292)]&&(n=te[i(323)](n,this[i(292)])),n>this[i(314)]?1:n<this.minValue?0:n/this[i(314)]},i=this[t(289)](),n=new Tt.default({features:i});this.layer=new vt.Heatmap({source:n,blur:this[t(297)].value,radius:this[t(310)].value,visible:this[t(282)][t(286)],gradient:this.gradien,weight:e,minZoom:this[t(288)][t(286)],maxZoom:this[t(280)].value,opacity:this[t(298)][t(286)]})}addLayerWatch(){const t=Ai;et.watch(this[t(287)],(e=>{const i=t;this.destory(),this[i(276)](),this[i(321)]()})),et.watch(this[t(282)],(e=>{var i;null==(i=this[t(278)])||i.setVisible(e)})),et.watch(this[t(310)],(e=>{var i;const n=t;null==(i=this.layer)||i[n(273)](e)})),et.watch(this[t(297)],(e=>{var i;const n=t;null==(i=this[n(278)])||i[n(274)](e)})),et.watch(this[t(288)],(e=>{var i;const n=t;null==(i=this[n(278)])||i[n(295)](e)})),et.watch(this[t(280)],(e=>{var i;null==(i=this[t(278)])||i.setMaxZoom(e)})),et.watch(this[t(298)],(e=>{var i;null==(i=this[t(278)])||i.setOpacity(e)}))}[Ai(320)](){const t=Ai;et.watch(this[t(293)],(()=>{}))}}const Li={data:{type:Array,default:()=>[]},visible:{type:Boolean,default:!0},gradien:{type:Array,default:()=>[Ai(299),Ai(281),Ai(309),Ai(284),Ai(275)]},radius:{type:Number,default:100},blur:{type:Number,default:100},maxValue:{type:Number,default:1},minValue:{type:Number,default:0},subValue:{type:Number,default:0},weight:{type:[String,Function],default:""},minZoom:{type:Number,default:1},maxZoom:{type:Number,default:18},opacity:{type:Number,default:1},mapId:{type:String,default:""}};function Oi(t,e){const i=Ti();return(Oi=function(t,e){return i[t-=272]})(t,e)}const Pi=Gi;function Di(){const t=["position","8dUrgzH","GymapHeat","35wOAvUr","3069902ORQUzD","1491952eAbkzz","mapId","1331600phHojO","721lsMtJv","destory","3916RplEZP","18SIHPVO","729726UxlFqb","18792HIvYmE","85664VJsOXo"];return(Di=function(){return t})()}function Gi(t,e){const i=Di();return(Gi=function(t,e){return i[t-=114]})(t,e)}!function(){const t=Gi,e=Di();for(;;)try{if(255583===-parseInt(t(123))/1*(parseInt(t(125))/2)+parseInt(t(121))/3+parseInt(t(119))/4*(-parseInt(t(127))/5)+parseInt(t(122))/6*(parseInt(t(117))/7)+parseInt(t(114))/8*(-parseInt(t(120))/9)+parseInt(t(116))/10+parseInt(t(128))/11)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Bi=re(et.defineComponent({name:Pi(126),props:{...Li},setup(t){const e=Pi,{proxy:i}=et.getCurrentInstance(),n=t[e(115)]||i.$parent.id;let s=null;et.onMounted((()=>{s=new Fi(n,t[e(124)],t)}));et.onBeforeUnmount((()=>{s[e(118)](),s=null}))}}),[["render",function(t,e,i,n,s,r){return null}]]);function Ni(t,e){var i=Wi();return(Ni=function(t,e){return i[t-=150]})(t,e)}function Wi(){var t=["8sgqZKs","3242364GgGoxF","3166920AXeMap","291260SzlrBa","5773995VyxpCq","950NpzgHf","822325mvcfjI","33hDuKcW","32348gEuGpQ"];return(Wi=function(){return t})()}!function(){for(var t=Ni,e=Wi();;)try{if(571378===parseInt(t(151))/1+-parseInt(t(157))/2*(parseInt(t(150))/3)+-parseInt(t(155))/4+parseInt(t(154))/5+-parseInt(t(153))/6+-parseInt(t(158))/7+-parseInt(t(152))/8*(-parseInt(t(156))/9))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const zi=Zi;function Xi(){const t=["7551BJgXGE","value","$parent","click","6203568mSJQQt","mapFinish","502076YkIYfl","GymapLonlat","12570591zzDVKl","5165480OAvdZq","168ufmjFh","8582yikwFp","join","className","194136oPtePx","226sEgHrH","getLonlat","3930KSVGPy","36yGSNcg","map","coordinate"];return(Xi=function(){return t})()}function Zi(t,e){const i=Xi();return(Zi=function(t,e){return i[t-=129]})(t,e)}!function(){const t=Zi,e=Xi();for(;;)try{if(757602===-parseInt(t(131))/1*(parseInt(t(148))/2)+parseInt(t(134))/3*(parseInt(t(143))/4)+parseInt(t(146))/5+parseInt(t(130))/6*(parseInt(t(147))/7)+-parseInt(t(141))/8+parseInt(t(137))/9*(parseInt(t(133))/10)+-parseInt(t(145))/11)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Yi=re(et.defineComponent({name:zi(144),props:{showCon:{type:Boolean,default:!0},className:{type:String,default:""}},emits:[zi(132)],setup(t,{emit:e}){const i=zi,{proxy:n}=et.getCurrentInstance(),s=n[i(139)].id,r=Rd(s),o=et.computed((()=>r[i(138)]&&r[i(138)][i(142)]));const a=et.ref(""),l=t=>{const n=i;let s=t[n(136)],r=at.toLonLat(s);a.value=r[n(149)](","),e("getLonlat",a[n(138)])},h=()=>{const t=i;o.value&&r[t(138)][t(135)].on(t(140),l)};et.watch(o,(()=>{h()})),et.onMounted((()=>{h()}));return et.onBeforeUnmount((()=>{(()=>{const t=i;r[t(138)].map&&r[t(138)].map.un(t(140),l)})()})),{className:t[i(129)],lonlat:a}}}),[["render",function(t,e,i,n,s,r){return ct.withDirectives((ct.openBlock(),ct.createElementBlock("div",{class:ct.normalizeClass(["GySjmapLonlat-con",t.className])},ct.toDisplayString(t.lonlat),3)),[[ct.vShow,t.showCon]])}],["__scopeId","data-v-c7e8129f"]]);function Vi(t,e){var i=ji();return(Vi=function(t,e){return i[t-=239]})(t,e)}function ji(){var t=["29711ZAoAeH","913140rITBBA","8UVtWMp","12298131QjwXvK","36CukcmN","6420036horEto","2388ceUjDb","876225EkBLLe","12085VtmmXH","26IYzEnR","73661xdwJmm","10YVtusv"];return(ji=function(){return t})()}!function(){for(var t=Vi,e=ji();;)try{if(864151===-parseInt(t(246))/1*(parseInt(t(247))/2)+-parseInt(t(239))/3+-parseInt(t(242))/4*(-parseInt(t(245))/5)+-parseInt(t(243))/6+parseInt(t(248))/7*(-parseInt(t(240))/8)+parseInt(t(241))/9*(parseInt(t(249))/10)+parseInt(t(250))/11*(-parseInt(t(244))/12))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const Ki="propertychange",Ui="change",Hi="click";const qi=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function $i(t,e){return t>e?1:t<e?-1:0}function Ji(t,e){return t<e?1:t>e?-1:0}function Qi(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let s=1;s<n;++s){if(t[s]==e)return s;if(t[s]<e)return t[s-1]-e<e-t[s]?s-1:s}return n-1}function tn(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function en(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let s=0;s<n;s++)t[t.length]=i[s]}function nn(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function sn(){return!0}function rn(){}function on(t){let e,i,n;return function(){const s=Array.prototype.slice.call(arguments);return i&&this===n&&nn(s,i)||(n=this,i=s,e=t.apply(this,arguments)),e}}function an(t){for(const e in t)delete t[e]}function ln(t){let e;for(e in t)return!1;return!e}const hn=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};const cn=class extends qi{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const s=e?new hn(t):t;s.target||(s.target=this.eventTarget_||this);const r=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});let a;i in r||(r[i]=0,o[i]=0),++r[i];for(let l=0,h=n.length;l<h;++l)if(a="handleEvent"in n[l]?n[l].handleEvent(s):n[l].call(this,s),!1===a||s.propagationStopped){a=!1;break}if(0===--r[i]){let t=o[i];for(delete o[i];t--;)this.removeEventListener(i,rn);delete r[i]}return a}disposeInternal(){this.listeners_&&an(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=rn,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}};function un(t,e,i,n,s){if(s){const s=i;i=function(r){return t.removeEventListener(e,i),s.call(null!=n?n:this,r)}}else n&&n!==t&&(i=i.bind(n));const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function dn(t,e,i,n){return un(t,e,i,n,!0)}function fn(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),an(t))}class gn extends cn{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Ui)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=un(this,t[s],e);return n}return un(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=dn(this,t[s],e)}else i=dn(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)fn(t[e]);else fn(t)}(i);else if(Array.isArray(t))for(let n=0,s=t.length;n<s;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)}}gn.prototype.on,gn.prototype.once,gn.prototype.un;const pn=gn;function mn(){throw new Error("Unimplemented abstract method.")}let _n=0;function yn(t){return t.ol_uid||(t.ol_uid=String(++_n))}class xn extends hn{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}const vn=class extends pn{constructor(t){super(),this.on,this.once,this.un,yn(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new xn(i,t,e)),i=Ki,this.hasListener(i)&&this.dispatchEvent(new xn(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],ln(this.values_)&&(this.values_=null),e||this.notify(t,i)}}};function In(t,e){if(!t)throw new Error(e)}class Sn extends vn{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Sn(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(fn(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=un(t,Ui,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;if(Array.isArray(t))e=t;else{In("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`");e=[t]}return function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const wn=Sn,Cn=0,bn=1,Mn=2,Rn=4,En=8,kn=16;function An(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Tn(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function Fn(t,e){return On(t,e[0],e[1])}function Ln(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function On(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Pn(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=e[0],a=e[1];let l=Cn;return o<i?l|=kn:o>s&&(l|=Rn),a<n?l|=En:a>r&&(l|=Mn),l===Cn&&(l=bn),l}function Dn(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function Gn(t){return Dn(1/0,1/0,-1/0,-1/0,t)}function Bn(t,e){const i=t[0],n=t[1];return Dn(i,n,i,n,e)}function Nn(t,e,i,n,s){return zn(Gn(s),t,e,i,n)}function Wn(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function zn(t,e,i,n,s){for(;i<n;i+=s)Xn(t,e[i],e[i+1]);return t}function Xn(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function Zn(t){return[t[0],t[1]]}function Yn(t){return[t[2],t[1]]}function Vn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function jn(t,e,i,n,s){const[r,o,a,l,h,c,u,d]=function(t,e,i,n){const s=e*n[0]/2,r=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),l=s*o,h=s*a,c=r*o,u=r*a,d=t[0],f=t[1];return[d-l+u,f-h-c,d-l-u,f-h+c,d+l-u,f+h+c,d+l+u,f+h-c,d-l+u,f-h-c]}(t,e,i,n);return Dn(Math.min(r,a,h,u),Math.min(o,l,c,d),Math.max(r,a,h,u),Math.max(o,l,c,d),s)}function Kn(t){return t[3]-t[1]}function Un(t){return[t[0],t[3]]}function Hn(t){return[t[2],t[3]]}function qn(t){return t[2]-t[0]}function $n(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Jn(t){return t[2]<t[0]||t[3]<t[1]}function Qn(t,e){const i=e.getExtent(),n=Vn(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=qn(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function ts(t,e,i){return Math.min(Math.max(t,e),i)}function es(t,e,i,n,s,r){const o=s-i,a=r-n;if(0!==o||0!==a){const l=((t-i)*o+(e-n)*a)/(o*o+a*a);l>1?(i=s,n=r):l>0&&(i+=o*l,n+=a*l)}return is(t,e,i,n)}function is(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function ns(t){return 180*t/Math.PI}function ss(t){return t*Math.PI/180}function rs(t,e){const i=t%e;return i*e<0?i+e:i}function os(t,e,i){return t+i*(e-t)}function as(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function ls(t,e,i){if(t>=e&&t<i)return t;const n=i-e;return((t-e)%n+n)%n+e}function hs(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function cs(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function us(t,e){if(e.canWrapX()){const i=qn(e.getExtent()),n=function(t,e,i){const n=e.getExtent();let s=0;e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||qn(n),s=Math.floor((t[0]-n[0])/i));return s}(t,e,i);n&&(t[0]-=n*i)}return t}const ds={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};const fs=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||ds[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},gs=6378137,ps=Math.PI*gs,ms=[-ps,-ps,ps,ps],_s=[-180,-85,180,85],ys=gs*Math.log(Math.tan(Math.PI/2));class xs extends fs{constructor(t){super({code:t,units:"m",extent:ms,global:!0,worldExtent:_s,getPointResolution:function(t,e){return t/Math.cosh(e[1]/gs)}})}}const vs=[new xs("EPSG:3857"),new xs("EPSG:102100"),new xs("EPSG:102113"),new xs("EPSG:900913"),new xs("http://www.opengis.net/def/crs/EPSG/0/3857"),new xs("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Is(t,e,i,n){const s=t.length;i=i>1?i:2,n=null!=n?n:i,void 0===e&&(e=i>2?t.slice():new Array(s));for(let r=0;r<s;r+=n){e[r]=ps*t[r]/180;let i=gs*Math.log(Math.tan(Math.PI*(+t[r+1]+90)/360));i>ys?i=ys:i<-ys&&(i=-ys),e[r+1]=i}return e}function Ss(t,e,i,n){const s=t.length;i=i>1?i:2,n=null!=n?n:i,void 0===e&&(e=i>2?t.slice():new Array(s));for(let r=0;r<s;r+=n)e[r]=180*t[r]/ps,e[r+1]=360*Math.atan(Math.exp(t[r+1]/gs))/Math.PI-90;return e}const ws=[-180,-90,180,90],Cs=6378137*Math.PI/180;class bs extends fs{constructor(t,e){super({code:t,units:"degrees",extent:ws,axisOrientation:e,global:!0,metersPerUnit:Cs,worldExtent:ws})}}const Ms=[new bs("CRS:84"),new bs("EPSG:4326","neu"),new bs("urn:ogc:def:crs:OGC:1.3:CRS84"),new bs("urn:ogc:def:crs:OGC:2:84"),new bs("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new bs("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new bs("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Rs={};let Es={};function ks(t,e,i){const n=t.getCode(),s=e.getCode();n in Es||(Es[n]={}),Es[n][s]=i}function As(t,e){return t in Es&&e in Es[t]?Es[t][e]:null}const Ts=.9996,Fs=.00669438,Ls=Fs*Fs,Os=Ls*Fs,Ps=Fs/(1-Fs),Ds=Math.sqrt(1-Fs),Gs=(1-Ds)/(1+Ds),Bs=Gs*Gs,Ns=Bs*Gs,Ws=Ns*Gs,zs=Ws*Gs,Xs=.9983242984503243,Zs=15*Ls/256+45*Os/1024,Ys=35*Os/3072,Vs=1.5*Gs-27/32*Ns+269/512*zs,js=21/16*Bs-55/32*Ws,Ks=151/96*Ns-417/128*zs,Us=1097/512*Ws,Hs=6378137;function qs(t,e,i){const n=t-5e5,s=(i.north?e:e-1e7)/Ts/(Hs*Xs),r=s+Vs*Math.sin(2*s)+js*Math.sin(4*s)+Ks*Math.sin(6*s)+Us*Math.sin(8*s),o=Math.sin(r),a=o*o,l=Math.cos(r),h=o/l,c=h*h,u=c*c,d=1-Fs*a,f=Math.sqrt(1-Fs*a),g=Ps*l**2,p=g*g,m=n/(Hs/f*Ts),_=m*m,y=_*m,x=y*m,v=x*m,I=r-h/((1-Fs)/d)*(_/2-x/24*(5+3*c+10*g-4*p-9*Ps))+v*m/720*(61+90*c+298*g+45*u-252*Ps-3*p);let S=(m-y/6*(1+2*c+g)+v/120*(5-2*g+28*c-3*p+8*Ps+24*u))/l;return S=ls(S+ss(Js(i.number)),-Math.PI,Math.PI),[ns(S),ns(I)]}function $s(t,e,i){t=ls(t,-180,180),e<-80?e=-80:e>84&&(e=84);const n=ss(e),s=Math.sin(n),r=Math.cos(n),o=s/r,a=o*o,l=a*a,h=ss(t),c=ss(Js(i.number)),u=Hs/Math.sqrt(1-Fs*s**2),d=Ps*r**2,f=r*ls(h-c,-Math.PI,Math.PI),g=f*f,p=g*f,m=p*f,_=m*f,y=_*f,x=Hs*(Xs*n-.002514607064228144*Math.sin(2*n)+Zs*Math.sin(4*n)-Ys*Math.sin(6*n)),v=Ts*u*(f+p/6*(1-a+d)+_/120*(5-18*a+l+72*d-58*Ps))+5e5;let I=Ts*(x+u*o*(g/2+m/24*(5-a+9*d+4*d**2)+y/720*(61-58*a+l+600*d-330*Ps)));return i.north||(I+=1e7),[v,I]}function Js(t){return 6*(t-1)-180+3}const Qs=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function tr(t){let e=0;for(const s of Qs){const i=t.match(s);if(i){e=parseInt(i[1]);break}}if(!e)return null;let i=0,n=!1;return e>32700&&e<32761?i=e-32700:e>32600&&e<32661&&(n=!0,i=e-32600),i?{number:i,north:n}:null}function er(t,e){return function(i,n,s,r){const o=i.length;s=s>1?s:2,r=null!=r?r:s,n||(n=s>2?i.slice():new Array(o));for(let a=0;a<o;a+=r){const s=i[a],r=i[a+1],o=t(s,r,e);n[a]=o[0],n[a+1]=o[1]}return n}}const ir=[function(t){const e=tr(t.getCode());return e?{forward:er($s,e),inverse:er(qs,e)}:null}],nr=[function(t){return tr(t)?new fs({code:t,units:"m"}):null}];let sr=!0;function rr(t,e){if(void 0!==e)for(let i=0,n=t.length;i<n;++i)e[i]=t[i];else e=t.slice();return e}function or(t){!function(t,e){Rs[t]=e}(t.getCode(),t),ks(t,t,rr)}function ar(t){if("string"!=typeof t)return t;const e=Rs[i=t]||Rs[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null;var i;if(e)return e;for(const n of nr){const e=n(t);if(e)return e}return null}function lr(t){!function(t){t.forEach(or)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&ks(e,t,rr)}))}))}function hr(t,e){return t?"string"==typeof t?ar(t):t:ar(e)}function cr(t,e){const i=t.getCode(),n=e.getCode();let s=As(i,n);if(s)return s;let r=null,o=null;for(const l of ir)r||(r=l(t)),o||(o=l(e));if(!r&&!o)return null;const a="EPSG:4326";if(o)if(r)s=ur(r.inverse,o.forward);else{const t=As(i,a);t&&(s=ur(t,o.forward))}else{const t=As(a,n);t&&(s=ur(r.inverse,t))}return s&&(or(t),or(e),ks(t,e,s)),s}function ur(t,e){return function(i,n,s,r){return n=t(i,n,s,r),e(n,n,s,r)}}function dr(t,e){return cr(ar(t),ar(e))}function fr(t,e){return t}function gr(t,e){return sr&&!cs(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(sr=!1),t}function pr(t,e){return t}function mr(t,e){return t}var _r,yr,xr;function vr(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function Ir(t,e,i,n,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=o*n*h-a*n*l+e,t[5]=o*s*l+a*s*h+i,t}lr(vs),lr(Ms),_r=vs,yr=Is,xr=Ss,Ms.forEach((function(t){_r.forEach((function(e){ks(t,e,yr),ks(e,t,xr)}))})),new Array(6);const Sr=[1e5,1e5,1e5,1e5,2,2];function wr(t){return t.substring(7,t.length-1).split(",").map(parseFloat)}function Cr(t,e,i,n,s,r,o){r=r||[],o=o||2;let a=0;for(let l=e;l<i;l+=n){const e=t[l],i=t[l+1];r[a++]=s[0]*e+s[2]*i+s[4],r[a++]=s[1]*e+s[3]*i+s[5];for(let n=2;n<o;n++)r[a++]=t[l+n]}return r&&r.length!=a&&(r.length=a),r}function br(t,e,i,n,s,r,o){o=o||[];const a=Math.cos(s),l=Math.sin(s),h=r[0],c=r[1];let u=0;for(let d=e;d<i;d+=n){const e=t[d]-h,i=t[d+1]-c;o[u++]=h+e*a-i*l,o[u++]=c+e*l+i*a;for(let s=d+2;s<d+n;++s)o[u++]=t[s]}return o&&o.length!=u&&(o.length=u),o}const Mr=[1,0,0,1,0,0],Rr=[NaN,NaN];const Er=class extends vn{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=on(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return mn()}closestPointXY(t,e,i,n){return mn()}containsXY(t,e){return 0===this.closestPointXY(t,e,Rr,Number.MIN_VALUE)}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return mn()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Gn(t),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)}rotate(t,e){mn()}scale(t,e,i){mn()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return mn()}getType(){return mn()}applyTransform(t){mn()}intersectsExtent(t){return mn()}translate(t,e){mn()}transform(t,e){const i=ar(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const r=i.getExtent(),o=i.getWorldExtent(),a=Kn(o)/Kn(r);Ir(Mr,o[0],o[3],a,-a,0,0,0);const l=Cr(t,0,t.length,s,Mr,n),h=dr(i,e);return h?h(l,l,s):l}:dr(i,e);return this.applyTransform(n),this}};function kr(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}const Ar=class extends Er{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Nn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return mn()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=kr(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){mn()}setLayout(t,e,i){let n;if(t)n=kr(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=function(t){let e;2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM");return e}(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();br(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=Vn(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();!function(t,e,i,n,s,r,o,a){a=a||[];const l=o[0],h=o[1];let c=0;for(let u=e;u<i;u+=n){const e=t[u]-l,i=t[u+1]-h;a[c++]=l+s*e,a[c++]=h+r*i;for(let s=u+2;s<u+n;++s)a[c++]=t[s]}a&&a.length!=c&&(a.length=c)}(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();!function(t,e,i,n,s,r,o){o=o||[];let a=0;for(let l=e;l<i;l+=n){o[a++]=t[l]+s,o[a++]=t[l+1]+r;for(let e=l+2;e<l+n;++e)o[a++]=t[e]}o&&o.length!=a&&(o.length=a)}(i,0,i.length,n,t,e,i),this.changed()}}};function Tr(t,e,i,n){for(let s=0,r=i.length;s<r;++s){const r=i[s];for(let i=0;i<n;++i)t[e++]=r[i]}return e}class Fr extends Ar{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Fr(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=is(t,e,s[0],s[1]);if(r<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,r}return n}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return Bn(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return On(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,i){for(let n=0,s=i.length;n<s;++n)t[e++]=i[n];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}const Lr=Fr,Or="add",Pr="remove",Dr="length";class Gr extends hn{constructor(t,e,i){super(t),this.element=e,this.index=i}}const Br=class extends vn{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,n=this.array_.length;i<n;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Dr)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Gr(Or,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Gr(Pr,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Gr(Pr,i,t)),this.dispatchEvent(new Gr(Or,e,t))}updateLength_(){this.set(Dr,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Error("Duplicate item added to a unique collection")}};function Nr(t,e){return function(i,n,s,r,o){!function(t,e,i,n,s,r,o){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=!1,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();try{let n;"text"==t||"json"==t?n=a.responseText:"xml"==t?n=a.responseXML||a.responseText:"arraybuffer"==t&&(n=a.response),n?r(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):o()}catch{o()}}else o()},a.onerror=o,a.send()}(t,e,i,n,s,((t,e)=>{this.addFeatures(t),void 0!==r&&r(t)}),(()=>{this.changed(),void 0!==o&&o()}))}}function Wr(t,e){return[[-1/0,-1/0,1/0,1/0]]}function zr(t,e,i,n,s){const r=function(t,e){let i;return i=e(Zn(t)),i||(i=e(Yn(t)),i||(i=e(Hn(t)),i||(i=e(Un(t)),i||!1)))}(s,(function(s){return!Xr(t,e,i,n,s[0],s[1])}));return!r}function Xr(t,e,i,n,s,r){let o=0,a=t[i-n],l=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];l<=r?n>r&&(i-a)*(r-l)-(s-a)*(n-l)>0&&o++:n<=r&&(i-a)*(r-l)-(s-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function Zr(t,e,i,n,s,r){if(0===i.length)return!1;if(!Xr(t,e,i[0],n,s,r))return!1;for(let o=1,a=i.length;o<a;++o)if(Xr(t,i[o-1],i[o],n,s,r))return!1;return!0}function Yr(t,e,i,n,s,r,o){let a,l,h,c,u,d,f;const g=s[r+1],p=[];for(let y=0,x=i.length;y<x;++y){const s=i[y];for(c=t[s-n],d=t[s-n+1],a=e;a<s;a+=n)u=t[a],f=t[a+1],(g<=d&&f<=g||d<=g&&g<=f)&&(h=(g-d)/(f-d)*(u-c)+c,p.push(h)),c=u,d=f}let m=NaN,_=-1/0;for(p.sort($i),c=p[0],a=1,l=p.length;a<l;++a){u=p[a];const s=Math.abs(u-c);s>_&&(h=(c+u)/2,Zr(t,e,i,n,h,g)&&(m=h,_=s)),c=u}return isNaN(m)&&(m=s[r]),o?(o.push(m,g,_),o):[m,g,_]}function Vr(t,e,i,n,s,r,o){let a,l;const h=(i-e)/n;if(1===h)a=e;else if(2===h)a=e,l=s;else if(0!==h){let r=t[e],o=t[e+1],h=0;const c=[0];for(let s=e+n;s<i;s+=n){const e=t[s],i=t[s+1];h+=Math.sqrt((e-r)*(e-r)+(i-o)*(i-o)),c.push(h),r=e,o=i}const u=s*h,d=function(t,e,i){let n,s;i=i||$i;let r=0,o=t.length,a=!1;for(;r<o;)n=r+(o-r>>1),s=+i(t[n],e),s<0?r=n+1:(o=n,a=!s);return a?r:~r}(c,u);d<0?(l=(u-c[-d-2])/(c[-d-1]-c[-d-2]),a=e+(-d-2)*n):a=e+d*n}o=o>1?o:2,r=r||new Array(o);for(let c=0;c<o;++c)r[c]=void 0===a?NaN:void 0===l?t[a+c]:os(t[a+c],t[a+n+c],l);return r}function jr(t,e,i,n){for(;e<i-n;){for(let s=0;s<n;++s){const r=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=r}e+=n,i-=n}}function Kr(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-r)*(n+o),r=i,o=n}return 0===s?void 0:s>0}function Ur(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=Kr(t,e,o,n);(0===r?s&&a||!s&&!a:s&&!a||!s&&a)&&jr(t,e,o,n),e=o}return e}function Hr(t,e,i,n,s,r,o){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)r[o++]=t[e],r[o++]=t[e+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[e,i-n];let c=0;for(;h.length>0;){const i=h.pop(),r=h.pop();let o=0;const a=t[r],u=t[r+1],d=t[i],f=t[i+1];for(let e=r+n;e<i;e+=n){const i=es(t[e],t[e+1],a,u,d,f);i>o&&(c=e,o=i)}o>s&&(l[(c-e)/n]=1,r+n<c&&h.push(r,c),c+n<i&&h.push(c,i))}for(let u=0;u<a;++u)l[u]&&(r[o++]=t[e+u*n],r[o++]=t[e+u*n+1]);return o}function qr(t,e){return e*Math.round(t/e)}function $r(t,e,i,n,s,r,o){if(e==i)return o;let a,l,h=qr(t[e],s),c=qr(t[e+1],s);e+=n,r[o++]=h,r[o++]=c;do{if(a=qr(t[e],s),l=qr(t[e+1],s),(e+=n)==i)return r[o++]=a,r[o++]=l,o}while(a==h&&l==c);for(;e<i;){const i=qr(t[e],s),u=qr(t[e+1],s);if(e+=n,i==a&&u==l)continue;const d=a-h,f=l-c,g=i-h,p=u-c;d*p==f*g&&(d<0&&g<d||d==g||d>0&&g>d)&&(f<0&&p<f||f==p||f>0&&p>f)?(a=i,l=u):(r[o++]=a,r[o++]=l,h=a,c=l,a=i,l=u)}return r[o++]=a,r[o++]=l,o}function Jr(t,e,i,n,s,r,o,a){for(let l=0,h=i.length;l<h;++l){const h=i[l];o=$r(t,e,h,n,s,r,o),a.push(o),e=h}return o}function Qr(t,e,i,n){let s=0;const r=t[i-n],o=t[i-n+1];let a=0,l=0;for(;e<i;e+=n){const i=t[e]-r,n=t[e+1]-o;s+=l*i-a*n,a=i,l=n}return s/2}function to(t,e,i,n,s,r,o){const a=t[e],l=t[e+1],h=t[i]-a,c=t[i+1]-l;let u;if(0===h&&0===c)u=e;else{const d=((s-a)*h+(r-l)*c)/(h*h+c*c);if(d>1)u=i;else{if(d>0){for(let s=0;s<n;++s)o[s]=os(t[e+s],t[i+s],d);return void(o.length=n)}u=e}}for(let d=0;d<n;++d)o[d]=t[u+d];o.length=n}function eo(t,e,i,n,s){let r=t[e],o=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=is(r,o,i,n);a>s&&(s=a),r=i,o=n}return s}function io(t,e,i,n,s,r,o,a,l,h,c){if(e==i)return h;let u,d;if(0===s){if(d=is(o,a,t[e],t[e+1]),d<h){for(u=0;u<n;++u)l[u]=t[e+u];return l.length=n,d}return h}c=c||[NaN,NaN];let f=e+n;for(;f<i;)if(to(t,f-n,f,n,o,a,c),d=is(o,a,c[0],c[1]),d<h){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(d)-Math.sqrt(h))/s|0,1);if(r&&(to(t,i-n,e,n,o,a,c),d=is(o,a,c[0],c[1]),d<h)){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n}return h}function no(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;o<i;o+=n)s[r++]=t.slice(o,o+n);return s.length=r,s}function so(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=no(t,e,a,n,s[r]),e=a}return s.length=r,s}function ro(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=1===a.length&&a[0]===e?[]:so(t,e,a,n,s[r]),e=a[a.length-1]}return s.length=r,s}class oo extends Ar{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new oo(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Tn(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(eo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return Qr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return no(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Hr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new oo(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Tr(this.flatCoordinates,0,t,this.stride),this.changed()}}const ao=oo;function lo(t,e,i,n,s,r){return r=null!=r?r:zn([1/0,1/0,-1/0,-1/0],t,e,i,n),!!$n(s,r)&&(r[0]>=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]||function(t,e,i,n,s){let r;for(e+=n;e<i;e+=n)if(r=s(t.slice(e-n,e),t.slice(e,e+n)),r)return r;return!1}(t,e,i,n,(function(t,e){return function(t,e,i){let n=!1;const s=Pn(t,e),r=Pn(t,i);if(s===bn||r===bn)n=!0;else{const o=t[0],a=t[1],l=t[2],h=t[3],c=e[0],u=e[1],d=i[0],f=i[1],g=(f-u)/(d-c);let p,m;r&Mn&&!(s&Mn)&&(p=d-(f-h)/g,n=p>=o&&p<=l),n||!(r&Rn)||s&Rn||(m=f-(d-l)*g,n=m>=a&&m<=h),n||!(r&En)||s&En||(p=d-(f-a)/g,n=p>=o&&p<=l),n||!(r&kn)||s&kn||(m=f-(d-o)*g,n=m>=a&&m<=h)}return n}(s,t,e)})))}function ho(t,e,i,n,s){if(!function(t,e,i,n,s){return!!(lo(t,e,i,n,s)||Xr(t,e,i,n,s[0],s[1])||Xr(t,e,i,n,s[0],s[3])||Xr(t,e,i,n,s[2],s[1])||Xr(t,e,i,n,s[2],s[3]))}(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let r=1,o=i.length;r<o;++r)if(zr(t,i[r-1],i[r],n,s)&&!lo(t,i[r-1],i[r],n,s))return!1;return!0}function co(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];o+=Math.sqrt((e-s)*(e-s)+(i-r)*(i-r)),s=e,r=i}return o}class uo extends Ar{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?en(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new uo(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Tn(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];s=eo(t,e,o,n,s),e=o}return s}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,s,r,o,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];h=io(t,e,d,n,s,r,o,a,l,h,c),e=d}return h}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return Zr(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return function(t,e,i,n){let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r];s+=Qr(t,e,o,n),e=o}return s}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Ur(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,so(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Vn(this.getExtent());this.flatInteriorPoint_=Yr(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Lr(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new ao(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=new ao(e.slice(s,o),t);n.push(a),s=o}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;!function(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=Kr(t,e,o,n);if(0===r){if(s&&a||!s&&!a)return!1}else if(s&&!a||!s&&a)return!1;e=o}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ur(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Jr(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new uo(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return ho(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=function(t,e,i,n,s){s=s||[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=Tr(t,e,i[o],n);s[r++]=a,e=a}return s.length=r,s}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}function fo(t){if(Jn(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],s=t[3],r=[e,i,e,s,n,s,n,i,e,i];return new uo(r,"XY",[r.length])}const go=[1,0,0,1,0,0];class po{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?Bn(this.flatCoordinates_):Nn(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Vn(this.getExtent());this.flatInteriorPoints_=Yr(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=function(t,e){const i=[];let n,s=0,r=0;for(let o=0,a=e.length;o<a;++o){const a=e[o],l=Kr(t,s,a,2);if(void 0===n&&(n=l),l===n)i.push(e.slice(r,o+1));else{if(0===i.length)continue;i[i.length-1].push(e[r])}r=o+1,s=a}return i}(this.flatCoordinates_,this.ends_),e=function(t,e,i,n){const s=[];let r=[1/0,1/0,-1/0,-1/0];for(let o=0,a=i.length;o<a;++o){const a=i[o];r=Nn(t,e,a[0],n),s.push((r[0]+r[2])/2,(r[1]+r[3])/2),e=a[a.length-1]}return s}(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=function(t,e,i,n,s){let r=[];for(let o=0,a=i.length;o<a;++o){const a=i[o];r=Yr(t,e,a,n,s,2*o,r),e=a[a.length-1]}return r}(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Vr(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n<s;++n){const s=i[n],r=Vr(t,e,s,2,.5);en(this.flatMidpoints_,r),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){const e=(t=ar(t)).getExtent(),i=t.getWorldExtent();if(e&&i){const t=Kn(i)/Kn(e);Ir(go,i[0],i[3],t,-t,0,0,0),Cr(this.flatCoordinates_,0,this.flatCoordinates_.length,2,go,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){var t;return new po(this.type_,this.flatCoordinates_.slice(),null==(t=this.ends_)?void 0:t.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=on(((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=Hr(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=function(t,e,i,n,s,r,o,a){for(let l=0,h=i.length;l<h;++l){const h=i[l];o=Hr(t,e,h,n,s,r,o),a.push(o),e=h}return o}(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=Jr(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n)}return n&&(this.simplifiedGeometry_=new po(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}po.prototype.getFlatCoordinates=po.prototype.getOrientedFlatCoordinates;const mo=po;function _o(t,e,i=0,n=t.length-1,s=xo){for(;n>i;){if(n-i>600){const r=n-i+1,o=e-i+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(o-r/2<0?-1:1);_o(t,e,Math.max(i,Math.floor(e-o*l/r+h)),Math.min(n,Math.floor(e+(r-o)*l/r+h)),s)}const r=t[e];let o=i,a=n;for(yo(t,i,e),s(t[n],r)>0&&yo(t,i,n);o<a;){for(yo(t,o,a),o++,a--;s(t[o],r)<0;)o++;for(;s(t[a],r)>0;)a--}0===s(t[i],r)?yo(t,i,a):(a++,yo(t,a,n)),a<=e&&(i=a+1),e<=a&&(n=a-1)}}function yo(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function xo(t,e){return t<e?-1:t>e?1:0}class vo{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!To(t,e))return i;const n=this.toBBox,s=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],a=e.leaf?n(o):o;To(t,a)&&(e.leaf?i.push(o):Ao(t,a)?this._all(o,i):s.push(o))}e=s.pop()}return i}collides(t){let e=this.data;if(!To(t,e))return!1;const i=[];for(;e;){for(let n=0;n<e.children.length;n++){const s=e.children[n],r=e.leaf?this.toBBox(s):s;if(To(t,r)){if(e.leaf||Ao(t,r))return!0;i.push(s)}}e=i.pop()}return!1}load(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(let e=0;e<t.length;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Fo([]),this}remove(t,e){if(!t)return this;let i=this.data;const n=this.toBBox(t),s=[],r=[];let o,a,l;for(;i||s.length;){if(i||(i=s.pop(),a=s[s.length-1],o=r.pop(),l=!0),i.leaf){const n=Io(t,i.children,e);if(-1!==n)return i.children.splice(n,1),s.push(i),this._condense(s),this}l||i.leaf||!Ao(i,n)?a?(o++,i=a.children[o],l=!1):i=null:(s.push(i),r.push(o),o=0,a=i,i=i.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,n){const s=i-e+1;let r,o=this._maxEntries;if(s<=o)return r=Fo(t.slice(e,i+1)),So(r,this.toBBox),r;n||(n=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,n-1))),r=Fo([]),r.leaf=!1,r.height=n;const a=Math.ceil(s/o),l=a*Math.ceil(Math.sqrt(o));Lo(t,e,i,l,this.compareMinX);for(let h=e;h<=i;h+=l){const e=Math.min(h+l-1,i);Lo(t,h,e,a,this.compareMinY);for(let i=h;i<=e;i+=a){const s=Math.min(i+a-1,e);r.children.push(this._build(t,i,s,n-1))}}return So(r,this.toBBox),r}_chooseSubtree(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){let i,n=1/0,o=1/0;for(let a=0;a<e.children.length;a++){const l=e.children[a],h=Ro(l),c=(s=t,r=l,(Math.max(r.maxX,s.maxX)-Math.min(r.minX,s.minX))*(Math.max(r.maxY,s.maxY)-Math.min(r.minY,s.minY))-h);c<o?(o=c,n=h<n?h:n,i=l):c===o&&h<n&&(n=h,i=l)}e=i||e.children[0]}var s,r;return e}_insert(t,e,i){const n=i?t:this.toBBox(t),s=[],r=this._chooseSubtree(n,this.data,e,s);for(r.children.push(t),Co(r,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)}_split(t,e){const i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n),o=Fo(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,So(i,this.toBBox),So(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this.data=Fo([t,e]),this.data.height=t.height+1,this.data.leaf=!1,So(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,s=1/0,r=1/0;for(let o=e;o<=i-e;o++){const e=wo(t,0,o,this.toBBox),a=wo(t,o,i,this.toBBox),l=ko(e,a),h=Ro(e)+Ro(a);l<s?(s=l,n=o,r=h<r?h:r):l===s&&h<r&&(r=h,n=o)}return n||i-e}_chooseSplitAxis(t,e,i){const n=t.leaf?this.compareMinX:bo,s=t.leaf?this.compareMinY:Mo;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);const s=this.toBBox,r=wo(t,0,e,s),o=wo(t,i-e,i,s);let a=Eo(r)+Eo(o);for(let l=e;l<i-e;l++){const e=t.children[l];Co(r,t.leaf?s(e):e),a+=Eo(r)}for(let l=i-e-1;l>=e;l--){const e=t.children[l];Co(o,t.leaf?s(e):e),a+=Eo(o)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)Co(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():So(t[i],this.toBBox)}}function Io(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function So(t,e){wo(t,0,t.children.length,e,t)}function wo(t,e,i,n,s){s||(s=Fo(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r=e;r<i;r++){const e=t.children[r];Co(s,t.leaf?n(e):e)}return s}function Co(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function bo(t,e){return t.minX-e.minX}function Mo(t,e){return t.minY-e.minY}function Ro(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Eo(t){return t.maxX-t.minX+(t.maxY-t.minY)}function ko(t,e){const i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function Ao(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function To(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function Fo(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Lo(t,e,i,n,s){const r=[e,i];for(;r.length;){if((i=r.pop())-(e=r.pop())<=n)continue;const o=e+Math.ceil((i-e)/n/2)*n;_o(t,o,e,i,s),r.push(e,o,o,i)}}const Oo=class{constructor(t){this.rbush_=new vo(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[yn(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const s=t[n],r=e[n],o={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:r};i[n]=o,this.items_[yn(r)]=o}this.rbush_.load(i)}remove(t){const e=yn(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[yn(e)];Wn([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,s=t.length;n<s;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return ln(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return Dn(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}};function Po(t){return t?"function"==typeof t?t:(Array.isArray(t)||(t=[t]),e=>t):null}const Do=class extends vn{constructor(t){var e;super(),this.projection=ar(t.projection),this.attributions_=Po(t.attributions),this.attributionsCollapsible_=null==(e=t.attributionsCollapsible)||e,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const i=this;this.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Po(t),this.changed()}setState(t){this.state_=t,this.changed()}},Go="addfeature",Bo="changefeature",No="clear",Wo="removefeature",zo="featuresloadstart",Xo="featuresloadend",Zo="featuresloaderror";class Yo extends hn{constructor(t,e,i){super(t),this.feature=e,this.features=i}}const Vo=class extends Do{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=rn,this.format_=t.format||null,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&(In(this.format_,"`format` must be set when `url` is set"),this.loader_=Nr(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:Wr;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,n;this.featuresRtree_=e?new Oo:null,this.loadedExtentsRtree_=new Oo,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),e||void 0!==i||(i=new Br(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=yn(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Yo(Go,t))}setupChangeEvents_(t,e){e instanceof mo||(this.featureChangeKeys_[t]=[un(e,Ui,this.handleFeatureChange_,this),un(e,Ki,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof mo){const n=this.idIndex_[t];n instanceof mo?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&(In(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let s=0,r=t.length;s<r;s++){const e=t[s],n=yn(e);this.addToIndex_(n,e)&&i.push(e)}for(let s=0,r=i.length;s<r;s++){const t=i[s],r=yn(t);this.setupChangeEvents_(r,t);const o=t.getGeometry();if(o){const i=o.getExtent();e.push(i),n.push(t)}else this.nullGeometryFeatures_[r]=t}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(Go))for(let s=0,r=i.length;s<r;s++)this.dispatchEvent(new Yo(Go,i[s]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(Go,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(Wo,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(Or,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(Pr,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_){this.featureChangeKeys_[t].forEach(fn)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach((t=>{this.removeFeatureInternal(t)}));for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Yo(No);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof mo||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof mo||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),ln(this.nullGeometryFeatures_)||en(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=function(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];Qn(t,e);const s=qn(n);if(qn(t)>s&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]<n[0])return[[t[0]+s,t[1],n[2],t[3]],[n[0],t[1],t[2],t[3]]];if(t[2]>n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-s,t[3]]]}return[t]}(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||sn,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e instanceof mo?0:e.closestPointXY(i,n,r,o),o<l){s=t;const e=Math.sqrt(o);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=yn(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const s=e.getId();if(void 0!==s){const t=s.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Yo(Bo,e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:yn(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&ln(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,s=this.strategy_(t,e,i);for(let r=0,o=s.length;r<o;++r){const t=s[r];n.forEachInExtent(t,(function(e){return Ln(e.extent,t)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new Yo(zo)),this.loader_.call(this,t,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new Yo(Xo,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Yo(Zo))})),n.insert(t,{extent:t.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_,i=e.forEachInExtent(t,(function(e){if(Wn(e.extent,t))return e}));i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,n=t.length;i<n;++i)e=this.removeFeatureInternal(t[i])||e;e&&this.changed()}removeFeature(t){if(!t)return;this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=yn(t);if(!(e in this.uidIndex_))return!1;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];null==i||i.forEach(fn),delete this.featureChangeKeys_[e];const n=t.getId();if(void 0!==n){const e=n.toString(),i=this.idIndex_[e];i===t?delete this.idIndex_[e]:Array.isArray(i)&&(i.splice(i.indexOf(t),1),1===i.length&&(this.idIndex_[e]=i[0]))}return delete this.uidIndex_[e],this.hasListener(Wo)&&this.dispatchEvent(new Yo(Wo,t)),!0}removeFromIdIndex_(t){for(const e in this.idIndex_)if(this.idIndex_[e]===t){delete this.idIndex_[e];break}}setLoader(t){this.loader_=t}setUrl(t){In(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(Nr(t,this.format_))}setOverlaps(t){this.overlaps_=t,this.changed()}};const jo=class extends Vo{constructor(t){super({attributions:(t=t||{}).attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return In(!e||"Point"===e.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){var n;null==(n=this.source)||n.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(Ui,this.boundRefresh_),this.source=t,t&&t.addEventListener(Ui,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let s=0,r=i.length;s<r;s++){const r=i[s];if(!(yn(r)in n)){const i=this.geometryFunction(r);if(i){Bn(i.getCoordinates(),t),An(t,e,t);const s=this.source.getFeaturesInExtent(t).filter((function(t){const e=yn(t);return!(e in n)&&(n[e]=!0,!0)}));this.features.push(this.createCluster(s,t))}}}}createCluster(t,e){const i=[0,0];for(let l=t.length-1;l>=0;--l){const e=this.geometryFunction(t[l]);e?hs(i,e.getCoordinates()):t.splice(l,1)}var n,s;n=i,s=1/t.length,n[0]*=s,n[1]*=s;const r=Vn(e),o=this.interpolationRatio,a=new Lr([i[0]*(1-o)+r[0]*o,i[1]*(1-o)+r[1]*o]);return this.createCustomCluster_?this.createCustomCluster_(a,t):new wn({geometry:a,features:t})}},Ko="singleclick",Uo="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"";Uo.includes("safari")&&!Uo.includes("chrom")&&(Uo.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Uo)),Uo.includes("webkit")&&Uo.includes("edge"),Uo.includes("macintosh");const Ho="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,qo="undefined"!=typeof Image&&Image.prototype.decode;!function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}}();const $o=function(){return!1},Jo=function(t){return t.type==Ko},Qo=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ta=0,ea=1;function ia(t,e,i,n){let s;return s=i&&i.length?i.shift():Ho?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",n)}let na;function sa(){return na||(na=ia(1,1)),na}function ra(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}const oa="prerender",aa="postrender",la="precompose",ha=0,ca=1,ua=2,da=3,fa=[NaN,NaN,NaN,0];let ga;const pa=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,ma=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,_a=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,ya=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function xa(t,e){return t.endsWith("%")?Number(t.substring(0,t.length-1))/e:Number(t)}function va(t){throw new Error('failed to parse "'+t+'" as color')}function Ia(t){if(t.toLowerCase().startsWith("rgb")){const e=t.match(ma)||t.match(pa)||t.match(_a);if(e){const t=e[4],i=100/255;return[ts(xa(e[1],i)+.5|0,0,255),ts(xa(e[2],i)+.5|0,0,255),ts(xa(e[3],i)+.5|0,0,255),void 0!==t?ts(xa(t,100),0,1):1]}va(t)}if(t.startsWith("#")){if(ya.test(t)){const e=t.substring(1),i=e.length<=4?1:2,n=[0,0,0,255];for(let t=0,s=e.length;t<s;t+=i){let s=parseInt(e.substring(t,t+i),16);1===i&&(s+=s<<4),n[t/i]=s}return n[3]=n[3]/255,n}va(t)}const e=(ga||(ga=ia(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),ga);e.fillStyle="#abcdef";let i=e.fillStyle;e.fillStyle=t,e.fillStyle===i&&(e.fillStyle="#fedcba",i=e.fillStyle,e.fillStyle=t,e.fillStyle===i&&va(t));const n=e.fillStyle;if(n.startsWith("#")||n.startsWith("rgba"))return Ia(n);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const s=Array.from(e.getImageData(0,0,1,1).data);return s[3]=as(s[3]/255,3),s}const Sa={};let wa=0;function Ca(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function ba(t){return t>.0031308?269.025*Math.pow(t,1/2.4)-14.025:3294.6*t}function Ma(t){return t>.2068965?Math.pow(t,3):108/841*(t-4/29)}function Ra(t){return t>10.314724?Math.pow((t+14.025)/269.025,2.4):t/3294.6}function Ea(t){return t>.0088564?Math.pow(t,1/3):t/(108/841)+4/29}function ka(t){const e=Ra(t[0]),i=Ra(t[1]),n=Ra(t[2]),s=Ea(.222488403*e+.716873169*i+.06060791*n),r=500*(Ea(.452247074*e+.399439023*i+.148375274*n)-s),o=200*(s-Ea(.016863605*e+.117638439*i+.865350722*n)),a=Math.atan2(o,r)*(180/Math.PI);return[116*s-16,Math.sqrt(r*r+o*o),a<0?a+360:a,t[3]]}function Aa(t){if("none"===t)return fa;if(Sa.hasOwnProperty(t))return Sa[t];if(wa>=1024){let t=0;for(const e in Sa)3&t++||(delete Sa[e],--wa)}const e=Ia(t);4!==e.length&&va(t);for(const i of e)isNaN(i)&&va(t);return Sa[t]=e,++wa,e}function Ta(t){return Array.isArray(t)?t:Aa(t)}function Fa(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];n!=(0|n)&&(n=n+.5|0);return"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}function La(t,e){return e&&(t.src=e),t.src&&qo?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):function(t,e){return new Promise(((i,n)=>{function s(){o(),i(t)}function r(){o(),n(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r),e&&(t.src=e)}))}(t)}function Oa(t,e,i){return e+":"+t+":"+(i?Ta(i):"null")}const Pa=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const n=Oa(t,e,i);return n in this.cache_?this.cache_[n]:null}getPattern(t,e,i){const n=Oa(t,e,i);return n in this.patternCache_?this.patternCache_[n]:null}set(t,e,i,n,s){const r=Oa(t,e,i),o=r in this.cache_;this.cache_[r]=n,s&&(n.getImageState()===ha&&n.load(),n.getImageState()===ca?n.ready().then((()=>{this.patternCache_[r]=sa().createPattern(n.getImage(1),"repeat")})):this.patternCache_[r]=sa().createPattern(n.getImage(1),"repeat")),o||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};let Da=null;class Ga extends cn{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?ha:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===ua){Da||(Da=ia(1,1,void 0,{willReadFrequently:!0})),Da.drawImage(this.image_,0,0);try{Da.getImageData(0,0,1,1),this.tainted_=!1}catch{Da=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(Ui)}handleImageError_(){this.imageState_=da,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ua,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=ia(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ha){this.image_||this.initializeImage_(),this.imageState_=ca;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&La(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==ua)return;const e=this.image_,i=ia(Math.ceil(e.width*t),Math.ceil(e.height*t)),n=i.canvas;var s;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle="string"==typeof(s=this.color_)?s:Fa(s),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise((t=>{if(this.imageState_===ua||this.imageState_===da)t();else{const e=()=>{this.imageState_!==ua&&this.imageState_!==da||(this.removeEventListener(Ui,e),t())};this.addEventListener(Ui,e)}}))),this.ready_}}function Ba(t,e,i,n,s,r){let o=void 0===e?void 0:Pa.get(e,i,s);return o||(o=new Ga(t,t&&"src"in t?t.src||void 0:e,i,n,s),Pa.set(e,i,s,o,r)),r&&o&&!Pa.getPattern(e,i,s)&&Pa.set(e,i,s,o,r),o}function Na(t){return t?Array.isArray(t)?Fa(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return Pa.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,i=Pa.getPattern(e,void 0,t.color);if(i)return i;const n=Pa.get(t.src,"anonymous",null);if(n.getImageState()!==ua)return null;const s=ia(t.size[0],t.size[1]);return s.drawImage(n.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Ba(s.canvas,e,void 0,ua,t.color,!0),Pa.getPattern(e,void 0,t.color)}(t):t:null}const Wa=class{drawCustom(t,e,i,n,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},za="ol-hidden",Xa="ol-unselectable",Za="ol-control",Ya="ol-collapsed",Va=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z0-9]+?)\\s*$"].join(""),"i"),ja=["style","variant","weight","size","lineHeight","family"],Ka={normal:400,bold:700},Ua=function(t){const e=t.match(Va);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let n=0,s=ja.length;n<s;++n){const t=e[n+1];void 0!==t&&(i[ja[n]]="string"==typeof t?t.trim():t)}return isNaN(Number(i.weight))&&i.weight in Ka&&(i.weight=Ka[i.weight]),i.families=i.family.split(/,\s?/).map((t=>t.trim().replace(/^['"]|['"]$/g,""))),i},Ha="10px sans-serif",qa="#000",$a="round",Ja=[],Qa="round",tl="#000",el="center",il="middle",nl=[0,0,0,0],sl=new vn;let rl,ol=null;const al={},ll=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function hl(t,e,i){return`${t} ${e} 16px "${i}"`}const cl=function(){const t=100;let e,i;async function n(t){await i.ready;const e=await i.load(t);if(0===e.length)return!1;const n=Ua(t),s=n.families[0].toLowerCase(),r=n.weight;return e.some((t=>{const e=t.family.replace(/^['"]|['"]$/g,"").toLowerCase(),i=Ka[t.weight]||t.weight;return e===s&&t.style===n.style&&i==r}))}async function s(){await i.ready;let r=!0;const o=sl.getProperties(),a=Object.keys(o).filter((e=>o[e]<t));for(let e=a.length-1;e>=0;--e){const i=a[e];let s=o[i];s<t&&(await n(i)?(an(al),sl.set(i,t)):(s+=10,sl.set(i,s,!0),s<t&&(r=!1)))}e=void 0,r||(e=setTimeout(s,100))}return async function(t){i||(i=Ho?self.fonts:document.fonts);const n=Ua(t);if(!n)return;const r=n.families;let o=!1;for(const e of r){if(ll.has(e))continue;const t=hl(n.style,n.weight,e);void 0===sl.get(t)&&(sl.set(t,0,!0),o=!0)}o&&(clearTimeout(e),e=setTimeout(s,100))}}(),ul=function(){let t;return function(e){let i=al[e];if(null==i){if(Ho){const t=Ua(e),n=dl(e,"Žg");i=(isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);al[e]=i}return i}}();function dl(t,e){return ol||(ol=ia(1,1)),t!=rl&&(ol.font=t,rl=ol.font),ol.measureText(e)}function fl(t,e){return dl(t,e).width}function gl(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,fl(t,i))),0);return i[e]=n,n}function pl(t,e,i,n,s,r,o,a,l,h,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let n=0,s=i.length;n<s;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):c[0]<0||c[1]<0?(t.translate(l,h),t.scale(c[0],c[1]),t.drawImage(n,s,r,o,a,0,0,o,a)):t.drawImage(n,s,r,o,a,l,h,o*c[0],a*c[1]),t.restore()}const ml={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},_l=[ml.FILL],yl=[ml.STROKE],xl=[ml.BEGIN_PATH],vl=[ml.CLOSE_PATH],Il=ml;const Sl=class extends Wa{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,a=t.length;o<a;o+=e)n[0]=t[o],n[1]=t[o+1],Fn(i,n)&&(s[r++]=n[0],s[r++]=n[1]);return r}appendFlatLineCoordinates(t,e,i,n,s,r){const o=this.coordinates;let a=o.length;const l=this.getBufferedMaxExtent();r&&(e+=n);let h=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,f,g,p=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],g=Pn(l,u),g!==f?(p&&(o[a++]=h,o[a++]=c,p=!1),o[a++]=u[0],o[a++]=u[1]):g===bn?(o[a++]=u[0],o[a++]=u[1],p=!1):p=!0,h=u[0],c=u[1],f=g;return(s&&p||d===e+n)&&(o[a++]=h,o[a++]=c),a}drawCustomCoordinates_(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r],a=this.appendFlatLineCoordinates(t,e,o,n,!1,!1);s.push(a),e=o}return e}drawCustom(t,e,i,n,s){this.beginGeometry(t,e,s);const r=t.getType(),o=t.getStride(),a=this.coordinates.length;let l,h,c,u,d;switch(r){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),u=[];const e=t.getEndss();d=0;for(let t=0,i=e.length;t<i;++t){const i=[];d=this.drawCustomCoordinates_(l,d,e[t],o,i),u.push(i)}this.instructions.push([Il.CUSTOM,a,u,t,i,ro,s]),this.hitDetectionInstructions.push([Il.CUSTOM,a,u,t,n||i,ro,s]);break;case"Polygon":case"MultiLineString":c=[],l="Polygon"==r?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),d=this.drawCustomCoordinates_(l,0,t.getEnds(),o,c),this.instructions.push([Il.CUSTOM,a,c,t,i,so,s]),this.hitDetectionInstructions.push([Il.CUSTOM,a,c,t,n||i,so,s]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,o,!1,!1),this.instructions.push([Il.CUSTOM,a,h,t,i,no,s]),this.hitDetectionInstructions.push([Il.CUSTOM,a,h,t,n||i,no,s]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,o),h>a&&(this.instructions.push([Il.CUSTOM,a,h,t,i,no,s]),this.hitDetectionInstructions.push([Il.CUSTOM,a,h,t,n||i,no,s]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Il.CUSTOM,a,h,t,i,void 0,s]),this.hitDetectionInstructions.push([Il.CUSTOM,a,h,t,n||i,void 0,s])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[Il.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Il.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,s,r=-1;for(e=0;e<i;++e)n=t[e],s=n[0],s==Il.END_GEOMETRY?r=e:s==Il.BEGIN_GEOMETRY&&(n[2]=e,tn(this.hitDetectionInstructions,r,e),r=-1)}fillStyleToState(t,e={}){if(t){const i=t.getColor();e.fillPatternScale=i&&"object"==typeof i&&"src"in i?this.pixelRatio:1,e.fillStyle=Na(i||qa)}else e.fillStyle=void 0;return e}strokeStyleToState(t,e={}){if(t){const i=t.getColor();e.strokeStyle=Na(i||tl);const n=t.getLineCap();e.lineCap=void 0!==n?n:$a;const s=t.getLineDash();e.lineDash=s?s.slice():Ja;const r=t.getLineDashOffset();e.lineDashOffset=r||0;const o=t.getLineJoin();e.lineJoin=void 0!==o?o:Qa;const a=t.getWidth();e.lineWidth=void 0!==a?a:1;const l=t.getMiterLimit();e.miterLimit=void 0!==l?l:10,e.lineWidth>this.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this.bufferedMaxExtent_=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0;return e}setFillStrokeStyle(t,e){const i=this.state;this.fillStyleToState(t,i),this.strokeStyleToState(e,i)}createFill(t){const e=t.fillStyle,i=[Il.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Il.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,t.lineDash?this.applyPixelRatio(t.lineDash):null,t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!nn(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Il.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(t=this.maxExtent,e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;An(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}var t,e;return this.bufferedMaxExtent_}};const wl=class extends Sl{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!Fn(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),s=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,s);this.instructions.push([Il.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Il.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),s=[];for(let a=0,l=n.length;a<l;a+=t.getStride())this.maxExtent&&!Fn(this.maxExtent,n.slice(a,a+2))||s.push(n[a],n[a+1]);const r=this.coordinates.length,o=this.appendFlatPointCoordinates(s,2);this.instructions.push([Il.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Il.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}};const Cl=class extends Sl{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,r=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[Il.MOVE_TO_LINE_TO,s,r];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i}drawLineString(t,e,i){const n=this.state,s=n.strokeStyle,r=n.lineWidth;if(void 0===s||void 0===r)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([Il.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ja,0],xl);const o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(yl),this.endGeometry(e)}drawMultiLineString(t,e,i){const n=this.state,s=n.strokeStyle,r=n.lineWidth;if(void 0===s||void 0===r)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([Il.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ja,0],xl);const o=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=o.length;c<u;++c)h=this.drawFlatCoordinates_(a,h,o[c],l);this.hitDetectionInstructions.push(yl),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(yl),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(yl),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(xl)}};const bl=class extends Sl{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,r=void 0!==s.fillStyle,o=void 0!==s.strokeStyle,a=i.length;this.instructions.push(xl),this.hitDetectionInstructions.push(xl);for(let l=0;l<a;++l){const s=i[l],r=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,s,n,!0,!o),h=[Il.MOVE_TO_LINE_TO,r,a];this.instructions.push(h),this.hitDetectionInstructions.push(h),o&&(this.instructions.push(vl),this.hitDetectionInstructions.push(vl)),e=s}return r&&(this.instructions.push(_l),this.hitDetectionInstructions.push(_l)),o&&(this.instructions.push(yl),this.hitDetectionInstructions.push(yl)),e}drawCircle(t,e,i){const n=this.state,s=n.fillStyle,r=n.strokeStyle;if(void 0===s&&void 0===r)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Il.SET_FILL_STYLE,qa]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Il.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ja,0]);const o=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const h=[Il.CIRCLE,l];this.instructions.push(xl,h),this.hitDetectionInstructions.push(xl,h),void 0!==n.fillStyle&&(this.instructions.push(_l),this.hitDetectionInstructions.push(_l)),void 0!==n.strokeStyle&&(this.instructions.push(yl),this.hitDetectionInstructions.push(yl)),this.endGeometry(e)}drawPolygon(t,e,i){const n=this.state,s=n.fillStyle,r=n.strokeStyle;if(void 0===s&&void 0===r)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Il.SET_FILL_STYLE,qa]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Il.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ja,0]);const o=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,o,l),this.endGeometry(e)}drawMultiPolygon(t,e,i){const n=this.state,s=n.fillStyle,r=n.strokeStyle;if(void 0===s&&void 0===r)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Il.SET_FILL_STYLE,qa]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Il.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ja,0]);const o=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=o.length;c<u;++c)h=this.drawFlatCoordinatess_(a,h,o[c],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=qr(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;this.updateFillStyle(t,this.createFill),this.updateStrokeStyle(t,this.applyStroke)}};function Ml(t,e,i,n,s){const r=[];let o=i,a=0,l=e.slice(i,2);for(;a<t&&o+s<n;){const[i,n]=l.slice(-2),h=e[o+s],c=e[o+s+1],u=Math.sqrt((h-i)*(h-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=os(i,h,e),f=os(n,c,e);l.push(d,f),r.push(l),l=[d,f],a==t&&(o+=s),a=0}else if(a<t)l.push(e[o+s],e[o+s+1]),o+=s;else{const t=u-a,e=os(i,h,t/u),d=os(n,c,t/u);l.push(e,d),r.push(l),l=[e,d],a=0,o+=s}}return a>0&&r.push(l),r}function Rl(t,e,i,n,s){let r,o,a,l,h,c,u,d,f,g,p=i,m=i,_=0,y=0,x=i;for(o=i;o<n;o+=s){const i=e[o],n=e[o+1];void 0!==h&&(f=i-h,g=n-c,l=Math.sqrt(f*f+g*g),void 0!==u&&(y+=a,r=Math.acos((u*f+d*g)/(a*l)),r>t&&(y>_&&(_=y,p=x,m=o),y=0,x=o-s)),a=l,u=f,d=g),h=i,c=n}return y+=l,y>_?[x,o]:[p,m]}const El={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};const kl={Circle:bl,Default:Sl,Image:wl,LineString:Cl,Polygon:bl,Text:class extends Sl{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[qa]={fillStyle:qa},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,s=this.textStrokeState_,r=this.textState_;if(""===this.text_||!r||!n&&!s)return;const o=this.coordinates;let a=o.length;const l=t.getType();let h=null,c=t.getStride();if("line"!==r.placement||"LineString"!=l&&"MultiLineString"!=l&&"Polygon"!=l&&"MultiPolygon"!=l){let n=r.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),c=2;break;case"Polygon":h=t.getFlatInteriorPoint(),r.overflow||n.push(h[2]/this.resolution),c=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();h=[];for(let t=0,i=e.length;t<i;t+=3)r.overflow||n.push(e[t+2]/this.resolution),h.push(e[t],e[t+1]);if(0===h.length)return;c=2}const s=this.appendFlatPointCoordinates(h,c);if(s===a)return;if(n&&(s-a)/2!==h.length/c){let t=a/2;n=n.filter(((e,i)=>{const n=o[2*(t+i)]===h[i*c]&&o[2*(t+i)+1]===h[i*c+1];return n||--t,n}))}this.saveTextStates_();const u=r.backgroundFill?this.createFill(this.fillStyleToState(r.backgroundFill)):null,d=r.backgroundStroke?this.createStroke(this.strokeStyleToState(r.backgroundStroke)):null;this.beginGeometry(t,e,i);let f=r.padding;if(f!=nl&&(r.scale[0]<0||r.scale[1]<0)){let t=r.padding[0],e=r.padding[1],i=r.padding[2],n=r.padding[3];r.scale[0]<0&&(e=-e,n=-n),r.scale[1]<0&&(t=-t,i=-i),f=[t,e,i,n]}const g=this.pixelRatio;this.instructions.push([Il.DRAW_IMAGE,a,s,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,f==nl?nl:f.map((function(t){return t*g})),u,d,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const p=1/g,m=u?u.slice(0):null;m&&(m[1]=qa),this.hitDetectionInstructions.push([Il.DRAW_IMAGE,a,s,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[p,p],NaN,this.declutterMode_,this.declutterImageWithText_,f,m,d,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?qa:this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),this.endGeometry(e)}else{if(!$n(this.maxExtent,t.getExtent()))return;let n;if(h=t.getFlatCoordinates(),"LineString"==l)n=[h.length];else if("MultiLineString"==l)n=t.getEnds();else if("Polygon"==l)n=t.getEnds().slice(0,1);else if("MultiPolygon"==l){const e=t.getEndss();n=[];for(let t=0,i=e.length;t<i;++t)n.push(e[t][0])}this.beginGeometry(t,e,i);const s=r.repeat,u=s?void 0:r.textAlign;let d=0;for(let t=0,e=n.length;t<e;++t){let e;e=s?Ml(s*this.resolution,h,d,n[t],c):[h.slice(d,n[t])];for(let i=0,s=e.length;i<s;++i){const s=e[i];let l=0,h=s.length;if(null==u){const t=Rl(r.maxAngle,s,0,s.length,2);l=t[0],h=t[1]}for(let t=l;t<h;t+=c)o.push(s[t],s[t+1]);const f=o.length;d=n[t],this.drawChars_(a,f),a=f}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||el,justify:e.justify,textBaseline:e.textBaseline||il,scale:e.scale});const r=this.fillKey_;i&&(r in this.fillStates||(this.fillStates[r]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,r=this.textKey_,o=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,l=El[n.textBaseline],h=this.textOffsetY_*a,c=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([Il.DRAW_CHARS,t,e,l,n.overflow,o,n.maxAngle,a,h,s,u*a,c,r,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([Il.DRAW_CHARS,t,e,l,n.overflow,o?qa:o,n.maxAngle,a,h,s,u*a,c,r,1/a,this.declutterMode_,this.textKeepUpright_])}setTextStyle(t,e){let i,n,s;if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=Na(e.getColor()||qa)):(n=null,this.textFillState_=n);const r=t.getStroke();if(r){s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const t=r.getLineDash(),e=r.getLineDashOffset(),i=r.getWidth(),n=r.getMiterLimit();s.lineCap=r.getLineCap()||$a,s.lineDash=t?t.slice():Ja,s.lineDashOffset=void 0===e?0:e,s.lineJoin=r.getLineJoin()||Qa,s.lineWidth=void 0===i?1:i,s.miterLimit=void 0===n?10:n,s.strokeStyle=Na(r.getColor()||tl)}else s=null,this.textStrokeState_=s;i=this.textState_;const o=t.getFont()||Ha;cl(o);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=o,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||il,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||nl,i.scale=void 0===a?[1,1]:a;const l=t.getOffsetX(),h=t.getOffsetY(),c=t.getRotateWithView(),u=t.getKeepUpright(),d=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===l?0:l,this.textOffsetY_=void 0===h?0:h,this.textRotateWithView_=void 0!==c&&c,this.textKeepUpright_=void 0===u||u,this.textRotation_=void 0===d?0:d,this.strokeKey_=s?("string"==typeof s.strokeStyle?s.strokeStyle:yn(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n&&n.fillStyle?"string"==typeof n.fillStyle?n.fillStyle:"|"+yn(n.fillStyle):""}else this.text_="";this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}};const Al=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];if(void 0===s){s=new(0,kl[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s}return s}};function Tl(t,e,i,n,s,r,o,a,l,h,c,u,d=!0){let f=t[e],g=t[e+1],p=0,m=0,_=0,y=0;function x(){p=f,m=g,f=t[e+=n],g=t[e+1],y+=_,_=Math.sqrt((f-p)*(f-p)+(g-m)*(g-m))}do{x()}while(e<i-n&&y+_<r);let v=0===_?0:(r-y)/_;const I=os(p,f,v),S=os(m,g,v),w=e-n,C=y,b=r+a*l(h,s,c);for(;e<i-n&&y+_<b;)x();v=0===_?0:(b-y)/_;const M=os(p,f,v),R=os(m,g,v);let E=!1;if(d)if(u){const t=[I,S,M,R];br(t,0,4,2,u,t,t),E=t[0]>t[2]}else E=I>M;const k=Math.PI,A=[],T=w+n===e;let F;if(_=0,y=C,f=t[e=w],g=t[e+1],T){x(),F=Math.atan2(g-m,f-p),E&&(F+=F>0?-k:k);const t=(M+I)/2,e=(R+S)/2;return A[0]=[t,e,(b-r)/2,F,s],A}for(let L=0,O=(s=s.replace(/\n/g," ")).length;L<O;){x();let t=Math.atan2(g-m,f-p);if(E&&(t+=t>0?-k:k),void 0!==F){let e=t-F;if(e+=e>k?-2*k:e<-k?2*k:0,Math.abs(e)>o)return null}F=t;const u=L;let d=0;for(;L<O;++L){const t=a*l(h,s[E?O-L-1:L],c);if(e+n<i&&y+_<r+d+t/2)break;d+=t}if(L===u)continue;const I=E?s.substring(O-u,O-L):s.substring(u,L);v=0===_?0:(r+d/2-y)/_;const S=os(p,f,v),w=os(m,g,v);A.push([S,w,d/2,t,I]),r+=d}return A}const Fl=class{constructor(){tt(this,"pushMethodArgs_",((...t)=>(this.push_(t),this))),this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(sa(),{get:(t,e)=>{if("function"==typeof sa()[e])return this.push_(e),this.pushMethodArgs_},set:(t,e,i)=>(this.push_(e,i),!0)})}push_(...t){const e=this.instructions_,i=this.zIndex+this.offset_;e[i]||(e[i]=[]),e[i].push(...t)}pushFunction(t){this.push_(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i<n;++i){const n=e[i];if("function"==typeof n){n(t);continue}const s=e[++i];if("function"==typeof t[n])t[n](...s);else{if("function"==typeof s){t[n]=s(t);continue}t[n]=s}}}))}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}},Ll=[1/0,1/0,-1/0,-1/0],Ol=[],Pl=[],Dl=[],Gl=[];function Bl(t){return t[3].declutterBox}const Nl=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Wl(t,e){return"start"===e?e=Nl.test(t)?"right":"left":"end"===e&&(e=Nl.test(t)?"left":"right"),El[e]}function zl(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}function Xl(t,e,i){return i%2==0&&(t+=e),t}const Zl=class{constructor(t,e,i,n,s){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=s?new Fl:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const r=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=a.justify?El[a.justify]:Wl(Array.isArray(t)?t[0]:t,a.textAlign||el),u=n&&r.lineWidth?r.lineWidth:0,d=Array.isArray(t)?t:String(t).split("\n").reduce(zl,[]),{width:f,height:g,widths:p,heights:m,lineWidths:_}=function(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=e[h+1]||t.font,f=fl(d,u);i.push(f),o+=f;const g=ul(d);n.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}(a,d),y=f+u,x=[],v=(y+2)*h[0],I=(g+u)*h[1],S={width:v<0?Math.floor(v):Math.ceil(v),height:I<0?Math.floor(I):Math.ceil(I),contextInstructions:x};1==h[0]&&1==h[1]||x.push("scale",h),n&&(x.push("strokeStyle",r.strokeStyle),x.push("lineWidth",u),x.push("lineCap",r.lineCap),x.push("lineJoin",r.lineJoin),x.push("miterLimit",r.miterLimit),x.push("setLineDash",[r.lineDash]),x.push("lineDashOffset",r.lineDashOffset)),i&&x.push("fillStyle",o.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");const w=.5-c;let C=c*y+w*u;const b=[],M=[];let R,E=0,k=0,A=0,T=0;for(let F=0,L=d.length;F<L;F+=2){const t=d[F];if("\n"===t){k+=E,E=0,C=c*y+w*u,++T;continue}const e=d[F+1]||a.font;e!==R&&(n&&b.push("font",e),i&&M.push("font",e),R=e),E=Math.max(E,m[A]);const s=[t,C+w*p[A]+c*(p[A]-_[T]),.5*(u+E)+k];C+=p[A],n&&b.push("strokeText",s),i&&M.push("fillText",s),++A}return Array.prototype.push.apply(x,b),Array.prototype.push.apply(x,M),this.labels_[s]=S,S}replayTextBackground_(t,e,i,n,s,r,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,s),t.lineTo.apply(t,e),r&&(this.alignAndScaleFill_=r[2],t.fillStyle=r[1],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,s,r,o,a,l,h,c,u,d,f,g,p){let m=i-(o*=u[0]),_=n-(a*=u[1]);const y=s+l>t?t-l:s,x=r+h>e?e-h:r,v=f[3]+y*u[0]+f[1],I=f[0]+x*u[1]+f[2],S=m-f[3],w=_-f[0];let C;return(g||0!==c)&&(Ol[0]=S,Gl[0]=S,Ol[1]=w,Pl[1]=w,Pl[0]=S+v,Dl[0]=Pl[0],Dl[1]=w+I,Gl[1]=Dl[1]),0!==c?(C=Ir([1,0,0,1,0,0],i,n,1,1,c,-i,-n),vr(C,Ol),vr(C,Pl),vr(C,Dl),vr(C,Gl),Dn(Math.min(Ol[0],Pl[0],Dl[0],Gl[0]),Math.min(Ol[1],Pl[1],Dl[1],Gl[1]),Math.max(Ol[0],Pl[0],Dl[0],Gl[0]),Math.max(Ol[1],Pl[1],Dl[1],Gl[1]),Ll)):Dn(Math.min(S,S+v),Math.min(w,w+I),Math.max(S,S+v),Math.max(w,w+I),Ll),d&&(m=Math.round(m),_=Math.round(_)),{drawImageX:m,drawImageY:_,drawImageW:y,drawImageH:x,originX:l,originY:h,declutterBox:{minX:Ll[0],minY:Ll[1],maxX:Ll[2],maxY:Ll[3],value:p},canvasTransform:C,scale:u}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),l=n.declutterBox,h=o?o[2]*n.scale[0]/2:0;return l.minX-h<=e[0]&&l.maxX+h>=0&&l.minY-h<=e[1]&&l.maxY+h>=0&&(a&&this.replayTextBackground_(t,Ol,Pl,Dl,Gl,r,o),pl(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=vr(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],e[1]&&(t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6]))}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],r=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,l=Wl(Array.isArray(t)?t[0]:t,s.textAlign||el),h=El[s.textBaseline||il],c=o&&o.lineWidth?o.lineWidth:0;return{label:r,anchorX:l*(r.width/a-2*s.scale[0])+2*(.5-l)*c,anchorY:h*r.height/a+2*(.5-h)*c}}execute_(t,e,i,n,s,r,o,a){const l=this.zIndexContext_;let h;var c,u;this.pixelCoordinates_&&nn(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Cr(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),c=this.renderedTransform_,u=i,c[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5]);let d=0;const f=n.length;let g,p,m,_,y,x,v,I,S,w,C,b,M,R=0,E=0,k=0;const A=this.coordinateCache_,T=this.viewRotation_,F=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,L={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:T},O=this.instructions!=n||this.overlaps?0:200;let P,D,G,B;for(;d<f;){const i=n[d];switch(i[0]){case Il.BEGIN_GEOMETRY:P=i[1],B=i[3],P.getGeometry()?void 0===o||$n(o,B.getExtent())?++d:d=i[2]+1:d=i[2],l&&(l.zIndex=i[4]);break;case Il.BEGIN_PATH:E>O&&(this.fill_(t),E=0),k>O&&(t.stroke(),k=0),E||k||(t.beginPath(),y=NaN,x=NaN),++d;break;case Il.CIRCLE:R=i[1];const n=h[R],c=h[R+1],u=h[R+2]-n,f=h[R+3]-c,N=Math.sqrt(u*u+f*f);t.moveTo(n+N,c),t.arc(n,c,N,0,2*Math.PI,!0),++d;break;case Il.CLOSE_PATH:t.closePath(),++d;break;case Il.CUSTOM:R=i[1],g=i[2];const W=i[3],z=i[4],X=i[5];L.geometry=W,L.feature=P,d in A||(A[d]=[]);const Z=A[d];X?X(h,R,g,2,Z):(Z[0]=h[R],Z[1]=h[R+1],Z.length=2),l&&(l.zIndex=i[6]),z(Z,L),++d;break;case Il.DRAW_IMAGE:R=i[1],g=i[2],S=i[3],p=i[4],m=i[5];let Y=i[6];const V=i[7],j=i[8],K=i[9],U=i[10];let H=i[11];const q=i[12];let $=i[13];_=i[14]||"declutter";const J=i[15];if(!S&&i.length>=20){w=i[19],C=i[20],b=i[21],M=i[22];const t=this.drawLabelWithPointPlacement_(w,C,b,M);S=t.label,i[3]=S;const e=i[23];p=(t.anchorX-e)*this.pixelRatio,i[4]=p;const n=i[24];m=(t.anchorY-n)*this.pixelRatio,i[5]=m,Y=S.height,i[6]=Y,$=S.width,i[13]=$}let Q,tt,et,it;i.length>25&&(Q=i[25]),i.length>17?(tt=i[16],et=i[17],it=i[18]):(tt=nl,et=null,it=null),U&&F?H+=T:U||F||(H-=T);let nt=0;for(;R<g;R+=2){if(Q&&Q[nt++]<$/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(S.width,S.height,h[R],h[R+1],$,Y,p,m,j,K,H,q,s,tt,!!et||!!it,P),n=[t,e,S,i,V,et,it];if(a){let t,e,s,r,o;if(J){const i=g-R;if(!J[i]){J[i]={args:n,declutterMode:_};continue}const r=J[i];t=r.args,e=r.declutterMode,delete J[i],s=Bl(t)}if(!t||"declutter"===e&&a.collides(s)||(r=!0),"declutter"===_&&a.collides(i.declutterBox)||(o=!0),"declutter"===e&&"declutter"===_){const t=r&&o;r=t,o=t}r&&("none"!==e&&a.insert(s),this.replayImageOrLabel_.apply(this,t)),o&&("none"!==_&&a.insert(i.declutterBox),this.replayImageOrLabel_.apply(this,n))}else this.replayImageOrLabel_.apply(this,n)}++d;break;case Il.DRAW_CHARS:const st=i[1],rt=i[2],ot=i[3],at=i[4];M=i[5];const lt=i[6],ht=i[7],ct=i[8];b=i[9];const ut=i[10];w=i[11],Array.isArray(w)&&(w=w.reduce(Xl,"")),C=i[12];const dt=[i[13],i[13]];_=i[14]||"declutter";const ft=i[15],gt=this.textStates[C],pt=gt.font,mt=[gt.scale[0]*ht,gt.scale[1]*ht];let _t;pt in this.widths_?_t=this.widths_[pt]:(_t={},this.widths_[pt]=_t);const yt=co(h,st,rt,2),xt=Math.abs(mt[0])*gl(pt,w,_t);if(at||xt<=yt){const i=Tl(h,st,rt,2,w,(yt-xt)*Wl(w,this.textStates[C].textAlign),lt,Math.abs(mt[0]),gl,pt,_t,F?0:this.viewRotation_,ft);t:if(i){const n=[];let s,r,o,l,h;if(b)for(s=0,r=i.length;s<r;++s){h=i[s],o=h[4],l=this.createLabel(o,C,"",b),p=h[2]+(mt[0]<0?-ut:ut),m=ot*l.height+2*(.5-ot)*ut*mt[1]/mt[0]-ct;const r=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,p,m,0,0,h[3],dt,!1,nl,!1,P);if(a&&"declutter"===_&&a.collides(r.declutterBox))break t;n.push([t,e,l,r,1,null,null])}if(M)for(s=0,r=i.length;s<r;++s){h=i[s],o=h[4],l=this.createLabel(o,C,M,""),p=h[2],m=ot*l.height-ct;const r=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,p,m,0,0,h[3],dt,!1,nl,!1,P);if(a&&"declutter"===_&&a.collides(r.declutterBox))break t;n.push([t,e,l,r,1,null,null])}a&&"none"!==_&&a.load(n.map(Bl));for(let t=0,e=n.length;t<e;++t)this.replayImageOrLabel_.apply(this,n[t])}}++d;break;case Il.END_GEOMETRY:if(void 0!==r){P=i[1];const t=r(P,B,_);if(t)return t}++d;break;case Il.FILL:O?E++:this.fill_(t),++d;break;case Il.MOVE_TO_LINE_TO:for(R=i[1],g=i[2],D=h[R],G=h[R+1],t.moveTo(D,G),y=D+.5|0,x=G+.5|0,R+=2;R<g;R+=2)D=h[R],G=h[R+1],v=D+.5|0,I=G+.5|0,R!=g-2&&v===y&&I===x||(t.lineTo(D,G),y=v,x=I);++d;break;case Il.SET_FILL_STYLE:this.alignAndScaleFill_=i[2],E&&(this.fill_(t),E=0,k&&(t.stroke(),k=0)),t.fillStyle=i[1],++d;break;case Il.SET_STROKE_STYLE:k&&(t.stroke(),k=0),this.setStrokeStyle_(t,i),++d;break;case Il.STROKE:O?k++:t.stroke(),++d;break;default:++d}}E&&this.fill_(t),k&&t.stroke()}execute(t,e,i,n,s,r){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,s,void 0,void 0,r)}executeHitDetection(t,e,i,n,s){return this.viewRotation_=i,this.execute_(t,[t.canvas.width,t.canvas.height],e,this.hitDetectionInstructions,!0,n,s)}},Yl=["Polygon","Circle","LineString","Image","Text","Default"],Vl=["Image","Text"],jl=Yl.filter((t=>!Vl.includes(t)));const Kl={};const Ul=class{constructor(t,e,i,n,s,r,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,o)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const s=t[i];for(const t in s){const i=s[t];n[t]=new Zl(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,s,r){const o=2*(n=Math.round(n))+1,a=Ir(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=ia(o,o));const h=this.hitDetectionContext_;let c;h.canvas.width!==o||h.canvas.height!==o?(h.canvas.width=o,h.canvas.height=o):l||h.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(c=[1/0,1/0,-1/0,-1/0],function(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}(c,t),An(c,e*(this.renderBuffer_+n),c));const u=function(t){if(void 0!==Kl[t])return Kl[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let r=0;r<=t;++r)for(let s=0;s<=t;++s){const o=r*r+s*s;if(o>i)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}const s=[];for(let r=0,o=n.length;r<o;++r)n[r]&&s.push(...n[r]);return Kl[t]=s,s}(n);let d;function f(t,e,i){const a=h.getImageData(0,0,o,o).data;for(let l=0,c=u.length;l<c;l++)if(a[u[l]]>0){if(!r||"none"===i||"Image"!==d&&"Text"!==d||r.includes(t)){const i=(u[l]-3)/4,r=n-i%o,a=n-(i/o|0),h=s(t,e,r*r+a*a);if(h)return h}h.clearRect(0,0,o,o);break}}const g=Object.keys(this.executorsByZIndex_).map(Number);let p,m,_,y,x;for(g.sort($i),p=g.length-1;p>=0;--p){const t=g[p].toString();for(_=this.executorsByZIndex_[t],m=Yl.length-1;m>=0;--m)if(d=Yl[m],y=_[d],void 0!==y&&(x=y.executeHitDetection(h,a,i,f,c),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return Cr(o,0,8,2,t,o),o}isEmpty(){return ln(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(o?Ji:$i),r=r||Yl;const l=Yl.length;for(let h=0,c=a.length;h<c;++h){const c=a[h].toString(),u=this.executorsByZIndex_[c];for(let d=0,f=r.length;d<f;++d){const c=r[d],f=u[c];if(void 0!==f){const r=null===o?void 0:f.getZIndexContext(),u=r?r.getContext():t,d=this.maxExtent_&&"Image"!==c&&"Text"!==c;if(d&&(u.save(),this.clip(u,i)),r&&"Text"!==c&&"Image"!==c?r.pushFunction((t=>f.execute(t,e,i,n,s,o))):f.execute(u,e,i,n,s,o),d&&u.restore(),r){r.offset();const t=a[h]*l+Yl.indexOf(c);this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(r)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort($i);for(let i=0,n=e.length;i<n;++i)t[e[i]].forEach((t=>{t.draw(this.renderedContext_),t.clear()})),t[e[i]].length=0}};function Hl(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}class ql{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Hl(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new ql({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return mn()}getImage(t){return mn()}getHitDetectionImage(){return mn()}getPixelRatio(t){return 1}getImageState(){return mn()}getImageSize(){return mn()}getOrigin(){return mn()}getSize(){return mn()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Hl(t)}listenImageChange(t){mn()}load(){mn()}unlistenImageChange(t){mn()}ready(){return Promise.resolve()}}const $l=ql;class Jl extends $l{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?ca:ua,this.imageState_===ca&&this.ready().then((()=>this.imageState_=ua)),this.render()}clone(){const t=this.getScale(),e=new Jl({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){var e,i;const n=null==(e=this.fill_)?void 0:e.getKey(),s=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${n}`+Object.values(this.renderOptions_).join(",");let r=null==(i=Pa.get(s,null,null))?void 0:i.getImage(1);if(!r){const e=this.renderOptions_,i=Math.ceil(e.size*t),n=ia(i,i);this.draw_(e,n,t),r=n.canvas,Pa.set(s,null,null,new Ga(r,void 0,null,ua,null))}return r}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const r=void 0===this.radius2_?this.points_:2*this.points_,o=2*Math.PI/r,a=s*Math.sin(o),l=n-Math.sqrt(s*s-a*a),h=Math.sqrt(a*a+l*l),c=h/a;if("miter"===t&&c<=i)return c*e;const u=e/2/c,d=e/2*(l/h),f=Math.sqrt((n+u)*(n+u)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*f;const g=n*Math.sin(o),p=s-Math.sqrt(n*n-g*g),m=Math.sqrt(g*g+p*p)/g;if(m<=i){const t=m*e/2-s-n;return 2*Math.max(f,t)}return 2*f}createRenderOptions(){var t,e,i,n,s,r;let o,a=$a,l=Qa,h=0,c=null,u=0,d=0;this.stroke_&&(o=Na(null!=(t=this.stroke_.getColor())?t:tl),d=null!=(e=this.stroke_.getWidth())?e:1,c=this.stroke_.getLineDash(),u=null!=(i=this.stroke_.getLineDashOffset())?i:0,l=null!=(n=this.stroke_.getLineJoin())?n:Qa,a=null!=(s=this.stroke_.getLineCap())?s:$a,h=null!=(r=this.stroke_.getMiterLimit())?r:10);const f=this.calculateLineJoinSize_(l,d,h),g=Math.max(this.radius,this.radius2_||0);return{strokeStyle:o,strokeWidth:d,size:Math.ceil(2*g+f),lineCap:a,lineDash:c,lineDashOffset:u,lineJoin:l,miterLimit:h}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=qa),e.fillStyle=Na(t),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),n=0;"string"==typeof i&&(i=Ta(i)),null===i?n=1:Array.isArray(i)&&(n=4===i.length?i[3]:1),0===n&&(e=ia(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,r=2*Math.PI/e;for(let o=0;o<e;o++){const e=s+o*r,a=o%2==0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=qa,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}const Ql=Jl;class th extends Ql{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new th({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius=t,this.render()}}const eh=th;class ih{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new ih({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){const e=Ba(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then((()=>{this.patternImage_=null})),e.getImageState()===ha&&e.load(),e.getImageState()===ca&&(this.patternImage_=e)}this.color_=t}getKey(){const t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?yn(t):"object"==typeof t&&"src"in t?t.src+":"+t.offset:Ta(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const nh=ih;function sh(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class rh extends $l{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const r=void 0!==t.img?t.img:null;let o,a=t.src;if(In(!(void 0!==a&&r),"`image` and `src` cannot be provided at the same time"),void 0!==a&&0!==a.length||!r||(a=r.src||yn(r)),In(void 0!==a&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),In(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?o=ha:void 0!==r&&(o="complete"in r?r.complete?r.src?ua:ha:ca:ua),this.color_=void 0!==t.color?Ta(t.color):null,this.iconImage_=Ba(r,a,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,this.initialOptions_,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(sh(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(sh(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new rh({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==ua?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==ua?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(Ui,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Ui,t)}ready(){return this.iconImage_.ready()}}const oh=rh;class ah{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new ah({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const lh=ah;class hh{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=dh,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){var t;let e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new hh({geometry:null!=e?e:void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:null!=(t=this.getRenderer())?t:void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=dh,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let ch=null;function uh(t,e){if(!ch){const t=new nh({color:"rgba(255,255,255,0.4)"}),e=new lh({color:"#3399CC",width:1.25});ch=[new hh({image:new eh({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return ch}function dh(t){return t.getGeometry()}class fh{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.keepUpright_=t.keepUpright,this.scale_=t.scale,this.scaleArray_=Hl(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new nh({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new fh({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setKeepUpright(t){this.keepUpright_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Hl(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const gh=fh;const ph=class extends Wa{constructor(t,e,i,n,s,r,o){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?as(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=r,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(t,e,i,n){if(!this.image_)return;const s=Cr(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,o=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let h=0,c=s.length;h<c;h+=2){const t=s[h]-this.imageAnchorX_,e=s[h+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const i=t+this.imageAnchorX_,n=e+this.imageAnchorY_;Ir(o,i,n,1,1,l,-i,-n),r.save(),r.transform.apply(r,o),r.translate(i,n),r.scale(this.imageScale_[0],this.imageScale_[1]),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),r.restore()}else r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,t,e,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=Cr(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_;let o=this.textRotation_;for(0===this.transformRotation_&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){const t=s[e]+this.textOffsetX_,i=s[e+1]+this.textOffsetY_;0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]?(r.save(),r.translate(t-this.textOffsetX_,i-this.textOffsetY_),r.rotate(o),r.translate(this.textOffsetX_,this.textOffsetY_),r.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&r.strokeText(this.text_,0,0),this.textFillState_&&r.fillText(this.text_,0,0),r.restore()):(this.textStrokeState_&&r.strokeText(this.text_,t,i),this.textFillState_&&r.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,s){const r=this.context_,o=Cr(t,e,i,n,this.transform_,this.pixelCoordinates_);r.moveTo(o[0],o[1]);let a=o.length;s&&(a-=2);for(let l=2;l<a;l+=2)r.lineTo(o[l],o[l+1]);return s&&r.closePath(),i}drawRings_(t,e,i,n){for(let s=0,r=i.length;s<r;++s)e=this.moveToLineTo_(t,e,i[s],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),$n(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=function(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const s=t.getStride();return Cr(n,0,n.length,s,e,i)}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],s=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),$n(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if($n(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const s=t.getEnds(),r=t.getStride();e.beginPath();for(let t=0,o=s.length;t<o;++t)n=this.moveToLineTo_(i,n,s[t],r,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),$n(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),$n(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const s=t.getEndss(),r=t.getStride();e.beginPath();for(let t=0,o=s.length;t<o;++t){const e=s[t];n=this.drawRings_(i,n,e,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),nn(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:el;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:Na(e||qa)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),r=e.getLineJoin(),o=e.getWidth(),a=e.getMiterLimit(),l=n||Ja;this.strokeState_={lineCap:void 0!==i?i:$a,lineDash:1===this.pixelRatio_?l:l.map((t=>t*this.pixelRatio_)),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==r?r:Qa,lineWidth:(void 0!==o?o:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:Na(t||tl)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:Na(t||qa)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),r=i.getLineJoin(),o=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:$a,lineDash:n||Ja,lineDashOffset:s||0,lineJoin:void 0!==r?r:Qa,lineWidth:void 0!==o?o:1,miterLimit:void 0!==a?a:10,strokeStyle:Na(t||tl)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),r=t.getOffsetY(),o=t.getRotateWithView(),a=t.getRotation(),l=t.getScaleArray(),h=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:Ha,textAlign:void 0!==c?c:el,textBaseline:void 0!==u?u:il},this.text_=void 0!==h?Array.isArray(h)?h.reduce(((t,e,i)=>t+(i%2?" ":e)),""):h:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==r?this.pixelRatio_*r:0,this.textRotateWithView_=void 0!==o&&o,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}},mh=.5;const _h={Point:function(t,e,i,n,s,r){const o=i.getImage(),a=i.getText(),l=a&&a.getText(),h=r&&o&&l?{}:void 0;if(o){if(o.getImageState()!=ua)return;const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(o,h),r.drawPoint(e,n,s)}if(l){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a,h),r.drawText(e,n,s)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},MultiPoint:function(t,e,i,n,s,r){const o=i.getImage(),a=o&&0!==o.getOpacity(),l=i.getText(),h=l&&l.getText(),c=r&&a&&h?{}:void 0;if(a){if(o.getImageState()!=ua)return;const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(o,c),r.drawMultiPoint(e,n,s)}if(h){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(l,c),r.drawText(e,n,s)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},GeometryCollection:function(t,e,i,n,s,r){const o=e.getGeometriesArray();let a,l;for(a=0,l=o.length;a<l;++a){(0,_h[o[a].getType()])(t,o[a],i,n,s,r)}},Circle:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Circle");a.setFillStrokeStyle(r,o),a.drawCircle(e,n,s)}const a=i.getText();if(a&&a.getText()){const s=t.getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}}};function yh(t,e){return parseInt(yn(t),10)-parseInt(yn(e),10)}function xh(t,e){const i=vh(t,e);return i*i}function vh(t,e){return.5*t/e}function Ih(t,e,i,n,s,r,o,a){const l=[],h=i.getImage();if(h){let t=!0;const e=h.getImageState();e==ua||e==da?t=!1:e==ha&&h.load(),t&&l.push(h.ready())}const c=i.getFill();c&&c.loading()&&l.push(c.ready());const u=l.length>0;return u&&Promise.all(l).then((()=>s(null))),function(t,e,i,n,s,r,o){const a=i.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(n,s),h=i.getRenderer();if(h)Sh(t,l,i,e,o);else{(0,_h[l.getType()])(t,l,i,e,o,r)}}(t,e,i,n,r,o,a),u}function Sh(t,e,i,n,s){if("GeometryCollection"==e.getType()){const r=e.getGeometries();for(let e=0,o=r.length;e<o;++e)Sh(t,r[e],i,n,s);return}t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),s)}const wh=class extends hn{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}};const Ch=class extends pn{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=5}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return mn()}getData(t){return null}prepareFrame(t){return mn()}renderFrame(t,e){return mn()}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==ua&&e.getState()!==da||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=ua&&e!=da&&t.addEventListener(Ui,this.boundHandleImageChange_),e==ha&&(t.load(),e=t.getState()),e==ua}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}},bh=[];let Mh=null;const Rh=class extends Ch{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(t,e,i){let n;Mh||(Mh=ia(1,1,void 0,{willReadFrequently:!0})),Mh.clearRect(0,0,1,1);try{Mh.drawImage(t,e,i,1,1,0,0,1,1),n=Mh.getImageData(0,0,1,1).data}catch{return Mh=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&nn(Ta(t.style.backgroundColor),Ta(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.getContext("2d"))}if(r&&function(t,e){const i=wr(t),n=wr(e);for(let s=0;s<6;++s)if(0!==Math.round((i[s]-n[s])*Sr[s]))return!1;return!0}(r.canvas.style.transform,e)?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=ia();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=Un(i),s=Hn(i),r=Yn(i),o=Zn(i);vr(e.coordinateToPixelTransform,n),vr(e.coordinateToPixelTransform,s),vr(e.coordinateToPixelTransform,r),vr(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;vr(a,n),vr(a,s),vr(a,r),vr(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,s=t.viewState.rotation,r=t.pixelRatio,o=Math.round(qn(i)/n*r),a=Math.round(Kn(i)/n*r);Ir(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/r,1/r,s,-o/2,-a/2),function(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;In(0!==i,"Transformation matrix cannot be inverted");const s=e[0],r=e[1],o=e[2],a=e[3],l=e[4],h=e[5];t[0]=a/i,t[1]=-r/i,t[2]=-o/i,t[3]=s/i,t[4]=(o*h-a*l)/i,t[5]=-(s*h-r*l)/i}(this.inversePixelTransform,this.pixelTransform);const l="matrix("+this.pixelTransform.join(", ")+")";if(this.useContainer(e,l,this.getBackground(t)),!this.containerReused){const t=this.context.canvas;t.width!=o||t.height!=a?(t.width=o,t.height=a):this.context.clearRect(0,0,o,a),l!==t.style.transform&&(t.style.transform=l)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new wh(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(oa,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(aa,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new Fl),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(oa,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(aa,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const a=s/2,l=r/2,h=n/e,c=-h,u=-t[0]+o,d=-t[1];return Ir(this.tempTransform,a,l,h,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}};const Eh=class extends Rh{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,o=s.resolution,a=s.projection,l=s.rotation,h=a.getExtent(),c=this.getLayer().getSource(),u=this.getLayer().getDeclutter(),d=e.pixelRatio,f=e.viewHints,g=!(f[ta]||f[ea]),p=this.context,m=Math.round(qn(n)/o*d),_=Math.round(Kn(n)/o*d),y=c.getWrapX()&&a.canWrapX(),x=y?qn(h):null,v=y?Math.ceil((n[2]-h[2])/x)+1:1;let I=y?Math.floor((n[0]-h[0])/x):0;do{let n=this.getRenderTransform(r,o,0,d,m,_,I*x);e.declutter&&(n=n.slice(0)),t.execute(p,[p.canvas.width,p.canvas.height],n,l,g,void 0===i?Yl:i?Vl:jl,i?u&&e.declutter[u]:void 0)}while(++I<v)}setDrawContext_(){1!==this.opacity_&&(this.targetContext_=this.context,this.context=ia(this.context.canvas.width,this.context.canvas.height,bh))}resetDrawContext_(){if(1!==this.opacity_&&this.targetContext_){const t=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=t,function(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}(this.context),bh.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(t){this.replayGroup_&&this.getLayer().getDeclutter()&&this.renderWorlds(this.replayGroup_,t,!0)}renderDeferredInternal(t){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex];this.opacity_=i.opacity;const n=t.viewState;this.prepareContainer(t,e);const s=this.context,r=this.replayGroup_;let o=r&&!r.isEmpty();if(!o){if(!(this.getLayer().hasListener(oa)||this.getLayer().hasListener(aa)))return this.container}if(this.setDrawContext_(),this.preRender(s,t),n.projection,this.clipped_=!1,o&&i.extent&&this.clipping){const e=mr(i.extent);o=$n(e,t.extent),this.clipped_=o&&!Ln(e,t.extent),this.clipped_&&this.clipUnrotated(s,t,e)}return o&&this.renderWorlds(r,t,!this.getLayer().getDeclutter()&&void 0),!t.declutter&&this.clipped_&&s.restore(),this.postRender(s,t),this.renderedRotation_!==n.rotation&&(this.renderedRotation_=n.rotation,this.hitDetectionImageData_=null),t.declutter||this.resetDrawContext_(),this.container}getFeatures(t){return new Promise((e=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*mh,h=t[1]*mh;a.push(this.getRenderTransform(e,i,n,mh,l,h,0).slice());const c=o.getSource(),u=s.getExtent();if(c.getWrapX()&&s.canWrapX()&&!Ln(u,r)){let t=r[0];const s=qn(u);let o,c=0;for(;t<u[0];)--c,o=s*c,a.push(this.getRenderTransform(e,i,n,mh,l,h,o).slice()),t+=s;for(c=0,t=r[2];t>u[2];)++c,o=s*c,a.push(this.getRenderTransform(e,i,n,mh,l,h,o).slice()),t-=s}this.hitDetectionImageData_=function(t,e,i,n,s,r,o,a,l){const h=l?pr(s):s,c=ia(t[0]*mh,t[1]*mh);c.imageSmoothingEnabled=!1;const u=c.canvas,d=new ph(c,mh,s,null,o,a,l?cr(null,l):null),f=i.length,g=Math.floor(16777215/f),p={};for(let _=1;_<=f;++_){const t=i[_-1],e=t.getStyleFunction()||n;if(!e)continue;let s=e(t,r);if(!s)continue;Array.isArray(s)||(s=[s]);const o=(_*g).toString(16).padStart(7,"#00000");for(let i=0,n=s.length;i<n;++i){const e=s[i],n=e.getGeometryFunction()(t);if(!n||!$n(h,n.getExtent()))continue;const r=e.clone(),a=r.getFill();a&&a.setColor(o);const l=r.getStroke();l&&(l.setColor(o),l.setLineDash(null)),r.setText(void 0);const c=e.getImage();if(c){const t=c.getImageSize();if(!t)continue;const e=ia(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=o,e.fillRect(0,0,i.width,i.height),r.setImage(new oh({img:i,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=r.getZIndex()||0;let d=p[u];d||(d={},p[u]=d,d.Polygon=[],d.Circle=[],d.LineString=[],d.Point=[]);const f=n.getType();if("GeometryCollection"===f){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,r)}}else d[f.replace("Multi","")].push(n,r)}}const m=Object.keys(p).map(Number).sort($i);for(let _=0,y=m.length;_<y;++_){const t=p[m[_]];for(const i in t){const n=t[i];for(let t=0,i=n.length;t<i;t+=2){d.setStyle(n[t+1]);for(let i=0,s=e.length;i<s;++i)d.setTransform(e[i]),d.drawGeometry(n[t])}}}return c.getImageData(0,0,u.width,u.height)}(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n,xh(i,this.renderedPixelRatio_),null)}e(function(t,e,i){const n=[];if(i){const s=Math.floor(Math.round(t[0])*mh),r=Math.floor(Math.round(t[1])*mh),o=4*(ts(s,0,i.width-1)+ts(r,0,i.height-1)*i.width),a=i.data[o],l=i.data[o+1],h=i.data[o+2]+256*(l+256*a),c=Math.floor(16777215/e.length);h&&h%c===0&&n.push(e[h/c-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){var r,o;if(!this.replayGroup_)return;const a=e.viewState.resolution,l=e.viewState.rotation,h=this.getLayer(),c={},u=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(t,a,l,i,(function(t,e,i){const r=yn(t),o=c[r];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return c[r]=!0,s.splice(s.lastIndexOf(o),1),n(t,h,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return c[r]=!0,n(t,h,e);s.push(c[r]={feature:t,layer:h,geometry:e,distanceSq:i,callback:n})}}),u?null==(o=null==(r=e.declutter)?void 0:r[u])?void 0:o.all().map((t=>t.value)):null)}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[ta],s=t.viewHints[ea],r=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!r&&n||!o&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,h=l.projection,c=l.resolution,u=t.pixelRatio,d=e.getRevision(),f=e.getRenderBuffer();let g=e.getRenderOrder();void 0===g&&(g=yh);const p=l.center.slice(),m=An(a,f*c),_=m.slice(),y=[m.slice()],x=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!Ln(x,t.extent)){const t=qn(x),e=Math.max(qn(m)/2,t);m[0]=x[0]-e,m[2]=x[2]+e,us(p,h);const i=Qn(y[0],h);i[0]<x[0]&&i[2]<x[2]?y.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>x[0]&&i[2]>x[2]&&y.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==g&&this.renderedFrameDeclutter_===!!t.declutter&&Ln(this.wrappedRenderedExtent_,m))return nn(this.renderedExtent_,_)||(this.hitDetectionImageData_=null,this.renderedExtent_=_),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const v=new Al(vh(c,u),m,c,u);for(let E=0,k=y.length;E<k;++E)i.loadFeatures(y[E],c,h);const I=xh(c,u);let S=!0;const w=(t,i)=>{let n;const s=t.getStyleFunction()||e.getStyleFunction();if(s&&(n=s(t,c)),n){const e=this.renderFeature(t,I,n,v,undefined,this.getLayer().getDeclutter(),i);S=S&&!e}},C=pr(m),b=i.getFeaturesInExtent(C);g&&b.sort(g);for(let E=0,k=b.length;E<k;++E)w(b[E],E);this.renderedFeatures_=b,this.ready=S;const M=v.finish(),R=new Ul(m,c,u,i.getOverlaps(),M,e.getRenderBuffer(),!!t.declutter);return this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=g,this.renderedFrameDeclutter_=!!t.declutter,this.renderedExtent_=_,this.wrappedRenderedExtent_=m,this.renderedCenter_=p,this.renderedProjection_=h,this.renderedPixelRatio_=u,this.replayGroup_=R,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,s,r,o){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let l=0,h=i.length;l<h;++l)a=Ih(n,t,i[l],e,this.boundHandleStyleImageChange_,s,r,o)||a;else a=Ih(n,t,i,e,this.boundHandleStyleImageChange_,s,r,o);return a}};let kh=0;const Ah=1<<kh++,Th=1<<kh++,Fh=1<<kh++,Lh=1<<kh++,Oh=1<<kh++,Ph=1<<kh++,Dh=Math.pow(2,6)-1,Gh={[Ah]:"boolean",[Th]:"number",[Fh]:"string",[Lh]:"color",[Oh]:"number[]",[Ph]:"size"},Bh=Object.keys(Gh).map(Number).sort($i);function Nh(t){const e=[];for(const i of Bh)Wh(t,i)&&e.push(Gh[i]);return 0===e.length?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function Wh(t,e){return(t&e)===e}function zh(t,e){return t===e}class Xh{constructor(t,e){if(!function(t){return t in Gh}(t))throw new Error(`literal expressions must have a specific type, got ${Nh(t)}`);this.type=t,this.value=e}}class Zh{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function Yh(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,mapState:!1}}function Vh(t,e,i){switch(typeof t){case"boolean":if(zh(e,Fh))return new Xh(Fh,t?"true":"false");if(!Wh(e,Ah))throw new Error(`got a boolean, but expected ${Nh(e)}`);return new Xh(Ah,t);case"number":if(zh(e,Ph))return new Xh(Ph,Hl(t));if(zh(e,Ah))return new Xh(Ah,!!t);if(zh(e,Fh))return new Xh(Fh,t.toString());if(!Wh(e,Th))throw new Error(`got a number, but expected ${Nh(e)}`);return new Xh(Th,t);case"string":if(zh(e,Lh))return new Xh(Lh,Aa(t));if(zh(e,Ah))return new Xh(Ah,!!t);if(!Wh(e,Fh))throw new Error(`got a string, but expected ${Nh(e)}`);return new Xh(Fh,t)}if(!Array.isArray(t))throw new Error("expression must be an array or a primitive value");if(0===t.length)throw new Error("empty expression");if("string"==typeof t[0])return function(t,e,i){const n=t[0],s=Nc[n];if(!s)throw new Error(`unknown operator: ${n}`);return s(t,e,i)}(t,e,i);for(const n of t)if("number"!=typeof n)throw new Error("expected an array of numbers");if(zh(e,Ph)){if(2!==t.length)throw new Error(`expected an array of two values for a size, got ${t.length}`);return new Xh(Ph,t)}if(zh(e,Lh)){if(3===t.length)return new Xh(Lh,[...t,1]);if(4===t.length)return new Xh(Lh,t);throw new Error(`expected an array of 3 or 4 values for a color, got ${t.length}`)}if(!Wh(e,Oh))throw new Error(`got an array of numbers, but expected ${Nh(e)}`);return new Xh(Oh,t)}const jh="get",Kh="var",Uh="concat",Hh="geometry-type",qh="line-metric",$h="any",Jh="all",Qh="!",tc="resolution",ec="zoom",ic="time",nc="==",sc="!=",rc=">",oc=">=",ac="<",lc="<=",hc="*",cc="/",uc="+",dc="-",fc="clamp",gc="%",pc="^",mc="abs",_c="floor",yc="ceil",xc="round",vc="sin",Ic="cos",Sc="atan",wc="sqrt",Cc="match",bc="between",Mc="interpolate",Rc="coalesce",Ec="case",kc="in",Ac="number",Tc="string",Fc="array",Lc="color",Oc="id",Pc="band",Dc="palette",Gc="to-string",Bc="has",Nc={[jh]:Kc(Zc(1,1/0),Wc),[Kh]:Kc(Zc(1,1),(function(t,e,i){const n=t[1];if("string"!=typeof n)throw new Error("expected a string argument for var operation");return i.variables.add(n),[new Xh(Fh,n)]})),[Bc]:Kc(Zc(1,1/0),Wc),[Oc]:Kc((function(t,e,i){i.featureId=!0}),Xc),[Uh]:Kc(Zc(2,1/0),Vc(Fh)),[Hh]:Kc((function(t,e,i){i.geometryType=!0}),Xc),[qh]:Kc(Xc),[tc]:Kc(zc,Xc),[ec]:Kc(zc,Xc),[ic]:Kc(zc,Xc),[$h]:Kc(Zc(2,1/0),Vc(Ah)),[Jh]:Kc(Zc(2,1/0),Vc(Ah)),[Qh]:Kc(Zc(1,1),Vc(Ah)),[nc]:Kc(Zc(2,2),Vc(Dh)),[sc]:Kc(Zc(2,2),Vc(Dh)),[rc]:Kc(Zc(2,2),Vc(Th)),[oc]:Kc(Zc(2,2),Vc(Th)),[ac]:Kc(Zc(2,2),Vc(Th)),[lc]:Kc(Zc(2,2),Vc(Th)),[hc]:Kc(Zc(2,1/0),Yc),[Rc]:Kc(Zc(2,1/0),Yc),[cc]:Kc(Zc(2,2),Vc(Th)),[uc]:Kc(Zc(2,1/0),Vc(Th)),[dc]:Kc(Zc(2,2),Vc(Th)),[fc]:Kc(Zc(3,3),Vc(Th)),[gc]:Kc(Zc(2,2),Vc(Th)),[pc]:Kc(Zc(2,2),Vc(Th)),[mc]:Kc(Zc(1,1),Vc(Th)),[_c]:Kc(Zc(1,1),Vc(Th)),[yc]:Kc(Zc(1,1),Vc(Th)),[xc]:Kc(Zc(1,1),Vc(Th)),[vc]:Kc(Zc(1,1),Vc(Th)),[Ic]:Kc(Zc(1,1),Vc(Th)),[Sc]:Kc(Zc(1,2),Vc(Th)),[wc]:Kc(Zc(1,1),Vc(Th)),[Cc]:Kc(Zc(4,1/0),jc,(function(t,e,i){const n=t.length-1,s=Fh|Th|Ah,r=Vh(t[1],s,i),o=Vh(t[t.length-1],e,i),a=new Array(n-2);for(let h=0;h<n-2;h+=2){try{const e=Vh(t[h+2],r.type,i);a[h]=e}catch(l){throw new Error(`failed to parse argument ${h+1} of match expression: ${l.message}`)}try{const e=Vh(t[h+3],o.type,i);a[h+1]=e}catch(l){throw new Error(`failed to parse argument ${h+2} of match expression: ${l.message}`)}}return[r,...a,o]})),[bc]:Kc(Zc(3,3),Vc(Th)),[Mc]:Kc(Zc(6,1/0),jc,(function(t,e,i){const n=t[1];let s;switch(n[0]){case"linear":s=1;break;case"exponential":const t=n[1];if("number"!=typeof t||t<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(t)} instead`);s=t;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(n)}`)}const r=new Xh(Th,s);let o;try{o=Vh(t[2],Th,i)}catch(l){throw new Error(`failed to parse argument 1 in interpolate expression: ${l.message}`)}const a=new Array(t.length-3);for(let h=0;h<a.length;h+=2){try{const e=Vh(t[h+3],Th,i);a[h]=e}catch(l){throw new Error(`failed to parse argument ${h+2} for interpolate expression: ${l.message}`)}try{const n=Vh(t[h+4],e,i);a[h+1]=n}catch(l){throw new Error(`failed to parse argument ${h+3} for interpolate expression: ${l.message}`)}}return[r,o,...a]})),[Ec]:Kc(Zc(3,1/0),(function(t,e,i){const n=t[0],s=t.length-1;if(s%2==0)throw new Error(`expected an odd number of arguments for ${n}, got ${s} instead`)}),(function(t,e,i){const n=Vh(t[t.length-1],e,i),s=new Array(t.length-1);for(let o=0;o<s.length-1;o+=2){try{const e=Vh(t[o+1],Ah,i);s[o]=e}catch(r){throw new Error(`failed to parse argument ${o} of case expression: ${r.message}`)}try{const e=Vh(t[o+2],n.type,i);s[o+1]=e}catch(r){throw new Error(`failed to parse argument ${o+1} of case expression: ${r.message}`)}}return s[s.length-1]=n,s})),[kc]:Kc(Zc(2,2),(function(t,e,i){let n,s=t[2];if(!Array.isArray(s))throw new Error('the second argument for the "in" operator must be an array');if("string"==typeof s[0]){if("literal"!==s[0])throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(s[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');s=s[1],n=Fh}else n=Th;const r=new Array(s.length);for(let a=0;a<r.length;a++)try{const t=Vh(s[a],n,i);r[a]=t}catch(o){throw new Error(`failed to parse haystack item ${a} for "in" expression: ${o.message}`)}return[Vh(t[1],n,i),...r]})),[Ac]:Kc(Zc(1,1/0),Vc(Dh)),[Tc]:Kc(Zc(1,1/0),Vc(Dh)),[Fc]:Kc(Zc(1,1/0),Vc(Th)),[Lc]:Kc(Zc(1,4),Vc(Th)),[Pc]:Kc(Zc(1,3),Vc(Th)),[Dc]:Kc(Zc(2,2),(function(t,e,i){let n;try{n=Vh(t[1],Th,i)}catch(o){throw new Error(`failed to parse first argument in palette expression: ${o.message}`)}const s=t[2];if(!Array.isArray(s))throw new Error("the second argument of palette must be an array");const r=new Array(s.length);for(let a=0;a<r.length;a++){let t;try{t=Vh(s[a],Lh,i)}catch(o){throw new Error(`failed to parse color at index ${a} in palette expression: ${o.message}`)}if(!(t instanceof Xh))throw new Error(`the palette color at index ${a} must be a literal value`);r[a]=t}return[n,...r]})),[Gc]:Kc(Zc(1,1),Vc(Ah|Th|Fh|Lh))};function Wc(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r<n;++r){const e=t[r+1];switch(typeof e){case"number":s[r]=new Xh(Th,e);break;case"string":s[r]=new Xh(Fh,e);break;default:throw new Error(`expected a string key or numeric array index for a get operation, got ${e}`)}0===r&&i.properties.add(String(e))}return s}function zc(t,e,i){i.mapState=!0}function Xc(t,e,i){const n=t[0];if(1!==t.length)throw new Error(`expected no arguments for ${n} operation`);return[]}function Zc(t,e){return function(i,n,s){const r=i[0],o=i.length-1;if(t===e){if(o!==t){throw new Error(`expected ${t} argument${1===t?"":"s"} for ${r}, got ${o}`)}}else if(o<t||o>e){throw new Error(`expected ${e===1/0?`${t} or more`:`${t} to ${e}`} arguments for ${r}, got ${o}`)}}}function Yc(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r<n;++r){const n=Vh(t[r+1],e,i);s[r]=n}return s}function Vc(t){return function(e,i,n){const s=e.length-1,r=new Array(s);for(let o=0;o<s;++o){const i=Vh(e[o+1],t,n);r[o]=i}return r}}function jc(t,e,i){const n=t[0],s=t.length-1;if(s%2==1)throw new Error(`expected an even number of arguments for operation ${n}, got ${s} instead`)}function Kc(...t){return function(e,i,n){const s=e[0];let r;for(let o=0;o<t.length;o++){const s=t[o](e,i,n);if(o==t.length-1){if(!s)throw new Error("expected last argument validator to return the parsed args");r=s}}return new Zh(i,s,...r)}}function Uc(t){if(!t)return"";const e=t.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return Uc(t.getGeometries()[0]);default:return""}}function Hc(t,e,i){return qc(Vh(t,e,i))}function qc(t,e){if(t instanceof Xh){if(t.type===Lh&&"string"==typeof t.value){const e=Aa(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case Ac:case Tc:case Rc:return function(t){const e=t.operator,i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=qc(t.args[s]);switch(e){case Rc:return t=>{for(let e=0;e<i;++e){const i=n[e](t);if(null!=i)return i}throw new Error("Expected one of the values to be non-null")};case Ac:case Tc:return t=>{for(let s=0;s<i;++s){const i=n[s](t);if(typeof i===e)return i}throw new Error(`Expected one of the values to be a ${e}`)};default:throw new Error(`Unsupported assertion operator ${e}`)}}(t);case jh:case Kh:case Bc:return function(t){const e=t.args[0],i=e.value;switch(t.operator){case jh:return e=>{const n=t.args;let s=e.properties[i];for(let t=1,i=n.length;t<i;++t){s=s[n[t].value]}return s};case Kh:return t=>t.variables[i];case Bc:return e=>{const n=t.args;if(!(i in e.properties))return!1;let s=e.properties[i];for(let t=1,i=n.length;t<i;++t){const e=n[t].value;if(!s||!Object.hasOwn(s,e))return!1;s=s[e]}return!0};default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case Oc:return t=>t.featureId;case Hh:return t=>t.geometryType;case Uh:{const e=t.args.map((t=>qc(t)));return t=>"".concat(...e.map((e=>e(t).toString())))}case tc:return t=>t.resolution;case $h:case Jh:case bc:case kc:case Qh:return function(t){const e=t.operator,i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=qc(t.args[s]);switch(e){case $h:return t=>{for(let e=0;e<i;++e)if(n[e](t))return!0;return!1};case Jh:return t=>{for(let e=0;e<i;++e)if(!n[e](t))return!1;return!0};case bc:return t=>{const e=n[0](t),i=n[1](t),s=n[2](t);return e>=i&&e<=s};case kc:return t=>{const e=n[0](t);for(let s=1;s<i;++s)if(e===n[s](t))return!0;return!1};case Qh:return t=>!n[0](t);default:throw new Error(`Unsupported logical operator ${e}`)}}(t);case nc:case sc:case ac:case lc:case rc:case oc:return function(t){const e=t.operator,i=qc(t.args[0]),n=qc(t.args[1]);switch(e){case nc:return t=>i(t)===n(t);case sc:return t=>i(t)!==n(t);case ac:return t=>i(t)<n(t);case lc:return t=>i(t)<=n(t);case rc:return t=>i(t)>n(t);case oc:return t=>i(t)>=n(t);default:throw new Error(`Unsupported comparison operator ${e}`)}}(t);case hc:case cc:case uc:case dc:case fc:case gc:case pc:case mc:case _c:case yc:case xc:case vc:case Ic:case Sc:case wc:return function(t){const e=t.operator,i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=qc(t.args[s]);switch(e){case hc:return t=>{let e=1;for(let s=0;s<i;++s)e*=n[s](t);return e};case cc:return t=>n[0](t)/n[1](t);case uc:return t=>{let e=0;for(let s=0;s<i;++s)e+=n[s](t);return e};case dc:return t=>n[0](t)-n[1](t);case fc:return t=>{const e=n[0](t),i=n[1](t);if(e<i)return i;const s=n[2](t);return e>s?s:e};case gc:return t=>n[0](t)%n[1](t);case pc:return t=>Math.pow(n[0](t),n[1](t));case mc:return t=>Math.abs(n[0](t));case _c:return t=>Math.floor(n[0](t));case yc:return t=>Math.ceil(n[0](t));case xc:return t=>Math.round(n[0](t));case vc:return t=>Math.sin(n[0](t));case Ic:return t=>Math.cos(n[0](t));case Sc:return 2===i?t=>Math.atan2(n[0](t),n[1](t)):t=>Math.atan(n[0](t));case wc:return t=>Math.sqrt(n[0](t));default:throw new Error(`Unsupported numeric operator ${e}`)}}(t);case Ec:return function(t){const e=t.args.length,i=new Array(e);for(let n=0;n<e;++n)i[n]=qc(t.args[n]);return t=>{for(let n=0;n<e-1;n+=2){if(i[n](t))return i[n+1](t)}return i[e-1](t)}}(t);case Cc:return function(t){const e=t.args.length,i=new Array(e);for(let n=0;n<e;++n)i[n]=qc(t.args[n]);return t=>{const n=i[0](t);for(let s=1;s<e-1;s+=2)if(n===i[s](t))return i[s+1](t);return i[e-1](t)}}(t);case Mc:return function(t){const e=t.args.length,i=new Array(e);for(let n=0;n<e;++n)i[n]=qc(t.args[n]);return t=>{const n=i[0](t),s=i[1](t);let r,o;for(let a=2;a<e;a+=2){const e=i[a](t);let l=i[a+1](t);const h=Array.isArray(l);if(h&&(l=Ca(l)),e>=s)return 2===a?l:h?Jc(n,s,r,o,e,l):$c(n,s,r,o,e,l);r=e,o=l}return o}}(t);case Gc:return function(t){const e=t.operator,i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=qc(t.args[s]);if(e===Gc)return e=>{const i=n[0](e);return t.args[0].type===Lh?Fa(i):i.toString()};throw new Error(`Unsupported convert operator ${e}`)}(t);default:throw new Error(`Unsupported operator ${i}`)}}function $c(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i;return n+(1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1))*(r-n)}function Jc(t,e,i,n,s,r){if(0===s-i)return n;const o=ka(n),a=ka(r);let l=a[2]-o[2];l>180?l-=360:l<-180&&(l+=360);return function(t){const e=(t[0]+16)/116,i=t[1],n=t[2]*Math.PI/180,s=Ma(e),r=Ma(e+i/500*Math.cos(n)),o=Ma(e-i/200*Math.sin(n)),a=ba(3.021973625*r-1.617392459*s-.404875592*o),l=ba(-.943766287*r+1.916279586*s+.027607165*o),h=ba(.069407491*r-.22898585*s+1.159737864*o);return[ts(a+.5|0,0,255),ts(l+.5|0,0,255),ts(h+.5|0,0,255),t[3]]}([$c(t,e,i,o[0],s,a[0]),$c(t,e,i,o[1],s,a[1]),o[2]+$c(t,e,i,0,s,l),$c(t,e,i,n[3],s,r[3])])}function Qc(t){return!0}function tu(t){const e=Yh(),i=function(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s){const i=t[s],r="filter"in i?Hc(i.filter,Ah,e):Qc;let o;if(Array.isArray(i.style)){const t=i.style.length;o=new Array(t);for(let n=0;n<t;++n)o[n]=iu(i.style[n],e)}else o=[iu(i.style,e)];n[s]={filter:r,styles:o}}return function(e){const s=[];let r=!1;for(let o=0;o<i;++o){if((0,n[o].filter)(e)&&(!t[o].else||!r)){r=!0;for(const t of n[o].styles){const i=t(e);i&&s.push(i)}}}return s}}(t,e),n={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""};return function(t,s){if(n.properties=t.getPropertiesInternal(),n.resolution=s,e.featureId){const e=t.getId();n.featureId=void 0!==e?e:null}return e.geometryType&&(n.geometryType=Uc(t.getGeometry())),i(n)}}function eu(t){const e=Yh(),i=t.length,n=new Array(i);for(let o=0;o<i;++o)n[o]=iu(t[o],e);const s={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""},r=new Array(i);return function(t,o){if(s.properties=t.getPropertiesInternal(),s.resolution=o,e.featureId){const e=t.getId();s.featureId=void 0!==e?e:null}let a=0;for(let e=0;e<i;++e){const t=n[e](s);t&&(r[a]=t,a+=1)}return r.length=a,r}}function iu(t,e){const i=nu(t,"",e),n=su(t,"",e),s=function(t,e){const i="text-",n=ou(t,i+"value",e);if(!n)return null;const s=nu(t,i,e),r=nu(t,i+"background-",e),o=su(t,i,e),a=su(t,i+"background-",e),l=ou(t,i+"font",e),h=ru(t,i+"max-angle",e),c=ru(t,i+"offset-x",e),u=ru(t,i+"offset-y",e),d=au(t,i+"overflow",e),f=ou(t,i+"placement",e),g=ru(t,i+"repeat",e),p=du(t,i+"scale",e),m=au(t,i+"rotate-with-view",e),_=ru(t,i+"rotation",e),y=ou(t,i+"align",e),x=ou(t,i+"justify",e),v=ou(t,i+"baseline",e),I=au(t,i+"keep-upright",e),S=hu(t,i+"padding",e),w=mu(t,i+"declutter-mode"),C=new gh({declutterMode:w});return function(t){if(C.setText(n(t)),s&&C.setFill(s(t)),r&&C.setBackgroundFill(r(t)),o&&C.setStroke(o(t)),a&&C.setBackgroundStroke(a(t)),l&&C.setFont(l(t)),h&&C.setMaxAngle(h(t)),c&&C.setOffsetX(c(t)),u&&C.setOffsetY(u(t)),d&&C.setOverflow(d(t)),f){const e=f(t);if("point"!==e&&"line"!==e)throw new Error("Expected point or line for text-placement");C.setPlacement(e)}if(g&&C.setRepeat(g(t)),p&&C.setScale(p(t)),m&&C.setRotateWithView(m(t)),_&&C.setRotation(_(t)),y){const e=y(t);if("left"!==e&&"center"!==e&&"right"!==e&&"end"!==e&&"start"!==e)throw new Error("Expected left, right, center, start, or end for text-align");C.setTextAlign(e)}if(x){const e=x(t);if("left"!==e&&"right"!==e&&"center"!==e)throw new Error("Expected left, right, or center for text-justify");C.setJustify(e)}if(v){const e=v(t);if("bottom"!==e&&"top"!==e&&"middle"!==e&&"alphabetic"!==e&&"hanging"!==e)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");C.setTextBaseline(e)}return S&&C.setPadding(S(t)),I&&C.setKeepUpright(I(t)),C}}(t,e),r=function(t,e){if("icon-src"in t)return function(t,e){const i="icon-",n=i+"src",s=yu(t[n],n),r=cu(t,i+"anchor",e),o=du(t,i+"scale",e),a=ru(t,i+"opacity",e),l=cu(t,i+"displacement",e),h=ru(t,i+"rotation",e),c=au(t,i+"rotate-with-view",e),u=gu(t,i+"anchor-origin"),d=pu(t,i+"anchor-x-units"),f=pu(t,i+"anchor-y-units"),g=function(t,e){const i=t[e];if(void 0===i)return;return vu(i,e)}(t,i+"color"),p=function(t,e){const i=t[e];if(void 0===i)return;if("string"!=typeof i)throw new Error(`Expected a string for ${e}`);return i}(t,i+"cross-origin"),m=function(t,e){const i=t[e];if(void 0===i)return;return _u(i,e)}(t,i+"offset"),_=gu(t,i+"offset-origin"),y=fu(t,i+"width"),x=fu(t,i+"height"),v=function(t,e){const i=t[e];if(void 0===i)return;if("number"==typeof i)return Hl(i);if(!Array.isArray(i))throw new Error(`Expected a number or size array for ${e}`);if(2!==i.length||"number"!=typeof i[0]||"number"!=typeof i[1])throw new Error(`Expected a number or size array for ${e}`);return i}(t,i+"size"),I=mu(t,i+"declutter-mode"),S=new oh({src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:f,color:g,crossOrigin:p,offset:m,offsetOrigin:_,height:x,width:y,size:v,declutterMode:I});return function(t){return a&&S.setOpacity(a(t)),l&&S.setDisplacement(l(t)),h&&S.setRotation(h(t)),c&&S.setRotateWithView(c(t)),o&&S.setScale(o(t)),r&&S.setAnchor(r(t)),S}}(t,e);if("shape-points"in t)return function(t,e){const i="shape-",n=i+"points",s=i+"radius",r=xu(t[n],n),o=xu(t[s],s),a=nu(t,i,e),l=su(t,i,e),h=du(t,i+"scale",e),c=cu(t,i+"displacement",e),u=ru(t,i+"rotation",e),d=au(t,i+"rotate-with-view",e),f=fu(t,i+"radius2"),g=fu(t,i+"angle"),p=mu(t,i+"declutter-mode"),m=new Ql({points:r,radius:o,radius2:f,angle:g,declutterMode:p});return function(t){return a&&m.setFill(a(t)),l&&m.setStroke(l(t)),c&&m.setDisplacement(c(t)),u&&m.setRotation(u(t)),d&&m.setRotateWithView(d(t)),h&&m.setScale(h(t)),m}}(t,e);if("circle-radius"in t)return function(t,e){const i="circle-",n=nu(t,i,e),s=su(t,i,e),r=ru(t,i+"radius",e),o=du(t,i+"scale",e),a=cu(t,i+"displacement",e),l=ru(t,i+"rotation",e),h=au(t,i+"rotate-with-view",e),c=mu(t,i+"declutter-mode"),u=new eh({radius:5,declutterMode:c});return function(t){return r&&u.setRadius(r(t)),n&&u.setFill(n(t)),s&&u.setStroke(s(t)),a&&u.setDisplacement(a(t)),l&&u.setRotation(l(t)),h&&u.setRotateWithView(h(t)),o&&u.setScale(o(t)),u}}(t,e);return null}(t,e),o=ru(t,"z-index",e);if(!(i||n||s||r||ln(t)))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));const a=new hh;return function(t){let e=!0;if(i){const n=i(t);n&&(e=!1),a.setFill(n)}if(n){const i=n(t);i&&(e=!1),a.setStroke(i)}if(s){const i=s(t);i&&(e=!1),a.setText(i)}if(r){const i=r(t);i&&(e=!1),a.setImage(i)}return o&&a.setZIndex(o(t)),e?null:a}}function nu(t,e,i){let n;if(e+"fill-pattern-src"in t)n=function(t,e,i){const n=ou(t,e+"pattern-src",i),s=uu(t,e+"pattern-offset",i),r=uu(t,e+"pattern-size",i),o=lu(t,e+"color",i);return function(t){return{src:n(t),offset:s&&s(t),size:r&&r(t),color:o&&o(t)}}}(t,e+"fill-",i);else{if("none"===t[e+"fill-color"])return t=>null;n=lu(t,e+"fill-color",i)}if(!n)return null;const s=new nh;return function(t){const e=n(t);return e===fa?null:(s.setColor(e),s)}}function su(t,e,i){const n=ru(t,e+"stroke-width",i),s=lu(t,e+"stroke-color",i);if(!n&&!s)return null;const r=ou(t,e+"stroke-line-cap",i),o=ou(t,e+"stroke-line-join",i),a=hu(t,e+"stroke-line-dash",i),l=ru(t,e+"stroke-line-dash-offset",i),h=ru(t,e+"stroke-miter-limit",i),c=new lh;return function(t){if(s){const e=s(t);if(e===fa)return null;c.setColor(e)}if(n&&c.setWidth(n(t)),r){const e=r(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw new Error("Expected butt, round, or square line cap");c.setLineCap(e)}if(o){const e=o(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw new Error("Expected bevel, round, or miter line join");c.setLineJoin(e)}return a&&c.setLineDash(a(t)),l&&c.setLineDashOffset(l(t)),h&&c.setMiterLimit(h(t)),c}}function ru(t,e,i){if(!(e in t))return;const n=Hc(t[e],Th,i);return function(t){return xu(n(t),e)}}function ou(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Fh,i);return function(t){return yu(n(t),e)}}function au(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Ah,i);return function(t){const i=n(t);if("boolean"!=typeof i)throw new Error(`Expected a boolean for ${e}`);return i}}function lu(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Lh,i);return function(t){return vu(n(t),e)}}function hu(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Oh,i);return function(t){return _u(n(t),e)}}function cu(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Oh,i);return function(t){const i=_u(n(t),e);if(2!==i.length)throw new Error(`Expected two numbers for ${e}`);return i}}function uu(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Oh,i);return function(t){return Iu(n(t),e)}}function du(t,e,i){if(!(e in t))return null;const n=Hc(t[e],Oh|Th,i);return function(t){return function(t,e){if("number"==typeof t)return t;return Iu(t,e)}(n(t),e)}}function fu(t,e){const i=t[e];if(void 0!==i){if("number"!=typeof i)throw new Error(`Expected a number for ${e}`);return i}}function gu(t,e){const i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return i}}function pu(t,e){const i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw new Error(`Expected pixels or fraction for ${e}`);return i}}function mu(t,e){const i=t[e];if(void 0!==i){if("string"!=typeof i)throw new Error(`Expected a string for ${e}`);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw new Error(`Expected declutter, obstacle, or none for ${e}`);return i}}function _u(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const i=t.length;for(let n=0;n<i;++n)if("number"!=typeof t[n])throw new Error(`Expected an array of numbers for ${e}`);return t}function yu(t,e){if("string"!=typeof t)throw new Error(`Expected a string for ${e}`);return t}function xu(t,e){if("number"!=typeof t)throw new Error(`Expected a number for ${e}`);return t}function vu(t,e){if("string"==typeof t)return t;const i=_u(t,e),n=i.length;if(n<3||n>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function Iu(t,e){const i=_u(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const Su={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function wu(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const l=e?0:r[0]*s,h=e?0:r[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+l/2+c,f=t[2]-l/2+c,g=t[1]+h/2+u,p=t[3]-h/2+u;d>f&&(d=(f+d)/2,f=d),g>p&&(g=(p+g)/2,p=g);let m=ts(n[0],d,f),_=ts(n[1],g,p);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-f)/t),_+=-t*Math.log(1+Math.max(0,g-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,_]}}function Cu(t){return t}function bu(t){return 1-function(t){return Math.pow(t,3)}(1-t)}function Mu(t){return 3*t*t-2*t*t*t}function Ru(t,e,i,n){const s=qn(e)/i[0],r=Kn(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function Eu(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),ts(n,i/2,2*e)}function ku(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,l){if(void 0!==r){const o=n?Ru(t,n,a,s):t;return i&&l?Eu(r,o,e):ts(r,e,o)}}}function Au(t){if(void 0!==t)return 0}function Tu(t){if(void 0!==t)return t}function Fu(t,e){setTimeout((function(){t(e)}),0)}function Lu(t){return!(t.sourceCenter&&t.targetCenter&&!cs(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Ou(t,e,i,n,s){const r=Math.cos(-s);let o=Math.sin(-s),a=t[0]*r-t[1]*o,l=t[1]*r+t[0]*o;a+=(e[0]/2-i[0])*n,l+=(i[1]-e[1]/2)*n,o=-o;return[a*r-l*o,l*r+a*o]}const Pu=class extends vn{constructor(t){var e;super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=hr(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(sr=!(void 0===e||e)),t.center&&(t.center=gr(t.center,this.projection_)),t.extent&&(t.extent=mr(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const o in Su)delete e[o];this.setProperties(e,!0);const i=function(t){let e,i,n;const s=28,r=2;let o=void 0!==t.minZoom?t.minZoom:0,a=void 0!==t.maxZoom?t.maxZoom:s;const l=void 0!==t.zoomFactor?t.zoomFactor:r,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,d=hr(t.projection,"EPSG:3857"),f=d.getExtent();let g=t.constrainOnlyCenter,p=t.extent;h||p||!d.isGlobal()||(g=!1,p=f);if(void 0!==t.resolutions){const s=t.resolutions;i=s[o],n=void 0!==s[a]?s[a]:s[s.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?Ru(l,i,o,n):l;if(a)return e?Eu(s,c,h):ts(s,h,c);const u=Math.min(c,s),d=Math.floor(Qi(t,u,r));return t[d]>c&&d<t.length-1?t[d+1]:t[d]}}}(s,c,!g&&p,u):ku(i,n,c,!g&&p,u)}else{const h=(f?Math.max(qn(f),Kn(f)):360*ds.degrees/d.getMetersPerUnit())/256/Math.pow(r,0),m=h/Math.pow(r,s-0);i=t.maxResolution,void 0!==i?o=0:i=h/Math.pow(l,o),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,a):h/Math.pow(l,a):m),a=o+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,a-o),e=t.constrainResolution?function(t,e,i,n,s,r){return n=void 0===n||n,i=void 0!==i?i:0,function(o,a,l,h){if(void 0!==o){const c=s?Ru(e,s,l,r):e;if(h)return n?Eu(o,c,i):ts(o,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),f=-a*(.5-u)+.5,g=Math.min(c,o),p=Math.floor(Math.log(e/g)/Math.log(t)+f),m=Math.max(d,p);return ts(e/Math.pow(t,m),i,c)}}}(l,i,n,c,!g&&p,u):ku(i,n,c,!g&&p,u)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:o,zoomFactor:l}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=function(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return wu(t.extent,t.constrainOnlyCenter,e)}const e=hr(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,wu(t,!1,!1)}return Cu}(t),s=i.constraint,r=function(t){const e=void 0===t.enableRotation||t.enableRotation;if(e){const e=t.constrainRotation;return void 0===e||!0===e?function(t){const e=void 0===t?ss(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}():!1===e?Tu:"number"==typeof e?function(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}(e):Tu}return Au}(t);this.constraints_={center:n,resolution:s,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),r=s/2*(n[3]-e[3]+e[1]-n[1]),o=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+r,i[1]-o])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let i=0;i<e.length;++i){let t=arguments[i];t.center&&(t=Object.assign({},t),t.center=gr(t.center,this.getProjection())),t.anchor&&(t=Object.assign({},t),t.anchor=gr(t.anchor,this.getProjection())),e[i]=t}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&Fu(e,!0));let s=Date.now(),r=this.targetCenter_.slice(),o=this.targetResolution_,a=this.targetRotation_;const l=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||Mu,callback:e};if(t.center&&(i.sourceCenter=r,i.targetCenter=t.center.slice(),r=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=o,i.targetResolution=this.getResolutionForZoom(t.zoom),o=i.targetResolution):t.resolution&&(i.sourceResolution=o,i.targetResolution=t.resolution,o=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=rs(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}Lu(i)?i.complete=!0:s+=i.duration,l.push(i)}this.animations_.push(l),this.setHint(ta,1),this.updateAnimations_()}getAnimating(){return this.hints_[ta]>0}getInteracting(){return this.hints_[ea]>0}cancelAnimations(){let t;this.setHint(ta,-this.hints_[ta]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&Fu(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,r=n.length;i<r;++i){const r=n[i];if(r.complete)continue;const o=t-r.start;let a=r.duration>0?o/r.duration:1;a>=1?(r.complete=!0,a=1):s=!1;const l=r.easing(a);if(r.sourceCenter){const t=r.sourceCenter[0],e=r.sourceCenter[1],i=r.targetCenter[0],n=r.targetCenter[1];this.nextCenter_=r.targetCenter;const s=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[s,o]}if(r.sourceResolution&&r.targetResolution){const t=1===l?r.targetResolution:r.sourceResolution+l*(r.targetResolution-r.sourceResolution);if(r.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,r.anchor)}this.nextResolution_=r.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==r.sourceRotation&&void 0!==r.targetRotation){const t=1===l?rs(r.targetRotation+Math.PI,2*Math.PI)-Math.PI:r.sourceRotation+l*(r.targetRotation-r.sourceRotation);if(r.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,r.anchor)}this.nextRotation_=r.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!r.complete)break}if(s){this.animations_[i]=null,this.setHint(ta,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&Fu(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],function(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;t[0]=s,t[1]=r}(i,t-this.getRotation()),hs(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();if(void 0!==n&&void 0!==s){i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?fr(t,this.getProjection()):t}getCenterInternal(){return this.get(Su.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return pr(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();In(e,"The view center is not defined");const i=this.getResolution();In(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return In(void 0!==n,"The view rotation is not defined"),jn(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Su.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(mr(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=qn(t)/e[0],n=Kn(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(Su.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=Ou(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=Qi(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){var e;if(null==(e=this.resolutions_)?void 0:e.length){if(1===this.resolutions_.length)return this.resolutions_[0];const e=ts(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,ts(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(In(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){In(!Jn(t),"Cannot fit empty extent provided as `geometry`");i=fo(mr(t,this.getProjection()))}else if("Circle"===t.getType()){const e=mr(t.getExtent(),this.getProjection());i=fo(e),i.rotate(this.getRotation(),Vn(e))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let c=0,u=s.length;c<u;c+=r){const t=s[c]*i-s[c+1]*n,e=s[c]*n+s[c+1]*i;o=Math.min(o,t),a=Math.min(a,e),l=Math.max(l,t),h=Math.max(h,e)}return[o,a,l,h]}fitInternal(t,e){let i=(e=e||{}).size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let r;r=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const o=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(o,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?r:Math.max(a,r),a=this.getConstrainedResolution(a,s?0:1);const l=this.getRotation(),h=Math.sin(l),c=Math.cos(l),u=Vn(o);u[0]+=(n[1]-n[3])/2*a,u[1]+=(n[0]-n[2])/2*a;const d=u[0]*c-u[1]*h,f=u[1]*c+u[0]*h,g=this.getConstrainedCenter([d,f],a),p=e.callback?e.callback:rn;void 0!==e.duration?this.animateInternal({resolution:a,center:g,duration:e.duration,easing:e.easing},p):(this.targetResolution_=a,this.targetCenter_=g,this.applyTargetState_(!1,!0),Fu(p,!0))}centerOn(t,e,i){this.centerOnInternal(gr(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(Ou(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const r=this.padding_;if(r&&t){const o=this.getViewportSizeMinusPadding_(-i),a=Ou(t,n,[o[0]/2+r[3],o[1]/2+r[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=fr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&gr(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=gr(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?gr(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),r=this.constraints_.resolution(this.targetResolution_,0,s,i),o=this.constraints_.center(this.targetCenter_,r,s,i,this.calculateCenterShift(this.targetCenter_,r,n,s));this.get(Su.ROTATION)!==n&&this.set(Su.ROTATION,n),this.get(Su.RESOLUTION)!==r&&(this.set(Su.RESOLUTION,r),this.set("zoom",this.getZoom(),!0)),o&&this.get(Su.CENTER)&&cs(this.get(Su.CENTER),o)||this.set(Su.CENTER,o),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,n,r),a=this.constraints_.center(this.targetCenter_,o,r,!1,this.calculateCenterShift(this.targetCenter_,o,s,r));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===s&&this.getCenterInternal()&&cs(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:o,duration:t,easing:bu,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(ea,1)}endInteraction(t,e,i){i=i&&gr(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(ea,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}},Du="opacity",Gu="visible",Bu="extent",Nu="zIndex",Wu="maxResolution",zu="minResolution",Xu="maxZoom",Zu="minZoom",Yu="source",Vu="map";const ju=class extends vn{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[Du]=void 0!==t.opacity?t.opacity:1,In("number"==typeof e[Du],"Layer opacity must be a number"),e[Gu]=void 0===t.visible||t.visible,e[Nu]=t.zIndex,e[Wu]=void 0!==t.maxResolution?t.maxResolution:1/0,e[zu]=void 0!==t.minResolution?t.minResolution:0,e[Zu]=void 0!==t.minZoom?t.minZoom:-1/0,e[Xu]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=ts(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return mn()}getLayerStatesArray(t){return mn()}getExtent(){return this.get(Bu)}getMaxResolution(){return this.get(Wu)}getMinResolution(){return this.get(zu)}getMinZoom(){return this.get(Zu)}getMaxZoom(){return this.get(Xu)}getOpacity(){return this.get(Du)}getSourceState(){return mn()}getVisible(){return this.get(Gu)}getZIndex(){return this.get(Nu)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Bu,t)}setMaxResolution(t){this.set(Wu,t)}setMinResolution(t){this.set(zu,t)}setMaxZoom(t){this.set(Xu,t)}setMinZoom(t){this.set(Zu,t)}setOpacity(t){In("number"==typeof t,"Layer opacity must be a number"),this.set(Du,t)}setVisible(t){this.set(Gu,t)}setZIndex(t){this.set(Nu,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}};const Ku=class extends ju{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Yu,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(Yu)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(fn(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=un(t,Ui,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;if(!t&&i&&(t=i.getView()),e=t instanceof Pu?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),e.layerStatesArray){if(n=e.layerStatesArray.find((t=>t.layer===this)),!n)return!1}else n=this.getLayerState();const s=this.getExtent();return function(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}(n,e.viewState)&&(!s||$n(s,e.extent))}getAttributions(t){var e;if(!this.isVisible(t))return[];const i=null==(e=this.getSource())?void 0:e.getAttributions();if(!i)return[];let n=i(t instanceof Pu?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(Vu,t)}getMapInternal(){return this.get(Vu)}setMap(t){this.mapPrecomposeKey_&&(fn(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(fn(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=un(t,la,this.handlePrecompose_,this),this.mapRenderKey_=un(this,Ui,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);In(!e.some((t=>t.layer===i.layer)),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(Yu,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}},Uu="renderOrder";const Hu=class extends Ku{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Uu)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter==!1&&(t.declutter[i]=new vo(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Uu,t)}setStyle(t){this.style_=void 0===t?uh:t;const e=function(t){if(void 0===t)return uh;if(!t)return null;if("function"==typeof t)return t;if(t instanceof hh)return t;if(!Array.isArray(t))return eu([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof hh){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!(e instanceof hh))throw new Error("Expected a list of style instances");i[n]=e}return i}if("style"in i){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!("style"in e))throw new Error("Expected a list of rules with a style property");i[n]=e}return tu(i)}const n=t;return eu(n)}(t);this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:(In("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}(e),this.changed()}setDeclutter(t){this.declutter_=t?String(t):void 0,this.changed()}};const qu=class extends Hu{constructor(t){super(t)}createRenderer(){return new Eh(this)}},$u="active";const Ju=class extends vn{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get($u)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set($u,t)}setMap(t){this.map_=t}},Qu="select";class td extends hn{constructor(t,e,i,n){super(t),this.selected=e,this.deselected=i,this.mapBrowserEvent=n}}const ed={};class id extends Ju{constructor(t){let e;if(super(),this.on,this.once,this.un,t=t||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=t.condition?t.condition:Jo,this.addCondition_=t.addCondition?t.addCondition:$o,this.removeCondition_=t.removeCondition?t.removeCondition:$o,this.toggleCondition_=t.toggleCondition?t.toggleCondition:Qo,this.multi_=!!t.multi&&t.multi,this.filter_=t.filter?t.filter:sn,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.style_=void 0!==t.style?t.style:function(){const t=function(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new hh({fill:new nh({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new hh({stroke:new lh({color:e,width:5})}),new hh({stroke:new lh({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new hh({image:new eh({radius:6,fill:new nh({color:i}),stroke:new lh({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}();return en(t.Polygon,t.LineString),en(t.GeometryCollection,t.LineString),function(e){return e.getGeometry()?t[e.getGeometry().getType()]:null}}(),this.features_=t.features||new Br,t.layers)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=sn;this.layerFilter_=e,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(t,e){this.featureLayerAssociation_[yn(t)]=e}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(t){return this.featureLayerAssociation_[yn(t)]}setHitTolerance(t){this.hitTolerance_=t}setMap(t){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(t),t?(this.features_.addEventListener(Or,this.boundAddFeature_),this.features_.addEventListener(Pr,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(Or,this.boundAddFeature_),this.features_.removeEventListener(Pr,this.boundRemoveFeature_))}addFeature_(t){const e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){const t=this.getMap().getAllLayers().find((function(t){if(t instanceof qu&&t.getSource()&&t.getSource().hasFeature(e))return t}));t&&this.addFeatureLayerAssociation_(e,t)}}removeFeature_(t){this.style_&&this.restorePreviousStyle_(t.element)}getStyle(){return this.style_}applySelectedStyle_(t){const e=yn(t);e in ed||(ed[e]=t.getStyle()),t.setStyle(this.style_)}restorePreviousStyle_(t){const e=this.getMap().getInteractions().getArray();for(let n=e.length-1;n>=0;--n){const i=e[n];if(i!==this&&i instanceof id&&i.getStyle()&&-1!==i.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(i.getStyle())}const i=yn(t);t.setStyle(ed[i]),delete ed[i]}removeFeatureLayerAssociation_(t){delete this.featureLayerAssociation_[yn(t)]}handleEvent(t){if(!this.condition_(t))return!0;const e=this.addCondition_(t),i=this.removeCondition_(t),n=this.toggleCondition_(t),s=!e&&!i&&!n,r=t.map,o=this.getFeatures(),a=[],l=[];if(s){an(this.featureLayerAssociation_),r.forEachFeatureAtPixel(t.pixel,((t,e)=>{if(t instanceof wn&&this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),l.push(t),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=o.getLength()-1;t>=0;--t){const e=o.item(t),i=l.indexOf(e);i>-1?l.splice(i,1):(o.remove(e),a.push(e))}0!==l.length&&o.extend(l)}else{r.forEachFeatureAtPixel(t.pixel,((t,s)=>{if(t instanceof wn&&this.filter_(t,s))return!e&&!n||o.getArray().includes(t)?(i||n)&&o.getArray().includes(t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,s),l.push(t)),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=a.length-1;t>=0;--t)o.remove(a[t]);o.extend(l)}return(l.length>0||a.length>0)&&this.dispatchEvent(new td(Qu,l,a,t)),!0}}const nd=id,sd=ad;function rd(){const t=["length","maxZoom","2670GsZwZI","#fff","radiusMultiplier","479388uqHkxP","addInteraction","gyMapObj","3125qJoDjN","set","props","layer","clone","calculateClusterInfo","addLayer","maxFeatureCount","setGeometry","features","5288yrZllX","radius","addWatchFun","mapFinish","isSelect","createLayer","createPolygonStyle","addLayerToMap","currentResolution","rgba(255, 255, 255, 0)","minZoom","58845UtHfDM","singleclick","10rPTzTT","get","isDraw","type","opacity","map","clusterSource","points","738012xhCydX","clusterTextColor","min","clusterStrokeWidth","2072VpJlPR","max","value","10745478GTlhqy","oneStyle","getGeometry","clusterFullColor","styleFunction","bind","pointermove","566028fcePxl","clusterStrokeColor","draw","selectStyleFunction","addSelectFeatureFun"];return(rd=function(){return t})()}!function(){const t=ad,e=rd();for(;;)try{if(151693===parseInt(t(465))/1+-parseInt(t(431))/2+-parseInt(t(441))/3+-parseInt(t(417))/4+parseInt(t(444))/5*(-parseInt(t(438))/6)+-parseInt(t(421))/7*(parseInt(t(454))/8)+parseInt(t(424))/9*(parseInt(t(467))/10))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();class od{constructor(t,e,i={}){tt(this,"gyMapObj"),tt(this,Y),tt(this,V),tt(this,j),tt(this,K),tt(this,U),tt(this,H),tt(this,q),tt(this,$),tt(this,J);const n=sd;this[n(447)]=null,this[n(415)]=null,this[n(425)]=null,this.gyMapObj=Rd(t),this[n(469)]=!1,this.points=e,this[n(446)]=i,this.mapFinish=et.computed((()=>this.gyMapObj[n(423)]&&this[n(443)][n(423)][n(457)])),this[n(462)]=0,this[n(451)]=0,this[n(433)]()}[(Y=sd(457),V=sd(447),j=sd(425),K=sd(415),U=sd(446),H=sd(462),q=sd(451),$=sd(469),J=sd(416),sd(433))](){const t=sd;this[t(459)](),this[t(456)](),this[t(461)]()}calculateClusterInfo(t){const e=sd,i=this[e(447)].getSource().getFeatures();let n,s;for(let a=i[e(436)]-1;a>=0;--a){n=i[a];const l=n[e(468)](e(453)),h=[1/0,1/0,-1/0,-1/0];let c,u;for(c=0,u=l[e(436)];c<u;++c)r=h,(o=l[c][e(426)]().getExtent())[0]<r[0]&&(r[0]=o[0]),o[2]>r[2]&&(r[2]=o[2]),o[1]<r[1]&&(r[1]=o[1]),o[3]>r[3]&&(r[3]=o[3]);this[e(451)]=Math[e(422)](this.maxFeatureCount,u),s=this.props[e(440)]*(qn(h)+Kn(h))/t,n[e(445)]("radius",s)}var r,o}[sd(428)](t,e){const i=sd;e!=this[i(462)]&&(this[i(449)](e),this[i(462)]=e);let n,s=t[i(468)]("features")[i(436)];if(s>1)n=new ut.Style({image:new ut.Circle({radius:t.get(i(455)),fill:this[i(446)][i(427)]?new ut.Fill({color:this.props[i(427)]}):new ut.Fill({color:[255,153,0,Math[i(419)](.9,.5+s/this[i(451)])]}),stroke:0===this[i(446)][i(420)]?null:new ut.Stroke({color:this[i(446)][i(432)]||"rgb(0,0,0)",width:this.props[i(420)]||1})}),text:new ut.Text({text:s.toString(),fill:new ut.Fill({color:this.props[i(418)]||i(439)})})});else{let e=t[i(468)](i(453))[0];n=this[i(460)](e)}return n}[sd(460)](t){const e=sd;let i;return this[e(425)]?(i=this[e(425)][e(448)](),i[e(452)](t.getGeometry())):i=new ut.Style({geometry:t.getGeometry(),image:new ut.Circle({radius:5,fill:new ut.Fill({color:[255,255,255,.5]}),stroke:new ut.Stroke({color:"#31d3f0",width:1})})}),i}setOneSyle(t){this[sd(425)]=t}[sd(459)](){const t=sd;this[t(415)]=new Tt.default({features:[]});const e=new jo({distance:this[t(446)].distance||30,source:this[t(415)]});this[t(447)]=new At.default({source:e,style:this[t(428)].bind(this),minZoom:this[t(446)][t(464)],maxZoom:this[t(446)][t(437)],opacity:this.props[t(413)]})}[sd(461)](){var t,e;const i=sd;!this[i(469)]&&this[i(457)].value&&(this.isDraw=!0,null==(e=null==(t=this.gyMapObj[i(423)])?void 0:t[i(414)])||e[i(450)](this[i(447)]),this[i(435)]())}[sd(456)](){const t=sd;et.watch(this[t(457)],(()=>{this[t(461)]()}))}[sd(434)](t){const e=sd,i=[new ut.Style({image:new ut.Circle({radius:10,fill:new ut.Fill({color:e(463)})})})],n=t[e(468)]("features");let s;for(let r=n[e(436)]-1;r>=0;--r)s=n[r],i.push(this[e(460)](s));return i}[sd(435)](){var t,e;const i=sd;if(!this[i(446)][i(458)])return;const n=new nd({condition:function(t){const e=i;return t[e(470)]==e(430)||t[e(470)]==e(466)},style:this.selectStyleFunction[i(429)](this)});null==(e=null==(t=this.gyMapObj[i(423)])?void 0:t[i(414)])||e[i(442)](n)}}function ad(t,e){const i=rd();return(ad=function(t,e){return i[t-=413]})(t,e)}const ld=hd;function hd(t,e){const i=cd();return(hd=function(t,e){return i[t-=109]})(t,e)}function cd(){const t=["4723266sFHZbJ","589863KsrlUY","$parent","clusterSource","362356lQVFUg","GymapClusters","3397690lcWwXS","56BFWjWE","clickFun","17192466vAarOl","1008184lRbwMi","setOneSyle","4fFRYTs","1632942sXwCTQ","mapId"];return(cd=function(){return t})()}!function(){const t=hd,e=cd();for(;;)try{if(581031===parseInt(t(116))/1+parseInt(t(110))/2+parseInt(t(113))/3*(parseInt(t(109))/4)+-parseInt(t(118))/5+parseInt(t(112))/6+-parseInt(t(119))/7*(-parseInt(t(122))/8)+-parseInt(t(121))/9)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const ud=re(et.defineComponent({name:ld(117),props:{mapId:{type:String,default:""},isSelect:{type:Boolean,default:!1},distance:{type:Number,default:30},radiusMultiplier:{type:Number,default:.5},clusterFullColor:{type:String,default:""},clusterStrokeColor:{type:String,default:""},clusterTextColor:{type:String,default:""},clusterStrokeWidth:{type:Number,default:1},minZoom:{type:Number,default:1},maxZoom:{type:Number,default:18},opacity:{type:Number,default:1}},emits:[ld(120)],setup(t,{emit:e}){const i=ld,{proxy:n}=et.getCurrentInstance(),s=t[i(111)]||n[i(114)].id,r=new od(s,t.points,t),o=r[i(115)];return et.onMounted((()=>{})),et.onBeforeUnmount((()=>{})),{id:s,clusterSource:o,setParentStylesByLayer:t=>{r[i(123)](t.getStyle())}}}}),[["render",function(t,e,i,n,s,r){return ct.openBlock(),ct.createElementBlock("div",null,[ct.renderSlot(t.$slots,"default")])}]]);function dd(){var t=["6gfZQsi","540496otCtVM","5747nDhBNi","1668wFicTf","7916022MmCiAT","24996FblQKA","900650zITaIP","826124JjzCBS","319400QFxXZD"];return(dd=function(){return t})()}function fd(t,e){var i=dd();return(fd=function(t,e){return i[t-=462]})(t,e)}function gd(){var t=["12620JLasoK","8BSSTvR","139000lcKjFN","357161nbkUJS","1161278OBGbZV","725682uOeBnH","1663865FhFehe","35PvzxlI","5778pqaIvH","474483pXjfFb"];return(gd=function(){return t})()}function pd(t,e){var i=gd();return(pd=function(t,e){return i[t-=138]})(t,e)}!function(){for(var t=fd,e=dd();;)try{if(213061===parseInt(t(469))/1+-parseInt(t(462))/2+parseInt(t(464))/3*(-parseInt(t(465))/4)+parseInt(t(470))/5+parseInt(t(467))/6*(-parseInt(t(466))/7)+parseInt(t(463))/8+parseInt(t(468))/9)break;e.push(e.shift())}catch(i){e.push(e.shift())}}(),function(){for(var t=pd,e=gd();;)try{if(508019===-parseInt(t(138))/1+parseInt(t(139))/2+-parseInt(t(144))/3+-parseInt(t(146))/4*(-parseInt(t(141))/5)+parseInt(t(140))/6*(parseInt(t(142))/7)+-parseInt(t(147))/8+-parseInt(t(143))/9*(parseInt(t(145))/10))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();const md=Object.freeze(Object.defineProperty({__proto__:null,Gymap:ae,GymapHtml:ge,GymapPolygon:ve,GymapLine:Me,GymapTask:Fe,GymapCircle:Ue,GymapText:ri,GymapImage:mi,GymapDraw:Ri,GymapHeat:Bi,GymapLonlat:Yi,GymapClusters:ud},Symbol.toStringTag,{value:"Module"})),_d="postrender";const yd=class extends vn{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){var t;null==(t=this.element)||t.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){var e,i;this.map_&&(null==(e=this.element)||e.remove());for(let n=0,s=this.listenerKeys.length;n<s;++n)fn(this.listenerKeys[n]);if(this.listenerKeys.length=0,this.map_=t,t){const e=null!=(i=this.target_)?i:t.getOverlayContainerStopEvent();this.element&&e.appendChild(this.element),this.render!==rn&&this.listenerKeys.push(un(t,_d,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}};const xd=class extends yd{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.attributions_=t.attributions;const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",s=void 0!==t.collapseLabel?t.collapseLabel:"›",r=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=r):this.collapseLabel_=s;const o=void 0!==t.label?t.label:"i";"string"==typeof o?(this.label_=document.createElement("span"),this.label_.textContent=o,this.label_.className=n):this.label_=o;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(Hi,this.handleClick_.bind(this),!1);const l=e+" "+Xa+" "+Za+(this.collapsed_&&this.collapsible_?" "+Ya:"")+(this.collapsible_?"":" ol-uncollapsible"),h=this.element;h.className=l,h.appendChild(this.toggleButton_),h.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=this.getMap().getAllLayers(),i=new Set(e.flatMap((e=>e.getAttributions(t))));if(void 0!==this.attributions_&&(Array.isArray(this.attributions_)?this.attributions_.forEach((t=>i.add(t))):i.add(this.attributions_)),!this.overrideCollapsible_){const t=!e.some((t=>{var e;return!1===(null==(e=t.getSource())?void 0:e.getAttributionsCollapsible())}));this.setCollapsible(t)}return Array.from(i)}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map((t=>{return e=()=>t,function(){let t;try{t=e()}catch(i){return Promise.reject(i)}return t instanceof Promise?t:Promise.resolve(t)}();var e}))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!nn(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.lastChild.remove()}(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Ya),this.collapsed_?ra(this.collapseLabel_,this.label_):ra(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}};const vd=class extends yd{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const s=t.tipLabel?t.tipLabel:"Reset rotation",r=document.createElement("button");r.className=e+"-reset",r.setAttribute("type","button"),r.title=s,r.appendChild(this.label_),r.addEventListener(Hi,this.handleClick_.bind(this),!1);const o=e+" "+Xa+" "+Za,a=this.element;a.className=o,a.appendChild(r),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(za)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:bu}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(za);t||0!==i?t&&0!==i&&this.element.classList.remove(za):this.element.classList.add(za)}this.label_.style.transform=t}this.rotation_=i}};const Id=class extends yd{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",s=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",r=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n,h.setAttribute("type","button"),h.title=a,h.appendChild("string"==typeof r?document.createTextNode(r):r),h.addEventListener(Hi,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof o?document.createTextNode(o):o),c.addEventListener(Hi,this.handleClick_.bind(this,-i),!1);const u=e+" "+Xa+" "+Za,d=this.element;d.className=u,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:bu})):e.setZoom(n)}}};function Sd(t){t=t||{};const e=new Br;(void 0===t.zoom||t.zoom)&&e.push(new Id(t.zoomOptions));(void 0===t.rotate||t.rotate)&&e.push(new vd(t.rotateOptions));return(void 0===t.attribution||t.attribution)&&e.push(new xd(t.attributionOptions)),e}function wd(t,e){const i=Cd();return(wd=function(t,e){return i[t-=365]})(t,e)}function Cd(){const t=["push","moveend","http://wprd01.is.autonavi.com/appmaptile?style=7&x={x}&y={y}&z={z}","mapUrlList","zoom","removeOverlay","setOpacity","getView","assign","2554128iMgAdK","min","7CIGZhr","length","getZoom","setVisible","ol-overlay-container ol-selectable ","error","not find ","5LCZZfP","stopPropagation","forEach","querySelectorAll","extent","17502VgCUIu","max","addOverlay","665957dmDGYi","558872DHusdj","6019616STNXeD","minZoom","centerPoint","formatLonLatToPosition","50qOfKdH","call","position 格式不正确,应该为 [经度,纬度]","value","maxZoom","animate","pixel","forEachFeatureAtPixel","914630BWHezg","请传入正确的dom对象!","object","474174RidOTl","isArray","string","prototype","click"];return(Cd=function(){return t})()}!function(){const t=wd,e=Cd();for(;;)try{if(534647===-parseInt(t(393))/1+-parseInt(t(399))/2*(parseInt(t(390))/3)+-parseInt(t(394))/4*(-parseInt(t(385))/5)+-parseInt(t(410))/6*(-parseInt(t(378))/7)+parseInt(t(395))/8+parseInt(t(376))/9+parseInt(t(407))/10)break;e.push(e.shift())}catch(i){e.push(e.shift())}}();let bd={};const Md=t=>{const e=wd;if((t=t||"")&&bd[t])return bd[t];const i=t=>{const e=wd;return Math.max(r.minZoom,Math[e(377)](Number(t||0),r[e(403)]))};let n=et.ref(null),s=et.ref(null),r={layerOpacity:1,maplayerIndex:0,centerPoint:[116.40531,39.896884],minZoom:1,maxZoom:18,zoom:16,extent:void 0,stopPropagation:!0,mapUrlList:[e(369)]},o=et.ref(i(r[e(371)])),a="",l=[],h=-1,c=et.ref(!1);let u=(t,n)=>{const s=e;a=t,r=Object[s(375)]({},r,n),(()=>{const t=wd;r[t(396)]=Math[t(377)](1,r[t(396)]),r[t(403)]=Math[t(391)](18,r[t(403)]),o[t(402)]=i(r[t(371)])})();let l=r[s(389)]||void 0;if(l){let t=l[0],e=l[1];if(t&&e){let i=te[s(398)](t),n=te[s(398)](e),o=[Math[s(377)](i[0],n[0]),Math[s(377)](i[1],n[1]),Math[s(391)](i[0],n[0]),Math[s(391)](i[1],n[1])];r[s(389)]=o}else r[s(389)]=void 0}};const d=()=>{const t=e;s.value=et.markRaw(new Rt.default({center:te[t(398)](r[t(397)]),zoom:o[t(402)],minZoom:r[t(396)],maxZoom:r[t(403)],extent:r[t(389)]})),n[t(402)]=et.markRaw(new Ct.default({layers:l,target:a,view:s.value,controls:Sd({zoom:r.isShowControls,attribution:!1,rotate:!0}),interactions:ht.defaults(r.interactionsObj||{})})),c[t(402)]=!0,n.value.on(t(366),(e=>{const i=t;n[i(402)][i(406)](e[i(405)],(function(t){const n=i;return t.dispatchEvent({type:"click",e:e}),r[n(386)]}))})),n[t(402)].on(t(368),(function(e){const i=t;o.value=n[i(402)][i(374)]()[i(380)]()}))},f=()=>{l=[];let t=r[e(370)];!Array.isArray(t)&&(t=[t]),t.forEach((t=>{l.push(new bt.default({visible:!1,opacity:r.layerOpacity,source:new Mt.default({maxZoom:18,url:t})}))}))},g=t=>{const n=e;let r=i(Number(t));r!==o.value&&(s[n(402)]&&s[n(402)][n(404)]({zoom:r,duration:800}),o.value=r)},p=t=>{var i,n;const s=e;if(t=Number(t||0),h===t)return;let r=l[s(379)],o=Math.max(0,Math[s(377)](t,r));-1!==h&&(null==(i=l[h])||i[s(381)](!1)),null==(n=l[o])||n.setVisible(!0),h=o};let m=et.ref({contentId:t,map:n,view:s,mapFinish:c,zoom:o,init:(t,e)=>{t&&(u(t,e),f(),d(),p(r.maplayerIndex))},zoomSetFun:g,zoomAddFun:()=>{g(o[e(402)]+1)},zoomSubFun:()=>{g(o.value-1)},changeMapLayer:p,changeCenterPoint:t=>{const i=e;let n=te[i(398)](t);s.value&&s.value[i(404)]({center:n,duration:800})},drawHtmlToMap:(t,{position:i,offset:s=[0,0],stopEvent:r=!0,className:o=""})=>{const a=e;let l=null;if(typeof t===a(409)){if(!(t instanceof HTMLElement))return null;l=[t]}else if(typeof t===a(412)&&(l=document[a(388)](t),0===l[a(379)]))return null;if(!Array[a(411)](i))return null;let h=[];return Array[a(365)][a(387)][a(400)](l,(t=>{const e=a;let l=new Et.default({element:t,position:te[e(398)](i),insertFirst:!1,autoPan:!1,stopEvent:r,className:e(382)+o,offset:s});n.value&&n[e(402)][e(392)](l),h[e(367)](l)})),1===h.length?h[0]:h},removeOverlay:t=>{const i=e;t&&n[i(402)]&&n[i(402)][i(372)](t)},setLayerOpacity:t=>{const i=e;let n=l[h];n&&n[i(373)](t)},destory:()=>{delete bd[t]}});return bd[t]=m,m},Rd=t=>{const e=wd;return bd[t]?bd[t]:Md[e(400)](void 0,t)};!function(){const t=Td,e=kd();for(;;)try{if(206246===-parseInt(t(429))/1*(parseInt(t(416))/2)+-parseInt(t(423))/3*(parseInt(t(424))/4)+parseInt(t(427))/5*(parseInt(t(418))/6)+parseInt(t(422))/7+parseInt(t(417))/8*(-parseInt(t(419))/9)+-parseInt(t(426))/10+parseInt(t(415))/11*(parseInt(t(414))/12))break;e.push(e.shift())}catch(i){e.push(e.shift())}}();let Ed=t=>{const e=Td;if(!Ed[e(421)]){Object[e(411)](md).map((t=>md[t]))[e(425)]((i=>{const n=e;(i[n(420)]("name")||i[n(420)](n(412)))&&i[n(420)](n(413))&&t[n(428)](i.name||i[n(412)],i)}))}};function kd(){const t=["15cBhTYD","component","107462LDIlXB","keys","__name","setup","7299048zSVERV","11jEGLwp","2BCLArz","8TsscLf","403512pfouPA","2731257VFLhpe","hasOwnProperty","installed","1169798GisZbF","6oDKvfW","684724yWWxDI","forEach","175810CkYiyR"];return(kd=function(){return t})()}const Ad={install:Ed};function Td(t,e){const i=kd();return(Td=function(t,e){return i[t-=411]})(t,e)}exports.Gymap=ae,exports.GymapCircle=Ue,exports.GymapClusters=ud,exports.GymapDraw=Ri,exports.GymapHeat=Bi,exports.GymapHtml=ge,exports.GymapImage=mi,exports.GymapLine=Me,exports.GymapLonlat=Yi,exports.GymapPolygon=ve,exports.GymapTask=Fe,exports.GymapText=ri,exports.default=Ad,exports.gyMap=Rd,exports.gyMapUtils=te,exports.install=Ed;