vue-geojson-view-ts 1.3.12 → 1.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10615,24 +10615,32 @@ const Wm = wo({
10615
10615
  const o = this.renderGeojson;
10616
10616
  if (o && o.length) {
10617
10617
  o.forEach((w) => {
10618
- w.type === "FeatureCollection" ? w.features.forEach((b) => {
10619
- if (b.geometry.type === "Polygon" || b.geometry.type === "MultiPolygon" || b.geometry.type === "LineString" || b.geometry.type === "MultiLineString" || b.geometry.type === "Point") {
10620
- const T = this;
10621
- ut.geoJson(b, {
10622
- pointToLayer: this.getPointToLayer.bind(this),
10623
- onEachFeature: function(M, A) {
10624
- if (i.addLayer(A), M.geometry.type === "Point") {
10625
- var I = T.getPopupContent(M);
10626
- A.bindPopup(I);
10618
+ if (w.type === "FeatureCollection")
10619
+ w.features.forEach((b) => {
10620
+ if (b.geometry.type === "Polygon" || b.geometry.type === "MultiPolygon" || b.geometry.type === "LineString" || b.geometry.type === "MultiLineString" || b.geometry.type === "Point") {
10621
+ const T = this;
10622
+ ut.geoJson(b, {
10623
+ pointToLayer: this.getPointToLayer.bind(this),
10624
+ onEachFeature: function(M, A) {
10625
+ if (i.addLayer(A), M.geometry.type === "Point") {
10626
+ var I = T.getPopupContent(M);
10627
+ A.bindPopup(I);
10628
+ }
10627
10629
  }
10630
+ });
10631
+ }
10632
+ });
10633
+ else if (w.type === "Feature" && (w.geometry.type === "Polygon" || w.geometry.type === "MultiPolygon" || w.geometry.type === "LineString" || w.geometry.type === "MultiLineString" || w.geometry.type === "Point" || w.geometry.type === "MultiPoint")) {
10634
+ const b = this;
10635
+ ut.geoJson(w, {
10636
+ onEachFeature: function(T, M) {
10637
+ if (i.addLayer(M), T.geometry.type === "Point") {
10638
+ var A = b.getPopupContent(T);
10639
+ M.bindPopup(A);
10628
10640
  }
10629
- });
10630
- }
10631
- }) : w.type === "Feature" && (w.geometry.type === "Polygon" || w.geometry.type === "MultiPolygon" || w.geometry.type === "LineString" || w.geometry.type === "MultiLineString" || w.geometry.type === "Point" || w.geometry.type === "MultiPoint") && ut.geoJson(w, {
10632
- onEachFeature: function(b, T) {
10633
- i.addLayer(T);
10634
- }
10635
- });
10641
+ }
10642
+ });
10643
+ }
10636
10644
  });
10637
10645
  const P = i.getBounds();
10638
10646
  t.fitBounds(P);
@@ -10739,18 +10747,18 @@ const Wm = wo({
10739
10747
  }
10740
10748
  },
10741
10749
  getPopupContent(r) {
10742
- const t = r.properties || {}, e = t.descripcion || "", i = t.fechaHoraLlegada || "";
10743
- let n = "";
10750
+ const t = r.properties || {}, e = t.descripcion || "", i = t.fechaHoraLlegada || "", n = t.fotoId || "";
10751
+ let o = "";
10744
10752
  if (i) {
10745
- const a = new Date(i), h = (c) => c.toString().padStart(2, "0");
10746
- n = `${h(a.getDate())}-${h(
10747
- a.getMonth() + 1
10748
- )}-${a.getFullYear()} ${h(a.getHours())}:${h(
10749
- a.getMinutes()
10750
- )}:${h(a.getSeconds())}`;
10751
- }
10752
- let o = "<div>";
10753
- return o += `<b>Descripción:</b> ${e}<br>`, n && (o += `<b>Fecha Hora Llegada:</b> ${n}<br>`), o += "</div>", o;
10753
+ const h = new Date(i), c = (d) => d.toString().padStart(2, "0");
10754
+ o = `${c(h.getDate())}-${c(
10755
+ h.getMonth() + 1
10756
+ )}-${h.getFullYear()} ${c(h.getHours())}:${c(
10757
+ h.getMinutes()
10758
+ )}:${c(h.getSeconds())}`;
10759
+ }
10760
+ let a = "<div>";
10761
+ return n && (a += `<img src="${n}" style="width: 200px; height: auto; margin-bottom: 5px;"><br>`), a += `<b>Descripción:</b> ${e}<br>`, o && (a += `<b>Fecha Hora Llegada:</b> ${o}<br>`), a += "</div>", a;
10754
10762
  }
10755
10763
  },
10756
10764
  watch: {
@@ -14,7 +14,7 @@
14
14
  `).forEach(function(a){n=a.indexOf(":"),e=a.substring(0,n).trim().toLowerCase(),i=a.substring(n+1).trim(),!(!e||t[e]&&rp[e])&&(e==="set-cookie"?t[e]?t[e].push(i):t[e]=[i]:t[e]=t[e]?t[e]+", "+i:i)}),t},oc=Symbol("internals");function fr(r){return r&&String(r).trim().toLowerCase()}function ys(r){return r===!1||r==null?r:D.isArray(r)?r.map(ys):String(r)}function op(r){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=e.exec(r);)t[i[1]]=i[2];return t}const ap=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function da(r,t,e,i,n){if(D.isFunction(i))return i.call(this,t,e);if(n&&(t=e),!!D.isString(t)){if(D.isString(i))return t.indexOf(i)!==-1;if(D.isRegExp(i))return i.test(t)}}function lp(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,i)=>e.toUpperCase()+i)}function hp(r,t){const e=D.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+e,{value:function(n,o,a){return this[i].call(this,t,n,o,a)},configurable:!0})})}class vs{constructor(t){t&&this.set(t)}set(t,e,i){const n=this;function o(h,c,d){const f=fr(c);if(!f)throw new Error("header name must be a non-empty string");const _=D.findKey(n,f);(!_||n[_]===void 0||d===!0||d===void 0&&n[_]!==!1)&&(n[_||c]=ys(h))}const a=(h,c)=>D.forEach(h,(d,f)=>o(d,f,c));return D.isPlainObject(t)||t instanceof this.constructor?a(t,e):D.isString(t)&&(t=t.trim())&&!ap(t)?a(sp(t),e):t!=null&&o(e,t,i),this}get(t,e){if(t=fr(t),t){const i=D.findKey(this,t);if(i){const n=this[i];if(!e)return n;if(e===!0)return op(n);if(D.isFunction(e))return e.call(this,n,i);if(D.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=fr(t),t){const i=D.findKey(this,t);return!!(i&&this[i]!==void 0&&(!e||da(this,this[i],i,e)))}return!1}delete(t,e){const i=this;let n=!1;function o(a){if(a=fr(a),a){const h=D.findKey(i,a);h&&(!e||da(i,i[h],h,e))&&(delete i[h],n=!0)}}return D.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let i=e.length,n=!1;for(;i--;){const o=e[i];(!t||da(this,this[o],o,t,!0))&&(delete this[o],n=!0)}return n}normalize(t){const e=this,i={};return D.forEach(this,(n,o)=>{const a=D.findKey(i,o);if(a){e[a]=ys(n),delete e[o];return}const h=t?lp(o):String(o).trim();h!==o&&delete e[o],e[h]=ys(n),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return D.forEach(this,(i,n)=>{i!=null&&i!==!1&&(e[n]=t&&D.isArray(i)?i.join(", "):i)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
15
15
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const i=new this(t);return e.forEach(n=>i.set(n)),i}static accessor(t){const i=(this[oc]=this[oc]={accessors:{}}).accessors,n=this.prototype;function o(a){const h=fr(a);i[h]||(hp(n,a),i[h]=!0)}return D.isArray(t)?t.forEach(o):o(t),this}}vs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),D.reduceDescriptors(vs.prototype,({value:r},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(i){this[e]=i}}}),D.freezeMethods(vs);const $e=vs;function fa(r,t){const e=this||ua,i=t||e,n=$e.from(i.headers);let o=i.data;return D.forEach(r,function(h){o=h.call(e,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function ac(r){return!!(r&&r.__CANCEL__)}function gr(r,t,e){pt.call(this,r??"canceled",pt.ERR_CANCELED,t,e),this.name="CanceledError"}D.inherits(gr,pt,{__CANCEL__:!0});function cp(r,t,e){const i=e.config.validateStatus;!e.status||!i||i(e.status)?r(e):t(new pt("Request failed with status code "+e.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const up=Oe.isStandardBrowserEnv?function(){return{write:function(e,i,n,o,a,h){const c=[];c.push(e+"="+encodeURIComponent(i)),D.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),D.isString(o)&&c.push("path="+o),D.isString(a)&&c.push("domain="+a),h===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(e){const i=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function dp(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function fp(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}function lc(r,t){return r&&!dp(t)?fp(r,t):t}const gp=Oe.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let i;function n(o){let a=o;return t&&(e.setAttribute("href",a),a=e.href),e.setAttribute("href",a),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return i=n(window.location.href),function(a){const h=D.isString(a)?n(a):a;return h.protocol===i.protocol&&h.host===i.host}}():function(){return function(){return!0}}();function _p(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function pp(r,t){r=r||10;const e=new Array(r),i=new Array(r);let n=0,o=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=i[o];a||(a=d),e[n]=c,i[n]=d;let _=o,m=0;for(;_!==n;)m+=e[_++],_=_%r;if(n=(n+1)%r,n===o&&(o=(o+1)%r),d-a<t)return;const v=f&&d-f;return v?Math.round(m*1e3/v):void 0}}function hc(r,t){let e=0;const i=pp(50,250);return n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,h=o-e,c=i(h),d=o<=a;e=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:h,rate:c||void 0,estimated:c&&a&&d?(a-o)/c:void 0,event:n};f[t?"download":"upload"]=!0,r(f)}}const ga={http:H_,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(e,i){let n=r.data;const o=$e.from(r.headers).normalize(),a=r.responseType;let h;function c(){r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let d;D.isFormData(n)&&(Oe.isStandardBrowserEnv||Oe.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.getContentType(/^\s*multipart\/form-data/)?D.isString(d=o.getContentType())&&o.setContentType(d.replace(/^\s*(multipart\/form-data);+/,"$1")):o.setContentType("multipart/form-data"));let f=new XMLHttpRequest;if(r.auth){const y=r.auth.username||"",E=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";o.set("Authorization","Basic "+btoa(y+":"+E))}const _=lc(r.baseURL,r.url);f.open(r.method.toUpperCase(),ic(_,r.params,r.paramsSerializer),!0),f.timeout=r.timeout;function m(){if(!f)return;const y=$e.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:y,config:r,request:f};cp(function(w){e(w),c()},function(w){i(w),c()},C),f=null}if("onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(m)},f.onabort=function(){f&&(i(new pt("Request aborted",pt.ECONNABORTED,r,f)),f=null)},f.onerror=function(){i(new pt("Network Error",pt.ERR_NETWORK,r,f)),f=null},f.ontimeout=function(){let E=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||rc;r.timeoutErrorMessage&&(E=r.timeoutErrorMessage),i(new pt(E,C.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,r,f)),f=null},Oe.isStandardBrowserEnv){const y=(r.withCredentials||gp(_))&&r.xsrfCookieName&&up.read(r.xsrfCookieName);y&&o.set(r.xsrfHeaderName,y)}n===void 0&&o.setContentType(null),"setRequestHeader"in f&&D.forEach(o.toJSON(),function(E,C){f.setRequestHeader(C,E)}),D.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),a&&a!=="json"&&(f.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&f.addEventListener("progress",hc(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",hc(r.onUploadProgress)),(r.cancelToken||r.signal)&&(h=y=>{f&&(i(!y||y.type?new gr(null,r,f):y),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const v=_p(_);if(v&&Oe.protocols.indexOf(v)===-1){i(new pt("Unsupported protocol "+v+":",pt.ERR_BAD_REQUEST,r));return}f.send(n||null)})}};D.forEach(ga,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const cc=r=>`- ${r}`,mp=r=>D.isFunction(r)||r===null||r===!1,uc={getAdapter:r=>{r=D.isArray(r)?r:[r];const{length:t}=r;let e,i;const n={};for(let o=0;o<t;o++){e=r[o];let a;if(i=e,!mp(e)&&(i=ga[(a=String(e)).toLowerCase()],i===void 0))throw new pt(`Unknown adapter '${a}'`);if(i)break;n[a||"#"+o]=i}if(!i){const o=Object.entries(n).map(([h,c])=>`adapter ${h} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
16
16
  `+o.map(cc).join(`
17
- `):" "+cc(o[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:ga};function _a(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new gr(null,r)}function dc(r){return _a(r),r.headers=$e.from(r.headers),r.data=fa.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),uc.getAdapter(r.adapter||ua.adapter)(r).then(function(i){return _a(r),i.data=fa.call(r,r.transformResponse,i),i.headers=$e.from(i.headers),i},function(i){return ac(i)||(_a(r),i&&i.response&&(i.response.data=fa.call(r,r.transformResponse,i.response),i.response.headers=$e.from(i.response.headers))),Promise.reject(i)})}const fc=r=>r instanceof $e?r.toJSON():r;function xn(r,t){t=t||{};const e={};function i(d,f,_){return D.isPlainObject(d)&&D.isPlainObject(f)?D.merge.call({caseless:_},d,f):D.isPlainObject(f)?D.merge({},f):D.isArray(f)?f.slice():f}function n(d,f,_){if(D.isUndefined(f)){if(!D.isUndefined(d))return i(void 0,d,_)}else return i(d,f,_)}function o(d,f){if(!D.isUndefined(f))return i(void 0,f)}function a(d,f){if(D.isUndefined(f)){if(!D.isUndefined(d))return i(void 0,d)}else return i(void 0,f)}function h(d,f,_){if(_ in t)return i(d,f);if(_ in r)return i(void 0,d)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:h,headers:(d,f)=>n(fc(d),fc(f),!0)};return D.forEach(Object.keys(Object.assign({},r,t)),function(f){const _=c[f]||n,m=_(r[f],t[f],f);D.isUndefined(m)&&_!==h||(e[f]=m)}),e}const gc="1.5.1",pa={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{pa[r]=function(i){return typeof i===r||"a"+(t<1?"n ":" ")+r}});const _c={};pa.transitional=function(t,e,i){function n(o,a){return"[Axios v"+gc+"] Transitional option '"+o+"'"+a+(i?". "+i:"")}return(o,a,h)=>{if(t===!1)throw new pt(n(a," has been removed"+(e?" in "+e:"")),pt.ERR_DEPRECATED);return e&&!_c[a]&&(_c[a]=!0,console.warn(n(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,a,h):!0}};function yp(r,t,e){if(typeof r!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let n=i.length;for(;n-- >0;){const o=i[n],a=t[o];if(a){const h=r[o],c=h===void 0||a(h,o,r);if(c!==!0)throw new pt("option "+o+" must be "+c,pt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new pt("Unknown option "+o,pt.ERR_BAD_OPTION)}}const ma={assertOptions:yp,validators:pa},vi=ma.validators;class xs{constructor(t){this.defaults=t,this.interceptors={request:new nc,response:new nc}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=xn(this.defaults,e);const{transitional:i,paramsSerializer:n,headers:o}=e;i!==void 0&&ma.assertOptions(i,{silentJSONParsing:vi.transitional(vi.boolean),forcedJSONParsing:vi.transitional(vi.boolean),clarifyTimeoutError:vi.transitional(vi.boolean)},!1),n!=null&&(D.isFunction(n)?e.paramsSerializer={serialize:n}:ma.assertOptions(n,{encode:vi.function,serialize:vi.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=o&&D.merge(o.common,o[e.method]);o&&D.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),e.headers=$e.concat(a,o);const h=[];let c=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(e)===!1||(c=c&&E.synchronous,h.unshift(E.fulfilled,E.rejected))});const d=[];this.interceptors.response.forEach(function(E){d.push(E.fulfilled,E.rejected)});let f,_=0,m;if(!c){const y=[dc.bind(this),void 0];for(y.unshift.apply(y,h),y.push.apply(y,d),m=y.length,f=Promise.resolve(e);_<m;)f=f.then(y[_++],y[_++]);return f}m=h.length;let v=e;for(_=0;_<m;){const y=h[_++],E=h[_++];try{v=y(v)}catch(C){E.call(this,C);break}}try{f=dc.call(this,v)}catch(y){return Promise.reject(y)}for(_=0,m=d.length;_<m;)f=f.then(d[_++],d[_++]);return f}getUri(t){t=xn(this.defaults,t);const e=lc(t.baseURL,t.url);return ic(e,t.params,t.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(t){xs.prototype[t]=function(e,i){return this.request(xn(i||{},{method:t,url:e,data:(i||{}).data}))}}),D.forEach(["post","put","patch"],function(t){function e(i){return function(o,a,h){return this.request(xn(h||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}xs.prototype[t]=e(),xs.prototype[t+"Form"]=e(!0)});const Es=xs;class ya{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(o){e=o});const i=this;this.promise.then(n=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](n);i._listeners=null}),this.promise.then=n=>{let o;const a=new Promise(h=>{i.subscribe(h),o=h}).then(n);return a.cancel=function(){i.unsubscribe(o)},a},t(function(o,a,h){i.reason||(i.reason=new gr(o,a,h),e(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new ya(function(n){t=n}),cancel:t}}}const vp=ya;function xp(r){return function(e){return r.apply(null,e)}}function Ep(r){return D.isObject(r)&&r.isAxiosError===!0}const va={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(va).forEach(([r,t])=>{va[t]=r});const wp=va;function pc(r){const t=new Es(r),e=Gh(Es.prototype.request,t);return D.extend(e,Es.prototype,t,{allOwnKeys:!0}),D.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return pc(xn(r,n))},e}const Dt=pc(ua);Dt.Axios=Es,Dt.CanceledError=gr,Dt.CancelToken=vp,Dt.isCancel=ac,Dt.VERSION=gc,Dt.toFormData=ms,Dt.AxiosError=pt,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=xp,Dt.isAxiosError=Ep,Dt.mergeConfig=xn,Dt.AxiosHeaders=$e,Dt.formToJSON=r=>sc(D.isHTMLForm(r)?new FormData(r):r),Dt.getAdapter=uc.getAdapter,Dt.HttpStatusCode=wp,Dt.default=Dt;const mc=Dt;ut.Edit.Circle=ut.Edit.CircleMarker.extend({_createResizeMarker:function(){var r=this._shape.getLatLng(),t=this._getResizeMarkerPoint(r);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(t,this.options.resizeIcon))},_getResizeMarkerPoint:function(r){var t=this._shape._radius*Math.cos(Math.PI/4),e=this._map.project(r);return this._map.unproject([e.x+t,e.y-t])},_resize:function(r){var t=this._moveMarker.getLatLng(),e;ut.GeometryUtil.isVersion07x()?e=t.distanceTo(r):e=this._map.distance(t,r),this._shape.setRadius(e),this._map.fire(ut.Draw.Event.EDITRESIZE,{layer:this._shape})}});const Lp=U.defineComponent({name:"MapView",props:{loadPolygon:Boolean,reverseCoordinatesPolygon:Boolean,dataPolygon:Object,configurationMap:Object,coordinatesMap:Array,getGeoJSON:Function,getCoodMarker:Function},data(){return{idMap:"",mapRender:null,markerRender:null,renderCoordinates:this.coordinatesMap,renderGeojson:this.dataPolygon,markerIcon:{iconUrl:ss,iconSize:[25,41],iconAnchor:[12,41]},layersFeatureGroup:null,featuresData:null}},mounted(){this.makeid(10),this.renderMap()},methods:{getLayersFeaturesInGeoJson(){const r=ut.geoJSON().addTo(this.mapRender);return this.featuresData.eachLayer(e=>{r.addLayer(e)}),[r.toGeoJSON()]},triggerSaveEdit(){var t,e,i;(i=(e=(t=(document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top")||document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top leaflet-draw-actions-bottom"))[0])==null?void 0:t.querySelector("li"))==null?void 0:e.querySelector("a"))==null||i.click()},makeid(r){let t="";const e="abcdefghijklmnopqrstuvwxyz",i=e.length;let n=0;for(;n<r;)t+=e.charAt(Math.floor(Math.random()*i)),n+=1;this.idMap=t},renderMap(){c_("es"),setTimeout(()=>{this.loadPolygon?this.viewMap():this.createMap()},500)},createMap(){var a,h,c,d,f,_,m,v,y,E;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=ut.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);if(this.mapRender=t,ut.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(t),t.setZoom((a=this.configurationMap)==null?void 0:a.maxZoom),this.configurationMap.renderMarker){const C=ut.marker([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],{icon:ut.icon(r),draggable:this.configurationMap.dragMarker}).addTo(t);this.markerRender=C,this.getCoodMarker&&C.on("dragend",P=>{const w=P.target.getLatLng(),b=w.lat,T=w.lng;this.getCoodMarker&&this.getCoodMarker(b,T)})}const e=ut.featureGroup();this.featuresData=e;const i=e.addTo(t);let n={featureGroup:i,edit:!1,remove:(h=this.configurationMap)==null?void 0:h.editFigures.remove};(c=this.configurationMap)!=null&&c.editFigures.edit&&(n={featureGroup:i,...(d=this.configurationMap)==null?void 0:d.editFigures.edit,remove:(f=this.configurationMap)==null?void 0:f.editFigures.remove});const o=new ut.Control.Draw({position:"topleft",draw:{polygon:(_=this.configurationMap)==null?void 0:_.createFigures.polygon,circle:!1,rectangle:(m=this.configurationMap)!=null&&m.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(v=this.configurationMap)!=null&&v.createFigures.marker?{icon:ut.icon(r)}:!1,polyline:(y=this.configurationMap)!=null&&y.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(E=this.configurationMap)==null?void 0:E.createFigures.multipoint},edit:n});t.addControl(o),t.on("draw:created",C=>{var b,T,M,A,I,z,j,V,q,K,nt,_t,X,W,G;const P=C.layer;i.addLayer(P);let w=P.toGeoJSON();C.layerType==="circlemarker"&&(w={type:"Feature",geometry:{type:"MultiPoint",coordinates:[w.geometry.coordinates]},properties:{...w.properties,pointType:"multipoint",style:{color:((M=(T=(b=this.configurationMap)==null?void 0:b.createFigures)==null?void 0:T.multipoint)==null?void 0:M.color)||"green",fillColor:((z=(I=(A=this.configurationMap)==null?void 0:A.createFigures)==null?void 0:I.multipoint)==null?void 0:z.fillColor)||"green",fillOpacity:((q=(V=(j=this.configurationMap)==null?void 0:j.createFigures)==null?void 0:V.multipoint)==null?void 0:q.fillOpacity)||.8,radius:((_t=(nt=(K=this.configurationMap)==null?void 0:K.createFigures)==null?void 0:nt.multipoint)==null?void 0:_t.radius)||6,weight:((G=(W=(X=this.configurationMap)==null?void 0:X.createFigures)==null?void 0:W.multipoint)==null?void 0:G.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON([w])}),t.on("draw:edited",C=>{C.layers.eachLayer(w=>{const b=w.toGeoJSON();this.getGeoJSON&&this.getGeoJSON([b])})})},viewMap(){var h,c,d,f,_,m,v,y,E,C;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=ut.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);this.mapRender=t,ut.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(t),t.setZoom((h=this.configurationMap)==null?void 0:h.maxZoom);const e=ut.featureGroup();this.featuresData=e;const i=e.addTo(t);let n={featureGroup:i,edit:!1,remove:(c=this.configurationMap)==null?void 0:c.editFigures.remove};(d=this.configurationMap)!=null&&d.editFigures.edit&&(n={featureGroup:i,...(f=this.configurationMap)==null?void 0:f.editFigures.edit,remove:(_=this.configurationMap)==null?void 0:_.editFigures.remove});const o=this.renderGeojson;if(o&&o.length){o.forEach(w=>{w.type==="FeatureCollection"?w.features.forEach(b=>{if(b.geometry.type==="Polygon"||b.geometry.type==="MultiPolygon"||b.geometry.type==="LineString"||b.geometry.type==="MultiLineString"||b.geometry.type==="Point"){const T=this;ut.geoJson(b,{pointToLayer:this.getPointToLayer.bind(this),onEachFeature:function(M,A){if(i.addLayer(A),M.geometry.type==="Point"){var I=T.getPopupContent(M);A.bindPopup(I)}}})}}):w.type==="Feature"&&(w.geometry.type==="Polygon"||w.geometry.type==="MultiPolygon"||w.geometry.type==="LineString"||w.geometry.type==="MultiLineString"||w.geometry.type==="Point"||w.geometry.type==="MultiPoint")&&ut.geoJson(w,{onEachFeature:function(b,T){i.addLayer(T)}})});const P=i.getBounds();t.fitBounds(P)}const a=new ut.Control.Draw({position:"topleft",draw:{polygon:(m=this.configurationMap)==null?void 0:m.createFigures.polygon,circle:!1,rectangle:(v=this.configurationMap)!=null&&v.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(y=this.configurationMap)!=null&&y.createFigures.marker?{icon:ut.icon(r)}:!1,polyline:(E=this.configurationMap)!=null&&E.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(C=this.configurationMap)==null?void 0:C.createFigures.multipoint},edit:n});t.addControl(a),t.on("draw:created",P=>{var T,M,A,I,z,j,V,q,K,nt,_t,X,W,G,N;const w=P.layer;i.addLayer(w);let b=w.toGeoJSON();P.layerType==="circlemarker"&&(b={type:"Feature",geometry:{type:"MultiPoint",coordinates:[b.geometry.coordinates]},properties:{...b.properties,pointType:"multipoint",style:{color:((A=(M=(T=this.configurationMap)==null?void 0:T.createFigures)==null?void 0:M.multipoint)==null?void 0:A.color)||"green",fillColor:((j=(z=(I=this.configurationMap)==null?void 0:I.createFigures)==null?void 0:z.multipoint)==null?void 0:j.fillColor)||"green",fillOpacity:((K=(q=(V=this.configurationMap)==null?void 0:V.createFigures)==null?void 0:q.multipoint)==null?void 0:K.fillOpacity)||.8,radius:((X=(_t=(nt=this.configurationMap)==null?void 0:nt.createFigures)==null?void 0:_t.multipoint)==null?void 0:X.radius)||6,weight:((N=(G=(W=this.configurationMap)==null?void 0:W.createFigures)==null?void 0:G.multipoint)==null?void 0:N.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON(b)}),t.on("draw:edited",P=>{P.layers.eachLayer(b=>{const T=b.toGeoJSON();this.getGeoJSON&&this.getGeoJSON(T)})})},getPointToLayer(r,t){var i,n;if(((i=r.geometry)==null?void 0:i.type)==="Point"){const o=(n=r.properties)==null?void 0:n.tipo,a=ut.icon({iconUrl:Ug,iconSize:[38,38],iconAnchor:[16,41]}),h=ut.icon({iconUrl:Zg,iconSize:[38,38],iconAnchor:[16,41]});let d=ut.icon({iconUrl:jg,iconSize:[38,38],iconAnchor:[16,41]});return o===0?d=a:o===1&&(d=h),ut.marker(t,{icon:d})}return ut.marker(t)},async searchAddress(r){const t=await mc.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:r,limit:1,format:"json"}});if(t.data.length===1){const e=parseFloat(t.data[0].lat),n={lng:parseFloat(t.data[0].lon),lat:e};return this.setCoordinates({...n,moveMarker:!0}),t.data[0]}return t.data},setCoordinates({lat:r,lng:t}){if(this.mapRender){const e=ut.latLng(r,t);this.mapRender.panTo(e,{animate:!0,duration:.5})}},getPopupContent(r){const t=r.properties||{},e=t.descripcion||"",i=t.fechaHoraLlegada||"";let n="";if(i){const a=new Date(i),h=c=>c.toString().padStart(2,"0");n=`${h(a.getDate())}-${h(a.getMonth()+1)}-${a.getFullYear()} ${h(a.getHours())}:${h(a.getMinutes())}:${h(a.getSeconds())}`}let o="<div>";return o+=`<b>Descripción:</b> ${e}<br>`,n&&(o+=`<b>Fecha Hora Llegada:</b> ${n}<br>`),o+="</div>",o}},watch:{coordinatesMap(r){if(this.renderCoordinates=r,this.mapRender&&this.markerRender){const t=ut.latLng([r[0],r[1]]);this.mapRender.setView([r[0],r[1]],r[2]),this.markerRender.setLatLng(t)}},dataPolygon(r){this.renderGeojson=r}}}),bp=["id"];function Cp(r,t,e,i,n,o){var a;return U.openBlock(),U.createElementBlock("div",{class:"map-container",style:U.normalizeStyle(`height:${(a=r.configurationMap)==null?void 0:a.height}`)},[U.createElementVNode("div",{id:r.idMap,style:{height:"100%"}},null,8,bp)],4)}const Tp=ra(Lp,[["render",Cp]]),Sp=["id"],Pp=U.defineComponent({__name:"MapSearchAddress",props:{configurationMap:{default:()=>({height:"250px",maxZoom:20,iconMarker:{iconUrl:ss,iconSize:[25,41],iconAnchor:[12,41],class:"",type:"image"},dragMarker:!0})},coordinatesMap:{default:()=>({lat:-19.0429,lng:-65.2554,zoom:12})}},emits:["updated:coordsMarker"],setup(r,{expose:t,emit:e}){const i=r,n=U.ref(),o=U.ref(i.coordinatesMap),a=U.ref(),h=U.ref();U.onMounted(async()=>{await c(10),await d()});const c=async y=>{let E="";const C="abcdefghijklmnopqrstuvwxyz",P=C.length;let w=0;for(;w<y;)E+=C.charAt(Math.floor(Math.random()*P)),w+=1;n.value=E},d=async()=>{await f()},f=async()=>{var C,P;const y=(C=i.configurationMap)==null?void 0:C.iconMarker,E=ut.map(n.value,{fullscreenControl:!0}).setView([o.value.lat,o.value.lng],o.value.zoom);if(E.invalidateSize(),a.value=E,ut.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:(P=i.configurationMap)==null?void 0:P.maxZoom,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(E),y.type==="image"){const w=ut.marker([o.value.lat,o.value.lng],{icon:ut.icon({iconUrl:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:i.configurationMap.dragMarker}).addTo(E);h.value=w,w.on("dragend",b=>{const T=b.target.getLatLng(),M=T.lat,A=T.lng;m({lat:M,lng:A})})}else if(y.type==="svg"){const w=ut.marker([o.value.lat,o.value.lng],{icon:ut.divIcon({html:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:i.configurationMap.dragMarker}).addTo(E);h.value=w,w.on("dragend",b=>{const T=b.target.getLatLng(),M=T.lat,A=T.lng;m({lat:M,lng:A})})}},_=async y=>{const E=await mc.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:y,limit:1,format:"json"}});if(E.data.length===1){const C=parseFloat(E.data[0].lat),w={lng:parseFloat(E.data[0].lon),lat:C};return m({...w,moveMarker:!0}),E.data[0]}return E.data},m=({lat:y,lng:E,moveMarker:C=!1})=>{var P;e("updated:coordsMarker",{lat:y,lng:E}),C&&((P=h.value)==null||P.setLatLng({lat:y,lng:E})),v({lat:y,lng:E})},v=({lat:y,lng:E})=>{const C=ut.latLng(y,E);a.value.panTo(C,{animate:!0,duration:.5})};return t({searchAddress:_}),(y,E)=>{var C;return U.openBlock(),U.createElementBlock("div",{class:"map-container",style:U.normalizeStyle(`height:${(C=y.configurationMap)==null?void 0:C.height}`)},[U.createElementVNode("div",{id:n.value,style:{height:"100%"}},null,8,Sp)],4)}}}),NL="";class kp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=kp,En={PROPERTYCHANGE:"propertychange"};class Mp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const ws=Mp;function Rp(r,t,e){let i,n;e=e||xi;let o=0,a=r.length,h=!1;for(;o<a;)i=o+(a-o>>1),n=+e(r[i],t),n<0?o=i+1:(a=i,h=!n);return h?o:~o}function xi(r,t){return r>t?1:r<t?-1:0}function xa(r,t,e){if(r[0]<=t)return 0;const i=r.length;if(t<=r[i-1])return i-1;if(typeof e=="function"){for(let n=1;n<i;++n){const o=r[n];if(o===t)return n;if(o<t)return e(t,r[n-1],o)>0?n-1:n}return i-1}if(e>0){for(let n=1;n<i;++n)if(r[n]<t)return n-1;return i-1}if(e<0){for(let n=1;n<i;++n)if(r[n]<=t)return n;return i-1}for(let n=1;n<i;++n){if(r[n]==t)return n;if(r[n]<t)return r[n-1]-t<t-r[n]?n-1:n}return i-1}function Ap(r,t,e){for(;t<e;){const i=r[t];r[t]=r[e],r[e]=i,++t,--e}}function ti(r,t){const e=Array.isArray(t)?t:[t],i=e.length;for(let n=0;n<i;n++)r[r.length]=e[n]}function ei(r,t){const e=r.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function Ip(r,t,e){const i=t||xi;return r.every(function(n,o){if(o===0)return!0;const a=i(r[o-1],n);return!(a>0||e&&a===0)})}function _r(){return!0}function Ls(){return!1}function wn(){}function Dp(r){let t=!1,e,i,n;return function(){const o=Array.prototype.slice.call(arguments);return(!t||this!==n||!ei(o,i))&&(t=!0,n=this,i=o,e=r.apply(this,arguments)),e}}function Ln(r){for(const t in r)delete r[t]}function bn(r){let t;for(t in r)return!1;return!t}class Op extends ws{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=typeof t=="string",i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new Qe(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),h=this.pendingRemovals_||(this.pendingRemovals_={});i in a||(a[i]=0,h[i]=0),++a[i];let c;for(let d=0,f=n.length;d<f;++d)if("handleEvent"in n[d]?c=n[d].handleEvent(o):c=n[d].call(this,o),c===!1||o.propagationStopped){c=!1;break}if(--a[i]===0){let d=h[i];for(delete h[i];d--;)this.removeEventListener(i,wn);delete a[i]}return c}disposeInternal(){this.listeners_&&Ln(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:!1}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);n!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=wn,++this.pendingRemovals_[t]):(i.splice(n,1),i.length===0&&delete this.listeners_[t]))}}}const bs=Op,st={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ct(r,t,e,i,n){if(i&&i!==r&&(e=e.bind(i)),n){const a=e;e=function(){r.removeEventListener(t,e),a.apply(this,arguments)}}const o={target:r,type:t,listener:e};return r.addEventListener(t,e),o}function Cs(r,t,e,i){return ct(r,t,e,i,!0)}function wt(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Ln(r))}class Ts extends bs{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(st.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let o=0;o<i;++o)n[o]=ct(this,t[o],e);return n}return ct(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let o=0;o<n;++o)i[o]=Cs(this,t[o],e)}else i=Cs(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)Fp(i);else if(Array.isArray(t))for(let n=0,o=t.length;n<o;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)}}Ts.prototype.on,Ts.prototype.once,Ts.prototype.un;function Fp(r){if(Array.isArray(r))for(let t=0,e=r.length;t<e;++t)wt(r[t]);else wt(r)}const yc=Ts;function it(){throw new Error("Unimplemented abstract method.")}let zp=0;function lt(r){return r.ol_uid||(r.ol_uid=String(++zp))}class vc extends Qe{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class Np extends yc{constructor(t){super(),this.on,this.once,this.un,lt(this),this.values_=null,t!==void 0&&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 vc(i,t,e)),i=En.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new vc(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 o=n[t];n[t]=e,o!==e&&this.notify(t,o)}}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],bn(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const be=Np,Ut={ANIMATING:0,INTERACTING:1},Ce={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Bp=42,Ea=256,pr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Gp{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,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_||pr[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_}}const xc=Gp,mr=6378137,Cn=Math.PI*mr,Up=[-Cn,-Cn,Cn,Cn],Zp=[-180,-85,180,85],Ss=mr*Math.log(Math.tan(Math.PI/2));class Tn extends xc{constructor(t){super({code:t,units:"m",extent:Up,global:!0,worldExtent:Zp,getPointResolution:function(e,i){return e/Math.cosh(i[1]/mr)}})}}const Ec=[new Tn("EPSG:3857"),new Tn("EPSG:102100"),new Tn("EPSG:102113"),new Tn("EPSG:900913"),new Tn("http://www.opengis.net/def/crs/EPSG/0/3857"),new Tn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function jp(r,t,e){const i=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(i));for(let n=0;n<i;n+=e){t[n]=Cn*r[n]/180;let o=mr*Math.log(Math.tan(Math.PI*(+r[n+1]+90)/360));o>Ss?o=Ss:o<-Ss&&(o=-Ss),t[n+1]=o}return t}function Hp(r,t,e){const i=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(i));for(let n=0;n<i;n+=e)t[n]=180*r[n]/Cn,t[n+1]=360*Math.atan(Math.exp(r[n+1]/mr))/Math.PI-90;return t}const Wp=6378137,wc=[-180,-90,180,90],Xp=Math.PI*Wp/180;class Xi extends xc{constructor(t,e){super({code:t,units:"degrees",extent:wc,axisOrientation:e,global:!0,metersPerUnit:Xp,worldExtent:wc})}}const Lc=[new Xi("CRS:84"),new Xi("EPSG:4326","neu"),new Xi("urn:ogc:def:crs:OGC:1.3:CRS84"),new Xi("urn:ogc:def:crs:OGC:2:84"),new Xi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Xi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Xi("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let wa={};function Vp(r){return wa[r]||wa[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Kp(r,t){wa[r]=t}let Sn={};function Ps(r,t,e){const i=r.getCode(),n=t.getCode();i in Sn||(Sn[i]={}),Sn[i][n]=e}function Yp(r,t){let e;return r in Sn&&t in Sn[r]&&(e=Sn[r][t]),e}const Zt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function bc(r){const t=ge();for(let e=0,i=r.length;e<i;++e)vr(t,r[e]);return t}function ks(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function Cc(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function Vi(r,t,e){let i,n;return t<r[0]?i=r[0]-t:r[2]<t?i=t-r[2]:i=0,e<r[1]?n=r[1]-e:r[3]<e?n=e-r[3]:n=0,i*i+n*n}function Ms(r,t){return La(r,t[0],t[1])}function Ki(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function La(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function ba(r,t){const e=r[0],i=r[1],n=r[2],o=r[3],a=t[0],h=t[1];let c=Zt.UNKNOWN;return a<e?c=c|Zt.LEFT:a>n&&(c=c|Zt.RIGHT),h<i?c=c|Zt.BELOW:h>o&&(c=c|Zt.ABOVE),c===Zt.UNKNOWN&&(c=Zt.INTERSECTING),c}function ge(){return[1/0,1/0,-1/0,-1/0]}function Ei(r,t,e,i,n){return n?(n[0]=r,n[1]=t,n[2]=e,n[3]=i,n):[r,t,e,i]}function yr(r){return Ei(1/0,1/0,-1/0,-1/0,r)}function qp(r,t){const e=r[0],i=r[1];return Ei(e,i,e,i,t)}function Tc(r,t,e,i,n){const o=yr(n);return Pc(o,r,t,e,i)}function Pn(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function Sc(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function vr(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function Pc(r,t,e,i,n){for(;e<i;e+=n)Jp(r,t[e],t[e+1]);return r}function Jp(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function kc(r,t){let e;return e=t(Rs(r)),e||(e=t(As(r)),e)||(e=t(Is(r)),e)||(e=t(qi(r)),e)?e:!1}function Ca(r){let t=0;return Ds(r)||(t=Ct(r)*Fe(r)),t}function Rs(r){return[r[0],r[1]]}function As(r){return[r[2],r[1]]}function Yi(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function $p(r,t){let e;if(t==="bottom-left")e=Rs(r);else if(t==="bottom-right")e=As(r);else if(t==="top-left")e=qi(r);else if(t==="top-right")e=Is(r);else throw new Error("Invalid corner");return e}function Ta(r,t,e,i,n){const[o,a,h,c,d,f,_,m]=Sa(r,t,e,i);return Ei(Math.min(o,h,d,_),Math.min(a,c,f,m),Math.max(o,h,d,_),Math.max(a,c,f,m),n)}function Sa(r,t,e,i){const n=t*i[0]/2,o=t*i[1]/2,a=Math.cos(e),h=Math.sin(e),c=n*a,d=n*h,f=o*a,_=o*h,m=r[0],v=r[1];return[m-c+_,v-d-f,m-c-_,v-d+f,m+c-_,v+d+f,m+c+_,v+d-f,m-c+_,v-d-f]}function Fe(r){return r[3]-r[1]}function xr(r,t,e){const i=e||ge();return se(r,t)?(r[0]>t[0]?i[0]=r[0]:i[0]=t[0],r[1]>t[1]?i[1]=r[1]:i[1]=t[1],r[2]<t[2]?i[2]=r[2]:i[2]=t[2],r[3]<t[3]?i[3]=r[3]:i[3]=t[3]):yr(i),i}function qi(r){return[r[0],r[3]]}function Is(r){return[r[2],r[3]]}function Ct(r){return r[2]-r[0]}function se(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function Ds(r){return r[2]<r[0]||r[3]<r[1]}function Qp(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function tm(r,t,e){let i=!1;const n=ba(r,t),o=ba(r,e);if(n===Zt.INTERSECTING||o===Zt.INTERSECTING)i=!0;else{const a=r[0],h=r[1],c=r[2],d=r[3],f=t[0],_=t[1],m=e[0],v=e[1],y=(v-_)/(m-f);let E,C;o&Zt.ABOVE&&!(n&Zt.ABOVE)&&(E=m-(v-d)/y,i=E>=a&&E<=c),!i&&o&Zt.RIGHT&&!(n&Zt.RIGHT)&&(C=v-(m-c)*y,i=C>=h&&C<=d),!i&&o&Zt.BELOW&&!(n&Zt.BELOW)&&(E=m-(v-h)/y,i=E>=a&&E<=c),!i&&o&Zt.LEFT&&!(n&Zt.LEFT)&&(C=v-(m-a)*y,i=C>=h&&C<=d)}return i}function Mc(r,t){const e=t.getExtent(),i=Yi(r);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){const n=Ct(e),a=Math.floor((i[0]-e[0])/n)*n;r[0]-=a,r[2]-=a}return r}function em(r,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[e[0],r[1],e[2],r[3]]];Mc(r,t);const i=Ct(e);if(Ct(r)>i)return[[e[0],r[1],e[2],r[3]]];if(r[0]<e[0])return[[r[0]+i,r[1],e[2],r[3]],[e[0],r[1],r[2],r[3]]];if(r[2]>e[2])return[[r[0],r[1],e[2],r[3]],[e[0],r[1],r[2]-i,r[3]]]}return[r]}function At(r,t,e){return Math.min(Math.max(r,t),e)}function im(r,t,e,i,n,o){const a=n-e,h=o-i;if(a!==0||h!==0){const c=((r-e)*a+(t-i)*h)/(a*a+h*h);c>1?(e=n,i=o):c>0&&(e+=a*c,i+=h*c)}return Ji(r,t,e,i)}function Ji(r,t,e,i){const n=e-r,o=i-t;return n*n+o*o}function nm(r){const t=r.length;for(let i=0;i<t;i++){let n=i,o=Math.abs(r[i][i]);for(let h=i+1;h<t;h++){const c=Math.abs(r[h][i]);c>o&&(o=c,n=h)}if(o===0)return null;const a=r[n];r[n]=r[i],r[i]=a;for(let h=i+1;h<t;h++){const c=-r[h][i]/r[i][i];for(let d=i;d<t+1;d++)i==d?r[h][d]=0:r[h][d]+=c*r[i][d]}}const e=new Array(t);for(let i=t-1;i>=0;i--){e[i]=r[i][t]/r[i][i];for(let n=i-1;n>=0;n--)r[n][t]-=r[n][i]*e[i]}return e}function Os(r){return r*Math.PI/180}function kn(r,t){const e=r%t;return e*t<0?e+t:e}function _e(r,t,e){return r+e*(t-r)}function Pa(r,t){const e=Math.pow(10,t);return Math.round(r*e)/e}function Fs(r,t){return Math.floor(Pa(r,t))}function zs(r,t){return Math.ceil(Pa(r,t))}function rm(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function Ns(r,t){let e=!0;for(let i=r.length-1;i>=0;--i)if(r[i]!=t[i]){e=!1;break}return e}function ka(r,t){const e=Math.cos(t),i=Math.sin(t),n=r[0]*e-r[1]*i,o=r[1]*e+r[0]*i;return r[0]=n,r[1]=o,r}function sm(r,t){return r[0]*=t,r[1]*=t,r}function Rc(r,t){if(t.canWrapX()){const e=Ct(t.getExtent()),i=om(r,t,e);i&&(r[0]-=i*e)}return r}function om(r,t,e){const i=t.getExtent();let n=0;return t.canWrapX()&&(r[0]<i[0]||r[0]>i[2])&&(e=e||Ct(i),n=Math.floor((r[0]-i[0])/e)),n}const am=63710088e-1;function Ac(r,t,e){e=e||am;const i=Os(r[1]),n=Os(t[1]),o=(n-i)/2,a=Os(t[0]-r[0])/2,h=Math.sin(o)*Math.sin(o)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(n);return 2*e*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}const Ic={info:1,warn:2,error:3,none:4};let lm=Ic.info;function Dc(...r){lm>Ic.warn||console.warn(...r)}let Ma=!0;function Oc(r){Ma=!(r===void 0?!0:r)}function Ra(r,t){if(t!==void 0){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];t=t}else t=r.slice();return t}function Fc(r,t){if(t!==void 0&&r!==t){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];r=t}return r}function hm(r){Kp(r.getCode(),r),Ps(r,r,Ra)}function cm(r){r.forEach(hm)}function Gt(r){return typeof r=="string"?Vp(r):r||null}function zc(r,t,e,i){r=Gt(r);let n;const o=r.getPointResolutionFunc();if(o){if(n=o(t,e),i&&i!==r.getUnits()){const a=r.getMetersPerUnit();a&&(n=n*a/pr[i])}}else{const a=r.getUnits();if(a=="degrees"&&!i||i=="degrees")n=t;else{const h=Ia(r,Gt("EPSG:4326"));if(h===Fc&&a!=="degrees")n=t*r.getMetersPerUnit();else{let d=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];d=h(d,d,2);const f=Ac(d.slice(0,2),d.slice(2,4)),_=Ac(d.slice(4,6),d.slice(6,8));n=(f+_)/2}const c=i?pr[i]:r.getMetersPerUnit();c!==void 0&&(n/=c)}}return n}function Nc(r){cm(r),r.forEach(function(t){r.forEach(function(e){t!==e&&Ps(t,e,Ra)})})}function um(r,t,e,i){r.forEach(function(n){t.forEach(function(o){Ps(n,o,e),Ps(o,n,i)})})}function Aa(r,t){return r?typeof r=="string"?Gt(r):r:Gt(t)}function Bc(r,t){return Oc(),Gc(r,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function $i(r,t){if(r===t)return!0;const e=r.getUnits()===t.getUnits();return(r.getCode()===t.getCode()||Ia(r,t)===Ra)&&e}function Ia(r,t){const e=r.getCode(),i=t.getCode();let n=Yp(e,i);return n||(n=Fc),n}function Bs(r,t){const e=Gt(r),i=Gt(t);return Ia(e,i)}function Gc(r,t,e){return Bs(t,e)(r,void 0,r.length)}function Da(r,t){return r}function ii(r,t){return Ma&&!Ns(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(Ma=!1,Dc("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function Uc(r,t){return r}function Qi(r,t){return r}function dm(){Nc(Ec),Nc(Lc),um(Lc,Ec,jp,Hp)}dm();function gt(r,t){if(!r)throw new Error(t)}function Zc(r,t,e){return function(i,n,o,a,h){if(!i)return;if(!n&&!t)return i;const c=t?0:o[0]*n,d=t?0:o[1]*n,f=h?h[0]:0,_=h?h[1]:0;let m=r[0]+c/2+f,v=r[2]-c/2+f,y=r[1]+d/2+_,E=r[3]-d/2+_;m>v&&(m=(v+m)/2,v=m),y>E&&(y=(E+y)/2,E=y);let C=At(i[0],m,v),P=At(i[1],y,E);if(a&&e&&n){const w=30*n;C+=-w*Math.log(1+Math.max(0,m-i[0])/w)+w*Math.log(1+Math.max(0,i[0]-v)/w),P+=-w*Math.log(1+Math.max(0,y-i[1])/w)+w*Math.log(1+Math.max(0,i[1]-E)/w)}return[C,P]}}function fm(r){return r}function Oa(r,t,e,i){const n=Ct(t)/e[0],o=Fe(t)/e[1];return i?Math.min(r,Math.max(n,o)):Math.min(r,Math.min(n,o))}function Fa(r,t,e){let i=Math.min(r,t);const n=50;return i*=Math.log(1+n*Math.max(0,r/t-1))/n+1,e&&(i=Math.max(i,e),i/=Math.log(1+n*Math.max(0,e/r-1))/n+1),At(i,e/2,t*2)}function gm(r,t,e,i){return t=t!==void 0?t:!0,function(n,o,a,h){if(n!==void 0){const c=r[0],d=r[r.length-1],f=e?Oa(c,e,a,i):c;if(h)return t?Fa(n,f,d):At(n,d,f);const _=Math.min(f,n),m=Math.floor(xa(r,_,o));return r[m]>f&&m<r.length-1?r[m+1]:r[m]}}}function _m(r,t,e,i,n,o){return i=i!==void 0?i:!0,e=e!==void 0?e:0,function(a,h,c,d){if(a!==void 0){const f=n?Oa(t,n,c,o):t;if(d)return i?Fa(a,f,e):At(a,e,f);const _=1e-9,m=Math.ceil(Math.log(t/f)/Math.log(r)-_),v=-h*(.5-_)+.5,y=Math.min(f,a),E=Math.floor(Math.log(t/y)/Math.log(r)+v),C=Math.max(m,E),P=t/Math.pow(r,C);return At(P,e,f)}}}function jc(r,t,e,i,n){return e=e!==void 0?e:!0,function(o,a,h,c){if(o!==void 0){const d=i?Oa(r,i,h,n):r;return!e||!c?At(o,t,d):Fa(o,d,t)}}}function za(r){if(r!==void 0)return 0}function Hc(r){if(r!==void 0)return r}function pm(r){const t=2*Math.PI/r;return function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function mm(r){return r=r||Os(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=r?0:t}}function Wc(r){return Math.pow(r,3)}function Mn(r){return 1-Wc(1-r)}function ym(r){return 3*r*r-2*r*r*r}function vm(r){return r}const wi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",xm=wi.includes("firefox"),Em=wi.includes("safari")&&!wi.includes("chrom")&&(wi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(wi)),wm=wi.includes("webkit")&&!wi.includes("edge"),Xc=wi.includes("macintosh"),Vc=typeof devicePixelRatio<"u"?devicePixelRatio:1,Na=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Kc=typeof Image<"u"&&Image.prototype.decode,Yc=function(){let r=!1;try{const t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r}(),Lm=new Array(6);function Xt(){return[1,0,0,1,0,0]}function qc(r,t){const e=r[0],i=r[1],n=r[2],o=r[3],a=r[4],h=r[5],c=t[0],d=t[1],f=t[2],_=t[3],m=t[4],v=t[5];return r[0]=e*c+n*d,r[1]=i*c+o*d,r[2]=e*f+n*_,r[3]=i*f+o*_,r[4]=e*m+n*v+a,r[5]=i*m+o*v+h,r}function Jc(r,t,e,i,n,o,a){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r[4]=o,r[5]=a,r}function bm(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Ot(r,t){const e=t[0],i=t[1];return t[0]=r[0]*e+r[2]*i+r[4],t[1]=r[1]*e+r[3]*i+r[5],t}function Cm(r,t,e){return Jc(r,t,0,0,e,0,0)}function Tm(r,t,e){return qc(r,Jc(Lm,1,0,0,1,t,e))}function ze(r,t,e,i,n,o,a,h){const c=Math.sin(o),d=Math.cos(o);return r[0]=i*d,r[1]=n*c,r[2]=-i*c,r[3]=n*d,r[4]=a*i*d-h*i*c+t,r[5]=a*n*c+h*n*d+e,r}function Gs(r,t){const e=Sm(t);gt(e!==0,"Transformation matrix cannot be inverted");const i=t[0],n=t[1],o=t[2],a=t[3],h=t[4],c=t[5];return r[0]=a/e,r[1]=-n/e,r[2]=-o/e,r[3]=i/e,r[4]=(o*c-a*h)/e,r[5]=-(i*c-n*h)/e,r}function Sm(r){return r[0]*r[3]-r[1]*r[2]}let $c;function Qc(r){const t="matrix("+r.join(", ")+")";if(Na)return t;const e=$c||($c=document.createElement("div"));return e.style.transform=t,e.style.transform}function tn(r,t,e,i,n,o){o=o||[];let a=0;for(let h=t;h<e;h+=i){const c=r[h],d=r[h+1];o[a++]=n[0]*c+n[2]*d+n[4],o[a++]=n[1]*c+n[3]*d+n[5]}return o&&o.length!=a&&(o.length=a),o}function tu(r,t,e,i,n,o,a){a=a||[];const h=Math.cos(n),c=Math.sin(n),d=o[0],f=o[1];let _=0;for(let m=t;m<e;m+=i){const v=r[m]-d,y=r[m+1]-f;a[_++]=d+v*h-y*c,a[_++]=f+v*c+y*h;for(let E=m+2;E<m+i;++E)a[_++]=r[E]}return a&&a.length!=_&&(a.length=_),a}function Pm(r,t,e,i,n,o,a,h){h=h||[];const c=a[0],d=a[1];let f=0;for(let _=t;_<e;_+=i){const m=r[_]-c,v=r[_+1]-d;h[f++]=c+n*m,h[f++]=d+o*v;for(let y=_+2;y<_+i;++y)h[f++]=r[y]}return h&&h.length!=f&&(h.length=f),h}function km(r,t,e,i,n,o,a){a=a||[];let h=0;for(let c=t;c<e;c+=i){a[h++]=r[c]+n,a[h++]=r[c+1]+o;for(let d=c+2;d<c+i;++d)a[h++]=r[d]}return a&&a.length!=h&&(a.length=h),a}const eu=Xt();class Mm extends be{constructor(){super(),this.extent_=ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Dp(function(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 it()}closestPointXY(t,e,i,n){return it()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}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 it()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&yr(e),this.extentRevision_=this.getRevision()}return Qp(this.extent_,t)}rotate(t,e){it()}scale(t,e,i){it()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return it()}getType(){return it()}applyTransform(t){it()}intersectsExtent(t){return it()}translate(t,e){it()}transform(t,e){const i=Gt(t),n=i.getUnits()=="tile-pixels"?function(o,a,h){const c=i.getExtent(),d=i.getWorldExtent(),f=Fe(d)/Fe(c);return ze(eu,d[0],d[3],f,-f,0,0,0),tn(o,0,o.length,h,eu,a),Bs(i,e)(o,a,h)}:Bs(i,e);return this.applyTransform(n),this}}const iu=Mm;class Rm extends iu{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Tc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return it()}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||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&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=nu(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){it()}setLayout(t,e,i){let n;if(t)n=nu(t);else{for(let o=0;o<i;++o){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}n=e.length,t=Am(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();tu(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=Yi(this.getExtent()));const n=this.getFlatCoordinates();if(n){const o=this.getStride();Pm(n,0,n.length,o,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();km(i,0,i.length,n,t,e,i),this.changed()}}}function Am(r){let t;return r==2?t="XY":r==3?t="XYZ":r==4&&(t="XYZM"),t}function nu(r){let t;return r=="XY"?t=2:r=="XYZ"||r=="XYM"?t=3:r=="XYZM"&&(t=4),t}function Im(r,t,e){const i=r.getFlatCoordinates();if(!i)return null;const n=r.getStride();return tn(i,0,i.length,n,t,e)}const en=Rm;function ru(r,t,e,i,n,o,a){const h=r[t],c=r[t+1],d=r[e]-h,f=r[e+1]-c;let _;if(d===0&&f===0)_=t;else{const m=((n-h)*d+(o-c)*f)/(d*d+f*f);if(m>1)_=e;else if(m>0){for(let v=0;v<i;++v)a[v]=_e(r[t+v],r[e+v],m);a.length=i;return}else _=t}for(let m=0;m<i;++m)a[m]=r[_+m];a.length=i}function Ba(r,t,e,i,n){let o=r[t],a=r[t+1];for(t+=i;t<e;t+=i){const h=r[t],c=r[t+1],d=Ji(o,a,h,c);d>n&&(n=d),o=h,a=c}return n}function Ga(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];n=Ba(r,t,h,i,n),t=h}return n}function Dm(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];n=Ga(r,t,h,i,n),t=h[h.length-1]}return n}function Ua(r,t,e,i,n,o,a,h,c,d,f){if(t==e)return d;let _,m;if(n===0){if(m=Ji(a,h,r[t],r[t+1]),m<d){for(_=0;_<i;++_)c[_]=r[t+_];return c.length=i,m}return d}f=f||[NaN,NaN];let v=t+i;for(;v<e;)if(ru(r,v-i,v,i,a,h,f),m=Ji(a,h,f[0],f[1]),m<d){for(d=m,_=0;_<i;++_)c[_]=f[_];c.length=i,v+=i}else v+=i*Math.max((Math.sqrt(m)-Math.sqrt(d))/n|0,1);if(o&&(ru(r,e-i,t,i,a,h,f),m=Ji(a,h,f[0],f[1]),m<d)){for(d=m,_=0;_<i;++_)c[_]=f[_];c.length=i}return d}function Za(r,t,e,i,n,o,a,h,c,d,f){f=f||[NaN,NaN];for(let _=0,m=e.length;_<m;++_){const v=e[_];d=Ua(r,t,v,i,n,o,a,h,c,d,f),t=v}return d}function Om(r,t,e,i,n,o,a,h,c,d,f){f=f||[NaN,NaN];for(let _=0,m=e.length;_<m;++_){const v=e[_];d=Za(r,t,v,i,n,o,a,h,c,d,f),t=v[v.length-1]}return d}function Fm(r,t,e,i){for(let n=0,o=e.length;n<o;++n)r[t++]=e[n];return t}function Us(r,t,e,i){for(let n=0,o=e.length;n<o;++n){const a=e[n];for(let h=0;h<i;++h)r[t++]=a[h]}return t}function ja(r,t,e,i,n){n=n||[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=Us(r,t,e[a],i);n[o++]=c,t=c}return n.length=o,n}function zm(r,t,e,i,n){n=n||[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=ja(r,t,e[a],i,n[o]);c.length===0&&(c[0]=t),n[o++]=c,t=c[c.length-1]}return n.length=o,n}function Ha(r,t,e,i,n,o,a){const h=(e-t)/i;if(h<3){for(;t<e;t+=i)o[a++]=r[t],o[a++]=r[t+1];return a}const c=new Array(h);c[0]=1,c[h-1]=1;const d=[t,e-i];let f=0;for(;d.length>0;){const _=d.pop(),m=d.pop();let v=0;const y=r[m],E=r[m+1],C=r[_],P=r[_+1];for(let w=m+i;w<_;w+=i){const b=r[w],T=r[w+1],M=im(b,T,y,E,C,P);M>v&&(f=w,v=M)}v>n&&(c[(f-t)/i]=1,m+i<f&&d.push(m,f),f+i<_&&d.push(f,_))}for(let _=0;_<h;++_)c[_]&&(o[a++]=r[t+_*i],o[a++]=r[t+_*i+1]);return a}function Nm(r,t,e,i,n,o,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=Ha(r,t,f,i,n,o,a),h.push(a),t=f}return a}function nn(r,t){return t*Math.round(r/t)}function Bm(r,t,e,i,n,o,a){if(t==e)return a;let h=nn(r[t],n),c=nn(r[t+1],n);t+=i,o[a++]=h,o[a++]=c;let d,f;do if(d=nn(r[t],n),f=nn(r[t+1],n),t+=i,t==e)return o[a++]=d,o[a++]=f,a;while(d==h&&f==c);for(;t<e;){const _=nn(r[t],n),m=nn(r[t+1],n);if(t+=i,_==d&&m==f)continue;const v=d-h,y=f-c,E=_-h,C=m-c;if(v*C==y*E&&(v<0&&E<v||v==E||v>0&&E>v)&&(y<0&&C<y||y==C||y>0&&C>y)){d=_,f=m;continue}o[a++]=d,o[a++]=f,h=d,c=f,d=_,f=m}return o[a++]=d,o[a++]=f,a}function su(r,t,e,i,n,o,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=Bm(r,t,f,i,n,o,a),h.push(a),t=f}return a}function Gm(r,t,e,i,n,o,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c],_=[];a=su(r,t,f,i,n,o,a,_),h.push(_),t=f[f.length-1]}return a}function Li(r,t,e,i,n){n=n!==void 0?n:[];let o=0;for(let a=t;a<e;a+=i)n[o++]=r.slice(a,a+i);return n.length=o,n}function Er(r,t,e,i,n){n=n!==void 0?n:[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];n[o++]=Li(r,t,c,i,n[o]),t=c}return n.length=o,n}function Wa(r,t,e,i,n){n=n!==void 0?n:[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];n[o++]=c.length===1&&c[0]===t?[]:Er(r,t,c,i,n[o]),t=c[c.length-1]}return n.length=o,n}function ou(r,t,e,i){let n=0,o=r[e-i],a=r[e-i+1];for(;t<e;t+=i){const h=r[t],c=r[t+1];n+=a*h-o*c,o=h,a=c}return n/2}function au(r,t,e,i){let n=0;for(let o=0,a=e.length;o<a;++o){const h=e[o];n+=ou(r,t,h,i),t=h}return n}function Um(r,t,e,i){let n=0;for(let o=0,a=e.length;o<a;++o){const h=e[o];n+=au(r,t,h,i),t=h[h.length-1]}return n}class Zs extends en{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new Zs(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Vi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ba(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ua(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return ou(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Zs(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Us(this.flatCoordinates,0,t,this.stride),this.changed()}}const lu=Zs;class Xa extends en{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Xa(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const o=this.flatCoordinates,a=Ji(t,e,o[0],o[1]);if(a<n){const h=this.stride;for(let c=0;c<h;++c)i[c]=o[c];return i.length=h,a}return n}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return qp(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return La(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Fm(this.flatCoordinates,0,t,this.stride),this.changed()}}const js=Xa;function Zm(r,t,e,i,n){return!kc(n,function(a){return!rn(r,t,e,i,a[0],a[1])})}function rn(r,t,e,i,n,o){let a=0,h=r[e-i],c=r[e-i+1];for(;t<e;t+=i){const d=r[t],f=r[t+1];c<=o?f>o&&(d-h)*(o-c)-(n-h)*(f-c)>0&&a++:f<=o&&(d-h)*(o-c)-(n-h)*(f-c)<0&&a--,h=d,c=f}return a!==0}function Va(r,t,e,i,n,o){if(e.length===0||!rn(r,t,e[0],i,n,o))return!1;for(let a=1,h=e.length;a<h;++a)if(rn(r,e[a-1],e[a],i,n,o))return!1;return!0}function jm(r,t,e,i,n,o){if(e.length===0)return!1;for(let a=0,h=e.length;a<h;++a){const c=e[a];if(Va(r,t,c,i,n,o))return!0;t=c[c.length-1]}return!1}function hu(r,t,e,i,n,o,a){let h,c,d,f,_,m,v;const y=n[o+1],E=[];for(let w=0,b=e.length;w<b;++w){const T=e[w];for(f=r[T-i],m=r[T-i+1],h=t;h<T;h+=i)_=r[h],v=r[h+1],(y<=m&&v<=y||m<=y&&y<=v)&&(d=(y-m)/(v-m)*(_-f)+f,E.push(d)),f=_,m=v}let C=NaN,P=-1/0;for(E.sort(xi),f=E[0],h=1,c=E.length;h<c;++h){_=E[h];const w=Math.abs(_-f);w>P&&(d=(f+_)/2,Va(r,t,e,i,d,y)&&(C=d,P=w)),f=_}return isNaN(C)&&(C=n[o]),a?(a.push(C,y,P),a):[C,y,P]}function Hm(r,t,e,i,n){let o=[];for(let a=0,h=e.length;a<h;++a){const c=e[a];o=hu(r,t,c,i,n,2*a,o),t=c[c.length-1]}return o}function cu(r,t,e,i,n){let o;for(t+=i;t<e;t+=i)if(o=n(r.slice(t-i,t),r.slice(t,t+i)),o)return o;return!1}function Hs(r,t,e,i,n){const o=Pc(ge(),r,t,e,i);return se(n,o)?Ki(n,o)||o[0]>=n[0]&&o[2]<=n[2]||o[1]>=n[1]&&o[3]<=n[3]?!0:cu(r,t,e,i,function(a,h){return tm(n,a,h)}):!1}function Wm(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){if(Hs(r,t,e[o],i,n))return!0;t=e[o]}return!1}function uu(r,t,e,i,n){return!!(Hs(r,t,e,i,n)||rn(r,t,e,i,n[0],n[1])||rn(r,t,e,i,n[0],n[3])||rn(r,t,e,i,n[2],n[1])||rn(r,t,e,i,n[2],n[3]))}function du(r,t,e,i,n){if(!uu(r,t,e[0],i,n))return!1;if(e.length===1)return!0;for(let o=1,a=e.length;o<a;++o)if(Zm(r,e[o-1],e[o],i,n)&&!Hs(r,e[o-1],e[o],i,n))return!1;return!0}function Xm(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];if(du(r,t,h,i,n))return!0;t=h[h.length-1]}return!1}function Vm(r,t,e,i){for(;t<e-i;){for(let n=0;n<i;++n){const o=r[t+n];r[t+n]=r[e-i+n],r[e-i+n]=o}t+=i,e-=i}}function fu(r,t,e,i){let n=0,o=r[e-i],a=r[e-i+1];for(;t<e;t+=i){const h=r[t],c=r[t+1];n+=(h-o)*(c+a),o=h,a=c}return n===0?void 0:n>0}function gu(r,t,e,i,n){n=n!==void 0?n:!1;for(let o=0,a=e.length;o<a;++o){const h=e[o],c=fu(r,t,h,i);if(o===0){if(n&&c||!n&&!c)return!1}else if(n&&!c||!n&&c)return!1;t=h}return!0}function Km(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];if(!gu(r,t,h,i,n))return!1;h.length&&(t=h[h.length-1])}return!0}function Ka(r,t,e,i,n){n=n!==void 0?n:!1;for(let o=0,a=e.length;o<a;++o){const h=e[o],c=fu(r,t,h,i);(o===0?n&&c||!n&&!c:n&&!c||!n&&c)&&Vm(r,t,h,i),t=h}return t}function _u(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o)t=Ka(r,t,e[o],i,n);return t}class wr extends en{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,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?ti(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new wr(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Vi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ga(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Za(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return Va(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return au(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Ka(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Er(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Yi(this.getExtent());this.flatInteriorPoint_=hu(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new js(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new lu(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let o=0;for(let a=0,h=i.length;a<h;++a){const c=i[a],d=new lu(e.slice(o,c),t);n.push(d),o=c}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;gu(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ka(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=su(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new wr(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return du(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=ja(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}const Ws=wr;function pu(r){if(Ds(r))throw new Error("Cannot create polygon from empty extent");const t=r[0],e=r[1],i=r[2],n=r[3],o=[t,e,t,n,i,n,i,e,t,e];return new wr(o,"XY",[o.length])}const Ya=0;class Ym extends be{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Aa(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&&Oc(),t.center&&(t.center=ii(t.center,this.projection_)),t.extent&&(t.extent=Qi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const h in Ce)delete e[h];this.setProperties(e,!0);const i=Jm(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=qm(t),o=i.constraint,a=$m(t);this.constraints_={center:n,resolution:o,rotation:a},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&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 o=this.getResolution(),a=o/2*(n[3]-e[3]+e[1]-n[1]),h=o/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+a,i[1]-h])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?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 n=arguments[i];n.center&&(n=Object.assign({},n),n.center=ii(n.center,this.getProjection())),n.anchor&&(n=Object.assign({},n),n.anchor=ii(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let n=0;for(;n<e&&!this.isDef();++n){const f=arguments[n];f.center&&this.setCenterInternal(f.center),f.zoom!==void 0?this.setZoom(f.zoom):f.resolution&&this.setResolution(f.resolution),f.rotation!==void 0&&this.setRotation(f.rotation)}if(n===e){i&&Xs(i,!0);return}let o=Date.now(),a=this.targetCenter_.slice(),h=this.targetResolution_,c=this.targetRotation_;const d=[];for(;n<e;++n){const f=arguments[n],_={start:o,complete:!1,anchor:f.anchor,duration:f.duration!==void 0?f.duration:1e3,easing:f.easing||ym,callback:i};if(f.center&&(_.sourceCenter=a,_.targetCenter=f.center.slice(),a=_.targetCenter),f.zoom!==void 0?(_.sourceResolution=h,_.targetResolution=this.getResolutionForZoom(f.zoom),h=_.targetResolution):f.resolution&&(_.sourceResolution=h,_.targetResolution=f.resolution,h=_.targetResolution),f.rotation!==void 0){_.sourceRotation=c;const m=kn(f.rotation-c+Math.PI,2*Math.PI)-Math.PI;_.targetRotation=c+m,c=_.targetRotation}Qm(_)?_.complete=!0:o+=_.duration,d.push(_)}this.animations_.push(d),this.setHint(Ut.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Ut.ANIMATING]>0}getInteracting(){return this.hints_[Ut.INTERACTING]>0}cancelAnimations(){this.setHint(Ut.ANIMATING,-this.hints_[Ut.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){const n=this.animations_[e];if(n[0].callback&&Xs(n[0].callback,!1),!t)for(let o=0,a=n.length;o<a;++o){const h=n[o];if(!h.complete){t=h.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(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 o=!0;for(let a=0,h=n.length;a<h;++a){const c=n[a];if(c.complete)continue;const d=t-c.start;let f=c.duration>0?d/c.duration:1;f>=1?(c.complete=!0,f=1):o=!1;const _=c.easing(f);if(c.sourceCenter){const m=c.sourceCenter[0],v=c.sourceCenter[1],y=c.targetCenter[0],E=c.targetCenter[1];this.nextCenter_=c.targetCenter;const C=m+_*(y-m),P=v+_*(E-v);this.targetCenter_=[C,P]}if(c.sourceResolution&&c.targetResolution){const m=_===1?c.targetResolution:c.sourceResolution+_*(c.targetResolution-c.sourceResolution);if(c.anchor){const v=this.getViewportSize_(this.getRotation()),y=this.constraints_.resolution(m,0,v,!0);this.targetCenter_=this.calculateCenterZoom(y,c.anchor)}this.nextResolution_=c.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(c.sourceRotation!==void 0&&c.targetRotation!==void 0){const m=_===1?kn(c.targetRotation+Math.PI,2*Math.PI)-Math.PI:c.sourceRotation+_*(c.targetRotation-c.sourceRotation);if(c.anchor){const v=this.constraints_.rotation(m,!0);this.targetCenter_=this.calculateCenterRotate(v,c.anchor)}this.nextRotation_=c.targetRotation,this.targetRotation_=m}if(this.applyTargetState_(!0),e=!0,!c.complete)break}if(o){this.animations_[i]=null,this.setHint(Ut.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=n[0].callback;a&&Xs(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return n!==void 0&&(i=[n[0]-e[0],n[1]-e[1]],ka(i,t-this.getRotation()),rm(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),o=this.getResolution();if(n!==void 0&&o!==void 0){const a=e[0]-t*(e[0]-n[0])/o,h=e[1]-t*(e[1]-n[1])/o;i=[a,h]}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&&Da(t,this.getProjection())}getCenterInternal(){return this.get(Ce.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Uc(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();gt(e,"The view center is not defined");const i=this.getResolution();gt(i!==void 0,"The view resolution is not defined");const n=this.getRotation();return gt(n!==void 0,"The view rotation is not defined"),Ta(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(Ce.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Qi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Ct(t)/e[0],n=Fe(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(o){return e/Math.pow(t,o*n)}}getRotation(){return this.get(Ce.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(i/n)/e;return function(a){return Math.log(i/a)/e/o}}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 o=this.padding_;if(o){const a=this.getViewportSizeMinusPadding_();n=qa(n,this.getViewportSize_(),[a[0]/2+o[3],a[1]/2+o[0]],e,i)}return{center:n.slice(0),projection:t!==void 0?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 e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,n;if(this.resolutions_){const o=xa(this.resolutions_,t,1);e=o,i=this.resolutions_[o],o==this.resolutions_.length-1?n=2:n=i/this.resolutions_[o+1]}else i=this.maxResolution_,n=this.zoomFactor_;return e+Math.log(i/t)/Math.log(n)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=At(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,At(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){gt(!Ds(t),"Cannot fit empty extent provided as `geometry`");const n=Qi(t,this.getProjection());i=pu(n)}else if(t.getType()==="Circle"){const n=Qi(t.getExtent(),this.getProjection());i=pu(n),i.rotate(this.getRotation(),Yi(n))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),o=t.getFlatCoordinates(),a=t.getStride();let h=1/0,c=1/0,d=-1/0,f=-1/0;for(let _=0,m=o.length;_<m;_+=a){const v=o[_]*i-o[_+1]*n,y=o[_]*n+o[_+1]*i;h=Math.min(h,v),c=Math.min(c,y),d=Math.max(d,v),f=Math.max(f,y)}return[h,c,d,f]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const n=e.padding!==void 0?e.padding:[0,0,0,0],o=e.nearest!==void 0?e.nearest:!1;let a;e.minResolution!==void 0?a=e.minResolution:e.maxZoom!==void 0?a=this.getResolutionForZoom(e.maxZoom):a=0;const h=this.rotatedExtentForGeometry(t);let c=this.getResolutionForExtentInternal(h,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);c=isNaN(c)?a:Math.max(c,a),c=this.getConstrainedResolution(c,o?0:1);const d=this.getRotation(),f=Math.sin(d),_=Math.cos(d),m=Yi(h);m[0]+=(n[1]-n[3])/2*c,m[1]+=(n[0]-n[2])/2*c;const v=m[0]*_-m[1]*f,y=m[1]*_+m[0]*f,E=this.getConstrainedCenter([v,y],c),C=e.callback?e.callback:wn;e.duration!==void 0?this.animateInternal({resolution:c,center:E,duration:e.duration,easing:e.easing},C):(this.targetResolution_=c,this.targetCenter_=E,this.applyTargetState_(!1,!0),Xs(C,!0))}centerOn(t,e,i){this.centerOnInternal(ii(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(qa(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let o;const a=this.padding_;if(a&&t){const h=this.getViewportSizeMinusPadding_(-i),c=qa(t,n,[h[0]/2+a[3],h[1]/2+a[0]],e,i);o=[t[0]-c[0],t[1]-c[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Da(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&&ii(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=ii(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&&ii(t,this.getProjection()))}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),o=this.getViewportSize_(n),a=this.constraints_.resolution(this.targetResolution_,0,o,i),h=this.constraints_.center(this.targetCenter_,a,o,i,this.calculateCenterShift(this.targetCenter_,a,n,o));this.get(Ce.ROTATION)!==n&&this.set(Ce.ROTATION,n),this.get(Ce.RESOLUTION)!==a&&(this.set(Ce.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),(!h||!this.get(Ce.CENTER)||!Ns(this.get(Ce.CENTER),h))&&this.set(Ce.CENTER,h),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;const n=e||0,o=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(o),h=this.constraints_.resolution(this.targetResolution_,n,a),c=this.constraints_.center(this.targetCenter_,h,a,!1,this.calculateCenterShift(this.targetCenter_,h,o,a));if(t===0&&!this.cancelAnchor_){this.targetResolution_=h,this.targetRotation_=o,this.targetCenter_=c,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==h||this.getRotation()!==o||!this.getCenterInternal()||!Ns(this.getCenterInternal(),c))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:c,resolution:h,duration:t,easing:Mn,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Ut.INTERACTING,1)}endInteraction(t,e,i){i=i&&ii(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(Ut.INTERACTING,-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)}}function Xs(r,t){setTimeout(function(){r(t)},0)}function qm(r){if(r.extent!==void 0){const e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return Zc(r.extent,r.constrainOnlyCenter,e)}const t=Aa(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Zc(e,!1,!1)}return fm}function Jm(r){let t,e,i,a=r.minZoom!==void 0?r.minZoom:Ya,h=r.maxZoom!==void 0?r.maxZoom:28;const c=r.zoomFactor!==void 0?r.zoomFactor:2,d=r.multiWorld!==void 0?r.multiWorld:!1,f=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,_=r.showFullExtent!==void 0?r.showFullExtent:!1,m=Aa(r.projection,"EPSG:3857"),v=m.getExtent();let y=r.constrainOnlyCenter,E=r.extent;if(!d&&!E&&m.isGlobal()&&(y=!1,E=v),r.resolutions!==void 0){const C=r.resolutions;e=C[a],i=C[h]!==void 0?C[h]:C[C.length-1],r.constrainResolution?t=gm(C,f,!y&&E,_):t=jc(e,i,f,!y&&E,_)}else{const P=(v?Math.max(Ct(v),Fe(v)):360*pr.degrees/m.getMetersPerUnit())/Ea/Math.pow(2,Ya),w=P/Math.pow(2,28-Ya);e=r.maxResolution,e!==void 0?a=0:e=P/Math.pow(c,a),i=r.minResolution,i===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?i=e/Math.pow(c,h):i=P/Math.pow(c,h):i=w),h=a+Math.floor(Math.log(e/i)/Math.log(c)),i=e/Math.pow(c,h-a),r.constrainResolution?t=_m(c,e,i,f,!y&&E,_):t=jc(e,i,f,!y&&E,_)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:a,zoomFactor:c}}function $m(r){if(r.enableRotation!==void 0?r.enableRotation:!0){const e=r.constrainRotation;return e===void 0||e===!0?mm():e===!1?Hc:typeof e=="number"?pm(e):Hc}return za}function Qm(r){return!(r.sourceCenter&&r.targetCenter&&!Ns(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function qa(r,t,e,i,n){const o=Math.cos(-n);let a=Math.sin(-n),h=r[0]*o-r[1]*a,c=r[1]*o+r[0]*a;h+=(t[0]/2-e[0])*i,c+=(e[1]-t[1]/2)*i,a=-a;const d=h*o-c*a,f=c*o+h*a;return[d,f]}const Ne=Ym,oe={ADD:"add",REMOVE:"remove"},mu={LENGTH:"length"};class Vs extends Qe{constructor(t,e,i){super(t),this.element=e,this.index=i}}class ty extends be{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(mu.LENGTH)}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 Vs(oe.ADD,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 Vs(oe.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Vs(oe.REMOVE,n,t)),this.dispatchEvent(new Vs(oe.ADD,e,t))}updateLength_(){this.set(mu.LENGTH,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")}}const Be=ty,ey=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,iy=/^([a-z]*)$|^hsla?\(.*\)$/i;function yu(r){return typeof r=="string"?r:xu(r)}function ny(r){const t=document.createElement("div");if(t.style.color=r,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}return""}const ry=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let o=0;for(const a in t)o++&3||(delete t[a],--e)}n=sy(i),t[i]=n,++e}return n}}();function Lr(r){return Array.isArray(r)?r:ry(r)}function sy(r){let t,e,i,n,o;if(iy.exec(r)&&(r=ny(r)),ey.exec(r)){const a=r.length-1;let h;a<=4?h=1:h=2;const c=a===4||a===8;t=parseInt(r.substr(1+0*h,h),16),e=parseInt(r.substr(1+1*h,h),16),i=parseInt(r.substr(1+2*h,h),16),c?n=parseInt(r.substr(1+3*h,h),16):n=255,h==1&&(t=(t<<4)+t,e=(e<<4)+e,i=(i<<4)+i,c&&(n=(n<<4)+n)),o=[t,e,i,n/255]}else if(r.startsWith("rgba("))o=r.slice(5,-1).split(",").map(Number),vu(o);else if(r.startsWith("rgb("))o=r.slice(4,-1).split(",").map(Number),o.push(1),vu(o);else throw new Error("Invalid color");return o}function vu(r){return r[0]=At(r[0]+.5|0,0,255),r[1]=At(r[1]+.5|0,0,255),r[2]=At(r[2]+.5|0,0,255),r[3]=At(r[3],0,1),r}function xu(r){let t=r[0];t!=(t|0)&&(t=t+.5|0);let e=r[1];e!=(e|0)&&(e=e+.5|0);let i=r[2];i!=(i|0)&&(i=i+.5|0);const n=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+t+","+e+","+i+","+n+")"}class oy{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},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];!(t++&3)&&!i.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=Eu(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const o=Eu(t,e,i);this.cache_[o]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Eu(r,t,e){const i=e?yu(e):"null";return t+":"+r+":"+i}const Ks=new oy,xt={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class ay extends be{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[xt.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof e[xt.OPACITY]=="number","Layer opacity must be a number"),e[xt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[xt.Z_INDEX]=t.zIndex,e[xt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[xt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[xt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[xt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?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:t===void 0?!0:t},i=this.getZIndex();return e.opacity=At(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,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 it()}getLayerStatesArray(t){return it()}getExtent(){return this.get(xt.EXTENT)}getMaxResolution(){return this.get(xt.MAX_RESOLUTION)}getMinResolution(){return this.get(xt.MIN_RESOLUTION)}getMinZoom(){return this.get(xt.MIN_ZOOM)}getMaxZoom(){return this.get(xt.MAX_ZOOM)}getOpacity(){return this.get(xt.OPACITY)}getSourceState(){return it()}getVisible(){return this.get(xt.VISIBLE)}getZIndex(){return this.get(xt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(xt.EXTENT,t)}setMaxResolution(t){this.set(xt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(xt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(xt.MAX_ZOOM,t)}setMinZoom(t){this.set(xt.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number","Layer opacity must be a number"),this.set(xt.OPACITY,t)}setVisible(t){this.set(xt.VISIBLE,t)}setZIndex(t){this.set(xt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const wu=ay,qt={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class ly extends wu{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(xt.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(xt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(wt(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=ct(t,st.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(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?null:this.renderer_.getData(t)}isVisible(t){let e;const i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof Ne?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let n;e.layerStatesArray?n=e.layerStatesArray.find(a=>a.layer===this):n=this.getLayerState();const o=this.getExtent();return Ja(n,e.viewState)&&(!o||se(o,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];const n=t instanceof Ne?t.getViewStateAndExtent():t;let o=e(n);return Array.isArray(o)||(o=[o]),o}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(xt.MAP,t)}getMapInternal(){return this.get(xt.MAP)}setMap(t){this.mapPrecomposeKey_&&(wt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(wt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ct(t,qt.PRECOMPOSE,function(e){const n=e.frameState.layerStatesArray,o=this.getLayerState(!1);gt(!n.some(function(a){return a.layer===o.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(o)},this),this.mapRenderKey_=ct(this,st.CHANGE,t.render,t),this.changed())}setSource(t){this.set(xt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Ja(r,t){if(!r.visible)return!1;const e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;const i=t.zoom;return i>r.minZoom&&i<=r.maxZoom}const Ys=ly;class hy extends ws{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){it()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;ze(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Gs(n,i)}forEachFeatureAtCoordinate(t,e,i,n,o,a,h,c){let d;const f=e.viewState;function _(T,M,A,I){return o.call(a,M,T?A:null,I)}const m=f.projection,v=Rc(t.slice(),m),y=[[0,0]];if(m.canWrapX()&&n){const T=m.getExtent(),M=Ct(T);y.push([-M,0],[M,0])}const E=e.layerStatesArray,C=E.length,P=[],w=[];for(let T=0;T<y.length;T++)for(let M=C-1;M>=0;--M){const A=E[M],I=A.layer;if(I.hasRenderer()&&Ja(A,f)&&h.call(c,I)){const z=I.getRenderer(),j=I.getSource();if(z&&j){const V=j.getWrapX()?v:t,q=_.bind(null,A.managed);w[0]=V[0]+y[T][0],w[1]=V[1]+y[T][1],d=z.forEachFeatureAtCoordinate(w,e,i,q,P)}if(d)return d}}if(P.length===0)return;const b=1/P.length;return P.forEach((T,M)=>T.distanceSq+=M*b),P.sort((T,M)=>T.distanceSq-M.distanceSq),P.some(T=>d=T.callback(T.feature,T.layer,T.geometry)),d}hasFeatureAtCoordinate(t,e,i,n,o,a){return this.forEachFeatureAtCoordinate(t,e,i,n,_r,this,o,a)!==void 0}getMap(){return this.map_}renderFrame(t){it()}flushDeclutterItems(t){}scheduleExpireIconCache(t){Ks.canExpireCache()&&t.postRenderFunctions.push(cy)}}function cy(r,t){Ks.expire()}const uy=hy;class dy extends Qe{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const br=dy,qs="ol-hidden",fy="ol-selectable",Cr="ol-unselectable",Lu="ol-unsupported",Js="ol-control",bu="ol-collapsed",gy=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-z]+?)\\s*$`].join(""),"i"),Cu=["style","variant","weight","size","lineHeight","family"],Tu=function(r){const t=r.match(gy);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,n=Cu.length;i<n;++i){const o=t[i+1];o!==void 0&&(e[Cu[i]]=o)}return e.families=e.family.split(/,\s?/),e};function Jt(r,t,e,i){let n;return e&&e.length?n=e.shift():Na?n=new OffscreenCanvas(r||300,t||300):n=document.createElement("canvas"),r&&(n.width=r),t&&(n.height=t),n.getContext("2d",i)}function $s(r){const t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function _y(r){let t=r.offsetWidth;const e=getComputedStyle(r);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function py(r){let t=r.offsetHeight;const e=getComputedStyle(r);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function Qs(r,t){const e=t.parentNode;e&&e.replaceChild(r,t)}function to(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function Su(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function my(r,t){const e=r.childNodes;for(let i=0;;++i){const n=e[i],o=t[i];if(!n&&!o)break;if(n!==o){if(!n){r.appendChild(o);continue}if(!o){r.removeChild(n),--i;continue}r.insertBefore(o,n)}}}const Pu="10px sans-serif",ae="#000",Rn="round",ni=[],ri=0,An="round",Tr=10,Sr="#000",Pr="center",eo="middle",sn=[0,0,0,0],kr=1,si=new be;let In=null,$a;const Qa={},yy=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let o,a;function h(d,f,_){let m=!0;for(let v=0;v<i;++v){const y=e[v];if(a=io(d+" "+f+" "+t+y,n),_!=y){const E=io(d+" "+f+" "+t+_+","+y,n);m=m&&E!=a}}return!!m}function c(){let d=!0;const f=si.getKeys();for(let _=0,m=f.length;_<m;++_){const v=f[_];si.get(v)<100&&(h.apply(this,v.split(`
17
+ `):" "+cc(o[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:ga};function _a(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new gr(null,r)}function dc(r){return _a(r),r.headers=$e.from(r.headers),r.data=fa.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),uc.getAdapter(r.adapter||ua.adapter)(r).then(function(i){return _a(r),i.data=fa.call(r,r.transformResponse,i),i.headers=$e.from(i.headers),i},function(i){return ac(i)||(_a(r),i&&i.response&&(i.response.data=fa.call(r,r.transformResponse,i.response),i.response.headers=$e.from(i.response.headers))),Promise.reject(i)})}const fc=r=>r instanceof $e?r.toJSON():r;function xn(r,t){t=t||{};const e={};function i(d,f,_){return D.isPlainObject(d)&&D.isPlainObject(f)?D.merge.call({caseless:_},d,f):D.isPlainObject(f)?D.merge({},f):D.isArray(f)?f.slice():f}function n(d,f,_){if(D.isUndefined(f)){if(!D.isUndefined(d))return i(void 0,d,_)}else return i(d,f,_)}function o(d,f){if(!D.isUndefined(f))return i(void 0,f)}function a(d,f){if(D.isUndefined(f)){if(!D.isUndefined(d))return i(void 0,d)}else return i(void 0,f)}function h(d,f,_){if(_ in t)return i(d,f);if(_ in r)return i(void 0,d)}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:h,headers:(d,f)=>n(fc(d),fc(f),!0)};return D.forEach(Object.keys(Object.assign({},r,t)),function(f){const _=c[f]||n,m=_(r[f],t[f],f);D.isUndefined(m)&&_!==h||(e[f]=m)}),e}const gc="1.5.1",pa={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{pa[r]=function(i){return typeof i===r||"a"+(t<1?"n ":" ")+r}});const _c={};pa.transitional=function(t,e,i){function n(o,a){return"[Axios v"+gc+"] Transitional option '"+o+"'"+a+(i?". "+i:"")}return(o,a,h)=>{if(t===!1)throw new pt(n(a," has been removed"+(e?" in "+e:"")),pt.ERR_DEPRECATED);return e&&!_c[a]&&(_c[a]=!0,console.warn(n(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,a,h):!0}};function yp(r,t,e){if(typeof r!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let n=i.length;for(;n-- >0;){const o=i[n],a=t[o];if(a){const h=r[o],c=h===void 0||a(h,o,r);if(c!==!0)throw new pt("option "+o+" must be "+c,pt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new pt("Unknown option "+o,pt.ERR_BAD_OPTION)}}const ma={assertOptions:yp,validators:pa},vi=ma.validators;class xs{constructor(t){this.defaults=t,this.interceptors={request:new nc,response:new nc}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=xn(this.defaults,e);const{transitional:i,paramsSerializer:n,headers:o}=e;i!==void 0&&ma.assertOptions(i,{silentJSONParsing:vi.transitional(vi.boolean),forcedJSONParsing:vi.transitional(vi.boolean),clarifyTimeoutError:vi.transitional(vi.boolean)},!1),n!=null&&(D.isFunction(n)?e.paramsSerializer={serialize:n}:ma.assertOptions(n,{encode:vi.function,serialize:vi.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=o&&D.merge(o.common,o[e.method]);o&&D.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),e.headers=$e.concat(a,o);const h=[];let c=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(e)===!1||(c=c&&E.synchronous,h.unshift(E.fulfilled,E.rejected))});const d=[];this.interceptors.response.forEach(function(E){d.push(E.fulfilled,E.rejected)});let f,_=0,m;if(!c){const y=[dc.bind(this),void 0];for(y.unshift.apply(y,h),y.push.apply(y,d),m=y.length,f=Promise.resolve(e);_<m;)f=f.then(y[_++],y[_++]);return f}m=h.length;let v=e;for(_=0;_<m;){const y=h[_++],E=h[_++];try{v=y(v)}catch(C){E.call(this,C);break}}try{f=dc.call(this,v)}catch(y){return Promise.reject(y)}for(_=0,m=d.length;_<m;)f=f.then(d[_++],d[_++]);return f}getUri(t){t=xn(this.defaults,t);const e=lc(t.baseURL,t.url);return ic(e,t.params,t.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(t){xs.prototype[t]=function(e,i){return this.request(xn(i||{},{method:t,url:e,data:(i||{}).data}))}}),D.forEach(["post","put","patch"],function(t){function e(i){return function(o,a,h){return this.request(xn(h||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}xs.prototype[t]=e(),xs.prototype[t+"Form"]=e(!0)});const Es=xs;class ya{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(o){e=o});const i=this;this.promise.then(n=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](n);i._listeners=null}),this.promise.then=n=>{let o;const a=new Promise(h=>{i.subscribe(h),o=h}).then(n);return a.cancel=function(){i.unsubscribe(o)},a},t(function(o,a,h){i.reason||(i.reason=new gr(o,a,h),e(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new ya(function(n){t=n}),cancel:t}}}const vp=ya;function xp(r){return function(e){return r.apply(null,e)}}function Ep(r){return D.isObject(r)&&r.isAxiosError===!0}const va={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(va).forEach(([r,t])=>{va[t]=r});const wp=va;function pc(r){const t=new Es(r),e=Gh(Es.prototype.request,t);return D.extend(e,Es.prototype,t,{allOwnKeys:!0}),D.extend(e,t,null,{allOwnKeys:!0}),e.create=function(n){return pc(xn(r,n))},e}const Dt=pc(ua);Dt.Axios=Es,Dt.CanceledError=gr,Dt.CancelToken=vp,Dt.isCancel=ac,Dt.VERSION=gc,Dt.toFormData=ms,Dt.AxiosError=pt,Dt.Cancel=Dt.CanceledError,Dt.all=function(t){return Promise.all(t)},Dt.spread=xp,Dt.isAxiosError=Ep,Dt.mergeConfig=xn,Dt.AxiosHeaders=$e,Dt.formToJSON=r=>sc(D.isHTMLForm(r)?new FormData(r):r),Dt.getAdapter=uc.getAdapter,Dt.HttpStatusCode=wp,Dt.default=Dt;const mc=Dt;ut.Edit.Circle=ut.Edit.CircleMarker.extend({_createResizeMarker:function(){var r=this._shape.getLatLng(),t=this._getResizeMarkerPoint(r);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(t,this.options.resizeIcon))},_getResizeMarkerPoint:function(r){var t=this._shape._radius*Math.cos(Math.PI/4),e=this._map.project(r);return this._map.unproject([e.x+t,e.y-t])},_resize:function(r){var t=this._moveMarker.getLatLng(),e;ut.GeometryUtil.isVersion07x()?e=t.distanceTo(r):e=this._map.distance(t,r),this._shape.setRadius(e),this._map.fire(ut.Draw.Event.EDITRESIZE,{layer:this._shape})}});const Lp=U.defineComponent({name:"MapView",props:{loadPolygon:Boolean,reverseCoordinatesPolygon:Boolean,dataPolygon:Object,configurationMap:Object,coordinatesMap:Array,getGeoJSON:Function,getCoodMarker:Function},data(){return{idMap:"",mapRender:null,markerRender:null,renderCoordinates:this.coordinatesMap,renderGeojson:this.dataPolygon,markerIcon:{iconUrl:ss,iconSize:[25,41],iconAnchor:[12,41]},layersFeatureGroup:null,featuresData:null}},mounted(){this.makeid(10),this.renderMap()},methods:{getLayersFeaturesInGeoJson(){const r=ut.geoJSON().addTo(this.mapRender);return this.featuresData.eachLayer(e=>{r.addLayer(e)}),[r.toGeoJSON()]},triggerSaveEdit(){var t,e,i;(i=(e=(t=(document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top")||document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top leaflet-draw-actions-bottom"))[0])==null?void 0:t.querySelector("li"))==null?void 0:e.querySelector("a"))==null||i.click()},makeid(r){let t="";const e="abcdefghijklmnopqrstuvwxyz",i=e.length;let n=0;for(;n<r;)t+=e.charAt(Math.floor(Math.random()*i)),n+=1;this.idMap=t},renderMap(){c_("es"),setTimeout(()=>{this.loadPolygon?this.viewMap():this.createMap()},500)},createMap(){var a,h,c,d,f,_,m,v,y,E;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=ut.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);if(this.mapRender=t,ut.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(t),t.setZoom((a=this.configurationMap)==null?void 0:a.maxZoom),this.configurationMap.renderMarker){const C=ut.marker([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],{icon:ut.icon(r),draggable:this.configurationMap.dragMarker}).addTo(t);this.markerRender=C,this.getCoodMarker&&C.on("dragend",P=>{const w=P.target.getLatLng(),b=w.lat,T=w.lng;this.getCoodMarker&&this.getCoodMarker(b,T)})}const e=ut.featureGroup();this.featuresData=e;const i=e.addTo(t);let n={featureGroup:i,edit:!1,remove:(h=this.configurationMap)==null?void 0:h.editFigures.remove};(c=this.configurationMap)!=null&&c.editFigures.edit&&(n={featureGroup:i,...(d=this.configurationMap)==null?void 0:d.editFigures.edit,remove:(f=this.configurationMap)==null?void 0:f.editFigures.remove});const o=new ut.Control.Draw({position:"topleft",draw:{polygon:(_=this.configurationMap)==null?void 0:_.createFigures.polygon,circle:!1,rectangle:(m=this.configurationMap)!=null&&m.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(v=this.configurationMap)!=null&&v.createFigures.marker?{icon:ut.icon(r)}:!1,polyline:(y=this.configurationMap)!=null&&y.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(E=this.configurationMap)==null?void 0:E.createFigures.multipoint},edit:n});t.addControl(o),t.on("draw:created",C=>{var b,T,M,A,I,z,j,V,q,K,nt,_t,X,W,G;const P=C.layer;i.addLayer(P);let w=P.toGeoJSON();C.layerType==="circlemarker"&&(w={type:"Feature",geometry:{type:"MultiPoint",coordinates:[w.geometry.coordinates]},properties:{...w.properties,pointType:"multipoint",style:{color:((M=(T=(b=this.configurationMap)==null?void 0:b.createFigures)==null?void 0:T.multipoint)==null?void 0:M.color)||"green",fillColor:((z=(I=(A=this.configurationMap)==null?void 0:A.createFigures)==null?void 0:I.multipoint)==null?void 0:z.fillColor)||"green",fillOpacity:((q=(V=(j=this.configurationMap)==null?void 0:j.createFigures)==null?void 0:V.multipoint)==null?void 0:q.fillOpacity)||.8,radius:((_t=(nt=(K=this.configurationMap)==null?void 0:K.createFigures)==null?void 0:nt.multipoint)==null?void 0:_t.radius)||6,weight:((G=(W=(X=this.configurationMap)==null?void 0:X.createFigures)==null?void 0:W.multipoint)==null?void 0:G.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON([w])}),t.on("draw:edited",C=>{C.layers.eachLayer(w=>{const b=w.toGeoJSON();this.getGeoJSON&&this.getGeoJSON([b])})})},viewMap(){var h,c,d,f,_,m,v,y,E,C;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=ut.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);this.mapRender=t,ut.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(t),t.setZoom((h=this.configurationMap)==null?void 0:h.maxZoom);const e=ut.featureGroup();this.featuresData=e;const i=e.addTo(t);let n={featureGroup:i,edit:!1,remove:(c=this.configurationMap)==null?void 0:c.editFigures.remove};(d=this.configurationMap)!=null&&d.editFigures.edit&&(n={featureGroup:i,...(f=this.configurationMap)==null?void 0:f.editFigures.edit,remove:(_=this.configurationMap)==null?void 0:_.editFigures.remove});const o=this.renderGeojson;if(o&&o.length){o.forEach(w=>{if(w.type==="FeatureCollection")w.features.forEach(b=>{if(b.geometry.type==="Polygon"||b.geometry.type==="MultiPolygon"||b.geometry.type==="LineString"||b.geometry.type==="MultiLineString"||b.geometry.type==="Point"){const T=this;ut.geoJson(b,{pointToLayer:this.getPointToLayer.bind(this),onEachFeature:function(M,A){if(i.addLayer(A),M.geometry.type==="Point"){var I=T.getPopupContent(M);A.bindPopup(I)}}})}});else if(w.type==="Feature"&&(w.geometry.type==="Polygon"||w.geometry.type==="MultiPolygon"||w.geometry.type==="LineString"||w.geometry.type==="MultiLineString"||w.geometry.type==="Point"||w.geometry.type==="MultiPoint")){const b=this;ut.geoJson(w,{onEachFeature:function(T,M){if(i.addLayer(M),T.geometry.type==="Point"){var A=b.getPopupContent(T);M.bindPopup(A)}}})}});const P=i.getBounds();t.fitBounds(P)}const a=new ut.Control.Draw({position:"topleft",draw:{polygon:(m=this.configurationMap)==null?void 0:m.createFigures.polygon,circle:!1,rectangle:(v=this.configurationMap)!=null&&v.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(y=this.configurationMap)!=null&&y.createFigures.marker?{icon:ut.icon(r)}:!1,polyline:(E=this.configurationMap)!=null&&E.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(C=this.configurationMap)==null?void 0:C.createFigures.multipoint},edit:n});t.addControl(a),t.on("draw:created",P=>{var T,M,A,I,z,j,V,q,K,nt,_t,X,W,G,N;const w=P.layer;i.addLayer(w);let b=w.toGeoJSON();P.layerType==="circlemarker"&&(b={type:"Feature",geometry:{type:"MultiPoint",coordinates:[b.geometry.coordinates]},properties:{...b.properties,pointType:"multipoint",style:{color:((A=(M=(T=this.configurationMap)==null?void 0:T.createFigures)==null?void 0:M.multipoint)==null?void 0:A.color)||"green",fillColor:((j=(z=(I=this.configurationMap)==null?void 0:I.createFigures)==null?void 0:z.multipoint)==null?void 0:j.fillColor)||"green",fillOpacity:((K=(q=(V=this.configurationMap)==null?void 0:V.createFigures)==null?void 0:q.multipoint)==null?void 0:K.fillOpacity)||.8,radius:((X=(_t=(nt=this.configurationMap)==null?void 0:nt.createFigures)==null?void 0:_t.multipoint)==null?void 0:X.radius)||6,weight:((N=(G=(W=this.configurationMap)==null?void 0:W.createFigures)==null?void 0:G.multipoint)==null?void 0:N.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON(b)}),t.on("draw:edited",P=>{P.layers.eachLayer(b=>{const T=b.toGeoJSON();this.getGeoJSON&&this.getGeoJSON(T)})})},getPointToLayer(r,t){var i,n;if(((i=r.geometry)==null?void 0:i.type)==="Point"){const o=(n=r.properties)==null?void 0:n.tipo,a=ut.icon({iconUrl:Ug,iconSize:[38,38],iconAnchor:[16,41]}),h=ut.icon({iconUrl:Zg,iconSize:[38,38],iconAnchor:[16,41]});let d=ut.icon({iconUrl:jg,iconSize:[38,38],iconAnchor:[16,41]});return o===0?d=a:o===1&&(d=h),ut.marker(t,{icon:d})}return ut.marker(t)},async searchAddress(r){const t=await mc.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:r,limit:1,format:"json"}});if(t.data.length===1){const e=parseFloat(t.data[0].lat),n={lng:parseFloat(t.data[0].lon),lat:e};return this.setCoordinates({...n,moveMarker:!0}),t.data[0]}return t.data},setCoordinates({lat:r,lng:t}){if(this.mapRender){const e=ut.latLng(r,t);this.mapRender.panTo(e,{animate:!0,duration:.5})}},getPopupContent(r){const t=r.properties||{},e=t.descripcion||"",i=t.fechaHoraLlegada||"",n=t.fotoId||"";let o="";if(i){const h=new Date(i),c=d=>d.toString().padStart(2,"0");o=`${c(h.getDate())}-${c(h.getMonth()+1)}-${h.getFullYear()} ${c(h.getHours())}:${c(h.getMinutes())}:${c(h.getSeconds())}`}let a="<div>";return n&&(a+=`<img src="${n}" style="width: 200px; height: auto; margin-bottom: 5px;"><br>`),a+=`<b>Descripción:</b> ${e}<br>`,o&&(a+=`<b>Fecha Hora Llegada:</b> ${o}<br>`),a+="</div>",a}},watch:{coordinatesMap(r){if(this.renderCoordinates=r,this.mapRender&&this.markerRender){const t=ut.latLng([r[0],r[1]]);this.mapRender.setView([r[0],r[1]],r[2]),this.markerRender.setLatLng(t)}},dataPolygon(r){this.renderGeojson=r}}}),bp=["id"];function Cp(r,t,e,i,n,o){var a;return U.openBlock(),U.createElementBlock("div",{class:"map-container",style:U.normalizeStyle(`height:${(a=r.configurationMap)==null?void 0:a.height}`)},[U.createElementVNode("div",{id:r.idMap,style:{height:"100%"}},null,8,bp)],4)}const Tp=ra(Lp,[["render",Cp]]),Sp=["id"],Pp=U.defineComponent({__name:"MapSearchAddress",props:{configurationMap:{default:()=>({height:"250px",maxZoom:20,iconMarker:{iconUrl:ss,iconSize:[25,41],iconAnchor:[12,41],class:"",type:"image"},dragMarker:!0})},coordinatesMap:{default:()=>({lat:-19.0429,lng:-65.2554,zoom:12})}},emits:["updated:coordsMarker"],setup(r,{expose:t,emit:e}){const i=r,n=U.ref(),o=U.ref(i.coordinatesMap),a=U.ref(),h=U.ref();U.onMounted(async()=>{await c(10),await d()});const c=async y=>{let E="";const C="abcdefghijklmnopqrstuvwxyz",P=C.length;let w=0;for(;w<y;)E+=C.charAt(Math.floor(Math.random()*P)),w+=1;n.value=E},d=async()=>{await f()},f=async()=>{var C,P;const y=(C=i.configurationMap)==null?void 0:C.iconMarker,E=ut.map(n.value,{fullscreenControl:!0}).setView([o.value.lat,o.value.lng],o.value.zoom);if(E.invalidateSize(),a.value=E,ut.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:(P=i.configurationMap)==null?void 0:P.maxZoom,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(E),y.type==="image"){const w=ut.marker([o.value.lat,o.value.lng],{icon:ut.icon({iconUrl:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:i.configurationMap.dragMarker}).addTo(E);h.value=w,w.on("dragend",b=>{const T=b.target.getLatLng(),M=T.lat,A=T.lng;m({lat:M,lng:A})})}else if(y.type==="svg"){const w=ut.marker([o.value.lat,o.value.lng],{icon:ut.divIcon({html:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:i.configurationMap.dragMarker}).addTo(E);h.value=w,w.on("dragend",b=>{const T=b.target.getLatLng(),M=T.lat,A=T.lng;m({lat:M,lng:A})})}},_=async y=>{const E=await mc.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:y,limit:1,format:"json"}});if(E.data.length===1){const C=parseFloat(E.data[0].lat),w={lng:parseFloat(E.data[0].lon),lat:C};return m({...w,moveMarker:!0}),E.data[0]}return E.data},m=({lat:y,lng:E,moveMarker:C=!1})=>{var P;e("updated:coordsMarker",{lat:y,lng:E}),C&&((P=h.value)==null||P.setLatLng({lat:y,lng:E})),v({lat:y,lng:E})},v=({lat:y,lng:E})=>{const C=ut.latLng(y,E);a.value.panTo(C,{animate:!0,duration:.5})};return t({searchAddress:_}),(y,E)=>{var C;return U.openBlock(),U.createElementBlock("div",{class:"map-container",style:U.normalizeStyle(`height:${(C=y.configurationMap)==null?void 0:C.height}`)},[U.createElementVNode("div",{id:n.value,style:{height:"100%"}},null,8,Sp)],4)}}}),NL="";class kp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=kp,En={PROPERTYCHANGE:"propertychange"};class Mp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const ws=Mp;function Rp(r,t,e){let i,n;e=e||xi;let o=0,a=r.length,h=!1;for(;o<a;)i=o+(a-o>>1),n=+e(r[i],t),n<0?o=i+1:(a=i,h=!n);return h?o:~o}function xi(r,t){return r>t?1:r<t?-1:0}function xa(r,t,e){if(r[0]<=t)return 0;const i=r.length;if(t<=r[i-1])return i-1;if(typeof e=="function"){for(let n=1;n<i;++n){const o=r[n];if(o===t)return n;if(o<t)return e(t,r[n-1],o)>0?n-1:n}return i-1}if(e>0){for(let n=1;n<i;++n)if(r[n]<t)return n-1;return i-1}if(e<0){for(let n=1;n<i;++n)if(r[n]<=t)return n;return i-1}for(let n=1;n<i;++n){if(r[n]==t)return n;if(r[n]<t)return r[n-1]-t<t-r[n]?n-1:n}return i-1}function Ap(r,t,e){for(;t<e;){const i=r[t];r[t]=r[e],r[e]=i,++t,--e}}function ti(r,t){const e=Array.isArray(t)?t:[t],i=e.length;for(let n=0;n<i;n++)r[r.length]=e[n]}function ei(r,t){const e=r.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function Ip(r,t,e){const i=t||xi;return r.every(function(n,o){if(o===0)return!0;const a=i(r[o-1],n);return!(a>0||e&&a===0)})}function _r(){return!0}function Ls(){return!1}function wn(){}function Dp(r){let t=!1,e,i,n;return function(){const o=Array.prototype.slice.call(arguments);return(!t||this!==n||!ei(o,i))&&(t=!0,n=this,i=o,e=r.apply(this,arguments)),e}}function Ln(r){for(const t in r)delete r[t]}function bn(r){let t;for(t in r)return!1;return!t}class Op extends ws{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=typeof t=="string",i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new Qe(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),h=this.pendingRemovals_||(this.pendingRemovals_={});i in a||(a[i]=0,h[i]=0),++a[i];let c;for(let d=0,f=n.length;d<f;++d)if("handleEvent"in n[d]?c=n[d].handleEvent(o):c=n[d].call(this,o),c===!1||o.propagationStopped){c=!1;break}if(--a[i]===0){let d=h[i];for(delete h[i];d--;)this.removeEventListener(i,wn);delete a[i]}return c}disposeInternal(){this.listeners_&&Ln(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:!1}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);n!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=wn,++this.pendingRemovals_[t]):(i.splice(n,1),i.length===0&&delete this.listeners_[t]))}}}const bs=Op,st={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ct(r,t,e,i,n){if(i&&i!==r&&(e=e.bind(i)),n){const a=e;e=function(){r.removeEventListener(t,e),a.apply(this,arguments)}}const o={target:r,type:t,listener:e};return r.addEventListener(t,e),o}function Cs(r,t,e,i){return ct(r,t,e,i,!0)}function wt(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Ln(r))}class Ts extends bs{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(st.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let o=0;o<i;++o)n[o]=ct(this,t[o],e);return n}return ct(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let o=0;o<n;++o)i[o]=Cs(this,t[o],e)}else i=Cs(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)Fp(i);else if(Array.isArray(t))for(let n=0,o=t.length;n<o;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)}}Ts.prototype.on,Ts.prototype.once,Ts.prototype.un;function Fp(r){if(Array.isArray(r))for(let t=0,e=r.length;t<e;++t)wt(r[t]);else wt(r)}const yc=Ts;function it(){throw new Error("Unimplemented abstract method.")}let zp=0;function lt(r){return r.ol_uid||(r.ol_uid=String(++zp))}class vc extends Qe{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class Np extends yc{constructor(t){super(),this.on,this.once,this.un,lt(this),this.values_=null,t!==void 0&&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 vc(i,t,e)),i=En.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new vc(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 o=n[t];n[t]=e,o!==e&&this.notify(t,o)}}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],bn(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const be=Np,Ut={ANIMATING:0,INTERACTING:1},Ce={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Bp=42,Ea=256,pr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Gp{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,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_||pr[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_}}const xc=Gp,mr=6378137,Cn=Math.PI*mr,Up=[-Cn,-Cn,Cn,Cn],Zp=[-180,-85,180,85],Ss=mr*Math.log(Math.tan(Math.PI/2));class Tn extends xc{constructor(t){super({code:t,units:"m",extent:Up,global:!0,worldExtent:Zp,getPointResolution:function(e,i){return e/Math.cosh(i[1]/mr)}})}}const Ec=[new Tn("EPSG:3857"),new Tn("EPSG:102100"),new Tn("EPSG:102113"),new Tn("EPSG:900913"),new Tn("http://www.opengis.net/def/crs/EPSG/0/3857"),new Tn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function jp(r,t,e){const i=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(i));for(let n=0;n<i;n+=e){t[n]=Cn*r[n]/180;let o=mr*Math.log(Math.tan(Math.PI*(+r[n+1]+90)/360));o>Ss?o=Ss:o<-Ss&&(o=-Ss),t[n+1]=o}return t}function Hp(r,t,e){const i=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(i));for(let n=0;n<i;n+=e)t[n]=180*r[n]/Cn,t[n+1]=360*Math.atan(Math.exp(r[n+1]/mr))/Math.PI-90;return t}const Wp=6378137,wc=[-180,-90,180,90],Xp=Math.PI*Wp/180;class Xi extends xc{constructor(t,e){super({code:t,units:"degrees",extent:wc,axisOrientation:e,global:!0,metersPerUnit:Xp,worldExtent:wc})}}const Lc=[new Xi("CRS:84"),new Xi("EPSG:4326","neu"),new Xi("urn:ogc:def:crs:OGC:1.3:CRS84"),new Xi("urn:ogc:def:crs:OGC:2:84"),new Xi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Xi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Xi("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let wa={};function Vp(r){return wa[r]||wa[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Kp(r,t){wa[r]=t}let Sn={};function Ps(r,t,e){const i=r.getCode(),n=t.getCode();i in Sn||(Sn[i]={}),Sn[i][n]=e}function Yp(r,t){let e;return r in Sn&&t in Sn[r]&&(e=Sn[r][t]),e}const Zt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function bc(r){const t=ge();for(let e=0,i=r.length;e<i;++e)vr(t,r[e]);return t}function ks(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function Cc(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function Vi(r,t,e){let i,n;return t<r[0]?i=r[0]-t:r[2]<t?i=t-r[2]:i=0,e<r[1]?n=r[1]-e:r[3]<e?n=e-r[3]:n=0,i*i+n*n}function Ms(r,t){return La(r,t[0],t[1])}function Ki(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function La(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function ba(r,t){const e=r[0],i=r[1],n=r[2],o=r[3],a=t[0],h=t[1];let c=Zt.UNKNOWN;return a<e?c=c|Zt.LEFT:a>n&&(c=c|Zt.RIGHT),h<i?c=c|Zt.BELOW:h>o&&(c=c|Zt.ABOVE),c===Zt.UNKNOWN&&(c=Zt.INTERSECTING),c}function ge(){return[1/0,1/0,-1/0,-1/0]}function Ei(r,t,e,i,n){return n?(n[0]=r,n[1]=t,n[2]=e,n[3]=i,n):[r,t,e,i]}function yr(r){return Ei(1/0,1/0,-1/0,-1/0,r)}function qp(r,t){const e=r[0],i=r[1];return Ei(e,i,e,i,t)}function Tc(r,t,e,i,n){const o=yr(n);return Pc(o,r,t,e,i)}function Pn(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function Sc(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function vr(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function Pc(r,t,e,i,n){for(;e<i;e+=n)Jp(r,t[e],t[e+1]);return r}function Jp(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function kc(r,t){let e;return e=t(Rs(r)),e||(e=t(As(r)),e)||(e=t(Is(r)),e)||(e=t(qi(r)),e)?e:!1}function Ca(r){let t=0;return Ds(r)||(t=Ct(r)*Fe(r)),t}function Rs(r){return[r[0],r[1]]}function As(r){return[r[2],r[1]]}function Yi(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function $p(r,t){let e;if(t==="bottom-left")e=Rs(r);else if(t==="bottom-right")e=As(r);else if(t==="top-left")e=qi(r);else if(t==="top-right")e=Is(r);else throw new Error("Invalid corner");return e}function Ta(r,t,e,i,n){const[o,a,h,c,d,f,_,m]=Sa(r,t,e,i);return Ei(Math.min(o,h,d,_),Math.min(a,c,f,m),Math.max(o,h,d,_),Math.max(a,c,f,m),n)}function Sa(r,t,e,i){const n=t*i[0]/2,o=t*i[1]/2,a=Math.cos(e),h=Math.sin(e),c=n*a,d=n*h,f=o*a,_=o*h,m=r[0],v=r[1];return[m-c+_,v-d-f,m-c-_,v-d+f,m+c-_,v+d+f,m+c+_,v+d-f,m-c+_,v-d-f]}function Fe(r){return r[3]-r[1]}function xr(r,t,e){const i=e||ge();return se(r,t)?(r[0]>t[0]?i[0]=r[0]:i[0]=t[0],r[1]>t[1]?i[1]=r[1]:i[1]=t[1],r[2]<t[2]?i[2]=r[2]:i[2]=t[2],r[3]<t[3]?i[3]=r[3]:i[3]=t[3]):yr(i),i}function qi(r){return[r[0],r[3]]}function Is(r){return[r[2],r[3]]}function Ct(r){return r[2]-r[0]}function se(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function Ds(r){return r[2]<r[0]||r[3]<r[1]}function Qp(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function tm(r,t,e){let i=!1;const n=ba(r,t),o=ba(r,e);if(n===Zt.INTERSECTING||o===Zt.INTERSECTING)i=!0;else{const a=r[0],h=r[1],c=r[2],d=r[3],f=t[0],_=t[1],m=e[0],v=e[1],y=(v-_)/(m-f);let E,C;o&Zt.ABOVE&&!(n&Zt.ABOVE)&&(E=m-(v-d)/y,i=E>=a&&E<=c),!i&&o&Zt.RIGHT&&!(n&Zt.RIGHT)&&(C=v-(m-c)*y,i=C>=h&&C<=d),!i&&o&Zt.BELOW&&!(n&Zt.BELOW)&&(E=m-(v-h)/y,i=E>=a&&E<=c),!i&&o&Zt.LEFT&&!(n&Zt.LEFT)&&(C=v-(m-a)*y,i=C>=h&&C<=d)}return i}function Mc(r,t){const e=t.getExtent(),i=Yi(r);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){const n=Ct(e),a=Math.floor((i[0]-e[0])/n)*n;r[0]-=a,r[2]-=a}return r}function em(r,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[e[0],r[1],e[2],r[3]]];Mc(r,t);const i=Ct(e);if(Ct(r)>i)return[[e[0],r[1],e[2],r[3]]];if(r[0]<e[0])return[[r[0]+i,r[1],e[2],r[3]],[e[0],r[1],r[2],r[3]]];if(r[2]>e[2])return[[r[0],r[1],e[2],r[3]],[e[0],r[1],r[2]-i,r[3]]]}return[r]}function At(r,t,e){return Math.min(Math.max(r,t),e)}function im(r,t,e,i,n,o){const a=n-e,h=o-i;if(a!==0||h!==0){const c=((r-e)*a+(t-i)*h)/(a*a+h*h);c>1?(e=n,i=o):c>0&&(e+=a*c,i+=h*c)}return Ji(r,t,e,i)}function Ji(r,t,e,i){const n=e-r,o=i-t;return n*n+o*o}function nm(r){const t=r.length;for(let i=0;i<t;i++){let n=i,o=Math.abs(r[i][i]);for(let h=i+1;h<t;h++){const c=Math.abs(r[h][i]);c>o&&(o=c,n=h)}if(o===0)return null;const a=r[n];r[n]=r[i],r[i]=a;for(let h=i+1;h<t;h++){const c=-r[h][i]/r[i][i];for(let d=i;d<t+1;d++)i==d?r[h][d]=0:r[h][d]+=c*r[i][d]}}const e=new Array(t);for(let i=t-1;i>=0;i--){e[i]=r[i][t]/r[i][i];for(let n=i-1;n>=0;n--)r[n][t]-=r[n][i]*e[i]}return e}function Os(r){return r*Math.PI/180}function kn(r,t){const e=r%t;return e*t<0?e+t:e}function _e(r,t,e){return r+e*(t-r)}function Pa(r,t){const e=Math.pow(10,t);return Math.round(r*e)/e}function Fs(r,t){return Math.floor(Pa(r,t))}function zs(r,t){return Math.ceil(Pa(r,t))}function rm(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function Ns(r,t){let e=!0;for(let i=r.length-1;i>=0;--i)if(r[i]!=t[i]){e=!1;break}return e}function ka(r,t){const e=Math.cos(t),i=Math.sin(t),n=r[0]*e-r[1]*i,o=r[1]*e+r[0]*i;return r[0]=n,r[1]=o,r}function sm(r,t){return r[0]*=t,r[1]*=t,r}function Rc(r,t){if(t.canWrapX()){const e=Ct(t.getExtent()),i=om(r,t,e);i&&(r[0]-=i*e)}return r}function om(r,t,e){const i=t.getExtent();let n=0;return t.canWrapX()&&(r[0]<i[0]||r[0]>i[2])&&(e=e||Ct(i),n=Math.floor((r[0]-i[0])/e)),n}const am=63710088e-1;function Ac(r,t,e){e=e||am;const i=Os(r[1]),n=Os(t[1]),o=(n-i)/2,a=Os(t[0]-r[0])/2,h=Math.sin(o)*Math.sin(o)+Math.sin(a)*Math.sin(a)*Math.cos(i)*Math.cos(n);return 2*e*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}const Ic={info:1,warn:2,error:3,none:4};let lm=Ic.info;function Dc(...r){lm>Ic.warn||console.warn(...r)}let Ma=!0;function Oc(r){Ma=!(r===void 0?!0:r)}function Ra(r,t){if(t!==void 0){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];t=t}else t=r.slice();return t}function Fc(r,t){if(t!==void 0&&r!==t){for(let e=0,i=r.length;e<i;++e)t[e]=r[e];r=t}return r}function hm(r){Kp(r.getCode(),r),Ps(r,r,Ra)}function cm(r){r.forEach(hm)}function Gt(r){return typeof r=="string"?Vp(r):r||null}function zc(r,t,e,i){r=Gt(r);let n;const o=r.getPointResolutionFunc();if(o){if(n=o(t,e),i&&i!==r.getUnits()){const a=r.getMetersPerUnit();a&&(n=n*a/pr[i])}}else{const a=r.getUnits();if(a=="degrees"&&!i||i=="degrees")n=t;else{const h=Ia(r,Gt("EPSG:4326"));if(h===Fc&&a!=="degrees")n=t*r.getMetersPerUnit();else{let d=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];d=h(d,d,2);const f=Ac(d.slice(0,2),d.slice(2,4)),_=Ac(d.slice(4,6),d.slice(6,8));n=(f+_)/2}const c=i?pr[i]:r.getMetersPerUnit();c!==void 0&&(n/=c)}}return n}function Nc(r){cm(r),r.forEach(function(t){r.forEach(function(e){t!==e&&Ps(t,e,Ra)})})}function um(r,t,e,i){r.forEach(function(n){t.forEach(function(o){Ps(n,o,e),Ps(o,n,i)})})}function Aa(r,t){return r?typeof r=="string"?Gt(r):r:Gt(t)}function Bc(r,t){return Oc(),Gc(r,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function $i(r,t){if(r===t)return!0;const e=r.getUnits()===t.getUnits();return(r.getCode()===t.getCode()||Ia(r,t)===Ra)&&e}function Ia(r,t){const e=r.getCode(),i=t.getCode();let n=Yp(e,i);return n||(n=Fc),n}function Bs(r,t){const e=Gt(r),i=Gt(t);return Ia(e,i)}function Gc(r,t,e){return Bs(t,e)(r,void 0,r.length)}function Da(r,t){return r}function ii(r,t){return Ma&&!Ns(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(Ma=!1,Dc("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function Uc(r,t){return r}function Qi(r,t){return r}function dm(){Nc(Ec),Nc(Lc),um(Lc,Ec,jp,Hp)}dm();function gt(r,t){if(!r)throw new Error(t)}function Zc(r,t,e){return function(i,n,o,a,h){if(!i)return;if(!n&&!t)return i;const c=t?0:o[0]*n,d=t?0:o[1]*n,f=h?h[0]:0,_=h?h[1]:0;let m=r[0]+c/2+f,v=r[2]-c/2+f,y=r[1]+d/2+_,E=r[3]-d/2+_;m>v&&(m=(v+m)/2,v=m),y>E&&(y=(E+y)/2,E=y);let C=At(i[0],m,v),P=At(i[1],y,E);if(a&&e&&n){const w=30*n;C+=-w*Math.log(1+Math.max(0,m-i[0])/w)+w*Math.log(1+Math.max(0,i[0]-v)/w),P+=-w*Math.log(1+Math.max(0,y-i[1])/w)+w*Math.log(1+Math.max(0,i[1]-E)/w)}return[C,P]}}function fm(r){return r}function Oa(r,t,e,i){const n=Ct(t)/e[0],o=Fe(t)/e[1];return i?Math.min(r,Math.max(n,o)):Math.min(r,Math.min(n,o))}function Fa(r,t,e){let i=Math.min(r,t);const n=50;return i*=Math.log(1+n*Math.max(0,r/t-1))/n+1,e&&(i=Math.max(i,e),i/=Math.log(1+n*Math.max(0,e/r-1))/n+1),At(i,e/2,t*2)}function gm(r,t,e,i){return t=t!==void 0?t:!0,function(n,o,a,h){if(n!==void 0){const c=r[0],d=r[r.length-1],f=e?Oa(c,e,a,i):c;if(h)return t?Fa(n,f,d):At(n,d,f);const _=Math.min(f,n),m=Math.floor(xa(r,_,o));return r[m]>f&&m<r.length-1?r[m+1]:r[m]}}}function _m(r,t,e,i,n,o){return i=i!==void 0?i:!0,e=e!==void 0?e:0,function(a,h,c,d){if(a!==void 0){const f=n?Oa(t,n,c,o):t;if(d)return i?Fa(a,f,e):At(a,e,f);const _=1e-9,m=Math.ceil(Math.log(t/f)/Math.log(r)-_),v=-h*(.5-_)+.5,y=Math.min(f,a),E=Math.floor(Math.log(t/y)/Math.log(r)+v),C=Math.max(m,E),P=t/Math.pow(r,C);return At(P,e,f)}}}function jc(r,t,e,i,n){return e=e!==void 0?e:!0,function(o,a,h,c){if(o!==void 0){const d=i?Oa(r,i,h,n):r;return!e||!c?At(o,t,d):Fa(o,d,t)}}}function za(r){if(r!==void 0)return 0}function Hc(r){if(r!==void 0)return r}function pm(r){const t=2*Math.PI/r;return function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function mm(r){return r=r||Os(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=r?0:t}}function Wc(r){return Math.pow(r,3)}function Mn(r){return 1-Wc(1-r)}function ym(r){return 3*r*r-2*r*r*r}function vm(r){return r}const wi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",xm=wi.includes("firefox"),Em=wi.includes("safari")&&!wi.includes("chrom")&&(wi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(wi)),wm=wi.includes("webkit")&&!wi.includes("edge"),Xc=wi.includes("macintosh"),Vc=typeof devicePixelRatio<"u"?devicePixelRatio:1,Na=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,Kc=typeof Image<"u"&&Image.prototype.decode,Yc=function(){let r=!1;try{const t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r}(),Lm=new Array(6);function Xt(){return[1,0,0,1,0,0]}function qc(r,t){const e=r[0],i=r[1],n=r[2],o=r[3],a=r[4],h=r[5],c=t[0],d=t[1],f=t[2],_=t[3],m=t[4],v=t[5];return r[0]=e*c+n*d,r[1]=i*c+o*d,r[2]=e*f+n*_,r[3]=i*f+o*_,r[4]=e*m+n*v+a,r[5]=i*m+o*v+h,r}function Jc(r,t,e,i,n,o,a){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r[4]=o,r[5]=a,r}function bm(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Ot(r,t){const e=t[0],i=t[1];return t[0]=r[0]*e+r[2]*i+r[4],t[1]=r[1]*e+r[3]*i+r[5],t}function Cm(r,t,e){return Jc(r,t,0,0,e,0,0)}function Tm(r,t,e){return qc(r,Jc(Lm,1,0,0,1,t,e))}function ze(r,t,e,i,n,o,a,h){const c=Math.sin(o),d=Math.cos(o);return r[0]=i*d,r[1]=n*c,r[2]=-i*c,r[3]=n*d,r[4]=a*i*d-h*i*c+t,r[5]=a*n*c+h*n*d+e,r}function Gs(r,t){const e=Sm(t);gt(e!==0,"Transformation matrix cannot be inverted");const i=t[0],n=t[1],o=t[2],a=t[3],h=t[4],c=t[5];return r[0]=a/e,r[1]=-n/e,r[2]=-o/e,r[3]=i/e,r[4]=(o*c-a*h)/e,r[5]=-(i*c-n*h)/e,r}function Sm(r){return r[0]*r[3]-r[1]*r[2]}let $c;function Qc(r){const t="matrix("+r.join(", ")+")";if(Na)return t;const e=$c||($c=document.createElement("div"));return e.style.transform=t,e.style.transform}function tn(r,t,e,i,n,o){o=o||[];let a=0;for(let h=t;h<e;h+=i){const c=r[h],d=r[h+1];o[a++]=n[0]*c+n[2]*d+n[4],o[a++]=n[1]*c+n[3]*d+n[5]}return o&&o.length!=a&&(o.length=a),o}function tu(r,t,e,i,n,o,a){a=a||[];const h=Math.cos(n),c=Math.sin(n),d=o[0],f=o[1];let _=0;for(let m=t;m<e;m+=i){const v=r[m]-d,y=r[m+1]-f;a[_++]=d+v*h-y*c,a[_++]=f+v*c+y*h;for(let E=m+2;E<m+i;++E)a[_++]=r[E]}return a&&a.length!=_&&(a.length=_),a}function Pm(r,t,e,i,n,o,a,h){h=h||[];const c=a[0],d=a[1];let f=0;for(let _=t;_<e;_+=i){const m=r[_]-c,v=r[_+1]-d;h[f++]=c+n*m,h[f++]=d+o*v;for(let y=_+2;y<_+i;++y)h[f++]=r[y]}return h&&h.length!=f&&(h.length=f),h}function km(r,t,e,i,n,o,a){a=a||[];let h=0;for(let c=t;c<e;c+=i){a[h++]=r[c]+n,a[h++]=r[c+1]+o;for(let d=c+2;d<c+i;++d)a[h++]=r[d]}return a&&a.length!=h&&(a.length=h),a}const eu=Xt();class Mm extends be{constructor(){super(),this.extent_=ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Dp(function(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 it()}closestPointXY(t,e,i,n){return it()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}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 it()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&yr(e),this.extentRevision_=this.getRevision()}return Qp(this.extent_,t)}rotate(t,e){it()}scale(t,e,i){it()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return it()}getType(){return it()}applyTransform(t){it()}intersectsExtent(t){return it()}translate(t,e){it()}transform(t,e){const i=Gt(t),n=i.getUnits()=="tile-pixels"?function(o,a,h){const c=i.getExtent(),d=i.getWorldExtent(),f=Fe(d)/Fe(c);return ze(eu,d[0],d[3],f,-f,0,0,0),tn(o,0,o.length,h,eu,a),Bs(i,e)(o,a,h)}:Bs(i,e);return this.applyTransform(n),this}}const iu=Mm;class Rm extends iu{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Tc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return it()}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||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&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=nu(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){it()}setLayout(t,e,i){let n;if(t)n=nu(t);else{for(let o=0;o<i;++o){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}n=e.length,t=Am(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();tu(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=Yi(this.getExtent()));const n=this.getFlatCoordinates();if(n){const o=this.getStride();Pm(n,0,n.length,o,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();km(i,0,i.length,n,t,e,i),this.changed()}}}function Am(r){let t;return r==2?t="XY":r==3?t="XYZ":r==4&&(t="XYZM"),t}function nu(r){let t;return r=="XY"?t=2:r=="XYZ"||r=="XYM"?t=3:r=="XYZM"&&(t=4),t}function Im(r,t,e){const i=r.getFlatCoordinates();if(!i)return null;const n=r.getStride();return tn(i,0,i.length,n,t,e)}const en=Rm;function ru(r,t,e,i,n,o,a){const h=r[t],c=r[t+1],d=r[e]-h,f=r[e+1]-c;let _;if(d===0&&f===0)_=t;else{const m=((n-h)*d+(o-c)*f)/(d*d+f*f);if(m>1)_=e;else if(m>0){for(let v=0;v<i;++v)a[v]=_e(r[t+v],r[e+v],m);a.length=i;return}else _=t}for(let m=0;m<i;++m)a[m]=r[_+m];a.length=i}function Ba(r,t,e,i,n){let o=r[t],a=r[t+1];for(t+=i;t<e;t+=i){const h=r[t],c=r[t+1],d=Ji(o,a,h,c);d>n&&(n=d),o=h,a=c}return n}function Ga(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];n=Ba(r,t,h,i,n),t=h}return n}function Dm(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];n=Ga(r,t,h,i,n),t=h[h.length-1]}return n}function Ua(r,t,e,i,n,o,a,h,c,d,f){if(t==e)return d;let _,m;if(n===0){if(m=Ji(a,h,r[t],r[t+1]),m<d){for(_=0;_<i;++_)c[_]=r[t+_];return c.length=i,m}return d}f=f||[NaN,NaN];let v=t+i;for(;v<e;)if(ru(r,v-i,v,i,a,h,f),m=Ji(a,h,f[0],f[1]),m<d){for(d=m,_=0;_<i;++_)c[_]=f[_];c.length=i,v+=i}else v+=i*Math.max((Math.sqrt(m)-Math.sqrt(d))/n|0,1);if(o&&(ru(r,e-i,t,i,a,h,f),m=Ji(a,h,f[0],f[1]),m<d)){for(d=m,_=0;_<i;++_)c[_]=f[_];c.length=i}return d}function Za(r,t,e,i,n,o,a,h,c,d,f){f=f||[NaN,NaN];for(let _=0,m=e.length;_<m;++_){const v=e[_];d=Ua(r,t,v,i,n,o,a,h,c,d,f),t=v}return d}function Om(r,t,e,i,n,o,a,h,c,d,f){f=f||[NaN,NaN];for(let _=0,m=e.length;_<m;++_){const v=e[_];d=Za(r,t,v,i,n,o,a,h,c,d,f),t=v[v.length-1]}return d}function Fm(r,t,e,i){for(let n=0,o=e.length;n<o;++n)r[t++]=e[n];return t}function Us(r,t,e,i){for(let n=0,o=e.length;n<o;++n){const a=e[n];for(let h=0;h<i;++h)r[t++]=a[h]}return t}function ja(r,t,e,i,n){n=n||[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=Us(r,t,e[a],i);n[o++]=c,t=c}return n.length=o,n}function zm(r,t,e,i,n){n=n||[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=ja(r,t,e[a],i,n[o]);c.length===0&&(c[0]=t),n[o++]=c,t=c[c.length-1]}return n.length=o,n}function Ha(r,t,e,i,n,o,a){const h=(e-t)/i;if(h<3){for(;t<e;t+=i)o[a++]=r[t],o[a++]=r[t+1];return a}const c=new Array(h);c[0]=1,c[h-1]=1;const d=[t,e-i];let f=0;for(;d.length>0;){const _=d.pop(),m=d.pop();let v=0;const y=r[m],E=r[m+1],C=r[_],P=r[_+1];for(let w=m+i;w<_;w+=i){const b=r[w],T=r[w+1],M=im(b,T,y,E,C,P);M>v&&(f=w,v=M)}v>n&&(c[(f-t)/i]=1,m+i<f&&d.push(m,f),f+i<_&&d.push(f,_))}for(let _=0;_<h;++_)c[_]&&(o[a++]=r[t+_*i],o[a++]=r[t+_*i+1]);return a}function Nm(r,t,e,i,n,o,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=Ha(r,t,f,i,n,o,a),h.push(a),t=f}return a}function nn(r,t){return t*Math.round(r/t)}function Bm(r,t,e,i,n,o,a){if(t==e)return a;let h=nn(r[t],n),c=nn(r[t+1],n);t+=i,o[a++]=h,o[a++]=c;let d,f;do if(d=nn(r[t],n),f=nn(r[t+1],n),t+=i,t==e)return o[a++]=d,o[a++]=f,a;while(d==h&&f==c);for(;t<e;){const _=nn(r[t],n),m=nn(r[t+1],n);if(t+=i,_==d&&m==f)continue;const v=d-h,y=f-c,E=_-h,C=m-c;if(v*C==y*E&&(v<0&&E<v||v==E||v>0&&E>v)&&(y<0&&C<y||y==C||y>0&&C>y)){d=_,f=m;continue}o[a++]=d,o[a++]=f,h=d,c=f,d=_,f=m}return o[a++]=d,o[a++]=f,a}function su(r,t,e,i,n,o,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=Bm(r,t,f,i,n,o,a),h.push(a),t=f}return a}function Gm(r,t,e,i,n,o,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c],_=[];a=su(r,t,f,i,n,o,a,_),h.push(_),t=f[f.length-1]}return a}function Li(r,t,e,i,n){n=n!==void 0?n:[];let o=0;for(let a=t;a<e;a+=i)n[o++]=r.slice(a,a+i);return n.length=o,n}function Er(r,t,e,i,n){n=n!==void 0?n:[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];n[o++]=Li(r,t,c,i,n[o]),t=c}return n.length=o,n}function Wa(r,t,e,i,n){n=n!==void 0?n:[];let o=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];n[o++]=c.length===1&&c[0]===t?[]:Er(r,t,c,i,n[o]),t=c[c.length-1]}return n.length=o,n}function ou(r,t,e,i){let n=0,o=r[e-i],a=r[e-i+1];for(;t<e;t+=i){const h=r[t],c=r[t+1];n+=a*h-o*c,o=h,a=c}return n/2}function au(r,t,e,i){let n=0;for(let o=0,a=e.length;o<a;++o){const h=e[o];n+=ou(r,t,h,i),t=h}return n}function Um(r,t,e,i){let n=0;for(let o=0,a=e.length;o<a;++o){const h=e[o];n+=au(r,t,h,i),t=h[h.length-1]}return n}class Zs extends en{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new Zs(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Vi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ba(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ua(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return ou(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Zs(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Us(this.flatCoordinates,0,t,this.stride),this.changed()}}const lu=Zs;class Xa extends en{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Xa(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const o=this.flatCoordinates,a=Ji(t,e,o[0],o[1]);if(a<n){const h=this.stride;for(let c=0;c<h;++c)i[c]=o[c];return i.length=h,a}return n}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return qp(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return La(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Fm(this.flatCoordinates,0,t,this.stride),this.changed()}}const js=Xa;function Zm(r,t,e,i,n){return!kc(n,function(a){return!rn(r,t,e,i,a[0],a[1])})}function rn(r,t,e,i,n,o){let a=0,h=r[e-i],c=r[e-i+1];for(;t<e;t+=i){const d=r[t],f=r[t+1];c<=o?f>o&&(d-h)*(o-c)-(n-h)*(f-c)>0&&a++:f<=o&&(d-h)*(o-c)-(n-h)*(f-c)<0&&a--,h=d,c=f}return a!==0}function Va(r,t,e,i,n,o){if(e.length===0||!rn(r,t,e[0],i,n,o))return!1;for(let a=1,h=e.length;a<h;++a)if(rn(r,e[a-1],e[a],i,n,o))return!1;return!0}function jm(r,t,e,i,n,o){if(e.length===0)return!1;for(let a=0,h=e.length;a<h;++a){const c=e[a];if(Va(r,t,c,i,n,o))return!0;t=c[c.length-1]}return!1}function hu(r,t,e,i,n,o,a){let h,c,d,f,_,m,v;const y=n[o+1],E=[];for(let w=0,b=e.length;w<b;++w){const T=e[w];for(f=r[T-i],m=r[T-i+1],h=t;h<T;h+=i)_=r[h],v=r[h+1],(y<=m&&v<=y||m<=y&&y<=v)&&(d=(y-m)/(v-m)*(_-f)+f,E.push(d)),f=_,m=v}let C=NaN,P=-1/0;for(E.sort(xi),f=E[0],h=1,c=E.length;h<c;++h){_=E[h];const w=Math.abs(_-f);w>P&&(d=(f+_)/2,Va(r,t,e,i,d,y)&&(C=d,P=w)),f=_}return isNaN(C)&&(C=n[o]),a?(a.push(C,y,P),a):[C,y,P]}function Hm(r,t,e,i,n){let o=[];for(let a=0,h=e.length;a<h;++a){const c=e[a];o=hu(r,t,c,i,n,2*a,o),t=c[c.length-1]}return o}function cu(r,t,e,i,n){let o;for(t+=i;t<e;t+=i)if(o=n(r.slice(t-i,t),r.slice(t,t+i)),o)return o;return!1}function Hs(r,t,e,i,n){const o=Pc(ge(),r,t,e,i);return se(n,o)?Ki(n,o)||o[0]>=n[0]&&o[2]<=n[2]||o[1]>=n[1]&&o[3]<=n[3]?!0:cu(r,t,e,i,function(a,h){return tm(n,a,h)}):!1}function Wm(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){if(Hs(r,t,e[o],i,n))return!0;t=e[o]}return!1}function uu(r,t,e,i,n){return!!(Hs(r,t,e,i,n)||rn(r,t,e,i,n[0],n[1])||rn(r,t,e,i,n[0],n[3])||rn(r,t,e,i,n[2],n[1])||rn(r,t,e,i,n[2],n[3]))}function du(r,t,e,i,n){if(!uu(r,t,e[0],i,n))return!1;if(e.length===1)return!0;for(let o=1,a=e.length;o<a;++o)if(Zm(r,e[o-1],e[o],i,n)&&!Hs(r,e[o-1],e[o],i,n))return!1;return!0}function Xm(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];if(du(r,t,h,i,n))return!0;t=h[h.length-1]}return!1}function Vm(r,t,e,i){for(;t<e-i;){for(let n=0;n<i;++n){const o=r[t+n];r[t+n]=r[e-i+n],r[e-i+n]=o}t+=i,e-=i}}function fu(r,t,e,i){let n=0,o=r[e-i],a=r[e-i+1];for(;t<e;t+=i){const h=r[t],c=r[t+1];n+=(h-o)*(c+a),o=h,a=c}return n===0?void 0:n>0}function gu(r,t,e,i,n){n=n!==void 0?n:!1;for(let o=0,a=e.length;o<a;++o){const h=e[o],c=fu(r,t,h,i);if(o===0){if(n&&c||!n&&!c)return!1}else if(n&&!c||!n&&c)return!1;t=h}return!0}function Km(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o){const h=e[o];if(!gu(r,t,h,i,n))return!1;h.length&&(t=h[h.length-1])}return!0}function Ka(r,t,e,i,n){n=n!==void 0?n:!1;for(let o=0,a=e.length;o<a;++o){const h=e[o],c=fu(r,t,h,i);(o===0?n&&c||!n&&!c:n&&!c||!n&&c)&&Vm(r,t,h,i),t=h}return t}function _u(r,t,e,i,n){for(let o=0,a=e.length;o<a;++o)t=Ka(r,t,e[o],i,n);return t}class wr extends en{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,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?ti(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new wr(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Vi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ga(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Za(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return Va(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return au(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Ka(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Er(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Yi(this.getExtent());this.flatInteriorPoint_=hu(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new js(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new lu(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let o=0;for(let a=0,h=i.length;a<h;++a){const c=i[a],d=new lu(e.slice(o,c),t);n.push(d),o=c}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;gu(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ka(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=su(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new wr(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return du(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=ja(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}const Ws=wr;function pu(r){if(Ds(r))throw new Error("Cannot create polygon from empty extent");const t=r[0],e=r[1],i=r[2],n=r[3],o=[t,e,t,n,i,n,i,e,t,e];return new wr(o,"XY",[o.length])}const Ya=0;class Ym extends be{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Aa(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&&Oc(),t.center&&(t.center=ii(t.center,this.projection_)),t.extent&&(t.extent=Qi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const h in Ce)delete e[h];this.setProperties(e,!0);const i=Jm(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=qm(t),o=i.constraint,a=$m(t);this.constraints_={center:n,resolution:o,rotation:a},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&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 o=this.getResolution(),a=o/2*(n[3]-e[3]+e[1]-n[1]),h=o/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+a,i[1]-h])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?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 n=arguments[i];n.center&&(n=Object.assign({},n),n.center=ii(n.center,this.getProjection())),n.anchor&&(n=Object.assign({},n),n.anchor=ii(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let n=0;for(;n<e&&!this.isDef();++n){const f=arguments[n];f.center&&this.setCenterInternal(f.center),f.zoom!==void 0?this.setZoom(f.zoom):f.resolution&&this.setResolution(f.resolution),f.rotation!==void 0&&this.setRotation(f.rotation)}if(n===e){i&&Xs(i,!0);return}let o=Date.now(),a=this.targetCenter_.slice(),h=this.targetResolution_,c=this.targetRotation_;const d=[];for(;n<e;++n){const f=arguments[n],_={start:o,complete:!1,anchor:f.anchor,duration:f.duration!==void 0?f.duration:1e3,easing:f.easing||ym,callback:i};if(f.center&&(_.sourceCenter=a,_.targetCenter=f.center.slice(),a=_.targetCenter),f.zoom!==void 0?(_.sourceResolution=h,_.targetResolution=this.getResolutionForZoom(f.zoom),h=_.targetResolution):f.resolution&&(_.sourceResolution=h,_.targetResolution=f.resolution,h=_.targetResolution),f.rotation!==void 0){_.sourceRotation=c;const m=kn(f.rotation-c+Math.PI,2*Math.PI)-Math.PI;_.targetRotation=c+m,c=_.targetRotation}Qm(_)?_.complete=!0:o+=_.duration,d.push(_)}this.animations_.push(d),this.setHint(Ut.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Ut.ANIMATING]>0}getInteracting(){return this.hints_[Ut.INTERACTING]>0}cancelAnimations(){this.setHint(Ut.ANIMATING,-this.hints_[Ut.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){const n=this.animations_[e];if(n[0].callback&&Xs(n[0].callback,!1),!t)for(let o=0,a=n.length;o<a;++o){const h=n[o];if(!h.complete){t=h.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(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 o=!0;for(let a=0,h=n.length;a<h;++a){const c=n[a];if(c.complete)continue;const d=t-c.start;let f=c.duration>0?d/c.duration:1;f>=1?(c.complete=!0,f=1):o=!1;const _=c.easing(f);if(c.sourceCenter){const m=c.sourceCenter[0],v=c.sourceCenter[1],y=c.targetCenter[0],E=c.targetCenter[1];this.nextCenter_=c.targetCenter;const C=m+_*(y-m),P=v+_*(E-v);this.targetCenter_=[C,P]}if(c.sourceResolution&&c.targetResolution){const m=_===1?c.targetResolution:c.sourceResolution+_*(c.targetResolution-c.sourceResolution);if(c.anchor){const v=this.getViewportSize_(this.getRotation()),y=this.constraints_.resolution(m,0,v,!0);this.targetCenter_=this.calculateCenterZoom(y,c.anchor)}this.nextResolution_=c.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(c.sourceRotation!==void 0&&c.targetRotation!==void 0){const m=_===1?kn(c.targetRotation+Math.PI,2*Math.PI)-Math.PI:c.sourceRotation+_*(c.targetRotation-c.sourceRotation);if(c.anchor){const v=this.constraints_.rotation(m,!0);this.targetCenter_=this.calculateCenterRotate(v,c.anchor)}this.nextRotation_=c.targetRotation,this.targetRotation_=m}if(this.applyTargetState_(!0),e=!0,!c.complete)break}if(o){this.animations_[i]=null,this.setHint(Ut.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=n[0].callback;a&&Xs(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return n!==void 0&&(i=[n[0]-e[0],n[1]-e[1]],ka(i,t-this.getRotation()),rm(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),o=this.getResolution();if(n!==void 0&&o!==void 0){const a=e[0]-t*(e[0]-n[0])/o,h=e[1]-t*(e[1]-n[1])/o;i=[a,h]}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&&Da(t,this.getProjection())}getCenterInternal(){return this.get(Ce.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Uc(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();gt(e,"The view center is not defined");const i=this.getResolution();gt(i!==void 0,"The view resolution is not defined");const n=this.getRotation();return gt(n!==void 0,"The view rotation is not defined"),Ta(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(Ce.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Qi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Ct(t)/e[0],n=Fe(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(o){return e/Math.pow(t,o*n)}}getRotation(){return this.get(Ce.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,o=Math.log(i/n)/e;return function(a){return Math.log(i/a)/e/o}}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 o=this.padding_;if(o){const a=this.getViewportSizeMinusPadding_();n=qa(n,this.getViewportSize_(),[a[0]/2+o[3],a[1]/2+o[0]],e,i)}return{center:n.slice(0),projection:t!==void 0?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 e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,n;if(this.resolutions_){const o=xa(this.resolutions_,t,1);e=o,i=this.resolutions_[o],o==this.resolutions_.length-1?n=2:n=i/this.resolutions_[o+1]}else i=this.maxResolution_,n=this.zoomFactor_;return e+Math.log(i/t)/Math.log(n)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=At(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,At(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){gt(!Ds(t),"Cannot fit empty extent provided as `geometry`");const n=Qi(t,this.getProjection());i=pu(n)}else if(t.getType()==="Circle"){const n=Qi(t.getExtent(),this.getProjection());i=pu(n),i.rotate(this.getRotation(),Yi(n))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),o=t.getFlatCoordinates(),a=t.getStride();let h=1/0,c=1/0,d=-1/0,f=-1/0;for(let _=0,m=o.length;_<m;_+=a){const v=o[_]*i-o[_+1]*n,y=o[_]*n+o[_+1]*i;h=Math.min(h,v),c=Math.min(c,y),d=Math.max(d,v),f=Math.max(f,y)}return[h,c,d,f]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const n=e.padding!==void 0?e.padding:[0,0,0,0],o=e.nearest!==void 0?e.nearest:!1;let a;e.minResolution!==void 0?a=e.minResolution:e.maxZoom!==void 0?a=this.getResolutionForZoom(e.maxZoom):a=0;const h=this.rotatedExtentForGeometry(t);let c=this.getResolutionForExtentInternal(h,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);c=isNaN(c)?a:Math.max(c,a),c=this.getConstrainedResolution(c,o?0:1);const d=this.getRotation(),f=Math.sin(d),_=Math.cos(d),m=Yi(h);m[0]+=(n[1]-n[3])/2*c,m[1]+=(n[0]-n[2])/2*c;const v=m[0]*_-m[1]*f,y=m[1]*_+m[0]*f,E=this.getConstrainedCenter([v,y],c),C=e.callback?e.callback:wn;e.duration!==void 0?this.animateInternal({resolution:c,center:E,duration:e.duration,easing:e.easing},C):(this.targetResolution_=c,this.targetCenter_=E,this.applyTargetState_(!1,!0),Xs(C,!0))}centerOn(t,e,i){this.centerOnInternal(ii(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(qa(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let o;const a=this.padding_;if(a&&t){const h=this.getViewportSizeMinusPadding_(-i),c=qa(t,n,[h[0]/2+a[3],h[1]/2+a[0]],e,i);o=[t[0]-c[0],t[1]-c[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Da(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&&ii(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=ii(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&&ii(t,this.getProjection()))}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),o=this.getViewportSize_(n),a=this.constraints_.resolution(this.targetResolution_,0,o,i),h=this.constraints_.center(this.targetCenter_,a,o,i,this.calculateCenterShift(this.targetCenter_,a,n,o));this.get(Ce.ROTATION)!==n&&this.set(Ce.ROTATION,n),this.get(Ce.RESOLUTION)!==a&&(this.set(Ce.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),(!h||!this.get(Ce.CENTER)||!Ns(this.get(Ce.CENTER),h))&&this.set(Ce.CENTER,h),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;const n=e||0,o=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(o),h=this.constraints_.resolution(this.targetResolution_,n,a),c=this.constraints_.center(this.targetCenter_,h,a,!1,this.calculateCenterShift(this.targetCenter_,h,o,a));if(t===0&&!this.cancelAnchor_){this.targetResolution_=h,this.targetRotation_=o,this.targetCenter_=c,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==h||this.getRotation()!==o||!this.getCenterInternal()||!Ns(this.getCenterInternal(),c))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:c,resolution:h,duration:t,easing:Mn,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Ut.INTERACTING,1)}endInteraction(t,e,i){i=i&&ii(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(Ut.INTERACTING,-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)}}function Xs(r,t){setTimeout(function(){r(t)},0)}function qm(r){if(r.extent!==void 0){const e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return Zc(r.extent,r.constrainOnlyCenter,e)}const t=Aa(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Zc(e,!1,!1)}return fm}function Jm(r){let t,e,i,a=r.minZoom!==void 0?r.minZoom:Ya,h=r.maxZoom!==void 0?r.maxZoom:28;const c=r.zoomFactor!==void 0?r.zoomFactor:2,d=r.multiWorld!==void 0?r.multiWorld:!1,f=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,_=r.showFullExtent!==void 0?r.showFullExtent:!1,m=Aa(r.projection,"EPSG:3857"),v=m.getExtent();let y=r.constrainOnlyCenter,E=r.extent;if(!d&&!E&&m.isGlobal()&&(y=!1,E=v),r.resolutions!==void 0){const C=r.resolutions;e=C[a],i=C[h]!==void 0?C[h]:C[C.length-1],r.constrainResolution?t=gm(C,f,!y&&E,_):t=jc(e,i,f,!y&&E,_)}else{const P=(v?Math.max(Ct(v),Fe(v)):360*pr.degrees/m.getMetersPerUnit())/Ea/Math.pow(2,Ya),w=P/Math.pow(2,28-Ya);e=r.maxResolution,e!==void 0?a=0:e=P/Math.pow(c,a),i=r.minResolution,i===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?i=e/Math.pow(c,h):i=P/Math.pow(c,h):i=w),h=a+Math.floor(Math.log(e/i)/Math.log(c)),i=e/Math.pow(c,h-a),r.constrainResolution?t=_m(c,e,i,f,!y&&E,_):t=jc(e,i,f,!y&&E,_)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:a,zoomFactor:c}}function $m(r){if(r.enableRotation!==void 0?r.enableRotation:!0){const e=r.constrainRotation;return e===void 0||e===!0?mm():e===!1?Hc:typeof e=="number"?pm(e):Hc}return za}function Qm(r){return!(r.sourceCenter&&r.targetCenter&&!Ns(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function qa(r,t,e,i,n){const o=Math.cos(-n);let a=Math.sin(-n),h=r[0]*o-r[1]*a,c=r[1]*o+r[0]*a;h+=(t[0]/2-e[0])*i,c+=(e[1]-t[1]/2)*i,a=-a;const d=h*o-c*a,f=c*o+h*a;return[d,f]}const Ne=Ym,oe={ADD:"add",REMOVE:"remove"},mu={LENGTH:"length"};class Vs extends Qe{constructor(t,e,i){super(t),this.element=e,this.index=i}}class ty extends be{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(mu.LENGTH)}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 Vs(oe.ADD,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 Vs(oe.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Vs(oe.REMOVE,n,t)),this.dispatchEvent(new Vs(oe.ADD,e,t))}updateLength_(){this.set(mu.LENGTH,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")}}const Be=ty,ey=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,iy=/^([a-z]*)$|^hsla?\(.*\)$/i;function yu(r){return typeof r=="string"?r:xu(r)}function ny(r){const t=document.createElement("div");if(t.style.color=r,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}return""}const ry=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let o=0;for(const a in t)o++&3||(delete t[a],--e)}n=sy(i),t[i]=n,++e}return n}}();function Lr(r){return Array.isArray(r)?r:ry(r)}function sy(r){let t,e,i,n,o;if(iy.exec(r)&&(r=ny(r)),ey.exec(r)){const a=r.length-1;let h;a<=4?h=1:h=2;const c=a===4||a===8;t=parseInt(r.substr(1+0*h,h),16),e=parseInt(r.substr(1+1*h,h),16),i=parseInt(r.substr(1+2*h,h),16),c?n=parseInt(r.substr(1+3*h,h),16):n=255,h==1&&(t=(t<<4)+t,e=(e<<4)+e,i=(i<<4)+i,c&&(n=(n<<4)+n)),o=[t,e,i,n/255]}else if(r.startsWith("rgba("))o=r.slice(5,-1).split(",").map(Number),vu(o);else if(r.startsWith("rgb("))o=r.slice(4,-1).split(",").map(Number),o.push(1),vu(o);else throw new Error("Invalid color");return o}function vu(r){return r[0]=At(r[0]+.5|0,0,255),r[1]=At(r[1]+.5|0,0,255),r[2]=At(r[2]+.5|0,0,255),r[3]=At(r[3],0,1),r}function xu(r){let t=r[0];t!=(t|0)&&(t=t+.5|0);let e=r[1];e!=(e|0)&&(e=e+.5|0);let i=r[2];i!=(i|0)&&(i=i+.5|0);const n=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+t+","+e+","+i+","+n+")"}class oy{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},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];!(t++&3)&&!i.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=Eu(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const o=Eu(t,e,i);this.cache_[o]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Eu(r,t,e){const i=e?yu(e):"null";return t+":"+r+":"+i}const Ks=new oy,xt={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class ay extends be{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[xt.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof e[xt.OPACITY]=="number","Layer opacity must be a number"),e[xt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[xt.Z_INDEX]=t.zIndex,e[xt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[xt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[xt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[xt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?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:t===void 0?!0:t},i=this.getZIndex();return e.opacity=At(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,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 it()}getLayerStatesArray(t){return it()}getExtent(){return this.get(xt.EXTENT)}getMaxResolution(){return this.get(xt.MAX_RESOLUTION)}getMinResolution(){return this.get(xt.MIN_RESOLUTION)}getMinZoom(){return this.get(xt.MIN_ZOOM)}getMaxZoom(){return this.get(xt.MAX_ZOOM)}getOpacity(){return this.get(xt.OPACITY)}getSourceState(){return it()}getVisible(){return this.get(xt.VISIBLE)}getZIndex(){return this.get(xt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(xt.EXTENT,t)}setMaxResolution(t){this.set(xt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(xt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(xt.MAX_ZOOM,t)}setMinZoom(t){this.set(xt.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number","Layer opacity must be a number"),this.set(xt.OPACITY,t)}setVisible(t){this.set(xt.VISIBLE,t)}setZIndex(t){this.set(xt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const wu=ay,qt={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class ly extends wu{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(xt.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(xt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(wt(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=ct(t,st.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(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?null:this.renderer_.getData(t)}isVisible(t){let e;const i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof Ne?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let n;e.layerStatesArray?n=e.layerStatesArray.find(a=>a.layer===this):n=this.getLayerState();const o=this.getExtent();return Ja(n,e.viewState)&&(!o||se(o,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];const n=t instanceof Ne?t.getViewStateAndExtent():t;let o=e(n);return Array.isArray(o)||(o=[o]),o}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(xt.MAP,t)}getMapInternal(){return this.get(xt.MAP)}setMap(t){this.mapPrecomposeKey_&&(wt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(wt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ct(t,qt.PRECOMPOSE,function(e){const n=e.frameState.layerStatesArray,o=this.getLayerState(!1);gt(!n.some(function(a){return a.layer===o.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(o)},this),this.mapRenderKey_=ct(this,st.CHANGE,t.render,t),this.changed())}setSource(t){this.set(xt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Ja(r,t){if(!r.visible)return!1;const e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;const i=t.zoom;return i>r.minZoom&&i<=r.maxZoom}const Ys=ly;class hy extends ws{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){it()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;ze(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Gs(n,i)}forEachFeatureAtCoordinate(t,e,i,n,o,a,h,c){let d;const f=e.viewState;function _(T,M,A,I){return o.call(a,M,T?A:null,I)}const m=f.projection,v=Rc(t.slice(),m),y=[[0,0]];if(m.canWrapX()&&n){const T=m.getExtent(),M=Ct(T);y.push([-M,0],[M,0])}const E=e.layerStatesArray,C=E.length,P=[],w=[];for(let T=0;T<y.length;T++)for(let M=C-1;M>=0;--M){const A=E[M],I=A.layer;if(I.hasRenderer()&&Ja(A,f)&&h.call(c,I)){const z=I.getRenderer(),j=I.getSource();if(z&&j){const V=j.getWrapX()?v:t,q=_.bind(null,A.managed);w[0]=V[0]+y[T][0],w[1]=V[1]+y[T][1],d=z.forEachFeatureAtCoordinate(w,e,i,q,P)}if(d)return d}}if(P.length===0)return;const b=1/P.length;return P.forEach((T,M)=>T.distanceSq+=M*b),P.sort((T,M)=>T.distanceSq-M.distanceSq),P.some(T=>d=T.callback(T.feature,T.layer,T.geometry)),d}hasFeatureAtCoordinate(t,e,i,n,o,a){return this.forEachFeatureAtCoordinate(t,e,i,n,_r,this,o,a)!==void 0}getMap(){return this.map_}renderFrame(t){it()}flushDeclutterItems(t){}scheduleExpireIconCache(t){Ks.canExpireCache()&&t.postRenderFunctions.push(cy)}}function cy(r,t){Ks.expire()}const uy=hy;class dy extends Qe{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const br=dy,qs="ol-hidden",fy="ol-selectable",Cr="ol-unselectable",Lu="ol-unsupported",Js="ol-control",bu="ol-collapsed",gy=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-z]+?)\\s*$`].join(""),"i"),Cu=["style","variant","weight","size","lineHeight","family"],Tu=function(r){const t=r.match(gy);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,n=Cu.length;i<n;++i){const o=t[i+1];o!==void 0&&(e[Cu[i]]=o)}return e.families=e.family.split(/,\s?/),e};function Jt(r,t,e,i){let n;return e&&e.length?n=e.shift():Na?n=new OffscreenCanvas(r||300,t||300):n=document.createElement("canvas"),r&&(n.width=r),t&&(n.height=t),n.getContext("2d",i)}function $s(r){const t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function _y(r){let t=r.offsetWidth;const e=getComputedStyle(r);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function py(r){let t=r.offsetHeight;const e=getComputedStyle(r);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function Qs(r,t){const e=t.parentNode;e&&e.replaceChild(r,t)}function to(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function Su(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function my(r,t){const e=r.childNodes;for(let i=0;;++i){const n=e[i],o=t[i];if(!n&&!o)break;if(n!==o){if(!n){r.appendChild(o);continue}if(!o){r.removeChild(n),--i;continue}r.insertBefore(o,n)}}}const Pu="10px sans-serif",ae="#000",Rn="round",ni=[],ri=0,An="round",Tr=10,Sr="#000",Pr="center",eo="middle",sn=[0,0,0,0],kr=1,si=new be;let In=null,$a;const Qa={},yy=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let o,a;function h(d,f,_){let m=!0;for(let v=0;v<i;++v){const y=e[v];if(a=io(d+" "+f+" "+t+y,n),_!=y){const E=io(d+" "+f+" "+t+_+","+y,n);m=m&&E!=a}}return!!m}function c(){let d=!0;const f=si.getKeys();for(let _=0,m=f.length;_<m;++_){const v=f[_];si.get(v)<100&&(h.apply(this,v.split(`
18
18
  `))?(Ln(Qa),In=null,$a=void 0,si.set(v,100)):(si.set(v,si.get(v)+1,!0),d=!1))}d&&(clearInterval(o),o=void 0)}return function(d){const f=Tu(d);if(!f)return;const _=f.families;for(let m=0,v=_.length;m<v;++m){const y=_[m],E=f.style+`
19
19
  `+f.weight+`
20
20
  `+y;si.get(E)===void 0&&(si.set(E,100,!0),h(f.style,f.weight,y)||(si.set(E,0,!0),o===void 0&&(o=setInterval(c,32))))}}}(),vy=function(){let r;return function(t){let e=Qa[t];if(e==null){if(Na){const i=Tu(t),n=ku(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=t,document.body.appendChild(r),e=r.offsetHeight,document.body.removeChild(r);Qa[t]=e}return e}}();function ku(r,t){return In||(In=Jt(1,1)),r!=$a&&(In.font=r,$a=In.font),In.measureText(t)}function io(r,t){return ku(r,t).width}function Mu(r,t,e){if(t in e)return e[t];const i=t.split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-geojson-view-ts",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -335,9 +335,15 @@ export default defineComponent({
335
335
  item.geometry.type === "Point" ||
336
336
  item.geometry.type === "MultiPoint"
337
337
  ) {
338
+ const self = this;
338
339
  L.geoJson(item, {
339
340
  onEachFeature: function (feature, layer) {
340
341
  featureGroup.addLayer(layer);
342
+ // Mostrar popup solo para Point
343
+ if (feature.geometry.type === "Point") {
344
+ var popupContent = self.getPopupContent(feature);
345
+ layer.bindPopup(popupContent);
346
+ }
341
347
  },
342
348
  });
343
349
  }
@@ -493,6 +499,8 @@ export default defineComponent({
493
499
  // Solo toma en cuenta descripcion y fechaHoraLlegada
494
500
  const descripcion = props.descripcion || "";
495
501
  const fechaHoraLlegada = props.fechaHoraLlegada || "";
502
+ // url de la foto
503
+ const fotoId = props.fotoId || "";
496
504
 
497
505
  // Formatear fecha a dd-MM-yyyy hh:mm:ss
498
506
  let fechaFormateada = "";
@@ -506,6 +514,9 @@ export default defineComponent({
506
514
  )}:${pad(fecha.getSeconds())}`;
507
515
  }
508
516
  let html = "<div>";
517
+ if (fotoId) {
518
+ html += `<img src="${fotoId}" style="width: 200px; height: auto; margin-bottom: 5px;"><br>`;
519
+ }
509
520
  html += `<b>Descripción:</b> ${descripcion}<br>`;
510
521
  if (fechaFormateada) {
511
522
  html += `<b>Fecha Hora Llegada:</b> ${fechaFormateada}<br>`;