@opensystemslab/map 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,79 +1,99 @@
1
- (function(j,tn){typeof exports=="object"&&typeof module<"u"?tn(exports):typeof define=="function"&&define.amd?define(["exports"],tn):(j=typeof globalThis<"u"?globalThis:j||self,tn(j.ComponentLib={}))})(this,function(j){"use strict";/**
1
+ (function(q,Gi){typeof exports=="object"&&typeof module<"u"?Gi(exports):typeof define=="function"&&define.amd?define(["exports"],Gi):(q=typeof globalThis<"u"?globalThis:q||self,Gi(q.ComponentLib={}))})(this,function(q){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const tn=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Qu=Symbol();class th{constructor(e,t){if(t!==Qu)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return tn&&this.t===void 0&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const eh=new Map,ih=r=>{let e=eh.get(r);return e===void 0&&eh.set(r,e=new th(r,Qu)),e},Uo=r=>ih(typeof r=="string"?r:r+""),zc=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((i,n,o)=>i+(a=>{if(a instanceof th)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+r[o+1],r[0]);return ih(t)},Rc=(r,e)=>{tn?r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const i=document.createElement("style");i.textContent=t.cssText,r.appendChild(i)})},nh=tn?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Uo(t)})(r):r;/**
5
+ */const Gi=window,hl=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ul=Symbol(),wd=new WeakMap;class Md{constructor(t,e,n){if(this._$cssResult$=!0,n!==ul)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(hl&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=wd.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&wd.set(e,t))}return t}toString(){return this.cssText}}const Ss=i=>new Md(typeof i=="string"?i:i+"",void 0,ul),zp=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,r,o)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new Md(e,i,ul)},Rp=(i,t)=>{hl?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),r=Gi.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)})},Ed=hl?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return Ss(e)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var rh,os,as,oh;const ss={toAttribute(r,e){switch(e){case Boolean:r=r?"":null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},ah=(r,e)=>e!==r&&(e==e||r==r),ls={attribute:!0,type:String,converter:ss,reflect:!1,hasChanged:ah};class Qn extends HTMLElement{constructor(){super(),this.\u03A0i=new Map,this.\u03A0o=void 0,this.\u03A0l=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.\u03A0h=null,this.u()}static addInitializer(e){var t;(t=this.v)!==null&&t!==void 0||(this.v=[]),this.v.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,i)=>{const n=this.\u03A0p(i,t);n!==void 0&&(this.\u03A0m.set(n,i),e.push(n))}),e}static createProperty(e,t=ls){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(n){const o=this[e];this[t]=n,this.requestUpdate(e,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||ls}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this.\u03A0m=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of i)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(nh(n))}else e!==void 0&&t.push(nh(e));return t}static \u03A0p(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this.\u03A0g=new Promise(t=>this.enableUpdating=t),this.L=new Map,this.\u03A0_(),this.requestUpdate(),(e=this.constructor.v)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,i;((t=this.\u03A0U)!==null&&t!==void 0?t:this.\u03A0U=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var t;(t=this.\u03A0U)===null||t===void 0||t.splice(this.\u03A0U.indexOf(e)>>>0,1)}\u03A0_(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this.\u03A0i.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Rc(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this.\u03A0U)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostConnected)===null||i===void 0?void 0:i.call(t)}),this.\u03A0l&&(this.\u03A0l(),this.\u03A0o=this.\u03A0l=void 0)}enableUpdating(e){}disconnectedCallback(){var e;(e=this.\u03A0U)===null||e===void 0||e.forEach(t=>{var i;return(i=t.hostDisconnected)===null||i===void 0?void 0:i.call(t)}),this.\u03A0o=new Promise(t=>this.\u03A0l=t)}attributeChangedCallback(e,t,i){this.K(e,i)}\u03A0j(e,t,i=ls){var n,o;const a=this.constructor.\u03A0p(e,i);if(a!==void 0&&i.reflect===!0){const s=((o=(n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==null&&o!==void 0?o:ss.toAttribute)(t,i.type);this.\u03A0h=e,s==null?this.removeAttribute(a):this.setAttribute(a,s),this.\u03A0h=null}}K(e,t){var i,n,o;const a=this.constructor,s=a.\u03A0m.get(e);if(s!==void 0&&this.\u03A0h!==s){const l=a.getPropertyOptions(s),u=l.converter,h=(o=(n=(i=u)===null||i===void 0?void 0:i.fromAttribute)!==null&&n!==void 0?n:typeof u=="function"?u:null)!==null&&o!==void 0?o:ss.fromAttribute;this.\u03A0h=s,this[s]=h(t,l.type),this.\u03A0h=null}}requestUpdate(e,t,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||ah)(this[e],t)?(this.L.has(e)||this.L.set(e,t),i.reflect===!0&&this.\u03A0h!==e&&(this.\u03A0k===void 0&&(this.\u03A0k=new Map),this.\u03A0k.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this.\u03A0g=this.\u03A0q())}async \u03A0q(){this.isUpdatePending=!0;try{for(await this.\u03A0g;this.\u03A0o;)await this.\u03A0o}catch(t){Promise.reject(t)}const e=this.performUpdate();return e!=null&&await e,!this.isUpdatePending}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this.\u03A0i&&(this.\u03A0i.forEach((n,o)=>this[o]=n),this.\u03A0i=void 0);let t=!1;const i=this.L;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),(e=this.\u03A0U)===null||e===void 0||e.forEach(n=>{var o;return(o=n.hostUpdate)===null||o===void 0?void 0:o.call(n)}),this.update(i)):this.\u03A0$()}catch(n){throw t=!1,this.\u03A0$(),n}t&&this.E(i)}willUpdate(e){}E(e){var t;(t=this.\u03A0U)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}\u03A0$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.\u03A0g}shouldUpdate(e){return!0}update(e){this.\u03A0k!==void 0&&(this.\u03A0k.forEach((t,i)=>this.\u03A0j(i,this[i],t)),this.\u03A0k=void 0),this.\u03A0$()}updated(e){}firstUpdated(e){}}Qn.finalized=!0,Qn.elementProperties=new Map,Qn.elementStyles=[],Qn.shadowRootOptions={mode:"open"},(os=(rh=globalThis).reactiveElementPlatformSupport)===null||os===void 0||os.call(rh,{ReactiveElement:Qn}),((as=(oh=globalThis).reactiveElementVersions)!==null&&as!==void 0?as:oh.reactiveElementVersions=[]).push("1.0.0-rc.2");/**
9
+ */var dl;const Ts=window,Cd=Ts.trustedTypes,Ip=Cd?Cd.emptyScript:"",Sd=Ts.reactiveElementPolyfillSupport,cl={toAttribute(i,t){switch(t){case Boolean:i=i?Ip:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Td=(i,t)=>t!==i&&(t==t||i==i),fl={attribute:!0,type:String,converter:cl,reflect:!1,hasChanged:Td};class cr extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;(e=this.h)!==null&&e!==void 0||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,n)=>{const r=this._$Ep(n,e);r!==void 0&&(this._$Ev.set(r,n),t.push(r))}),t}static createProperty(t,e=fl){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||fl}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,n=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of n)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const r of n)e.unshift(Ed(r))}else t!==void 0&&e.push(Ed(t));return e}static _$Ep(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,n;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)===null||n===void 0||n.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Rp(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostConnected)===null||n===void 0?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostDisconnected)===null||n===void 0?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=fl){var r;const o=this.constructor._$Ep(t,n);if(o!==void 0&&n.reflect===!0){const s=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:cl).toAttribute(e,n.type);this._$El=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,o=r._$Ev.get(t);if(o!==void 0&&this._$El!==o){const s=r.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?s.converter:cl;this._$El=o,this[o]=a.fromAttribute(e,s.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Td)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(n)):this._$Ek()}catch(r){throw e=!1,this._$Ek(),r}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,n)=>this._$EO(n,this[n],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}cr.finalized=!0,cr.elementProperties=new Map,cr.elementStyles=[],cr.shadowRootOptions={mode:"open"},Sd==null||Sd({ReactiveElement:cr}),((dl=Ts.reactiveElementVersions)!==null&&dl!==void 0?dl:Ts.reactiveElementVersions=[]).push("1.4.1");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var sh,us,hs,lh;const Vo=globalThis.trustedTypes,uh=Vo?Vo.createPolicy("lit-html",{createHTML:r=>r}):void 0,yi=`lit$${(Math.random()+"").slice(9)}$`,hh="?"+yi,Pc=`<${hh}>`,tr=document,Yr=(r="")=>tr.createComment(r),Yo=r=>r===null||typeof r!="object"&&typeof r!="function",fh=Array.isArray,Mc=r=>{var e;return fh(r)||typeof((e=r)===null||e===void 0?void 0:e[Symbol.iterator])=="function"},Xr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dh=/-->/g,ph=/>/g,en=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,ch=/'/g,gh=/"/g,mh=/^(?:script|style|textarea)$/i,Lc=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),xi=Lc(1),er=Symbol.for("lit-noChange"),ae=Symbol.for("lit-nothing"),vh=new WeakMap,Ac=(r,e,t)=>{var i,n;const o=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:e;let a=o._$litPart$;if(a===void 0){const s=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:null;o._$litPart$=a=new qr(e.insertBefore(Yr(),s),s,void 0,t)}return a.I(r),a},ir=tr.createTreeWalker(tr,129,null,!1),Fc=(r,e)=>{const t=r.length-1,i=[];let n,o=e===2?"<svg>":"",a=Xr;for(let l=0;l<t;l++){const u=r[l];let h,f,d=-1,p=0;for(;p<u.length&&(a.lastIndex=p,f=a.exec(u),f!==null);)p=a.lastIndex,a===Xr?f[1]==="!--"?a=dh:f[1]!==void 0?a=ph:f[2]!==void 0?(mh.test(f[2])&&(n=RegExp("</"+f[2],"g")),a=en):f[3]!==void 0&&(a=en):a===en?f[0]===">"?(a=n!=null?n:Xr,d=-1):f[1]===void 0?d=-2:(d=a.lastIndex-f[2].length,h=f[1],a=f[3]===void 0?en:f[3]==='"'?gh:ch):a===gh||a===ch?a=en:a===dh||a===ph?a=Xr:(a=en,n=void 0);const c=a===en&&r[l+1].startsWith("/>")?" ":"";o+=a===Xr?u+Pc:d>=0?(i.push(h),u.slice(0,d)+"$lit$"+u.slice(d)+yi+c):u+yi+(d===-2?(i.push(void 0),l):c)}const s=o+(r[t]||"<?>")+(e===2?"</svg>":"");return[uh!==void 0?uh.createHTML(s):s,i]};class Wr{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let o=0,a=0;const s=e.length-1,l=this.parts,[u,h]=Fc(e,t);if(this.el=Wr.createElement(u,i),ir.currentNode=this.el.content,t===2){const f=this.el.content,d=f.firstChild;d.remove(),f.append(...d.childNodes)}for(;(n=ir.nextNode())!==null&&l.length<s;){if(n.nodeType===1){if(n.hasAttributes()){const f=[];for(const d of n.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(yi)){const p=h[a++];if(f.push(d),p!==void 0){const c=n.getAttribute(p.toLowerCase()+"$lit$").split(yi),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:g[2],strings:c,ctor:g[1]==="."?Nc:g[1]==="?"?Gc:g[1]==="@"?jc:Xo})}else l.push({type:6,index:o})}for(const d of f)n.removeAttribute(d)}if(mh.test(n.tagName)){const f=n.textContent.split(yi),d=f.length-1;if(d>0){n.textContent=Vo?Vo.emptyScript:"";for(let p=0;p<d;p++)n.append(f[p],Yr()),ir.nextNode(),l.push({type:2,index:++o});n.append(f[d],Yr())}}}else if(n.nodeType===8)if(n.data===hh)l.push({type:2,index:o});else{let f=-1;for(;(f=n.data.indexOf(yi,f+1))!==-1;)l.push({type:7,index:o}),f+=yi.length-1}o++}}static createElement(e,t){const i=tr.createElement("template");return i.innerHTML=e,i}}function nr(r,e,t=r,i){var n,o,a,s;if(e===er)return e;let l=i!==void 0?(n=t.\u03A3i)===null||n===void 0?void 0:n[i]:t.\u03A3o;const u=Yo(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==u&&((o=l==null?void 0:l.O)===null||o===void 0||o.call(l,!1),u===void 0?l=void 0:(l=new u(r),l.T(r,t,i)),i!==void 0?((a=(s=t).\u03A3i)!==null&&a!==void 0?a:s.\u03A3i=[])[i]=l:t.\u03A3o=l),l!==void 0&&(e=nr(r,l.S(r,e.values),l,i)),e}class Dc{constructor(e,t){this.l=[],this.N=void 0,this.D=e,this.M=t}u(e){var t;const{el:{content:i},parts:n}=this.D,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:tr).importNode(i,!0);ir.currentNode=o;let a=ir.nextNode(),s=0,l=0,u=n[0];for(;u!==void 0;){if(s===u.index){let h;u.type===2?h=new qr(a,a.nextSibling,this,e):u.type===1?h=new u.ctor(a,u.name,u.strings,this,e):u.type===6&&(h=new Bc(a,this,e)),this.l.push(h),u=n[++l]}s!==(u==null?void 0:u.index)&&(a=ir.nextNode(),s++)}return o}v(e){let t=0;for(const i of this.l)i!==void 0&&(i.strings!==void 0?(i.I(e,i,t),t+=i.strings.length-2):i.I(e[t])),t++}}class qr{constructor(e,t,i,n){this.type=2,this.N=void 0,this.A=e,this.B=t,this.M=i,this.options=n}setConnected(e){var t;(t=this.P)===null||t===void 0||t.call(this,e)}get parentNode(){return this.A.parentNode}get startNode(){return this.A}get endNode(){return this.B}I(e,t=this){e=nr(this,e,t),Yo(e)?e===ae||e==null||e===""?(this.H!==ae&&this.R(),this.H=ae):e!==this.H&&e!==er&&this.m(e):e._$litType$!==void 0?this._(e):e.nodeType!==void 0?this.$(e):Mc(e)?this.g(e):this.m(e)}k(e,t=this.B){return this.A.parentNode.insertBefore(e,t)}$(e){this.H!==e&&(this.R(),this.H=this.k(e))}m(e){const t=this.A.nextSibling;t!==null&&t.nodeType===3&&(this.B===null?t.nextSibling===null:t===this.B.previousSibling)?t.data=e:this.$(tr.createTextNode(e)),this.H=e}_(e){var t;const{values:i,_$litType$:n}=e,o=typeof n=="number"?this.C(e):(n.el===void 0&&(n.el=Wr.createElement(n.h,this.options)),n);if(((t=this.H)===null||t===void 0?void 0:t.D)===o)this.H.v(i);else{const a=new Dc(o,this),s=a.u(this.options);a.v(i),this.$(s),this.H=a}}C(e){let t=vh.get(e.strings);return t===void 0&&vh.set(e.strings,t=new Wr(e)),t}g(e){fh(this.H)||(this.H=[],this.R());const t=this.H;let i,n=0;for(const o of e)n===t.length?t.push(i=new qr(this.k(Yr()),this.k(Yr()),this,this.options)):i=t[n],i.I(o),n++;n<t.length&&(this.R(i&&i.B.nextSibling,n),t.length=n)}R(e=this.A.nextSibling,t){var i;for((i=this.P)===null||i===void 0||i.call(this,!1,!0,t);e&&e!==this.B;){const n=e.nextSibling;e.remove(),e=n}}}class Xo{constructor(e,t,i,n,o){this.type=1,this.H=ae,this.N=void 0,this.V=void 0,this.element=e,this.name=t,this.M=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this.H=Array(i.length-1).fill(ae),this.strings=i):this.H=ae}get tagName(){return this.element.tagName}I(e,t=this,i,n){const o=this.strings;let a=!1;if(o===void 0)e=nr(this,e,t,0),a=!Yo(e)||e!==this.H&&e!==er,a&&(this.H=e);else{const s=e;let l,u;for(e=o[0],l=0;l<o.length-1;l++)u=nr(this,s[i+l],t,l),u===er&&(u=this.H[l]),a||(a=!Yo(u)||u!==this.H[l]),u===ae?e=ae:e!==ae&&(e+=(u!=null?u:"")+o[l+1]),this.H[l]=u}a&&!n&&this.W(e)}W(e){e===ae?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class Nc extends Xo{constructor(){super(...arguments),this.type=3}W(e){this.element[this.name]=e===ae?void 0:e}}class Gc extends Xo{constructor(){super(...arguments),this.type=4}W(e){e&&e!==ae?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class jc extends Xo{constructor(){super(...arguments),this.type=5}I(e,t=this){var i;if((e=(i=nr(this,e,t,0))!==null&&i!==void 0?i:ae)===er)return;const n=this.H,o=e===ae&&n!==ae||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==ae&&(n===ae||o);o&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this.H=e}handleEvent(e){var t,i;typeof this.H=="function"?this.H.call((i=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&i!==void 0?i:this.element,e):this.H.handleEvent(e)}}class Bc{constructor(e,t,i){this.element=e,this.type=6,this.N=void 0,this.V=void 0,this.M=t,this.options=i}I(e){nr(this,e)}}(us=(sh=globalThis).litHtmlPlatformSupport)===null||us===void 0||us.call(sh,Wr,qr),((hs=(lh=globalThis).litHtmlVersions)!==null&&hs!==void 0?hs:lh.litHtmlVersions=[]).push("2.0.0-rc.3");/**
13
+ */var gl;const zs=window,fr=zs.trustedTypes,zd=fr?fr.createPolicy("lit-html",{createHTML:i=>i}):void 0,ji=`lit$${(Math.random()+"").slice(9)}$`,Rd="?"+ji,Pp=`<${Rd}>`,gr=document,ho=(i="")=>gr.createComment(i),uo=i=>i===null||typeof i!="object"&&typeof i!="function",Id=Array.isArray,Ap=i=>Id(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",co=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pd=/-->/g,Ad=/>/g,In=RegExp(`>|[
14
+ \f\r](?:([^\\s"'>=/]+)([
15
+ \f\r]*=[
16
+ \f\r]*(?:[^
17
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Dd=/'/g,Ld=/"/g,Fd=/^(?:script|style|textarea|title)$/i,Dp=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),Bi=Dp(1),mr=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),Od=new WeakMap,Lp=(i,t,e)=>{var n,r;const o=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n:t;let s=o._$litPart$;if(s===void 0){const a=(r=e==null?void 0:e.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=s=new go(t.insertBefore(ho(),a),a,void 0,e!=null?e:{})}return s._$AI(i),s},pr=gr.createTreeWalker(gr,129,null,!1),Fp=(i,t)=>{const e=i.length-1,n=[];let r,o=t===2?"<svg>":"",s=co;for(let l=0;l<e;l++){const h=i[l];let u,d,c=-1,f=0;for(;f<h.length&&(s.lastIndex=f,d=s.exec(h),d!==null);)f=s.lastIndex,s===co?d[1]==="!--"?s=Pd:d[1]!==void 0?s=Ad:d[2]!==void 0?(Fd.test(d[2])&&(r=RegExp("</"+d[2],"g")),s=In):d[3]!==void 0&&(s=In):s===In?d[0]===">"?(s=r!=null?r:co,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?In:d[3]==='"'?Ld:Dd):s===Ld||s===Dd?s=In:s===Pd||s===Ad?s=co:(s=In,r=void 0);const g=s===In&&i[l+1].startsWith("/>")?" ":"";o+=s===co?h+Pp:c>=0?(n.push(u),h.slice(0,c)+"$lit$"+h.slice(c)+ji+g):h+ji+(c===-2?(n.push(void 0),l):g)}const a=o+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[zd!==void 0?zd.createHTML(a):a,n]};class fo{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,s=0;const a=t.length-1,l=this.parts,[h,u]=Fp(t,e);if(this.el=fo.createElement(h,n),pr.currentNode=this.el.content,e===2){const d=this.el.content,c=d.firstChild;c.remove(),d.append(...c.childNodes)}for(;(r=pr.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes()){const d=[];for(const c of r.getAttributeNames())if(c.endsWith("$lit$")||c.startsWith(ji)){const f=u[s++];if(d.push(c),f!==void 0){const g=r.getAttribute(f.toLowerCase()+"$lit$").split(ji),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:m[2],strings:g,ctor:m[1]==="."?Np:m[1]==="?"?jp:m[1]==="@"?Bp:Rs})}else l.push({type:6,index:o})}for(const c of d)r.removeAttribute(c)}if(Fd.test(r.tagName)){const d=r.textContent.split(ji),c=d.length-1;if(c>0){r.textContent=fr?fr.emptyScript:"";for(let f=0;f<c;f++)r.append(d[f],ho()),pr.nextNode(),l.push({type:2,index:++o});r.append(d[c],ho())}}}else if(r.nodeType===8)if(r.data===Rd)l.push({type:2,index:o});else{let d=-1;for(;(d=r.data.indexOf(ji,d+1))!==-1;)l.push({type:7,index:o}),d+=ji.length-1}o++}}static createElement(t,e){const n=gr.createElement("template");return n.innerHTML=t,n}}function vr(i,t,e=i,n){var r,o,s,a;if(t===mr)return t;let l=n!==void 0?(r=e._$Cl)===null||r===void 0?void 0:r[n]:e._$Cu;const h=uo(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(i),l._$AT(i,e,n)),n!==void 0?((s=(a=e)._$Cl)!==null&&s!==void 0?s:a._$Cl=[])[n]=l:e._$Cu=l),l!==void 0&&(t=vr(i,l._$AS(i,t.values),l,n)),t}class Op{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:n},parts:r}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:gr).importNode(n,!0);pr.currentNode=o;let s=pr.nextNode(),a=0,l=0,h=r[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new go(s,s.nextSibling,this,t):h.type===1?u=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(u=new Up(s,this,t)),this.v.push(u),h=r[++l]}a!==(h==null?void 0:h.index)&&(s=pr.nextNode(),a++)}return o}m(t){let e=0;for(const n of this.v)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class go{constructor(t,e,n,r){var o;this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$C_=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=vr(this,t,e),uo(t)?t===ie||t==null||t===""?(this._$AH!==ie&&this._$AR(),this._$AH=ie):t!==this._$AH&&t!==mr&&this.$(t):t._$litType$!==void 0?this.T(t):t.nodeType!==void 0?this.k(t):Ap(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==ie&&uo(this._$AH)?this._$AA.nextSibling.data=t:this.k(gr.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=fo.createElement(r.h,this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.m(n);else{const s=new Op(o,this),a=s.p(this.options);s.m(n),this.k(a),this._$AH=s}}_$AC(t){let e=Od.get(t.strings);return e===void 0&&Od.set(t.strings,e=new fo(t)),e}O(t){Id(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const o of t)r===e.length?e.push(n=new go(this.S(ho()),this.S(ho()),this,this.options)):n=e[r],n._$AI(o),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$C_=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class Rs{constructor(t,e,n,r,o){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ie}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const o=this.strings;let s=!1;if(o===void 0)t=vr(this,t,e,0),s=!uo(t)||t!==this._$AH&&t!==mr,s&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=vr(this,a[n+l],e,l),h===mr&&(h=this._$AH[l]),s||(s=!uo(h)||h!==this._$AH[l]),h===ie?t=ie:t!==ie&&(t+=(h!=null?h:"")+o[l+1]),this._$AH[l]=h}s&&!r&&this.P(t)}P(t){t===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Np extends Rs{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===ie?void 0:t}}const Gp=fr?fr.emptyScript:"";class jp extends Rs{constructor(){super(...arguments),this.type=4}P(t){t&&t!==ie?this.element.setAttribute(this.name,Gp):this.element.removeAttribute(this.name)}}class Bp extends Rs{constructor(t,e,n,r,o){super(t,e,n,r,o),this.type=5}_$AI(t,e=this){var n;if((t=(n=vr(this,t,e,0))!==null&&n!==void 0?n:ie)===mr)return;const r=this._$AH,o=t===ie&&r!==ie||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==ie&&(r===ie||o);o&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;typeof this._$AH=="function"?this._$AH.call((n=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class Up{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){vr(this,t)}}const Nd=zs.litHtmlPolyfillSupport;Nd==null||Nd(fo,go),((gl=zs.litHtmlVersions)!==null&&gl!==void 0?gl:zs.litHtmlVersions=[]).push("2.3.1");/**
14
18
  * @license
15
19
  * Copyright 2017 Google LLC
16
20
  * SPDX-License-Identifier: BSD-3-Clause
17
- */var fs,_h,ds,yh,ps,xh;((fs=(xh=globalThis).litElementVersions)!==null&&fs!==void 0?fs:xh.litElementVersions=[]).push("3.0.0-rc.2");class nn extends Qn{constructor(){super(...arguments),this.renderOptions={host:this},this.\u03A6t=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();super.update(e),this.\u03A6t=Ac(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.\u03A6t)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.\u03A6t)===null||e===void 0||e.setConnected(!1)}render(){return er}}nn.finalized=!0,nn._$litElement$=!0,(ds=(_h=globalThis).litElementHydrateSupport)===null||ds===void 0||ds.call(_h,{LitElement:nn}),(ps=(yh=globalThis).litElementPlatformSupport)===null||ps===void 0||ps.call(yh,{LitElement:nn});/**
21
+ */var ml,pl;class Pn extends cr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lp(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return mr}}Pn.finalized=!0,Pn._$litElement$=!0,(ml=globalThis.litElementHydrateSupport)===null||ml===void 0||ml.call(globalThis,{LitElement:Pn});const Gd=globalThis.litElementPolyfillSupport;Gd==null||Gd({LitElement:Pn}),((pl=globalThis.litElementVersions)!==null&&pl!==void 0?pl:globalThis.litElementVersions=[]).push("3.2.2");/**
18
22
  * @license
19
23
  * Copyright 2017 Google LLC
20
24
  * SPDX-License-Identifier: BSD-3-Clause
21
- */const cs=r=>e=>typeof e=="function"?((t,i)=>(window.customElements.define(t,i),i))(r,e):((t,i)=>{const{kind:n,elements:o}=i;return{kind:n,elements:o,finisher(a){window.customElements.define(t,a)}}})(r,e);/**
25
+ */const vl=i=>t=>typeof t=="function"?((e,n)=>(customElements.define(e,n),n))(i,t):((e,n)=>{const{kind:r,elements:o}=n;return{kind:r,elements:o,finisher(s){customElements.define(e,s)}}})(i,t);/**
22
26
  * @license
23
27
  * Copyright 2017 Google LLC
24
28
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const Uc=(r,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,r)}};function Q(r){return(e,t)=>t!==void 0?((i,n,o)=>{n.constructor.createProperty(o,i)})(r,e,t):Uc(r,e)}/**
29
+ */const Vp=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}};function J(i){return(t,e)=>e!==void 0?((n,r,o)=>{r.constructor.createProperty(o,n)})(i,t,e):Vp(i,t)}/**
26
30
  * @license
27
31
  * Copyright 2017 Google LLC
28
32
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function bi(r){return Q({...r,state:!0,attribute:!1})}var Vc=function(){function r(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}return r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0},r}();const je=Vc,rn={PROPERTYCHANGE:"propertychange"};var Yc=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}();const gs=Yc;function Xc(r,e,t){for(var i,n,o=t||on,a=0,s=r.length,l=!1;a<s;)i=a+(s-a>>1),n=+o(r[i],e),n<0?a=i+1:(s=i,l=!n);return l?a:~a}function on(r,e){return r>e?1:r<e?-1:0}function Wc(r,e){return r.indexOf(e)>=0}function ms(r,e,t){var i=r.length;if(r[0]<=e)return 0;if(e<=r[i-1])return i-1;var n=void 0;if(t>0){for(n=1;n<i;++n)if(r[n]<e)return n-1}else if(t<0){for(n=1;n<i;++n)if(r[n]<=e)return n}else for(n=1;n<i;++n){if(r[n]==e)return n;if(r[n]<e)return typeof t=="function"?t(e,r[n-1],r[n])>0?n-1:n:r[n-1]-e<e-r[n]?n-1:n}return i-1}function qc(r,e,t){for(;e<t;){var i=r[e];r[e]=r[t],r[t]=i,++e,--t}}function Be(r,e){for(var t=Array.isArray(e)?e:[e],i=t.length,n=0;n<i;n++)r[r.length]=t[n]}function an(r,e){var t=r.length;if(t!==e.length)return!1;for(var i=0;i<t;i++)if(r[i]!==e[i])return!1;return!0}function Zc(r,e,t){var i=e||on;return r.every(function(n,o){if(o===0)return!0;var a=i(r[o-1],n);return!(a>0||t&&a===0)})}function ki(){return!0}function rr(){return!1}function sn(){}function Kc(r){var e=!1,t,i,n;return function(){var o=Array.prototype.slice.call(arguments);return(!e||this!==n||!an(o,i))&&(e=!0,n=this,i=o,t=r.apply(this,arguments)),t}}var qt=typeof Object.assign=="function"?Object.assign:function(r,e){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(r),i=1,n=arguments.length;i<n;++i){var o=arguments[i];if(o!=null)for(var a in o)o.hasOwnProperty(a)&&(t[a]=o[a])}return t};function Zr(r){for(var e in r)delete r[e]}var vs=typeof Object.values=="function"?Object.values:function(r){var e=[];for(var t in r)e.push(r[t]);return e};function ln(r){var e;for(e in r)return!1;return!e}var Hc=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),$c=function(r){Hc(e,r);function e(t){var i=r.call(this)||this;return i.eventTarget_=t,i.pendingRemovals_=null,i.dispatching_=null,i.listeners_=null,i}return e.prototype.addEventListener=function(t,i){if(!(!t||!i)){var n=this.listeners_||(this.listeners_={}),o=n[t]||(n[t]=[]);o.indexOf(i)===-1&&o.push(i)}},e.prototype.dispatchEvent=function(t){var i=typeof t=="string"?new je(t):t,n=i.type;i.target||(i.target=this.eventTarget_||this);var o=this.listeners_&&this.listeners_[n],a;if(o){var s=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,l[n]=0),++s[n];for(var u=0,h=o.length;u<h;++u)if("handleEvent"in o[u]?a=o[u].handleEvent(i):a=o[u].call(this,i),a===!1||i.propagationStopped){a=!1;break}if(--s[n],s[n]===0){var f=l[n];for(delete l[n];f--;)this.removeEventListener(n,sn);delete s[n]}return a}},e.prototype.disposeInternal=function(){this.listeners_&&Zr(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1},e.prototype.removeEventListener=function(t,i){var n=this.listeners_&&this.listeners_[t];if(n){var o=n.indexOf(i);o!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[o]=sn,++this.pendingRemovals_[t]):(n.splice(o,1),n.length===0&&delete this.listeners_[t]))}},e}(gs);const or=$c,H={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 vt(r,e,t,i,n){if(i&&i!==r&&(t=t.bind(i)),n){var o=t;t=function(){r.removeEventListener(e,t),o.apply(this,arguments)}}var a={target:r,type:e,listener:t};return r.addEventListener(e,t),a}function Wo(r,e,t,i){return vt(r,e,t,i,!0)}function Lt(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Zr(r))}var Jc=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),qo=function(r){Jc(e,r);function e(){var t=r.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return e.prototype.changed=function(){++this.revision_,this.dispatchEvent(H.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,i){if(Array.isArray(t)){for(var n=t.length,o=new Array(n),a=0;a<n;++a)o[a]=vt(this,t[a],i);return o}else return vt(this,t,i)},e.prototype.onceInternal=function(t,i){var n;if(Array.isArray(t)){var o=t.length;n=new Array(o);for(var a=0;a<o;++a)n[a]=Wo(this,t[a],i)}else n=Wo(this,t,i);return i.ol_key=n,n},e.prototype.unInternal=function(t,i){var n=i.ol_key;if(n)Qc(n);else if(Array.isArray(t))for(var o=0,a=t.length;o<a;++o)this.removeEventListener(t[o],i);else this.removeEventListener(t,i)},e}(or);qo.prototype.on,qo.prototype.once,qo.prototype.un;function Qc(r){if(Array.isArray(r))for(var e=0,t=r.length;e<t;++e)Lt(r[e]);else Lt(r)}const bh=qo;function $(){return function(){throw new Error("Unimplemented abstract method.")}()}var tg=0;function Z(r){return r.ol_uid||(r.ol_uid=String(++tg))}var eg="6.9.0",kh=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),wh=function(r){kh(e,r);function e(t,i,n){var o=r.call(this,t)||this;return o.key=i,o.oldValue=n,o}return e}(je),ig=function(r){kh(e,r);function e(t){var i=r.call(this)||this;return i.on,i.once,i.un,Z(i),i.values_=null,t!==void 0&&i.setProperties(t),i}return e.prototype.get=function(t){var i;return this.values_&&this.values_.hasOwnProperty(t)&&(i=this.values_[t]),i},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&qt({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,i){var n;n="change:"+t,this.dispatchEvent(new wh(n,t,i)),n=rn.PROPERTYCHANGE,this.dispatchEvent(new wh(n,t,i))},e.prototype.addChangeListener=function(t,i){this.addEventListener("change:"+t,i)},e.prototype.removeChangeListener=function(t,i){this.removeEventListener("change:"+t,i)},e.prototype.set=function(t,i,n){var o=this.values_||(this.values_={});if(n)o[t]=i;else{var a=o[t];o[t]=i,a!==i&&this.notify(t,a)}},e.prototype.setProperties=function(t,i){for(var n in t)this.set(n,t[n],i)},e.prototype.applyProperties=function(t){!t.values_||qt(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,i){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],ln(this.values_)&&(this.values_=null),i||this.notify(t,n)}},e}(bh);const Ue=ig,Zo={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend"};var ar=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",ng=ar.indexOf("firefox")!==-1;ar.indexOf("safari")!==-1&&ar.indexOf("chrom")==-1;var rg=ar.indexOf("webkit")!==-1&&ar.indexOf("edge")==-1,og=ar.indexOf("macintosh")!==-1,Eh=typeof devicePixelRatio<"u"?devicePixelRatio:1,Ko=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,ag=typeof Image<"u"&&Image.prototype.decode,Th=function(){var r=!1;try{var e=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return r}();function be(r,e,t,i){var n;return t&&t.length?n=t.shift():Ko?n=new OffscreenCanvas(r||300,e||300):(n=document.createElement("canvas"),n.style.all="unset"),r&&(n.width=r),e&&(n.height=e),n.getContext("2d",i)}function Ch(r,e){var t=e.parentNode;t&&t.replaceChild(r,e)}function _s(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function sg(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function lg(r,e){for(var t=r.childNodes,i=0;;++i){var n=t[i],o=e[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)}}}var ug=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),hg=function(r){ug(e,r);function e(t){var i=r.call(this)||this,n=t.element;return n&&!t.target&&!n.style.pointerEvents&&(n.style.pointerEvents="auto"),i.element=n||null,i.target_=null,i.map_=null,i.listenerKeys=[],t.render&&(i.render=t.render),t.target&&i.setTarget(t.target),i}return e.prototype.disposeInternal=function(){_s(this.element),r.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&_s(this.element);for(var i=0,n=this.listenerKeys.length;i<n;++i)Lt(this.listenerKeys[i]);if(this.listenerKeys.length=0,this.map_=t,this.map_){var o=this.target_?this.target_:t.getOverlayContainerStopEvent();o.appendChild(this.element),this.render!==sn&&this.listenerKeys.push(vt(t,Zo.POSTRENDER,this.render,this)),t.render()}},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_=typeof t=="string"?document.getElementById(t):t},e}(Ue);const Kr=hg;var Ho="ol-hidden",Hr="ol-unselectable",ys="ol-control",Sh="ol-collapsed",fg=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"),Oh=["style","variant","weight","size","lineHeight","family"],Ih=function(r){var e=r.match(fg);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,n=Oh.length;i<n;++i){var o=e[i+1];o!==void 0&&(t[Oh[i]]=o)}return t.families=t.family.split(/,\s?/),t};function xs(r){return r===1?"":String(Math.round(r*100)/100)}const At={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source"};var dg=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),pg=function(r){dg(e,r);function e(t){var i=this,n="v"+eg.split("-")[0],o="Assertion failed. See https://openlayers.org/en/"+n+"/doc/errors/#"+t+" for details.";return i=r.call(this,o)||this,i.code=t,i.name="AssertionError",i.message=o,i}return e}(Error);const zh=pg;function lt(r,e){if(!r)throw new zh(e)}function Zt(r,e,t){return Math.min(Math.max(r,e),t)}var cg=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),gg=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function mg(r,e,t,i,n,o){var a=n-t,s=o-i;if(a!==0||s!==0){var l=((r-t)*a+(e-i)*s)/(a*a+s*s);l>1?(t=n,i=o):l>0&&(t+=a*l,i+=s*l)}return un(r,e,t,i)}function un(r,e,t,i){var n=t-r,o=i-e;return n*n+o*o}function vg(r){for(var e=r.length,t=0;t<e;t++){for(var i=t,n=Math.abs(r[t][t]),o=t+1;o<e;o++){var a=Math.abs(r[o][t]);a>n&&(n=a,i=o)}if(n===0)return null;var s=r[i];r[i]=r[t],r[t]=s;for(var l=t+1;l<e;l++)for(var u=-r[l][t]/r[t][t],h=t;h<e+1;h++)t==h?r[l][h]=0:r[l][h]+=u*r[t][h]}for(var f=new Array(e),d=e-1;d>=0;d--){f[d]=r[d][e]/r[d][d];for(var p=d-1;p>=0;p--)r[p][e]-=r[p][d]*f[d]}return f}function hn(r){return r*Math.PI/180}function wi(r,e){var t=r%e;return t*e<0?t+e:t}function Qe(r,e,t){return r+t*(e-r)}var _g=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),yg=function(r){_g(e,r);function e(t){var i=r.call(this)||this;i.on,i.once,i.un;var n=qt({},t);return typeof t.properties=="object"&&(delete n.properties,qt(n,t.properties)),n[At.OPACITY]=t.opacity!==void 0?t.opacity:1,lt(typeof n[At.OPACITY]=="number",64),n[At.VISIBLE]=t.visible!==void 0?t.visible:!0,n[At.Z_INDEX]=t.zIndex,n[At.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,n[At.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,n[At.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,n[At.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,i.className_=n.className!==void 0?t.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var i=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return i.opacity=Zt(Math.round(this.getOpacity()*100)/100,0,1),i.sourceState=this.getSourceState(),i.visible=this.getVisible(),i.extent=this.getExtent(),i.zIndex=n===void 0&&!i.managed?1/0:n,i.maxResolution=this.getMaxResolution(),i.minResolution=Math.max(this.getMinResolution(),0),i.minZoom=this.getMinZoom(),i.maxZoom=this.getMaxZoom(),this.state_=i,i},e.prototype.getLayersArray=function(t){return $()},e.prototype.getLayerStatesArray=function(t){return $()},e.prototype.getExtent=function(){return this.get(At.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(At.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(At.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(At.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(At.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(At.OPACITY)},e.prototype.getSourceState=function(){return $()},e.prototype.getVisible=function(){return this.get(At.VISIBLE)},e.prototype.getZIndex=function(){return this.get(At.Z_INDEX)},e.prototype.setExtent=function(t){this.set(At.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(At.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(At.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(At.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(At.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){lt(typeof t=="number",64),this.set(At.OPACITY,t)},e.prototype.setVisible=function(t){this.set(At.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(At.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},e}(Ue);const Rh=yg,fn={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},dn={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"};var xg=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),bg=function(r){xg(e,r);function e(t){var i=this,n=qt({},t);delete n.source,i=r.call(this,n)||this,i.on,i.once,i.un,i.mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,t.render&&(i.render=t.render),t.map&&i.setMap(t.map),i.addChangeListener(At.SOURCE,i.handleSourcePropertyChange_);var o=t.source?t.source:null;return i.setSource(o),i}return e.prototype.getLayersArray=function(t){var i=t||[];return i.push(this),i},e.prototype.getLayerStatesArray=function(t){var i=t||[];return i.push(this.getLayerState()),i},e.prototype.getSource=function(){return this.get(At.SOURCE)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():dn.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Lt(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=vt(t,H.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(function(i){return i([])})},e.prototype.render=function(t,i){var n=this.getRenderer();if(n.prepareFrame(t))return n.renderFrame(t,i)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Lt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Lt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=vt(t,fn.PRECOMPOSE,function(i){var n=i,o=n.frameState.layerStatesArray,a=this.getLayerState(!1);lt(!o.some(function(s){return s.layer===a.layer}),67),o.push(a)},this),this.mapRenderKey_=vt(this,H.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(At.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),r.prototype.disposeInternal.call(this)},e}(Rh);function $o(r,e){if(!r.visible)return!1;var t=e.resolution;if(t<r.minResolution||t>=r.maxResolution)return!1;var i=e.zoom;return i>r.minZoom&&i<=r.maxZoom}const Ph=bg;var kg=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),wg=function(r){kg(e,r);function e(t){var i=this,n=t||{};i=r.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this,i.ulElement_=document.createElement("ul"),i.collapsed_=n.collapsed!==void 0?n.collapsed:!0,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=n.collapsible!==void 0,i.collapsible_=n.collapsible!==void 0?n.collapsible:!0,i.collapsible_||(i.collapsed_=!1);var o=n.className!==void 0?n.className:"ol-attribution",a=n.tipLabel!==void 0?n.tipLabel:"Attributions",s=n.expandClassName!==void 0?n.expandClassName:o+"-expand",l=n.collapseLabel!==void 0?n.collapseLabel:"\u203A",u=n.collapseClassName!==void 0?n.collapseClassName:o+"-collpase";typeof l=="string"?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=l,i.collapseLabel_.className=u):i.collapseLabel_=l;var h=n.label!==void 0?n.label:"i";typeof h=="string"?(i.label_=document.createElement("span"),i.label_.textContent=h,i.label_.className=s):i.label_=h;var f=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_;i.toggleButton_=document.createElement("button"),i.toggleButton_.setAttribute("type","button"),i.toggleButton_.setAttribute("aria-expanded",String(!i.collapsed_)),i.toggleButton_.title=a,i.toggleButton_.appendChild(f),i.toggleButton_.addEventListener(H.CLICK,i.handleClick_.bind(i),!1);var d=o+" "+Hr+" "+ys+(i.collapsed_&&i.collapsible_?" "+Sh:"")+(i.collapsible_?"":" ol-uncollapsible"),p=i.element;return p.className=d,p.appendChild(i.toggleButton_),p.appendChild(i.ulElement_),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return e.prototype.collectSourceAttributions_=function(t){for(var i={},n=[],o=!0,a=t.layerStatesArray,s=0,l=a.length;s<l;++s){var u=a[s];if(!!$o(u,t.viewState)){var h=u.layer.getSource();if(!!h){var f=h.getAttributions();if(!!f){var d=f(t);if(!!d)if(o=o&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(var p=0,c=d.length;p<c;++p)d[p]in i||(n.push(d[p]),i[d[p]]=!0);else d in i||(n.push(d),i[d]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(o),n},e.prototype.updateElement_=function(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var i=this.collectSourceAttributions_(t),n=i.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!an(i,this.renderedAttributions_)){sg(this.ulElement_);for(var o=0,a=i.length;o<a;++o){var s=document.createElement("li");s.innerHTML=i[o],this.ulElement_.appendChild(s)}this.renderedAttributions_=i}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(Sh),this.collapsed_?Ch(this.collapseLabel_,this.label_):Ch(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(Kr);const Eg=wg,ee={ADD:"add",REMOVE:"remove"};var Mh=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Lh={LENGTH:"length"},Jo=function(r){Mh(e,r);function e(t,i,n){var o=r.call(this,t)||this;return o.element=i,o.index=n,o}return e}(je),Tg=function(r){Mh(e,r);function e(t,i){var n=r.call(this)||this;n.on,n.once,n.un;var o=i||{};if(n.unique_=!!o.unique,n.array_=t||[],n.unique_)for(var a=0,s=n.array_.length;a<s;++a)n.assertUnique_(n.array_[a],a);return n.updateLength_(),n}return e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var i=0,n=t.length;i<n;++i)this.push(t[i]);return this},e.prototype.forEach=function(t){for(var i=this.array_,n=0,o=i.length;n<o;++n)t(i[n],n,i)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(Lh.LENGTH)},e.prototype.insertAt=function(t,i){this.unique_&&this.assertUnique_(i),this.array_.splice(t,0,i),this.updateLength_(),this.dispatchEvent(new Jo(ee.ADD,i,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var i=this.getLength();return this.insertAt(i,t),this.getLength()},e.prototype.remove=function(t){for(var i=this.array_,n=0,o=i.length;n<o;++n)if(i[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var i=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Jo(ee.REMOVE,i,t)),i},e.prototype.setAt=function(t,i){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(i,t);var o=this.array_[t];this.array_[t]=i,this.dispatchEvent(new Jo(ee.REMOVE,o,t)),this.dispatchEvent(new Jo(ee.ADD,i,t))}else{for(var a=n;a<t;++a)this.insertAt(a,void 0);this.insertAt(t,i)}},e.prototype.updateLength_=function(){this.set(Lh.LENGTH,this.array_.length)},e.prototype.assertUnique_=function(t,i){for(var n=0,o=this.array_.length;n<o;++n)if(this.array_[n]===t&&n!==i)throw new zh(58)},e}(Ue);const me=Tg;function Ah(r){return Math.pow(r,3)}function sr(r){return 1-Ah(1-r)}function Cg(r){return 3*r*r-2*r*r*r}function Sg(r){return r}var Og=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ig=function(r){Og(e,r);function e(t){var i=this,n=t||{};i=r.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var o=n.className!==void 0?n.className:"ol-rotate",a=n.label!==void 0?n.label:"\u21E7",s=n.compassClassName!==void 0?n.compassClassName:"ol-compass";i.label_=null,typeof a=="string"?(i.label_=document.createElement("span"),i.label_.className=s,i.label_.textContent=a):(i.label_=a,i.label_.classList.add(s));var l=n.tipLabel?n.tipLabel:"Reset rotation",u=document.createElement("button");u.className=o+"-reset",u.setAttribute("type","button"),u.title=l,u.appendChild(i.label_),u.addEventListener(H.CLICK,i.handleClick_.bind(i),!1);var h=o+" "+Hr+" "+ys,f=i.element;return f.className=h,f.appendChild(u),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=n.duration!==void 0?n.duration:250,i.autoHide_=n.autoHide!==void 0?n.autoHide:!0,i.rotation_=void 0,i.autoHide_&&i.element.classList.add(Ho),i}return e.prototype.handleClick_=function(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap(),i=t.getView();if(!!i){var n=i.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?i.animate({rotation:0,duration:this.duration_,easing:sr}):i.setRotation(0))}},e.prototype.render=function(t){var i=t.frameState;if(!!i){var n=i.viewState.rotation;if(n!=this.rotation_){var o="rotate("+n+"rad)";if(this.autoHide_){var a=this.element.classList.contains(Ho);!a&&n===0?this.element.classList.add(Ho):a&&n!==0&&this.element.classList.remove(Ho)}this.label_.style.transform=o}this.rotation_=n}},e}(Kr);const zg=Ig;var Rg=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Pg=function(r){Rg(e,r);function e(t){var i=this,n=t||{};i=r.call(this,{element:document.createElement("div"),target:n.target})||this;var o=n.className!==void 0?n.className:"ol-zoom",a=n.delta!==void 0?n.delta:1,s=n.zoomInClassName!==void 0?n.zoomInClassName:o+"-in",l=n.zoomOutClassName!==void 0?n.zoomOutClassName:o+"-out",u=n.zoomInLabel!==void 0?n.zoomInLabel:"+",h=n.zoomOutLabel!==void 0?n.zoomOutLabel:"\u2013",f=n.zoomInTipLabel!==void 0?n.zoomInTipLabel:"Zoom in",d=n.zoomOutTipLabel!==void 0?n.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=f,p.appendChild(typeof u=="string"?document.createTextNode(u):u),p.addEventListener(H.CLICK,i.handleClick_.bind(i,a),!1);var c=document.createElement("button");c.className=l,c.setAttribute("type","button"),c.title=d,c.appendChild(typeof h=="string"?document.createTextNode(h):h),c.addEventListener(H.CLICK,i.handleClick_.bind(i,-a),!1);var g=o+" "+Hr+" "+ys,m=i.element;return m.className=g,m.appendChild(p),m.appendChild(c),i.duration_=n.duration!==void 0?n.duration:250,i}return e.prototype.handleClick_=function(t,i){i.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var i=this.getMap(),n=i.getView();if(!!n){var o=n.getZoom();if(o!==void 0){var a=n.getConstrainedZoom(o+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:a,duration:this.duration_,easing:sr})):n.setZoom(a)}}},e}(Kr);const Mg=Pg,bs={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var lr={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Le={};Le[lr.RADIANS]=6370997/(2*Math.PI),Le[lr.DEGREES]=2*Math.PI*6370997/360,Le[lr.FEET]=.3048,Le[lr.METERS]=1,Le[lr.USFEET]=1200/3937;const ke=lr;var Lg=function(){function r(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return r.prototype.canWrapX=function(){return this.canWrapX_},r.prototype.getCode=function(){return this.code_},r.prototype.getExtent=function(){return this.extent_},r.prototype.getUnits=function(){return this.units_},r.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Le[this.units_]},r.prototype.getWorldExtent=function(){return this.worldExtent_},r.prototype.getAxisOrientation=function(){return this.axisOrientation_},r.prototype.isGlobal=function(){return this.global_},r.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)},r.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},r.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},r.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)},r.prototype.setWorldExtent=function(e){this.worldExtent_=e},r.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},r.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},r}();const ks=Lg;var Ag=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),$r=6378137,ur=Math.PI*$r,Fg=[-ur,-ur,ur,ur],Dg=[-180,-85,180,85],Qo=$r*Math.log(Math.tan(Math.PI/2)),hr=function(r){Ag(e,r);function e(t){return r.call(this,{code:t,units:ke.METERS,extent:Fg,global:!0,worldExtent:Dg,getPointResolution:function(i,n){return i/cg(n[1]/$r)}})||this}return e}(ks),Fh=[new hr("EPSG:3857"),new hr("EPSG:102100"),new hr("EPSG:102113"),new hr("EPSG:900913"),new hr("http://www.opengis.net/def/crs/EPSG/0/3857"),new hr("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ng(r,e,t){var i=r.length,n=t>1?t:2,o=e;o===void 0&&(n>2?o=r.slice():o=new Array(i));for(var a=0;a<i;a+=n){o[a]=ur*r[a]/180;var s=$r*Math.log(Math.tan(Math.PI*(+r[a+1]+90)/360));s>Qo?s=Qo:s<-Qo&&(s=-Qo),o[a+1]=s}return o}function Gg(r,e,t){var i=r.length,n=t>1?t:2,o=e;o===void 0&&(n>2?o=r.slice():o=new Array(i));for(var a=0;a<i;a+=n)o[a]=180*r[a]/ur,o[a+1]=360*Math.atan(Math.exp(r[a+1]/$r))/Math.PI-90;return o}var jg=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Bg=6378137,Dh=[-180,-90,180,90],Ug=Math.PI*Bg/180,pn=function(r){jg(e,r);function e(t,i){return r.call(this,{code:t,units:ke.DEGREES,extent:Dh,axisOrientation:i,global:!0,metersPerUnit:Ug,worldExtent:Dh})||this}return e}(ks),Nh=[new pn("CRS:84"),new pn("EPSG:4326","neu"),new pn("urn:ogc:def:crs:OGC:1.3:CRS84"),new pn("urn:ogc:def:crs:OGC:2:84"),new pn("http://www.opengis.net/def/crs/OGC/1.3/CRS84","neu"),new pn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new pn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],ws={};function Vg(r){return ws[r]||ws[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Yg(r,e){ws[r]=e}var fr={};function ta(r,e,t){var i=r.getCode(),n=e.getCode();i in fr||(fr[i]={}),fr[i][n]=t}function Xg(r,e){var t;return r in fr&&e in fr[r]&&(t=fr[r][e]),t}const Jr={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},ie={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function ne(r){for(var e=we(),t=0,i=r.length;t<i;++t)eo(e,r[t]);return e}function Wg(r,e,t){var i=Math.min.apply(null,r),n=Math.min.apply(null,e),o=Math.max.apply(null,r),a=Math.max.apply(null,e);return Ae(i,n,o,a,t)}function Ve(r,e,t){return t?(t[0]=r[0]-e,t[1]=r[1]-e,t[2]=r[2]+e,t[3]=r[3]+e,t):[r[0]-e,r[1]-e,r[2]+e,r[3]+e]}function Gh(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r.slice()}function cn(r,e,t){var i,n;return e<r[0]?i=r[0]-e:r[2]<e?i=e-r[2]:i=0,t<r[1]?n=r[1]-t:r[3]<t?n=t-r[3]:n=0,i*i+n*n}function ea(r,e){return Es(r,e[0],e[1])}function gn(r,e){return r[0]<=e[0]&&e[2]<=r[2]&&r[1]<=e[1]&&e[3]<=r[3]}function Es(r,e,t){return r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]}function Ts(r,e){var t=r[0],i=r[1],n=r[2],o=r[3],a=e[0],s=e[1],l=ie.UNKNOWN;return a<t?l=l|ie.LEFT:a>n&&(l=l|ie.RIGHT),s<i?l=l|ie.BELOW:s>o&&(l=l|ie.ABOVE),l===ie.UNKNOWN&&(l=ie.INTERSECTING),l}function we(){return[1/0,1/0,-1/0,-1/0]}function Ae(r,e,t,i,n){return n?(n[0]=r,n[1]=e,n[2]=t,n[3]=i,n):[r,e,t,i]}function Qr(r){return Ae(1/0,1/0,-1/0,-1/0,r)}function to(r,e){var t=r[0],i=r[1];return Ae(t,i,t,i,e)}function Cs(r,e,t,i,n){var o=Qr(n);return Bh(o,r,e,t,i)}function dr(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function jh(r,e){return e[0]<r[0]&&(r[0]=e[0]),e[2]>r[2]&&(r[2]=e[2]),e[1]<r[1]&&(r[1]=e[1]),e[3]>r[3]&&(r[3]=e[3]),r}function eo(r,e){e[0]<r[0]&&(r[0]=e[0]),e[0]>r[2]&&(r[2]=e[0]),e[1]<r[1]&&(r[1]=e[1]),e[1]>r[3]&&(r[3]=e[1])}function Bh(r,e,t,i,n){for(;t<i;t+=n)qg(r,e[t],e[t+1]);return r}function qg(r,e,t){r[0]=Math.min(r[0],e),r[1]=Math.min(r[1],t),r[2]=Math.max(r[2],e),r[3]=Math.max(r[3],t)}function Ss(r,e){var t;return t=e(ia(r)),t||(t=e(na(r)),t)||(t=e(ra(r)),t)||(t=e(Ti(r)),t)?t:!1}function Os(r){var e=0;return zs(r)||(e=Yt(r)*Ee(r)),e}function ia(r){return[r[0],r[1]]}function na(r){return[r[2],r[1]]}function Ei(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function Zg(r,e){var t;return e===Jr.BOTTOM_LEFT?t=ia(r):e===Jr.BOTTOM_RIGHT?t=na(r):e===Jr.TOP_LEFT?t=Ti(r):e===Jr.TOP_RIGHT?t=ra(r):lt(!1,13),t}function Is(r,e,t,i,n){var o=e*i[0]/2,a=e*i[1]/2,s=Math.cos(t),l=Math.sin(t),u=o*s,h=o*l,f=a*s,d=a*l,p=r[0],c=r[1],g=p-u+d,m=p-u-d,_=p+u-d,v=p+u+d,y=c-h-f,x=c-h+f,k=c+h+f,E=c+h-f;return Ae(Math.min(g,m,_,v),Math.min(y,x,k,E),Math.max(g,m,_,v),Math.max(y,x,k,E),n)}function Ee(r){return r[3]-r[1]}function mn(r,e,t){var i=t||we();return Ht(r,e)?(r[0]>e[0]?i[0]=r[0]:i[0]=e[0],r[1]>e[1]?i[1]=r[1]:i[1]=e[1],r[2]<e[2]?i[2]=r[2]:i[2]=e[2],r[3]<e[3]?i[3]=r[3]:i[3]=e[3]):Qr(i),i}function Ti(r){return[r[0],r[3]]}function ra(r){return[r[2],r[3]]}function Yt(r){return r[2]-r[0]}function Ht(r,e){return r[0]<=e[2]&&r[2]>=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function zs(r){return r[2]<r[0]||r[3]<r[1]}function Kg(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r}function Hg(r,e,t){var i=!1,n=Ts(r,e),o=Ts(r,t);if(n===ie.INTERSECTING||o===ie.INTERSECTING)i=!0;else{var a=r[0],s=r[1],l=r[2],u=r[3],h=e[0],f=e[1],d=t[0],p=t[1],c=(p-f)/(d-h),g=void 0,m=void 0;!!(o&ie.ABOVE)&&!(n&ie.ABOVE)&&(g=d-(p-u)/c,i=g>=a&&g<=l),!i&&!!(o&ie.RIGHT)&&!(n&ie.RIGHT)&&(m=p-(d-l)*c,i=m>=s&&m<=u),!i&&!!(o&ie.BELOW)&&!(n&ie.BELOW)&&(g=d-(p-s)/c,i=g>=a&&g<=l),!i&&!!(o&ie.LEFT)&&!(n&ie.LEFT)&&(m=p-(d-a)*c,i=m>=s&&m<=u)}return i}function $g(r,e,t,i){var n=[];if(i>1)for(var o=r[2]-r[0],a=r[3]-r[1],s=0;s<i;++s)n.push(r[0]+o*s/i,r[1],r[2],r[1]+a*s/i,r[2]-o*s/i,r[3],r[0],r[3]-a*s/i);else n=[r[0],r[1],r[2],r[1],r[2],r[3],r[0],r[3]];e(n,n,2);for(var l=[],u=[],s=0,h=n.length;s<h;s+=2)l.push(n[s]),u.push(n[s+1]);return Wg(l,u,t)}function Jg(r,e){var t=e.getExtent(),i=Ei(r);if(e.canWrapX()&&(i[0]<t[0]||i[0]>=t[2])){var n=Yt(t),o=Math.floor((i[0]-t[0])/n),a=o*n;r[0]-=a,r[2]-=a}return r}const I={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};var Uh=63710088e-1;function Vh(r,e,t){var i=t||Uh,n=hn(r[1]),o=hn(e[1]),a=(o-n)/2,s=hn(e[0]-r[0])/2,l=Math.sin(a)*Math.sin(a)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function oa(r,e){for(var t=0,i=r.length,n=r[i-1][0],o=r[i-1][1],a=0;a<i;a++){var s=r[a][0],l=r[a][1];t+=hn(s-n)*(2+Math.sin(hn(o))+Math.sin(hn(l))),n=s,o=l}return t*e*e/2}function Yh(r,e){var t=e||{},i=t.radius||Uh,n=t.projection||"EPSG:3857",o=r.getType();o!==I.GEOMETRY_COLLECTION&&(r=r.clone().transform(n,"EPSG:4326"));var a=0,s,l,u,h,f,d;switch(o){case I.POINT:case I.MULTI_POINT:case I.LINE_STRING:case I.MULTI_LINE_STRING:case I.LINEAR_RING:break;case I.POLYGON:{for(s=r.getCoordinates(),a=Math.abs(oa(s[0],i)),u=1,h=s.length;u<h;++u)a-=Math.abs(oa(s[u],i));break}case I.MULTI_POLYGON:{for(s=r.getCoordinates(),u=0,h=s.length;u<h;++u)for(l=s[u],a+=Math.abs(oa(l[0],i)),f=1,d=l.length;f<d;++f)a-=Math.abs(oa(l[f],i));break}case I.GEOMETRY_COLLECTION:{var p=r.getGeometries();for(u=0,h=p.length;u<h;++u)a+=Yh(p[u],e);break}default:throw new Error("Unsupported geometry type: "+o)}return a}function Qg(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function tm(r,e){var t=e.getRadius(),i=e.getCenter(),n=i[0],o=i[1],a=r[0],s=r[1],l=a-n,u=s-o;l===0&&u===0&&(l=1);var h=Math.sqrt(l*l+u*u),f=n+t*l/h,d=o+t*u/h;return[f,d]}function Rs(r,e){var t=r[0],i=r[1],n=e[0],o=e[1],a=n[0],s=n[1],l=o[0],u=o[1],h=l-a,f=u-s,d=h===0&&f===0?0:(h*(t-a)+f*(i-s))/(h*h+f*f||0),p,c;return d<=0?(p=a,c=s):d>=1?(p=l,c=u):(p=a+d*h,c=s+d*f),[p,c]}function Ye(r,e){for(var t=!0,i=r.length-1;i>=0;--i)if(r[i]!=e[i]){t=!1;break}return t}function Ps(r,e){var t=Math.cos(e),i=Math.sin(e),n=r[0]*t-r[1]*i,o=r[1]*t+r[0]*i;return r[0]=n,r[1]=o,r}function em(r,e){return r[0]*=e,r[1]*=e,r}function Xe(r,e){var t=r[0]-e[0],i=r[1]-e[1];return t*t+i*i}function Ms(r,e){return Math.sqrt(Xe(r,e))}function Xh(r,e){return Xe(r,Rs(r,e))}function Ls(r,e){if(e.canWrapX()){var t=Yt(e.getExtent()),i=im(r,e,t);i&&(r[0]-=i*t)}return r}function im(r,e,t){var i=e.getExtent(),n=0;if(e.canWrapX()&&(r[0]<i[0]||r[0]>i[2])){var o=t||Yt(i);n=Math.floor((r[0]-i[0])/o)}return n}function As(r,e,t){var i;if(e!==void 0){for(var n=0,o=r.length;n<o;++n)e[n]=r[n];i=e}else i=r.slice();return i}function Wh(r,e,t){if(e!==void 0&&r!==e){for(var i=0,n=r.length;i<n;++i)e[i]=r[i];r=e}return r}function nm(r){Yg(r.getCode(),r),ta(r,r,As)}function rm(r){r.forEach(nm)}function Wt(r){return typeof r=="string"?Vg(r):r||null}function aa(r,e,t,i){r=Wt(r);var n,o=r.getPointResolutionFunc();if(o){if(n=o(e,t),i&&i!==r.getUnits()){var a=r.getMetersPerUnit();a&&(n=n*a/Le[i])}}else{var s=r.getUnits();if(s==ke.DEGREES&&!i||i==ke.DEGREES)n=e;else{var l=Ds(r,Wt("EPSG:4326"));if(l===Wh&&s!==ke.DEGREES)n=e*r.getMetersPerUnit();else{var u=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];u=l(u,u,2);var h=Vh(u.slice(0,2),u.slice(2,4)),f=Vh(u.slice(4,6),u.slice(6,8));n=(h+f)/2}var a=i?Le[i]:r.getMetersPerUnit();a!==void 0&&(n/=a)}}return n}function qh(r){rm(r),r.forEach(function(e){r.forEach(function(t){e!==t&&ta(e,t,As)})})}function om(r,e,t,i){r.forEach(function(n){e.forEach(function(o){ta(n,o,t),ta(o,n,i)})})}function Fs(r,e){return r?typeof r=="string"?Wt(r):r:Wt(e)}function sa(r,e){return Ns(r,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function am(r,e){var t=Ns(r,e!==void 0?e:"EPSG:3857","EPSG:4326"),i=t[0];return(i<-180||i>180)&&(t[0]=wi(i+180,360)-180),t}function vn(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var i=Ds(r,e);return i===As&&t}function Ds(r,e){var t=r.getCode(),i=e.getCode(),n=Xg(t,i);return n||(n=Wh),n}function io(r,e){var t=Wt(r),i=Wt(e);return Ds(t,i)}function Ns(r,e,t){var i=io(e,t);return i(r,void 0,r.length)}function sm(r,e,t,i){var n=io(e,t);return $g(r,n,void 0,i)}var lm=null;function pr(){return lm}function _n(r,e){return r}function Ft(r,e){return r}function Gs(r,e){return r}function Ci(r,e){return r}function um(){qh(Fh),qh(Nh),om(Nh,Fh,Ng,Gg)}um();var Zh=new Array(6);function Ie(){return[1,0,0,1,0,0]}function Kh(r){return la(r,1,0,0,1,0,0)}function js(r,e){var t=r[0],i=r[1],n=r[2],o=r[3],a=r[4],s=r[5],l=e[0],u=e[1],h=e[2],f=e[3],d=e[4],p=e[5];return r[0]=t*l+n*u,r[1]=i*l+o*u,r[2]=t*h+n*f,r[3]=i*h+o*f,r[4]=t*d+n*p+a,r[5]=i*d+o*p+s,r}function la(r,e,t,i,n,o,a){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r[4]=o,r[5]=a,r}function hm(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Kt(r,e){var t=e[0],i=e[1];return e[0]=r[0]*t+r[2]*i+r[4],e[1]=r[1]*t+r[3]*i+r[5],e}function Bs(r,e,t){return js(r,la(Zh,e,0,0,t,0,0))}function fm(r,e,t){return la(r,e,0,0,t,0,0)}function dm(r,e,t){return js(r,la(Zh,1,0,0,1,e,t))}function We(r,e,t,i,n,o,a,s){var l=Math.sin(o),u=Math.cos(o);return r[0]=i*u,r[1]=n*l,r[2]=-i*l,r[3]=n*u,r[4]=a*i*u-s*i*l+e,r[5]=a*n*l+s*n*u+t,r}function Us(r,e){var t=pm(e);lt(t!==0,32);var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5];return r[0]=a/t,r[1]=-n/t,r[2]=-o/t,r[3]=i/t,r[4]=(o*l-a*s)/t,r[5]=-(i*l-n*s)/t,r}function pm(r){return r[0]*r[3]-r[1]*r[2]}var Hh;function $h(r){var e="matrix("+r.join(", ")+")";if(Ko)return e;var t=Hh||(Hh=document.createElement("div"));return t.style.transform=e,t.style.transform}var cm=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,gm=/^([a-z]*)$|^hsla?\(.*\)$/i;function Vs(r){return typeof r=="string"?r:Qh(r)}function mm(r){var e=document.createElement("div");if(e.style.color=r,e.style.color!==""){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}else return""}var vm=function(){var r=1024,e={},t=0;return function(i){var n;if(e.hasOwnProperty(i))n=e[i];else{if(t>=r){var o=0;for(var a in e)(o++&3)===0&&(delete e[a],--t)}n=_m(i),e[i]=n,++t}return n}}();function Ys(r){return Array.isArray(r)?r:vm(r)}function _m(r){var e,t,i,n,o;if(gm.exec(r)&&(r=mm(r)),cm.exec(r)){var a=r.length-1,s=void 0;a<=4?s=1:s=2;var l=a===4||a===8;e=parseInt(r.substr(1+0*s,s),16),t=parseInt(r.substr(1+1*s,s),16),i=parseInt(r.substr(1+2*s,s),16),l?n=parseInt(r.substr(1+3*s,s),16):n=255,s==1&&(e=(e<<4)+e,t=(t<<4)+t,i=(i<<4)+i,l&&(n=(n<<4)+n)),o=[e,t,i,n/255]}else r.indexOf("rgba(")==0?(o=r.slice(5,-1).split(",").map(Number),Jh(o)):r.indexOf("rgb(")==0?(o=r.slice(4,-1).split(",").map(Number),o.push(1),Jh(o)):lt(!1,14);return o}function Jh(r){return r[0]=Zt(r[0]+.5|0,0,255),r[1]=Zt(r[1]+.5|0,0,255),r[2]=Zt(r[2]+.5|0,0,255),r[3]=Zt(r[3],0,1),r}function Qh(r){var e=r[0];e!=(e|0)&&(e=e+.5|0);var t=r[1];t!=(t|0)&&(t=t+.5|0);var i=r[2];i!=(i|0)&&(i=i+.5|0);var n=r[3]===void 0?1:r[3];return"rgba("+e+","+t+","+i+","+n+")"}var ym=function(){function r(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return r.prototype.clear=function(){this.cache_={},this.cacheSize_=0},r.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},r.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var i=this.cache_[t];(e++&3)===0&&!i.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}},r.prototype.get=function(e,t,i){var n=tf(e,t,i);return n in this.cache_?this.cache_[n]:null},r.prototype.set=function(e,t,i,n){var o=tf(e,t,i);this.cache_[o]=n,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function tf(r,e,t){var i=t?Vs(t):"null";return e+":"+r+":"+i}var ua=new ym,xm=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),bm=function(r){xm(e,r);function e(t){var i=r.call(this)||this;return i.map_=t,i}return e.prototype.dispatchRenderEvent=function(t,i){$()},e.prototype.calculateMatrices2D=function(t){var i=t.viewState,n=t.coordinateToPixelTransform,o=t.pixelToCoordinateTransform;We(n,t.size[0]/2,t.size[1]/2,1/i.resolution,-1/i.resolution,-i.rotation,-i.center[0],-i.center[1]),Us(o,n)},e.prototype.forEachFeatureAtCoordinate=function(t,i,n,o,a,s,l,u){var h,f=i.viewState;function d(B,Y,X,et){return a.call(s,Y,B?X:null,et)}var p=f.projection,c=Ls(t.slice(),p),g=[[0,0]];if(p.canWrapX()&&o){var m=p.getExtent(),_=Yt(m);g.push([-_,0],[_,0])}for(var v=i.layerStatesArray,y=v.length,x=[],k=[],E=0;E<g.length;E++)for(var T=y-1;T>=0;--T){var w=v[T],C=w.layer;if(C.hasRenderer()&&$o(w,f)&&l.call(u,C)){var R=C.getRenderer(),P=C.getSource();if(R&&P){var M=P.getWrapX()?c:t,L=d.bind(null,w.managed);k[0]=M[0]+g[E][0],k[1]=M[1]+g[E][1],h=R.forEachFeatureAtCoordinate(k,i,n,L,x)}if(h)return h}}if(x.length!==0){var U=1/x.length;return x.forEach(function(B,Y){return B.distanceSq+=Y*U}),x.sort(function(B,Y){return B.distanceSq-Y.distanceSq}),x.some(function(B){return h=B.callback(B.feature,B.layer,B.geometry)}),h}},e.prototype.forEachLayerAtPixel=function(t,i,n,o,a){return $()},e.prototype.hasFeatureAtCoordinate=function(t,i,n,o,a,s){var l=this.forEachFeatureAtCoordinate(t,i,n,o,ki,this,a,s);return l!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){$()},e.prototype.scheduleExpireIconCache=function(t){ua.canExpireCache()&&t.postRenderFunctions.push(km)},e}(gs);function km(r,e){ua.expire()}const wm=bm;var Em=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Tm=function(r){Em(e,r);function e(t,i,n,o){var a=r.call(this,t)||this;return a.inversePixelTransform=i,a.frameState=n,a.context=o,a}return e}(je);const ef=Tm;var nf="10px sans-serif",ti="#000",ha="round",no=[],ro=0,cr="round",oo=10,ao="#000",so="center",fa="middle",yn=[0,0,0,0],lo=1,ei=new Ue,Cm=new or;Cm.setSize=function(){console.warn("labelCache is deprecated.")};var gr=null,Xs,Ws={},Sm=function(){var r=100,e="32px ",t=["monospace","serif"],i=t.length,n="wmytzilWMYTZIL@#/&?$%10\uF013",o,a;function s(u,h,f){for(var d=!0,p=0;p<i;++p){var c=t[p];if(a=da(u+" "+h+" "+e+c,n),f!=c){var g=da(u+" "+h+" "+e+f+","+c,n);d=d&&g!=a}}return!!d}function l(){for(var u=!0,h=ei.getKeys(),f=0,d=h.length;f<d;++f){var p=h[f];ei.get(p)<r&&(s.apply(this,p.split(`
30
- `))?(Zr(Ws),gr=null,Xs=void 0,ei.set(p,r)):(ei.set(p,ei.get(p)+1,!0),u=!1))}u&&(clearInterval(o),o=void 0)}return function(u){var h=Ih(u);if(!!h)for(var f=h.families,d=0,p=f.length;d<p;++d){var c=f[d],g=h.style+`
31
- `+h.weight+`
32
- `+c;ei.get(g)===void 0&&(ei.set(g,r,!0),s(h.style,h.weight,c)||(ei.set(g,0,!0),o===void 0&&(o=setInterval(l,32))))}}}(),Om=function(){var r;return function(e){var t=Ws[e];if(t==null){if(Ko){var i=Ih(e),n=rf(e,"\u017Dg"),o=isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight);t=o*(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=e,document.body.appendChild(r),t=r.offsetHeight,document.body.removeChild(r);Ws[e]=t}return t}}();function rf(r,e){return gr||(gr=be(1,1)),r!=Xs&&(gr.font=r,Xs=gr.font),gr.measureText(e)}function da(r,e){return rf(r,e).width}function of(r,e,t){if(e in t)return t[e];var i=da(r,e);return t[e]=i,i}function Im(r,e,t){for(var i=e.length,n=0,o=0;o<i;++o){var a=da(r,e[o]);n=Math.max(n,a),t.push(a)}return n}function zm(r,e,t,i,n,o,a,s,l,u,h){r.save(),t!==1&&(r.globalAlpha*=t),e&&r.setTransform.apply(r,e),i.contextInstructions?(r.translate(l,u),r.scale(h[0],h[1]),Rm(i,r)):h[0]<0||h[1]<0?(r.translate(l,u),r.scale(h[0],h[1]),r.drawImage(i,n,o,a,s,0,0,a,s)):r.drawImage(i,n,o,a,s,l,u,a*h[0],s*h[1]),r.restore()}function Rm(r,e){for(var t=r.contextInstructions,i=0,n=t.length;i<n;i+=2)Array.isArray(t[i+1])?e[t[i]].apply(e,t[i+1]):e[t[i]]=t[i+1]}var Pm=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Mm=function(r){Pm(e,r);function e(t){var i=r.call(this,t)||this;i.fontChangeListenerKey_=vt(ei,rn.PROPERTYCHANGE,t.redrawText.bind(t)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className=Hr+" ol-layers";var o=t.getViewport();return o.insertBefore(i.element_,o.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return e.prototype.dispatchRenderEvent=function(t,i){var n=this.getMap();if(n.hasListener(t)){var o=new ef(t,void 0,i);n.dispatchEvent(o)}},e.prototype.disposeInternal=function(){Lt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),r.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(fn.PRECOMPOSE,t);var i=t.layerStatesArray.sort(function(d,p){return d.zIndex-p.zIndex}),n=t.viewState;this.children_.length=0;for(var o=[],a=null,s=0,l=i.length;s<l;++s){var u=i[s];if(t.layerIndex=s,!(!$o(u,n)||u.sourceState!=dn.READY&&u.sourceState!=dn.UNDEFINED)){var h=u.layer,f=h.render(t,a);!f||(f!==a&&(this.children_.push(f),a=f),"getDeclutter"in h&&o.push(h))}}for(var s=o.length-1;s>=0;--s)o[s].renderDeclutter(t);lg(this.element_,this.children_),this.dispatchRenderEvent(fn.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)},e.prototype.forEachLayerAtPixel=function(t,i,n,o,a){for(var s=i.viewState,l=i.layerStatesArray,u=l.length,h=u-1;h>=0;--h){var f=l[h],d=f.layer;if(d.hasRenderer()&&$o(f,s)&&a(d)){var p=d.getRenderer(),c=p.getDataAtPixel(t,i,n);if(c){var g=o(d,c);if(g)return g}}}},e}(wm);const Lm=Mm,le={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};var Am=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),qs={LAYERS:"layers"},Fm=function(r){Am(e,r);function e(t){var i=this,n=t||{},o=qt({},n);delete o.layers;var a=n.layers;return i=r.call(this,o)||this,i.on,i.once,i.un,i.layersListenerKeys_=[],i.listenerKeys_={},i.addChangeListener(qs.LAYERS,i.handleLayersChanged_),a?Array.isArray(a)?a=new me(a.slice(),{unique:!0}):lt(typeof a.getArray=="function",43):a=new me(void 0,{unique:!0}),i.setLayers(a),i}return e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Lt),this.layersListenerKeys_.length=0;var t=this.getLayers();this.layersListenerKeys_.push(vt(t,ee.ADD,this.handleLayersAdd_,this),vt(t,ee.REMOVE,this.handleLayersRemove_,this));for(var i in this.listenerKeys_)this.listenerKeys_[i].forEach(Lt);Zr(this.listenerKeys_);for(var n=t.getArray(),o=0,a=n.length;o<a;o++){var s=n[o];this.listenerKeys_[Z(s)]=[vt(s,rn.PROPERTYCHANGE,this.handleLayerChange_,this),vt(s,H.CHANGE,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var i=t.element;this.listenerKeys_[Z(i)]=[vt(i,rn.PROPERTYCHANGE,this.handleLayerChange_,this),vt(i,H.CHANGE,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var i=t.element,n=Z(i);this.listenerKeys_[n].forEach(Lt),delete this.listenerKeys_[n],this.changed()},e.prototype.getLayers=function(){return this.get(qs.LAYERS)},e.prototype.setLayers=function(t){this.set(qs.LAYERS,t)},e.prototype.getLayersArray=function(t){var i=t!==void 0?t:[];return this.getLayers().forEach(function(n){n.getLayersArray(i)}),i},e.prototype.getLayerStatesArray=function(t){var i=t!==void 0?t:[],n=i.length;this.getLayers().forEach(function(h){h.getLayerStatesArray(i)});var o=this.getLayerState(),a=o.zIndex;!t&&o.zIndex===void 0&&(a=0);for(var s=n,l=i.length;s<l;s++){var u=i[s];u.opacity*=o.opacity,u.visible=u.visible&&o.visible,u.maxResolution=Math.min(u.maxResolution,o.maxResolution),u.minResolution=Math.max(u.minResolution,o.minResolution),u.minZoom=Math.max(u.minZoom,o.minZoom),u.maxZoom=Math.min(u.maxZoom,o.maxZoom),o.extent!==void 0&&(u.extent!==void 0?u.extent=mn(u.extent,o.extent):u.extent=o.extent),u.zIndex===void 0&&(u.zIndex=a)}return i},e.prototype.getSourceState=function(){return dn.READY},e}(Rh);const Dm=Fm;var Nm=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Gm=function(r){Nm(e,r);function e(t,i,n){var o=r.call(this,t)||this;return o.map=i,o.frameState=n!==void 0?n:null,o}return e}(je);const pa=Gm;var jm=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Bm=function(r){jm(e,r);function e(t,i,n,o,a){var s=r.call(this,t,i,a)||this;return s.originalEvent=n,s.pixel_=null,s.coordinate_=null,s.dragging=o!==void 0?o:!1,s}return Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){r.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){r.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(pa);const ii=Bm,ct={SINGLECLICK:"singleclick",CLICK:H.CLICK,DBLCLICK:H.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};var Um=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Vm=function(r){Um(e,r);function e(t,i){var n=r.call(this,t)||this;n.map_=t,n.clickTimeoutId_,n.emulateClicks_=!1,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=i===void 0?1:i,n.down_=null;var o=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=o,n.pointerdownListenerKey_=vt(o,bs.POINTERDOWN,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=vt(o,bs.POINTERMOVE,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(H.TOUCHMOVE,n.boundHandleTouchMove_,Th?{passive:!1}:!1),n}return e.prototype.emulateClick_=function(t){var i=new ii(ct.CLICK,this.map_,t);this.dispatchEvent(i),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,i=new ii(ct.DBLCLICK,this.map_,t),this.dispatchEvent(i)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var n=new ii(ct.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var i=t;i.type==ct.POINTERUP||i.type==ct.POINTERCANCEL?delete this.trackedTouches_[i.pointerId]:i.type==ct.POINTERDOWN&&(this.trackedTouches_[i.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var i=new ii(ct.POINTERUP,this.map_,t);this.dispatchEvent(i),this.emulateClicks_&&!i.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_===0&&(this.dragListenerKeys_.forEach(Lt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return t.button===0},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=this.activePointers_===0,this.updateActivePointers_(t);var i=new ii(ct.POINTERDOWN,this.map_,t);this.dispatchEvent(i),this.down_={};for(var n in t){var o=t[n];this.down_[n]=typeof o=="function"?sn:o}if(this.dragListenerKeys_.length===0){var a=this.map_.getOwnerDocument();this.dragListenerKeys_.push(vt(a,ct.POINTERMOVE,this.handlePointerMove_,this),vt(a,ct.POINTERUP,this.handlePointerUp_,this),vt(this.element_,ct.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==a&&this.dragListenerKeys_.push(vt(this.element_.getRootNode(),ct.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var i=new ii(ct.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(i)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var i=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new ii(t.type,this.map_,t,i))},e.prototype.handleTouchMove_=function(t){var i=this.originalPointerMoveEvent_;(!i||i.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Lt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(H.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Lt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Lt),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},e}(or);const Ym=Vm;var ca=1/0,Xm=function(){function r(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return r.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,Zr(this.queuedElements_)},r.prototype.dequeue=function(){var e=this.elements_,t=this.priorities_,i=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},r.prototype.enqueue=function(e){lt(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=ca?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1},r.prototype.getCount=function(){return this.elements_.length},r.prototype.getLeftChildIndex_=function(e){return e*2+1},r.prototype.getRightChildIndex_=function(e){return e*2+2},r.prototype.getParentIndex_=function(e){return e-1>>1},r.prototype.heapify_=function(){var e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)},r.prototype.isEmpty=function(){return this.elements_.length===0},r.prototype.isKeyQueued=function(e){return e in this.queuedElements_},r.prototype.isQueued=function(e){return this.isKeyQueued(this.keyFunction_(e))},r.prototype.siftUp_=function(e){for(var t=this.elements_,i=this.priorities_,n=t.length,o=t[e],a=i[e],s=e;e<n>>1;){var l=this.getLeftChildIndex_(e),u=this.getRightChildIndex_(e),h=u<n&&i[u]<i[l]?u:l;t[e]=t[h],i[e]=i[h],e=h}t[e]=o,i[e]=a,this.siftDown_(s,e)},r.prototype.siftDown_=function(e,t){for(var i=this.elements_,n=this.priorities_,o=i[t],a=n[t];t>e;){var s=this.getParentIndex_(t);if(n[s]>a)i[t]=i[s],n[t]=n[s],t=s;else break}i[t]=o,n[t]=a},r.prototype.reprioritize=function(){var e=this.priorityFunction_,t=this.elements_,i=this.priorities_,n=0,o=t.length,a,s,l;for(s=0;s<o;++s)a=t[s],l=e(a),l==ca?delete this.queuedElements_[this.keyFunction_(a)]:(i[n]=l,t[n++]=a);t.length=n,i.length=n,this.heapify_()},r}();const Wm=Xm,G={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var qm=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Zm=function(r){qm(e,r);function e(t,i){var n=r.call(this,function(o){return t.apply(null,o)},function(o){return o[0].getKey()})||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return e.prototype.enqueue=function(t){var i=r.prototype.enqueue.call(this,t);if(i){var n=t[0];n.addEventListener(H.CHANGE,this.boundHandleTileChange_)}return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var i=t.target,n=i.getState();if(n===G.LOADED||n===G.ERROR||n===G.EMPTY){i.removeEventListener(H.CHANGE,this.boundHandleTileChange_);var o=i.getKey();o in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[o],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,i){for(var n=0,o,a,s;this.tilesLoading_<t&&n<i&&this.getCount()>0;)a=this.dequeue()[0],s=a.getKey(),o=a.getState(),o===G.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,a.load())},e}(Wm);const Km=Zm;function Hm(r,e,t,i,n){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return ca;var o=r.viewState.center,a=i[0]-o[0],s=i[1]-o[1];return 65536*Math.log(n)+Math.sqrt(a*a+s*s)/n}const Xt={ANIMATING:0,INTERACTING:1},qe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var $m=42,Zs=256;function af(r,e,t){return function(i,n,o,a,s){if(i){var l=e?0:o[0]*n,u=e?0:o[1]*n,h=s?s[0]:0,f=s?s[1]:0,d=r[0]+l/2+h,p=r[2]-l/2+h,c=r[1]+u/2+f,g=r[3]-u/2+f;d>p&&(d=(p+d)/2,p=d),c>g&&(c=(g+c)/2,g=c);var m=Zt(i[0],d,p),_=Zt(i[1],c,g),v=30*n;return a&&t&&(m+=-v*Math.log(1+Math.max(0,d-i[0])/v)+v*Math.log(1+Math.max(0,i[0]-p)/v),_+=-v*Math.log(1+Math.max(0,c-i[1])/v)+v*Math.log(1+Math.max(0,i[1]-g)/v)),[m,_]}else return}}function Jm(r){return r}function Ks(r,e,t,i){var n=Yt(e)/t[0],o=Ee(e)/t[1];return i?Math.min(r,Math.max(n,o)):Math.min(r,Math.min(n,o))}function Hs(r,e,t){var i=Math.min(r,e),n=50;return i*=Math.log(1+n*Math.max(0,r/e-1))/n+1,t&&(i=Math.max(i,t),i/=Math.log(1+n*Math.max(0,t/r-1))/n+1),Zt(i,t/2,e*2)}function Qm(r,e,t,i){return function(n,o,a,s){if(n!==void 0){var l=r[0],u=r[r.length-1],h=t?Ks(l,t,a,i):l;if(s){var f=e!==void 0?e:!0;return f?Hs(n,h,u):Zt(n,u,h)}var d=Math.min(h,n),p=Math.floor(ms(r,d,o));return r[p]>h&&p<r.length-1?r[p+1]:r[p]}else return}}function tv(r,e,t,i,n,o){return function(a,s,l,u){if(a!==void 0){var h=n?Ks(e,n,l,o):e,f=t!==void 0?t:0;if(u){var d=i!==void 0?i:!0;return d?Hs(a,h,f):Zt(a,f,h)}var p=1e-9,c=Math.ceil(Math.log(e/h)/Math.log(r)-p),g=-s*(.5-p)+.5,m=Math.min(h,a),_=Math.floor(Math.log(e/m)/Math.log(r)+g),v=Math.max(c,_),y=e/Math.pow(r,v);return Zt(y,f,h)}else return}}function sf(r,e,t,i,n){return function(o,a,s,l){if(o!==void 0){var u=i?Ks(r,i,s,n):r,h=t!==void 0?t:!0;return!h||!l?Zt(o,e,u):Hs(o,u,e)}else return}}function $s(r){if(r!==void 0)return 0}function lf(r){if(r!==void 0)return r}function ev(r){var e=2*Math.PI/r;return function(t,i){if(i)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t}}function iv(r){var e=r||hn(5);return function(t,i){if(i)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}const Rt={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function Si(r,e,t,i,n,o){for(var a=o||[],s=0,l=e;l<t;l+=i){var u=r[l],h=r[l+1];a[s++]=n[0]*u+n[2]*h+n[4],a[s++]=n[1]*u+n[3]*h+n[5]}return o&&a.length!=s&&(a.length=s),a}function Js(r,e,t,i,n,o,a){for(var s=a||[],l=Math.cos(n),u=Math.sin(n),h=o[0],f=o[1],d=0,p=e;p<t;p+=i){var c=r[p]-h,g=r[p+1]-f;s[d++]=h+c*l-g*u,s[d++]=f+c*u+g*l;for(var m=p+2;m<p+i;++m)s[d++]=r[m]}return a&&s.length!=d&&(s.length=d),s}function nv(r,e,t,i,n,o,a,s){for(var l=s||[],u=a[0],h=a[1],f=0,d=e;d<t;d+=i){var p=r[d]-u,c=r[d+1]-h;l[f++]=u+n*p,l[f++]=h+o*c;for(var g=d+2;g<d+i;++g)l[f++]=r[g]}return s&&l.length!=f&&(l.length=f),l}function uf(r,e,t,i,n,o,a){for(var s=a||[],l=0,u=e;u<t;u+=i){s[l++]=r[u]+n,s[l++]=r[u+1]+o;for(var h=u+2;h<u+i;++h)s[l++]=r[h]}return a&&s.length!=l&&(s.length=l),s}var rv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),hf=Ie(),ov=function(r){rv(e,r);function e(){var t=r.call(this)||this;return t.extent_=we(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=Kc(function(i,n,o){if(!o)return this.getSimplifiedGeometry(n);var a=this.clone();return a.applyTransform(o),a.getSimplifiedGeometry(n)}),t}return e.prototype.simplifyTransformed=function(t,i){return this.simplifyTransformedInternal(this.getRevision(),t,i)},e.prototype.clone=function(){return $()},e.prototype.closestPointXY=function(t,i,n,o){return $()},e.prototype.containsXY=function(t,i){var n=this.getClosestPoint([t,i]);return n[0]===t&&n[1]===i},e.prototype.getClosestPoint=function(t,i){var n=i||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return $()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var i=this.computeExtent(this.extent_);(isNaN(i[0])||isNaN(i[1]))&&Qr(i),this.extentRevision_=this.getRevision()}return Kg(this.extent_,t)},e.prototype.rotate=function(t,i){$()},e.prototype.scale=function(t,i,n){$()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return $()},e.prototype.getType=function(){return $()},e.prototype.applyTransform=function(t){$()},e.prototype.intersectsExtent=function(t){return $()},e.prototype.translate=function(t,i){$()},e.prototype.transform=function(t,i){var n=Wt(t),o=n.getUnits()==ke.TILE_PIXELS?function(a,s,l){var u=n.getExtent(),h=n.getWorldExtent(),f=Ee(h)/Ee(u);return We(hf,h[0],h[3],f,-f,0,0,0),Si(a,0,a.length,l,hf,s),io(n,i)(a,s,l)}:io(n,i);return this.applyTransform(o),this},e}(Ue);const ff=ov;var av=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),sv=function(r){av(e,r);function e(){var t=r.call(this)||this;return t.layout=Rt.XY,t.stride=2,t.flatCoordinates=null,t}return e.prototype.computeExtent=function(t){return Cs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return $()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var i=this.getSimplifiedGeometryInternal(t),n=i.getFlatCoordinates();return n.length<this.flatCoordinates.length?i:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,i){this.stride=df(t),this.layout=t,this.flatCoordinates=i},e.prototype.setCoordinates=function(t,i){$()},e.prototype.setLayout=function(t,i,n){var o;if(t)o=df(t);else{for(var a=0;a<n;++a)if(i.length===0){this.layout=Rt.XY,this.stride=2;return}else i=i[0];o=i.length,t=lv(o)}this.layout=t,this.stride=o},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,i){var n=this.getFlatCoordinates();if(n){var o=this.getStride();Js(n,0,n.length,o,t,i,n),this.changed()}},e.prototype.scale=function(t,i,n){var o=i;o===void 0&&(o=t);var a=n;a||(a=Ei(this.getExtent()));var s=this.getFlatCoordinates();if(s){var l=this.getStride();nv(s,0,s.length,l,t,o,a,s),this.changed()}},e.prototype.translate=function(t,i){var n=this.getFlatCoordinates();if(n){var o=this.getStride();uf(n,0,n.length,o,t,i,n),this.changed()}},e}(ff);function lv(r){var e;return r==2?e=Rt.XY:r==3?e=Rt.XYZ:r==4&&(e=Rt.XYZM),e}function df(r){var e;return r==Rt.XY?e=2:r==Rt.XYZ||r==Rt.XYM?e=3:r==Rt.XYZM&&(e=4),e}function uv(r,e,t){var i=r.getFlatCoordinates();if(i){var n=r.getStride();return Si(i,0,i.length,n,e,t)}else return null}const Oi=sv;function pf(r,e,t,i,n,o,a){var s=r[e],l=r[e+1],u=r[t]-s,h=r[t+1]-l,f;if(u===0&&h===0)f=e;else{var d=((n-s)*u+(o-l)*h)/(u*u+h*h);if(d>1)f=t;else if(d>0){for(var p=0;p<i;++p)a[p]=Qe(r[e+p],r[t+p],d);a.length=i;return}else f=e}for(var p=0;p<i;++p)a[p]=r[f+p];a.length=i}function Qs(r,e,t,i,n){var o=r[e],a=r[e+1];for(e+=i;e<t;e+=i){var s=r[e],l=r[e+1],u=un(o,a,s,l);u>n&&(n=u),o=s,a=l}return n}function tl(r,e,t,i,n){for(var o=0,a=t.length;o<a;++o){var s=t[o];n=Qs(r,e,s,i,n),e=s}return n}function hv(r,e,t,i,n){for(var o=0,a=t.length;o<a;++o){var s=t[o];n=tl(r,e,s,i,n),e=s[s.length-1]}return n}function el(r,e,t,i,n,o,a,s,l,u,h){if(e==t)return u;var f,d;if(n===0)if(d=un(a,s,r[e],r[e+1]),d<u){for(f=0;f<i;++f)l[f]=r[e+f];return l.length=i,d}else return u;for(var p=h||[NaN,NaN],c=e+i;c<t;)if(pf(r,c-i,c,i,a,s,p),d=un(a,s,p[0],p[1]),d<u){for(u=d,f=0;f<i;++f)l[f]=p[f];l.length=i,c+=i}else c+=i*Math.max((Math.sqrt(d)-Math.sqrt(u))/n|0,1);if(o&&(pf(r,t-i,e,i,a,s,p),d=un(a,s,p[0],p[1]),d<u)){for(u=d,f=0;f<i;++f)l[f]=p[f];l.length=i}return u}function il(r,e,t,i,n,o,a,s,l,u,h){for(var f=h||[NaN,NaN],d=0,p=t.length;d<p;++d){var c=t[d];u=el(r,e,c,i,n,o,a,s,l,u,f),e=c}return u}function fv(r,e,t,i,n,o,a,s,l,u,h){for(var f=h||[NaN,NaN],d=0,p=t.length;d<p;++d){var c=t[d];u=il(r,e,c,i,n,o,a,s,l,u,f),e=c[c.length-1]}return u}function cf(r,e,t,i){for(var n=0,o=t.length;n<o;++n)r[e++]=t[n];return e}function ga(r,e,t,i){for(var n=0,o=t.length;n<o;++n)for(var a=t[n],s=0;s<i;++s)r[e++]=a[s];return e}function nl(r,e,t,i,n){for(var o=n||[],a=0,s=0,l=t.length;s<l;++s){var u=ga(r,e,t[s],i);o[a++]=u,e=u}return o.length=a,o}function dv(r,e,t,i,n){for(var o=n||[],a=0,s=0,l=t.length;s<l;++s){var u=nl(r,e,t[s],i,o[a]);o[a++]=u,e=u[u.length-1]}return o.length=a,o}function rl(r,e,t,i,n,o,a){var s=(t-e)/i;if(s<3){for(;e<t;e+=i)o[a++]=r[e],o[a++]=r[e+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u=[e,t-i],h=0;u.length>0;){for(var f=u.pop(),d=u.pop(),p=0,c=r[d],g=r[d+1],m=r[f],_=r[f+1],v=d+i;v<f;v+=i){var y=r[v],x=r[v+1],k=mg(y,x,c,g,m,_);k>p&&(h=v,p=k)}p>n&&(l[(h-e)/i]=1,d+i<h&&u.push(d,h),h+i<f&&u.push(h,f))}for(var v=0;v<s;++v)l[v]&&(o[a++]=r[e+v*i],o[a++]=r[e+v*i+1]);return a}function pv(r,e,t,i,n,o,a,s){for(var l=0,u=t.length;l<u;++l){var h=t[l];a=rl(r,e,h,i,n,o,a),s.push(a),e=h}return a}function xn(r,e){return e*Math.round(r/e)}function cv(r,e,t,i,n,o,a){if(e==t)return a;var s=xn(r[e],n),l=xn(r[e+1],n);e+=i,o[a++]=s,o[a++]=l;var u,h;do if(u=xn(r[e],n),h=xn(r[e+1],n),e+=i,e==t)return o[a++]=u,o[a++]=h,a;while(u==s&&h==l);for(;e<t;){var f=xn(r[e],n),d=xn(r[e+1],n);if(e+=i,!(f==u&&d==h)){var p=u-s,c=h-l,g=f-s,m=d-l;if(p*m==c*g&&(p<0&&g<p||p==g||p>0&&g>p)&&(c<0&&m<c||c==m||c>0&&m>c)){u=f,h=d;continue}o[a++]=u,o[a++]=h,s=u,l=h,u=f,h=d}}return o[a++]=u,o[a++]=h,a}function gf(r,e,t,i,n,o,a,s){for(var l=0,u=t.length;l<u;++l){var h=t[l];a=cv(r,e,h,i,n,o,a),s.push(a),e=h}return a}function gv(r,e,t,i,n,o,a,s){for(var l=0,u=t.length;l<u;++l){var h=t[l],f=[];a=gf(r,e,h,i,n,o,a,f),s.push(f),e=h[h.length-1]}return a}function Ii(r,e,t,i,n){for(var o=n!==void 0?n:[],a=0,s=e;s<t;s+=i)o[a++]=r.slice(s,s+i);return o.length=a,o}function uo(r,e,t,i,n){for(var o=n!==void 0?n:[],a=0,s=0,l=t.length;s<l;++s){var u=t[s];o[a++]=Ii(r,e,u,i,o[a]),e=u}return o.length=a,o}function ol(r,e,t,i,n){for(var o=n!==void 0?n:[],a=0,s=0,l=t.length;s<l;++s){var u=t[s];o[a++]=uo(r,e,u,i,o[a]),e=u[u.length-1]}return o.length=a,o}function mf(r,e,t,i){for(var n=0,o=r[t-i],a=r[t-i+1];e<t;e+=i){var s=r[e],l=r[e+1];n+=a*s-o*l,o=s,a=l}return n/2}function vf(r,e,t,i){for(var n=0,o=0,a=t.length;o<a;++o){var s=t[o];n+=mf(r,e,s,i),e=s}return n}function mv(r,e,t,i){for(var n=0,o=0,a=t.length;o<a;++o){var s=t[o];n+=vf(r,e,s,i),e=s[s.length-1]}return n}var vv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),_v=function(r){vv(e,r);function e(t,i){var n=r.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,i!==void 0&&!Array.isArray(t[0])?n.setFlatCoordinates(i,t):n.setCoordinates(t,i),n}return e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,i,n,o){return o<cn(this.getExtent(),t,i)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),el(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,i,n,o))},e.prototype.getArea=function(){return mf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Ii(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=rl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Rt.XY)},e.prototype.getType=function(){return I.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ga(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Oi);const _f=_v;var yv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),xv=function(r){yv(e,r);function e(t,i){var n=r.call(this)||this;return n.setCoordinates(t,i),n}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){var a=this.flatCoordinates,s=un(t,i,a[0],a[1]);if(s<o){for(var l=this.stride,u=0;u<l;++u)n[u]=a[u];return n.length=l,s}else return o},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return to(this.flatCoordinates,t)},e.prototype.getType=function(){return I.POINT},e.prototype.intersectsExtent=function(t){return Es(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=cf(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Oi);const Fe=xv;function bv(r,e,t,i,n){var o=Ss(n,function(a){return!bn(r,e,t,i,a[0],a[1])});return!o}function bn(r,e,t,i,n,o){for(var a=0,s=r[t-i],l=r[t-i+1];e<t;e+=i){var u=r[e],h=r[e+1];l<=o?h>o&&(u-s)*(o-l)-(n-s)*(h-l)>0&&a++:h<=o&&(u-s)*(o-l)-(n-s)*(h-l)<0&&a--,s=u,l=h}return a!==0}function al(r,e,t,i,n,o){if(t.length===0||!bn(r,e,t[0],i,n,o))return!1;for(var a=1,s=t.length;a<s;++a)if(bn(r,t[a-1],t[a],i,n,o))return!1;return!0}function kv(r,e,t,i,n,o){if(t.length===0)return!1;for(var a=0,s=t.length;a<s;++a){var l=t[a];if(al(r,e,l,i,n,o))return!0;e=l[l.length-1]}return!1}function sl(r,e,t,i,n,o,a){for(var s,l,u,h,f,d,p,c=n[o+1],g=[],m=0,_=t.length;m<_;++m){var v=t[m];for(h=r[v-i],d=r[v-i+1],s=e;s<v;s+=i)f=r[s],p=r[s+1],(c<=d&&p<=c||d<=c&&c<=p)&&(u=(c-d)/(p-d)*(f-h)+h,g.push(u)),h=f,d=p}var y=NaN,x=-1/0;for(g.sort(on),h=g[0],s=1,l=g.length;s<l;++s){f=g[s];var k=Math.abs(f-h);k>x&&(u=(h+f)/2,al(r,e,t,i,u,c)&&(y=u,x=k)),h=f}return isNaN(y)&&(y=n[o]),a?(a.push(y,c,x),a):[y,c,x]}function yf(r,e,t,i,n){for(var o=[],a=0,s=t.length;a<s;++a){var l=t[a];o=sl(r,e,l,i,n,2*a,o),e=l[l.length-1]}return o}function xf(r,e,t,i,n){var o;for(e+=i;e<t;e+=i)if(o=n(r.slice(e-i,e),r.slice(e,e+i)),o)return o;return!1}function ma(r,e,t,i,n){var o=Bh(we(),r,e,t,i);return Ht(n,o)?gn(n,o)||o[0]>=n[0]&&o[2]<=n[2]||o[1]>=n[1]&&o[3]<=n[3]?!0:xf(r,e,t,i,function(a,s){return Hg(n,a,s)}):!1}function wv(r,e,t,i,n){for(var o=0,a=t.length;o<a;++o){if(ma(r,e,t[o],i,n))return!0;e=t[o]}return!1}function Ev(r,e,t,i,n){return!!(ma(r,e,t,i,n)||bn(r,e,t,i,n[0],n[1])||bn(r,e,t,i,n[0],n[3])||bn(r,e,t,i,n[2],n[1])||bn(r,e,t,i,n[2],n[3]))}function bf(r,e,t,i,n){if(!Ev(r,e,t[0],i,n))return!1;if(t.length===1)return!0;for(var o=1,a=t.length;o<a;++o)if(bv(r,t[o-1],t[o],i,n)&&!ma(r,t[o-1],t[o],i,n))return!1;return!0}function Tv(r,e,t,i,n){for(var o=0,a=t.length;o<a;++o){var s=t[o];if(bf(r,e,s,i,n))return!0;e=s[s.length-1]}return!1}function Cv(r,e,t,i){for(;e<t-i;){for(var n=0;n<i;++n){var o=r[e+n];r[e+n]=r[t-i+n],r[t-i+n]=o}e+=i,t-=i}}function ll(r,e,t,i){for(var n=0,o=r[t-i],a=r[t-i+1];e<t;e+=i){var s=r[e],l=r[e+1];n+=(s-o)*(l+a),o=s,a=l}return n===0?void 0:n>0}function kf(r,e,t,i,n){for(var o=n!==void 0?n:!1,a=0,s=t.length;a<s;++a){var l=t[a],u=ll(r,e,l,i);if(a===0){if(o&&u||!o&&!u)return!1}else if(o&&!u||!o&&u)return!1;e=l}return!0}function Sv(r,e,t,i,n){for(var o=0,a=t.length;o<a;++o){var s=t[o];if(!kf(r,e,s,i,n))return!1;s.length&&(e=s[s.length-1])}return!0}function ul(r,e,t,i,n){for(var o=n!==void 0?n:!1,a=0,s=t.length;a<s;++a){var l=t[a],u=ll(r,e,l,i),h=a===0?o&&u||!o&&!u:o&&!u||!o&&u;h&&Cv(r,e,l,i),e=l}return e}function wf(r,e,t,i,n){for(var o=0,a=t.length;o<a;++o)e=ul(r,e,t[o],i,n);return e}var Ov=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),hl=function(r){Ov(e,r);function e(t,i,n){var o=r.call(this)||this;return o.ends_=[],o.flatInteriorPointRevision_=-1,o.flatInteriorPoint_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,i!==void 0&&n?(o.setFlatCoordinates(i,t),o.ends_=n):o.setCoordinates(t,i),o}return e.prototype.appendLinearRing=function(t){this.flatCoordinates?Be(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){return o<cn(this.getExtent(),t,i)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(tl(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),il(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,i,n,o))},e.prototype.containsXY=function(t,i){return al(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,i)},e.prototype.getArea=function(){return vf(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var i;return t!==void 0?(i=this.getOrientedFlatCoordinates().slice(),ul(i,0,this.ends_,this.stride,t)):i=this.flatCoordinates,uo(i,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Ei(this.getExtent());this.flatInteriorPoint_=sl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Fe(this.getFlatInteriorPoint(),Rt.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new _f(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,i=this.flatCoordinates,n=this.ends_,o=[],a=0,s=0,l=n.length;s<l;++s){var u=n[s],h=new _f(i.slice(a,u),t);o.push(h),a=u}return o},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;kf(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ul(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=gf(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,Rt.XY,n)},e.prototype.getType=function(){return I.POLYGON},e.prototype.intersectsExtent=function(t){return bf(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=nl(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()},e}(Oi);const zi=hl;function Ef(r){var e=r[0],t=r[1],i=r[2],n=r[3],o=[e,t,e,n,i,n,i,t,e,t];return new hl(o,Rt.XY,[o.length])}function Tf(r,e,t){for(var i=e||32,n=r.getStride(),o=r.getLayout(),a=r.getCenter(),s=n*(i+1),l=new Array(s),u=0;u<s;u+=n){l[u]=0,l[u+1]=0;for(var h=2;h<n;h++)l[u+h]=a[h]}var f=[l.length],d=new hl(l,o,f);return Iv(d,a,r.getRadius(),t),d}function Iv(r,e,t,i){for(var n=r.getFlatCoordinates(),o=r.getStride(),a=n.length/o-1,s=i||0,l=0;l<=a;++l){var u=l*o,h=s+wi(l,a)*2*Math.PI/a;n[u]=e[0]+t*Math.cos(h),n[u+1]=e[1]+t*Math.sin(h)}r.changed()}var zv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),fl=0,Rv=function(r){zv(e,r);function e(t){var i=r.call(this)||this;i.on,i.once,i.un;var n=qt({},t);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=Fs(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.nextCenter_=null,i.nextResolution_,i.nextRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=Ft(n.center,i.projection_)),n.extent&&(n.extent=Ci(n.extent,i.projection_)),i.applyOptions_(n),i}return e.prototype.applyOptions_=function(t){var i={},n=Mv(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;var o=Pv(t),a=n.constraint,s=Lv(t);this.constraints_={center:o,resolution:a,rotation:s},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),this.setProperties(i),this.options_=t},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var i=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var o=t||[0,0,0,0];i=i||[0,0,0,0];var a=this.getResolution(),s=a/2*(o[3]-i[3]+i[1]-o[1]),l=a/2*(o[0]-i[0]+i[2]-o[2]);this.setCenterInternal([n[0]+s,n[1]-l])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var i=qt({},this.options_);return i.resolution!==void 0?i.resolution=this.getResolution():i.zoom=this.getZoom(),i.center=this.getCenterInternal(),i.rotation=this.getRotation(),qt({},i,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var i=new Array(arguments.length),n=0;n<i.length;++n){var o=arguments[n];o.center&&(o=qt({},o),o.center=Ft(o.center,this.getProjection())),o.anchor&&(o=qt({},o),o.anchor=Ft(o.anchor,this.getProjection())),i[n]=o}this.animateInternal.apply(this,i)},e.prototype.animateInternal=function(t){var i=arguments.length,n;i>1&&typeof arguments[i-1]=="function"&&(n=arguments[i-1],--i);for(var o=0;o<i&&!this.isDef();++o){var a=arguments[o];a.center&&this.setCenterInternal(a.center),a.zoom!==void 0?this.setZoom(a.zoom):a.resolution&&this.setResolution(a.resolution),a.rotation!==void 0&&this.setRotation(a.rotation)}if(o===i){n&&va(n,!0);return}for(var s=Date.now(),l=this.targetCenter_.slice(),u=this.targetResolution_,h=this.targetRotation_,f=[];o<i;++o){var d=arguments[o],p={start:s,complete:!1,anchor:d.anchor,duration:d.duration!==void 0?d.duration:1e3,easing:d.easing||Cg,callback:n};if(d.center&&(p.sourceCenter=l,p.targetCenter=d.center.slice(),l=p.targetCenter),d.zoom!==void 0?(p.sourceResolution=u,p.targetResolution=this.getResolutionForZoom(d.zoom),u=p.targetResolution):d.resolution&&(p.sourceResolution=u,p.targetResolution=d.resolution,u=p.targetResolution),d.rotation!==void 0){p.sourceRotation=h;var c=wi(d.rotation-h+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=h+c,h=p.targetRotation}Av(p)?p.complete=!0:s+=p.duration,f.push(p)}this.animations_.push(f),this.setHint(Xt.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[Xt.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[Xt.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(Xt.ANIMATING,-this.hints_[Xt.ANIMATING]);for(var t,i=0,n=this.animations_.length;i<n;++i){var o=this.animations_[i];if(o[0].callback&&va(o[0].callback,!1),!t)for(var a=0,s=o.length;a<s;++a){var l=o[a];if(!l.complete){t=l.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!!this.getAnimating()){for(var t=Date.now(),i=!1,n=this.animations_.length-1;n>=0;--n){for(var o=this.animations_[n],a=!0,s=0,l=o.length;s<l;++s){var u=o[s];if(!u.complete){var h=t-u.start,f=u.duration>0?h/u.duration:1;f>=1?(u.complete=!0,f=1):a=!1;var d=u.easing(f);if(u.sourceCenter){var p=u.sourceCenter[0],c=u.sourceCenter[1],g=u.targetCenter[0],m=u.targetCenter[1];this.nextCenter_=u.targetCenter;var _=p+d*(g-p),v=c+d*(m-c);this.targetCenter_=[_,v]}if(u.sourceResolution&&u.targetResolution){var y=d===1?u.targetResolution:u.sourceResolution+d*(u.targetResolution-u.sourceResolution);if(u.anchor){var x=this.getViewportSize_(this.getRotation()),k=this.constraints_.resolution(y,0,x,!0);this.targetCenter_=this.calculateCenterZoom(k,u.anchor)}this.nextResolution_=u.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(u.sourceRotation!==void 0&&u.targetRotation!==void 0){var E=d===1?wi(u.targetRotation+Math.PI,2*Math.PI)-Math.PI:u.sourceRotation+d*(u.targetRotation-u.sourceRotation);if(u.anchor){var T=this.constraints_.rotation(E,!0);this.targetCenter_=this.calculateCenterRotate(T,u.anchor)}this.nextRotation_=u.targetRotation,this.targetRotation_=E}if(this.applyTargetState_(!0),i=!0,!u.complete)break}}if(a){this.animations_[n]=null,this.setHint(Xt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var w=o[0].callback;w&&va(w,!0)}}this.animations_=this.animations_.filter(Boolean),i&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,i){var n,o=this.getCenterInternal();return o!==void 0&&(n=[o[0]-i[0],o[1]-i[1]],Ps(n,t-this.getRotation()),Qg(n,i)),n},e.prototype.calculateCenterZoom=function(t,i){var n,o=this.getCenterInternal(),a=this.getResolution();if(o!==void 0&&a!==void 0){var s=i[0]-t*(i[0]-o[0])/a,l=i[1]-t*(i[1]-o[1])/a;n=[s,l]}return n},e.prototype.getViewportSize_=function(t){var i=this.viewportSize_;if(t){var n=i[0],o=i[1];return[Math.abs(n*Math.cos(t))+Math.abs(o*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(o*Math.cos(t))]}else return i},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t&&_n(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(qe.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var i=this.calculateExtentInternal(t);return Gs(i,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var i=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();lt(n,1);var o=this.getResolution();lt(o!==void 0,2);var a=this.getRotation();return lt(a!==void 0,3),Is(n,o,a,i)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(qe.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,i){return this.getResolutionForExtentInternal(Ci(t,this.getProjection()),i)},e.prototype.getResolutionForExtentInternal=function(t,i){var n=i||this.getViewportSizeMinusPadding_(),o=Yt(t)/n[0],a=Ee(t)/n[1];return Math.max(o,a)},e.prototype.getResolutionForValueFunction=function(t){var i=t||2,n=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,a=Math.log(n/o)/Math.log(i);return function(s){var l=n/Math.pow(i,s*a);return l}},e.prototype.getRotation=function(){return this.get(qe.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var i=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),o=this.minResolution_,a=Math.log(n/o)/i;return function(s){var l=Math.log(n/s)/i/a;return l}},e.prototype.getViewportSizeMinusPadding_=function(t){var i=this.getViewportSize_(t),n=this.padding_;return n&&(i=[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]),i},e.prototype.getState=function(){var t=this.getProjection(),i=this.getResolution(),n=this.getRotation(),o=this.getCenterInternal(),a=this.padding_;if(a){var s=this.getViewportSizeMinusPadding_();o=dl(o,this.getViewportSize_(),[s[0]/2+a[3],s[1]/2+a[0]],i,n)}return{center:o.slice(0),projection:t!==void 0?t:null,resolution:i,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,i=this.getResolution();return i!==void 0&&(t=this.getZoomForResolution(i)),t},e.prototype.getZoomForResolution=function(t){var i=this.minZoom_||0,n,o;if(this.resolutions_){var a=ms(this.resolutions_,t,1);i=a,n=this.resolutions_[a],a==this.resolutions_.length-1?o=2:o=n/this.resolutions_[a+1]}else n=this.maxResolution_,o=this.zoomFactor_;return i+Math.log(n/t)/Math.log(o)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var i=Zt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[i]/this.resolutions_[i+1];return this.resolutions_[i]/Math.pow(n,Zt(t-i,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,i){var n;if(lt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){lt(!zs(t),25);var o=Ci(t,this.getProjection());n=Ef(o)}else if(t.getType()===I.CIRCLE){var o=Ci(t.getExtent(),this.getProjection());n=Ef(o),n.rotate(this.getRotation(),Ei(o))}else{var a=pr();a?n=t.clone().transform(a,this.getProjection()):n=t}this.fitInternal(n,i)},e.prototype.rotatedExtentForGeometry=function(t){for(var i=this.getRotation(),n=Math.cos(i),o=Math.sin(-i),a=t.getFlatCoordinates(),s=t.getStride(),l=1/0,u=1/0,h=-1/0,f=-1/0,d=0,p=a.length;d<p;d+=s){var c=a[d]*n-a[d+1]*o,g=a[d]*o+a[d+1]*n;l=Math.min(l,c),u=Math.min(u,g),h=Math.max(h,c),f=Math.max(f,g)}return[l,u,h,f]},e.prototype.fitInternal=function(t,i){var n=i||{},o=n.size;o||(o=this.getViewportSizeMinusPadding_());var a=n.padding!==void 0?n.padding:[0,0,0,0],s=n.nearest!==void 0?n.nearest:!1,l;n.minResolution!==void 0?l=n.minResolution:n.maxZoom!==void 0?l=this.getResolutionForZoom(n.maxZoom):l=0;var u=this.rotatedExtentForGeometry(t),h=this.getResolutionForExtentInternal(u,[o[0]-a[1]-a[3],o[1]-a[0]-a[2]]);h=isNaN(h)?l:Math.max(h,l),h=this.getConstrainedResolution(h,s?0:1);var f=this.getRotation(),d=Math.sin(f),p=Math.cos(f),c=Ei(u);c[0]+=(a[1]-a[3])/2*h,c[1]+=(a[0]-a[2])/2*h;var g=c[0]*p-c[1]*d,m=c[1]*p+c[0]*d,_=this.getConstrainedCenter([g,m],h),v=n.callback?n.callback:sn;n.duration!==void 0?this.animateInternal({resolution:h,center:_,duration:n.duration,easing:n.easing},v):(this.targetResolution_=h,this.targetCenter_=_,this.applyTargetState_(!1,!0),va(v,!0))},e.prototype.centerOn=function(t,i,n){this.centerOnInternal(Ft(t,this.getProjection()),i,n)},e.prototype.centerOnInternal=function(t,i,n){this.setCenterInternal(dl(t,i,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,i,n,o){var a,s=this.padding_;if(s&&t){var l=this.getViewportSizeMinusPadding_(-n),u=dl(t,o,[l[0]/2+s[3],l[1]/2+s[0]],i,n);a=[t[0]-u[0],t[1]-u[1]]}return a},e.prototype.isDef=function(){return!!this.getCenterInternal()&&this.getResolution()!==void 0},e.prototype.adjustCenter=function(t){var i=_n(this.targetCenter_,this.getProjection());this.setCenter([i[0]+t[0],i[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var i=this.targetCenter_;this.setCenterInternal([i[0]+t[0],i[1]+t[1]])},e.prototype.adjustResolution=function(t,i){var n=i&&Ft(i,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,i){var n=this.getAnimating()||this.getInteracting(),o=this.getViewportSize_(this.getRotation()),a=this.constraints_.resolution(this.targetResolution_*t,0,o,n);i&&(this.targetCenter_=this.calculateCenterZoom(a,i)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,i){this.adjustResolution(Math.pow(this.zoomFactor_,-t),i)},e.prototype.adjustRotation=function(t,i){i&&(i=Ft(i,this.getProjection())),this.adjustRotationInternal(t,i)},e.prototype.adjustRotationInternal=function(t,i){var n=this.getAnimating()||this.getInteracting(),o=this.constraints_.rotation(this.targetRotation_+t,n);i&&(this.targetCenter_=this.calculateCenterRotate(o,i)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(Ft(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,i){return this.hints_[t]+=i,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,i){var n=this.getAnimating()||this.getInteracting()||i,o=this.constraints_.rotation(this.targetRotation_,n),a=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,0,a,n),l=this.constraints_.center(this.targetCenter_,s,a,n,this.calculateCenterShift(this.targetCenter_,s,o,a));this.get(qe.ROTATION)!==o&&this.set(qe.ROTATION,o),this.get(qe.RESOLUTION)!==s&&this.set(qe.RESOLUTION,s),(!this.get(qe.CENTER)||!Ye(this.get(qe.CENTER),l))&&this.set(qe.CENTER,l),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,i,n){var o=t!==void 0?t:200,a=i||0,s=this.constraints_.rotation(this.targetRotation_),l=this.getViewportSize_(s),u=this.constraints_.resolution(this.targetResolution_,a,l),h=this.constraints_.center(this.targetCenter_,u,l,!1,this.calculateCenterShift(this.targetCenter_,u,s,l));if(o===0&&!this.cancelAnchor_){this.targetResolution_=u,this.targetRotation_=s,this.targetCenter_=h,this.applyTargetState_();return}var f=n||(o===0?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,(this.getResolution()!==u||this.getRotation()!==s||!this.getCenterInternal()||!Ye(this.getCenterInternal(),h))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:h,resolution:u,duration:o,easing:sr,anchor:f}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Xt.INTERACTING,1)},e.prototype.endInteraction=function(t,i,n){var o=n&&Ft(n,this.getProjection());this.endInteractionInternal(t,i,o)},e.prototype.endInteractionInternal=function(t,i,n){this.setHint(Xt.INTERACTING,-1),this.resolveConstraints(t,i,n)},e.prototype.getConstrainedCenter=function(t,i){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,i||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,i){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,i))},e.prototype.getConstrainedResolution=function(t,i){var n=i||0,o=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,o)},e}(Ue);function va(r,e){setTimeout(function(){r(e)},0)}function Pv(r){if(r.extent!==void 0){var e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return af(r.extent,r.constrainOnlyCenter,e)}var t=Fs(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){var i=t.getExtent().slice();return i[0]=-1/0,i[2]=1/0,af(i,!1,!1)}return Jm}function Mv(r){var e,t,i,n=28,o=2,a=r.minZoom!==void 0?r.minZoom:fl,s=r.maxZoom!==void 0?r.maxZoom:n,l=r.zoomFactor!==void 0?r.zoomFactor:o,u=r.multiWorld!==void 0?r.multiWorld:!1,h=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,f=r.showFullExtent!==void 0?r.showFullExtent:!1,d=Fs(r.projection,"EPSG:3857"),p=d.getExtent(),c=r.constrainOnlyCenter,g=r.extent;if(!u&&!g&&d.isGlobal()&&(c=!1,g=p),r.resolutions!==void 0){var m=r.resolutions;t=m[a],i=m[s]!==void 0?m[s]:m[m.length-1],r.constrainResolution?e=Qm(m,h,!c&&g,f):e=sf(t,i,h,!c&&g,f)}else{var _=p?Math.max(Yt(p),Ee(p)):360*Le[ke.DEGREES]/d.getMetersPerUnit(),v=_/Zs/Math.pow(o,fl),y=v/Math.pow(o,n-fl);t=r.maxResolution,t!==void 0?a=0:t=v/Math.pow(l,a),i=r.minResolution,i===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?i=t/Math.pow(l,s):i=v/Math.pow(l,s):i=y),s=a+Math.floor(Math.log(t/i)/Math.log(l)),i=t/Math.pow(l,s-a),r.constrainResolution?e=tv(l,t,i,h,!c&&g,f):e=sf(t,i,h,!c&&g,f)}return{constraint:e,maxResolution:t,minResolution:i,minZoom:a,zoomFactor:l}}function Lv(r){var e=r.enableRotation!==void 0?r.enableRotation:!0;if(e){var t=r.constrainRotation;return t===void 0||t===!0?iv():t===!1?lf:typeof t=="number"?ev(t):lf}else return $s}function Av(r){return!(r.sourceCenter&&r.targetCenter&&!Ye(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function dl(r,e,t,i,n){var o=Math.cos(-n),a=Math.sin(-n),s=r[0]*o-r[1]*a,l=r[1]*o+r[0]*a;s+=(e[0]/2-t[0])*i,l+=(t[1]-e[1]/2)*i,a=-a;var u=s*o-l*a,h=l*o+s*a;return[u,h]}const Ri=Rv;function Cf(r){return r[0]>0&&r[1]>0}function Fv(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]*e+.5|0,t[1]=r[1]*e+.5|0,t}function ve(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var Dv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Nv=function(r){Dv(e,r);function e(t){var i=r.call(this)||this;i.on,i.once,i.un;var n=Gv(t);i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,i.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Eh,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(i),i.coordinateToPixelTransform_=Ie(),i.pixelToCoordinateTransform_=Ie(),i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=t.moveTolerance,i.keyboardEventTarget_=n.keyboardEventTarget,i.keyHandlerKeys_=null,i.controls=n.controls||new me,i.interactions=n.interactions||new me,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.handleResize_,i.postRenderFunctions_=[],i.tileQueue_=new Km(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addChangeListener(le.LAYERGROUP,i.handleLayerGroupChanged_),i.addChangeListener(le.VIEW,i.handleViewChanged_),i.addChangeListener(le.SIZE,i.handleSizeChanged_),i.addChangeListener(le.TARGET,i.handleTargetChanged_),i.setProperties(n.values);var o=i;return t.view&&!(t.view instanceof Ri)&&t.view.then(function(a){o.setView(new Ri(a))}),i.controls.addEventListener(ee.ADD,function(a){a.element.setMap(this)}.bind(i)),i.controls.addEventListener(ee.REMOVE,function(a){a.element.setMap(null)}.bind(i)),i.interactions.addEventListener(ee.ADD,function(a){a.element.setMap(this)}.bind(i)),i.interactions.addEventListener(ee.REMOVE,function(a){a.element.setMap(null)}.bind(i)),i.overlays_.addEventListener(ee.ADD,function(a){this.addOverlayInternal_(a.element)}.bind(i)),i.overlays_.addEventListener(ee.REMOVE,function(a){var s=a.element,l=s.getId();l!==void 0&&delete this.overlayIdIndex_[l.toString()],a.element.setMap(null)}.bind(i)),i.controls.forEach(function(a){a.setMap(this)}.bind(i)),i.interactions.forEach(function(a){a.setMap(this)}.bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i}return e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){var i=this.getLayerGroup().getLayers();i.push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var i=t.getId();i!==void 0&&(this.overlayIdIndex_[i.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),r.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,i,n){if(!!this.frameState_){var o=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};var a=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:ki,l=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(o,this.frameState_,a,l,i,null,s,null)}},e.prototype.getFeaturesAtPixel=function(t,i){var n=[];return this.forEachFeatureAtPixel(t,function(o){n.push(o)},i),n},e.prototype.forEachLayerAtPixel=function(t,i,n){if(!!this.frameState_){var o=n||{},a=o.hitTolerance!==void 0?o.hitTolerance:0,s=o.layerFilter||ki;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,a,i,s)}},e.prototype.hasFeatureAtPixel=function(t,i){if(!this.frameState_)return!1;var n=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};var o=i.layerFilter!==void 0?i.layerFilter:ki,a=i.hitTolerance!==void 0?i.hitTolerance:0,s=i.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,a,s,o,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var i=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-i.left,n.clientY-i.top]},e.prototype.getTarget=function(){return this.get(le.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return _n(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var i=this.frameState_;return i?Kt(i.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var i=this.overlayIdIndex_[t.toString()];return i!==void 0?i:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(le.LAYERGROUP)},e.prototype.setLayers=function(t){var i=this.getLayerGroup();if(t instanceof me){i.setLayers(t);return}var n=i.getLayers();n.clear(),n.extend(t)},e.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),i=0,n=t.length;i<n;++i){var o=t[i].layer,a=o.getSource();if(a&&a.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var i=Ft(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(i)},e.prototype.getPixelFromCoordinateInternal=function(t){var i=this.frameState_;return i?Kt(i.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(le.SIZE)},e.prototype.getView=function(){return this.get(le.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,i,n,o){return Hm(this.frameState_,t,i,n,o)},e.prototype.handleBrowserEvent=function(t,i){var n=i||t.type,o=new ii(n,this,t);this.handleMapBrowserEvent(o)},e.prototype.handleMapBrowserEvent=function(t){if(!!this.frameState_){var i=t.originalEvent,n=i.type;if(n===bs.POINTERDOWN||n===H.WHEEL||n===H.KEYDOWN){var o=this.getOwnerDocument(),a=this.viewport_.getRootNode?this.viewport_.getRootNode():o,s=i.target;if(this.overlayContainerStopEvent_.contains(s)||!(a===o?o.documentElement:a).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1)for(var l=this.getInteractions().getArray().slice(),u=l.length-1;u>=0;u--){var h=l[u];if(!(h.getMap()!==this||!h.getActive()||!this.getTargetElement())){var f=h.handleEvent(t);if(!f||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,i=this.tileQueue_;if(!i.isEmpty()){var n=this.maxTilesLoading_,o=n;if(t){var a=t.viewHints;if(a[Xt.ANIMATING]||a[Xt.INTERACTING]){var s=Date.now()-t.time>8;n=s?0:8,o=s?0:2}}i.getTilesLoading()<n&&(i.reprioritize(),i.loadMoreTiles(n,o))}t&&this.hasListener(fn.RENDERCOMPLETE)&&!t.animate&&!this.tileQueue_.getTilesLoading()&&!this.getLoading()&&this.renderer_.dispatchRenderEvent(fn.RENDERCOMPLETE,t);for(var l=this.postRenderFunctions_,u=0,h=l.length;u<h;++u)l[u](this,t);l.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var i=0,n=this.keyHandlerKeys_.length;i<n;++i)Lt(this.keyHandlerKeys_[i]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(H.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(H.WHEEL,this.boundHandleBrowserEvent_),this.handleResize_!==void 0&&(removeEventListener(H.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,_s(this.viewport_)}if(!t)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new Ym(this,this.moveTolerance_);for(var o in ct)this.mapBrowserEventHandler_.addEventListener(ct[o],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(H.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(H.WHEEL,this.boundHandleBrowserEvent_,Th?{passive:!1}:!1);var a=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[vt(a,H.KEYDOWN,this.handleBrowserEvent,this),vt(a,H.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(H.RESIZE,this.handleResize_,!1))}this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Lt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Lt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=vt(t,rn.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=vt(t,H.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Lt),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[vt(t,rn.PROPERTYCHANGE,this.render,this),vt(t,H.CHANGE,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),i=0,n=t.length;i<n;++i){var o=t[i].layer;o.hasRenderer()&&o.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){var i=this.getLayerGroup().getLayers();return i.remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var i=this,n=this.getSize(),o=this.getView(),a=this.frameState_,s=null;if(n!==void 0&&Cf(n)&&o&&o.isDef()){var l=o.getHints(this.frameState_?this.frameState_.viewHints:void 0),u=o.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Is(u.center,u.resolution,u.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:u,viewHints:l,wantedTiles:{}},u.nextCenter&&u.nextResolution){var h=isNaN(u.nextRotation)?u.rotation:u.nextRotation;s.nextExtent=Is(u.nextCenter,u.nextResolution,h,n)}}if(this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),a){var f=!this.previousExtent_||!zs(this.previousExtent_)&&!dr(s.extent,this.previousExtent_);f&&(this.dispatchEvent(new pa(Zo.MOVESTART,this,a)),this.previousExtent_=Qr(this.previousExtent_))}var d=this.previousExtent_&&!s.viewHints[Xt.ANIMATING]&&!s.viewHints[Xt.INTERACTING]&&!dr(s.extent,this.previousExtent_);d&&(this.dispatchEvent(new pa(Zo.MOVEEND,this,s)),Gh(s.extent,this.previousExtent_))}this.dispatchEvent(new pa(Zo.POSTRENDER,this,s)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){i.postRenderTimeoutHandle_=void 0,i.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){this.set(le.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(le.SIZE,t)},e.prototype.setTarget=function(t){this.set(le.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof Ri){this.set(le.VIEW,t);return}this.set(le.VIEW,new Ri);var i=this;t.then(function(n){i.setView(new Ri(n))})},e.prototype.updateSize=function(){var t=this.getTargetElement(),i=void 0;if(t){var n=getComputedStyle(t),o=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),a=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(o)&&!isNaN(a)&&(i=[o,a],!Cf(i)&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(i),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var i=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(i=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(i)}},e}(Ue);function Gv(r){var e=null;r.keyboardEventTarget!==void 0&&(e=typeof r.keyboardEventTarget=="string"?document.getElementById(r.keyboardEventTarget):r.keyboardEventTarget);var t={},i=r.layers&&typeof r.layers.getLayers=="function"?r.layers:new Dm({layers:r.layers});t[le.LAYERGROUP]=i,t[le.TARGET]=r.target,t[le.VIEW]=r.view instanceof Ri?r.view:new Ri;var n;r.controls!==void 0&&(Array.isArray(r.controls)?n=new me(r.controls.slice()):(lt(typeof r.controls.getArray=="function",47),n=r.controls));var o;r.interactions!==void 0&&(Array.isArray(r.interactions)?o=new me(r.interactions.slice()):(lt(typeof r.interactions.getArray=="function",48),o=r.interactions));var a;return r.overlays!==void 0?Array.isArray(r.overlays)?a=new me(r.overlays.slice()):(lt(typeof r.overlays.getArray=="function",49),a=r.overlays):a=new me,{controls:n,interactions:o,keyboardEventTarget:e,overlays:a,values:t}}const jv=Nv;var Bv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),pl="units",kn={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},Uv=[1,2,5],cl=25.4/.28,Vv=function(r){Bv(e,r);function e(t){var i=this,n=t||{},o=n.className!==void 0?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return i=r.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this,i.on,i.once,i.un,i.innerElement_=document.createElement("div"),i.innerElement_.className=o+"-inner",i.element.className=o+" "+Hr,i.element.appendChild(i.innerElement_),i.viewState_=null,i.minWidth_=n.minWidth!==void 0?n.minWidth:64,i.renderedVisible_=!1,i.renderedWidth_=void 0,i.renderedHTML_="",i.addChangeListener(pl,i.handleUnitsChanged_),i.setUnits(n.units||kn.METRIC),i.scaleBar_=n.bar||!1,i.scaleBarSteps_=n.steps||4,i.scaleBarText_=n.text||!1,i.dpi_=n.dpi||void 0,i}return e.prototype.getUnits=function(){return this.get(pl)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(pl,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var i=t.center,n=t.projection,o=this.getUnits(),a=o==kn.DEGREES?ke.DEGREES:ke.METERS,s=aa(n,t.resolution,i,a),l=this.minWidth_*(this.dpi_||cl)/cl,u=l*s,h="";if(o==kn.DEGREES){var f=Le[ke.DEGREES];u*=f,u<f/60?(h="\u2033",s*=3600):u<f?(h="\u2032",s*=60):h="\xB0"}else o==kn.IMPERIAL?u<.9144?(h="in",s/=.0254):u<1609.344?(h="ft",s/=.3048):(h="mi",s/=1609.344):o==kn.NAUTICAL?(s/=1852,h="nm"):o==kn.METRIC?u<.001?(h="\u03BCm",s*=1e6):u<1?(h="mm",s*=1e3):u<1e3?h="m":(h="km",s/=1e3):o==kn.US?u<.9144?(h="in",s*=39.37):u<1609.344?(h="ft",s/=.30480061):(h="mi",s/=1609.3472):lt(!1,33);for(var d=3*Math.floor(Math.log(l*s)/Math.log(10)),p,c,g;;){g=Math.floor(d/3);var m=Math.pow(10,g);if(p=Uv[(d%3+3)%3]*m,c=Math.round(p/s),isNaN(c)){this.element.style.display="none",this.renderedVisible_=!1;return}else if(c>=l)break;++d}var _;this.scaleBar_?_=this.createScaleBar(c,p,h):_=p.toFixed(g<0?-g:0)+" "+h,this.renderedHTML_!=_&&(this.innerElement_.innerHTML=_,this.renderedHTML_=_),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)},e.prototype.createScaleBar=function(t,i,n){for(var o="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),a=[],s=t/this.scaleBarSteps_,l="#ffffff",u=0;u<this.scaleBarSteps_;u++)u===0&&a.push(this.createMarker("absolute",u)),a.push('<div><div class="ol-scale-singlebar" style="width: '+s+"px;background-color: "+l+';"></div>'+this.createMarker("relative",u)+(u%2===0||this.scaleBarSteps_===2?this.createStepText(u,t,!1,i,n):"")+"</div>"),u===this.scaleBarSteps_-1&&a.push(this.createStepText(u+1,t,!0,i,n)),l==="#ffffff"?l="#000000":l="#ffffff";var h;this.scaleBarText_?h='<div class="ol-scale-text" style="width: '+t+'px;">'+o+"</div>":h="";var f='<div style="display: flex;">'+h+a.join("")+"</div>";return f},e.prototype.createMarker=function(t,i){var n=t==="absolute"?3:-10;return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+n+'px;"></div>'},e.prototype.createStepText=function(t,i,n,o,a){var s=t===0?0:Math.round(o/this.scaleBarSteps_*t*100)/100,l=s+(t===0?"":" "+a),u=t===0?-3:i/this.scaleBarSteps_*-1,h=t===0?0:i/this.scaleBarSteps_*2;return'<div class="ol-scale-step-text" style="margin-left: '+u+"px;text-align: "+(t===0?"left":"center")+"; min-width: "+h+"px;left: "+(n?i+"px":"unset")+';">'+l+"</div>"},e.prototype.getScaleForResolution=function(){var t=aa(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),i=this.dpi_||cl,n=this.viewState_.projection.getMetersPerUnit(),o=1e3/25.4;return parseFloat(t.toString())*n*o*i},e.prototype.render=function(t){var i=t.frameState;i?this.viewState_=i.viewState:this.viewState_=null,this.updateElement_()},e}(Kr);const Yv=Vv;function Sf(r){var e=r||{},t=new me,i=e.zoom!==void 0?e.zoom:!0;i&&t.push(new Mg(e.zoomOptions));var n=e.rotate!==void 0?e.rotate:!0;n&&t.push(new zg(e.rotateOptions));var o=e.attribution!==void 0?e.attribution:!0;return o&&t.push(new Eg(e.attributionOptions)),t}var Xv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Of=function(r){Xv(e,r);function e(t,i,n){var o=r.call(this)||this;if(n!==void 0&&i===void 0)o.setFlatCoordinates(n,t);else{var a=i||0;o.setCenterAndRadius(t,a,n)}return o}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){var a=this.flatCoordinates,s=t-a[0],l=i-a[1],u=s*s+l*l;if(u<o){if(u===0)for(var h=0;h<this.stride;++h)n[h]=a[h];else{var f=this.getRadius()/Math.sqrt(u);n[0]=a[0]+f*s,n[1]=a[1]+f*l;for(var h=2;h<this.stride;++h)n[h]=a[h]}return n.length=this.stride,u}else return o},e.prototype.containsXY=function(t,i){var n=this.flatCoordinates,o=t-n[0],a=i-n[1];return o*o+a*a<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var i=this.flatCoordinates,n=i[this.stride]-i[0];return Ae(i[0]-n,i[1]-n,i[0]+n,i[1]+n,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],i=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+i*i},e.prototype.getType=function(){return I.CIRCLE},e.prototype.intersectsExtent=function(t){var i=this.getExtent();if(Ht(t,i)){var n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Ss(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var i=this.stride,n=this.flatCoordinates[i]-this.flatCoordinates[0],o=t.slice();o[i]=o[0]+n;for(var a=1;a<i;++a)o[i+a]=t[a];this.setFlatCoordinates(this.layout,o),this.changed()},e.prototype.setCenterAndRadius=function(t,i,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var o=this.flatCoordinates,a=cf(o,0,t,this.stride);o[a++]=o[0]+i;for(var s=1,l=this.stride;s<l;++s)o[a++]=o[s];o.length=a,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,i){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,i){var n=this.getCenter(),o=this.getStride();this.setCenter(Js(n,0,n.length,o,t,i,n)),this.changed()},e.prototype.translate=function(t,i){var n=this.getCenter(),o=this.getStride();this.setCenter(uf(n,0,n.length,o,t,i,n)),this.changed()},e}(Oi);Of.prototype.transform;const Wv=Of;var qv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Zv=function(r){qv(e,r);function e(t){var i=r.call(this)||this;return i.geometries_=t||null,i.changeEventsKeys_=[],i.listenGeometriesChange_(),i}return e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(Lt),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(!!this.geometries_)for(var t=0,i=this.geometries_.length;t<i;++t)this.changeEventsKeys_.push(vt(this.geometries_[t],H.CHANGE,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){if(o<cn(this.getExtent(),t,i))return o;for(var a=this.geometries_,s=0,l=a.length;s<l;++s)o=a[s].closestPointXY(t,i,n,o);return o},e.prototype.containsXY=function(t,i){for(var n=this.geometries_,o=0,a=n.length;o<a;++o)if(n[o].containsXY(t,i))return!0;return!1},e.prototype.computeExtent=function(t){Qr(t);for(var i=this.geometries_,n=0,o=i.length;n<o;++n)jh(t,i[n].getExtent());return t},e.prototype.getGeometries=function(){return If(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],i=this.geometries_,n=0,o=i.length;n<o;++n)i[n].getType()===this.getType()?t=t.concat(i[n].getGeometriesArrayRecursive()):t.push(i[n]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var i=[],n=this.geometries_,o=!1,a=0,s=n.length;a<s;++a){var l=n[a],u=l.getSimplifiedGeometry(t);i.push(u),u!==l&&(o=!0)}if(o){var h=new e(null);return h.setGeometriesArray(i),h}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return I.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var i=this.geometries_,n=0,o=i.length;n<o;++n)if(i[n].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return this.geometries_.length===0},e.prototype.rotate=function(t,i){for(var n=this.geometries_,o=0,a=n.length;o<a;++o)n[o].rotate(t,i);this.changed()},e.prototype.scale=function(t,i,n){var o=n;o||(o=Ei(this.getExtent()));for(var a=this.geometries_,s=0,l=a.length;s<l;++s)a[s].scale(t,i,o);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(If(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var i=this.geometries_,n=0,o=i.length;n<o;++n)i[n].applyTransform(t);this.changed()},e.prototype.translate=function(t,i){for(var n=this.geometries_,o=0,a=n.length;o<a;++o)n[o].translate(t,i);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),r.prototype.disposeInternal.call(this)},e}(ff);function If(r){for(var e=[],t=0,i=r.length;t<i;++t)e.push(r[t].clone());return e}const Kv=Zv;function _a(r,e,t,i,n,o,a){var s,l,u=(t-e)/i;if(u===1)s=e;else if(u===2)s=e,l=n;else if(u!==0){for(var h=r[e],f=r[e+1],d=0,p=[0],c=e+i;c<t;c+=i){var g=r[c],m=r[c+1];d+=Math.sqrt((g-h)*(g-h)+(m-f)*(m-f)),p.push(d),h=g,f=m}var _=n*d,v=Xc(p,_);v<0?(l=(_-p[-v-2])/(p[-v-1]-p[-v-2]),s=e+(-v-2)*i):s=e+v*i}for(var y=a>1?a:2,x=o||new Array(y),c=0;c<y;++c)x[c]=s===void 0?NaN:l===void 0?r[s+c]:Qe(r[s+c],r[s+i+c],l);return x}function gl(r,e,t,i,n,o){if(t==e)return null;var a;if(n<r[e+i-1])return o?(a=r.slice(e,e+i),a[i-1]=n,a):null;if(r[t-1]<n)return o?(a=r.slice(t-i,t),a[i-1]=n,a):null;if(n==r[e+i-1])return r.slice(e,e+i);for(var s=e/i,l=t/i;s<l;){var u=s+l>>1;n<r[(u+1)*i-1]?l=u:s=u+1}var h=r[s*i-1];if(n==h)return r.slice((s-1)*i,(s-1)*i+i);var f=r[(s+1)*i-1],d=(n-h)/(f-h);a=[];for(var p=0;p<i-1;++p)a.push(Qe(r[(s-1)*i+p],r[s*i+p],d));return a.push(n),a}function Hv(r,e,t,i,n,o,a){if(a)return gl(r,e,t[t.length-1],i,n,o);var s;if(n<r[i-1])return o?(s=r.slice(0,i),s[i-1]=n,s):null;if(r[r.length-1]<n)return o?(s=r.slice(r.length-i),s[i-1]=n,s):null;for(var l=0,u=t.length;l<u;++l){var h=t[l];if(e!=h){if(n<r[e+i-1])return null;if(n<=r[h-1])return gl(r,e,h,i,n,!1);e=h}}return null}function zf(r,e,t,i){for(var n=r[e],o=r[e+1],a=0,s=e+i;s<t;s+=i){var l=r[s],u=r[s+1];a+=Math.sqrt((l-n)*(l-n)+(u-o)*(u-o)),n=l,o=u}return a}var $v=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Jv=function(r){$v(e,r);function e(t,i){var n=r.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,i!==void 0&&!Array.isArray(t[0])?n.setFlatCoordinates(i,t):n.setCoordinates(t,i),n}return e.prototype.appendCoordinate=function(t){this.flatCoordinates?Be(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){return o<cn(this.getExtent(),t,i)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),el(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,i,n,o))},e.prototype.forEachSegment=function(t){return xf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,i){if(this.layout!=Rt.XYM&&this.layout!=Rt.XYZM)return null;var n=i!==void 0?i:!1;return gl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n)},e.prototype.getCoordinates=function(){return Ii(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,i){return _a(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,this.stride)},e.prototype.getLength=function(){return zf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=rl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Rt.XY)},e.prototype.getType=function(){return I.LINE_STRING},e.prototype.intersectsExtent=function(t){return ma(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ga(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Oi);const wn=Jv;var Qv=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),t0=function(r){Qv(e,r);function e(t,i,n){var o=r.call(this)||this;if(o.ends_=[],o.maxDelta_=-1,o.maxDeltaRevision_=-1,Array.isArray(t[0]))o.setCoordinates(t,i);else if(i!==void 0&&n)o.setFlatCoordinates(i,t),o.ends_=n;else{for(var a=o.getLayout(),s=t,l=[],u=[],h=0,f=s.length;h<f;++h){var d=s[h];h===0&&(a=d.getLayout()),Be(l,d.getFlatCoordinates()),u.push(l.length)}o.setFlatCoordinates(a,l),o.ends_=u}return o}return e.prototype.appendLineString=function(t){this.flatCoordinates?Be(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){return o<cn(this.getExtent(),t,i)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(tl(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),il(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,i,n,o))},e.prototype.getCoordinateAtM=function(t,i,n){if(this.layout!=Rt.XYM&&this.layout!=Rt.XYZM||this.flatCoordinates.length===0)return null;var o=i!==void 0?i:!1,a=n!==void 0?n:!1;return Hv(this.flatCoordinates,0,this.ends_,this.stride,t,o,a)},e.prototype.getCoordinates=function(){return uo(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new wn(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,i=this.ends_,n=this.layout,o=[],a=0,s=0,l=i.length;s<l;++s){var u=i[s],h=new wn(t.slice(a,u),n);o.push(h),a=u}return o},e.prototype.getFlatMidpoints=function(){for(var t=[],i=this.flatCoordinates,n=0,o=this.ends_,a=this.stride,s=0,l=o.length;s<l;++s){var u=o[s],h=_a(i,n,u,a,.5);Be(t,h),n=u}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=pv(this.flatCoordinates,0,this.ends_,this.stride,t,i,0,n),new e(i,Rt.XY,n)},e.prototype.getType=function(){return I.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return wv(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=nl(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()},e}(Oi);const ml=t0;var e0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),i0=function(r){e0(e,r);function e(t,i){var n=r.call(this)||this;return i&&!Array.isArray(t[0])?n.setFlatCoordinates(i,t):n.setCoordinates(t,i),n}return e.prototype.appendPoint=function(t){this.flatCoordinates?Be(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,i,n,o){if(o<cn(this.getExtent(),t,i))return o;for(var a=this.flatCoordinates,s=this.stride,l=0,u=a.length;l<u;l+=s){var h=un(t,i,a[l],a[l+1]);if(h<o){o=h;for(var f=0;f<s;++f)n[f]=a[l+f];n.length=s}}return o},e.prototype.getCoordinates=function(){return Ii(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var i=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||i<=t?null:new Fe(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,i=this.layout,n=this.stride,o=[],a=0,s=t.length;a<s;a+=n){var l=new Fe(t.slice(a,a+n),i);o.push(l)}return o},e.prototype.getType=function(){return I.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var i=this.flatCoordinates,n=this.stride,o=0,a=i.length;o<a;o+=n){var s=i[o],l=i[o+1];if(Es(t,s,l))return!0}return!1},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ga(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Oi);const ho=i0;function Rf(r,e,t,i){for(var n=[],o=we(),a=0,s=t.length;a<s;++a){var l=t[a];o=Cs(r,e,l[0],i),n.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=l[l.length-1]}return n}var n0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),r0=function(r){n0(e,r);function e(t,i,n){var o=r.call(this)||this;if(o.endss_=[],o.flatInteriorPointsRevision_=-1,o.flatInteriorPoints_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){for(var a=o.getLayout(),s=t,l=[],u=[],h=0,f=s.length;h<f;++h){var d=s[h];h===0&&(a=d.getLayout());for(var p=l.length,c=d.getEnds(),g=0,m=c.length;g<m;++g)c[g]+=p;Be(l,d.getFlatCoordinates()),u.push(c)}i=a,t=l,n=u}return i!==void 0&&n?(o.setFlatCoordinates(i,t),o.endss_=n):o.setCoordinates(t,i),o}return e.prototype.appendPolygon=function(t){var i;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),i=t.getEnds().slice(),this.endss_.push();else{var n=this.flatCoordinates.length;Be(this.flatCoordinates,t.getFlatCoordinates()),i=t.getEnds().slice();for(var o=0,a=i.length;o<a;++o)i[o]+=n}this.endss_.push(i),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();var o=new e(this.flatCoordinates.slice(),this.layout,i);return o.applyProperties(this),o},e.prototype.closestPointXY=function(t,i,n,o){return o<cn(this.getExtent(),t,i)?o:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(hv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),fv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,i,n,o))},e.prototype.containsXY=function(t,i){return kv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,i)},e.prototype.getArea=function(){return mv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var i;return t!==void 0?(i=this.getOrientedFlatCoordinates().slice(),wf(i,0,this.endss_,this.stride,t)):i=this.flatCoordinates,ol(i,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Rf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=yf(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new ho(this.getFlatInteriorPoints().slice(),Rt.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Sv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=wf(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=gv(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),i,0,n),new e(i,Rt.XY,n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var i;if(t===0)i=0;else{var n=this.endss_[t-1];i=n[n.length-1]}var o=this.endss_[t].slice(),a=o[o.length-1];if(i!==0)for(var s=0,l=o.length;s<l;++s)o[s]-=i;return new zi(this.flatCoordinates.slice(i,a),this.layout,o)},e.prototype.getPolygons=function(){for(var t=this.layout,i=this.flatCoordinates,n=this.endss_,o=[],a=0,s=0,l=n.length;s<l;++s){var u=n[s].slice(),h=u[u.length-1];if(a!==0)for(var f=0,d=u.length;f<d;++f)u[f]-=a;var p=new zi(i.slice(a,h),t,u);o.push(p),a=h}return o},e.prototype.getType=function(){return I.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return Tv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,i){this.setLayout(i,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var n=dv(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{var o=n[n.length-1];this.flatCoordinates.length=o.length===0?0:o[o.length-1]}this.changed()},e}(Oi);const vl=r0;var o0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),a0=function(r){o0(e,r);function e(t){var i=r.call(this)||this;if(i.on,i.once,i.un,i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addChangeListener(i.geometryName_,i.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){var n=t;i.setGeometry(n)}else{var o=t;i.setProperties(o)}return i}return e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(Lt(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=vt(t,H.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?s0(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(Ue);function s0(r){if(typeof r=="function")return r;var e;if(Array.isArray(r))e=r;else{lt(typeof r.getZIndex=="function",41);var t=r;e=[t]}return function(){return e}}const ni=a0;var Pf=function(){function r(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return r.prototype.getReadOptions=function(e,t){var i;if(t){var n=t.dataProjection?Wt(t.dataProjection):this.readProjection(e);t.extent&&n&&n.getUnits()===ke.TILE_PIXELS&&(n=Wt(n),n.setWorldExtent(t.extent)),i={dataProjection:n,featureProjection:t.featureProjection}}return this.adaptOptions(i)},r.prototype.adaptOptions=function(e){return qt({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)},r.prototype.getType=function(){return $()},r.prototype.readFeature=function(e,t){return $()},r.prototype.readFeatures=function(e,t){return $()},r.prototype.readGeometry=function(e,t){return $()},r.prototype.readProjection=function(e){return $()},r.prototype.writeFeature=function(e,t){return $()},r.prototype.writeFeatures=function(e,t){return $()},r.prototype.writeGeometry=function(e,t){return $()},r}();function _l(r,e,t){var i=t?Wt(t.featureProjection):null,n=t?Wt(t.dataProjection):null,o;if(i&&n&&!vn(i,n)?o=(e?r.clone():r).transform(e?i:n,e?n:i):o=r,e&&t&&t.decimals!==void 0){var a=Math.pow(10,t.decimals),s=function(l){for(var u=0,h=l.length;u<h;++u)l[u]=Math.round(l[u]*a)/a;return l};o===r&&(o=r.clone()),o.applyTransform(s)}return o}const En={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};var l0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),u0=function(r){l0(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return En.JSON},e.prototype.readFeature=function(t,i){return this.readFeatureFromObject(ya(t),this.getReadOptions(t,i))},e.prototype.readFeatures=function(t,i){return this.readFeaturesFromObject(ya(t),this.getReadOptions(t,i))},e.prototype.readFeatureFromObject=function(t,i){return $()},e.prototype.readFeaturesFromObject=function(t,i){return $()},e.prototype.readGeometry=function(t,i){return this.readGeometryFromObject(ya(t),this.getReadOptions(t,i))},e.prototype.readGeometryFromObject=function(t,i){return $()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(ya(t))},e.prototype.readProjectionFromObject=function(t){return $()},e.prototype.writeFeature=function(t,i){return JSON.stringify(this.writeFeatureObject(t,i))},e.prototype.writeFeatureObject=function(t,i){return $()},e.prototype.writeFeatures=function(t,i){return JSON.stringify(this.writeFeaturesObject(t,i))},e.prototype.writeFeaturesObject=function(t,i){return $()},e.prototype.writeGeometry=function(t,i){return JSON.stringify(this.writeGeometryObject(t,i))},e.prototype.writeGeometryObject=function(t,i){return $()},e}(Pf);function ya(r){if(typeof r=="string"){var e=JSON.parse(r);return e||null}else return r!==null?r:null}const h0=u0;var f0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),d0=function(r){f0(e,r);function e(t){var i=this,n=t||{};return i=r.call(this)||this,i.dataProjection=Wt(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(i.defaultFeatureProjection=Wt(n.featureProjection)),i.geometryName_=n.geometryName,i.extractGeometryName_=n.extractGeometryName,i.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],i}return e.prototype.readFeatureFromObject=function(t,i){var n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};var o=yl(n.geometry,i),a=new ni;return this.geometryName_?a.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&a.setGeometryName(n.geometry_name),a.setGeometry(o),"id"in n&&a.setId(n.id),n.properties&&a.setProperties(n.properties,!0),a},e.prototype.readFeaturesFromObject=function(t,i){var n=t,o=null;if(n.type==="FeatureCollection"){var a=t;o=[];for(var s=a.features,l=0,u=s.length;l<u;++l)o.push(this.readFeatureFromObject(s[l],i))}else o=[this.readFeatureFromObject(t,i)];return o},e.prototype.readGeometryFromObject=function(t,i){return yl(t,i)},e.prototype.readProjectionFromObject=function(t){var i=t.crs,n;return i?i.type=="name"?n=Wt(i.properties.name):i.type==="EPSG"?n=Wt("EPSG:"+i.properties.code):lt(!1,36):n=this.dataProjection,n},e.prototype.writeFeatureObject=function(t,i){i=this.adaptOptions(i);var n={type:"Feature",geometry:null,properties:null},o=t.getId();if(o!==void 0&&(n.id=o),!t.hasProperties())return n;var a=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=xl(s,i),delete a[t.getGeometryName()]),ln(a)||(n.properties=a),n},e.prototype.writeFeaturesObject=function(t,i){i=this.adaptOptions(i);for(var n=[],o=0,a=t.length;o<a;++o)n.push(this.writeFeatureObject(t[o],i));return{type:"FeatureCollection",features:n}},e.prototype.writeGeometryObject=function(t,i){return xl(t,this.adaptOptions(i))},e}(h0);function yl(r,e){if(!r)return null;var t;switch(r.type){case I.POINT:{t=c0(r);break}case I.LINE_STRING:{t=g0(r);break}case I.POLYGON:{t=y0(r);break}case I.MULTI_POINT:{t=v0(r);break}case I.MULTI_LINE_STRING:{t=m0(r);break}case I.MULTI_POLYGON:{t=_0(r);break}case I.GEOMETRY_COLLECTION:{t=p0(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return _l(t,!1,e)}function p0(r,e){var t=r.geometries.map(function(i){return yl(i,e)});return new Kv(t)}function c0(r){return new Fe(r.coordinates)}function g0(r){return new wn(r.coordinates)}function m0(r){return new ml(r.coordinates)}function v0(r){return new ho(r.coordinates)}function _0(r){return new vl(r.coordinates)}function y0(r){return new zi(r.coordinates)}function xl(r,e){r=_l(r,!0,e);var t=r.getType(),i;switch(t){case I.POINT:{i=T0(r);break}case I.LINE_STRING:{i=b0(r);break}case I.POLYGON:{i=C0(r,e);break}case I.MULTI_POINT:{i=w0(r);break}case I.MULTI_LINE_STRING:{i=k0(r);break}case I.MULTI_POLYGON:{i=E0(r,e);break}case I.GEOMETRY_COLLECTION:{i=x0(r,e);break}case I.CIRCLE:{i={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return i}function x0(r,e){var t=r.getGeometriesArray().map(function(i){var n=qt({},e);return delete n.featureProjection,xl(i,n)});return{type:"GeometryCollection",geometries:t}}function b0(r,e){return{type:"LineString",coordinates:r.getCoordinates()}}function k0(r,e){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function w0(r,e){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function E0(r,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(t)}}function T0(r,e){return{type:"Point",coordinates:r.getCoordinates()}}function C0(r,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(t)}}const Tn=d0;var S0=function(){function r(e){var t=e||{};this.color_=t.color!==void 0?t.color:null}return r.prototype.clone=function(){var e=this.getColor();return new r({color:Array.isArray(e)?e.slice():e||void 0})},r.prototype.getColor=function(){return this.color_},r.prototype.setColor=function(e){this.color_=e},r}();const de=S0,Pi={FRACTION:"fraction",PIXELS:"pixels"},ze={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Dt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var O0=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=ve(e.scale),this.displacement_=e.displacement}return r.prototype.clone=function(){var e=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},r.prototype.getOpacity=function(){return this.opacity_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getDisplacement=function(){return this.displacement_},r.prototype.getAnchor=function(){return $()},r.prototype.getImage=function(e){return $()},r.prototype.getHitDetectionImage=function(){return $()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return $()},r.prototype.getImageSize=function(){return $()},r.prototype.getOrigin=function(){return $()},r.prototype.getSize=function(){return $()},r.prototype.setOpacity=function(e){this.opacity_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=ve(e)},r.prototype.listenImageChange=function(e){$()},r.prototype.load=function(){$()},r.prototype.unlistenImageChange=function(e){$()},r}();const Mf=O0;var I0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),z0=function(r){I0(e,r);function e(t,i,n,o){var a=r.call(this)||this;return a.extent=t,a.pixelRatio_=n,a.resolution=i,a.state=o,a}return e.prototype.changed=function(){this.dispatchEvent(H.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return $()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){$()},e}(or);const R0=z0;var P0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();(function(r){P0(e,r);function e(t,i,n,o,a,s){var l=r.call(this,t,i,n,Dt.IDLE)||this;return l.src_=o,l.image_=new Image,a!==null&&(l.image_.crossOrigin=a),l.unlisten_=null,l.state=Dt.IDLE,l.imageLoadFunction_=s,l}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Dt.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=Ee(this.extent)/this.image_.height),this.state=Dt.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==Dt.IDLE||this.state==Dt.ERROR)&&(this.state=Dt.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=bl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Ee(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e})(R0);function bl(r,e,t){var i=r;if(i.src&&ag){var n=i.decode(),o=!0,a=function(){o=!1};return n.then(function(){o&&e()}).catch(function(l){o&&(l.name==="EncodingError"&&l.message==="Invalid image type."?e():t())}),a}var s=[Wo(i,H.LOAD,e),Wo(i,H.ERROR,t)];return function(){s.forEach(Lt)}}var M0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),fo=null,L0=function(r){M0(e,r);function e(t,i,n,o,a,s){var l=r.call(this)||this;return l.hitDetectionImage_=null,l.image_=t||new Image,o!==null&&(l.image_.crossOrigin=o),l.canvas_={},l.color_=s,l.unlisten_=null,l.imageState_=a,l.size_=n,l.src_=i,l.tainted_,l}return e.prototype.isTainted_=function(){if(this.tainted_===void 0&&this.imageState_===Dt.LOADED){fo||(fo=be(1,1)),fo.drawImage(this.image_,0,0);try{fo.getImageData(0,0,1,1),this.tainted_=!1}catch{fo=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(H.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=Dt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Dt.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],i=this.size_[1],n=be(t,i);n.fillRect(0,0,t,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==Dt.IDLE){this.imageState_=Dt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=bl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==Dt.LOADED)){var i=document.createElement("canvas");this.canvas_[t]=i,i.width=Math.ceil(this.image_.width*t),i.height=Math.ceil(this.image_.height*t);var n=i.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply",n.globalCompositeOperation==="multiply"||this.isTainted_())n.fillStyle=Vs(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var o=n.getImageData(0,0,i.width,i.height),a=o.data,s=this.color_[0]/255,l=this.color_[1]/255,u=this.color_[2]/255,h=this.color_[3],f=0,d=a.length;f<d;f+=4)a[f]*=s,a[f+1]*=l,a[f+2]*=u,a[f+3]*=h;n.putImageData(o,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(or);function A0(r,e,t,i,n,o){var a=ua.get(e,i,o);return a||(a=new L0(r,e,t,i,n,o),ua.set(e,i,o,a)),a}var F0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),D0=function(r){F0(e,r);function e(t){var i=this,n=t||{},o=n.opacity!==void 0?n.opacity:1,a=n.rotation!==void 0?n.rotation:0,s=n.scale!==void 0?n.scale:1,l=n.rotateWithView!==void 0?n.rotateWithView:!1;i=r.call(this,{opacity:o,rotation:a,scale:s,displacement:n.displacement!==void 0?n.displacement:[0,0],rotateWithView:l})||this,i.anchor_=n.anchor!==void 0?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=n.anchorOrigin!==void 0?n.anchorOrigin:ze.TOP_LEFT,i.anchorXUnits_=n.anchorXUnits!==void 0?n.anchorXUnits:Pi.FRACTION,i.anchorYUnits_=n.anchorYUnits!==void 0?n.anchorYUnits:Pi.FRACTION,i.crossOrigin_=n.crossOrigin!==void 0?n.crossOrigin:null;var u=n.img!==void 0?n.img:null,h=n.imgSize!==void 0?n.imgSize:null,f=n.src;lt(!(f!==void 0&&u),4),lt(!u||u&&h,5),(f===void 0||f.length===0)&&u&&(f=u.src||Z(u)),lt(f!==void 0&&f.length>0,6);var d=n.src!==void 0?Dt.IDLE:Dt.LOADED;return i.color_=n.color!==void 0?Ys(n.color):null,i.iconImage_=A0(u,f,h,i.crossOrigin_,d,i.color_),i.offset_=n.offset!==void 0?n.offset:[0,0],i.offsetOrigin_=n.offsetOrigin!==void 0?n.offsetOrigin:ze.TOP_LEFT,i.origin_=null,i.size_=n.size!==void 0?n.size:null,i}return e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:this.size_!==null?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,i=this.getSize();if(this.anchorXUnits_==Pi.FRACTION||this.anchorYUnits_==Pi.FRACTION){if(!i)return null;t=this.anchor_.slice(),this.anchorXUnits_==Pi.FRACTION&&(t[0]*=i[0]),this.anchorYUnits_==Pi.FRACTION&&(t[1]*=i[1])}if(this.anchorOrigin_!=ze.TOP_LEFT){if(!i)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==ze.TOP_RIGHT||this.anchorOrigin_==ze.BOTTOM_RIGHT)&&(t[0]=-t[0]+i[0]),(this.anchorOrigin_==ze.BOTTOM_LEFT||this.anchorOrigin_==ze.BOTTOM_RIGHT)&&(t[1]=-t[1]+i[1])}var n=this.getDisplacement();return t[0]-=n[0],t[1]+=n[1],this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=ze.TOP_LEFT){var i=this.getSize(),n=this.iconImage_.getSize();if(!i||!n)return null;t=t.slice(),(this.offsetOrigin_==ze.TOP_RIGHT||this.offsetOrigin_==ze.BOTTOM_RIGHT)&&(t[0]=n[0]-i[0]-t[0]),(this.offsetOrigin_==ze.BOTTOM_LEFT||this.offsetOrigin_==ze.BOTTOM_RIGHT)&&(t[1]=n[1]-i[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(H.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(H.CHANGE,t)},e}(Mf);const kl=D0;var N0=function(){function r(e){var t=e||{};this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}return r.prototype.clone=function(){var e=this.getColor();return new r({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},r.prototype.getColor=function(){return this.color_},r.prototype.getLineCap=function(){return this.lineCap_},r.prototype.getLineDash=function(){return this.lineDash_},r.prototype.getLineDashOffset=function(){return this.lineDashOffset_},r.prototype.getLineJoin=function(){return this.lineJoin_},r.prototype.getMiterLimit=function(){return this.miterLimit_},r.prototype.getWidth=function(){return this.width_},r.prototype.setColor=function(e){this.color_=e},r.prototype.setLineCap=function(e){this.lineCap_=e},r.prototype.setLineDash=function(e){this.lineDash_=e},r.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e},r.prototype.setLineJoin=function(e){this.lineJoin_=e},r.prototype.setMiterLimit=function(e){this.miterLimit_=e},r.prototype.setWidth=function(e){this.width_=e},r}();const _e=N0;function Ze(r){return Array.isArray(r)?Qh(r):r}var G0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),j0=function(r){G0(e,r);function e(t){var i=this,n=t.rotateWithView!==void 0?t.rotateWithView:!1;return i=r.call(this,{opacity:1,rotateWithView:n,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0]})||this,i.canvas_=void 0,i.hitDetectionCanvas_=null,i.fill_=t.fill!==void 0?t.fill:null,i.origin_=[0,0],i.points_=t.points,i.radius_=t.radius!==void 0?t.radius:t.radius1,i.radius2_=t.radius2,i.angle_=t.angle!==void 0?t.angle:0,i.stroke_=t.stroke!==void 0?t.stroke:null,i.anchor_=null,i.size_=null,i.renderOptions_=null,i.render(),i}return e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var i=this.canvas_[t];if(!i){var n=this.renderOptions_,o=be(n.size*t,n.size*t);this.draw_(n,o,t),i=o.canvas,this.canvas_[t]=i}return i},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return Dt.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,i,n){if(i===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return i;var o=this.radius_,a=this.radius2_===void 0?o:this.radius2_;if(o<a){var s=o;o=a,a=s}var l=this.radius2_===void 0?this.points_:this.points_*2,u=2*Math.PI/l,h=a*Math.sin(u),f=Math.sqrt(a*a-h*h),d=o-f,p=Math.sqrt(h*h+d*d),c=p/h;if(t==="miter"&&c<=n)return c*i;var g=i/2/c,m=i/2*(d/p),_=Math.sqrt((o+g)*(o+g)+m*m),v=_-o;if(this.radius2_===void 0||t==="bevel")return v*2;var y=o*Math.sin(u),x=Math.sqrt(o*o-y*y),k=a-x,E=Math.sqrt(y*y+k*k),T=E/y;if(T<=n){var w=T*i/2-a-o;return 2*Math.max(v,w)}return v*2},e.prototype.createRenderOptions=function(){var t=cr,i=0,n=null,o=0,a,s=0;this.stroke_&&(a=this.stroke_.getColor(),a===null&&(a=ao),a=Ze(a),s=this.stroke_.getWidth(),s===void 0&&(s=lo),n=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=cr),i=this.stroke_.getMiterLimit(),i===void 0&&(i=oo));var l=this.calculateLineJoinSize_(t,s,i),u=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*u+l);return{strokeStyle:a,strokeWidth:s,size:h,lineDash:n,lineDashOffset:o,lineJoin:t,miterLimit:i}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size,i=this.getDisplacement();this.canvas_={},this.anchor_=[t/2-i[0],t/2+i[1]],this.size_=[t,t]},e.prototype.draw_=function(t,i,n){if(i.scale(n,n),i.translate(t.size/2,t.size/2),this.createPath_(i),this.fill_){var o=this.fill_.getColor();o===null&&(o=ti),i.fillStyle=Ze(o),i.fill()}this.stroke_&&(i.strokeStyle=t.strokeStyle,i.lineWidth=t.strokeWidth,i.setLineDash&&t.lineDash&&(i.setLineDash(t.lineDash),i.lineDashOffset=t.lineDashOffset),i.lineJoin=t.lineJoin,i.miterLimit=t.miterLimit,i.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var i=this.fill_.getColor(),n=0;if(typeof i=="string"&&(i=Ys(i)),i===null?n=1:Array.isArray(i)&&(n=i.length===4?i[3]:1),n===0){var o=be(t.size,t.size);this.hitDetectionCanvas_=o.canvas,this.drawHitDetectionCanvas_(t,o)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var i=this.points_,n=this.radius_;if(i===1/0)t.arc(0,0,n,0,2*Math.PI);else{var o=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(i*=2);for(var a=this.angle_-Math.PI/2,s=2*Math.PI/i,l=0;l<i;l++){var u=a+l*s,h=l%2===0?n:o;t.lineTo(h*Math.cos(u),h*Math.sin(u))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,i){i.translate(t.size/2,t.size/2),this.createPath_(i),i.fillStyle=ti,i.fill(),this.stroke_&&(i.strokeStyle=t.strokeStyle,i.lineWidth=t.strokeWidth,t.lineDash&&(i.setLineDash(t.lineDash),i.lineDashOffset=t.lineDashOffset),i.lineJoin=t.lineJoin,i.miterLimit=t.miterLimit,i.stroke())},e}(Mf);const wl=j0;var B0=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),U0=function(r){B0(e,r);function e(t){var i=this,n=t||{};return i=r.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:n.scale!==void 0?n.scale:1,rotation:n.rotation!==void 0?n.rotation:0,rotateWithView:n.rotateWithView!==void 0?n.rotateWithView:!1,displacement:n.displacement!==void 0?n.displacement:[0,0]})||this,i}return e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(wl);const mr=U0;var vr=function(){function r(e){var t=e||{};this.geometry_=null,this.geometryFunction_=Af,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}return r.prototype.clone=function(){var e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new r({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},r.prototype.getRenderer=function(){return this.renderer_},r.prototype.setRenderer=function(e){this.renderer_=e},r.prototype.setHitDetectionRenderer=function(e){this.hitDetectionRenderer_=e},r.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},r.prototype.getGeometry=function(){return this.geometry_},r.prototype.getGeometryFunction=function(){return this.geometryFunction_},r.prototype.getFill=function(){return this.fill_},r.prototype.setFill=function(e){this.fill_=e},r.prototype.getImage=function(){return this.image_},r.prototype.setImage=function(e){this.image_=e},r.prototype.getStroke=function(){return this.stroke_},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.getText=function(){return this.text_},r.prototype.setText=function(e){this.text_=e},r.prototype.getZIndex=function(){return this.zIndex_},r.prototype.setGeometry=function(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=Af,this.geometry_=e},r.prototype.setZIndex=function(e){this.zIndex_=e},r}();function V0(r){var e;if(typeof r=="function")e=r;else{var t;if(Array.isArray(r))t=r;else{lt(typeof r.getZIndex=="function",41);var i=r;t=[i]}e=function(){return t}}return e}var El=null;function Y0(r,e){if(!El){var t=new de({color:"rgba(255,255,255,0.4)"}),i=new _e({color:"#3399CC",width:1.25});El=[new vr({image:new mr({fill:t,stroke:i,radius:5}),fill:t,stroke:i})]}return El}function Lf(){var r={},e=[255,255,255,1],t=[0,153,255,1],i=3;return r[I.POLYGON]=[new vr({fill:new de({color:[255,255,255,.5]})})],r[I.MULTI_POLYGON]=r[I.POLYGON],r[I.LINE_STRING]=[new vr({stroke:new _e({color:e,width:i+2})}),new vr({stroke:new _e({color:t,width:i})})],r[I.MULTI_LINE_STRING]=r[I.LINE_STRING],r[I.CIRCLE]=r[I.POLYGON].concat(r[I.LINE_STRING]),r[I.POINT]=[new vr({image:new mr({radius:i*2,fill:new de({color:t}),stroke:new _e({color:e,width:i/2})}),zIndex:1/0})],r[I.MULTI_POINT]=r[I.POINT],r[I.GEOMETRY_COLLECTION]=r[I.POLYGON].concat(r[I.LINE_STRING],r[I.POINT]),r}function Af(r){return r.getGeometry()}const ye=vr,Ff={POINT:"point",LINE:"line"};var X0="#333",W0=function(){function r(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=ve(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new de({color:X0}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:Ff.POINT,this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}return r.prototype.clone=function(){var e=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},r.prototype.getOverflow=function(){return this.overflow_},r.prototype.getFont=function(){return this.font_},r.prototype.getMaxAngle=function(){return this.maxAngle_},r.prototype.getPlacement=function(){return this.placement_},r.prototype.getOffsetX=function(){return this.offsetX_},r.prototype.getOffsetY=function(){return this.offsetY_},r.prototype.getFill=function(){return this.fill_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getStroke=function(){return this.stroke_},r.prototype.getText=function(){return this.text_},r.prototype.getTextAlign=function(){return this.textAlign_},r.prototype.getTextBaseline=function(){return this.textBaseline_},r.prototype.getBackgroundFill=function(){return this.backgroundFill_},r.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},r.prototype.getPadding=function(){return this.padding_},r.prototype.setOverflow=function(e){this.overflow_=e},r.prototype.setFont=function(e){this.font_=e},r.prototype.setMaxAngle=function(e){this.maxAngle_=e},r.prototype.setOffsetX=function(e){this.offsetX_=e},r.prototype.setOffsetY=function(e){this.offsetY_=e},r.prototype.setPlacement=function(e){this.placement_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setFill=function(e){this.fill_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=ve(e!==void 0?e:1)},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.setText=function(e){this.text_=e},r.prototype.setTextAlign=function(e){this.textAlign_=e},r.prototype.setTextBaseline=function(e){this.textBaseline_=e},r.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},r.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},r.prototype.setPadding=function(e){this.padding_=e},r}();const q0=W0;function Z0(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Tl={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Tl.read=function(r,e,t,i,n){var o,a,s=n*8-i-1,l=(1<<s)-1,u=l>>1,h=-7,f=t?n-1:0,d=t?-1:1,p=r[e+f];for(f+=d,o=p&(1<<-h)-1,p>>=-h,h+=s;h>0;o=o*256+r[e+f],f+=d,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=i;h>0;a=a*256+r[e+f],f+=d,h-=8);if(o===0)o=1-u;else{if(o===l)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-u}return(p?-1:1)*a*Math.pow(2,o-i)},Tl.write=function(r,e,t,i,n,o){var a,s,l,u=o*8-n-1,h=(1<<u)-1,f=h>>1,d=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,c=i?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(a++,l/=2),a+f>=h?(s=0,a=h):a+f>=1?(s=(e*l-1)*Math.pow(2,n),a=a+f):(s=e*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;r[t+p]=s&255,p+=c,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;r[t+p]=a&255,p+=c,a/=256,u-=8);r[t+p-c]|=g*128};var K0=Ct,xa=Tl;function Ct(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}Ct.Varint=0,Ct.Fixed64=1,Ct.Bytes=2,Ct.Fixed32=5;var Cl=(1<<16)*(1<<16),Df=1/Cl,H0=12,Nf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Ct.prototype={destroy:function(){this.buf=null},readFields:function(r,e,t){for(t=t||this.length;this.pos<t;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=i&7,r(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(r,e){return this.readFields(r,e,this.readVarint()+this.pos)},readFixed32:function(){var r=ba(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=jf(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=ba(this.buf,this.pos)+ba(this.buf,this.pos+4)*Cl;return this.pos+=8,r},readSFixed64:function(){var r=ba(this.buf,this.pos)+jf(this.buf,this.pos+4)*Cl;return this.pos+=8,r},readFloat:function(){var r=xa.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=xa.read(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var e=this.buf,t,i;return i=e[this.pos++],t=i&127,i<128||(i=e[this.pos++],t|=(i&127)<<7,i<128)||(i=e[this.pos++],t|=(i&127)<<14,i<128)||(i=e[this.pos++],t|=(i&127)<<21,i<128)?t:(i=e[this.pos],t|=(i&15)<<28,$0(t,r,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2===1?(r+1)/-2:r/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var r=this.readVarint()+this.pos,e=this.pos;return this.pos=r,r-e>=H0&&Nf?f_(this.buf,e,r):h_(this.buf,e,r)},readBytes:function(){var r=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,r);return this.pos=r,e},readPackedVarint:function(r,e){if(this.type!==Ct.Bytes)return r.push(this.readVarint(e));var t=ri(this);for(r=r||[];this.pos<t;)r.push(this.readVarint(e));return r},readPackedSVarint:function(r){if(this.type!==Ct.Bytes)return r.push(this.readSVarint());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readSVarint());return r},readPackedBoolean:function(r){if(this.type!==Ct.Bytes)return r.push(this.readBoolean());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readBoolean());return r},readPackedFloat:function(r){if(this.type!==Ct.Bytes)return r.push(this.readFloat());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readFloat());return r},readPackedDouble:function(r){if(this.type!==Ct.Bytes)return r.push(this.readDouble());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readDouble());return r},readPackedFixed32:function(r){if(this.type!==Ct.Bytes)return r.push(this.readFixed32());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readFixed32());return r},readPackedSFixed32:function(r){if(this.type!==Ct.Bytes)return r.push(this.readSFixed32());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed32());return r},readPackedFixed64:function(r){if(this.type!==Ct.Bytes)return r.push(this.readFixed64());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readFixed64());return r},readPackedSFixed64:function(r){if(this.type!==Ct.Bytes)return r.push(this.readSFixed64());var e=ri(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed64());return r},skip:function(r){var e=r&7;if(e===Ct.Varint)for(;this.buf[this.pos++]>127;);else if(e===Ct.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Ct.Fixed32)this.pos+=4;else if(e===Ct.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(r,e){this.writeVarint(r<<3|e)},realloc:function(r){for(var e=this.length||16;e<this.pos+r;)e*=2;if(e!==this.length){var t=new Uint8Array(e);t.set(this.buf),this.buf=t,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(r){this.realloc(4),yr(this.buf,r,this.pos),this.pos+=4},writeSFixed32:function(r){this.realloc(4),yr(this.buf,r,this.pos),this.pos+=4},writeFixed64:function(r){this.realloc(8),yr(this.buf,r&-1,this.pos),yr(this.buf,Math.floor(r*Df),this.pos+4),this.pos+=8},writeSFixed64:function(r){this.realloc(8),yr(this.buf,r&-1,this.pos),yr(this.buf,Math.floor(r*Df),this.pos+4),this.pos+=8},writeVarint:function(r){if(r=+r||0,r>268435455||r<0){J0(r,this);return}this.realloc(4),this.buf[this.pos++]=r&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=(r>>>=7)&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=(r>>>=7)&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=r>>>7&127)))},writeSVarint:function(r){this.writeVarint(r<0?-r*2-1:r*2)},writeBoolean:function(r){this.writeVarint(Boolean(r))},writeString:function(r){r=String(r),this.realloc(r.length*4),this.pos++;var e=this.pos;this.pos=d_(this.buf,r,this.pos);var t=this.pos-e;t>=128&&Gf(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(r){this.realloc(4),xa.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),xa.write(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var e=r.length;this.writeVarint(e),this.realloc(e);for(var t=0;t<e;t++)this.buf[this.pos++]=r[t]},writeRawMessage:function(r,e){this.pos++;var t=this.pos;r(e,this);var i=this.pos-t;i>=128&&Gf(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeMessage:function(r,e,t){this.writeTag(r,Ct.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,e_,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,i_,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,o_,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,n_,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,r_,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,a_,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,s_,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,l_,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,u_,e)},writeBytesField:function(r,e){this.writeTag(r,Ct.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,Ct.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,Ct.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,Ct.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,Ct.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,Ct.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,Ct.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,Ct.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,Ct.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,Ct.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};function $0(r,e,t){var i=t.buf,n,o;if(o=i[t.pos++],n=(o&112)>>4,o<128||(o=i[t.pos++],n|=(o&127)<<3,o<128)||(o=i[t.pos++],n|=(o&127)<<10,o<128)||(o=i[t.pos++],n|=(o&127)<<17,o<128)||(o=i[t.pos++],n|=(o&127)<<24,o<128)||(o=i[t.pos++],n|=(o&1)<<31,o<128))return _r(r,n,e);throw new Error("Expected varint not more than 10 bytes")}function ri(r){return r.type===Ct.Bytes?r.readVarint()+r.pos:r.pos+1}function _r(r,e,t){return t?e*4294967296+(r>>>0):(e>>>0)*4294967296+(r>>>0)}function J0(r,e){var t,i;if(r>=0?(t=r%4294967296|0,i=r/4294967296|0):(t=~(-r%4294967296),i=~(-r/4294967296),t^4294967295?t=t+1|0:(t=0,i=i+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Q0(t,i,e),t_(i,e)}function Q0(r,e,t){t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos]=r&127}function t_(r,e){var t=(r&7)<<4;e.buf[e.pos++]|=t|((r>>>=3)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127)))))}function Gf(r,e,t){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(i);for(var n=t.pos-1;n>=r;n--)t.buf[n+i]=t.buf[n]}function e_(r,e){for(var t=0;t<r.length;t++)e.writeVarint(r[t])}function i_(r,e){for(var t=0;t<r.length;t++)e.writeSVarint(r[t])}function n_(r,e){for(var t=0;t<r.length;t++)e.writeFloat(r[t])}function r_(r,e){for(var t=0;t<r.length;t++)e.writeDouble(r[t])}function o_(r,e){for(var t=0;t<r.length;t++)e.writeBoolean(r[t])}function a_(r,e){for(var t=0;t<r.length;t++)e.writeFixed32(r[t])}function s_(r,e){for(var t=0;t<r.length;t++)e.writeSFixed32(r[t])}function l_(r,e){for(var t=0;t<r.length;t++)e.writeFixed64(r[t])}function u_(r,e){for(var t=0;t<r.length;t++)e.writeSFixed64(r[t])}function ba(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+r[e+3]*16777216}function yr(r,e,t){r[t]=e,r[t+1]=e>>>8,r[t+2]=e>>>16,r[t+3]=e>>>24}function jf(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function h_(r,e,t){for(var i="",n=e;n<t;){var o=r[n],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n+s>t)break;var l,u,h;s===1?o<128&&(a=o):s===2?(l=r[n+1],(l&192)===128&&(a=(o&31)<<6|l&63,a<=127&&(a=null))):s===3?(l=r[n+1],u=r[n+2],(l&192)===128&&(u&192)===128&&(a=(o&15)<<12|(l&63)<<6|u&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):s===4&&(l=r[n+1],u=r[n+2],h=r[n+3],(l&192)===128&&(u&192)===128&&(h&192)===128&&(a=(o&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,s=1):a>65535&&(a-=65536,i+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),i+=String.fromCharCode(a),n+=s}return i}function f_(r,e,t){return Nf.decode(r.subarray(e,t))}function d_(r,e,t){for(var i=0,n,o;i<e.length;i++){if(n=e.charCodeAt(i),n>55295&&n<57344)if(o)if(n<56320){r[t++]=239,r[t++]=191,r[t++]=189,o=n;continue}else n=o-55296<<10|n-56320|65536,o=null;else{n>56319||i+1===e.length?(r[t++]=239,r[t++]=191,r[t++]=189):o=n;continue}else o&&(r[t++]=239,r[t++]=191,r[t++]=189,o=null);n<128?r[t++]=n:(n<2048?r[t++]=n>>6|192:(n<65536?r[t++]=n>>12|224:(r[t++]=n>>18|240,r[t++]=n>>12&63|128),r[t++]=n>>6&63|128),r[t++]=n&63|128)}return t}var Bf=Ie(),po=function(){function r(e,t,i,n,o){this.extent_,this.id_=o,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=n}return r.prototype.get=function(e){return this.properties_[e]},r.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===I.POINT?to(this.flatCoordinates_):Cs(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=Ei(this.getExtent());this.flatInteriorPoints_=sl(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=Rf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=yf(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=_a(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},r.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var e=this.flatCoordinates_,t=0,i=this.ends_,n=0,o=i.length;n<o;++n){var a=i[n],s=_a(e,t,a,2,.5);Be(this.flatMidpoints_,s),t=a}}return this.flatMidpoints_},r.prototype.getId=function(){return this.id_},r.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},r.prototype.getGeometry=function(){return this},r.prototype.getSimplifiedGeometry=function(e){return this},r.prototype.simplifyTransformed=function(e,t){return this},r.prototype.getProperties=function(){return this.properties_},r.prototype.getStride=function(){return 2},r.prototype.getStyleFunction=function(){},r.prototype.getType=function(){return this.type_},r.prototype.transform=function(e){e=Wt(e);var t=e.getExtent(),i=e.getWorldExtent();if(t&&i){var n=Ee(i)/Ee(t);We(Bf,i[0],i[3],n,-n,0,0,0),Si(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Bf,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();po.prototype.getEndss=po.prototype.getEnds,po.prototype.getFlatCoordinates=po.prototype.getOrientedFlatCoordinates;const Sl=po;var p_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),c_=function(r){p_(e,r);function e(t){var i=r.call(this)||this,n=t||{};return i.dataProjection=new ks({code:"",units:ke.TILE_PIXELS}),i.featureClass_=n.featureClass?n.featureClass:Sl,i.geometryName_=n.geometryName,i.layerName_=n.layerName?n.layerName:"layer",i.layers_=n.layers?n.layers:null,i.idProperty_=n.idProperty,i.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],i}return e.prototype.readRawGeometry_=function(t,i,n,o){t.pos=i.geometry;for(var a=t.readVarint()+t.pos,s=1,l=0,u=0,h=0,f=0,d=0;t.pos<a;){if(!l){var p=t.readVarint();s=p&7,l=p>>3}l--,s===1||s===2?(u+=t.readSVarint(),h+=t.readSVarint(),s===1&&f>d&&(o.push(f),d=f),n.push(u,h),f+=2):s===7?f>d&&(n.push(n[d],n[d+1]),f+=2):lt(!1,59)}f>d&&(o.push(f),d=f)},e.prototype.createFeature_=function(t,i,n){var o=i.type;if(o===0)return null;var a,s=i.properties,l;this.idProperty_?(l=s[this.idProperty_],delete s[this.idProperty_]):l=i.id,s[this.layerName_]=i.layer.name;var u=[],h=[];this.readRawGeometry_(t,i,u,h);var f=y_(o,h.length);if(this.featureClass_===Sl)a=new this.featureClass_(f,u,h,s,l),a.transform(n.dataProjection);else{var d=void 0;if(f==I.POLYGON){for(var p=[],c=0,g=0,m=0,_=h.length;m<_;++m){var v=h[m];if(!ll(u,c,v,2))p.push(h.slice(g,m+1));else{if(p.length===0)continue;p[p.length-1].push(h[g])}g=m+1,c=v}p.length>1?d=new vl(u,Rt.XY,p):d=new zi(u,Rt.XY,h)}else d=f===I.POINT?new Fe(u,Rt.XY):f===I.LINE_STRING?new wn(u,Rt.XY):f===I.POLYGON?new zi(u,Rt.XY,h):f===I.MULTI_POINT?new ho(u,Rt.XY):f===I.MULTI_LINE_STRING?new ml(u,Rt.XY,h):null;var y=this.featureClass_;a=new y,this.geometryName_&&a.setGeometryName(this.geometryName_);var x=_l(d,!1,n);a.setGeometry(x),a.setId(l),a.setProperties(s,!0)}return a},e.prototype.getType=function(){return En.ARRAY_BUFFER},e.prototype.readFeatures=function(t,i){var n=this.layers_,o=this.adaptOptions(i),a=Wt(o.dataProjection);a.setWorldExtent(o.extent),o.dataProjection=a;var s=new K0(t),l=s.readFields(g_,{}),u=[];for(var h in l)if(!(n&&n.indexOf(h)==-1)){var f=l[h],d=f?[0,0,f.extent,f.extent]:null;a.setExtent(d);for(var p=0,c=f.length;p<c;++p){var g=__(s,f,p);u.push(this.createFeature_(s,g,o))}}return u},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(Pf);function g_(r,e,t){if(r===3){var i={keys:[],values:[],features:[]},n=t.readVarint()+t.pos;t.readFields(m_,i,n),i.length=i.features.length,i.length&&(e[i.name]=i)}}function m_(r,e,t){if(r===15)e.version=t.readVarint();else if(r===1)e.name=t.readString();else if(r===5)e.extent=t.readVarint();else if(r===2)e.features.push(t.pos);else if(r===3)e.keys.push(t.readString());else if(r===4){for(var i=null,n=t.readVarint()+t.pos;t.pos<n;)r=t.readVarint()>>3,i=r===1?t.readString():r===2?t.readFloat():r===3?t.readDouble():r===4?t.readVarint64():r===5?t.readVarint():r===6?t.readSVarint():r===7?t.readBoolean():null;e.values.push(i)}}function v_(r,e,t){if(r==1)e.id=t.readVarint();else if(r==2)for(var i=t.readVarint()+t.pos;t.pos<i;){var n=e.layer.keys[t.readVarint()],o=e.layer.values[t.readVarint()];e.properties[n]=o}else r==3?e.type=t.readVarint():r==4&&(e.geometry=t.pos)}function __(r,e,t){r.pos=e.features[t];var i=r.readVarint()+r.pos,n={layer:e,type:0,properties:{}};return r.readFields(v_,n,i),n}function y_(r,e){var t;return r===1?t=e===1?I.POINT:I.MULTI_POINT:r===2?t=e===1?I.LINE_STRING:I.MULTI_LINE_STRING:r===3&&(t=I.POLYGON),t}const x_=c_;function b_(r,e,t,i,n){Uf(r,e,t||0,i||r.length-1,n||k_)}function Uf(r,e,t,i,n){for(;i>t;){if(i-t>600){var o=i-t+1,a=e-t+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1),h=Math.max(t,Math.floor(e-a*l/o+u)),f=Math.min(i,Math.floor(e+(o-a)*l/o+u));Uf(r,e,h,f,n)}var d=r[e],p=t,c=i;for(co(r,t,e),n(r[i],d)>0&&co(r,t,i);p<c;){for(co(r,p,c),p++,c--;n(r[p],d)<0;)p++;for(;n(r[c],d)>0;)c--}n(r[t],d)===0?co(r,t,c):(c++,co(r,c,i)),c<=e&&(t=c+1),e<=c&&(i=c-1)}}function co(r,e,t){var i=r[e];r[e]=r[t],r[t]=i}function k_(r,e){return r<e?-1:r>e?1:0}class Vf{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!wa(e,t))return i;const n=this.toBBox,o=[];for(;t;){for(let a=0;a<t.children.length;a++){const s=t.children[a],l=t.leaf?n(s):s;wa(e,l)&&(t.leaf?i.push(s):Il(e,l)?this._all(s,i):o.push(s))}t=o.pop()}return i}collides(e){let t=this.data;if(!wa(e,t))return!1;const i=[];for(;t;){for(let n=0;n<t.children.length;n++){const o=t.children[n],a=t.leaf?this.toBBox(o):o;if(wa(e,a)){if(t.leaf||Il(e,a))return!0;i.push(o)}}t=i.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let i=0;i<e.length;i++)this.insert(e[i]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const i=this.data;this.data=t,t=i}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=br([]),this}remove(e,t){if(!e)return this;let i=this.data;const n=this.toBBox(e),o=[],a=[];let s,l,u;for(;i||o.length;){if(i||(i=o.pop(),l=o[o.length-1],s=a.pop(),u=!0),i.leaf){const h=w_(e,i.children,t);if(h!==-1)return i.children.splice(h,1),o.push(i),this._condense(o),this}!u&&!i.leaf&&Il(i,n)?(o.push(i),a.push(s),s=0,l=i,i=i.children[0]):l?(s++,i=l.children[s],u=!1):i=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const i=[];for(;e;)e.leaf?t.push(...e.children):i.push(...e.children),e=i.pop();return t}_build(e,t,i,n){const o=i-t+1;let a=this._maxEntries,s;if(o<=a)return s=br(e.slice(t,i+1)),xr(s,this.toBBox),s;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),s=br([]),s.leaf=!1,s.height=n;const l=Math.ceil(o/a),u=l*Math.ceil(Math.sqrt(a));Yf(e,t,i,u,this.compareMinX);for(let h=t;h<=i;h+=u){const f=Math.min(h+u-1,i);Yf(e,h,f,l,this.compareMinY);for(let d=h;d<=f;d+=l){const p=Math.min(d+l-1,f);s.children.push(this._build(e,d,p,n-1))}}return xr(s,this.toBBox),s}_chooseSubtree(e,t,i,n){for(;n.push(t),!(t.leaf||n.length-1===i);){let o=1/0,a=1/0,s;for(let l=0;l<t.children.length;l++){const u=t.children[l],h=Ol(u),f=C_(e,u)-h;f<a?(a=f,o=h<o?h:o,s=u):f===a&&h<o&&(o=h,s=u)}t=s||t.children[0]}return t}_insert(e,t,i){const n=i?e:this.toBBox(e),o=[],a=this._chooseSubtree(n,this.data,t,o);for(a.children.push(e),mo(a,n);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(n,o,t)}_split(e,t){const i=e[t],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);const a=this._chooseSplitIndex(i,o,n),s=br(i.children.splice(a,i.children.length-a));s.height=i.height,s.leaf=i.leaf,xr(i,this.toBBox),xr(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(i,s)}_splitRoot(e,t){this.data=br([e,t]),this.data.height=e.height+1,this.data.leaf=!1,xr(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let n,o=1/0,a=1/0;for(let s=t;s<=i-t;s++){const l=go(e,0,s,this.toBBox),u=go(e,s,i,this.toBBox),h=S_(l,u),f=Ol(l)+Ol(u);h<o?(o=h,n=s,a=f<a?f:a):h===o&&f<a&&(a=f,n=s)}return n||i-t}_chooseSplitAxis(e,t,i){const n=e.leaf?this.compareMinX:E_,o=e.leaf?this.compareMinY:T_,a=this._allDistMargin(e,t,i,n),s=this._allDistMargin(e,t,i,o);a<s&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const o=this.toBBox,a=go(e,0,t,o),s=go(e,i-t,i,o);let l=ka(a)+ka(s);for(let u=t;u<i-t;u++){const h=e.children[u];mo(a,e.leaf?o(h):h),l+=ka(a)}for(let u=i-t-1;u>=t;u--){const h=e.children[u];mo(s,e.leaf?o(h):h),l+=ka(s)}return l}_adjustParentBBoxes(e,t,i){for(let n=i;n>=0;n--)mo(t[n],e)}_condense(e){for(let t=e.length-1,i;t>=0;t--)e[t].children.length===0?t>0?(i=e[t-1].children,i.splice(i.indexOf(e[t]),1)):this.clear():xr(e[t],this.toBBox)}}function w_(r,e,t){if(!t)return e.indexOf(r);for(let i=0;i<e.length;i++)if(t(r,e[i]))return i;return-1}function xr(r,e){go(r,0,r.children.length,e,r)}function go(r,e,t,i,n){n||(n=br(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let o=e;o<t;o++){const a=r.children[o];mo(n,r.leaf?i(a):a)}return n}function mo(r,e){return r.minX=Math.min(r.minX,e.minX),r.minY=Math.min(r.minY,e.minY),r.maxX=Math.max(r.maxX,e.maxX),r.maxY=Math.max(r.maxY,e.maxY),r}function E_(r,e){return r.minX-e.minX}function T_(r,e){return r.minY-e.minY}function Ol(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function ka(r){return r.maxX-r.minX+(r.maxY-r.minY)}function C_(r,e){return(Math.max(e.maxX,r.maxX)-Math.min(e.minX,r.minX))*(Math.max(e.maxY,r.maxY)-Math.min(e.minY,r.minY))}function S_(r,e){const t=Math.max(r.minX,e.minX),i=Math.max(r.minY,e.minY),n=Math.min(r.maxX,e.maxX),o=Math.min(r.maxY,e.maxY);return Math.max(0,n-t)*Math.max(0,o-i)}function Il(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function wa(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function br(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Yf(r,e,t,i,n){const o=[e,t];for(;o.length;){if(t=o.pop(),e=o.pop(),t-e<=i)continue;const a=e+Math.ceil((t-e)/i/2)*i;b_(r,a,e,t,n),o.push(e,a,a,t)}}var O_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Xf={RENDER_ORDER:"renderOrder"},I_=function(r){O_(e,r);function e(t){var i=this,n=t||{},o=qt({},n);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,i=r.call(this,o)||this,i.declutter_=n.declutter!==void 0?n.declutter:!1,i.renderBuffer_=n.renderBuffer!==void 0?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=n.updateWhileAnimating!==void 0?n.updateWhileAnimating:!1,i.updateWhileInteracting_=n.updateWhileInteracting!==void 0?n.updateWhileInteracting:!1,i}return e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(t){return r.prototype.getFeatures.call(this,t)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(Xf.RENDER_ORDER)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Vf(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(Xf.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:Y0,this.styleFunction_=t===null?void 0:V0(this.style_),this.changed()},e}(Ph);const Wf=I_;var vo={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Ea=[vo.FILL],Mi=[vo.STROKE],Cn=[vo.BEGIN_PATH],qf=[vo.CLOSE_PATH];const J=vo;var z_=function(){function r(){}return r.prototype.drawCustom=function(e,t,i,n){},r.prototype.drawGeometry=function(e){},r.prototype.setStyle=function(e){},r.prototype.drawCircle=function(e,t){},r.prototype.drawFeature=function(e,t){},r.prototype.drawGeometryCollection=function(e,t){},r.prototype.drawLineString=function(e,t){},r.prototype.drawMultiLineString=function(e,t){},r.prototype.drawMultiPoint=function(e,t){},r.prototype.drawMultiPolygon=function(e,t){},r.prototype.drawPoint=function(e,t){},r.prototype.drawPolygon=function(e,t){},r.prototype.drawText=function(e,t){},r.prototype.setFillStrokeStyle=function(e,t){},r.prototype.setImageStyle=function(e,t){},r.prototype.setTextStyle=function(e,t){},r}();const Zf=z_;var R_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),P_=function(r){R_(e,r);function e(t,i,n,o){var a=r.call(this)||this;return a.tolerance=t,a.maxExtent=i,a.pixelRatio=o,a.maxLineWidth=0,a.resolution=n,a.beginGeometryInstruction1_=null,a.beginGeometryInstruction2_=null,a.bufferedMaxExtent_=null,a.instructions=[],a.coordinates=[],a.tmpCoordinate_=[],a.hitDetectionInstructions=[],a.state={},a}return e.prototype.applyPixelRatio=function(t){var i=this.pixelRatio;return i==1?t:t.map(function(n){return n*i})},e.prototype.appendFlatPointCoordinates=function(t,i){for(var n=this.getBufferedMaxExtent(),o=this.tmpCoordinate_,a=this.coordinates,s=a.length,l=0,u=t.length;l<u;l+=i)o[0]=t[l],o[1]=t[l+1],ea(n,o)&&(a[s++]=o[0],a[s++]=o[1]);return s},e.prototype.appendFlatLineCoordinates=function(t,i,n,o,a,s){var l=this.coordinates,u=l.length,h=this.getBufferedMaxExtent();s&&(i+=o);var f=t[i],d=t[i+1],p=this.tmpCoordinate_,c=!0,g,m,_;for(g=i+o;g<n;g+=o)p[0]=t[g],p[1]=t[g+1],_=Ts(h,p),_!==m?(c&&(l[u++]=f,l[u++]=d,c=!1),l[u++]=p[0],l[u++]=p[1]):_===ie.INTERSECTING?(l[u++]=p[0],l[u++]=p[1],c=!1):c=!0,f=p[0],d=p[1],m=_;return(a&&c||g===i+o)&&(l[u++]=f,l[u++]=d),u},e.prototype.drawCustomCoordinates_=function(t,i,n,o,a){for(var s=0,l=n.length;s<l;++s){var u=n[s],h=this.appendFlatLineCoordinates(t,i,u,o,!1,!1);a.push(h),i=u}return i},e.prototype.drawCustom=function(t,i,n,o){this.beginGeometry(t,i);var a=t.getType(),s=t.getStride(),l=this.coordinates.length,u,h,f,d,p;switch(a){case I.MULTI_POLYGON:u=t.getOrientedFlatCoordinates(),d=[];var c=t.getEndss();p=0;for(var g=0,m=c.length;g<m;++g){var _=[];p=this.drawCustomCoordinates_(u,p,c[g],s,_),d.push(_)}this.instructions.push([J.CUSTOM,l,d,t,n,ol]),this.hitDetectionInstructions.push([J.CUSTOM,l,d,t,o||n,ol]);break;case I.POLYGON:case I.MULTI_LINE_STRING:f=[],u=a==I.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),p=this.drawCustomCoordinates_(u,0,t.getEnds(),s,f),this.instructions.push([J.CUSTOM,l,f,t,n,uo]),this.hitDetectionInstructions.push([J.CUSTOM,l,f,t,o||n,uo]);break;case I.LINE_STRING:case I.CIRCLE:u=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(u,0,u.length,s,!1,!1),this.instructions.push([J.CUSTOM,l,h,t,n,Ii]),this.hitDetectionInstructions.push([J.CUSTOM,l,h,t,o||n,Ii]);break;case I.MULTI_POINT:u=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(u,s),h>l&&(this.instructions.push([J.CUSTOM,l,h,t,n,Ii]),this.hitDetectionInstructions.push([J.CUSTOM,l,h,t,o||n,Ii]));break;case I.POINT:u=t.getFlatCoordinates(),this.coordinates.push(u[0],u[1]),h=this.coordinates.length,this.instructions.push([J.CUSTOM,l,h,t,n]),this.hitDetectionInstructions.push([J.CUSTOM,l,h,t,o||n]);break}this.endGeometry(i)},e.prototype.beginGeometry=function(t,i){this.beginGeometryInstruction1_=[J.BEGIN_GEOMETRY,i,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[J.BEGIN_GEOMETRY,i,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var i,n=t.length,o,a,s=-1;for(i=0;i<n;++i)o=t[i],a=o[0],a==J.END_GEOMETRY?s=i:a==J.BEGIN_GEOMETRY&&(o[2]=i,qc(this.hitDetectionInstructions,s,i),s=-1)},e.prototype.setFillStrokeStyle=function(t,i){var n=this.state;if(t){var o=t.getColor();n.fillStyle=Ze(o||ti)}else n.fillStyle=void 0;if(i){var a=i.getColor();n.strokeStyle=Ze(a||ao);var s=i.getLineCap();n.lineCap=s!==void 0?s:ha;var l=i.getLineDash();n.lineDash=l?l.slice():no;var u=i.getLineDashOffset();n.lineDashOffset=u||ro;var h=i.getLineJoin();n.lineJoin=h!==void 0?h:cr;var f=i.getWidth();n.lineWidth=f!==void 0?f:lo;var d=i.getMiterLimit();n.miterLimit=d!==void 0?d:oo,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var i=t.fillStyle,n=[J.SET_FILL_STYLE,i];return typeof i!="string"&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[J.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,i){var n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(i.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,i){var n=t.strokeStyle,o=t.lineCap,a=t.lineDash,s=t.lineDashOffset,l=t.lineJoin,u=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=o||a!=t.currentLineDash&&!an(t.currentLineDash,a)||t.currentLineDashOffset!=s||t.currentLineJoin!=l||t.currentLineWidth!=u||t.currentMiterLimit!=h)&&(n!==void 0&&i.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=o,t.currentLineDash=a,t.currentLineDashOffset=s,t.currentLineJoin=l,t.currentLineWidth=u,t.currentMiterLimit=h)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[J.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Gh(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Ve(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Zf);const _o=P_;var M_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),L_=function(r){M_(e,r);function e(t,i,n,o){var a=r.call(this,t,i,n,o)||this;return a.hitDetectionImage_=null,a.image_=null,a.imagePixelRatio_=void 0,a.anchorX_=void 0,a.anchorY_=void 0,a.height_=void 0,a.opacity_=void 0,a.originX_=void 0,a.originY_=void 0,a.rotateWithView_=void 0,a.rotation_=void 0,a.scale_=void 0,a.width_=void 0,a.declutterImageWithText_=void 0,a}return e.prototype.drawPoint=function(t,i){if(!!this.image_){this.beginGeometry(t,i);var n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([J.DRAW_IMAGE,a,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([J.DRAW_IMAGE,a,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(i)}},e.prototype.drawMultiPoint=function(t,i){if(!!this.image_){this.beginGeometry(t,i);var n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,s=this.appendFlatPointCoordinates(n,o);this.instructions.push([J.DRAW_IMAGE,a,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([J.DRAW_IMAGE,a,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(i)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,r.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,i){var n=t.getAnchor(),o=t.getSize(),a=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),l=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=a,this.image_=s,this.height_=o[1],this.opacity_=t.getOpacity(),this.originX_=l[0]*this.imagePixelRatio_,this.originY_=l[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=o[0],this.declutterImageWithText_=i},e}(_o);const A_=L_;var F_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),D_=function(r){F_(e,r);function e(t,i,n,o){return r.call(this,t,i,n,o)||this}return e.prototype.drawFlatCoordinates_=function(t,i,n,o){var a=this.coordinates.length,s=this.appendFlatLineCoordinates(t,i,n,o,!1,!1),l=[J.MOVE_TO_LINE_TO,a,s];return this.instructions.push(l),this.hitDetectionInstructions.push(l),n},e.prototype.drawLineString=function(t,i){var n=this.state,o=n.strokeStyle,a=n.lineWidth;if(!(o===void 0||a===void 0)){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,i),this.hitDetectionInstructions.push([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,no,ro],Cn);var s=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(s,0,s.length,l),this.hitDetectionInstructions.push(Mi),this.endGeometry(i)}},e.prototype.drawMultiLineString=function(t,i){var n=this.state,o=n.strokeStyle,a=n.lineWidth;if(!(o===void 0||a===void 0)){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,i),this.hitDetectionInstructions.push([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Cn);for(var s=t.getEnds(),l=t.getFlatCoordinates(),u=t.getStride(),h=0,f=0,d=s.length;f<d;++f)h=this.drawFlatCoordinates_(l,h,s[f],u);this.hitDetectionInstructions.push(Mi),this.endGeometry(i)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Mi),this.reverseHitDetectionInstructions(),this.state=null,r.prototype.finish.call(this)},e.prototype.applyStroke=function(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Mi),t.lastStroke=this.coordinates.length),t.lastStroke=0,r.prototype.applyStroke.call(this,t),this.instructions.push(Cn)},e}(_o);const N_=D_;var G_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),j_=function(r){G_(e,r);function e(t,i,n,o){return r.call(this,t,i,n,o)||this}return e.prototype.drawFlatCoordinatess_=function(t,i,n,o){var a=this.state,s=a.fillStyle!==void 0,l=a.strokeStyle!==void 0,u=n.length;this.instructions.push(Cn),this.hitDetectionInstructions.push(Cn);for(var h=0;h<u;++h){var f=n[h],d=this.coordinates.length,p=this.appendFlatLineCoordinates(t,i,f,o,!0,!l),c=[J.MOVE_TO_LINE_TO,d,p];this.instructions.push(c),this.hitDetectionInstructions.push(c),l&&(this.instructions.push(qf),this.hitDetectionInstructions.push(qf)),i=f}return s&&(this.instructions.push(Ea),this.hitDetectionInstructions.push(Ea)),l&&(this.instructions.push(Mi),this.hitDetectionInstructions.push(Mi)),i},e.prototype.drawCircle=function(t,i){var n=this.state,o=n.fillStyle,a=n.strokeStyle;if(!(o===void 0&&a===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,i),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([J.SET_FILL_STYLE,ti]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var s=t.getFlatCoordinates(),l=t.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,l,!1,!1);var h=[J.CIRCLE,u];this.instructions.push(Cn,h),this.hitDetectionInstructions.push(Cn,h),n.fillStyle!==void 0&&(this.instructions.push(Ea),this.hitDetectionInstructions.push(Ea)),n.strokeStyle!==void 0&&(this.instructions.push(Mi),this.hitDetectionInstructions.push(Mi)),this.endGeometry(i)}},e.prototype.drawPolygon=function(t,i){var n=this.state,o=n.fillStyle,a=n.strokeStyle;if(!(o===void 0&&a===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,i),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([J.SET_FILL_STYLE,ti]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var s=t.getEnds(),l=t.getOrientedFlatCoordinates(),u=t.getStride();this.drawFlatCoordinatess_(l,0,s,u),this.endGeometry(i)}},e.prototype.drawMultiPolygon=function(t,i){var n=this.state,o=n.fillStyle,a=n.strokeStyle;if(!(o===void 0&&a===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,i),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([J.SET_FILL_STYLE,ti]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([J.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var s=t.getEndss(),l=t.getOrientedFlatCoordinates(),u=t.getStride(),h=0,f=0,d=s.length;f<d;++f)h=this.drawFlatCoordinatess_(l,h,s[f],u);this.endGeometry(i)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(t!==0)for(var i=this.coordinates,n=0,o=i.length;n<o;++n)i[n]=xn(i[n],t);return r.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state,i=t.fillStyle;i!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)},e}(_o);const Kf=j_;function B_(r,e,t,i,n){var o=t,a=t,s=0,l=0,u=t,h,f,d,p,c,g,m,_,v,y;for(f=t;f<i;f+=n){var x=e[f],k=e[f+1];c!==void 0&&(v=x-c,y=k-g,p=Math.sqrt(v*v+y*y),m!==void 0&&(l+=d,h=Math.acos((m*v+_*y)/(d*p)),h>r&&(l>s&&(s=l,o=u,a=f),l=0,u=f-n)),d=p,m=v,_=y),c=x,g=k}return l+=p,l>s?[u,f]:[o,a]}var U_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ta={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},V_=function(r){U_(e,r);function e(t,i,n,o){var a=r.call(this,t,i,n,o)||this;return a.labels_=null,a.text_="",a.textOffsetX_=0,a.textOffsetY_=0,a.textRotateWithView_=void 0,a.textRotation_=0,a.textFillState_=null,a.fillStates={},a.textStrokeState_=null,a.strokeStates={},a.textState_={},a.textStates={},a.textKey_="",a.fillKey_="",a.strokeKey_="",a.declutterImageWithText_=void 0,a}return e.prototype.finish=function(){var t=r.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},e.prototype.drawText=function(t,i){var n=this.textFillState_,o=this.textStrokeState_,a=this.textState_;if(!(this.text_===""||!a||!n&&!o)){var s=this.coordinates,l=s.length,u=t.getType(),h=null,f=t.getStride();if(a.placement===Ff.LINE&&(u==I.LINE_STRING||u==I.MULTI_LINE_STRING||u==I.POLYGON||u==I.MULTI_POLYGON)){if(!Ht(this.getBufferedMaxExtent(),t.getExtent()))return;var d=void 0;if(h=t.getFlatCoordinates(),u==I.LINE_STRING)d=[h.length];else if(u==I.MULTI_LINE_STRING)d=t.getEnds();else if(u==I.POLYGON)d=t.getEnds().slice(0,1);else if(u==I.MULTI_POLYGON){var p=t.getEndss();d=[];for(var c=0,g=p.length;c<g;++c)d.push(p[c][0])}this.beginGeometry(t,i);for(var m=a.textAlign,_=0,v=void 0,y=0,x=d.length;y<x;++y){if(m==null){var k=B_(a.maxAngle,h,_,d[y],f);_=k[0],v=k[1]}else v=d[y];for(var c=_;c<v;c+=f)s.push(h[c],h[c+1]);var E=s.length;_=d[y],this.drawChars_(l,E),l=E}this.endGeometry(i)}else{var T=a.overflow?null:[];switch(u){case I.POINT:case I.MULTI_POINT:h=t.getFlatCoordinates();break;case I.LINE_STRING:h=t.getFlatMidpoint();break;case I.CIRCLE:h=t.getCenter();break;case I.MULTI_LINE_STRING:h=t.getFlatMidpoints(),f=2;break;case I.POLYGON:h=t.getFlatInteriorPoint(),a.overflow||T.push(h[2]/this.resolution),f=3;break;case I.MULTI_POLYGON:var w=t.getFlatInteriorPoints();h=[];for(var c=0,g=w.length;c<g;c+=3)a.overflow||T.push(w[c+2]/this.resolution),h.push(w[c],w[c+1]);if(h.length===0)return;f=2;break}var E=this.appendFlatPointCoordinates(h,f);if(E===l)return;if(T&&(E-l)/2!==h.length/f){var C=l/2;T=T.filter(function(et,A){var q=s[(C+A)*2]===h[A*f]&&s[(C+A)*2+1]===h[A*f+1];return q||--C,q})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,i);var R=a.padding;if(R!=yn&&(a.scale[0]<0||a.scale[1]<0)){var P=a.padding[0],M=a.padding[1],L=a.padding[2],U=a.padding[3];a.scale[0]<0&&(M=-M,U=-U),a.scale[1]<0&&(P=-P,L=-L),R=[P,M,L,U]}var B=this.pixelRatio;this.instructions.push([J.DRAW_IMAGE,l,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,R==yn?yn:R.map(function(et){return et*B}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,T]);var Y=1/B;this.hitDetectionInstructions.push([J.DRAW_IMAGE,l,E,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[Y,Y],NaN,this.declutterImageWithText_,R,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,T]),this.endGeometry(i)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,i=this.textState_,n=this.textFillState_,o=this.strokeKey_;t&&(o in this.strokeStates||(this.strokeStates[o]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var a=this.textKey_;a in this.textStates||(this.textStates[a]={font:i.font,textAlign:i.textAlign||so,textBaseline:i.textBaseline||fa,scale:i.scale});var s=this.fillKey_;n&&(s in this.fillStates||(this.fillStates[s]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,i){var n=this.textStrokeState_,o=this.textState_,a=this.strokeKey_,s=this.textKey_,l=this.fillKey_;this.saveTextStates_();var u=this.pixelRatio,h=Ta[o.textBaseline],f=this.textOffsetY_*u,d=this.text_,p=n?n.lineWidth*Math.abs(o.scale[0])/2:0;this.instructions.push([J.DRAW_CHARS,t,i,h,o.overflow,l,o.maxAngle,u,f,a,p*u,d,s,1]),this.hitDetectionInstructions.push([J.DRAW_CHARS,t,i,h,o.overflow,l,o.maxAngle,1,f,a,p,d,s,1/u])},e.prototype.setTextStyle=function(t,i){var n,o,a;if(!t)this.text_="";else{var s=t.getFill();s?(o=this.textFillState_,o||(o={},this.textFillState_=o),o.fillStyle=Ze(s.getColor()||ti)):(o=null,this.textFillState_=o);var l=t.getStroke();if(!l)a=null,this.textStrokeState_=a;else{a=this.textStrokeState_,a||(a={},this.textStrokeState_=a);var u=l.getLineDash(),h=l.getLineDashOffset(),f=l.getWidth(),d=l.getMiterLimit();a.lineCap=l.getLineCap()||ha,a.lineDash=u?u.slice():no,a.lineDashOffset=h===void 0?ro:h,a.lineJoin=l.getLineJoin()||cr,a.lineWidth=f===void 0?lo:f,a.miterLimit=d===void 0?oo:d,a.strokeStyle=Ze(l.getColor()||ao)}n=this.textState_;var p=t.getFont()||nf;Sm(p);var c=t.getScaleArray();n.overflow=t.getOverflow(),n.font=p,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.textBaseline=t.getTextBaseline()||fa,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||yn,n.scale=c===void 0?[1,1]:c;var g=t.getOffsetX(),m=t.getOffsetY(),_=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=g===void 0?0:g,this.textOffsetY_=m===void 0?0:m,this.textRotateWithView_=_===void 0?!1:_,this.textRotation_=v===void 0?0:v,this.strokeKey_=a?(typeof a.strokeStyle=="string"?a.strokeStyle:Z(a.strokeStyle))+a.lineCap+a.lineDashOffset+"|"+a.lineWidth+a.lineJoin+a.miterLimit+"["+a.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.textBaseline||"?"),this.fillKey_=o?typeof o.fillStyle=="string"?o.fillStyle:"|"+Z(o.fillStyle):""}this.declutterImageWithText_=i},e}(_o),Y_={Circle:Kf,Default:_o,Image:A_,LineString:N_,Polygon:Kf,Text:V_},X_=function(){function r(e,t,i,n){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return r.prototype.finish=function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var i=this.buildersByZIndex_[t];for(var n in i){var o=i[n].finish();e[t][n]=o}}return e},r.prototype.getBuilder=function(e,t){var i=e!==void 0?e.toString():"0",n=this.buildersByZIndex_[i];n===void 0&&(n={},this.buildersByZIndex_[i]=n);var o=n[t];if(o===void 0){var a=Y_[t];o=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[t]=o}return o},r}();const Ca=X_;var W_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),q_=function(r){W_(e,r);function e(t){var i=r.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=t,i.declutterExecutorGroup=null,i}return e.prototype.getFeatures=function(t){return $()},e.prototype.prepareFrame=function(t){return $()},e.prototype.renderFrame=function(t,i){return $()},e.prototype.loadedTileCallback=function(t,i,n){t[i]||(t[i]={}),t[i][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,i,n){return function(o,a){var s=this.loadedTileCallback.bind(this,n,o);return t.forEachLoadedTile(i,o,a,s)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,i,n,o,a){},e.prototype.getDataAtPixel=function(t,i,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){var i=t.target;i.getState()===Dt.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var i=t.getState();return i!=Dt.LOADED&&i!=Dt.ERROR&&t.addEventListener(H.CHANGE,this.boundHandleImageChange_),i==Dt.IDLE&&(t.load(),i=t.getState()),i==Dt.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==dn.READY&&t.changed()},e}(bh);const Z_=q_;var K_=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),H_=function(r){K_(e,r);function e(t){var i=r.call(this,t)||this;return i.container=null,i.renderedResolution,i.tempTransform=Ie(),i.pixelTransform=Ie(),i.inversePixelTransform=Ie(),i.context=null,i.containerReused=!1,i}return e.prototype.useContainer=function(t,i,n){var o=this.getLayer().getClassName(),a,s;if(t&&t.style.opacity===xs(n)&&t.className===o){var l=t.firstElementChild;l instanceof HTMLCanvasElement&&(s=l.getContext("2d"))}if(s&&s.canvas.style.transform===i?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){a=document.createElement("div"),a.className=o;var u=a.style;u.position="absolute",u.width="100%",u.height="100%",s=be();var l=s.canvas;a.appendChild(l),u=l.style,u.position="absolute",u.left="0",u.transformOrigin="top left",this.container=a,this.context=s}},e.prototype.clipUnrotated=function(t,i,n){var o=Ti(n),a=ra(n),s=na(n),l=ia(n);Kt(i.coordinateToPixelTransform,o),Kt(i.coordinateToPixelTransform,a),Kt(i.coordinateToPixelTransform,s),Kt(i.coordinateToPixelTransform,l);var u=this.inversePixelTransform;Kt(u,o),Kt(u,a),Kt(u,s),Kt(u,l),t.save(),t.beginPath(),t.moveTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(l[0]),Math.round(l[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,i,n){var o=this.getLayer();if(o.hasListener(t)){var a=new ef(t,this.inversePixelTransform,n,i);o.dispatchEvent(a)}},e.prototype.preRender=function(t,i){this.dispatchRenderEvent_(fn.PRERENDER,t,i)},e.prototype.postRender=function(t,i){this.dispatchRenderEvent_(fn.POSTRENDER,t,i)},e.prototype.getRenderTransform=function(t,i,n,o,a,s,l){var u=a/2,h=s/2,f=o/i,d=-f,p=-t[0]+l,c=-t[1];return We(this.tempTransform,u,h,f,d,-n,p,c)},e.prototype.getDataAtPixel=function(t,i,n){var o=Kt(this.inversePixelTransform,t.slice()),a=this.context,s=this.getLayer(),l=s.getExtent();if(l){var u=Kt(i.pixelToCoordinateTransform,t.slice());if(!ea(l,u))return null}var h;try{var f=Math.round(o[0]),d=Math.round(o[1]),p=document.createElement("canvas"),c=p.getContext("2d");p.width=1,p.height=1,c.clearRect(0,0,1,1),c.drawImage(a.canvas,f,d,1,1,0,0,1,1),h=c.getImageData(0,0,1,1).data}catch(g){return g.name==="SecurityError"?new Uint8Array:h}return h[3]===0?null:h},e}(Z_);const Hf=H_,ft={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function $_(r,e,t,i,n,o,a,s,l,u,h,f){var d=r[e],p=r[e+1],c=0,g=0,m=0,_=0;function v(){c=d,g=p,e+=i,d=r[e],p=r[e+1],_+=m,m=Math.sqrt((d-c)*(d-c)+(p-g)*(p-g))}do v();while(e<t-i&&_+m<o);for(var y=m===0?0:(o-_)/m,x=Qe(c,d,y),k=Qe(g,p,y),E=e-i,T=_,w=o+s*l(u,n,h);e<t-i&&_+m<w;)v();y=m===0?0:(w-_)/m;var C=Qe(c,d,y),R=Qe(g,p,y),P;if(f){var M=[x,k,C,R];Js(M,0,4,2,f,M,M),P=M[0]>M[2]}else P=x>C;var L=Math.PI,U=[],B=E+i===e;e=E,m=0,_=T,d=r[e],p=r[e+1];var Y;if(B){v(),Y=Math.atan2(p-g,d-c),P&&(Y+=Y>0?-L:L);var X=(C+x)/2,et=(R+k)/2;return U[0]=[X,et,(w-o)/2,Y,n],U}for(var A=0,q=n.length;A<q;){v();var N=Math.atan2(p-g,d-c);if(P&&(N+=N>0?-L:L),Y!==void 0){var O=N-Y;if(O+=O>L?-2*L:O<-L?2*L:0,Math.abs(O)>a)return null}Y=N;for(var tt=A,b=0;A<q;++A){var z=P?q-A-1:A,W=s*l(u,n[z],h);if(e+i<t&&_+m<o+b+W/2)break;b+=W}if(A!==tt){var S=P?n.substring(q-tt,q-A):n.substring(tt,A);y=m===0?0:(o+b/2-_)/m;var X=Qe(c,d,y),et=Qe(g,p,y);U.push([X,et,b/2,N,S]),o+=b}}return U}var kr=we(),Li=[],oi=[],ai=[],Ai=[];function $f(r){return r[3].declutterBox}var J_=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Jf(r,e){return(e==="start"||e==="end")&&!J_.test(r)&&(e=e==="start"?"left":"right"),Ta[e]}var Q_=function(){function r(e,t,i,n){this.overlaps=i,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=Ie(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return r.prototype.createLabel=function(e,t,i,n){var o=e+t+i+n;if(this.labels_[o])return this.labels_[o];var a=n?this.strokeStates[n]:null,s=i?this.fillStates[i]:null,l=this.textStates[t],u=this.pixelRatio,h=[l.scale[0]*u,l.scale[1]*u],f=Jf(e,l.textAlign||so),d=n&&a.lineWidth?a.lineWidth:0,p=e.split(`
33
- `),c=p.length,g=[],m=Im(l.font,p,g),_=Om(l.font),v=_*c,y=m+d,x=[],k=(y+2)*h[0],E=(v+d)*h[1],T={width:k<0?Math.floor(k):Math.ceil(k),height:E<0?Math.floor(E):Math.ceil(E),contextInstructions:x};if((h[0]!=1||h[1]!=1)&&x.push("scale",h),x.push("font",l.font),n){x.push("strokeStyle",a.strokeStyle),x.push("lineWidth",d),x.push("lineCap",a.lineCap),x.push("lineJoin",a.lineJoin),x.push("miterLimit",a.miterLimit);var w=Ko?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;w.prototype.setLineDash&&(x.push("setLineDash",[a.lineDash]),x.push("lineDashOffset",a.lineDashOffset))}i&&x.push("fillStyle",s.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");var C=.5-f,R=f*y+C*d,P;if(n)for(P=0;P<c;++P)x.push("strokeText",[p[P],R+C*g[P],.5*(d+_)+P*_]);if(i)for(P=0;P<c;++P)x.push("fillText",[p[P],R+C*g[P],.5*(d+_)+P*_]);return this.labels_[o]=T,T},r.prototype.replayTextBackground_=function(e,t,i,n,o,a,s){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,i),e.lineTo.apply(e,n),e.lineTo.apply(e,o),e.lineTo.apply(e,t),a&&(this.alignFill_=a[2],this.fill_(e)),s&&(this.setStrokeStyle_(e,s),e.stroke())},r.prototype.calculateImageOrLabelDimensions_=function(e,t,i,n,o,a,s,l,u,h,f,d,p,c,g,m){s*=d[0],l*=d[1];var _=i-s,v=n-l,y=o+u>e?e-u:o,x=a+h>t?t-h:a,k=c[3]+y*d[0]+c[1],E=c[0]+x*d[1]+c[2],T=_-c[3],w=v-c[0];(g||f!==0)&&(Li[0]=T,Ai[0]=T,Li[1]=w,oi[1]=w,oi[0]=T+k,ai[0]=oi[0],ai[1]=w+E,Ai[1]=ai[1]);var C;return f!==0?(C=We(Ie(),i,n,1,1,f,-i,-n),Kt(C,Li),Kt(C,oi),Kt(C,ai),Kt(C,Ai),Ae(Math.min(Li[0],oi[0],ai[0],Ai[0]),Math.min(Li[1],oi[1],ai[1],Ai[1]),Math.max(Li[0],oi[0],ai[0],Ai[0]),Math.max(Li[1],oi[1],ai[1],Ai[1]),kr)):Ae(Math.min(T,T+k),Math.min(w,w+E),Math.max(T,T+k),Math.max(w,w+E),kr),p&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:u,originY:h,declutterBox:{minX:kr[0],minY:kr[1],maxX:kr[2],maxY:kr[3],value:m},canvasTransform:C,scale:d}},r.prototype.replayImageOrLabel_=function(e,t,i,n,o,a,s){var l=!!(a||s),u=n.declutterBox,h=e.canvas,f=s?s[2]*n.scale[0]/2:0,d=u.minX-f<=h.width/t&&u.maxX+f>=0&&u.minY-f<=h.height/t&&u.maxY+f>=0;return d&&(l&&this.replayTextBackground_(e,Li,oi,ai,Ai,a,s),zm(e,n.canvasTransform,o,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},r.prototype.fill_=function(e){if(this.alignFill_){var t=Kt(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(t[0]%i,t[1]%i),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()},r.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.setLineDash&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},r.prototype.drawLabelWithPointPlacement_=function(e,t,i,n){var o=this.textStates[t],a=this.createLabel(e,t,n,i),s=this.strokeStates[i],l=this.pixelRatio,u=Jf(e,o.textAlign||so),h=Ta[o.textBaseline||fa],f=s&&s.lineWidth?s.lineWidth:0,d=a.width/l-2*o.scale[0],p=u*d+2*(.5-u)*f,c=h*a.height/l+2*(.5-h)*f;return{label:a,anchorX:p,anchorY:c}},r.prototype.execute_=function(e,t,i,n,o,a,s,l){var u;this.pixelCoordinates_&&an(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=Si(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),hm(this.renderedTransform_,i));for(var h=0,f=n.length,d=0,p,c,g,m,_,v,y,x,k,E,T,w,C=0,R=0,P=null,M=null,L=this.coordinateCache_,U=this.viewRotation_,B=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,Y={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:U},X=this.instructions!=n||this.overlaps?0:200,et,A,q,N;h<f;){var O=n[h],tt=O[0];switch(tt){case J.BEGIN_GEOMETRY:et=O[1],N=O[3],et.getGeometry()?s!==void 0&&!Ht(s,N.getExtent())?h=O[2]+1:++h:h=O[2];break;case J.BEGIN_PATH:C>X&&(this.fill_(e),C=0),R>X&&(e.stroke(),R=0),!C&&!R&&(e.beginPath(),m=NaN,_=NaN),++h;break;case J.CIRCLE:d=O[1];var b=u[d],z=u[d+1],W=u[d+2],S=u[d+3],K=W-b,V=S-z,gt=Math.sqrt(K*K+V*V);e.moveTo(b+gt,z),e.arc(b,z,gt,0,2*Math.PI,!0),++h;break;case J.CLOSE_PATH:e.closePath(),++h;break;case J.CUSTOM:d=O[1],p=O[2];var ut=O[3],_t=O[4],bt=O.length==6?O[5]:void 0;Y.geometry=ut,Y.feature=et,h in L||(L[h]=[]);var Pt=L[h];bt?bt(u,d,p,2,Pt):(Pt[0]=u[d],Pt[1]=u[d+1],Pt.length=2),_t(Pt,Y),++h;break;case J.DRAW_IMAGE:d=O[1],p=O[2],x=O[3],c=O[4],g=O[5];var It=O[6],Ut=O[7],D=O[8],at=O[9],ot=O[10],kt=O[11],pt=O[12],yt=O[13],st=O[14];if(!x&&O.length>=19){k=O[18],E=O[19],T=O[20],w=O[21];var St=this.drawLabelWithPointPlacement_(k,E,T,w);x=St.label,O[3]=x;var Nt=O[22];c=(St.anchorX-Nt)*this.pixelRatio,O[4]=c;var Gt=O[23];g=(St.anchorY-Gt)*this.pixelRatio,O[5]=g,It=x.height,O[6]=It,yt=x.width,O[13]=yt}var wt=void 0;O.length>24&&(wt=O[24]);var ht=void 0,Ot=void 0,mt=void 0;O.length>16?(ht=O[15],Ot=O[16],mt=O[17]):(ht=yn,Ot=!1,mt=!1),ot&&B?kt+=U:!ot&&!B&&(kt-=U);for(var Tt=0;d<p;d+=2)if(!(wt&&wt[Tt++]<yt/this.pixelRatio)){var jt=this.calculateImageOrLabelDimensions_(x.width,x.height,u[d],u[d+1],yt,It,c,g,D,at,kt,pt,o,ht,Ot||mt,et),Vt=[e,t,x,jt,Ut,Ot?P:null,mt?M:null],zt=void 0,Jt=void 0;if(l&&st){var Mt=p-d;if(!st[Mt]){st[Mt]=Vt;continue}if(zt=st[Mt],delete st[Mt],Jt=$f(zt),l.collides(Jt))continue}l&&l.collides(jt.declutterBox)||(zt&&(l&&l.insert(Jt),this.replayImageOrLabel_.apply(this,zt)),l&&l.insert(jt.declutterBox),this.replayImageOrLabel_.apply(this,Vt))}++h;break;case J.DRAW_CHARS:var Qt=O[1],Ki=O[2],re=O[3],ci=O[4];w=O[5];var Me=O[6],Ge=O[7],gi=O[8];T=O[9];var Do=O[10];k=O[11],E=O[12];var jr=[O[13],O[13]],Kn=this.textStates[E],mi=Kn.font,vi=[Kn.scale[0]*Ge,Kn.scale[1]*Ge],Hn=void 0;mi in this.widths_?Hn=this.widths_[mi]:(Hn={},this.widths_[mi]=Hn);var ts=zf(u,Qt,Ki,2),es=Math.abs(vi[0])*of(mi,k,Hn);if(ci||es<=ts){var Yu=this.textStates[E].textAlign,is=(ts-es)*Ta[Yu],ce=$_(u,Qt,Ki,2,k,is,Me,Math.abs(vi[0]),of,mi,Hn,B?0:this.viewRotation_);t:if(ce){var _i=[],ge=void 0,$n=void 0,Hi=void 0,oe=void 0,he=void 0;if(T)for(ge=0,$n=ce.length;ge<$n;++ge){he=ce[ge],Hi=he[4],oe=this.createLabel(Hi,E,"",T),c=he[2]+(vi[0]<0?-Do:Do),g=re*oe.height+(.5-re)*2*Do*vi[1]/vi[0]-gi;var jt=this.calculateImageOrLabelDimensions_(oe.width,oe.height,he[0],he[1],oe.width,oe.height,c,g,0,0,he[3],jr,!1,yn,!1,et);if(l&&l.collides(jt.declutterBox))break t;_i.push([e,t,oe,jt,1,null,null])}if(w)for(ge=0,$n=ce.length;ge<$n;++ge){he=ce[ge],Hi=he[4],oe=this.createLabel(Hi,E,w,""),c=he[2],g=re*oe.height-gi;var jt=this.calculateImageOrLabelDimensions_(oe.width,oe.height,he[0],he[1],oe.width,oe.height,c,g,0,0,he[3],jr,!1,yn,!1,et);if(l&&l.collides(jt.declutterBox))break t;_i.push([e,t,oe,jt,1,null,null])}l&&l.load(_i.map($f));for(var Br=0,te=_i.length;Br<te;++Br)this.replayImageOrLabel_.apply(this,_i[Br])}}++h;break;case J.END_GEOMETRY:if(a!==void 0){et=O[1];var $i=a(et,N);if($i)return $i}++h;break;case J.FILL:X?C++:this.fill_(e),++h;break;case J.MOVE_TO_LINE_TO:for(d=O[1],p=O[2],A=u[d],q=u[d+1],v=A+.5|0,y=q+.5|0,(v!==m||y!==_)&&(e.moveTo(A,q),m=v,_=y),d+=2;d<p;d+=2)A=u[d],q=u[d+1],v=A+.5|0,y=q+.5|0,(d==p-2||v!==m||y!==_)&&(e.lineTo(A,q),m=v,_=y);++h;break;case J.SET_FILL_STYLE:P=O,this.alignFill_=O[2],C&&(this.fill_(e),C=0,R&&(e.stroke(),R=0)),e.fillStyle=O[1],++h;break;case J.SET_STROKE_STYLE:M=O,R&&(e.stroke(),R=0),this.setStrokeStyle_(e,O),++h;break;case J.STROKE:X?R++:e.stroke(),++h;break;default:++h;break}}C&&this.fill_(e),R&&e.stroke()},r.prototype.execute=function(e,t,i,n,o,a){this.viewRotation_=n,this.execute_(e,t,i,this.instructions,o,void 0,void 0,a)},r.prototype.executeHitDetection=function(e,t,i,n,o){return this.viewRotation_=i,this.execute_(e,1,t,this.hitDetectionInstructions,!0,n,o)},r}();const ty=Q_;var zl=[ft.POLYGON,ft.CIRCLE,ft.LINE_STRING,ft.IMAGE,ft.TEXT,ft.DEFAULT],ey=function(){function r(e,t,i,n,o,a){this.maxExtent_=e,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=t,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ie(),this.createExecutors_(o)}return r.prototype.clip=function(e,t){var i=this.getClipCoords(t);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()},r.prototype.createExecutors_=function(e){for(var t in e){var i=this.executorsByZIndex_[t];i===void 0&&(i={},this.executorsByZIndex_[t]=i);var n=e[t];for(var o in n){var a=n[o];i[o]=new ty(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}},r.prototype.hasExecutors=function(e){for(var t in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[t],n=0,o=e.length;n<o;++n)if(e[n]in i)return!0;return!1},r.prototype.forEachFeatureAtCoordinate=function(e,t,i,n,o,a){n=Math.round(n);var s=n*2+1,l=We(this.hitDetectionTransform_,n+.5,n+.5,1/t,-1/t,-i,-e[0],-e[1]),u=!this.hitDetectionContext_;u&&(this.hitDetectionContext_=be(s,s));var h=this.hitDetectionContext_;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):u||h.clearRect(0,0,s,s);var f;this.renderBuffer_!==void 0&&(f=we(),eo(f,e),Ve(f,t*(this.renderBuffer_+n),f));var d=iy(n),p;function c(E,T){for(var w=h.getImageData(0,0,s,s).data,C=0,R=d.length;C<R;C++)if(w[d[C]]>0){if(!a||p!==ft.IMAGE&&p!==ft.TEXT||a.indexOf(E)!==-1){var P=(d[C]-3)/4,M=n-P%s,L=n-(P/s|0),U=o(E,T,M*M+L*L);if(U)return U}h.clearRect(0,0,s,s);break}}var g=Object.keys(this.executorsByZIndex_).map(Number);g.sort(on);var m,_,v,y,x;for(m=g.length-1;m>=0;--m){var k=g[m].toString();for(v=this.executorsByZIndex_[k],_=zl.length-1;_>=0;--_)if(p=zl[_],y=v[p],y!==void 0&&(x=y.executeHitDetection(h,l,i,c,f),x))return x}},r.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var i=t[0],n=t[1],o=t[2],a=t[3],s=[i,n,i,a,o,a,o,n];return Si(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return ln(this.executorsByZIndex_)},r.prototype.execute=function(e,t,i,n,o,a,s){var l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(on),this.maxExtent_&&(e.save(),this.clip(e,i));var u=a||zl,h,f,d,p,c,g;for(s&&l.reverse(),h=0,f=l.length;h<f;++h){var m=l[h].toString();for(c=this.executorsByZIndex_[m],d=0,p=u.length;d<p;++d){var _=u[d];g=c[_],g!==void 0&&g.execute(e,t,i,n,o,s)}}this.maxExtent_&&e.restore()},r}(),Rl={};function iy(r){if(Rl[r]!==void 0)return Rl[r];for(var e=r*2+1,t=r*r,i=new Array(t+1),n=0;n<=r;++n)for(var o=0;o<=r;++o){var a=n*n+o*o;if(a>t)break;var s=i[a];s||(s=[],i[a]=s),s.push(((r+n)*e+(r+o))*4+3),n>0&&s.push(((r-n)*e+(r+o))*4+3),o>0&&(s.push(((r+n)*e+(r-o))*4+3),n>0&&s.push(((r-n)*e+(r-o))*4+3))}for(var l=[],n=0,u=i.length;n<u;++n)i[n]&&l.push.apply(l,i[n]);return Rl[r]=l,l}const Sa=ey;var ny=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),ry=function(r){ny(e,r);function e(t,i,n,o,a,s,l){var u=r.call(this)||this;return u.context_=t,u.pixelRatio_=i,u.extent_=n,u.transform_=o,u.viewRotation_=a,u.squaredTolerance_=s,u.userTransform_=l,u.contextFillState_=null,u.contextStrokeState_=null,u.contextTextState_=null,u.fillState_=null,u.strokeState_=null,u.image_=null,u.imageAnchorX_=0,u.imageAnchorY_=0,u.imageHeight_=0,u.imageOpacity_=0,u.imageOriginX_=0,u.imageOriginY_=0,u.imageRotateWithView_=!1,u.imageRotation_=0,u.imageScale_=[0,0],u.imageWidth_=0,u.text_="",u.textOffsetX_=0,u.textOffsetY_=0,u.textRotateWithView_=!1,u.textRotation_=0,u.textScale_=[0,0],u.textFillState_=null,u.textStrokeState_=null,u.textState_=null,u.pixelCoordinates_=[],u.tmpLocalTransform_=Ie(),u}return e.prototype.drawImages_=function(t,i,n,o){if(!!this.image_){var a=Si(t,i,n,o,this.transform_,this.pixelCoordinates_),s=this.context_,l=this.tmpLocalTransform_,u=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=u*this.imageOpacity_);var h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(var f=0,d=a.length;f<d;f+=2){var p=a[f]-this.imageAnchorX_,c=a[f+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var g=p+this.imageAnchorX_,m=c+this.imageAnchorY_;We(l,g,m,1,1,h,-g,-m),s.setTransform.apply(s,l),s.translate(g,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,p,c,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=u)}},e.prototype.drawText_=function(t,i,n,o){if(!(!this.textState_||this.text_==="")){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var a=Si(t,i,n,o,this.transform_,this.pixelCoordinates_),s=this.context_,l=this.textRotation_;for(this.textRotateWithView_&&(l+=this.viewRotation_);i<n;i+=o){var u=a[i]+this.textOffsetX_,h=a[i+1]+this.textOffsetY_;if(l!==0||this.textScale_[0]!=1||this.textScale_[1]!=1){var f=We(this.tmpLocalTransform_,u,h,1,1,l,-u,-h);s.setTransform.apply(s,f),s.translate(u,h),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&s.strokeText(this.text_,u,h),this.textFillState_&&s.fillText(this.text_,u,h)}}},e.prototype.moveToLineTo_=function(t,i,n,o,a){var s=this.context_,l=Si(t,i,n,o,this.transform_,this.pixelCoordinates_);s.moveTo(l[0],l[1]);var u=l.length;a&&(u-=2);for(var h=2;h<u;h+=2)s.lineTo(l[h],l[h+1]);return a&&s.closePath(),n},e.prototype.drawRings_=function(t,i,n,o){for(var a=0,s=n.length;a<s;++a)i=this.moveToLineTo_(t,i,n[a],o,!0);return i},e.prototype.drawCircle=function(t){if(!!Ht(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var i=uv(t,this.transform_,this.pixelCoordinates_),n=i[2]-i[0],o=i[3]-i[1],a=Math.sqrt(n*n+o*o),s=this.context_;s.beginPath(),s.arc(i[0],i[1],a,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){var i=t.getType();switch(i){case I.POINT:this.drawPoint(t);break;case I.LINE_STRING:this.drawLineString(t);break;case I.POLYGON:this.drawPolygon(t);break;case I.MULTI_POINT:this.drawMultiPoint(t);break;case I.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case I.MULTI_POLYGON:this.drawMultiPolygon(t);break;case I.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case I.CIRCLE:this.drawCircle(t);break}},e.prototype.drawFeature=function(t,i){var n=i.getGeometryFunction()(t);!n||!Ht(this.extent_,n.getExtent())||(this.setStyle(i),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var i=t.getGeometriesArray(),n=0,o=i.length;n<o;++n)this.drawGeometry(i[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var i=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(i,0,i.length,n),this.text_!==""&&this.drawText_(i,0,i.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var i=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(i,0,i.length,n),this.text_!==""&&this.drawText_(i,0,i.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Ht(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates();i.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),i.stroke()}if(this.text_!==""){var o=t.getFlatMidpoint();this.drawText_(o,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var i=t.getExtent();if(!!Ht(this.extent_,i)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,o=t.getFlatCoordinates(),a=0,s=t.getEnds(),l=t.getStride();n.beginPath();for(var u=0,h=s.length;u<h;++u)a=this.moveToLineTo_(o,a,s[u],l,!1);n.stroke()}if(this.text_!==""){var f=t.getFlatMidpoints();this.drawText_(f,0,f.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Ht(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var i=this.context_;i.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&i.fill(),this.strokeState_&&i.stroke()}if(this.text_!==""){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Ht(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getOrientedFlatCoordinates(),o=0,a=t.getEndss(),s=t.getStride();i.beginPath();for(var l=0,u=a.length;l<u;++l){var h=a[l];o=this.drawRings_(n,o,h,s)}this.fillState_&&i.fill(),this.strokeState_&&i.stroke()}if(this.text_!==""){var f=t.getFlatInteriorPoints();this.drawText_(f,0,f.length,2)}}},e.prototype.setContextFillState_=function(t){var i=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,i.fillStyle=t.fillStyle):(i.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var i=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,i.lineCap=t.lineCap),i.setLineDash&&(an(n.lineDash,t.lineDash)||i.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,i.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,i.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,i.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,i.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,i.strokeStyle=t.strokeStyle)):(i.lineCap=t.lineCap,i.setLineDash&&(i.setLineDash(t.lineDash),i.lineDashOffset=t.lineDashOffset),i.lineJoin=t.lineJoin,i.lineWidth=t.lineWidth,i.miterLimit=t.miterLimit,i.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var i=this.context_,n=this.contextTextState_,o=t.textAlign?t.textAlign:so;n?(n.font!=t.font&&(n.font=t.font,i.font=t.font),n.textAlign!=o&&(n.textAlign=o,i.textAlign=o),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,i.textBaseline=t.textBaseline)):(i.font=t.font,i.textAlign=o,i.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:o,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,i){var n=this;if(!t)this.fillState_=null;else{var o=t.getColor();this.fillState_={fillStyle:Ze(o||ti)}}if(!i)this.strokeState_=null;else{var a=i.getColor(),s=i.getLineCap(),l=i.getLineDash(),u=i.getLineDashOffset(),h=i.getLineJoin(),f=i.getWidth(),d=i.getMiterLimit(),p=l||no;this.strokeState_={lineCap:s!==void 0?s:ha,lineDash:this.pixelRatio_===1?p:p.map(function(c){return c*n.pixelRatio_}),lineDashOffset:(u||ro)*this.pixelRatio_,lineJoin:h!==void 0?h:cr,lineWidth:(f!==void 0?f:lo)*this.pixelRatio_,miterLimit:d!==void 0?d:oo,strokeStyle:Ze(a||ao)}}},e.prototype.setImageStyle=function(t){var i;if(!t||!(i=t.getSize())){this.image_=null;return}var n=t.getAnchor(),o=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=i[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=i[0]*this.pixelRatio_},e.prototype.setTextStyle=function(t){if(!t)this.text_="";else{var i=t.getFill();if(!i)this.textFillState_=null;else{var n=i.getColor();this.textFillState_={fillStyle:Ze(n||ti)}}var o=t.getStroke();if(!o)this.textStrokeState_=null;else{var a=o.getColor(),s=o.getLineCap(),l=o.getLineDash(),u=o.getLineDashOffset(),h=o.getLineJoin(),f=o.getWidth(),d=o.getMiterLimit();this.textStrokeState_={lineCap:s!==void 0?s:ha,lineDash:l||no,lineDashOffset:u||ro,lineJoin:h!==void 0?h:cr,lineWidth:f!==void 0?f:lo,miterLimit:d!==void 0?d:oo,strokeStyle:Ze(a||ao)}}var p=t.getFont(),c=t.getOffsetX(),g=t.getOffsetY(),m=t.getRotateWithView(),_=t.getRotation(),v=t.getScaleArray(),y=t.getText(),x=t.getTextAlign(),k=t.getTextBaseline();this.textState_={font:p!==void 0?p:nf,textAlign:x!==void 0?x:so,textBaseline:k!==void 0?k:fa},this.text_=y!==void 0?y:"",this.textOffsetX_=c!==void 0?this.pixelRatio_*c:0,this.textOffsetY_=g!==void 0?this.pixelRatio_*g:0,this.textRotateWithView_=m!==void 0?m:!1,this.textRotation_=_!==void 0?_:0,this.textScale_=[this.pixelRatio_*v[0],this.pixelRatio_*v[1]]}},e}(Zf);const oy=ry;var Te=.5;function Qf(r,e,t,i,n,o,a){var s=r[0]*Te,l=r[1]*Te,u=be(s,l);u.imageSmoothingEnabled=!1;for(var h=u.canvas,f=new oy(u,Te,n,null,a),d=t.length,p=Math.floor((256*256*256-1)/d),c={},g=1;g<=d;++g){var m=t[g-1],_=m.getStyleFunction()||i;if(!!i){var v=_(m,o);if(!!v){Array.isArray(v)||(v=[v]);for(var y=g*p,x="#"+("000000"+y.toString(16)).slice(-6),k=0,E=v.length;k<E;++k){var T=v[k],w=T.getGeometryFunction()(m);if(!(!w||!Ht(n,w.getExtent()))){var C=T.clone(),R=C.getFill();R&&R.setColor(x);var P=C.getStroke();P&&(P.setColor(x),P.setLineDash(null)),C.setText(void 0);var M=T.getImage();if(M&&M.getOpacity()!==0){var L=M.getImageSize();if(!L)continue;var U=be(L[0],L[1],void 0,{alpha:!1}),B=U.canvas;U.fillStyle=x,U.fillRect(0,0,B.width,B.height),C.setImage(new kl({img:B,imgSize:L,anchor:M.getAnchor(),anchorXUnits:Pi.PIXELS,anchorYUnits:Pi.PIXELS,offset:M.getOrigin(),opacity:1,size:M.getSize(),scale:M.getScale(),rotation:M.getRotation(),rotateWithView:M.getRotateWithView()}))}var Y=C.getZIndex()||0,X=c[Y];X||(X={},c[Y]=X,X[I.POLYGON]=[],X[I.CIRCLE]=[],X[I.LINE_STRING]=[],X[I.POINT]=[]),X[w.getType().replace("Multi","")].push(w,C)}}}}}for(var et=Object.keys(c).map(Number).sort(on),g=0,A=et.length;g<A;++g){var X=c[et[g]];for(var q in X)for(var N=X[q],k=0,E=N.length;k<E;k+=2){f.setStyle(N[k+1]);for(var O=0,tt=e.length;O<tt;++O)f.setTransform(e[O]),f.drawGeometry(N[k])}}return u.getImageData(0,0,h.width,h.height)}function td(r,e,t){var i=[];if(t){var n=Math.floor(Math.round(r[0])*Te),o=Math.floor(Math.round(r[1])*Te),a=(Zt(n,0,t.width-1)+Zt(o,0,t.height-1)*t.width)*4,s=t.data[a],l=t.data[a+1],u=t.data[a+2],h=u+256*(l+256*s),f=Math.floor((256*256*256-1)/e.length);h&&h%f===0&&i.push(e[h/f-1])}return i}var ay=.5,ed={Point:cy,LineString:fy,Polygon:my,MultiPoint:gy,MultiLineString:dy,MultiPolygon:py,GeometryCollection:hy,Circle:ly};function sy(r,e){return parseInt(Z(r),10)-parseInt(Z(e),10)}function id(r,e){var t=Pl(r,e);return t*t}function Pl(r,e){return ay*r/e}function ly(r,e,t,i,n){var o=t.getFill(),a=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),ft.CIRCLE);s.setFillStrokeStyle(o,a),s.drawCircle(e,i)}var l=t.getText();if(l&&l.getText()){var u=(n||r).getBuilder(t.getZIndex(),ft.TEXT);u.setTextStyle(l),u.drawText(e,i)}}function Oa(r,e,t,i,n,o,a){var s=!1,l=t.getImage();if(l){var u=l.getImageState();u==Dt.LOADED||u==Dt.ERROR?l.unlistenImageChange(n):(u==Dt.IDLE&&l.load(),u=l.getImageState(),l.listenImageChange(n),s=!0)}return uy(r,e,t,i,o,a),s}function uy(r,e,t,i,n,o){var a=t.getGeometryFunction()(e);if(!!a){var s=a.simplifyTransformed(i,n),l=t.getRenderer();if(l)nd(r,s,t,e);else{var u=ed[s.getType()];u(r,s,t,e,o)}}}function nd(r,e,t,i){if(e.getType()==I.GEOMETRY_COLLECTION){for(var n=e.getGeometries(),o=0,a=n.length;o<a;++o)nd(r,n[o],t,i);return}var s=r.getBuilder(t.getZIndex(),ft.DEFAULT);s.drawCustom(e,i,t.getRenderer(),t.getHitDetectionRenderer())}function hy(r,e,t,i,n){var o=e.getGeometriesArray(),a,s;for(a=0,s=o.length;a<s;++a){var l=ed[o[a].getType()];l(r,o[a],t,i,n)}}function fy(r,e,t,i,n){var o=t.getStroke();if(o){var a=r.getBuilder(t.getZIndex(),ft.LINE_STRING);a.setFillStrokeStyle(null,o),a.drawLineString(e,i)}var s=t.getText();if(s&&s.getText()){var l=(n||r).getBuilder(t.getZIndex(),ft.TEXT);l.setTextStyle(s),l.drawText(e,i)}}function dy(r,e,t,i,n){var o=t.getStroke();if(o){var a=r.getBuilder(t.getZIndex(),ft.LINE_STRING);a.setFillStrokeStyle(null,o),a.drawMultiLineString(e,i)}var s=t.getText();if(s&&s.getText()){var l=(n||r).getBuilder(t.getZIndex(),ft.TEXT);l.setTextStyle(s),l.drawText(e,i)}}function py(r,e,t,i,n){var o=t.getFill(),a=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),ft.POLYGON);s.setFillStrokeStyle(o,a),s.drawMultiPolygon(e,i)}var l=t.getText();if(l&&l.getText()){var u=(n||r).getBuilder(t.getZIndex(),ft.TEXT);u.setTextStyle(l),u.drawText(e,i)}}function cy(r,e,t,i,n){var o=t.getImage(),a=t.getText(),s;if(n&&(r=n,s=o&&a&&a.getText()?{}:void 0),o){if(o.getImageState()!=Dt.LOADED)return;var l=r.getBuilder(t.getZIndex(),ft.IMAGE);l.setImageStyle(o,s),l.drawPoint(e,i)}if(a&&a.getText()){var u=r.getBuilder(t.getZIndex(),ft.TEXT);u.setTextStyle(a,s),u.drawText(e,i)}}function gy(r,e,t,i,n){var o=t.getImage(),a=t.getText(),s;if(n&&(r=n,s=o&&a&&a.getText()?{}:void 0),o){if(o.getImageState()!=Dt.LOADED)return;var l=r.getBuilder(t.getZIndex(),ft.IMAGE);l.setImageStyle(o,s),l.drawMultiPoint(e,i)}if(a&&a.getText()){var u=(n||r).getBuilder(t.getZIndex(),ft.TEXT);u.setTextStyle(a,s),u.drawText(e,i)}}function my(r,e,t,i,n){var o=t.getFill(),a=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),ft.POLYGON);s.setFillStrokeStyle(o,a),s.drawPolygon(e,i)}var l=t.getText();if(l&&l.getText()){var u=(n||r).getBuilder(t.getZIndex(),ft.TEXT);u.setTextStyle(l),u.drawText(e,i)}}var vy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),_y=function(r){vy(e,r);function e(t){var i=r.call(this,t)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.animatingOrInteracting_,i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=we(),i.wrappedRenderedExtent_=we(),i.renderedRotation_,i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return e.prototype.useContainer=function(t,i,n){n<1&&(t=null),r.prototype.useContainer.call(this,t,i,n)},e.prototype.renderWorlds=function(t,i,n){var o=i.extent,a=i.viewState,s=a.center,l=a.resolution,u=a.projection,h=a.rotation,f=u.getExtent(),d=this.getLayer().getSource(),p=i.pixelRatio,c=i.viewHints,g=!(c[Xt.ANIMATING]||c[Xt.INTERACTING]),m=this.context,_=Math.round(i.size[0]*p),v=Math.round(i.size[1]*p),y=d.getWrapX()&&u.canWrapX(),x=y?Yt(f):null,k=y?Math.ceil((o[2]-f[2])/x)+1:1,E=y?Math.floor((o[0]-f[0])/x):0;do{var T=this.getRenderTransform(s,l,h,p,_,v,E*x);t.execute(m,1,T,h,g,void 0,n)}while(++E<k)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,i){var n=t.pixelRatio,o=t.layerStatesArray[t.layerIndex];fm(this.pixelTransform,1/n,1/n),Us(this.inversePixelTransform,this.pixelTransform);var a=$h(this.pixelTransform);this.useContainer(i,a,o.opacity);var s=this.context,l=s.canvas,u=this.replayGroup_,h=this.declutterExecutorGroup;if((!u||u.isEmpty())&&(!h||h.isEmpty()))return null;var f=Math.round(t.size[0]*n),d=Math.round(t.size[1]*n);l.width!=f||l.height!=d?(l.width=f,l.height=d,l.style.transform!==a&&(l.style.transform=a)):this.containerReused||s.clearRect(0,0,f,d),this.preRender(s,t);var p=t.viewState;p.projection;var c=!1,g=!0;if(o.extent&&this.clipping){var m=Ci(o.extent);g=Ht(m,t.extent),c=g&&!gn(m,t.extent),c&&this.clipUnrotated(s,t,m)}g&&this.renderWorlds(u,t),c&&s.restore(),this.postRender(s,t);var _=xs(o.opacity),v=this.container;return _!==v.style.opacity&&(v.style.opacity=_),this.renderedRotation_!==p.rotation&&(this.renderedRotation_=p.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(i){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];Kt(this.pixelTransform,n);var o=this.renderedCenter_,a=this.renderedResolution_,s=this.renderedRotation_,l=this.renderedProjection_,u=this.wrappedRenderedExtent_,h=this.getLayer(),f=[],d=n[0]*Te,p=n[1]*Te;f.push(this.getRenderTransform(o,a,s,Te,d,p,0).slice());var c=h.getSource(),g=l.getExtent();if(c.getWrapX()&&l.canWrapX()&&!gn(g,u)){for(var m=u[0],_=Yt(g),v=0,y=void 0;m<g[0];)--v,y=_*v,f.push(this.getRenderTransform(o,a,s,Te,d,p,y).slice()),m+=_;for(v=0,m=u[2];m>g[2];)++v,y=_*v,f.push(this.getRenderTransform(o,a,s,Te,d,p,y).slice()),m-=_}this.hitDetectionImageData_=Qf(n,f,this.renderedFeatures_,h.getStyleFunction(),u,a,s)}i(td(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,i,n,o,a){var s=this;if(!!this.replayGroup_){var l=i.viewState.resolution,u=i.viewState.rotation,h=this.getLayer(),f={},d=function(g,m,_){var v=Z(g),y=f[v];if(y){if(y!==!0&&_<y.distanceSq){if(_===0)return f[v]=!0,a.splice(a.lastIndexOf(y),1),o(g,h,m);y.geometry=m,y.distanceSq=_}}else{if(_===0)return f[v]=!0,o(g,h,m);a.push(f[v]={feature:g,layer:h,geometry:m,distanceSq:_,callback:o})}},p,c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(function(g){return p=g.forEachFeatureAtCoordinate(t,l,u,n,d,g===s.declutterExecutorGroup?i.declutterTree.all().map(function(m){return m.value}):null)}),p}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var i=this.getLayer(),n=i.getSource();if(!n)return!1;var o=t.viewHints[Xt.ANIMATING],a=t.viewHints[Xt.INTERACTING],s=i.getUpdateWhileAnimating(),l=i.getUpdateWhileInteracting();if(!this.dirty_&&!s&&o||!l&&a)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var u=t.extent,h=t.viewState,f=h.projection,d=h.resolution,p=t.pixelRatio,c=i.getRevision(),g=i.getRenderBuffer(),m=i.getRenderOrder();m===void 0&&(m=sy);var _=h.center.slice(),v=Ve(u,g*d),y=v.slice(),x=[v.slice()],k=f.getExtent();if(n.getWrapX()&&f.canWrapX()&&!gn(k,t.extent)){var E=Yt(k),T=Math.max(Yt(v)/2,E);v[0]=k[0]-T,v[2]=k[2]+T,Ls(_,f);var w=Jg(x[0],f);w[0]<k[0]&&w[2]<k[2]?x.push([w[0]+E,w[1],w[2]+E,w[3]]):w[0]>k[0]&&w[2]>k[2]&&x.push([w[0]-E,w[1],w[2]-E,w[3]])}if(!this.dirty_&&this.renderedResolution_==d&&this.renderedRevision_==c&&this.renderedRenderOrder_==m&&gn(this.wrappedRenderedExtent_,v))return an(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var C=new Ca(Pl(d,p),v,d,p),R;this.getLayer().getDeclutter()&&(R=new Ca(Pl(d,p),v,d,p));for(var P,M,L,M=0,L=x.length;M<L;++M)n.loadFeatures(x[M],d,f);var U=id(d,p),B=function(q){var N,O=q.getStyleFunction()||i.getStyleFunction();if(O&&(N=O(q,d)),N){var tt=this.renderFeature(q,U,N,C,P,R);this.dirty_=this.dirty_||tt}}.bind(this),Y=Gs(v),X=n.getFeaturesInExtent(Y);m&&X.sort(m);for(var M=0,L=X.length;M<L;++M)B(X[M]);this.renderedFeatures_=X;var et=C.finish(),A=new Sa(v,d,p,n.getOverlaps(),et,i.getRenderBuffer());return R&&(this.declutterExecutorGroup=new Sa(v,d,p,n.getOverlaps(),R.finish(),i.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=c,this.renderedRenderOrder_=m,this.renderedExtent_=y,this.wrappedRenderedExtent_=v,this.renderedCenter_=_,this.renderedProjection_=f,this.replayGroup_=A,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,i,n,o,a,s){if(!n)return!1;var l=!1;if(Array.isArray(n))for(var u=0,h=n.length;u<h;++u)l=Oa(o,t,n[u],i,this.boundHandleStyleImageChange_,a,s)||l;else l=Oa(o,t,n,i,this.boundHandleStyleImageChange_,a,s);return l},e}(Hf);const yy=_y;var xy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),by=function(r){xy(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new yy(this)},e}(Wf);const Sn=by;var ky=function(){function r(e){this.rbush_=new Vf(e),this.items_={}}return r.prototype.insert=function(e,t){var i={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(i),this.items_[Z(t)]=i},r.prototype.load=function(e,t){for(var i=new Array(t.length),n=0,o=t.length;n<o;n++){var a=e[n],s=t[n],l={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:s};i[n]=l,this.items_[Z(s)]=l}this.rbush_.load(i)},r.prototype.remove=function(e){var t=Z(e),i=this.items_[t];return delete this.items_[t],this.rbush_.remove(i)!==null},r.prototype.update=function(e,t){var i=this.items_[Z(t)],n=[i.minX,i.minY,i.maxX,i.maxY];dr(n,e)||(this.remove(t),this.insert(e,t))},r.prototype.getAll=function(){var e=this.rbush_.all();return e.map(function(t){return t.value})},r.prototype.getInExtent=function(e){var t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]},i=this.rbush_.search(t);return i.map(function(n){return n.value})},r.prototype.forEach=function(e){return this.forEach_(this.getAll(),e)},r.prototype.forEachInExtent=function(e,t){return this.forEach_(this.getInExtent(e),t)},r.prototype.forEach_=function(e,t){for(var i,n=0,o=e.length;n<o;n++)if(i=t(e[n]),i)return i;return i},r.prototype.isEmpty=function(){return ln(this.items_)},r.prototype.clear=function(){this.rbush_.clear(),this.items_={}},r.prototype.getExtent=function(e){var t=this.rbush_.toJSON();return Ae(t.minX,t.minY,t.maxX,t.maxY,e)},r.prototype.concat=function(e){this.rbush_.load(e.rbush_.all());for(var t in e.items_)this.items_[t]=e.items_[t]},r}();const Ia=ky;var wy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ey=function(r){wy(e,r);function e(t){var i=r.call(this)||this;i.projection=Wt(t.projection),i.attributions_=rd(t.attributions),i.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,i.loading=!1,i.state_=t.state!==void 0?t.state:dn.READY,i.wrapX_=t.wrapX!==void 0?t.wrapX:!1,i.viewResolver=null,i.viewRejector=null;var n=i;return i.viewPromise_=new Promise(function(o,a){n.viewResolver=o,n.viewRejector=a}),i}return e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return $()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=rd(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Ue);function rd(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}const od=Ey,xe={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Ty(r,e){return[[-1/0,-1/0,1/0,1/0]]}var Cy=!1;function ad(r,e,t,i,n,o,a){var s=new XMLHttpRequest;s.open("GET",typeof r=="function"?r(t,i,n):r,!0),e.getType()==En.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=Cy,s.onload=function(l){if(!s.status||s.status>=200&&s.status<300){var u=e.getType(),h=void 0;u==En.JSON||u==En.TEXT?h=s.responseText:u==En.XML?(h=s.responseXML,h||(h=new DOMParser().parseFromString(s.responseText,"application/xml"))):u==En.ARRAY_BUFFER&&(h=s.response),h?o(e.readFeatures(h,{extent:t,featureProjection:n}),e.readProjection(h)):a()}else a()},s.onerror=a,s.send()}function sd(r,e){return function(t,i,n,o,a){var s=this;ad(r,e,t,i,n,function(l,u){s.addFeatures(l),o!==void 0&&o(l)},a||sn)}}var ld=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Fi=function(r){ld(e,r);function e(t,i,n){var o=r.call(this,t)||this;return o.feature=i,o.features=n,o}return e}(je),Sy=function(r){ld(e,r);function e(t){var i=this,n=t||{};i=r.call(this,{attributions:n.attributions,projection:void 0,state:dn.READY,wrapX:n.wrapX!==void 0?n.wrapX:!0})||this,i.on,i.once,i.un,i.loader_=sn,i.format_=n.format,i.overlaps_=n.overlaps===void 0?!0:n.overlaps,i.url_=n.url,n.loader!==void 0?i.loader_=n.loader:i.url_!==void 0&&(lt(i.format_,7),i.loader_=sd(i.url_,i.format_)),i.strategy_=n.strategy!==void 0?n.strategy:Ty;var o=n.useSpatialIndex!==void 0?n.useSpatialIndex:!0;i.featuresRtree_=o?new Ia:null,i.loadedExtentsRtree_=new Ia,i.loadingExtentsCount_=0,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null;var a,s;return Array.isArray(n.features)?s=n.features:n.features&&(a=n.features,s=a.getArray()),!o&&a===void 0&&(a=new me(s)),s!==void 0&&i.addFeaturesInternal(s),a!==void 0&&i.bindFeaturesCollection_(a),i}return e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var i=Z(t);if(!this.addToIndex_(i,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(i,t);var n=t.getGeometry();if(n){var o=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(o,t)}else this.nullGeometryFeatures_[i]=t;this.dispatchEvent(new Fi(xe.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,i){this.featureChangeKeys_[t]=[vt(i,H.CHANGE,this.handleFeatureChange_,this),vt(i,rn.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,i){var n=!0,o=i.getId();return o!==void 0&&(o.toString()in this.idIndex_?n=!1:this.idIndex_[o.toString()]=i),n&&(lt(!(t in this.uidIndex_),30),this.uidIndex_[t]=i),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var i=[],n=[],o=[],a=0,s=t.length;a<s;a++){var l=t[a],u=Z(l);this.addToIndex_(u,l)&&n.push(l)}for(var a=0,h=n.length;a<h;a++){var l=n[a],u=Z(l);this.setupChangeEvents_(u,l);var f=l.getGeometry();if(f){var d=f.getExtent();i.push(d),o.push(l)}else this.nullGeometryFeatures_[u]=l}this.featuresRtree_&&this.featuresRtree_.load(i,o);for(var a=0,p=n.length;a<p;a++)this.dispatchEvent(new Fi(xe.ADDFEATURE,n[a]))},e.prototype.bindFeaturesCollection_=function(t){var i=!1;this.addEventListener(xe.ADDFEATURE,function(n){i||(i=!0,t.push(n.feature),i=!1)}),this.addEventListener(xe.REMOVEFEATURE,function(n){i||(i=!0,t.remove(n.feature),i=!1)}),t.addEventListener(ee.ADD,function(n){i||(i=!0,this.addFeature(n.element),i=!1)}.bind(this)),t.addEventListener(ee.REMOVE,function(n){i||(i=!0,this.removeFeature(n.element),i=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var i in this.featureChangeKeys_){var n=this.featureChangeKeys_[i];n.forEach(Lt)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this));for(var o in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[o])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var a=new Fi(xe.CLEAR);this.dispatchEvent(a),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,i){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(o){var a=o.getGeometry();if(a.intersectsCoordinate(t))return i(o)})},e.prototype.forEachFeatureInExtent=function(t,i){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,i);this.featuresCollection_&&this.featuresCollection_.forEach(i)},e.prototype.forEachFeatureIntersectingExtent=function(t,i){return this.forEachFeatureInExtent(t,function(n){var o=n.getGeometry();if(o.intersectsExtent(t)){var a=i(n);if(a)return a}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),ln(this.nullGeometryFeatures_)||Be(t,vs(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var i=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){i.push(n)}),i},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,i){var n=t[0],o=t[1],a=null,s=[NaN,NaN],l=1/0,u=[-1/0,-1/0,1/0,1/0],h=i||ki;return this.featuresRtree_.forEachInExtent(u,function(f){if(h(f)){var d=f.getGeometry(),p=l;if(l=d.closestPointXY(n,o,s,l),l<p){a=f;var c=Math.sqrt(l);u[0]=n-c,u[1]=o-c,u[2]=n+c,u[3]=o+c}}}),a},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var i=this.idIndex_[t.toString()];return i!==void 0?i:null},e.prototype.getFeatureByUid=function(t){var i=this.uidIndex_[t];return i!==void 0?i:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var i=t.target,n=Z(i),o=i.getGeometry();if(!o)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(i),this.nullGeometryFeatures_[n]=i);else{var a=o.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(a,i)):this.featuresRtree_&&this.featuresRtree_.update(a,i)}var s=i.getId();if(s!==void 0){var l=s.toString();this.idIndex_[l]!==i&&(this.removeFromIdIndex_(i),this.idIndex_[l]=i)}else this.removeFromIdIndex_(i),this.uidIndex_[n]=i;this.changed(),this.dispatchEvent(new Fi(xe.CHANGEFEATURE,i))},e.prototype.hasFeature=function(t){var i=t.getId();return i!==void 0?i in this.idIndex_:Z(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&ln(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,i,n){for(var o=this.loadedExtentsRtree_,a=this.strategy_(t,i,n),s=function(f,d){var p=a[f],c=o.forEachInExtent(p,function(g){return gn(g.extent,p)});c||(++l.loadingExtentsCount_,l.dispatchEvent(new Fi(xe.FEATURESLOADSTART)),l.loader_.call(l,p,i,n,function(g){--this.loadingExtentsCount_,this.dispatchEvent(new Fi(xe.FEATURESLOADEND,void 0,g))}.bind(l),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Fi(xe.FEATURESLOADERROR))}.bind(l)),o.insert(p,{extent:p.slice()}))},l=this,u=0,h=a.length;u<h;++u)s(u);this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),r.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var i=this.loadedExtentsRtree_,n;i.forEachInExtent(t,function(o){if(dr(o.extent,t))return n=o,!0}),n&&i.remove(n)},e.prototype.removeFeature=function(t){var i=Z(t);i in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[i]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var i=Z(t);this.featureChangeKeys_[i].forEach(Lt),delete this.featureChangeKeys_[i];var n=t.getId();n!==void 0&&delete this.idIndex_[n.toString()],delete this.uidIndex_[i],this.dispatchEvent(new Fi(xe.REMOVEFEATURE,t))},e.prototype.removeFromIdIndex_=function(t){var i=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],i=!0;break}return i},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){lt(this.format_,7),this.url_=t,this.setLoader(sd(t,this.format_))},e}(od);const Di=Sy;var Oy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Iy=function(r){Oy(e,r);function e(t,i,n){var o=r.call(this)||this,a=n||{};return o.tileCoord=t,o.state=i,o.interimTile=null,o.key="",o.transition_=a.transition===void 0?250:a.transition,o.transitionStarts_={},o}return e.prototype.changed=function(){this.dispatchEvent(H.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==G.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(!!this.interimTile){var t=this.interimTile,i=this;do{if(t.getState()==G.LOADED){t.interimTile=null;break}else t.getState()==G.LOADING?i=t:t.getState()==G.IDLE?i.interimTile=t.interimTile:i=t;t=i.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==G.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){$()},e.prototype.getAlpha=function(t,i){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(!n)n=i,this.transitionStarts_[t]=n;else if(n===-1)return 1;var o=i-n+1e3/60;return o>=this.transition_?1:Ah(o/this.transition_)},e.prototype.inTransition=function(t){return this.transition_?this.transitionStarts_[t]!==-1:!1},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(or);const za=Iy;var zy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ry=function(r){zy(e,r);function e(t,i,n,o,a,s){var l=r.call(this,t,i,s)||this;return l.crossOrigin_=o,l.src_=n,l.key=n,l.image_=new Image,o!==null&&(l.image_.crossOrigin=o),l.unlisten_=null,l.tileLoadFunction_=a,l}return e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=G.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=G.ERROR,this.unlistenImage_(),this.image_=Py(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=G.LOADED:this.state=G.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==G.ERROR&&(this.state=G.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==G.IDLE&&(this.state=G.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=bl(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(za);function Py(){var r=be(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}const My=Ry;var Ly=function(){function r(e,t,i){this.decay_=e,this.minVelocity_=t,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return r.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},r.prototype.update=function(e,t){this.points_.push(e,t,Date.now())},r.prototype.end=function(){if(this.points_.length<6)return!1;var e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;for(var i=t-3;i>0&&this.points_[i+2]>e;)i-=3;var n=this.points_[t+2]-this.points_[i+2];if(n<1e3/60)return!1;var o=this.points_[t]-this.points_[i],a=this.points_[t+1]-this.points_[i+1];return this.angle_=Math.atan2(a,o),this.initialVelocity_=Math.sqrt(o*o+a*a)/n,this.initialVelocity_>this.minVelocity_},r.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},r.prototype.getAngle=function(){return this.angle_},r}();const Ay=Ly,Ml={ACTIVE:"active"};var Fy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Dy=function(r){Fy(e,r);function e(t){var i=r.call(this)||this;return i.on,i.once,i.un,t&&t.handleEvent&&(i.handleEvent=t.handleEvent),i.map_=null,i.setActive(!0),i}return e.prototype.getActive=function(){return this.get(Ml.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Ml.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(Ue);function Ny(r,e,t){var i=r.getCenterInternal();if(i){var n=[i[0]+e[0],i[1]+e[1]];r.animateInternal({duration:t!==void 0?t:250,easing:Sg,center:r.getConstrainedCenter(n)})}}function Ll(r,e,t,i){var n=r.getZoom();if(n!==void 0){var o=r.getConstrainedZoom(n+e),a=r.getResolutionForZoom(o);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:a,anchor:t,duration:i!==void 0?i:250,easing:sr})}}const yo=Dy;var Gy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),jy=function(r){Gy(e,r);function e(t){var i=r.call(this)||this,n=t||{};return i.delta_=n.delta?n.delta:1,i.duration_=n.duration!==void 0?n.duration:250,i}return e.prototype.handleEvent=function(t){var i=!1;if(t.type==ct.DBLCLICK){var n=t.originalEvent,o=t.map,a=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,l=o.getView();Ll(l,s,a,this.duration_),n.preventDefault(),i=!0}return!i},e}(yo);const By=jy;var Uy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Vy=function(r){Uy(e,r);function e(t){var i=this,n=t||{};return i=r.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var i=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==ct.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==ct.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==ct.POINTERDOWN){var o=this.handleDownEvent(t);this.handlingDownUpSequence=o,i=this.stopDown(o)}else t.type==ct.POINTERMOVE&&this.handleMoveEvent(t);return!i},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(Yy(t)){var i=t.originalEvent,n=i.pointerId.toString();t.type==ct.POINTERUP?delete this.trackedPointers_[n]:t.type==ct.POINTERDOWN?this.trackedPointers_[n]=i:n in this.trackedPointers_&&(this.trackedPointers_[n]=i),this.targetPointers=vs(this.trackedPointers_)}},e}(yo);function Al(r){for(var e=r.length,t=0,i=0,n=0;n<e;n++)t+=r[n].clientX,i+=r[n].clientY;return[t/e,i/e]}function Yy(r){var e=r.type;return e===ct.POINTERDOWN||e===ct.POINTERDRAG||e===ct.POINTERUP}const Ni=Vy;function Fl(r){var e=arguments;return function(t){for(var i=!0,n=0,o=e.length;n<o&&(i=i&&e[n](t),!!i);++n);return i}}var Xy=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Wy=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},qy=function(r){return r.target.getTargetElement().contains(document.activeElement)},ud=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?qy(r):!0},Dl=ki,hd=function(r){var e=r.originalEvent;return e.button==0&&!(rg&&og&&e.ctrlKey)},Zy=function(r){return r.type==ct.SINGLECLICK},Nl=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},fd=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},dd=function(r){var e=r.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"},Gl=function(r){var e=r.originalEvent;return lt(e!==void 0,56),e.pointerType=="mouse"},pd=function(r){var e=r.originalEvent;return lt(e!==void 0,56),e.isPrimary&&e.button===0},Ky=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Hy=function(r){Ky(e,r);function e(t){var i=r.call(this,{stopDown:rr})||this,n=t||{};i.kinetic_=n.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var o=n.condition?n.condition:Fl(Nl,pd);return i.condition_=n.onFocusOnly?Fl(ud,o):o,i.noKinetic_=!1,i}return e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var i=this.targetPointers,n=Al(i);if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var o=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],a=t.map,s=a.getView();em(o,s.getResolution()),Ps(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var i=t.map,n=i.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var o=this.kinetic_.getDistance(),a=this.kinetic_.getAngle(),s=n.getCenterInternal(),l=i.getPixelFromCoordinateInternal(s),u=i.getCoordinateFromPixelInternal([l[0]-o*Math.cos(a),l[1]-o*Math.sin(a)]);n.animateInternal({center:n.getConstrainedCenter(u),duration:500,easing:sr})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var i=t.map,n=i.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1},e}(Ni);const $y=Hy;var Jy=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Qy=function(r){Jy(e,r);function e(t){var i=this,n=t||{};return i=r.call(this,{stopDown:rr})||this,i.condition_=n.condition?n.condition:Wy,i.lastAngle_=void 0,i.duration_=n.duration!==void 0?n.duration:250,i}return e.prototype.handleDragEvent=function(t){if(!!Gl(t)){var i=t.map,n=i.getView();if(n.getConstraints().rotation!==$s){var o=i.getSize(),a=t.pixel,s=Math.atan2(o[1]/2-a[1],a[0]-o[0]/2);if(this.lastAngle_!==void 0){var l=s-this.lastAngle_;n.adjustRotationInternal(-l)}this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){if(!Gl(t))return!0;var i=t.map,n=i.getView();return n.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!Gl(t))return!1;if(hd(t)&&this.condition_(t)){var i=t.map;return i.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(Ni);const tx=Qy;var ex=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),ix=function(r){ex(e,r);function e(t){var i=r.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+t,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,i=this.endPixel_,n="px",o=this.element_.style;o.left=Math.min(t[0],i[0])+n,o.top=Math.min(t[1],i[1])+n,o.width=Math.abs(i[0]-t[0])+n,o.height=Math.abs(i[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var i=this.element_.style;i.left="inherit",i.top="inherit",i.width="inherit",i.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,i){this.startPixel_=t,this.endPixel_=i,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,i=this.endPixel_,n=[t,[t[0],i[1]],i,[i[0],t[1]]],o=n.map(this.map_.getCoordinateFromPixelInternal,this.map_);o[4]=o[0].slice(),this.geometry_?this.geometry_.setCoordinates([o]):this.geometry_=new zi([o])},e.prototype.getGeometry=function(){return this.geometry_},e}(gs);const nx=ix;var cd=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ra={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},jl=function(r){cd(e,r);function e(t,i,n){var o=r.call(this,t)||this;return o.coordinate=i,o.mapBrowserEvent=n,o}return e}(je),rx=function(r){cd(e,r);function e(t){var i=r.call(this)||this;i.on,i.once,i.un;var n=t||{};return i.box_=new nx(n.className||"ol-dragbox"),i.minArea_=n.minArea!==void 0?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:hd,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return e.prototype.defaultBoxEndCondition=function(t,i,n){var o=n[0]-i[0],a=n[1]-i[1];return o*o+a*a>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new jl(Ra.BOXDRAG,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var i=this.boxEndCondition_(t,this.startPixel_,t.pixel);return i&&this.onBoxEnd(t),this.dispatchEvent(new jl(i?Ra.BOXEND:Ra.BOXCANCEL,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new jl(Ra.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(Ni);const ox=rx;var ax=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),sx=function(r){ax(e,r);function e(t){var i=this,n=t||{},o=n.condition?n.condition:fd;return i=r.call(this,{condition:o,className:n.className||"ol-dragzoom",minArea:n.minArea})||this,i.duration_=n.duration!==void 0?n.duration:200,i.out_=n.out!==void 0?n.out:!1,i}return e.prototype.onBoxEnd=function(t){var i=this.getMap(),n=i.getView(),o=this.getGeometry();if(this.out_){var a=n.rotatedExtentForGeometry(o),s=n.getResolutionForExtentInternal(a),l=n.getResolution()/s;o=o.clone(),o.scale(l*l)}n.fitInternal(o,{duration:this.duration_,easing:sr})},e}(ox);const lx=sx,On={LEFT:37,UP:38,RIGHT:39,DOWN:40};var ux=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),hx=function(r){ux(e,r);function e(t){var i=r.call(this)||this,n=t||{};return i.defaultCondition_=function(o){return Nl(o)&&dd(o)},i.condition_=n.condition!==void 0?n.condition:i.defaultCondition_,i.duration_=n.duration!==void 0?n.duration:100,i.pixelDelta_=n.pixelDelta!==void 0?n.pixelDelta:128,i}return e.prototype.handleEvent=function(t){var i=!1;if(t.type==H.KEYDOWN){var n=t.originalEvent,o=n.keyCode;if(this.condition_(t)&&(o==On.DOWN||o==On.LEFT||o==On.RIGHT||o==On.UP)){var a=t.map,s=a.getView(),l=s.getResolution()*this.pixelDelta_,u=0,h=0;o==On.DOWN?h=-l:o==On.LEFT?u=-l:o==On.RIGHT?u=l:h=l;var f=[u,h];Ps(f,s.getRotation()),Ny(s,f,this.duration_),n.preventDefault(),i=!0}}return!i},e}(yo);const fx=hx;var dx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),px=function(r){dx(e,r);function e(t){var i=r.call(this)||this,n=t||{};return i.condition_=n.condition?n.condition:dd,i.delta_=n.delta?n.delta:1,i.duration_=n.duration!==void 0?n.duration:100,i}return e.prototype.handleEvent=function(t){var i=!1;if(t.type==H.KEYDOWN||t.type==H.KEYPRESS){var n=t.originalEvent,o=n.charCode;if(this.condition_(t)&&(o=="+".charCodeAt(0)||o=="-".charCodeAt(0))){var a=t.map,s=o=="+".charCodeAt(0)?this.delta_:-this.delta_,l=a.getView();Ll(l,s,void 0,this.duration_),n.preventDefault(),i=!0}}return!i},e}(yo);const cx=px;var gx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Bl={TRACKPAD:"trackpad",WHEEL:"wheel"},mx=function(r){gx(e,r);function e(t){var i=this,n=t||{};i=r.call(this,n)||this,i.totalDelta_=0,i.lastDelta_=0,i.maxDelta_=n.maxDelta!==void 0?n.maxDelta:1,i.duration_=n.duration!==void 0?n.duration:250,i.timeout_=n.timeout!==void 0?n.timeout:80,i.useAnchor_=n.useAnchor!==void 0?n.useAnchor:!0,i.constrainResolution_=n.constrainResolution!==void 0?n.constrainResolution:!1;var o=n.condition?n.condition:Dl;return i.condition_=n.onFocusOnly?Fl(ud,o):o,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap().getView();t.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var i=t.type;if(i!==H.WHEEL)return!0;var n=t.map,o=t.originalEvent;o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var a;if(t.type==H.WHEEL&&(a=o.deltaY,ng&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(a/=Eh),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(a*=40)),a===0)return!1;this.lastDelta_=a;var s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(a)<4?Bl.TRACKPAD:Bl.WHEEL);var l=n.getView();if(this.mode_===Bl.TRACKPAD&&!(l.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(l.getAnimating()&&l.cancelAnimations(),l.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),l.adjustZoom(-a/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=a;var u=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),u),!1},e.prototype.handleWheelZoom_=function(t){var i=t.getView();i.getAnimating()&&i.cancelAnimations();var n=-Zt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(i.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Ll(i,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(yo);const vx=mx;var _x=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),yx=function(r){_x(e,r);function e(t){var i=this,n=t||{},o=n;return o.stopDown||(o.stopDown=rr),i=r.call(this,o)||this,i.anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=n.threshold!==void 0?n.threshold:.3,i.duration_=n.duration!==void 0?n.duration:250,i}return e.prototype.handleDragEvent=function(t){var i=0,n=this.targetPointers[0],o=this.targetPointers[1],a=Math.atan2(o.clientY-n.clientY,o.clientX-n.clientX);if(this.lastAngle_!==void 0){var s=a-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),i=s}this.lastAngle_=a;var l=t.map,u=l.getView();if(u.getConstraints().rotation!==$s){var h=l.getViewport().getBoundingClientRect(),f=Al(this.targetPointers);f[0]-=h.left,f[1]-=h.top,this.anchor_=l.getCoordinateFromPixelInternal(f),this.rotating_&&(l.render(),u.adjustRotationInternal(i,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var i=t.map,n=i.getView();return n.endInteraction(this.duration_),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var i=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||i.getView().beginInteraction(),!0}else return!1},e}(Ni);const xx=yx;var bx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),kx=function(r){bx(e,r);function e(t){var i=this,n=t||{},o=n;return o.stopDown||(o.stopDown=rr),i=r.call(this,o)||this,i.anchor_=null,i.duration_=n.duration!==void 0?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return e.prototype.handleDragEvent=function(t){var i=1,n=this.targetPointers[0],o=this.targetPointers[1],a=n.clientX-o.clientX,s=n.clientY-o.clientY,l=Math.sqrt(a*a+s*s);this.lastDistance_!==void 0&&(i=this.lastDistance_/l),this.lastDistance_=l;var u=t.map,h=u.getView();i!=1&&(this.lastScaleDelta_=i);var f=u.getViewport().getBoundingClientRect(),d=Al(this.targetPointers);d[0]-=f.left,d[1]-=f.top,this.anchor_=u.getCoordinateFromPixelInternal(d),u.render(),h.adjustResolutionInternal(i,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var i=t.map,n=i.getView(),o=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,o),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var i=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||i.getView().beginInteraction(),!0}else return!1},e}(Ni);const wx=kx;var gd=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Et={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},Pa={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},Ma=function(r){gd(e,r);function e(t,i){var n=r.call(this,t)||this;return n.feature=i,n}return e}(je),Ex=function(r){gd(e,r);function e(t){var i=this,n=t;n.stopDown||(n.stopDown=rr),i=r.call(this,n)||this,i.on,i.once,i.un,i.shouldHandle_=!1,i.downPx_=null,i.downTimeout_,i.lastDragTime_,i.pointerType_,i.freehand_=!1,i.source_=t.source?t.source:null,i.features_=t.features?t.features:null,i.snapTolerance_=t.snapTolerance?t.snapTolerance:12,i.type_=t.type,i.mode_=Cx(i.type_),i.stopClick_=!!t.stopClick,i.minPoints_=t.minPoints?t.minPoints:i.mode_===Et.POLYGON?3:2,i.maxPoints_=i.mode_===Et.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,i.finishCondition_=t.finishCondition?t.finishCondition:ki;var o=t.geometryFunction;if(!o){var a=i.mode_;if(a===Et.CIRCLE)o=function(l,u,h){var f=u||new Wv([NaN,NaN]),d=Ft(l[0]),p=Xe(d,Ft(l[l.length-1]));return f.setCenterAndRadius(d,Math.sqrt(p)),f};else{var s;a===Et.POINT?s=Fe:a===Et.LINE_STRING?s=wn:a===Et.POLYGON&&(s=zi),o=function(l,u,h){return u?a===Et.POLYGON?l[0].length?u.setCoordinates([l[0].concat([l[0][0]])]):u.setCoordinates([]):u.setCoordinates(l):u=new s(l),u}}}return i.geometryFunction_=o,i.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,i.finishCoordinate_=null,i.sketchFeature_=null,i.sketchPoint_=null,i.sketchCoords_=null,i.sketchLine_=null,i.sketchLineCoords_=null,i.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,i.overlay_=new Sn({source:new Di({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Tx(),updateWhileInteracting:!0}),i.geometryName_=t.geometryName,i.condition_=t.condition?t.condition:Nl,i.freehandCondition_,t.freehand?i.freehandCondition_=Dl:i.freehandCondition_=t.freehandCondition?t.freehandCondition:fd,i.addChangeListener(Ml.ACTIVE,i.updateState_),i}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(t){t.originalEvent.type===H.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==Et.POINT&&this.freehandCondition_(t);var i=t.type===ct.POINTERMOVE,n=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===ct.POINTERDRAG){var o=Date.now();o-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,i=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===ct.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===ct.POINTERDOWN?n=!1:i&&this.getPointerCount()<2?(n=t.type===ct.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===ct.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===ct.DBLCLICK&&(n=!1),r.prototype.handleEvent.call(this,t)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new ii(ct.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var i=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_===Et.POINT)&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),i=!1}else this.freehand_&&this.abortDrawing();return!i&&this.stopClick_&&t.preventDefault(),i},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var i=this.downPx_,n=t.pixel,o=i[0]-n[0],a=i[1]-n[1],s=o*o+a*a;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var i=!1;if(this.sketchFeature_){var n=!1,o=[this.finishCoordinate_],a=this.mode_;if(a===Et.POINT)i=!0;else if(a===Et.CIRCLE)i=this.sketchCoords_.length===2;else if(a===Et.LINE_STRING)n=this.sketchCoords_.length>this.minPoints_;else if(a===Et.POLYGON){var s=this.sketchCoords_;n=s[0].length>this.minPoints_,o=[s[0][0],s[0][s[0].length-2]]}if(n)for(var l=this.getMap(),u=0,h=o.length;u<h;u++){var f=o[u],d=l.getPixelFromCoordinate(f),p=t[0]-d[0],c=t[1]-d[1],g=this.freehand_?1:this.snapTolerance_;if(i=Math.sqrt(p*p+c*c)<=g,i){this.finishCoordinate_=f;break}}}return i},e.prototype.createOrUpdateSketchPoint_=function(t){if(!this.sketchPoint_)this.sketchPoint_=new ni(new Fe(t)),this.updateSketchFeatures_();else{var i=this.sketchPoint_.getGeometry();i.setCoordinates(t)}},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new ni);var i=t.getLinearRing(0),n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(i.getLayout(),i.getFlatCoordinates()),n.changed()):(n=new wn(i.getFlatCoordinates(),i.getLayout()),this.sketchLine_.setGeometry(n))},e.prototype.startDrawing_=function(t){var i=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===Et.POINT?this.sketchCoords_=t.slice():this.mode_===Et.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new ni(new wn(this.sketchLineCoords_)));var n=this.geometryFunction_(this.sketchCoords_,void 0,i);this.sketchFeature_=new ni,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(n),this.updateSketchFeatures_(),this.dispatchEvent(new Ma(Pa.DRAWSTART,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var i=this.getMap(),n=this.sketchFeature_.getGeometry(),o=i.getView().getProjection(),a,s;if(this.mode_===Et.POINT?s=this.sketchCoords_:this.mode_===Et.POLYGON?(a=this.sketchCoords_[0],s=a[a.length-1],this.atFinish_(i.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(a=this.sketchCoords_,s=a[a.length-1]),s[0]=t[0],s[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,o),this.sketchPoint_){var l=this.sketchPoint_.getGeometry();l.setCoordinates(t)}if(n.getType()===I.POLYGON&&this.mode_!==Et.POLYGON)this.createOrUpdateCustomSketchLine_(n);else if(this.sketchLineCoords_){var u=this.sketchLine_.getGeometry();u.setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var i=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),o,a,s=this.mode_;s===Et.LINE_STRING||s===Et.CIRCLE?(this.finishCoordinate_=t.slice(),a=this.sketchCoords_,a.length>=this.maxPoints_&&(this.freehand_?a.pop():o=!0),a.push(t.slice()),this.geometryFunction_(a,i,n)):s===Et.POLYGON&&(a=this.sketchCoords_[0],a.length>=this.maxPoints_&&(this.freehand_?a.pop():o=!0),a.push(t.slice()),o&&(this.finishCoordinate_=a[0]),this.geometryFunction_(this.sketchCoords_,i,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),o&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(!!this.sketchFeature_){var t=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n,o=this.mode_;if(o===Et.LINE_STRING||o===Et.CIRCLE){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();var a=this.finishCoordinate_.slice();n[n.length-1]=a,this.createOrUpdateSketchPoint_(a)}this.geometryFunction_(n,t,i),t.getType()===I.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(o===Et.POLYGON){n=this.sketchCoords_[0],n.splice(-2,1);var s=this.sketchLine_.getGeometry();if(n.length>=2){var a=n[n.length-2].slice();n[n.length-1]=a,this.createOrUpdateSketchPoint_(a)}s.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,i)}n.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(!!t){var i=this.sketchCoords_,n=t.getGeometry(),o=this.getMap().getView().getProjection();this.mode_===Et.LINE_STRING?(i.pop(),this.geometryFunction_(i,n,o)):this.mode_===Et.POLYGON&&(i[0].pop(),this.geometryFunction_(i,n,o),i=n.getCoordinates()),this.type_===I.MULTI_POINT?t.setGeometry(new ho([i])):this.type_===I.MULTI_LINE_STRING?t.setGeometry(new ml([i])):this.type_===I.MULTI_POLYGON&&t.setGeometry(new vl([i])),this.dispatchEvent(new Ma(Pa.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Ma(Pa.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var i=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);var o;if(i===Et.LINE_STRING||i===Et.CIRCLE)o=this.sketchCoords_;else if(i===Et.POLYGON)o=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&o.shift(),o.pop();for(var a=0;a<t.length;a++)this.addToDrawing_(t[a]);var s=t[t.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)},e.prototype.extend=function(t){var i=t.getGeometry(),n=i;this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();var o=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=o.slice(),this.sketchCoords_.push(o.slice()),this.sketchPoint_=new ni(new Fe(o)),this.updateSketchFeatures_(),this.dispatchEvent(new Ma(Pa.DRAWSTART,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var i=this.overlay_.getSource();i.clear(!0),i.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),i=this.getActive();(!t||!i)&&this.abortDrawing(),this.overlay_.setMap(i?t:null)},e}(Ni);function Tx(){var r=Lf();return function(e,t){return r[e.getGeometry().getType()]}}function Cx(r){switch(r){case I.POINT:case I.MULTI_POINT:return Et.POINT;case I.LINE_STRING:case I.MULTI_LINE_STRING:return Et.LINE_STRING;case I.POLYGON:case I.MULTI_POLYGON:return Et.POLYGON;case I.CIRCLE:return Et.CIRCLE;default:throw new Error("Invalid type: "+r)}}const Sx=Ex;var md=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),vd=0,xo=1,_d=[0,0,0,0],wr=[],Ul={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},Vl=function(r){md(e,r);function e(t,i,n){var o=r.call(this,t)||this;return o.features=i,o.mapBrowserEvent=n,o}return e}(je),Ox=function(r){md(e,r);function e(t){var i=r.call(this,t)||this;i.on,i.once,i.un,i.boundHandleFeatureChange_=i.handleFeatureChange_.bind(i),i.condition_=t.condition?t.condition:pd,i.defaultDeleteCondition_=function(o){return Xy(o)&&Zy(o)},i.deleteCondition_=t.deleteCondition?t.deleteCondition:i.defaultDeleteCondition_,i.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:Dl,i.vertexFeature_=null,i.vertexSegments_=null,i.lastPixel_=[0,0],i.ignoreNextSingleClick_=!1,i.featuresBeingModified_=null,i.rBush_=new Ia,i.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,i.snappedToVertex_=!1,i.changingFeature_=!1,i.dragSegments_=[],i.overlay_=new Sn({source:new Di({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:zx(),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i)},i.source_=null,i.hitDetection_=null;var n;if(t.features?n=t.features:t.source&&(i.source_=t.source,n=new me(i.source_.getFeatures()),i.source_.addEventListener(xe.ADDFEATURE,i.handleSourceAdd_.bind(i)),i.source_.addEventListener(xe.REMOVEFEATURE,i.handleSourceRemove_.bind(i))),!n)throw new Error("The modify interaction requires features, a source or a layer");return t.hitDetection&&(i.hitDetection_=t.hitDetection),i.features_=n,i.features_.forEach(i.addFeature_.bind(i)),i.features_.addEventListener(ee.ADD,i.handleFeatureAdd_.bind(i)),i.features_.addEventListener(ee.REMOVE,i.handleFeatureRemove_.bind(i)),i.lastPointerEvent_=null,i.delta_=[0,0],i.snapToPointer_=t.snapToPointer===void 0?!i.hitDetection_:t.snapToPointer,i}return e.prototype.addFeature_=function(t){var i=t.getGeometry();if(i){var n=this.SEGMENT_WRITERS_[i.getType()];n&&n(t,i)}var o=this.getMap();o&&o.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,o),t.addEventListener(H.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,i){if(!this.featuresBeingModified_){this.featuresBeingModified_=new me;for(var n=this.featuresBeingModified_.getArray(),o=0,a=i.length;o<a;++o)for(var s=i[o],l=0,u=s.length;l<u;++l){var h=s[l].feature;h&&n.indexOf(h)===-1&&this.featuresBeingModified_.push(h)}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Vl(Ul.MODIFYSTART,this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(H.CHANGE,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var i=this.rBush_,n=[];i.forEach(function(l){t===l.feature&&n.push(l)});for(var o=n.length-1;o>=0;--o){for(var a=n[o],s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===a&&this.dragSegments_.splice(s,1);i.remove(a)}},e.prototype.setActive=function(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),r.prototype.setActive.call(this,t)},e.prototype.setMap=function(t){this.overlay_.setMap(t),r.prototype.setMap.call(this,t)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var i=t.target;this.removeFeature_(i),this.addFeature_(i)}},e.prototype.handleFeatureRemove_=function(t){var i=t.element;this.removeFeature_(i)},e.prototype.writePointGeometry_=function(t,i){var n=i.getCoordinates(),o={feature:t,geometry:i,segment:[n,n]};this.rBush_.insert(i.getExtent(),o)},e.prototype.writeMultiPointGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o){var s=n[o],l={feature:t,geometry:i,depth:[o],index:o,segment:[s,s]};this.rBush_.insert(i.getExtent(),l)}},e.prototype.writeLineStringGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length-1;o<a;++o){var s=n.slice(o,o+2),l={feature:t,geometry:i,index:o,segment:s};this.rBush_.insert(ne(s),l)}},e.prototype.writeMultiLineStringGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o)for(var s=n[o],l=0,u=s.length-1;l<u;++l){var h=s.slice(l,l+2),f={feature:t,geometry:i,depth:[o],index:l,segment:h};this.rBush_.insert(ne(h),f)}},e.prototype.writePolygonGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o)for(var s=n[o],l=0,u=s.length-1;l<u;++l){var h=s.slice(l,l+2),f={feature:t,geometry:i,depth:[o],index:l,segment:h};this.rBush_.insert(ne(h),f)}},e.prototype.writeMultiPolygonGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o)for(var s=n[o],l=0,u=s.length;l<u;++l)for(var h=s[l],f=0,d=h.length-1;f<d;++f){var p=h.slice(f,f+2),c={feature:t,geometry:i,depth:[l,o],index:f,segment:p};this.rBush_.insert(ne(p),c)}},e.prototype.writeCircleGeometry_=function(t,i){var n=i.getCenter(),o={feature:t,geometry:i,index:vd,segment:[n,n]},a={feature:t,geometry:i,index:xo,segment:[n,n]},s=[o,a];o.featureSegments=s,a.featureSegments=s,this.rBush_.insert(to(n),o);var l=i;this.rBush_.insert(l.getExtent(),a)},e.prototype.writeGeometryCollectionGeometry_=function(t,i){for(var n=i.getGeometriesArray(),o=0;o<n.length;++o){var a=n[o],s=this.SEGMENT_WRITERS_[a.getType()];s(t,a)}},e.prototype.createOrUpdateVertexFeature_=function(t,i,n){var o=this.vertexFeature_;if(!o)o=new ni(new Fe(t)),this.vertexFeature_=o,this.overlay_.getSource().addFeature(o);else{var a=o.getGeometry();a.setCoordinates(t)}return o.set("features",i),o.set("geometries",n),o},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;var i;return!t.map.getView().getInteracting()&&t.type==ct.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=ct.SINGLECLICK||!this.ignoreNextSingleClick_?i=this.removePoint():i=!0),t.type==ct.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),r.prototype.handleEvent.call(this,t)&&!i},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var i=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],o=[],a=0,s=this.dragSegments_.length;a<s;++a){var l=this.dragSegments_[a],u=l[0],h=u.feature;n.indexOf(h)===-1&&n.push(h);var f=u.geometry;o.indexOf(f)===-1&&o.push(f);for(var d=u.depth,p=void 0,c=u.segment,g=l[1];i.length<f.getStride();)i.push(c[g][i.length]);switch(f.getType()){case I.POINT:p=i,c[0]=i,c[1]=i;break;case I.MULTI_POINT:p=f.getCoordinates(),p[u.index]=i,c[0]=i,c[1]=i;break;case I.LINE_STRING:p=f.getCoordinates(),p[u.index+g]=i,c[g]=i;break;case I.MULTI_LINE_STRING:p=f.getCoordinates(),p[d[0]][u.index+g]=i,c[g]=i;break;case I.POLYGON:p=f.getCoordinates(),p[d[0]][u.index+g]=i,c[g]=i;break;case I.MULTI_POLYGON:p=f.getCoordinates(),p[d[1]][d[0]][u.index+g]=i,c[g]=i;break;case I.CIRCLE:if(c[0]=i,c[1]=i,u.index===vd)this.changingFeature_=!0,f.setCenter(i),this.changingFeature_=!1;else{this.changingFeature_=!0;var m=t.map.getView().getProjection(),_=Ms(Ft(f.getCenter()),Ft(i)),v=pr();if(v){var y=f.clone().transform(v,m);y.setRadius(_),_=y.transform(m,v).getRadius()}f.setRadius(_),this.changingFeature_=!1}break}p&&this.setGeometryCoordinates_(f,p)}this.createOrUpdateVertexFeature_(i,n,o)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var i=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,i),this.dragSegments_.length=0,this.featuresBeingModified_=null;var n=this.vertexFeature_;if(n){var o=t.map.getView().getProjection(),a=[],s=n.getGeometry().getCoordinates(),l=ne([s]),u=this.rBush_.getInExtent(l),h={};u.sort(Ix);for(var f=0,d=u.length;f<d;++f){var p=u[f],c=p.segment,g=Z(p.geometry),m=p.depth;if(m&&(g+="-"+m.join("-")),h[g]||(h[g]=new Array(2)),p.geometry.getType()===I.CIRCLE&&p.index===xo){var _=xd(i,p,o);Ye(_,s)&&!h[g][0]&&(this.dragSegments_.push([p,0]),h[g][0]=p);continue}if(Ye(c[0],s)&&!h[g][0]){this.dragSegments_.push([p,0]),h[g][0]=p;continue}if(Ye(c[1],s)&&!h[g][1]){if((p.geometry.getType()===I.LINE_STRING||p.geometry.getType()===I.MULTI_LINE_STRING)&&h[g][0]&&h[g][0].index===0)continue;this.dragSegments_.push([p,1]),h[g][1]=p;continue}Z(c)in this.vertexSegments_&&!h[g][0]&&!h[g][1]&&this.insertVertexCondition_(t)&&a.push(p)}a.length&&this.willModifyFeatures_(t,[a]);for(var v=a.length-1;v>=0;--v)this.insertVertex_(a[v],s)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var i=this.dragSegments_.length-1;i>=0;--i){var n=this.dragSegments_[i][0],o=n.geometry;if(o.getType()===I.CIRCLE){var a=o.getCenter(),s=n.featureSegments[0],l=n.featureSegments[1];s.segment[0]=a,s.segment[1]=a,l.segment[0]=a,l.segment[1]=a,this.rBush_.update(to(a),s);var u=o,h=pr();if(h){var f=t.map.getView().getProjection();u=u.clone().transform(h,f),u=Tf(u).transform(f,h)}this.rBush_.update(u.getExtent(),l)}else this.rBush_.update(ne(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Vl(Ul.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,i,n){var o=this,a=n||i.getCoordinateFromPixel(t),s=i.getView().getProjection(),l=function(U,B){return yd(a,U,s)-yd(a,B,s)},u,h;if(this.hitDetection_){var f=typeof this.hitDetection_=="object"?function(U){return U===o.hitDetection_}:void 0;i.forEachFeatureAtPixel(t,function(U,B,Y){if(Y=Y||U.getGeometry(),Y.getType()===I.POINT&&Wc(o.features_.getArray(),U)){h=Y;var X=Y.getFlatCoordinates().slice(0,2);u=[{feature:U,geometry:Y,segment:[X,X]}]}return!0},{layerFilter:f})}if(!u){var d=Ci(to(a,_d)),p=i.getView().getResolution()*this.pixelTolerance_,c=Gs(Ve(d,p,_d));u=this.rBush_.getInExtent(c)}if(u&&u.length>0){var g=u.sort(l)[0],m=g.segment,_=xd(a,g,s),v=i.getPixelFromCoordinate(_),y=Ms(t,v);if(h||y<=this.pixelTolerance_){var x={};if(x[Z(m)]=!0,this.snapToPointer_||(this.delta_[0]=_[0]-a[0],this.delta_[1]=_[1]-a[1]),g.geometry.getType()===I.CIRCLE&&g.index===xo)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(_,[g.feature],[g.geometry]);else{var k=i.getPixelFromCoordinate(m[0]),E=i.getPixelFromCoordinate(m[1]),T=Xe(v,k),w=Xe(v,E);y=Math.sqrt(Math.min(T,w)),this.snappedToVertex_=y<=this.pixelTolerance_,this.snappedToVertex_&&(_=T>w?m[1]:m[0]),this.createOrUpdateVertexFeature_(_,[g.feature],[g.geometry]);var C={};C[Z(g.geometry)]=!0;for(var R=1,P=u.length;R<P;++R){var M=u[R].segment;if(Ye(m[0],M[0])&&Ye(m[1],M[1])||Ye(m[0],M[1])&&Ye(m[1],M[0])){var L=Z(u[R].geometry);L in C||(C[L]=!0,x[Z(M)]=!0)}else break}}this.vertexSegments_=x;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,i){for(var n=t.segment,o=t.feature,a=t.geometry,s=t.depth,l=t.index,u;i.length<a.getStride();)i.push(0);switch(a.getType()){case I.MULTI_LINE_STRING:u=a.getCoordinates(),u[s[0]].splice(l+1,0,i);break;case I.POLYGON:u=a.getCoordinates(),u[s[0]].splice(l+1,0,i);break;case I.MULTI_POLYGON:u=a.getCoordinates(),u[s[1]][s[0]].splice(l+1,0,i);break;case I.LINE_STRING:u=a.getCoordinates(),u.splice(l+1,0,i);break;default:return}this.setGeometryCoordinates_(a,u);var h=this.rBush_;h.remove(t),this.updateSegmentIndices_(a,l,s,1);var f={segment:[n[0],i],feature:o,geometry:a,depth:s,index:l};h.insert(ne(f.segment),f),this.dragSegments_.push([f,1]);var d={segment:[i,n[1]],feature:o,geometry:a,depth:s,index:l+1};h.insert(ne(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=ct.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var i=this.removeVertex_();return this.dispatchEvent(new Vl(Ul.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,i}return!1},e.prototype.removeVertex_=function(){var t=this.dragSegments_,i={},n=!1,o,a,s,l,u,h,f,d,p,c,g;for(u=t.length-1;u>=0;--u)s=t[u],c=s[0],g=Z(c.feature),c.depth&&(g+="-"+c.depth.join("-")),g in i||(i[g]={}),s[1]===0?(i[g].right=c,i[g].index=c.index):s[1]==1&&(i[g].left=c,i[g].index=c.index+1);for(g in i){switch(p=i[g].right,f=i[g].left,h=i[g].index,d=h-1,f!==void 0?c=f:c=p,d<0&&(d=0),l=c.geometry,a=l.getCoordinates(),o=a,n=!1,l.getType()){case I.MULTI_LINE_STRING:a[c.depth[0]].length>2&&(a[c.depth[0]].splice(h,1),n=!0);break;case I.LINE_STRING:a.length>2&&(a.splice(h,1),n=!0);break;case I.MULTI_POLYGON:o=o[c.depth[1]];case I.POLYGON:o=o[c.depth[0]],o.length>4&&(h==o.length-1&&(h=0),o.splice(h,1),n=!0,h===0&&(o.pop(),o.push(o[0]),d=o.length-1));break}if(n){this.setGeometryCoordinates_(l,a);var m=[];if(f!==void 0&&(this.rBush_.remove(f),m.push(f.segment[0])),p!==void 0&&(this.rBush_.remove(p),m.push(p.segment[1])),f!==void 0&&p!==void 0){var _={depth:c.depth,feature:c.feature,geometry:c.geometry,index:d,segment:m};this.rBush_.insert(ne(_.segment),_)}this.updateSegmentIndices_(l,h,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return n},e.prototype.setGeometryCoordinates_=function(t,i){this.changingFeature_=!0,t.setCoordinates(i),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,i,n,o){this.rBush_.forEachInExtent(t.getExtent(),function(a){a.geometry===t&&(n===void 0||a.depth===void 0||an(a.depth,n))&&a.index>i&&(a.index+=o)})},e}(Ni);function Ix(r,e){return r.index-e.index}function yd(r,e,t){var i=e.geometry;if(i.getType()===I.CIRCLE){var n=i;if(e.index===xo){var o=pr();o&&(n=n.clone().transform(o,t));var a=Xe(n.getCenter(),Ft(r)),s=Math.sqrt(a)-n.getRadius();return s*s}}var l=Ft(r);return wr[0]=Ft(e.segment[0]),wr[1]=Ft(e.segment[1]),Xh(l,wr)}function xd(r,e,t){var i=e.geometry;if(i.getType()===I.CIRCLE&&e.index===xo){var n=i,o=pr();return o&&(n=n.clone().transform(o,t)),_n(n.getClosestPoint(Ft(r)))}var a=Ft(r);return wr[0]=Ft(e.segment[0]),wr[1]=Ft(e.segment[1]),_n(Rs(a,wr))}function zx(){var r=Lf();return function(e,t){return r[I.POINT]}}const Rx=Ox;var Px=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();function bd(r){if(r.feature)return r.feature;if(r.element)return r.element}var Er=[],Mx=function(r){Px(e,r);function e(t){var i=this,n=t||{},o=n;return o.handleDownEvent||(o.handleDownEvent=ki),o.stopDown||(o.stopDown=rr),i=r.call(this,o)||this,i.source_=n.source?n.source:null,i.vertex_=n.vertex!==void 0?n.vertex:!0,i.edge_=n.edge!==void 0?n.edge:!0,i.features_=n.features?n.features:null,i.featuresListenerKeys_=[],i.featureChangeListenerKeys_={},i.indexedFeaturesExtents_={},i.pendingFeatures_={},i.pixelTolerance_=n.pixelTolerance!==void 0?n.pixelTolerance:10,i.rBush_=new Ia,i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i)},i}return e.prototype.addFeature=function(t,i){var n=i!==void 0?i:!0,o=Z(t),a=t.getGeometry();if(a){var s=this.SEGMENT_WRITERS_[a.getType()];s&&(this.indexedFeaturesExtents_[o]=a.getExtent(we()),s(t,a))}n&&(this.featureChangeListenerKeys_[o]=vt(t,H.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(t){var i=this.snapTo(t.pixel,t.coordinate,t.map);return i.snapped&&(t.coordinate=i.vertex.slice(0,2),t.pixel=i.vertexPixel),r.prototype.handleEvent.call(this,t)},e.prototype.handleFeatureAdd_=function(t){var i=bd(t);this.addFeature(i)},e.prototype.handleFeatureRemove_=function(t){var i=bd(t);this.removeFeature(i)},e.prototype.handleFeatureChange_=function(t){var i=t.target;if(this.handlingDownUpSequence){var n=Z(i);n in this.pendingFeatures_||(this.pendingFeatures_[n]=i)}else this.updateFeature_(i)},e.prototype.handleUpEvent=function(t){var i=vs(this.pendingFeatures_);return i.length&&(i.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,i){var n=i!==void 0?i:!0,o=Z(t),a=this.indexedFeaturesExtents_[o];if(a){var s=this.rBush_,l=[];s.forEachInExtent(a,function(h){t===h.feature&&l.push(h)});for(var u=l.length-1;u>=0;--u)s.remove(l[u])}n&&(Lt(this.featureChangeListenerKeys_[o]),delete this.featureChangeListenerKeys_[o])},e.prototype.setMap=function(t){var i=this.getMap(),n=this.featuresListenerKeys_,o=this.getFeatures_();i&&(n.forEach(Lt),n.length=0,o.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?n.push(vt(this.features_,ee.ADD,this.handleFeatureAdd_,this),vt(this.features_,ee.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(vt(this.source_,xe.ADDFEATURE,this.handleFeatureAdd_,this),vt(this.source_,xe.REMOVEFEATURE,this.handleFeatureRemove_,this)),o.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,i,n){var o=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),a=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=ne([o,a]),l=this.rBush_.getInExtent(s);this.vertex_&&!this.edge_&&(l=l.filter(function(M){return M.feature.getGeometry().getType()!==I.CIRCLE}));var u=!1,h=null,f=null;if(l.length===0)return{snapped:u,vertex:h,vertexPixel:f};for(var d=n.getView().getProjection(),p=Ft(i),c,g=1/0,m=0;m<l.length;++m){var _=l[m];Er[0]=Ft(_.segment[0]),Er[1]=Ft(_.segment[1]);var v=Xh(p,Er);v<g&&(c=_,g=v)}var y=c.segment;if(this.vertex_&&!this.edge_){var x=n.getPixelFromCoordinate(y[0]),k=n.getPixelFromCoordinate(y[1]),E=Xe(t,x),T=Xe(t,k),w=Math.sqrt(Math.min(E,T));w<=this.pixelTolerance_&&(u=!0,h=E>T?y[1]:y[0],f=n.getPixelFromCoordinate(h))}else if(this.edge_){var C=c.feature.getGeometry().getType()===I.CIRCLE;if(C){var R=c.feature.getGeometry(),P=pr();P&&(R=R.clone().transform(P,d)),h=_n(tm(p,R))}else Er[0]=Ft(y[0]),Er[1]=Ft(y[1]),h=_n(Rs(p,Er));if(f=n.getPixelFromCoordinate(h),Ms(t,f)<=this.pixelTolerance_&&(u=!0,this.vertex_&&!C)){var x=n.getPixelFromCoordinate(y[0]),k=n.getPixelFromCoordinate(y[1]),E=Xe(f,x),T=Xe(f,k),w=Math.sqrt(Math.min(E,T));w<=this.pixelTolerance_&&(h=E>T?y[1]:y[0],f=n.getPixelFromCoordinate(h))}}return u&&(f=[Math.round(f[0]),Math.round(f[1])]),{snapped:u,vertex:h,vertexPixel:f}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,i){this.getMap().getView().getProjection();for(var n=i,o=Tf(n),a=o.getCoordinates()[0],s=0,l=a.length-1;s<l;++s){var u=a.slice(s,s+2),h={feature:t,segment:u};this.rBush_.insert(ne(u),h)}},e.prototype.writeGeometryCollectionGeometry_=function(t,i){for(var n=i.getGeometriesArray(),o=0;o<n.length;++o){var a=this.SEGMENT_WRITERS_[n[o].getType()];a&&a(t,n[o])}},e.prototype.writeLineStringGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length-1;o<a;++o){var s=n.slice(o,o+2),l={feature:t,segment:s};this.rBush_.insert(ne(s),l)}},e.prototype.writeMultiLineStringGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o)for(var s=n[o],l=0,u=s.length-1;l<u;++l){var h=s.slice(l,l+2),f={feature:t,segment:h};this.rBush_.insert(ne(h),f)}},e.prototype.writeMultiPointGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o){var s=n[o],l={feature:t,segment:[s,s]};this.rBush_.insert(i.getExtent(),l)}},e.prototype.writeMultiPolygonGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o)for(var s=n[o],l=0,u=s.length;l<u;++l)for(var h=s[l],f=0,d=h.length-1;f<d;++f){var p=h.slice(f,f+2),c={feature:t,segment:p};this.rBush_.insert(ne(p),c)}},e.prototype.writePointGeometry_=function(t,i){var n=i.getCoordinates(),o={feature:t,segment:[n,n]};this.rBush_.insert(i.getExtent(),o)},e.prototype.writePolygonGeometry_=function(t,i){for(var n=i.getCoordinates(),o=0,a=n.length;o<a;++o)for(var s=n[o],l=0,u=s.length-1;l<u;++l){var h=s.slice(l,l+2),f={feature:t,segment:h};this.rBush_.insert(ne(h),f)}},e}(Ni);const Lx=Mx;function kd(r){var e=r||{},t=new me,i=new Ay(-.005,.05,100),n=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;n&&t.push(new tx);var o=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;o&&t.push(new By({delta:e.zoomDelta,duration:e.zoomDuration}));var a=e.dragPan!==void 0?e.dragPan:!0;a&&t.push(new $y({onFocusOnly:e.onFocusOnly,kinetic:i}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new xx);var l=e.pinchZoom!==void 0?e.pinchZoom:!0;l&&t.push(new wx({duration:e.zoomDuration}));var u=e.keyboard!==void 0?e.keyboard:!0;u&&(t.push(new fx),t.push(new cx({delta:e.zoomDelta,duration:e.zoomDuration})));var h=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;h&&t.push(new vx({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var f=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return f&&t.push(new lx({duration:e.zoomDuration})),t}var Ax=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Fx=function(r){Ax(e,r);function e(t){var i=this;return t=qt({},t),t.controls||(t.controls=Sf()),t.interactions||(t.interactions=kd({onFocusOnly:!0})),i=r.call(this,t)||this,i}return e.prototype.createRenderer=function(){return new Lm(this)},e}(jv);const Dx=Fx;var Nx=function(){function r(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return r.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},r.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},r.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},r.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},r.prototype.get=function(e,t){var i=this.entries_[e];return lt(i!==void 0,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},r.prototype.remove=function(e){var t=this.entries_[e];return lt(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},r.prototype.getCount=function(){return this.count_},r.prototype.getKeys=function(){var e=new Array(this.count_),t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.key_;return e},r.prototype.getValues=function(){var e=new Array(this.count_),t=0,i;for(i=this.newest_;i;i=i.older)e[t++]=i.value_;return e},r.prototype.peekLast=function(){return this.oldest_.value_},r.prototype.peekLastKey=function(){return this.oldest_.key_},r.prototype.peekFirstKey=function(){return this.newest_.key_},r.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},r.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},r.prototype.set=function(e,t){lt(!(e in this.entries_),16);var i={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_},r.prototype.setSize=function(e){this.highWaterMark=e},r}();const Gx=Nx;function wd(r,e,t,i){return i!==void 0?(i[0]=r,i[1]=e,i[2]=t,i):[r,e,t]}function Tr(r,e,t){return r+"/"+e+"/"+t}function Ed(r){return Tr(r[0],r[1],r[2])}function jx(r){var e=r.substring(r.lastIndexOf("/")+1,r.length).split(",").map(Number),t=e[0],i=e[1],n=e[2];return Tr(t,i,n)}function Td(r){return r.split("/").map(Number)}function Bx(r){return(r[1]<<r[0])+r[2]}function Ux(r,e){var t=r[0],i=r[1],n=r[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;var o=e.getFullTileRange(t);return o?o.containsXY(i,n):!0}var Vx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Yx=function(r){Vx(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.expireCache=function(t){for(;this.canExpireCache();){var i=this.peekLast();if(i.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(this.getCount()!==0){var t=this.peekFirstKey(),i=Td(t),n=i[0];this.forEach(function(o){o.tileCoord[0]!==n&&(this.remove(Ed(o.tileCoord)),o.release())}.bind(this))}},e}(Gx);const Yl=Yx;var Cd=function(){function r(e,t,i,n){this.minX=e,this.maxX=t,this.minY=i,this.maxY=n}return r.prototype.contains=function(e){return this.containsXY(e[1],e[2])},r.prototype.containsTileRange=function(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY},r.prototype.containsXY=function(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY},r.prototype.equals=function(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY},r.prototype.extend=function(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY},r}();function Cr(r,e,t,i,n){return n!==void 0?(n.minX=r,n.maxX=e,n.minY=t,n.maxY=i,n):new Cd(r,e,t,i)}const Sd=Cd;var Xx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Od=[],Wx=function(r){Xx(e,r);function e(t,i,n,o){var a=r.call(this,t,i,{transition:0})||this;return a.context_={},a.executorGroups={},a.declutterExecutorGroups={},a.loadingSourceTiles=0,a.hitDetectionImageData={},a.replayState_={},a.sourceTiles=[],a.errorTileKeys={},a.wantedResolution,a.getSourceTiles=o.bind(void 0,a),a.wrappedTileCoord=n,a}return e.prototype.getContext=function(t){var i=Z(t);return i in this.context_||(this.context_[i]=be(1,1,Od)),this.context_[i]},e.prototype.hasContext=function(t){return Z(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var i=Z(t);return i in this.replayState_||(this.replayState_[i]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[i]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var t in this.context_)Od.push(this.context_[t].canvas),delete this.context_[t];r.prototype.release.call(this)},e}(za);const qx=Wx;var Zx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Kx=function(r){Zx(e,r);function e(t,i,n,o,a,s){var l=r.call(this,t,i,s)||this;return l.extent=null,l.format_=o,l.features_=null,l.loader_,l.projection=null,l.resolution,l.tileLoadFunction_=a,l.url_=n,l.key=n,l}return e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==G.IDLE&&(this.setState(G.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,i){this.setFeatures(t)},e.prototype.onError=function(){this.setState(G.ERROR)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(G.LOADED)},e.prototype.setLoader=function(t){this.loader_=t},e}(za);const Hx=Kx;var $x=.5,si=!0,Jx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Id=function(r){Jx(e,r);function e(t){var i=r.call(this,t)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=we(),i.tmpTileRange_=new Sd(0,0,0,0),i}return e.prototype.isDrawableTile=function(t){var i=this.getLayer(),n=t.getState(),o=i.getUseInterimTilesOnError();return n==G.LOADED||n==G.EMPTY||n==G.ERROR&&!o},e.prototype.getTile=function(t,i,n,o){var a=o.pixelRatio,s=o.viewState.projection,l=this.getLayer(),u=l.getSource(),h=u.getTile(t,i,n,a,s);return h.getState()==G.ERROR&&(l.getUseInterimTilesOnError()?l.getPreload()>0&&(this.newTiles_=!0):h.setState(G.LOADED)),this.isDrawableTile(h)||(h=h.getInterimTile()),h},e.prototype.loadedTileCallback=function(t,i,n){return this.isDrawableTile(n)?r.prototype.loadedTileCallback.call(this,t,i,n):!1},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,i){var n=t.layerStatesArray[t.layerIndex],o=t.viewState,a=o.projection,s=o.resolution,l=o.center,u=o.rotation,h=t.pixelRatio,f=this.getLayer(),d=f.getSource(),p=d.getRevision(),c=d.getTileGridForProjection(a),g=c.getZForResolution(s,d.zDirection),m=c.getResolution(g),_=t.extent,v=n.extent&&Ci(n.extent);v&&(_=mn(_,Ci(n.extent)));var y=d.getTilePixelRatio(h),x=Math.round(t.size[0]*y),k=Math.round(t.size[1]*y);if(u){var E=Math.round(Math.sqrt(x*x+k*k));x=E,k=E}var T=m*x/2/y,w=m*k/2/y,C=[l[0]-T,l[1]-w,l[0]+T,l[1]+w],R=c.getTileRangeForExtentAndZ(_,g),P={};P[g]={};var M=this.createLoadedTileFinder(d,a,P),L=this.tmpExtent,U=this.tmpTileRange_;this.newTiles_=!1;for(var B=R.minX;B<=R.maxX;++B)for(var Y=R.minY;Y<=R.maxY;++Y){var X=this.getTile(g,B,Y,t);if(this.isDrawableTile(X)){var et=Z(this);if(X.getState()==G.LOADED){P[g][X.tileCoord.toString()]=X;var A=X.inTransition(et);!this.newTiles_&&(A||this.renderedTiles.indexOf(X)===-1)&&(this.newTiles_=!0)}if(X.getAlpha(et,t.time)===1)continue}var q=c.getTileCoordChildTileRange(X.tileCoord,U,L),N=!1;q&&(N=M(g+1,q)),N||c.forEachTileCoordParentTileRange(X.tileCoord,M,U,L)}var O=m/s;We(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/y,1/y,u,-x/2,-k/2);var tt=$h(this.pixelTransform);this.useContainer(i,tt,n.opacity);var b=this.context,z=b.canvas;Us(this.inversePixelTransform,this.pixelTransform),We(this.tempTransform,x/2,k/2,O,O,0,-x/2,-k/2),z.width!=x||z.height!=k?(z.width=x,z.height=k):this.containerReused||b.clearRect(0,0,x,k),v&&this.clipUnrotated(b,t,v),qt(b,d.getContextOptions()),this.preRender(b,t),this.renderedTiles.length=0;var W=Object.keys(P).map(Number);W.sort(on);var S,K,V;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?W=W.reverse():(S=[],K=[]);for(var gt=W.length-1;gt>=0;--gt){var ut=W[gt],_t=d.getTilePixelSize(ut,h,a),bt=c.getResolution(ut),Pt=bt/m,It=_t[0]*Pt*O,Ut=_t[1]*Pt*O,D=c.getTileCoordForCoordAndZ(Ti(C),ut),at=c.getTileCoordExtent(D),ot=Kt(this.tempTransform,[y*(at[0]-C[0])/m,y*(C[3]-at[3])/m]),kt=y*d.getGutterForProjection(a),pt=P[ut];for(var yt in pt){var X=pt[yt],st=X.tileCoord,St=D[1]-st[1],Nt=Math.round(ot[0]-(St-1)*It),Gt=D[2]-st[2],wt=Math.round(ot[1]-(Gt-1)*Ut),B=Math.round(ot[0]-St*It),Y=Math.round(ot[1]-Gt*Ut),ht=Nt-B,Ot=wt-Y,mt=g===ut,A=mt&&X.getAlpha(Z(this),t.time)!==1;if(!A)if(S){b.save(),V=[B,Y,B+ht,Y,B+ht,Y+Ot,B,Y+Ot];for(var Tt=0,jt=S.length;Tt<jt;++Tt)if(g!==ut&&ut<K[Tt]){var Vt=S[Tt];b.beginPath(),b.moveTo(V[0],V[1]),b.lineTo(V[2],V[3]),b.lineTo(V[4],V[5]),b.lineTo(V[6],V[7]),b.moveTo(Vt[6],Vt[7]),b.lineTo(Vt[4],Vt[5]),b.lineTo(Vt[2],Vt[3]),b.lineTo(Vt[0],Vt[1]),b.clip()}S.push(V),K.push(ut)}else b.clearRect(B,Y,ht,Ot);this.drawTileImage(X,t,B,Y,ht,Ot,kt,mt),S&&!A?(b.restore(),this.renderedTiles.unshift(X)):this.renderedTiles.push(X),this.updateUsedTiles(t.usedTiles,d,X)}}this.renderedRevision=p,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!dr(this.renderedExtent_,C),this.renderedExtent_=C,this.renderedPixelRatio=h,this.renderedProjection=a,this.manageTilePyramid(t,d,c,h,a,_,g,f.getPreload()),this.scheduleExpireCache(t,d),this.postRender(b,t),n.extent&&b.restore(),tt!==z.style.transform&&(z.style.transform=tt);var zt=xs(n.opacity),Jt=this.container;return zt!==Jt.style.opacity&&(Jt.style.opacity=zt),this.container},e.prototype.drawTileImage=function(t,i,n,o,a,s,l,u){var h=this.getTileImage(t);if(!!h){var f=Z(this),d=u?t.getAlpha(f,i.time):1,p=d!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(h,l,l,h.width-2*l,h.height-2*l,n,o,a,s),p&&this.context.restore(),d!==1?i.animate=!0:u&&t.endTransition(f)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,i){if(i.canExpireCache()){var n=function(o,a,s){var l=Z(o);l in s.usedTiles&&o.expireCache(s.viewState.projection,s.usedTiles[l])}.bind(null,i);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,i,n){var o=Z(i);o in t||(t[o]={}),t[o][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,i,n,o,a,s,l,u,h){var f=Z(i);f in t.wantedTiles||(t.wantedTiles[f]={});var d=t.wantedTiles[f],p=t.tileQueue,c=n.getMinZoom(),g=0,m,_,v,y,x,k;for(k=c;k<=l;++k)for(_=n.getTileRangeForExtentAndZ(s,k,_),v=n.getResolution(k),y=_.minX;y<=_.maxX;++y)for(x=_.minY;x<=_.maxY;++x)l-k<=u?(++g,m=i.getTile(k,y,x,o,a),m.getState()==G.IDLE&&(d[m.getKey()]=!0,p.isKeyQueued(m.getKey())||p.enqueue([m,f,n.getTileCoordCenter(m.tileCoord),v])),h!==void 0&&h(m)):i.useTile(k,y,x,a);i.updateCacheSize(g,a)},e}(Hf);Id.prototype.getLayer;const zd=Id,Gi={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"};var Qx=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),t1={image:[ft.POLYGON,ft.CIRCLE,ft.LINE_STRING,ft.IMAGE,ft.TEXT],hybrid:[ft.POLYGON,ft.LINE_STRING],vector:[]},e1={hybrid:[ft.IMAGE,ft.TEXT,ft.DEFAULT],vector:[ft.POLYGON,ft.CIRCLE,ft.LINE_STRING,ft.IMAGE,ft.TEXT,ft.DEFAULT]},i1=function(r){Qx(e,r);function e(t){var i=r.call(this,t)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.dirty_=!1,i.renderedLayerRevision_,i.renderedPixelToCoordinateTransform_=null,i.renderedRotation_,i.tmpTransform_=Ie(),i}return e.prototype.prepareTile=function(t,i,n){var o,a=t.getState();return(a===G.LOADED||a===G.ERROR)&&(this.updateExecutorGroup_(t,i,n),this.tileImageNeedsRender_(t)&&(o=!0)),o},e.prototype.getTile=function(t,i,n,o){var a=o.pixelRatio,s=o.viewState,l=s.resolution,u=s.projection,h=this.getLayer(),f=h.getSource().getTile(t,i,n,a,u),d=o.viewHints,p=!(d[Xt.ANIMATING]||d[Xt.INTERACTING]);(p||!f.wantedResolution)&&(f.wantedResolution=l);var c=this.prepareTile(f,a,u);return c&&(p||Date.now()-o.time<8)&&h.getRenderMode()!==Gi.VECTOR&&this.renderTileImage_(f,o),r.prototype.getTile.call(this,t,i,n,o)},e.prototype.isDrawableTile=function(t){var i=this.getLayer();return r.prototype.isDrawableTile.call(this,t)&&(i.getRenderMode()===Gi.VECTOR?Z(i)in t.executorGroups:t.hasContext(i))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(t){var i=this.getLayer().getRevision();return this.renderedLayerRevision_!=i&&(this.renderedTiles.length=0),this.renderedLayerRevision_=i,r.prototype.prepareFrame.call(this,t)},e.prototype.updateExecutorGroup_=function(t,i,n){var o=this.getLayer(),a=o.getRevision(),s=o.getRenderOrder()||null,l=t.wantedResolution,u=t.getReplayState(o);if(!(!u.dirty&&u.renderedResolution===l&&u.renderedRevision==a&&u.renderedRenderOrder==s)){var h=o.getSource(),f=o.getDeclutter(),d=h.getTileGrid(),p=h.getTileGridForProjection(n),c=p.getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(i,n,t),m=Z(o);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],f&&(t.declutterExecutorGroups[m]=[]);for(var _=function(k,E){var T=g[k];if(T.getState()!=G.LOADED)return"continue";var w=T.tileCoord,C=d.getTileCoordExtent(w),R=mn(c,C),P=Ve(R,o.getRenderBuffer()*l,v.tmpExtent),M=dr(C,R)?null:P;u.dirty=!1;var L=new Ca(0,P,l,i),U=f?new Ca(0,R,l,i):void 0,B=id(l,i),Y=function(z){var W,S=z.getStyleFunction()||o.getStyleFunction();if(S&&(W=S(z,l)),W){var K=this.renderFeature(z,B,W,L,U);this.dirty_=this.dirty_||K,u.dirty=u.dirty||K}},X=T.getFeatures();s&&s!==u.renderedRenderOrder&&X.sort(s);for(var et=0,A=X.length;et<A;++et){var q=X[et];(!M||Ht(M,q.getGeometry().getExtent()))&&Y.call(v,q)}var N=L.finish(),O=o.getRenderMode()!==Gi.VECTOR&&f&&g.length===1?null:R,tt=new Sa(O,l,i,h.getOverlaps(),N,o.getRenderBuffer());if(t.executorGroups[m].push(tt),U){var b=new Sa(null,l,i,h.getOverlaps(),U.finish(),o.getRenderBuffer());t.declutterExecutorGroups[m].push(b)}},v=this,y=0,x=g.length;y<x;++y)_(y);u.renderedRevision=a,u.renderedRenderOrder=s,u.renderedResolution=l}},e.prototype.forEachFeatureAtCoordinate=function(t,i,n,o,a){var s=i.viewState.resolution,l=i.viewState.rotation;n=n==null?0:n;var u=this.getLayer(),h=u.getSource(),f=h.getTileGridForProjection(i.viewState.projection),d=ne([t]);Ve(d,s*n,d);for(var p={},c=function(x,k,E){var T=x.getId();T===void 0&&(T=Z(x));var w=p[T];if(w){if(w!==!0&&E<w.distanceSq){if(E===0)return p[T]=!0,a.splice(a.lastIndexOf(w),1),o(x,u,k);w.geometry=k,w.distanceSq=E}}else{if(E===0)return p[T]=!0,o(x,u,k);a.push(p[T]={feature:x,layer:u,geometry:k,distanceSq:E,callback:o})}},g=this.renderedTiles,m,_=function(x,k){var E=g[x],T=f.getTileCoordExtent(E.wrappedTileCoord);if(!Ht(T,d))return"continue";var w=Z(u),C=[E.executorGroups[w]],R=E.declutterExecutorGroups[w];R&&C.push(R),C.some(function(P){for(var M=P===R?i.declutterTree.all().map(function(Y){return Y.value}):null,L=0,U=P.length;L<U;++L){var B=P[L];if(m=B.forEachFeatureAtCoordinate(t,s,l,n,c,M),m)return!0}})},v=0,y=g.length;!m&&v<y;++v)_(v);return m},e.prototype.getFeatures=function(t){return new Promise(function(i,n){for(var o=this.getLayer(),a=Z(o),s=o.getSource(),l=this.renderedProjection,u=l.getExtent(),h=this.renderedResolution,f=s.getTileGridForProjection(l),d=Kt(this.renderedPixelToCoordinateTransform_,t.slice()),p=f.getTileCoordForCoordAndResolution(d,h),c,g=0,m=this.renderedTiles.length;g<m;++g)if(p.toString()===this.renderedTiles[g].tileCoord.toString()){if(c=this.renderedTiles[g],c.getState()===G.LOADED){var _=f.getTileCoordExtent(c.tileCoord);s.getWrapX()&&l.canWrapX()&&!gn(u,_)&&Ls(d,l);break}c=void 0}if(!c||c.loadingSourceTiles>0){i([]);return}var v=f.getTileCoordExtent(c.wrappedTileCoord),y=Ti(v),x=[(d[0]-y[0])/h,(y[1]-d[1])/h],k=c.getSourceTiles().reduce(function(R,P){return R.concat(P.getFeatures())},[]),E=c.hitDetectionImageData[a];if(!E&&!this.animatingOrInteracting_){var T=ve(f.getTileSize(f.getZForResolution(h))),w=this.renderedRotation_,C=[this.getRenderTransform(f.getTileCoordCenter(c.wrappedTileCoord),h,0,Te,T[0]*Te,T[1]*Te,0)];E=Qf(T,C,k,o.getStyleFunction(),f.getTileCoordExtent(c.wrappedTileCoord),c.getReplayState(o).renderedResolution,w),c.hitDetectionImageData[a]=E}i(td(x,k,E))}.bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var i=this.context,n=i.globalAlpha;i.globalAlpha=this.getLayer().getOpacity();for(var o=t.viewHints,a=!(o[Xt.ANIMATING]||o[Xt.INTERACTING]),s=this.renderedTiles,l=0,u=s.length;l<u;++l){var h=s[l],f=h.declutterExecutorGroups[Z(this.getLayer())];if(f)for(var d=f.length-1;d>=0;--d)f[d].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,a,void 0,t.declutterTree)}i.globalAlpha=n},e.prototype.getTileRenderTransform=function(t,i){var n=i.pixelRatio,o=i.viewState,a=o.center,s=o.resolution,l=o.rotation,u=i.size,h=Math.round(u[0]*n),f=Math.round(u[1]*n),d=this.getLayer().getSource(),p=d.getTileGridForProjection(i.viewState.projection),c=t.tileCoord,g=p.getTileCoordExtent(t.wrappedTileCoord),m=p.getTileCoordExtent(c,this.tmpExtent)[0]-g[0],_=js(Bs(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(a,s,l,n,h,f,m));return _},e.prototype.renderFrame=function(t,i){var n=t.viewHints,o=!(n[Xt.ANIMATING]||n[Xt.INTERACTING]);r.prototype.renderFrame.call(this,t,i),this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;var a=this.getLayer(),s=a.getRenderMode(),l=this.context,u=l.globalAlpha;l.globalAlpha=a.getOpacity();for(var h=e1[s],f=t.viewState,d=f.rotation,p=this.renderedTiles,c=[],g=[],m=p.length-1;m>=0;--m)for(var _=p[m],v=this.getTileRenderTransform(_,t),y=_.executorGroups[Z(a)],x=!1,k=0,E=y.length;k<E;++k){var T=y[k];if(!!T.hasExecutors(h)){var w=_.tileCoord[0],C=void 0;if(!x&&(C=T.getClipCoords(v),C)){l.save();for(var R=0,P=c.length;R<P;++R){var M=c[R];w<g[R]&&(l.beginPath(),l.moveTo(C[0],C[1]),l.lineTo(C[2],C[3]),l.lineTo(C[4],C[5]),l.lineTo(C[6],C[7]),l.moveTo(M[6],M[7]),l.lineTo(M[4],M[5]),l.lineTo(M[2],M[3]),l.lineTo(M[0],M[1]),l.clip())}}T.execute(l,1,v,d,o,h),!x&&C&&(l.restore(),c.push(C),g.push(w),x=!0)}}return l.globalAlpha=u,this.container},e.prototype.renderFeature=function(t,i,n,o,a){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var l=0,u=n.length;l<u;++l)s=Oa(o,t,n[l],i,this.boundHandleStyleImageChange_,void 0,a)||s;else s=Oa(o,t,n,i,this.boundHandleStyleImageChange_,void 0,a);return s},e.prototype.tileImageNeedsRender_=function(t){var i=this.getLayer();if(i.getRenderMode()===Gi.VECTOR)return!1;var n=t.getReplayState(i),o=i.getRevision(),a=t.wantedResolution;return n.renderedTileResolution!==a||n.renderedTileRevision!==o},e.prototype.renderTileImage_=function(t,i){var n=this.getLayer(),o=t.getReplayState(n),a=n.getRevision(),s=t.executorGroups[Z(n)];o.renderedTileRevision=a;var l=t.wrappedTileCoord,u=l[0],h=n.getSource(),f=i.pixelRatio,d=i.viewState,p=d.projection,c=h.getTileGridForProjection(p),g=c.getResolution(t.tileCoord[0]),m=i.pixelRatio/t.wantedResolution*g,_=c.getResolution(u),v=t.getContext(n);f=Math.round(Math.max(f,m/f));var y=h.getTilePixelSize(u,f,p);v.canvas.width=y[0],v.canvas.height=y[1];var x=f/m;if(x!==1){var k=Kh(this.tmpTransform_);Bs(k,x,x),v.setTransform.apply(v,k)}var E=c.getTileCoordExtent(l,this.tmpExtent),T=m/_,w=Kh(this.tmpTransform_);Bs(w,T,-T),dm(w,-E[0],-E[3]);for(var C=0,R=s.length;C<R;++C){var P=s[C];P.execute(v,x,w,0,!0,t1[n.getRenderMode()])}o.renderedTileResolution=t.wantedResolution},e}(zd);const n1=i1,ji={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};var r1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),o1=function(r){r1(e,r);function e(t){var i=this,n=t||{},o=qt({},n);delete o.preload,delete o.useInterimTilesOnError,i=r.call(this,o)||this,i.on,i.once,i.un,n.renderMode===Gi.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),n.renderMode=void 0);var a=n.renderMode||Gi.HYBRID;return lt(a==Gi.HYBRID||a==Gi.VECTOR,28),i.renderMode_=a,i.setPreload(n.preload?n.preload:0),i.setUseInterimTilesOnError(n.useInterimTilesOnError!==void 0?n.useInterimTilesOnError:!0),i}return e.prototype.createRenderer=function(){return new n1(this)},e.prototype.getFeatures=function(t){return r.prototype.getFeatures.call(this,t)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(ji.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(ji.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(ji.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(ji.USE_INTERIM_TILES_ON_ERROR,t)},e}(Wf);const a1=o1,Xl={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};var s1=[0,0,0],l1=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,lt(Zc(this.resolutions_,function(a,s){return s-a},!0),17);var t;if(!e.origins){for(var i=0,n=this.resolutions_.length-1;i<n;++i)if(!t)t=this.resolutions_[i]/this.resolutions_[i+1];else if(this.resolutions_[i]/this.resolutions_[i+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,lt(this.origins_.length==this.resolutions_.length,20));var o=e.extent;o!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ti(o)),lt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,lt(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:Zs,lt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=o!==void 0?o:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map(function(a,s){var l=new Sd(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1));if(o){var u=this.getTileRangeForExtentAndZ(o,s);l.minX=Math.max(u.minX,l.minX),l.maxX=Math.min(u.maxX,l.maxX),l.minY=Math.max(u.minY,l.minY),l.maxY=Math.min(u.maxY,l.maxY)}return l},this):o&&this.calculateTileRanges_(o)}return r.prototype.forEachTileCoord=function(e,t,i){for(var n=this.getTileRangeForExtentAndZ(e,t),o=n.minX,a=n.maxX;o<=a;++o)for(var s=n.minY,l=n.maxY;s<=l;++s)i([t,o,s])},r.prototype.forEachTileCoordParentTileRange=function(e,t,i,n){var o,a,s,l=null,u=e[0]-1;for(this.zoomFactor_===2?(a=e[1],s=e[2]):l=this.getTileCoordExtent(e,n);u>=this.minZoom;){if(this.zoomFactor_===2?(a=Math.floor(a/2),s=Math.floor(s/2),o=Cr(a,a,s,s,i)):o=this.getTileRangeForExtentAndZ(l,u,i),t(u,o))return!0;--u}return!1},r.prototype.getExtent=function(){return this.extent_},r.prototype.getMaxZoom=function(){return this.maxZoom},r.prototype.getMinZoom=function(){return this.minZoom},r.prototype.getOrigin=function(e){return this.origin_?this.origin_:this.origins_[e]},r.prototype.getResolution=function(e){return this.resolutions_[e]},r.prototype.getResolutions=function(){return this.resolutions_},r.prototype.getTileCoordChildTileRange=function(e,t,i){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){var n=e[1]*2,o=e[2]*2;return Cr(n,n+1,o,o+1,t)}var a=this.getTileCoordExtent(e,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e[0]+1,t)}return null},r.prototype.getTileRangeForTileCoordAndZ=function(e,t,i){if(t>this.maxZoom||t<this.minZoom)return null;var n=e[0],o=e[1],a=e[2];if(t===n)return Cr(o,a,o,a,i);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,t-n),l=Math.floor(o*s),u=Math.floor(a*s);if(t<n)return Cr(l,l,u,u,i);var h=Math.floor(s*(o+1))-1,f=Math.floor(s*(a+1))-1;return Cr(l,h,u,f,i)}var d=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(d,t,i)},r.prototype.getTileRangeExtent=function(e,t,i){var n=this.getOrigin(e),o=this.getResolution(e),a=ve(this.getTileSize(e),this.tmpSize_),s=n[0]+t.minX*a[0]*o,l=n[0]+(t.maxX+1)*a[0]*o,u=n[1]+t.minY*a[1]*o,h=n[1]+(t.maxY+1)*a[1]*o;return Ae(s,u,l,h,i)},r.prototype.getTileRangeForExtentAndZ=function(e,t,i){var n=s1;this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,n);var o=n[1],a=n[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,n),Cr(o,n[1],a,n[2],i)},r.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),i=this.getResolution(e[0]),n=ve(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*n[0]*i,t[1]-(e[2]+.5)*n[1]*i]},r.prototype.getTileCoordExtent=function(e,t){var i=this.getOrigin(e[0]),n=this.getResolution(e[0]),o=ve(this.getTileSize(e[0]),this.tmpSize_),a=i[0]+e[1]*o[0]*n,s=i[1]-(e[2]+1)*o[1]*n,l=a+o[0]*n,u=s+o[1]*n;return Ae(a,s,l,u,t)},r.prototype.getTileCoordForCoordAndResolution=function(e,t,i){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,i)},r.prototype.getTileCoordForXYAndResolution_=function(e,t,i,n,o){var a=this.getZForResolution(i),s=i/this.getResolution(a),l=this.getOrigin(a),u=ve(this.getTileSize(a),this.tmpSize_),h=n?.5:0,f=n?.5:0,d=Math.floor((e-l[0])/i+h),p=Math.floor((l[1]-t)/i+f),c=s*d/u[0],g=s*p/u[1];return n?(c=Math.ceil(c)-1,g=Math.ceil(g)-1):(c=Math.floor(c),g=Math.floor(g)),wd(a,c,g,o)},r.prototype.getTileCoordForXYAndZ_=function(e,t,i,n,o){var a=this.getOrigin(i),s=this.getResolution(i),l=ve(this.getTileSize(i),this.tmpSize_),u=n?.5:0,h=n?.5:0,f=Math.floor((e-a[0])/s+u),d=Math.floor((a[1]-t)/s+h),p=f/l[0],c=d/l[1];return n?(p=Math.ceil(p)-1,c=Math.ceil(c)-1):(p=Math.floor(p),c=Math.floor(c)),wd(i,p,c,o)},r.prototype.getTileCoordForCoordAndZ=function(e,t,i){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,i)},r.prototype.getTileCoordResolution=function(e){return this.resolutions_[e[0]]},r.prototype.getTileSize=function(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]},r.prototype.getFullTileRange=function(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null},r.prototype.getZForResolution=function(e,t){var i=ms(this.resolutions_,e,t||0);return Zt(i,this.minZoom,this.maxZoom)},r.prototype.calculateTileRanges_=function(e){for(var t=this.resolutions_.length,i=new Array(t),n=this.minZoom;n<t;++n)i[n]=this.getTileRangeForExtentAndZ(e,n);this.fullTileRanges_=i},r}();const Rd=l1;function Pd(r){var e=r.getDefaultTileGrid();return e||(e=Ad(r),r.setDefaultTileGrid(e)),e}function u1(r,e,t){var i=e[0],n=r.getTileCoordCenter(e),o=La(t);if(ea(o,n))return e;var a=Yt(o),s=Math.ceil((o[0]-n[0])/a);return n[0]+=a*s,r.getTileCoordForCoordAndZ(n,i)}function h1(r,e,t,i){var n=i!==void 0?i:Jr.TOP_LEFT,o=Ld(r,e,t);return new Rd({extent:r,origin:Zg(r,n),resolutions:o,tileSize:t})}function Md(r){var e=r||{},t=e.extent||Wt("EPSG:3857").getExtent(),i={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Ld(t,e.maxZoom,e.tileSize,e.maxResolution)};return new Rd(i)}function Ld(r,e,t,i){for(var n=e!==void 0?e:$m,o=Ee(r),a=Yt(r),s=ve(t!==void 0?t:Zs),l=i>0?i:Math.max(a/s[0],o/s[1]),u=n+1,h=new Array(u),f=0;f<u;++f)h[f]=l/Math.pow(2,f);return h}function Ad(r,e,t,i){var n=La(r);return h1(n,e,t,i)}function La(r){r=Wt(r);var e=r.getExtent();if(!e){var t=180*Le[ke.DEGREES]/r.getMetersPerUnit();e=Ae(-t,-t,t,t)}return e}var Fd=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),f1=function(r){Fd(e,r);function e(t){var i=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX})||this;i.on,i.once,i.un,i.opaque_=t.opaque!==void 0?t.opaque:!1,i.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,i.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;var n=[256,256],o=t.tileGrid;return o&&ve(o.getTileSize(o.getMinZoom()),n),i.tileCache=new Yl(t.cacheSize||0),i.tmpSize=[0,0],i.key_=t.key||"",i.tileOptions={transition:t.transition},i.zDirection=t.zDirection?t.zDirection:0,i}return e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,i){var n=this.getTileCacheForProjection(t);n&&n.expireCache(i)},e.prototype.forEachLoadedTile=function(t,i,n,o){var a=this.getTileCacheForProjection(t);if(!a)return!1;for(var s=!0,l,u,h,f=n.minX;f<=n.maxX;++f)for(var d=n.minY;d<=n.maxY;++d)u=Tr(i,f,d),h=!1,a.containsKey(u)&&(l=a.get(u),h=l.getState()===G.LOADED,h&&(h=o(l)!==!1)),h||(s=!1);return s},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,i,n,o,a){return $()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Pd(t)},e.prototype.getTileCacheForProjection=function(t){return lt(vn(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,i,n){var o=this.getTileGridForProjection(n),a=this.getTilePixelRatio(i),s=ve(o.getTileSize(t),this.tmpSize);return a==1?s:Fv(s,a,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,i){var n=i!==void 0?i:this.getProjection(),o=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=u1(o,t,n)),Ux(t,o)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),r.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,i){var n=this.getTileCacheForProjection(i);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,i,n,o){},e}(od),d1=function(r){Fd(e,r);function e(t,i){var n=r.call(this,t)||this;return n.tile=i,n}return e}(je);const p1=f1;function c1(r,e){var t=/\{z\}/g,i=/\{x\}/g,n=/\{y\}/g,o=/\{-y\}/g;return function(a,s,l){if(a)return r.replace(t,a[0].toString()).replace(i,a[1].toString()).replace(n,a[2].toString()).replace(o,function(){var u=a[0],h=e.getFullTileRange(u);lt(h,55);var f=h.getHeight()-a[2]-1;return f.toString()})}}function g1(r,e){for(var t=r.length,i=new Array(t),n=0;n<t;++n)i[n]=c1(r[n],e);return m1(i)}function m1(r){return r.length===1?r[0]:function(e,t,i){if(e){var n=Bx(e),o=wi(n,r.length);return r[o](e,t,i)}else return}}function v1(r){var e=[],t=/\{([a-z])-([a-z])\}/.exec(r);if(t){var i=t[1].charCodeAt(0),n=t[2].charCodeAt(0),o=void 0;for(o=i;o<=n;++o)e.push(r.replace(t[0],String.fromCharCode(o)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(r),t){for(var a=parseInt(t[2],10),s=parseInt(t[1],10);s<=a;s++)e.push(r.replace(t[0],s.toString()));return e}return e.push(r),e}var _1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),y1=function(r){_1(e,r);function e(t){var i=r.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(i.tileUrlFunction=t.tileUrlFunction),i.urls=null,t.urls?i.setUrls(t.urls):t.url&&i.setUrl(t.url),i.tileLoadingKeys_={},i}return e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var i=t.target,n=Z(i),o=i.getState(),a;o==G.LOADING?(this.tileLoadingKeys_[n]=!0,a=Xl.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],a=o==G.ERROR?Xl.TILELOADERROR:o==G.LOADED?Xl.TILELOADEND:void 0),a!=null&&this.dispatchEvent(new d1(a,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,i){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof i<"u"?this.setKey(i):this.changed()},e.prototype.setUrl=function(t){var i=v1(t);this.urls=i,this.setUrls(i)},e.prototype.setUrls=function(t){this.urls=t;var i=t.join(`
34
- `);this.generateTileUrlFunction_?this.setTileUrlFunction(g1(t,this.tileGrid),i):this.setKey(i)},e.prototype.tileUrlFunction=function(t,i,n){},e.prototype.useTile=function(t,i,n){var o=Tr(t,i,n);this.tileCache.containsKey(o)&&this.tileCache.get(o)},e}(p1);const Dd=y1;var x1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),b1=function(r){x1(e,r);function e(t){var i=this,n=t.projection||"EPSG:3857",o=t.extent||La(n),a=t.tileGrid||Md({extent:o,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});return i=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,opaque:!1,projection:n,state:t.state,tileGrid:a,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:w1,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection})||this,i.format_=t.format?t.format:null,i.sourceTileCache=new Yl(i.tileCache.highWaterMark),i.overlaps_=t.overlaps==null?!0:t.overlaps,i.tileClass=t.tileClass?t.tileClass:Hx,i.tileGrids_={},i}return e.prototype.getFeaturesInExtent=function(t){var i=[],n=this.tileCache;if(n.getCount()===0)return i;var o=Td(n.peekFirstKey())[0],a=this.tileGrid;return n.forEach(function(s){if(!(s.tileCoord[0]!==o||s.getState()!==G.LOADED))for(var l=s.getSourceTiles(),u=0,h=l.length;u<h;++u){var f=l[u],d=f.tileCoord;if(Ht(t,a.getTileCoordExtent(d))){var p=f.getFeatures();if(p)for(var c=0,g=p.length;c<g;++c){var m=p[c],_=m.getGeometry();Ht(t,_.getExtent())&&i.push(m)}}}}),i},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(t,i){var n=this.getTileCacheForProjection(t),o=Object.keys(i).reduce(function(a,s){var l=jx(s);if(n.containsKey(l))for(var u=n.get(l).sourceTiles,h=0,f=u.length;h<f;++h)a[u[h].getKey()]=!0;return a},{});r.prototype.expireCache.call(this,t,i),this.sourceTileCache.expireCache(o)},e.prototype.getSourceTiles=function(t,i,n){var o=this;if(n.getState()===G.IDLE){n.setState(G.LOADING);var a=n.wrappedTileCoord,s=this.getTileGridForProjection(i),l=s.getTileCoordExtent(a),u=a[0],h=s.getResolution(u);Ve(l,-h,l);var f=this.tileGrid,d=f.getExtent();d&&mn(l,d,l);var p=f.getZForResolution(h,1);f.forEachTileCoord(l,p,function(c){var g=o.tileUrlFunction(c,t,i),m=o.sourceTileCache.containsKey(g)?o.sourceTileCache.get(g):new o.tileClass(c,g?G.IDLE:G.EMPTY,g,o.format_,o.tileLoadFunction);n.sourceTiles.push(m);var _=m.getState();if(_<G.LOADED){var v=function(y){o.handleTileChange(y);var x=m.getState();if(x===G.LOADED||x===G.ERROR){var k=m.getKey();k in n.errorTileKeys?m.getState()===G.LOADED&&delete n.errorTileKeys[k]:n.loadingSourceTiles--,x===G.ERROR?n.errorTileKeys[k]=!0:m.removeEventListener(H.CHANGE,v),n.loadingSourceTiles===0&&n.setState(ln(n.errorTileKeys)?G.LOADED:G.ERROR)}};m.addEventListener(H.CHANGE,v),n.loadingSourceTiles++}_===G.IDLE&&(m.extent=f.getTileCoordExtent(c),m.projection=i,m.resolution=f.getResolution(c[0]),o.sourceTileCache.set(g,m),m.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(function(c){return c.getState()===G.ERROR})?G.ERROR:G.LOADED)}return n.sourceTiles},e.prototype.getTile=function(t,i,n,o,a){var s=Tr(t,i,n),l=this.getKey(),u;if(this.tileCache.containsKey(s)&&(u=this.tileCache.get(s),u.key===l))return u;var h=[t,i,n],f=this.getTileCoordForTileUrlFunction(h,a),d=this.getTileGrid().getExtent(),p=this.getTileGridForProjection(a);if(f&&d){var c=p.getTileCoordExtent(f);Ve(c,-p.getResolution(t),c),Ht(d,c)||(f=null)}var g=!0;if(f!==null){var m=this.tileGrid,_=p.getResolution(t),v=m.getZForResolution(_,1),y=p.getTileCoordExtent(f);Ve(y,-_,y),m.forEachTileCoord(y,v,function(k){g=g&&!this.tileUrlFunction(k,o,a)}.bind(this))}var x=new qx(h,g?G.EMPTY:G.IDLE,f,this.getSourceTiles.bind(this,o,a));return x.key=l,u?(x.interimTile=u,x.refreshInterimChain(),this.tileCache.replace(s,x)):this.tileCache.set(s,x),x},e.prototype.getTileGridForProjection=function(t){var i=t.getCode(),n=this.tileGrids_[i];if(!n){var o=this.tileGrid;n=Ad(t,void 0,o?o.getTileSize(o.getMinZoom()):void 0),this.tileGrids_[i]=n}return n},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,i,n){var o=this.getTileGridForProjection(n),a=ve(o.getTileSize(t),this.tmpSize);return[Math.round(a[0]*i),Math.round(a[1]*i)]},e.prototype.updateCacheSize=function(t,i){r.prototype.updateCacheSize.call(this,t*2,i),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(i).highWaterMark},e}(Dd);const k1=b1;function w1(r,e){r.setLoader(function(t,i,n){ad(e,r.getFormat(),t,i,n,r.onLoad.bind(r),r.onError.bind(r))})}var E1=10,Nd=.25,T1=function(){function r(e,t,i,n,o,a){this.sourceProj_=e,this.targetProj_=t;var s={},l=io(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){var x=y[0]+"/"+y[1];return s[x]||(s[x]=l(y)),s[x]},this.maxSourceExtent_=n,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Yt(n)==Yt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Yt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Yt(this.targetProj_.getExtent()):null;var u=Ti(i),h=ra(i),f=na(i),d=ia(i),p=this.transformInv_(u),c=this.transformInv_(h),g=this.transformInv_(f),m=this.transformInv_(d),_=E1+(a?Math.max(0,Math.ceil(gg(Os(i)/(a*a*256*256)))):0);if(this.addQuad_(u,h,f,d,p,c,g,m,_),this.wrapsXInSource_){var v=1/0;this.triangles_.forEach(function(y,x,k){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(function(y){if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){var x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);var k=Math.min(x[0][0],x[1][0],x[2][0]),E=Math.max(x[0][0],x[1][0],x[2][0]);E-k<this.sourceWorldWidth_/2&&(y.source=x)}}.bind(this))}s={}}return r.prototype.addTriangle_=function(e,t,i,n,o,a){this.triangles_.push({source:[n,o,a],target:[e,t,i]})},r.prototype.addQuad_=function(e,t,i,n,o,a,s,l,u){var h=ne([o,a,s,l]),f=this.sourceWorldWidth_?Yt(h)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&f>.5&&f<1,c=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var g=ne([e,t,i,n]),m=Yt(g)/this.targetWorldWidth_;c=m>Nd||c}!p&&this.sourceProj_.isGlobal()&&f&&(c=f>Nd||c)}if(!(!c&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!Ht(h,this.maxSourceExtent_))){var _=0;if(!c&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(l[0])||!isFinite(l[1]))){if(u>0)c=!0;else if(_=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(s[0])||!isFinite(s[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(u>0){if(!c){var v=[(e[0]+i[0])/2,(e[1]+i[1])/2],y=this.transformInv_(v),x=void 0;if(p){var k=(wi(o[0],d)+wi(s[0],d))/2;x=k-wi(y[0],d)}else x=(o[0]+s[0])/2-y[0];var E=(o[1]+s[1])/2-y[1],T=x*x+E*E;c=T>this.errorThresholdSquared_}if(c){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){var w=[(t[0]+i[0])/2,(t[1]+i[1])/2],C=this.transformInv_(w),R=[(n[0]+e[0])/2,(n[1]+e[1])/2],P=this.transformInv_(R);this.addQuad_(e,t,w,R,o,a,C,P,u-1),this.addQuad_(R,w,i,n,P,C,s,l,u-1)}else{var M=[(e[0]+t[0])/2,(e[1]+t[1])/2],L=this.transformInv_(M),U=[(i[0]+n[0])/2,(i[1]+n[1])/2],B=this.transformInv_(U);this.addQuad_(e,M,U,n,o,L,B,l,u-1),this.addQuad_(M,t,i,U,L,a,s,B,u-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(_&11)==0&&this.addTriangle_(e,i,n,o,s,l),(_&14)==0&&this.addTriangle_(e,i,t,o,s,a),_&&((_&13)==0&&this.addTriangle_(t,n,e,a,l,o),(_&7)==0&&this.addTriangle_(t,n,i,a,l,s))}},r.prototype.calculateSourceExtent=function(){var e=we();return this.triangles_.forEach(function(t,i,n){var o=t.source;eo(e,o[0]),eo(e,o[1]),eo(e,o[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}();const C1=T1;var Gd={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Wl;function jd(r,e,t,i,n){r.beginPath(),r.moveTo(0,0),r.lineTo(e,t),r.lineTo(i,n),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(e,i)+1,Math.max(t,n)),r.restore()}function ql(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function S1(){if(Wl===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",jd(r,4,5,4,0),jd(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;Wl=ql(e,0)||ql(e,4)||ql(e,8)}return Wl}function Bd(r,e,t,i){var n=Ns(t,e,r),o=aa(e,i,t),a=e.getMetersPerUnit();a!==void 0&&(o*=a);var s=r.getMetersPerUnit();s!==void 0&&(o/=s);var l=r.getExtent();if(!l||ea(l,n)){var u=aa(r,o,n)/o;isFinite(u)&&u>0&&(o/=u)}return o}function O1(r,e,t,i){var n=Ei(t),o=Bd(r,e,n,i);return(!isFinite(o)||o<=0)&&Ss(t,function(a){return o=Bd(r,e,a,i),isFinite(o)&&o>0}),o}function I1(r,e,t,i,n,o,a,s,l,u,h,f){var d=be(Math.round(t*r),Math.round(t*e));if(qt(d,f),l.length===0)return d.canvas;d.scale(t,t);function p(x){return Math.round(x*t)/t}d.globalCompositeOperation="lighter";var c=we();l.forEach(function(x,k,E){jh(c,x.extent)});var g=Yt(c),m=Ee(c),_=be(Math.round(t*g/i),Math.round(t*m/i));qt(_,f);var v=t/i;l.forEach(function(x,k,E){var T=x.extent[0]-c[0],w=-(x.extent[3]-c[3]),C=Yt(x.extent),R=Ee(x.extent);x.image.width>0&&x.image.height>0&&_.drawImage(x.image,u,u,x.image.width-2*u,x.image.height-2*u,T*v,w*v,C*v,R*v)});var y=Ti(a);return s.getTriangles().forEach(function(x,k,E){var T=x.source,w=x.target,C=T[0][0],R=T[0][1],P=T[1][0],M=T[1][1],L=T[2][0],U=T[2][1],B=p((w[0][0]-y[0])/o),Y=p(-(w[0][1]-y[1])/o),X=p((w[1][0]-y[0])/o),et=p(-(w[1][1]-y[1])/o),A=p((w[2][0]-y[0])/o),q=p(-(w[2][1]-y[1])/o),N=C,O=R;C=0,R=0,P-=N,M-=O,L-=N,U-=O;var tt=[[P,M,0,0,X-B],[L,U,0,0,A-B],[0,0,P,M,et-Y],[0,0,L,U,q-Y]],b=vg(tt);if(!!b){if(d.save(),d.beginPath(),S1()||f===Gd){d.moveTo(X,et);for(var z=4,W=B-X,S=Y-et,K=0;K<z;K++)d.lineTo(X+p((K+1)*W/z),et+p(K*S/(z-1))),K!=z-1&&d.lineTo(X+p((K+1)*W/z),et+p((K+1)*S/(z-1)));d.lineTo(A,q)}else d.moveTo(X,et),d.lineTo(B,Y),d.lineTo(A,q);d.clip(),d.transform(b[0],b[2],b[1],b[3],B,Y),d.translate(c[0]-N,c[3]-O),d.scale(i/t,-i/t),d.drawImage(_.canvas,0,0),d.restore()}}),h&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,s.getTriangles().forEach(function(x,k,E){var T=x.target,w=(T[0][0]-y[0])/o,C=-(T[0][1]-y[1])/o,R=(T[1][0]-y[0])/o,P=-(T[1][1]-y[1])/o,M=(T[2][0]-y[0])/o,L=-(T[2][1]-y[1])/o;d.beginPath(),d.moveTo(R,P),d.lineTo(w,C),d.lineTo(M,L),d.closePath(),d.stroke()}),d.restore()),d.canvas}var z1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),R1=function(r){z1(e,r);function e(t,i,n,o,a,s,l,u,h,f,d,p){var c=r.call(this,a,G.IDLE)||this;c.renderEdges_=d!==void 0?d:!1,c.contextOptions_=p,c.pixelRatio_=l,c.gutter_=u,c.canvas_=null,c.sourceTileGrid_=i,c.targetTileGrid_=o,c.wrappedTileCoord_=s||a,c.sourceTiles_=[],c.sourcesListenerKeys_=null,c.sourceZ_=0;var g=o.getTileCoordExtent(c.wrappedTileCoord_),m=c.targetTileGrid_.getExtent(),_=c.sourceTileGrid_.getExtent(),v=m?mn(g,m):g;if(Os(v)===0)return c.state=G.EMPTY,c;var y=t.getExtent();y&&(_?_=mn(_,y):_=y);var x=o.getResolution(c.wrappedTileCoord_[0]),k=O1(t,n,v,x);if(!isFinite(k)||k<=0)return c.state=G.EMPTY,c;var E=f!==void 0?f:$x;if(c.triangulation_=new C1(t,n,v,_,k*E,x),c.triangulation_.getTriangles().length===0)return c.state=G.EMPTY,c;c.sourceZ_=i.getZForResolution(k);var T=c.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(T[1]=Zt(T[1],_[1],_[3]),T[3]=Zt(T[3],_[1],_[3])):T=mn(T,_)),!Os(T))c.state=G.EMPTY;else{for(var w=i.getTileRangeForExtentAndZ(T,c.sourceZ_),C=w.minX;C<=w.maxX;C++)for(var R=w.minY;R<=w.maxY;R++){var P=h(c.sourceZ_,C,R,l);P&&c.sourceTiles_.push(P)}c.sourceTiles_.length===0&&(c.state=G.EMPTY)}return c}return e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(h,f,d){h&&h.getState()==G.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(h.tileCoord),image:h.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=G.ERROR;else{var i=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(i),o=typeof n=="number"?n:n[0],a=typeof n=="number"?n:n[1],s=this.targetTileGrid_.getResolution(i),l=this.sourceTileGrid_.getResolution(this.sourceZ_),u=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=I1(o,a,this.pixelRatio_,l,this.sourceTileGrid_.getExtent(),s,u,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=G.LOADED}this.changed()},e.prototype.load=function(){if(this.state==G.IDLE){this.state=G.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(i,n,o){var a=i.getState();if(a==G.IDLE||a==G.LOADING){t++;var s=vt(i,H.CHANGE,function(l){var u=i.getState();(u==G.LOADED||u==G.ERROR||u==G.EMPTY)&&(Lt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(i,n,o){var a=i.getState();a==G.IDLE&&i.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Lt),this.sourcesListenerKeys_=null},e}(za);const P1=R1;var M1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),L1=function(r){M1(e,r);function e(t){var i=r.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:A1,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return i.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,i.tileClass=t.tileClass!==void 0?t.tileClass:My,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,i.contextOptions_=t.imageSmoothing===!1?Gd:void 0,i.renderReprojectionEdges_=!1,i}return e.prototype.canExpireCache=function(){if(!si)return r.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,i){if(!si){r.prototype.expireCache.call(this,t,i);return}var n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?i:{});for(var o in this.tileCacheForProjection){var a=this.tileCacheForProjection[o];a.expireCache(a==n?i:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return si&&this.getProjection()&&t&&!vn(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return r.prototype.getKey.call(this)+(this.contextOptions_?`
35
- `+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(t){return si&&this.getProjection()&&t&&!vn(this.getProjection(),t)?!1:r.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){if(!si)return r.prototype.getTileGridForProjection.call(this,t);var i=this.getProjection();if(this.tileGrid&&(!i||vn(i,t)))return this.tileGrid;var n=Z(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Pd(t)),this.tileGridForProjection[n]},e.prototype.getTileCacheForProjection=function(t){if(!si)return r.prototype.getTileCacheForProjection.call(this,t);var i=this.getProjection();if(!i||vn(i,t))return this.tileCache;var n=Z(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Yl(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,i,n,o,a,s){var l=[t,i,n],u=this.getTileCoordForTileUrlFunction(l,a),h=u?this.tileUrlFunction(u,o,a):void 0,f=new this.tileClass(l,h!==void 0?G.IDLE:G.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return f.key=s,f.addEventListener(H.CHANGE,this.handleTileChange.bind(this)),f},e.prototype.getTile=function(t,i,n,o,a){var s=this.getProjection();if(!si||!s||!a||vn(s,a))return this.getTileInternal(t,i,n,o,s||a);var l=this.getTileCacheForProjection(a),u=[t,i,n],h=void 0,f=Ed(u);l.containsKey(f)&&(h=l.get(f));var d=this.getKey();if(h&&h.key==d)return h;var p=this.getTileGridForProjection(s),c=this.getTileGridForProjection(a),g=this.getTileCoordForTileUrlFunction(u,a),m=new P1(s,p,a,c,u,g,this.getTilePixelRatio(o),this.getGutter(),function(_,v,y,x){return this.getTileInternal(_,v,y,x,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),l.replace(f,m)):l.set(f,m),m},e.prototype.getTileInternal=function(t,i,n,o,a){var s=null,l=Tr(t,i,n),u=this.getKey();if(!this.tileCache.containsKey(l))s=this.createTile_(t,i,n,o,a,u),this.tileCache.set(l,s);else if(s=this.tileCache.get(l),s.key!=u){var h=s;s=this.createTile_(t,i,n,o,a,u),h.getState()==G.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(l,s)}return s},e.prototype.setRenderReprojectionEdges=function(t){if(!(!si||this.renderReprojectionEdges_==t)){this.renderReprojectionEdges_=t;for(var i in this.tileCacheForProjection)this.tileCacheForProjection[i].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,i){if(si){var n=Wt(t);if(n){var o=Z(n);o in this.tileGridForProjection||(this.tileGridForProjection[o]=i)}}},e}(Dd);function A1(r,e){r.getImage().src=e}const F1=L1;var D1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),N1=function(r){D1(e,r);function e(t){var i=this,n=t||{},o=qt({},n);return delete o.preload,delete o.useInterimTilesOnError,i=r.call(this,o)||this,i.on,i.once,i.un,i.setPreload(n.preload!==void 0?n.preload:0),i.setUseInterimTilesOnError(n.useInterimTilesOnError!==void 0?n.useInterimTilesOnError:!0),i}return e.prototype.getPreload=function(){return this.get(ji.PRELOAD)},e.prototype.setPreload=function(t){this.set(ji.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(ji.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(ji.USE_INTERIM_TILES_ON_ERROR,t)},e}(Ph);const G1=N1;var j1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),B1=function(r){j1(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new zd(this)},e}(G1);const U1=B1;var V1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Y1=function(r){V1(e,r);function e(t){var i=this,n=t||{},o=n.projection!==void 0?n.projection:"EPSG:3857",a=n.tileGrid!==void 0?n.tileGrid:Md({extent:La(o),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return i=r.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:n.opaque,projection:o,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:a,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX!==void 0?n.wrapX:!0,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this,i}return e}(F1);const Ud=Y1;var X1=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Vd='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',W1=function(r){X1(e,r);function e(t){var i=this,n=t||{},o;n.attributions!==void 0?o=n.attributions:o=[Vd];var a=n.crossOrigin!==void 0?n.crossOrigin:"anonymous",s=n.url!==void 0?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return i=r.call(this,{attributions:o,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:a,imageSmoothing:n.imageSmoothing,maxZoom:n.maxZoom!==void 0?n.maxZoom:19,opaque:n.opaque!==void 0?n.opaque:!0,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:s,wrapX:n.wrapX,zDirection:n.zDirection})||this,i}return e}(Ud);const q1=W1;function Yd(r,e=[]){return(...t)=>(i=>i.length>=r.length?r(...i):Yd(r,i))([...e,...t])}const Z1=Array.isArray;function K1(r,e,t){if(!Z1(t))throw new TypeError("reduce: list must be array or iterable");let i=0;const n=t.length;for(;i<n;)e=r(e,t[i],i,t),i++;return e}const H1=Yd(K1);function $1(r){return typeof r=="string"?r[r.length-1]||"":r[r.length-1]}function Xd(r,e){return arguments.length===1?t=>Xd(r,t):r*e}H1(Xd,1);function Wd(r,e){if(arguments.length===1)return n=>Wd(r,n);if(r<1)throw new Error("First argument to splitEvery must be a positive integer");const t=[];let i=0;for(;i<e.length;)t.push(e.slice(i,i+=r));return t}const Sr=new Di({features:[],wrapX:!1}),J1=new Sn({source:Sr,style:new ye({image:new mr({radius:3,fill:new de({color:"grey"})})})});function qd(r,e){var i,n,o;const t=r&&((o=(n=(i=r.getSource())==null?void 0:i.getFeaturesInExtent(e))==null?void 0:n.filter(a=>{var s;return((s=a.getGeometry())==null?void 0:s.getType())!=="Point"}))==null?void 0:o.flatMap(a=>a.flatCoordinates_));if(t)return Wd(2,t).forEach((a,s)=>{Sr.addFeature(new ni({geometry:new Fe(a),i:s}))})}const Zd={color:"#ff0000",width:3},Q1=new _e(Zd),tb=new _e({...Zd,lineDash:[2,8]}),Kd=new de({color:"rgba(255, 0, 0, 0.1)"}),Hd=new wl({stroke:new _e({color:"red",width:2}),points:4,radius1:15,radius2:1}),$d=new mr({radius:6,fill:new de({color:"#ff0000"})}),eb=new ye({image:new wl({fill:new de({color:"#fff"}),stroke:new _e({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(r){const e=r.getGeometry();if(e instanceof zi){const t=e.getCoordinates()[0];return new ho(t)}else return}}),li=new Di,Jd=new Sn({source:li,style:[new ye({fill:Kd,stroke:Q1}),eb]});function ib(r){return new Sx({source:li,type:"Polygon",style:new ye({stroke:tb,fill:Kd,image:r==="crosshair"?Hd:$d})})}const Qd=new Lx({source:Sr,pixelTolerance:15});function nb(r){return new Rx({source:li,style:new ye({image:r==="crosshair"?Hd:$d})})}/**
33
+ */function Ui(i){return J({...i,state:!0})}/**
34
+ * @license
35
+ * Copyright 2021 Google LLC
36
+ * SPDX-License-Identifier: BSD-3-Clause
37
+ */var _l;((_l=window.HTMLSlotElement)===null||_l===void 0?void 0:_l.prototype.assignedElements)!=null;class qp{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Qe=qp,_r={PROPERTYCHANGE:"propertychange"};class Xp{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const yl=Xp;function $p(i,t,e){let n,r;e=e||An;let o=0,s=i.length,a=!1;for(;o<s;)n=o+(s-o>>1),r=+e(i[n],t),r<0?o=n+1:(s=n,a=!r);return a?o:~o}function An(i,t){return i>t?1:i<t?-1:0}function xl(i,t,e){const n=i.length;if(i[0]<=t)return 0;if(t<=i[n-1])return n-1;{let r;if(e>0){for(r=1;r<n;++r)if(i[r]<t)return r-1}else if(e<0){for(r=1;r<n;++r)if(i[r]<=t)return r}else for(r=1;r<n;++r){if(i[r]==t)return r;if(i[r]<t)return typeof e=="function"?e(t,i[r-1],i[r])>0?r-1:r:i[r-1]-t<t-i[r]?r-1:r}return n-1}}function Wp(i,t,e){for(;t<e;){const n=i[t];i[t]=i[e],i[e]=n,++t,--e}}function li(i,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let r=0;r<n;r++)i[i.length]=e[r]}function Vi(i,t){const e=i.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(i[n]!==t[n])return!1;return!0}function Yp(i,t,e){const n=t||An;return i.every(function(r,o){if(o===0)return!0;const s=n(i[o-1],r);return!(s>0||e&&s===0)})}function Dn(){return!0}function yr(){return!1}function Ln(){}function Kp(i){let t=!1,e,n,r;return function(){const o=Array.prototype.slice.call(arguments);return(!t||this!==r||!Vi(o,n))&&(t=!0,r=this,n=o,e=i.apply(this,arguments)),e}}function mo(i){for(const t in i)delete i[t]}function Fn(i){let t;for(t in i)return!1;return!t}class Zp extends yl{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),r=n[t]||(n[t]=[]);r.includes(e)||r.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const o=e?new Qe(t):t;o.target||(o.target=this.eventTarget_||this);const s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];let l;for(let h=0,u=r.length;h<u;++h)if("handleEvent"in r[h]?l=r[h].handleEvent(o):l=r[h].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[n]===0){let h=a[n];for(delete a[n];h--;)this.removeEventListener(n,Ln);delete s[n]}return l}disposeInternal(){this.listeners_&&mo(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 n=this.listeners_&&this.listeners_[t];if(n){const r=n.indexOf(e);r!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=Ln,++this.pendingRemovals_[t]):(n.splice(r,1),n.length===0&&delete this.listeners_[t]))}}}const Is=Zp,tt={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 gt(i,t,e,n,r){if(n&&n!==i&&(e=e.bind(n)),r){const s=e;e=function(){i.removeEventListener(t,e),s.apply(this,arguments)}}const o={target:i,type:t,listener:e};return i.addEventListener(t,e),o}function Ps(i,t,e,n){return gt(i,t,e,n,!0)}function Ot(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),mo(i))}class As extends Is{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(tt.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=gt(this,t[o],e);return r}else return gt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const r=t.length;n=new Array(r);for(let o=0;o<r;++o)n[o]=Ps(this,t[o],e)}else n=Ps(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Hp(n);else if(Array.isArray(t))for(let r=0,o=t.length;r<o;++r)this.removeEventListener(t[r],e);else this.removeEventListener(t,e)}}As.prototype.on,As.prototype.once,As.prototype.un;function Hp(i){if(Array.isArray(i))for(let t=0,e=i.length;t<e;++t)Ot(i[t]);else Ot(i)}const jd=As;function et(){throw new Error("Unimplemented abstract method.")}let Jp=0;function K(i){return i.ol_uid||(i.ol_uid=String(++Jp))}const Qp="7.0.0";class Bd extends Qe{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class t0 extends jd{constructor(t){super(),this.on,this.once,this.un,K(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_)||{}}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e)),n=_r.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Bd(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const r=this.values_||(this.values_={});if(n)r[t]=e;else{const o=r[t];r[t]=e,o!==e&&this.notify(t,o)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){!t.values_||Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],Fn(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const hi=t0,qi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Xi=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",e0=Xi.includes("firefox");Xi.includes("safari")&&!Xi.includes("chrom")&&(Xi.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Xi));const i0=Xi.includes("webkit")&&!Xi.includes("edge"),n0=Xi.includes("macintosh"),Ud=typeof devicePixelRatio<"u"?devicePixelRatio:1,bl=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,r0=typeof Image<"u"&&Image.prototype.decode,Vd=function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i}();function Pe(i,t,e,n){let r;return e&&e.length?r=e.shift():bl?r=new OffscreenCanvas(i||300,t||300):r=document.createElement("canvas"),i&&(r.width=i),t&&(r.height=t),r.getContext("2d",n)}function kl(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}function qd(i,t){const e=t.parentNode;e&&e.replaceChild(i,t)}function wl(i){return i&&i.parentNode?i.parentNode.removeChild(i):null}function o0(i){for(;i.lastChild;)i.removeChild(i.lastChild)}function s0(i,t){const e=i.childNodes;for(let n=0;;++n){const r=e[n],o=t[n];if(!r&&!o)break;if(r!==o){if(!r){i.appendChild(o);continue}if(!o){i.removeChild(r),--n;continue}i.insertBefore(o,r)}}}class a0 extends hi{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){wl(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&wl(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Ot(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==Ln&&this.listenerKeys.push(gt(t,qi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const po=a0,Ds="ol-hidden",vo="ol-unselectable",Ml="ol-control",Xd="ol-collapsed",l0=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"),$d=["style","variant","weight","size","lineHeight","family"],Wd=function(i){const t=i.match(l0);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,r=$d.length;n<r;++n){const o=t[n+1];o!==void 0&&(e[$d[n]]=o)}return e.families=e.family.split(/,\s?/),e},At={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 h0 extends Error{constructor(t){const e="v"+Qp.split("-")[0],n="Assertion failed. See https://openlayers.org/en/"+e+"/doc/errors/#"+t+" for details.";super(n),this.code=t,this.name="AssertionError",this.message=n}}const Yd=h0;function ft(i,t){if(!i)throw new Yd(t)}function Wt(i,t,e){return Math.min(Math.max(i,t),e)}function u0(i,t,e,n,r,o){const s=r-e,a=o-n;if(s!==0||a!==0){const l=((i-e)*s+(t-n)*a)/(s*s+a*a);l>1?(e=r,n=o):l>0&&(e+=s*l,n+=a*l)}return On(i,t,e,n)}function On(i,t,e,n){const r=e-i,o=n-t;return r*r+o*o}function d0(i){const t=i.length;for(let n=0;n<t;n++){let r=n,o=Math.abs(i[n][n]);for(let a=n+1;a<t;a++){const l=Math.abs(i[a][n]);l>o&&(o=l,r=a)}if(o===0)return null;const s=i[r];i[r]=i[n],i[n]=s;for(let a=n+1;a<t;a++){const l=-i[a][n]/i[n][n];for(let h=n;h<t+1;h++)n==h?i[a][h]=0:i[a][h]+=l*i[n][h]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=i[n][t]/i[n][n];for(let r=n-1;r>=0;r--)i[r][t]-=i[r][n]*e[n]}return e}function Nn(i){return i*Math.PI/180}function $i(i,t){const e=i%t;return e*t<0?e+t:e}function ki(i,t,e){return i+e*(t-i)}function Kd(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Ls(i,t){return Math.floor(Kd(i,t))}function Fs(i,t){return Math.ceil(Kd(i,t))}class c0 extends hi{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[At.OPACITY]=t.opacity!==void 0?t.opacity:1,ft(typeof e[At.OPACITY]=="number",64),e[At.VISIBLE]=t.visible!==void 0?t.visible:!0,e[At.Z_INDEX]=t.zIndex,e[At.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[At.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[At.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[At.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},n=this.getZIndex();return e.opacity=Wt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,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 et()}getLayerStatesArray(t){return et()}getExtent(){return this.get(At.EXTENT)}getMaxResolution(){return this.get(At.MAX_RESOLUTION)}getMinResolution(){return this.get(At.MIN_RESOLUTION)}getMinZoom(){return this.get(At.MIN_ZOOM)}getMaxZoom(){return this.get(At.MAX_ZOOM)}getOpacity(){return this.get(At.OPACITY)}getSourceState(){return et()}getVisible(){return this.get(At.VISIBLE)}getZIndex(){return this.get(At.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(At.EXTENT,t)}setMaxResolution(t){this.set(At.MAX_RESOLUTION,t)}setMinResolution(t){this.set(At.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(At.MAX_ZOOM,t)}setMinZoom(t){this.set(At.MIN_ZOOM,t)}setOpacity(t){ft(typeof t=="number",64),this.set(At.OPACITY,t)}setVisible(t){this.set(At.VISIBLE,t)}setZIndex(t){this.set(At.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Zd=c0,Wi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class f0 extends Zd{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.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(At.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(At.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ot(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=gt(t,tt.CHANGE,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(e=>e([]))}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}render(t,e){const n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(At.MAP,t)}getMapInternal(){return this.get(At.MAP)}setMap(t){this.mapPrecomposeKey_&&(Ot(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Ot(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gt(t,Wi.PRECOMPOSE,function(e){const r=e.frameState.layerStatesArray,o=this.getLayerState(!1);ft(!r.some(function(s){return s.layer===o.layer}),67),r.push(o)},this),this.mapRenderKey_=gt(this,tt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(At.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 El(i,t){if(!i.visible)return!1;const e=t.resolution;if(e<i.minResolution||e>=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}const Os=f0;class g0 extends po{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",r=t.expandClassName!==void 0?t.expandClassName:e+"-expand",o=t.collapseLabel!==void 0?t.collapseLabel:"\u203A",s=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof o=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=s):this.collapseLabel_=o;const a=t.label!==void 0?t.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=r):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=n,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+vo+" "+Ml+(this.collapsed_&&this.collapsible_?" "+Xd:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=h,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e={},n=[];let r=!0;const o=t.layerStatesArray;for(let s=0,a=o.length;s<a;++s){const l=o[s];if(!El(l,t.viewState))continue;const h=l.layer.getSource();if(!h)continue;const u=h.getAttributions();if(!u)continue;const d=u(t);if(!!d)if(r=r&&h.getAttributionsCollapsible()!==!1,Array.isArray(d))for(let c=0,f=d.length;c<f;++c)d[c]in e||(n.push(d[c]),e[d[c]]=!0);else d in e||(n.push(d),e[d]=!0)}return this.overrideCollapsible_||this.setCollapsible(r),n}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Vi(e,this.renderedAttributions_)){o0(this.ulElement_);for(let r=0,o=e.length;r<o;++r){const s=document.createElement("li");s.innerHTML=e[r],this.ulElement_.appendChild(s)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Xd),this.collapsed_?qd(this.collapseLabel_,this.label_):qd(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const m0=g0,fe={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Cl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class p0{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_||xr[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 Ns=p0,_o=6378137,br=Math.PI*_o,v0=[-br,-br,br,br],_0=[-180,-85,180,85],Gs=_o*Math.log(Math.tan(Math.PI/2));class kr extends Ns{constructor(t){super({code:t,units:"m",extent:v0,global:!0,worldExtent:_0,getPointResolution:function(e,n){return e/Math.cosh(n[1]/_o)}})}}const Hd=[new kr("EPSG:3857"),new kr("EPSG:102100"),new kr("EPSG:102113"),new kr("EPSG:900913"),new kr("http://www.opengis.net/def/crs/EPSG/0/3857"),new kr("http://www.opengis.net/gml/srs/epsg.xml#3857")];function y0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e){t[r]=br*i[r]/180;let o=_o*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));o>Gs?o=Gs:o<-Gs&&(o=-Gs),t[r+1]=o}return t}function x0(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e)t[r]=180*i[r]/br,t[r+1]=360*Math.atan(Math.exp(i[r+1]/_o))/Math.PI-90;return t}const b0=6378137,Jd=[-180,-90,180,90],k0=Math.PI*b0/180;class Gn extends Ns{constructor(t,e){super({code:t,units:"degrees",extent:Jd,axisOrientation:e,global:!0,metersPerUnit:k0,worldExtent:Jd})}}const Qd=[new Gn("CRS:84"),new Gn("EPSG:4326","neu"),new Gn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gn("urn:ogc:def:crs:OGC:2:84"),new Gn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Gn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Sl={};function w0(i){return Sl[i]||Sl[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function M0(i,t){Sl[i]=t}let wr={};function Mr(i,t,e){const n=i.getCode(),r=t.getCode();n in wr||(wr[n]={}),wr[n][r]=e}function tc(i,t){let e;return i in wr&&t in wr[i]&&(e=wr[i][t]),e}const ne={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function xe(i){const t=Ge();for(let e=0,n=i.length;e<n;++e)bo(t,i[e]);return t}function E0(i,t,e){const n=Math.min.apply(null,i),r=Math.min.apply(null,t),o=Math.max.apply(null,i),s=Math.max.apply(null,t);return ti(n,r,o,s,e)}function ui(i,t,e){return e?(e[0]=i[0]-t,e[1]=i[1]-t,e[2]=i[2]+t,e[3]=i[3]+t,e):[i[0]-t,i[1]-t,i[2]+t,i[3]+t]}function ec(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i.slice()}function jn(i,t,e){let n,r;return t<i[0]?n=i[0]-t:i[2]<t?n=t-i[2]:n=0,e<i[1]?r=i[1]-e:i[3]<e?r=e-i[3]:r=0,n*n+r*r}function js(i,t){return Tl(i,t[0],t[1])}function Bn(i,t){return i[0]<=t[0]&&t[2]<=i[2]&&i[1]<=t[1]&&t[3]<=i[3]}function Tl(i,t,e){return i[0]<=t&&t<=i[2]&&i[1]<=e&&e<=i[3]}function zl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=t[0],a=t[1];let l=ne.UNKNOWN;return s<e?l=l|ne.LEFT:s>r&&(l=l|ne.RIGHT),a<n?l=l|ne.BELOW:a>o&&(l=l|ne.ABOVE),l===ne.UNKNOWN&&(l=ne.INTERSECTING),l}function Ge(){return[1/0,1/0,-1/0,-1/0]}function ti(i,t,e,n,r){return r?(r[0]=i,r[1]=t,r[2]=e,r[3]=n,r):[i,t,e,n]}function yo(i){return ti(1/0,1/0,-1/0,-1/0,i)}function xo(i,t){const e=i[0],n=i[1];return ti(e,n,e,n,t)}function Rl(i,t,e,n,r){const o=yo(r);return nc(o,i,t,e,n)}function Er(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function ic(i,t){return t[0]<i[0]&&(i[0]=t[0]),t[2]>i[2]&&(i[2]=t[2]),t[1]<i[1]&&(i[1]=t[1]),t[3]>i[3]&&(i[3]=t[3]),i}function bo(i,t){t[0]<i[0]&&(i[0]=t[0]),t[0]>i[2]&&(i[2]=t[0]),t[1]<i[1]&&(i[1]=t[1]),t[1]>i[3]&&(i[3]=t[1])}function nc(i,t,e,n,r){for(;e<n;e+=r)C0(i,t[e],t[e+1]);return i}function C0(i,t,e){i[0]=Math.min(i[0],t),i[1]=Math.min(i[1],e),i[2]=Math.max(i[2],t),i[3]=Math.max(i[3],e)}function Il(i,t){let e;return e=t(Bs(i)),e||(e=t(Us(i)),e)||(e=t(Vs(i)),e)||(e=t(Ki(i)),e)?e:!1}function Pl(i){let t=0;return Ll(i)||(t=Nt(i)*$e(i)),t}function Bs(i){return[i[0],i[1]]}function Us(i){return[i[2],i[1]]}function Yi(i){return[(i[0]+i[2])/2,(i[1]+i[3])/2]}function S0(i,t){let e;return t==="bottom-left"?e=Bs(i):t==="bottom-right"?e=Us(i):t==="top-left"?e=Ki(i):t==="top-right"?e=Vs(i):ft(!1,13),e}function Al(i,t,e,n,r){const[o,s,a,l,h,u,d,c]=Dl(i,t,e,n);return ti(Math.min(o,a,h,d),Math.min(s,l,u,c),Math.max(o,a,h,d),Math.max(s,l,u,c),r)}function Dl(i,t,e,n){const r=t*n[0]/2,o=t*n[1]/2,s=Math.cos(e),a=Math.sin(e),l=r*s,h=r*a,u=o*s,d=o*a,c=i[0],f=i[1];return[c-l+d,f-h-u,c-l-d,f-h+u,c+l-d,f+h+u,c+l+d,f+h-u,c-l+d,f-h-u]}function $e(i){return i[3]-i[1]}function Un(i,t,e){const n=e||Ge();return Kt(i,t)?(i[0]>t[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]<t[2]?n[2]=i[2]:n[2]=t[2],i[3]<t[3]?n[3]=i[3]:n[3]=t[3]):yo(n),n}function Ki(i){return[i[0],i[3]]}function Vs(i){return[i[2],i[3]]}function Nt(i){return i[2]-i[0]}function Kt(i,t){return i[0]<=t[2]&&i[2]>=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Ll(i){return i[2]<i[0]||i[3]<i[1]}function T0(i,t){return t?(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t):i}function z0(i,t,e){let n=!1;const r=zl(i,t),o=zl(i,e);if(r===ne.INTERSECTING||o===ne.INTERSECTING)n=!0;else{const s=i[0],a=i[1],l=i[2],h=i[3],u=t[0],d=t[1],c=e[0],f=e[1],g=(f-d)/(c-u);let m,p;!!(o&ne.ABOVE)&&!(r&ne.ABOVE)&&(m=c-(f-h)/g,n=m>=s&&m<=l),!n&&!!(o&ne.RIGHT)&&!(r&ne.RIGHT)&&(p=f-(c-l)*g,n=p>=a&&p<=h),!n&&!!(o&ne.BELOW)&&!(r&ne.BELOW)&&(m=c-(f-a)/g,n=m>=s&&m<=l),!n&&!!(o&ne.LEFT)&&!(r&ne.LEFT)&&(p=f-(c-s)*g,n=p>=a&&p<=h)}return n}function R0(i,t,e,n){let r=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h<n;++h)r.push(i[0]+a*h/n,i[1],i[2],i[1]+l*h/n,i[2]-a*h/n,i[3],i[0],i[3]-l*h/n)}else r=[i[0],i[1],i[2],i[1],i[2],i[3],i[0],i[3]];t(r,r,2);const o=[],s=[];for(let a=0,l=r.length;a<l;a+=2)o.push(r[a]),s.push(r[a+1]);return E0(o,s,e)}function rc(i,t){const e=t.getExtent(),n=Yi(i);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const r=Nt(e),s=Math.floor((n[0]-e[0])/r)*r;i[0]-=s,i[2]-=s}return i}function I0(i,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[e[0],i[1],e[2],i[3]]];rc(i,t);const n=Nt(e);if(Nt(i)>n)return[[e[0],i[1],e[2],i[3]]];if(i[0]<e[0])return[[i[0]+n,i[1],e[2],i[3]],[e[0],i[1],i[2],i[3]]];if(i[2]>e[2])return[[i[0],i[1],e[2],i[3]],[e[0],i[1],i[2]-n,i[3]]]}return[i]}function P0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function A0(i,t){const e=t.getRadius(),n=t.getCenter(),r=n[0],o=n[1],s=i[0],a=i[1];let l=s-r;const h=a-o;l===0&&h===0&&(l=1);const u=Math.sqrt(l*l+h*h),d=r+e*l/u,c=o+e*h/u;return[d,c]}function Fl(i,t){const e=i[0],n=i[1],r=t[0],o=t[1],s=r[0],a=r[1],l=o[0],h=o[1],u=l-s,d=h-a,c=u===0&&d===0?0:(u*(e-s)+d*(n-a))/(u*u+d*d||0);let f,g;return c<=0?(f=s,g=a):c>=1?(f=l,g=h):(f=s+c*u,g=a+c*d),[f,g]}function ei(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Ol(i,t){const e=Math.cos(t),n=Math.sin(t),r=i[0]*e-i[1]*n,o=i[1]*e+i[0]*n;return i[0]=r,i[1]=o,i}function D0(i,t){return i[0]*=t,i[1]*=t,i}function wi(i,t){const e=i[0]-t[0],n=i[1]-t[1];return e*e+n*n}function oc(i,t){return Math.sqrt(wi(i,t))}function L0(i,t){return wi(i,Fl(i,t))}function Nl(i,t){if(t.canWrapX()){const e=Nt(t.getExtent()),n=sc(i,t,e);n&&(i[0]-=n*e)}return i}function sc(i,t,e){const n=t.getExtent();let r=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||Nt(n),r=Math.floor((i[0]-n[0])/e)),r}const ac=63710088e-1;function lc(i,t,e){e=e||ac;const n=Nn(i[1]),r=Nn(t[1]),o=(r-n)/2,s=Nn(t[0]-i[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function qs(i,t){let e=0;const n=i.length;let r=i[n-1][0],o=i[n-1][1];for(let s=0;s<n;s++){const a=i[s][0],l=i[s][1];e+=Nn(a-r)*(2+Math.sin(Nn(o))+Math.sin(Nn(l))),r=a,o=l}return e*t*t/2}function hc(i,t){t=t||{};const e=t.radius||ac,n=t.projection||"EPSG:3857",r=i.getType();r!=="GeometryCollection"&&(i=i.clone().transform(n,"EPSG:4326"));let o=0,s,a,l,h,u,d;switch(r){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(s=i.getCoordinates(),o=Math.abs(qs(s[0],e)),l=1,h=s.length;l<h;++l)o-=Math.abs(qs(s[l],e));break}case"MultiPolygon":{for(s=i.getCoordinates(),l=0,h=s.length;l<h;++l)for(a=s[l],o+=Math.abs(qs(a[0],e)),u=1,d=a.length;u<d;++u)o-=Math.abs(qs(a[u],e));break}case"GeometryCollection":{const c=i.getGeometries();for(l=0,h=c.length;l<h;++l)o+=hc(c[l],t);break}default:throw new Error("Unsupported geometry type: "+r)}return o}let Gl=!0;function F0(i){Gl=!(i===void 0?!0:i)}function jl(i,t,e){if(t!==void 0){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];t=t}else t=i.slice();return t}function uc(i,t,e){if(t!==void 0&&i!==t){for(let n=0,r=i.length;n<r;++n)t[n]=i[n];i=t}return i}function dc(i){M0(i.getCode(),i),Mr(i,i,jl)}function O0(i){i.forEach(dc)}function Gt(i){return typeof i=="string"?w0(i):i||null}function Xs(i,t,e,n){i=Gt(i);let r;const o=i.getPointResolutionFunc();if(o){if(r=o(t,e),n&&n!==i.getUnits()){const s=i.getMetersPerUnit();s&&(r=r*s/xr[n])}}else{const s=i.getUnits();if(s=="degrees"&&!n||n=="degrees")r=t;else{const a=Vl(i,Gt("EPSG:4326"));if(a===uc&&s!=="degrees")r=t*i.getMetersPerUnit();else{let h=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];h=a(h,h,2);const u=lc(h.slice(0,2),h.slice(2,4)),d=lc(h.slice(4,6),h.slice(6,8));r=(u+d)/2}const l=n?xr[n]:i.getMetersPerUnit();l!==void 0&&(r/=l)}}return r}function Bl(i){O0(i),i.forEach(function(t){i.forEach(function(e){t!==e&&Mr(t,e,jl)})})}function N0(i,t,e,n){i.forEach(function(r){t.forEach(function(o){Mr(r,o,e),Mr(o,r,n)})})}function Ul(i,t){return i?typeof i=="string"?Gt(i):i:Gt(t)}function cc(i){return function(t,e,n){const r=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(r);for(let o=0;o<r;o+=n){const s=i(t.slice(o,o+n)),a=s.length;for(let l=0,h=n;l<h;++l)e[o+l]=l>=a?t[o+l]:s[l]}return e}}function G0(i,t,e,n){const r=Gt(i),o=Gt(t);Mr(r,o,cc(e)),Mr(o,r,cc(n))}function j0(i,t){const e=$s(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=$i(n+180,360)-180),e}function Vn(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Vl(i,t)===jl)&&e}function Vl(i,t){const e=i.getCode(),n=t.getCode();let r=tc(e,n);return r||(r=uc),r}function ko(i,t){const e=Gt(i),n=Gt(t);return Vl(e,n)}function $s(i,t,e){return ko(t,e)(i,void 0,i.length)}function B0(i,t,e,n){const r=ko(t,e);return R0(i,r,void 0,n)}function Cr(i,t){return i}function Vt(i,t){return Gl&&!ei(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Gl=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function ql(i,t){return i}function Zi(i,t){return i}function fc(i,t,e){return function(n){let r,o;if(i.canWrapX()){const s=i.getExtent(),a=Nt(s);n=n.slice(0),o=sc(n,i,a),o&&(n[0]=n[0]-o*a),n[0]=Wt(n[0],s[0],s[2]),n[1]=Wt(n[1],s[1],s[3]),r=e(n)}else r=e(n);return o&&t.canWrapX()&&(r[0]+=o*Nt(t.getExtent())),r}}function U0(){Bl(Hd),Bl(Qd),N0(Qd,Hd,y0,x0)}U0();const re={ADD:"add",REMOVE:"remove"},gc={LENGTH:"length"};class Ws extends Qe{constructor(t,e,n){super(t),this.element=e,this.index=n}}class V0 extends hi{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,r=e.length;n<r;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(gc.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 Ws(re.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 n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)}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 Ws(re.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Ws(re.REMOVE,r,t)),this.dispatchEvent(new Ws(re.ADD,e,t))}updateLength_(){this.set(gc.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new Yd(58)}}const We=V0,mc=new Array(6);function Ye(){return[1,0,0,1,0,0]}function pc(i){return Ys(i,1,0,0,1,0,0)}function Xl(i,t){const e=i[0],n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],l=t[0],h=t[1],u=t[2],d=t[3],c=t[4],f=t[5];return i[0]=e*l+r*h,i[1]=n*l+o*h,i[2]=e*u+r*d,i[3]=n*u+o*d,i[4]=e*c+r*f+s,i[5]=n*c+o*f+a,i}function Ys(i,t,e,n,r,o,s){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i[4]=o,i[5]=s,i}function q0(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function Jt(i,t){const e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function $l(i,t,e){return Xl(i,Ys(mc,t,0,0,e,0,0))}function X0(i,t,e){return Ys(i,t,0,0,e,0,0)}function $0(i,t,e){return Xl(i,Ys(mc,1,0,0,1,t,e))}function Mi(i,t,e,n,r,o,s,a){const l=Math.sin(o),h=Math.cos(o);return i[0]=n*h,i[1]=r*l,i[2]=-n*l,i[3]=r*h,i[4]=s*n*h-a*n*l+t,i[5]=s*r*l+a*r*h+e,i}function Wl(i,t){const e=W0(t);ft(e!==0,32);const n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],l=t[5];return i[0]=s/e,i[1]=-r/e,i[2]=-o/e,i[3]=n/e,i[4]=(o*l-s*a)/e,i[5]=-(n*l-r*a)/e,i}function W0(i){return i[0]*i[3]-i[1]*i[2]}let vc;function _c(i){const t="matrix("+i.join(", ")+")";if(bl)return t;const e=vc||(vc=document.createElement("div"));return e.style.transform=t,e.style.transform}const Y0=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,K0=/^([a-z]*)$|^hsla?\(.*\)$/i;function Yl(i){return typeof i=="string"?i:xc(i)}function Z0(i){const t=document.createElement("div");if(t.style.color=i,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}const H0=function(){const t={};let e=0;return function(n){let r;if(t.hasOwnProperty(n))r=t[n];else{if(e>=1024){let o=0;for(const s in t)(o++&3)===0&&(delete t[s],--e)}r=J0(n),t[n]=r,++e}return r}}();function wo(i){return Array.isArray(i)?i:H0(i)}function J0(i){let t,e,n,r,o;if(K0.exec(i)&&(i=Z0(i)),Y0.exec(i)){const s=i.length-1;let a;s<=4?a=1:a=2;const l=s===4||s===8;t=parseInt(i.substr(1+0*a,a),16),e=parseInt(i.substr(1+1*a,a),16),n=parseInt(i.substr(1+2*a,a),16),l?r=parseInt(i.substr(1+3*a,a),16):r=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[t,e,n,r/255]}else i.startsWith("rgba(")?(o=i.slice(5,-1).split(",").map(Number),yc(o)):i.startsWith("rgb(")?(o=i.slice(4,-1).split(",").map(Number),o.push(1),yc(o)):ft(!1,14);return o}function yc(i){return i[0]=Wt(i[0]+.5|0,0,255),i[1]=Wt(i[1]+.5|0,0,255),i[2]=Wt(i[2]+.5|0,0,255),i[3]=Wt(i[3],0,1),i}function xc(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const r=i[3]===void 0?1:Math.round(i[3]*100)/100;return"rgba("+t+","+e+","+n+","+r+")"}class Q0{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 n=this.cache_[e];(t++&3)===0&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const r=bc(t,e,n);return r in this.cache_?this.cache_[r]:null}set(t,e,n,r){const o=bc(t,e,n);this.cache_[o]=r,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bc(i,t,e){const n=e?Yl(e):"null";return t+":"+i+":"+n}const Ks=new Q0;class tv extends yl{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){et()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Mi(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Wl(r,n)}forEachFeatureAtCoordinate(t,e,n,r,o,s,a,l){let h;const u=e.viewState;function d(x,k,w,C){return o.call(s,k,x?w:null,C)}const c=u.projection,f=Nl(t.slice(),c),g=[[0,0]];if(c.canWrapX()&&r){const x=c.getExtent(),k=Nt(x);g.push([-k,0],[k,0])}const m=e.layerStatesArray,p=m.length,_=[],v=[];for(let x=0;x<g.length;x++)for(let k=p-1;k>=0;--k){const w=m[k],C=w.layer;if(C.hasRenderer()&&El(w,u)&&a.call(l,C)){const M=C.getRenderer(),S=C.getSource();if(M&&S){const R=S.getWrapX()?f:t,A=d.bind(null,w.managed);v[0]=R[0]+g[x][0],v[1]=R[1]+g[x][1],h=M.forEachFeatureAtCoordinate(v,e,n,A,_)}if(h)return h}}if(_.length===0)return;const y=1/_.length;return _.forEach((x,k)=>x.distanceSq+=k*y),_.sort((x,k)=>x.distanceSq-k.distanceSq),_.some(x=>h=x.callback(x.feature,x.layer,x.geometry)),h}hasFeatureAtCoordinate(t,e,n,r,o,s){return this.forEachFeatureAtCoordinate(t,e,n,r,Dn,this,o,s)!==void 0}getMap(){return this.map_}renderFrame(t){et()}scheduleExpireIconCache(t){Ks.canExpireCache()&&t.postRenderFunctions.push(ev)}}function ev(i,t){Ks.expire()}const iv=tv;class nv extends Qe{constructor(t,e,n,r){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=r}}const kc=nv,wc="10px sans-serif",Ei="#000",Zs="round",Mo=[],Eo=0,Sr="round",Co=10,So="#000",To="center",Hs="middle",qn=[0,0,0,0],zo=1,Ci=new hi;let Tr=null,Kl;const Zl={},rv=function(){const t="32px ",e=["monospace","serif"],n=e.length,r="wmytzilWMYTZIL@#/&?$%10\uF013";let o,s;function a(h,u,d){let c=!0;for(let f=0;f<n;++f){const g=e[f];if(s=Js(h+" "+u+" "+t+g,r),d!=g){const m=Js(h+" "+u+" "+t+d+","+g,r);c=c&&m!=s}}return!!c}function l(){let h=!0;const u=Ci.getKeys();for(let d=0,c=u.length;d<c;++d){const f=u[d];Ci.get(f)<100&&(a.apply(this,f.split(`
38
+ `))?(mo(Zl),Tr=null,Kl=void 0,Ci.set(f,100)):(Ci.set(f,Ci.get(f)+1,!0),h=!1))}h&&(clearInterval(o),o=void 0)}return function(h){const u=Wd(h);if(!u)return;const d=u.families;for(let c=0,f=d.length;c<f;++c){const g=d[c],m=u.style+`
39
+ `+u.weight+`
40
+ `+g;Ci.get(m)===void 0&&(Ci.set(m,100,!0),a(u.style,u.weight,g)||(Ci.set(m,0,!0),o===void 0&&(o=setInterval(l,32))))}}}(),ov=function(){let i;return function(t){let e=Zl[t];if(e==null){if(bl){const n=Wd(t),r=Mc(t,"\u017Dg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else i||(i=document.createElement("div"),i.innerHTML="M",i.style.minHeight="0",i.style.maxHeight="none",i.style.height="auto",i.style.padding="0",i.style.border="none",i.style.position="absolute",i.style.display="block",i.style.left="-99999px"),i.style.font=t,document.body.appendChild(i),e=i.offsetHeight,document.body.removeChild(i);Zl[t]=e}return e}}();function Mc(i,t){return Tr||(Tr=Pe(1,1)),i!=Kl&&(Tr.font=i,Kl=Tr.font),Tr.measureText(t)}function Js(i,t){return Mc(i,t).width}function Ec(i,t,e){if(t in e)return e[t];const n=t.split(`
41
+ `).reduce((r,o)=>Math.max(r,Js(i,o)),0);return e[t]=n,n}function sv(i,t){const e=[],n=[],r=[];let o=0,s=0,a=0,l=0;for(let h=0,u=t.length;h<=u;h+=2){const d=t[h];if(d===`
42
+ `||h===u){o=Math.max(o,s),r.push(s),s=0,a+=l;continue}const c=t[h+1]||i.font,f=Js(c,d);e.push(f),s+=f;const g=ov(c);n.push(g),l=Math.max(l,g)}return{width:o,height:a,widths:e,heights:n,lineWidths:r}}function av(i,t,e,n,r,o,s,a,l,h,u){i.save(),e!==1&&(i.globalAlpha*=e),t&&i.setTransform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(u[0],u[1]),lv(n,i)):u[0]<0||u[1]<0?(i.translate(l,h),i.scale(u[0],u[1]),i.drawImage(n,r,o,s,a,0,0,s,a)):i.drawImage(n,r,o,s,a,l,h,s*u[0],a*u[1]),i.restore()}function lv(i,t){const e=i.contextInstructions;for(let n=0,r=e.length;n<r;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class hv extends iv{constructor(t){super(t),this.fontChangeListenerKey_=gt(Ci,_r.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=vo+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const r=new kc(t,void 0,e);n.dispatchEvent(r)}}disposeInternal(){Ot(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Wi.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(s,a){return s.zIndex-a.zIndex}),n=t.viewState;this.children_.length=0;const r=[];let o=null;for(let s=0,a=e.length;s<a;++s){const l=e[s];t.layerIndex=s;const h=l.layer,u=h.getSourceState();if(!El(l,n)||u!="ready"&&u!="undefined"){h.unrender();continue}const d=h.render(t,o);!d||(d!==o&&(this.children_.push(d),o=d),"getDeclutter"in h&&r.push(h))}for(let s=r.length-1;s>=0;--s)r[s].renderDeclutter(t);s0(this.element_,this.children_),this.dispatchRenderEvent(Wi.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const uv=hv;class Hi extends Qe{constructor(t,e){super(t),this.layer=e}}const Hl={LAYERS:"layers"};class Jl extends Zd{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Hl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new We(n.slice(),{unique:!0}):ft(typeof n.getArray=="function",43):n=new We(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ot),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gt(t,re.ADD,this.handleLayersAdd_,this),gt(t,re.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Ot);mo(this.listenerKeys_);const e=t.getArray();for(let n=0,r=e.length;n<r;n++){const o=e[n];this.registerLayerListeners_(o),this.dispatchEvent(new Hi("addlayer",o))}this.changed()}registerLayerListeners_(t){const e=[gt(t,_r.PROPERTYCHANGE,this.handleLayerChange_,this),gt(t,tt.CHANGE,this.handleLayerChange_,this)];t instanceof Jl&&e.push(gt(t,"addlayer",this.handleLayerGroupAdd_,this),gt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[K(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Hi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Hi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Hi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=K(e);this.listenerKeys_[n].forEach(Ot),delete this.listenerKeys_[n],this.dispatchEvent(new Hi("removelayer",e)),this.changed()}getLayers(){return this.get(Hl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let r=0,o=n.length;r<o;++r)this.dispatchEvent(new Hi("removelayer",n[r]))}this.set(Hl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(s){s.getLayerStatesArray(e)});const r=this.getLayerState();let o=r.zIndex;!t&&r.zIndex===void 0&&(o=0);for(let s=n,a=e.length;s<a;s++){const l=e[s];l.opacity*=r.opacity,l.visible=l.visible&&r.visible,l.maxResolution=Math.min(l.maxResolution,r.maxResolution),l.minResolution=Math.max(l.minResolution,r.minResolution),l.minZoom=Math.max(l.minZoom,r.minZoom),l.maxZoom=Math.min(l.maxZoom,r.maxZoom),r.extent!==void 0&&(l.extent!==void 0?l.extent=Un(l.extent,r.extent):l.extent=r.extent),l.zIndex===void 0&&(l.zIndex=o)}return e}getSourceState(){return"ready"}}const Qs=Jl;class dv extends Qe{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const zr=dv;class cv extends zr{constructor(t,e,n,r,o,s){super(t,e,o),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=r!==void 0?r:!1,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const Si=cv,Mt={SINGLECLICK:"singleclick",CLICK:tt.CLICK,DBLCLICK:tt.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class fv extends Is{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=gt(n,Cl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gt(n,Cl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_,Vd?{passive:!1}:!1)}emulateClick_(t){let e=new Si(Mt.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Si(Mt.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const n=new Si(Mt.SINGLECLICK,this.map_,t);this.dispatchEvent(n)}.bind(this),250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==Mt.POINTERUP||e.type==Mt.POINTERCANCEL){delete this.trackedTouches_[n];for(const r in this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else(e.type==Mt.POINTERDOWN||e.type==Mt.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Si(Mt.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new Si(Mt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const n in t){const r=t[n];this.down_[n]=typeof r=="function"?Ln:r}if(this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gt(n,Mt.POINTERMOVE,this.handlePointerMove_,this),gt(n,Mt.POINTERUP,this.handlePointerUp_,this),gt(this.element_,Mt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(gt(this.element_.getRootNode(),Mt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Si(Mt.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new Si(Mt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ot(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(tt.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ot(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ot),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const gv=fv,ta=1/0;class mv{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,mo(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const r=this.keyFunction_(n);return delete this.queuedElements_[r],n}enqueue(t){ft(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=ta?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,r=e.length,o=e[t],s=n[t],a=t;for(;t<r>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),u=h<r&&n[h]<n[l]?h:l;e[t]=e[u],n[t]=n[u],t=u}e[t]=o,n[t]=s,this.siftDown_(a,t)}siftDown_(t,e){const n=this.elements_,r=this.priorities_,o=n[e],s=r[e];for(;e>t;){const a=this.getParentIndex_(e);if(r[a]>s)n[e]=n[a],r[e]=r[a],e=a;else break}n[e]=o,r[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let r=0;const o=e.length;let s,a,l;for(a=0;a<o;++a)s=e[a],l=t(s),l==ta?delete this.queuedElements_[this.keyFunction_(s)]:(n[r]=l,e[r++]=s);e.length=r,n.length=r,this.heapify_()}}const pv=mv,N={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class vv extends pv{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(tt.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===N.LOADED||n===N.ERROR||n===N.EMPTY){n!==N.ERROR&&e.removeEventListener(tt.CHANGE,this.boundHandleTileChange_);const r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,r,o,s;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)o=this.dequeue()[0],s=o.getKey(),r=o.getState(),r===N.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++n,o.load())}}const _v=vv;function yv(i,t,e,n,r){if(!i||!(e in i.wantedTiles)||!i.wantedTiles[e][t.getKey()])return ta;const o=i.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}const Yt={ANIMATING:0,INTERACTING:1},ii={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Cc=42,Ql=256;function Sc(i,t,e){return function(n,r,o,s,a){if(!n)return;if(!r&&!t)return n;const l=t?0:o[0]*r,h=t?0:o[1]*r,u=a?a[0]:0,d=a?a[1]:0;let c=i[0]+l/2+u,f=i[2]-l/2+u,g=i[1]+h/2+d,m=i[3]-h/2+d;c>f&&(c=(f+c)/2,f=c),g>m&&(g=(m+g)/2,m=g);let p=Wt(n[0],c,f),_=Wt(n[1],g,m);if(s&&e&&r){const v=30*r;p+=-v*Math.log(1+Math.max(0,c-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-f)/v),_+=-v*Math.log(1+Math.max(0,g-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-m)/v)}return[p,_]}}function xv(i){return i}function th(i,t,e,n){const r=Nt(t)/e[0],o=$e(t)/e[1];return n?Math.min(i,Math.max(r,o)):Math.min(i,Math.min(r,o))}function eh(i,t,e){let n=Math.min(i,t);const r=50;return n*=Math.log(1+r*Math.max(0,i/t-1))/r+1,e&&(n=Math.max(n,e),n/=Math.log(1+r*Math.max(0,e/i-1))/r+1),Wt(n,e/2,t*2)}function bv(i,t,e,n){return t=t!==void 0?t:!0,function(r,o,s,a){if(r!==void 0){const l=i[0],h=i[i.length-1],u=e?th(l,e,s,n):l;if(a)return t?eh(r,u,h):Wt(r,h,u);const d=Math.min(u,r),c=Math.floor(xl(i,d,o));return i[c]>u&&c<i.length-1?i[c+1]:i[c]}else return}}function kv(i,t,e,n,r,o){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(s,a,l,h){if(s!==void 0){const u=r?th(t,r,l,o):t;if(h)return n?eh(s,u,e):Wt(s,e,u);const d=1e-9,c=Math.ceil(Math.log(t/u)/Math.log(i)-d),f=-a*(.5-d)+.5,g=Math.min(u,s),m=Math.floor(Math.log(t/g)/Math.log(i)+f),p=Math.max(c,m),_=t/Math.pow(i,p);return Wt(_,e,u)}else return}}function Tc(i,t,e,n,r){return e=e!==void 0?e:!0,function(o,s,a,l){if(o!==void 0){const h=n?th(i,n,a,r):i;return!e||!l?Wt(o,t,h):eh(o,h,t)}else return}}function ih(i){if(i!==void 0)return 0}function zc(i){if(i!==void 0)return i}function wv(i){const t=2*Math.PI/i;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function Mv(i){return i=i||Nn(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function Rc(i){return Math.pow(i,3)}function Rr(i){return 1-Rc(1-i)}function Ev(i){return 3*i*i-2*i*i*i}function Cv(i){return i}function Ji(i,t,e,n,r,o){o=o||[];let s=0;for(let a=t;a<e;a+=n){const l=i[a],h=i[a+1];o[s++]=r[0]*l+r[2]*h+r[4],o[s++]=r[1]*l+r[3]*h+r[5]}return o&&o.length!=s&&(o.length=s),o}function nh(i,t,e,n,r,o,s){s=s||[];const a=Math.cos(r),l=Math.sin(r),h=o[0],u=o[1];let d=0;for(let c=t;c<e;c+=n){const f=i[c]-h,g=i[c+1]-u;s[d++]=h+f*a-g*l,s[d++]=u+f*l+g*a;for(let m=c+2;m<c+n;++m)s[d++]=i[m]}return s&&s.length!=d&&(s.length=d),s}function Sv(i,t,e,n,r,o,s,a){a=a||[];const l=s[0],h=s[1];let u=0;for(let d=t;d<e;d+=n){const c=i[d]-l,f=i[d+1]-h;a[u++]=l+r*c,a[u++]=h+o*f;for(let g=d+2;g<d+n;++g)a[u++]=i[g]}return a&&a.length!=u&&(a.length=u),a}function Ic(i,t,e,n,r,o,s){s=s||[];let a=0;for(let l=t;l<e;l+=n){s[a++]=i[l]+r,s[a++]=i[l+1]+o;for(let h=l+2;h<l+n;++h)s[a++]=i[h]}return s&&s.length!=a&&(s.length=a),s}const Pc=Ye();class Tv extends hi{constructor(){super(),this.extent_=Ge(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Kp(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);const r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return et()}closestPointXY(t,e,n,r){return et()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[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 et()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&yo(e),this.extentRevision_=this.getRevision()}return T0(this.extent_,t)}rotate(t,e){et()}scale(t,e,n){et()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return et()}getType(){return et()}applyTransform(t){et()}intersectsExtent(t){return et()}translate(t,e){et()}transform(t,e){const n=Gt(t),r=n.getUnits()=="tile-pixels"?function(o,s,a){const l=n.getExtent(),h=n.getWorldExtent(),u=$e(h)/$e(l);return Mi(Pc,h[0],h[3],u,-u,0,0,0),Ji(o,0,o.length,a,Pc,s),ko(n,e)(o,s,a)}:ko(n,e);return this.applyTransform(r),this}}const Ac=Tv;class zv extends Ac{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Rl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return et()}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=ea(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){et()}setLayout(t,e,n){let r;if(t)r=ea(t);else{for(let o=0;o<n;++o)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];r=e.length,t=Rv(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();nh(n,0,n.length,r,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Yi(this.getExtent()));const r=this.getFlatCoordinates();if(r){const o=this.getStride();Sv(r,0,r.length,o,t,e,n,r),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const r=this.getStride();Ic(n,0,n.length,r,t,e,n),this.changed()}}}function Rv(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function ea(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function Iv(i,t,e){const n=i.getFlatCoordinates();if(n){const r=i.getStride();return Ji(n,0,n.length,r,t,e)}else return null}const Qi=zv;function Dc(i,t,e,n,r,o,s){const a=i[t],l=i[t+1],h=i[e]-a,u=i[e+1]-l;let d;if(h===0&&u===0)d=t;else{const c=((r-a)*h+(o-l)*u)/(h*h+u*u);if(c>1)d=e;else if(c>0){for(let f=0;f<n;++f)s[f]=ki(i[t+f],i[e+f],c);s.length=n;return}else d=t}for(let c=0;c<n;++c)s[c]=i[d+c];s.length=n}function rh(i,t,e,n,r){let o=i[t],s=i[t+1];for(t+=n;t<e;t+=n){const a=i[t],l=i[t+1],h=On(o,s,a,l);h>r&&(r=h),o=a,s=l}return r}function oh(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=rh(i,t,a,n,r),t=a}return r}function Pv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];r=oh(i,t,a,n,r),t=a[a.length-1]}return r}function sh(i,t,e,n,r,o,s,a,l,h,u){if(t==e)return h;let d,c;if(r===0)if(c=On(s,a,i[t],i[t+1]),c<h){for(d=0;d<n;++d)l[d]=i[t+d];return l.length=n,c}else return h;u=u||[NaN,NaN];let f=t+n;for(;f<e;)if(Dc(i,f-n,f,n,s,a,u),c=On(s,a,u[0],u[1]),c<h){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(c)-Math.sqrt(h))/r|0,1);if(o&&(Dc(i,e-n,t,n,s,a,u),c=On(s,a,u[0],u[1]),c<h)){for(h=c,d=0;d<n;++d)l[d]=u[d];l.length=n}return h}function ah(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=sh(i,t,f,n,r,o,s,a,l,h,u),t=f}return h}function Av(i,t,e,n,r,o,s,a,l,h,u){u=u||[NaN,NaN];for(let d=0,c=e.length;d<c;++d){const f=e[d];h=ah(i,t,f,n,r,o,s,a,l,h,u),t=f[f.length-1]}return h}function Lc(i,t,e,n){for(let r=0,o=e.length;r<o;++r)i[t++]=e[r];return t}function ia(i,t,e,n){for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0;a<n;++a)i[t++]=s[a]}return t}function lh(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=ia(i,t,e[s],n);r[o++]=l,t=l}return r.length=o,r}function Dv(i,t,e,n,r){r=r||[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=lh(i,t,e[s],n,r[o]);l.length===0&&(l[0]=t),r[o++]=l,t=l[l.length-1]}return r.length=o,r}function hh(i,t,e,n,r,o,s){const a=(e-t)/n;if(a<3){for(;t<e;t+=n)o[s++]=i[t],o[s++]=i[t+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-n];let u=0;for(;h.length>0;){const d=h.pop(),c=h.pop();let f=0;const g=i[c],m=i[c+1],p=i[d],_=i[d+1];for(let v=c+n;v<d;v+=n){const y=i[v],x=i[v+1],k=u0(y,x,g,m,p,_);k>f&&(u=v,f=k)}f>r&&(l[(u-t)/n]=1,c+n<u&&h.push(c,u),u+n<d&&h.push(u,d))}for(let d=0;d<a;++d)l[d]&&(o[s++]=i[t+d*n],o[s++]=i[t+d*n+1]);return s}function Lv(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=hh(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Xn(i,t){return t*Math.round(i/t)}function Fv(i,t,e,n,r,o,s){if(t==e)return s;let a=Xn(i[t],r),l=Xn(i[t+1],r);t+=n,o[s++]=a,o[s++]=l;let h,u;do if(h=Xn(i[t],r),u=Xn(i[t+1],r),t+=n,t==e)return o[s++]=h,o[s++]=u,s;while(h==a&&u==l);for(;t<e;){const d=Xn(i[t],r),c=Xn(i[t+1],r);if(t+=n,d==h&&c==u)continue;const f=h-a,g=u-l,m=d-a,p=c-l;if(f*p==g*m&&(f<0&&m<f||f==m||f>0&&m>f)&&(g<0&&p<g||g==p||g>0&&p>g)){h=d,u=c;continue}o[s++]=h,o[s++]=u,a=h,l=u,h=d,u=c}return o[s++]=h,o[s++]=u,s}function Fc(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l];s=Fv(i,t,u,n,r,o,s),a.push(s),t=u}return s}function Ov(i,t,e,n,r,o,s,a){for(let l=0,h=e.length;l<h;++l){const u=e[l],d=[];s=Fc(i,t,u,n,r,o,s,d),a.push(d),t=u[u.length-1]}return s}function tn(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=t;s<e;s+=n)r[o++]=i.slice(s,s+n);return r.length=o,r}function Ro(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=tn(i,t,l,n,r[o]),t=l}return r.length=o,r}function uh(i,t,e,n,r){r=r!==void 0?r:[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s];r[o++]=l.length===1&&l[0]===t?[]:Ro(i,t,l,n,r[o]),t=l[l.length-1]}return r.length=o,r}function Oc(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=s*a-o*l,o=a,s=l}return r/2}function Nc(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Oc(i,t,a,n),t=a}return r}function Nv(i,t,e,n){let r=0;for(let o=0,s=e.length;o<s;++o){const a=e[o];r+=Nc(i,t,a,n),t=a[a.length-1]}return r}class na extends Qi{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 na(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))}getArea(){return Oc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new na(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Gc=na;class dh extends Qi{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new dh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=On(t,e,o[0],o[1]);if(s<r){const a=this.stride;for(let l=0;l<a;++l)n[l]=o[l];return n.length=a,s}else return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return xo(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Tl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Lc(this.flatCoordinates,0,t,this.stride),this.changed()}}const ni=dh;function Gv(i,t,e,n,r){return!Il(r,function(s){return!$n(i,t,e,n,s[0],s[1])})}function $n(i,t,e,n,r,o){let s=0,a=i[e-n],l=i[e-n+1];for(;t<e;t+=n){const h=i[t],u=i[t+1];l<=o?u>o&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return s!==0}function ch(i,t,e,n,r,o){if(e.length===0||!$n(i,t,e[0],n,r,o))return!1;for(let s=1,a=e.length;s<a;++s)if($n(i,e[s-1],e[s],n,r,o))return!1;return!0}function jv(i,t,e,n,r,o){if(e.length===0)return!1;for(let s=0,a=e.length;s<a;++s){const l=e[s];if(ch(i,t,l,n,r,o))return!0;t=l[l.length-1]}return!1}function fh(i,t,e,n,r,o,s){let a,l,h,u,d,c,f;const g=r[o+1],m=[];for(let v=0,y=e.length;v<y;++v){const x=e[v];for(u=i[x-n],c=i[x-n+1],a=t;a<x;a+=n)d=i[a],f=i[a+1],(g<=c&&f<=g||c<=g&&g<=f)&&(h=(g-c)/(f-c)*(d-u)+u,m.push(h)),u=d,c=f}let p=NaN,_=-1/0;for(m.sort(An),u=m[0],a=1,l=m.length;a<l;++a){d=m[a];const v=Math.abs(d-u);v>_&&(h=(u+d)/2,ch(i,t,e,n,h,g)&&(p=h,_=v)),u=d}return isNaN(p)&&(p=r[o]),s?(s.push(p,g,_),s):[p,g,_]}function jc(i,t,e,n,r){let o=[];for(let s=0,a=e.length;s<a;++s){const l=e[s];o=fh(i,t,l,n,r,2*s,o),t=l[l.length-1]}return o}function Bc(i,t,e,n,r){let o;for(t+=n;t<e;t+=n)if(o=r(i.slice(t-n,t),i.slice(t,t+n)),o)return o;return!1}function ra(i,t,e,n,r){const o=nc(Ge(),i,t,e,n);return Kt(r,o)?Bn(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]?!0:Bc(i,t,e,n,function(s,a){return z0(r,s,a)}):!1}function Bv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){if(ra(i,t,e[o],n,r))return!0;t=e[o]}return!1}function Uc(i,t,e,n,r){return!!(ra(i,t,e,n,r)||$n(i,t,e,n,r[0],r[1])||$n(i,t,e,n,r[0],r[3])||$n(i,t,e,n,r[2],r[1])||$n(i,t,e,n,r[2],r[3]))}function Vc(i,t,e,n,r){if(!Uc(i,t,e[0],n,r))return!1;if(e.length===1)return!0;for(let o=1,s=e.length;o<s;++o)if(Gv(i,e[o-1],e[o],n,r)&&!ra(i,e[o-1],e[o],n,r))return!1;return!0}function Uv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(Vc(i,t,a,n,r))return!0;t=a[a.length-1]}return!1}function Vv(i,t,e,n){for(;t<e-n;){for(let r=0;r<n;++r){const o=i[t+r];i[t+r]=i[e-n+r],i[e-n+r]=o}t+=n,e-=n}}function gh(i,t,e,n){let r=0,o=i[e-n],s=i[e-n+1];for(;t<e;t+=n){const a=i[t],l=i[t+1];r+=(a-o)*(l+s),o=a,s=l}return r===0?void 0:r>0}function qc(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);if(o===0){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;t=a}return!0}function qv(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o){const a=e[o];if(!qc(i,t,a,n,r))return!1;a.length&&(t=a[a.length-1])}return!0}function mh(i,t,e,n,r){r=r!==void 0?r:!1;for(let o=0,s=e.length;o<s;++o){const a=e[o],l=gh(i,t,a,n);(o===0?r&&l||!r&&!l:r&&!l||!r&&l)&&Vv(i,t,a,n),t=a}return t}function Xc(i,t,e,n,r){for(let o=0,s=e.length;o<s;++o)t=mh(i,t,e[o],n,r);return t}function Xv(i,t){const e=[];let n=0,r=0;for(let o=0,s=t.length;o<s;++o){const a=t[o];if(!gh(i,n,a,2))e.push(t.slice(r,o+1));else{if(e.length===0)continue;e[e.length-1].push(t[r])}r=o+1,n=a}return e}class Ir extends Qi{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Ir(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return ch(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Nc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),mh(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Ro(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Yi(this.getExtent());this.flatInteriorPoint_=fh(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ni(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Gc(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s],h=new Gc(e.slice(o,l),t);r.push(h),o=l}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;qc(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=mh(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Fc(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Ir(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Vc(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Wn=Ir;function $c(i){const t=i[0],e=i[1],n=i[2],r=i[3],o=[t,e,t,r,n,r,n,e,t,e];return new Ir(o,"XY",[o.length])}function $v(i,t,e){t=t||32;const n=i.getStride(),r=i.getLayout(),o=i.getCenter(),s=n*(t+1),a=new Array(s);for(let u=0;u<s;u+=n){a[u]=0,a[u+1]=0;for(let d=2;d<n;d++)a[u+d]=o[d]}const l=[a.length],h=new Ir(a,r,l);return Wv(h,o,i.getRadius(),e),h}function Wv(i,t,e,n){const r=i.getFlatCoordinates(),o=i.getStride(),s=r.length/o-1,a=n||0;for(let l=0;l<=s;++l){const h=l*o,u=a+$i(l,s)*2*Math.PI/s;r[h]=t[0]+e*Math.cos(u),r[h+1]=t[1]+e*Math.sin(u)}i.changed()}const ph=0;class Yv extends hi{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Ul(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&&F0(),t.center&&(t.center=Vt(t.center,this.projection_)),t.extent&&(t.extent=Zi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in ii)delete e[a];this.setProperties(e,!0);const n=Zv(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const r=Kv(t),o=n.constraint,s=Hv(t);this.constraints_={center:r,resolution:o,rotation:s},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 n=this.getCenter();if(n){const r=t||[0,0,0,0];e=e||[0,0,0,0];const o=this.getResolution(),s=o/2*(r[3]-e[3]+e[1]-r[1]),a=o/2*(r[0]-e[0]+e[2]-r[2]);this.setCenterInternal([n[0]+s,n[1]-a])}}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 n=0;n<e.length;++n){let r=arguments[n];r.center&&(r=Object.assign({},r),r.center=Vt(r.center,this.getProjection())),r.anchor&&(r=Object.assign({},r),r.anchor=Vt(r.anchor,this.getProjection())),e[n]=r}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let r=0;for(;r<e&&!this.isDef();++r){const u=arguments[r];u.center&&this.setCenterInternal(u.center),u.zoom!==void 0?this.setZoom(u.zoom):u.resolution&&this.setResolution(u.resolution),u.rotation!==void 0&&this.setRotation(u.rotation)}if(r===e){n&&oa(n,!0);return}let o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;r<e;++r){const u=arguments[r],d={start:o,complete:!1,anchor:u.anchor,duration:u.duration!==void 0?u.duration:1e3,easing:u.easing||Ev,callback:n};if(u.center&&(d.sourceCenter=s,d.targetCenter=u.center.slice(),s=d.targetCenter),u.zoom!==void 0?(d.sourceResolution=a,d.targetResolution=this.getResolutionForZoom(u.zoom),a=d.targetResolution):u.resolution&&(d.sourceResolution=a,d.targetResolution=u.resolution,a=d.targetResolution),u.rotation!==void 0){d.sourceRotation=l;const c=$i(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+c,l=d.targetRotation}Jv(d)?d.complete=!0:o+=d.duration,h.push(d)}this.animations_.push(h),this.setHint(Yt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Yt.ANIMATING]>0}getInteracting(){return this.hints_[Yt.INTERACTING]>0}cancelAnimations(){this.setHint(Yt.ANIMATING,-this.hints_[Yt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const r=this.animations_[e];if(r[0].callback&&oa(r[0].callback,!1),!t)for(let o=0,s=r.length;o<s;++o){const a=r[o];if(!a.complete){t=a.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 n=this.animations_.length-1;n>=0;--n){const r=this.animations_[n];let o=!0;for(let s=0,a=r.length;s<a;++s){const l=r[s];if(l.complete)continue;const h=t-l.start;let u=l.duration>0?h/l.duration:1;u>=1?(l.complete=!0,u=1):o=!1;const d=l.easing(u);if(l.sourceCenter){const c=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const p=c+d*(g-c),_=f+d*(m-f);this.targetCenter_=[p,_]}if(l.sourceResolution&&l.targetResolution){const c=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(c,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const c=d===1?$i(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(o){this.animations_[n]=null,this.setHint(Yt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const s=r[0].callback;s&&oa(s,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const r=this.getCenterInternal();return r!==void 0&&(n=[r[0]-e[0],r[1]-e[1]],Ol(n,t-this.getRotation()),P0(n,e)),n}calculateCenterZoom(t,e){let n;const r=this.getCenterInternal(),o=this.getResolution();if(r!==void 0&&o!==void 0){const s=e[0]-t*(e[0]-r[0])/o,a=e[1]-t*(e[1]-r[1])/o;n=[s,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*Math.cos(t))]}else 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&&Cr(t,this.getProjection())}getCenterInternal(){return this.get(ii.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 ql(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ft(e,1);const n=this.getResolution();ft(n!==void 0,2);const r=this.getRotation();return ft(r!==void 0,3),Al(e,n,r,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(ii.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Zi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Nt(t)/e[0],r=$e(t)/e[1];return Math.max(n,r)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(e/n)/Math.log(t);return function(o){return e/Math.pow(t,o*r)}}getRotation(){return this.get(ii.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,o=Math.log(n/r)/e;return function(s){return Math.log(n/s)/e/o}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let r=this.getCenterInternal();const o=this.padding_;if(o){const s=this.getViewportSizeMinusPadding_();r=vh(r,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],e,n)}return{center:r.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,r;if(this.resolutions_){const o=xl(this.resolutions_,t,1);e=o,n=this.resolutions_[o],o==this.resolutions_.length-1?r=2:r=n/this.resolutions_[o+1]}else n=this.maxResolution_,r=this.zoomFactor_;return e+Math.log(n/t)/Math.log(r)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Wt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Wt(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(ft(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){ft(!Ll(t),25);const r=Zi(t,this.getProjection());n=$c(r)}else if(t.getType()==="Circle"){const r=Zi(t.getExtent(),this.getProjection());n=$c(r),n.rotate(this.getRotation(),Yi(r))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),o=t.getFlatCoordinates(),s=t.getStride();let a=1/0,l=1/0,h=-1/0,u=-1/0;for(let d=0,c=o.length;d<c;d+=s){const f=o[d]*n-o[d+1]*r,g=o[d]*r+o[d+1]*n;a=Math.min(a,f),l=Math.min(l,g),h=Math.max(h,f),u=Math.max(u,g)}return[a,l,h,u]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const r=e.padding!==void 0?e.padding:[0,0,0,0],o=e.nearest!==void 0?e.nearest:!1;let s;e.minResolution!==void 0?s=e.minResolution:e.maxZoom!==void 0?s=this.getResolutionForZoom(e.maxZoom):s=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]);l=isNaN(l)?s:Math.max(l,s),l=this.getConstrainedResolution(l,o?0:1);const h=this.getRotation(),u=Math.sin(h),d=Math.cos(h),c=Yi(a);c[0]+=(r[1]-r[3])/2*l,c[1]+=(r[0]-r[2])/2*l;const f=c[0]*d-c[1]*u,g=c[1]*d+c[0]*u,m=this.getConstrainedCenter([f,g],l),p=e.callback?e.callback:Ln;e.duration!==void 0?this.animateInternal({resolution:l,center:m,duration:e.duration,easing:e.easing},p):(this.targetResolution_=l,this.targetCenter_=m,this.applyTargetState_(!1,!0),oa(p,!0))}centerOn(t,e,n){this.centerOnInternal(Vt(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(vh(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,r){let o;const s=this.padding_;if(s&&t){const a=this.getViewportSizeMinusPadding_(-n),l=vh(t,r,[a[0]/2+s[3],a[1]/2+s[0]],e,n);o=[t[0]-l[0],t[1]-l[1]]}return o}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Cr(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&&Vt(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,r,n);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=Vt(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),r=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(r,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&Vt(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 n=this.getAnimating()||this.getInteracting()||e,r=this.constraints_.rotation(this.targetRotation_,n),o=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,0,o,n),a=this.constraints_.center(this.targetCenter_,s,o,n,this.calculateCenterShift(this.targetCenter_,s,r,o));this.get(ii.ROTATION)!==r&&this.set(ii.ROTATION,r),this.get(ii.RESOLUTION)!==s&&(this.set(ii.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ii.CENTER)||!ei(this.get(ii.CENTER),a))&&this.set(ii.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==o||!this.getCenterInternal()||!ei(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:t,easing:Rr,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Yt.INTERACTING,1)}endInteraction(t,e,n){n=n&&Vt(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.setHint(Yt.INTERACTING,-1),this.resolveConstraints(t,e,n)}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function oa(i,t){setTimeout(function(){i(t)},0)}function Kv(i){if(i.extent!==void 0){const e=i.smoothExtentConstraint!==void 0?i.smoothExtentConstraint:!0;return Sc(i.extent,i.constrainOnlyCenter,e)}const t=Ul(i.projection,"EPSG:3857");if(i.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Sc(e,!1,!1)}return xv}function Zv(i){let t,e,n,s=i.minZoom!==void 0?i.minZoom:ph,a=i.maxZoom!==void 0?i.maxZoom:28;const l=i.zoomFactor!==void 0?i.zoomFactor:2,h=i.multiWorld!==void 0?i.multiWorld:!1,u=i.smoothResolutionConstraint!==void 0?i.smoothResolutionConstraint:!0,d=i.showFullExtent!==void 0?i.showFullExtent:!1,c=Ul(i.projection,"EPSG:3857"),f=c.getExtent();let g=i.constrainOnlyCenter,m=i.extent;if(!h&&!m&&c.isGlobal()&&(g=!1,m=f),i.resolutions!==void 0){const p=i.resolutions;e=p[s],n=p[a]!==void 0?p[a]:p[p.length-1],i.constrainResolution?t=bv(p,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}else{const _=(f?Math.max(Nt(f),$e(f)):360*xr.degrees/c.getMetersPerUnit())/Ql/Math.pow(2,ph),v=_/Math.pow(2,28-ph);e=i.maxResolution,e!==void 0?s=0:e=_/Math.pow(l,s),n=i.minResolution,n===void 0&&(i.maxZoom!==void 0?i.maxResolution!==void 0?n=e/Math.pow(l,a):n=_/Math.pow(l,a):n=v),a=s+Math.floor(Math.log(e/n)/Math.log(l)),n=e/Math.pow(l,a-s),i.constrainResolution?t=kv(l,e,n,u,!g&&m,d):t=Tc(e,n,u,!g&&m,d)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:s,zoomFactor:l}}function Hv(i){if(i.enableRotation!==void 0?i.enableRotation:!0){const e=i.constrainRotation;return e===void 0||e===!0?Mv():e===!1?zc:typeof e=="number"?wv(e):zc}else return ih}function Jv(i){return!(i.sourceCenter&&i.targetCenter&&!ei(i.sourceCenter,i.targetCenter)||i.sourceResolution!==i.targetResolution||i.sourceRotation!==i.targetRotation)}function vh(i,t,e,n,r){const o=Math.cos(-r);let s=Math.sin(-r),a=i[0]*o-i[1]*s,l=i[1]*o+i[0]*s;a+=(t[0]/2-e[0])*n,l+=(e[1]-t[1]/2)*n,s=-s;const h=a*o-l*s,u=l*o+a*s;return[h,u]}const en=Yv;class Qv extends po{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"\u21E7",r=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=r,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(r));const o=t.tipLabel?t.tipLabel:"Reset rotation",s=document.createElement("button");s.className=e+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),s.addEventListener(tt.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+vo+" "+Ml,l=this.element;l.className=a,l.appendChild(s),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(Ds)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Rr}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const r="rotate("+n+"rad)";if(this.autoHide_){const o=this.element.classList.contains(Ds);!o&&n===0?this.element.classList.add(Ds):o&&n!==0&&this.element.classList.remove(Ds)}this.label_.style.transform=r}this.rotation_=n}}const t_=Qv;class e_ extends po{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,r=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",o=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",s=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"\u2013",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof s=="string"?document.createTextNode(s):s),u.addEventListener(tt.CLICK,this.handleClick_.bind(this,n),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(tt.CLICK,this.handleClick_.bind(this,-n),!1);const c=e+" "+vo+" "+Ml,f=this.element;f.className=c,f.appendChild(u),f.appendChild(d),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const r=n.getZoom();if(r!==void 0){const o=n.getConstrainedZoom(r+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:o,duration:this.duration_,easing:Rr})):n.setZoom(o)}}}const i_=e_;function Wc(i){i=i||{};const t=new We;return(i.zoom!==void 0?i.zoom:!0)&&t.push(new i_(i.zoomOptions)),(i.rotate!==void 0?i.rotate:!0)&&t.push(new t_(i.rotateOptions)),(i.attribution!==void 0?i.attribution:!0)&&t.push(new m0(i.attributionOptions)),t}const _h={ACTIVE:"active"};class n_ extends hi{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(_h.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(_h.ACTIVE,t)}setMap(t){this.map_=t}}function r_(i,t,e){const n=i.getCenterInternal();if(n){const r=[n[0]+t[0],n[1]+t[1]];i.animateInternal({duration:e!==void 0?e:250,easing:Cv,center:i.getConstrainedCenter(r)})}}function yh(i,t,e,n){const r=i.getZoom();if(r===void 0)return;const o=i.getConstrainedZoom(r+t),s=i.getResolutionForZoom(o);i.getAnimating()&&i.cancelAnimations(),i.animate({resolution:s,anchor:e,duration:n!==void 0?n:250,easing:Rr})}const Io=n_;class o_ extends Io{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==Mt.DBLCLICK){const n=t.originalEvent,r=t.map,o=t.coordinate,s=n.shiftKey?-this.delta_:this.delta_,a=r.getView();yh(a,s,o,this.duration_),n.preventDefault(),e=!0}return!e}}const s_=o_;class a_ extends Io{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Mt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Mt.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Mt.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==Mt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function xh(i){const t=i.length;let e=0,n=0;for(let r=0;r<t;r++)e+=i[r].clientX,n+=i[r].clientY;return[e/t,n/t]}const nn=a_;function bh(i){const t=arguments;return function(e){let n=!0;for(let r=0,o=t.length;r<o&&(n=n&&t[r](e),!!n);++r);return n}}const l_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},h_=function(i){const t=i.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},u_=function(i){const t=i.map.getTargetElement(),e=i.map.getOwnerDocument().activeElement;return t.contains(e)},Yc=function(i){return i.map.getTargetElement().hasAttribute("tabindex")?u_(i):!0},kh=Dn,Kc=function(i){const t=i.originalEvent;return t.button==0&&!(i0&&n0&&t.ctrlKey)},d_=function(i){return i.type==Mt.SINGLECLICK},wh=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Zc=function(i){const t=i.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Hc=function(i){const t=i.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},Mh=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.pointerType=="mouse"},Jc=function(i){const t=i.originalEvent;return ft(t!==void 0,56),t.isPrimary&&t.button===0};class c_ extends nn{constructor(t){super({stopDown:yr}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:bh(wh,Jc);this.condition_=t.onFocusOnly?bh(Yc,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,n=xh(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const r=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],s=t.map.getView();D0(r,s.getResolution()),Ol(r,s.getRotation()),s.adjustCenterInternal(r)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const r=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(s),l=e.getCoordinateFromPixelInternal([a[0]-r*Math.cos(o),a[1]-r*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(l),duration:500,easing:Rr})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1}}const f_=c_;class g_ extends nn{constructor(t){t=t||{},super({stopDown:yr}),this.condition_=t.condition?t.condition:h_,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Mh(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===ih)return;const r=e.getSize(),o=t.pixel,s=Math.atan2(r[1]/2-o[1],o[0]-r[0]/2);if(this.lastAngle_!==void 0){const a=s-this.lastAngle_;n.adjustRotationInternal(-a)}this.lastAngle_=s}handleUpEvent(t){return Mh(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Mh(t)&&Kc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const m_=g_;class p_ extends yl{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new Wn([r])}getGeometry(){return this.geometry_}}const v_=p_,sa={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Eh extends Qe{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class __ extends nn{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new v_(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Kc,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const r=n[0]-e[0],o=n[1]-e[1];return r*r+o*o>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Eh(sa.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Eh(e?sa.BOXEND:sa.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Eh(sa.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const y_=__;class x_ extends y_{constructor(t){t=t||{};const e=t.condition?t.condition:Zc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let r=this.getGeometry();if(this.out_){const o=n.rotatedExtentForGeometry(r),s=n.getResolutionForExtentInternal(o),a=n.getResolution()/s;r=r.clone(),r.scale(a*a)}n.fitInternal(r,{duration:this.duration_,easing:Rr})}}const b_=x_,Yn={LEFT:37,UP:38,RIGHT:39,DOWN:40};class k_ extends Io{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Hc(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN){const n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==Yn.DOWN||r==Yn.LEFT||r==Yn.RIGHT||r==Yn.UP)){const s=t.map.getView(),a=s.getResolution()*this.pixelDelta_;let l=0,h=0;r==Yn.DOWN?h=-a:r==Yn.LEFT?l=-a:r==Yn.RIGHT?l=a:h=a;const u=[l,h];Ol(u,s.getRotation()),r_(s,u,this.duration_),n.preventDefault(),e=!0}}return!e}}const w_=k_;class M_ extends Io{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Hc,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==tt.KEYDOWN||t.type==tt.KEYPRESS){const n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){const o=t.map,s=r=="+".charCodeAt(0)?this.delta_:-this.delta_,a=o.getView();yh(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const E_=M_;class C_{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;const o=this.points_[e]-this.points_[n],s=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(s,o),this.initialVelocity_=Math.sqrt(o*o+s*s)/r,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const S_=C_;class T_ extends Io{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:kh;this.condition_=t.onFocusOnly?bh(Yc,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==tt.WHEEL)return!0;const n=t.map,r=t.originalEvent;r.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let o;if(t.type==tt.WHEEL&&(o=r.deltaY,e0&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=Ud),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;const s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?"trackpad":"wheel");const a=n.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;const l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Wt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),yh(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const z_=T_;class R_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(this.lastAngle_!==void 0){const u=o-this.lastAngle_;this.rotationDelta_+=u,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=u}this.lastAngle_=o;const s=t.map,a=s.getView();if(a.getConstraints().rotation===ih)return;const l=s.getViewport().getBoundingClientRect(),h=xh(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const I_=R_;class P_ extends nn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=yr),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],r=this.targetPointers[1],o=n.clientX-r.clientX,s=n.clientY-r.clientY,a=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e);const u=l.getViewport().getBoundingClientRect(),d=xh(this.targetPointers);d[0]-=u.left,d[1]-=u.top,this.anchor_=l.getCoordinateFromPixelInternal(d),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,r),!1}else return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}else return!1}}const A_=P_;function Qc(i){i=i||{};const t=new We,e=new S_(-.005,.05,100);return(i.altShiftDragRotate!==void 0?i.altShiftDragRotate:!0)&&t.push(new m_),(i.doubleClickZoom!==void 0?i.doubleClickZoom:!0)&&t.push(new s_({delta:i.zoomDelta,duration:i.zoomDuration})),(i.dragPan!==void 0?i.dragPan:!0)&&t.push(new f_({onFocusOnly:i.onFocusOnly,kinetic:e})),(i.pinchRotate!==void 0?i.pinchRotate:!0)&&t.push(new I_),(i.pinchZoom!==void 0?i.pinchZoom:!0)&&t.push(new A_({duration:i.zoomDuration})),(i.keyboard!==void 0?i.keyboard:!0)&&(t.push(new w_),t.push(new E_({delta:i.zoomDelta,duration:i.zoomDuration}))),(i.mouseWheelZoom!==void 0?i.mouseWheelZoom:!0)&&t.push(new z_({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(i.shiftDragZoom!==void 0?i.shiftDragZoom:!0)&&t.push(new b_({duration:i.zoomDuration})),t}function tf(i){return i[0]>0&&i[1]>0}function D_(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function be(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}function ef(i){if(i instanceof Os){i.setMapInternal(null);return}i instanceof Qs&&i.getLayers().forEach(ef)}function nf(i,t){if(i instanceof Os){i.setMapInternal(t);return}if(i instanceof Qs){const e=i.getLayers().getArray();for(let n=0,r=e.length;n<r;++n)nf(e[n],t)}}class L_ extends hi{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=F_(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Ud,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ye(),this.pixelToCoordinateTransform_=Ye(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.controls=e.controls||Wc(),this.interactions=e.interactions||Qc({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new _v(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(fe.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(fe.VIEW,this.handleViewChanged_),this.addChangeListener(fe.SIZE,this.handleSizeChanged_),this.addChangeListener(fe.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof en)&&t.view.then(function(r){n.setView(new en(r))}),this.controls.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.controls.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.interactions.addEventListener(re.ADD,function(r){r.element.setMap(this)}.bind(this)),this.interactions.addEventListener(re.REMOVE,function(r){r.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(re.ADD,function(r){this.addOverlayInternal_(r.element)}.bind(this)),this.overlays_.addEventListener(re.REMOVE,function(r){const o=r.element.getId();o!==void 0&&delete this.overlayIdIndex_[o.toString()],r.element.setMap(null)}.bind(this)),this.controls.forEach(function(r){r.setMap(this)}.bind(this)),this.interactions.forEach(function(r){r.setMap(this)}.bind(this)),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){nf(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const r=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const o=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.layerFilter!==void 0?n.layerFilter:Dn,a=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,o,a,e,null,s,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(r){n.push(r)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(r){r instanceof Qs?e(r.getLayers()):t.push(r)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const r=e.layerFilter!==void 0?e.layerFilter:Dn,o=e.hitTolerance!==void 0?e.hitTolerance:0,s=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,o,s,r,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]}getTarget(){return this.get(fe.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return Cr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Jt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(fe.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof We){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e];if(!r.visible)continue;const o=r.layer.getRenderer();if(o&&!o.ready)return!0;const s=r.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Vt(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Jt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(fe.SIZE)}getView(){return this.get(fe.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,r){return yv(this.frameState_,t,e,n,r)}handleBrowserEvent(t,e){e=e||t.type;const n=new Si(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===Cl.POINTERDOWN||n===tt.WHEEL||n===tt.KEYDOWN){const r=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():r,s=e.target;if(this.overlayContainerStopEvent_.contains(s)||!(o===r?r.documentElement:o).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const r=this.getInteractions().getArray().slice();for(let o=r.length-1;o>=0;o--){const s=r[o];if(s.getMap()!==this||!s.getActive()||!this.getTargetElement())continue;if(!s.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let r=this.maxTilesLoading_,o=r;if(t){const s=t.viewHints;if(s[Yt.ANIMATING]||s[Yt.INTERACTING]){const a=Date.now()-t.time>8;r=a?0:8,o=a?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,o))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Wi.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Wi.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new zr(qi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new zr(qi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let r=0,o=n.length;r<o;++r)n[r](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,n=this.targetChangeHandlerKeys_.length;e<n;++e)Ot(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(tt.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,wl(this.viewport_)}const t=this.getTargetElement();if(!t)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new uv(this)),this.mapBrowserEventHandler_=new gv(this,this.moveTolerance_);for(const r in Mt)this.mapBrowserEventHandler_.addEventListener(Mt[r],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(tt.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(tt.WHEEL,this.boundHandleBrowserEvent_,Vd?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[gt(n,tt.KEYDOWN,this.handleBrowserEvent,this),gt(n,tt.KEYPRESS,this.handleBrowserEvent,this),gt(e,tt.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ot(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ot(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=gt(t,_r.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gt(t,tt.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ot),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Hi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gt(t,_r.PROPERTYCHANGE,this.render,this),gt(t,tt.CHANGE,this.render,this),gt(t,"addlayer",this.handleLayerAdd_,this),gt(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const r=t[e].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){ef(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),r=this.frameState_;let o=null;if(e!==void 0&&tf(e)&&n&&n.isDef()){const s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Al(a.center,a.resolution,a.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:K(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=Al(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!Ll(this.previousExtent_)&&!Er(o.extent,this.previousExtent_))&&(this.dispatchEvent(new zr(qi.MOVESTART,this,r)),this.previousExtent_=yo(this.previousExtent_)),this.previousExtent_&&!o.viewHints[Yt.ANIMATING]&&!o.viewHints[Yt.INTERACTING]&&!Er(o.extent,this.previousExtent_)&&(this.dispatchEvent(new zr(qi.MOVEEND,this,o)),ec(o.extent,this.previousExtent_))),this.dispatchEvent(new zr(qi.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(qi.LOADSTART)||this.hasListener(qi.LOADEND)||this.hasListener(Wi.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Hi("removelayer",e)),this.set(fe.LAYERGROUP,t)}setSize(t){this.set(fe.SIZE,t)}setTarget(t){this.set(fe.TARGET,t)}setView(t){if(!t||t instanceof en){this.set(fe.VIEW,t);return}this.set(fe.VIEW,new en);const e=this;t.then(function(n){e.setView(new en(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const n=getComputedStyle(t),r=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),o=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(e=[r,o],!tf(e)&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()}updateViewportSize_(){const t=this.getView();if(t){let e;const n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}}}function F_(i){let t=null;i.keyboardEventTarget!==void 0&&(t=typeof i.keyboardEventTarget=="string"?document.getElementById(i.keyboardEventTarget):i.keyboardEventTarget);const e={},n=i.layers&&typeof i.layers.getLayers=="function"?i.layers:new Qs({layers:i.layers});e[fe.LAYERGROUP]=n,e[fe.TARGET]=i.target,e[fe.VIEW]=i.view instanceof en?i.view:new en;let r;i.controls!==void 0&&(Array.isArray(i.controls)?r=new We(i.controls.slice()):(ft(typeof i.controls.getArray=="function",47),r=i.controls));let o;i.interactions!==void 0&&(Array.isArray(i.interactions)?o=new We(i.interactions.slice()):(ft(typeof i.interactions.getArray=="function",48),o=i.interactions));let s;return i.overlays!==void 0?Array.isArray(i.overlays)?s=new We(i.overlays.slice()):(ft(typeof i.overlays.getArray=="function",49),s=i.overlays):s=new We,{controls:r,interactions:o,keyboardEventTarget:t,overlays:s,values:e}}const O_=L_,Ch="units",N_=[1,2,5],Po=25.4/.28;class G_ extends po{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+vo,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Ch,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Ch)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Ch,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=t.center,n=t.projection,r=this.getUnits(),o=r=="degrees"?"degrees":"m";let s=Xs(n,t.resolution,e,o);const a=this.minWidth_*(this.dpi_||Po)/Po,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||Po)/Po:void 0;let h=a*s,u="";if(r=="degrees"){const y=xr.degrees;h*=y,h<y/60?(u="\u2033",s*=3600):h<y?(u="\u2032",s*=60):u="\xB0"}else r=="imperial"?h<.9144?(u="in",s/=.0254):h<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):r=="nautical"?(s/=1852,u="NM"):r=="metric"?h<.001?(u="\u03BCm",s*=1e6):h<1?(u="mm",s*=1e3):h<1e3?u="m":(u="km",s/=1e3):r=="us"?h<.9144?(u="in",s*=39.37):h<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):ft(!1,33);let d=3*Math.floor(Math.log(a*s)/Math.log(10)),c,f,g,m,p,_;for(;;){g=Math.floor(d/3);const y=Math.pow(10,g);if(c=N_[(d%3+3)%3]*y,f=Math.round(c/s),isNaN(f)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&f>=l){c=m,f=p,g=_;break}else if(f>=a)break;m=c,p=f,_=g,++d}const v=this.scaleBar_?this.createScaleBar(f,c,u):c.toFixed(g<0?-g:0)+" "+u;this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){const r=this.getScaleForResolution(),o=r<1?Math.round(1/r).toLocaleString()+" : 1":"1 : "+Math.round(r).toLocaleString(),s=this.scaleBarSteps_,a=t/s,l=[this.createMarker("absolute")];for(let u=0;u<s;++u){const d=u%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(u%2===0||s===2?this.createStepText(u,t,!1,e,n):"")+"</div>")}return l.push(this.createStepText(s,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+o+"</div>":"")+l.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,r,o){const a=(t===0?0:Math.round(r/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+o),l=t===0?-3:e/this.scaleBarSteps_*-1,h=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${t===0?"left":"center"};min-width: ${h}px;left: ${n?e+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const t=Xs(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||Po,n=1e3/25.4;return t*n*e}render(t){const e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}}const j_=G_;class aa extends Qi{constructor(t,e,n){super(),n!==void 0&&e===void 0?this.setFlatCoordinates(n,t):(e=e||0,this.setCenterAndRadius(t,e,n))}clone(){const t=new aa(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){const o=this.flatCoordinates,s=t-o[0],a=e-o[1],l=s*s+a*a;if(l<r){if(l===0)for(let h=0;h<this.stride;++h)n[h]=o[h];else{const h=this.getRadius()/Math.sqrt(l);n[0]=o[0]+h*s,n[1]=o[1]+h*a;for(let u=2;u<this.stride;++u)n[u]=o[u]}return n.length=this.stride,l}else return r}containsXY(t,e){const n=this.flatCoordinates,r=t-n[0],o=e-n[1];return r*r+o*o<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,n=e[this.stride]-e[0];return ti(e[0]-n,e[1]-n,e[0]+n,e[1]+n,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if(Kt(t,e)){const n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||t[1]<=n[1]&&t[3]>=n[1]?!0:Il(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(let o=1;o<e;++o)r[e+o]=t[o];this.setFlatCoordinates(this.layout,r),this.changed()}setCenterAndRadius(t,e,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const r=this.flatCoordinates;let o=Lc(r,0,t,this.stride);r[o++]=r[0]+e;for(let s=1,a=this.stride;s<a;++s)r[o++]=r[s];r.length=o,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(nh(n,0,n.length,r,t,e,n)),this.changed()}translate(t,e){const n=this.getCenter(),r=this.getStride();this.setCenter(Ic(n,0,n.length,r,t,e,n)),this.changed()}}aa.prototype.transform;const B_=aa;class la extends Ac{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ot),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(gt(this.geometries_[t],tt.CHANGE,this.changed,this))}clone(){const t=new la(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.geometries_;for(let s=0,a=o.length;s<a;++s)r=o[s].closestPointXY(t,e,n,r);return r}containsXY(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)if(n[r].containsXY(t,e))return!0;return!1}computeExtent(t){yo(t);const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)ic(t,e[n].getExtent());return t}getGeometries(){return rf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}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=[],n=this.geometries_;let r=!1;for(let o=0,s=n.length;o<s;++o){const a=n[o],l=a.getSimplifiedGeometry(t);e.push(l),l!==a&&(r=!0)}if(r){const o=new la(null);return o.setGeometriesArray(e),o}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Yi(this.getExtent()));const r=this.geometries_;for(let o=0,s=r.length;o<s;++o)r[o].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(rf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function rf(i){const t=[];for(let e=0,n=i.length;e<n;++e)t.push(i[e].clone());return t}const U_=la;function ha(i,t,e,n,r,o,s){let a,l;const h=(e-t)/n;if(h===1)a=t;else if(h===2)a=t,l=r;else if(h!==0){let u=i[t],d=i[t+1],c=0;const f=[0];for(let p=t+n;p<e;p+=n){const _=i[p],v=i[p+1];c+=Math.sqrt((_-u)*(_-u)+(v-d)*(v-d)),f.push(c),u=_,d=v}const g=r*c,m=$p(f,g);m<0?(l=(g-f[-m-2])/(f[-m-1]-f[-m-2]),a=t+(-m-2)*n):a=t+m*n}s=s>1?s:2,o=o||new Array(s);for(let u=0;u<s;++u)o[u]=a===void 0?NaN:l===void 0?i[a+u]:ki(i[a+u],i[a+n+u],l);return o}function Sh(i,t,e,n,r,o){if(e==t)return null;let s;if(r<i[t+n-1])return o?(s=i.slice(t,t+n),s[n-1]=r,s):null;if(i[e-1]<r)return o?(s=i.slice(e-n,e),s[n-1]=r,s):null;if(r==i[t+n-1])return i.slice(t,t+n);let a=t/n,l=e/n;for(;a<l;){const c=a+l>>1;r<i[(c+1)*n-1]?l=c:a=c+1}const h=i[a*n-1];if(r==h)return i.slice((a-1)*n,(a-1)*n+n);const u=i[(a+1)*n-1],d=(r-h)/(u-h);s=[];for(let c=0;c<n-1;++c)s.push(ki(i[(a-1)*n+c],i[a*n+c],d));return s.push(r),s}function V_(i,t,e,n,r,o,s){if(s)return Sh(i,t,e[e.length-1],n,r,o);let a;if(r<i[n-1])return o?(a=i.slice(0,n),a[n-1]=r,a):null;if(i[i.length-1]<r)return o?(a=i.slice(i.length-n),a[n-1]=r,a):null;for(let l=0,h=e.length;l<h;++l){const u=e[l];if(t!=u){if(r<i[t+n-1])return null;if(r<=i[u-1])return Sh(i,t,u,n,r,!1);t=u}}return null}function of(i,t,e,n){let r=i[t],o=i[t+1],s=0;for(let a=t+n;a<e;a+=n){const l=i[a],h=i[a+1];s+=Math.sqrt((l-r)*(l-r)+(h-o)*(h-o)),r=l,o=h}return s}class ua extends Qi{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){this.flatCoordinates?li(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new ua(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(rh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,r))}forEachSegment(t){return Bc(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Sh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return ha(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return of(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=hh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ua(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return ra(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Kn=ua;class da extends Qi{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout()),li(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(r,s),this.ends_=a}}appendLineString(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new da(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(oh(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ah(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,r))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,V_(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Ro(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Kn(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,r=[];let o=0;for(let s=0,a=e.length;s<a;++s){const l=e[s],h=new Kn(t.slice(o,l),n);r.push(h),o=l}return r}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const r=this.ends_,o=this.stride;for(let s=0,a=r.length;s<a;++s){const l=r[s],h=ha(e,n,l,o,.5);li(t,h),n=l}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Lv(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new da(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return Bv(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=lh(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const Th=da;class zh extends Qi{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?li(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new zh(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){if(r<jn(this.getExtent(),t,e))return r;const o=this.flatCoordinates,s=this.stride;for(let a=0,l=o.length;a<l;a+=s){const h=On(t,e,o[a],o[a+1]);if(h<r){r=h;for(let u=0;u<s;++u)n[u]=o[a+u];n.length=s}}return r}getCoordinates(){return tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new ni(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,r=[];for(let o=0,s=t.length;o<s;o+=n){const a=new ni(t.slice(o,o+n),e);r.push(a)}return r}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let r=0,o=e.length;r<o;r+=n){const s=e[r],a=e[r+1];if(Tl(t,s,a))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ia(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ao=zh;function sf(i,t,e,n){const r=[];let o=Ge();for(let s=0,a=e.length;s<a;++s){const l=e[s];o=Rl(i,t,l[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),t=l[l.length-1]}return r}class ca extends Qi{constructor(t,e,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){let r=this.getLayout();const o=t,s=[],a=[];for(let l=0,h=o.length;l<h;++l){const u=o[l];l===0&&(r=u.getLayout());const d=s.length,c=u.getEnds();for(let f=0,g=c.length;f<g;++f)c[f]+=d;li(s,u.getFlatCoordinates()),a.push(c)}e=r,t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;li(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let r=0,o=e.length;r<o;++r)e[r]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let r=0;r<t;++r)e[r]=this.endss_[r].slice();const n=new ca(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,r){return r<jn(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pv(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Av(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,r))}containsXY(t,e){return jv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Nv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),Xc(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,uh(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=sf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=jc(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Ao(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;qv(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Xc(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Ov(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new ca(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const o=this.endss_[t-1];e=o[o.length-1]}const n=this.endss_[t].slice(),r=n[n.length-1];if(e!==0)for(let o=0,s=n.length;o<s;++o)n[o]-=e;return new Wn(this.flatCoordinates.slice(e,r),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,r=[];let o=0;for(let s=0,a=n.length;s<a;++s){const l=n[s].slice(),h=l[l.length-1];if(o!==0)for(let d=0,c=l.length;d<c;++d)l[d]-=o;const u=new Wn(e.slice(o,h),t,l);r.push(u),o=h}return r}getType(){return"MultiPolygon"}intersectsExtent(t){return Uv(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=Dv(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const r=n[n.length-1];this.flatCoordinates.length=r.length===0?0:r[r.length-1]}this.changed()}}const Rh=ca;class Ih extends hi{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Ih(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Ot(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gt(t,tt.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?q_(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function q_(i){if(typeof i=="function")return i;{let t;return Array.isArray(i)?t=i:(ft(typeof i.getZIndex=="function",41),t=[i]),function(){return t}}}const Ti=Ih;class af{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?Gt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=Gt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return et()}readFeature(t,e){return et()}readFeatures(t,e){return et()}readGeometry(t,e){return et()}readProjection(t){return et()}writeFeature(t,e){return et()}writeFeatures(t,e){return et()}writeGeometry(t,e){return et()}}function Ph(i,t,e){const n=e?Gt(e.featureProjection):null,r=e?Gt(e.dataProjection):null;let o;if(n&&r&&!Vn(n,r)?o=(t?i.clone():i).transform(t?n:r,t?r:n):o=i,t&&e&&e.decimals!==void 0){const s=Math.pow(10,e.decimals),a=function(l){for(let h=0,u=l.length;h<u;++h)l[h]=Math.round(l[h]*s)/s;return l};o===i&&(o=i.clone()),o.applyTransform(a)}return o}class X_ extends af{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(fa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(fa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return et()}readFeaturesFromObject(t,e){return et()}readGeometry(t,e){return this.readGeometryFromObject(fa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return et()}readProjection(t){return this.readProjectionFromObject(fa(t))}readProjectionFromObject(t){return et()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return et()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return et()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return et()}}function fa(i){if(typeof i=="string"){const t=JSON.parse(i);return t||null}else return i!==null?i:null}const $_=X_;class W_ extends $_{constructor(t){t=t||{},super(),this.dataProjection=Gt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=Gt(t.featureProjection)),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const r=Ah(n.geometry,e),o=new Ti;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&o.setGeometryName(n.geometry_name),o.setGeometry(r),"id"in n&&o.setId(n.id),n.properties&&o.setProperties(n.properties,!0),o}readFeaturesFromObject(t,e){const n=t;let r=null;if(n.type==="FeatureCollection"){const o=t;r=[];const s=o.features;for(let a=0,l=s.length;a<l;++a)r.push(this.readFeatureFromObject(s[a],e))}else r=[this.readFeatureFromObject(t,e)];return r}readGeometryFromObject(t,e){return Ah(t,e)}readProjectionFromObject(t){const e=t.crs;let n;return e?e.type=="name"?n=Gt(e.properties.name):e.type==="EPSG"?n=Gt("EPSG:"+e.properties.code):ft(!1,36):n=this.dataProjection,n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},r=t.getId();if(r!==void 0&&(n.id=r),!t.hasProperties())return n;const o=t.getProperties(),s=t.getGeometry();return s&&(n.geometry=Dh(s,e),delete o[t.getGeometryName()]),Fn(o)||(n.properties=o),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let r=0,o=t.length;r<o;++r)n.push(this.writeFeatureObject(t[r],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return Dh(t,this.adaptOptions(e))}}function Ah(i,t){if(!i)return null;let e;switch(i.type){case"Point":{e=K_(i);break}case"LineString":{e=Z_(i);break}case"Polygon":{e=t1(i);break}case"MultiPoint":{e=J_(i);break}case"MultiLineString":{e=H_(i);break}case"MultiPolygon":{e=Q_(i);break}case"GeometryCollection":{e=Y_(i);break}default:throw new Error("Unsupported GeoJSON type: "+i.type)}return Ph(e,!1,t)}function Y_(i,t){const e=i.geometries.map(function(n){return Ah(n,t)});return new U_(e)}function K_(i){return new ni(i.coordinates)}function Z_(i){return new Kn(i.coordinates)}function H_(i){return new Th(i.coordinates)}function J_(i){return new Ao(i.coordinates)}function Q_(i){return new Rh(i.coordinates)}function t1(i){return new Wn(i.coordinates)}function Dh(i,t){i=Ph(i,!0,t);const e=i.getType();let n;switch(e){case"Point":{n=s1(i);break}case"LineString":{n=i1(i);break}case"Polygon":{n=a1(i,t);break}case"MultiPoint":{n=r1(i);break}case"MultiLineString":{n=n1(i);break}case"MultiPolygon":{n=o1(i,t);break}case"GeometryCollection":{n=e1(i,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function e1(i,t){t=Object.assign({},t),delete t.featureProjection;const e=i.getGeometriesArray().map(function(n){return Dh(n,t)});return{type:"GeometryCollection",geometries:e}}function i1(i,t){return{type:"LineString",coordinates:i.getCoordinates()}}function n1(i,t){return{type:"MultiLineString",coordinates:i.getCoordinates()}}function r1(i,t){return{type:"MultiPoint",coordinates:i.getCoordinates()}}function o1(i,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:i.getCoordinates(e)}}function s1(i,t){return{type:"Point",coordinates:i.getCoordinates()}}function a1(i,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:i.getCoordinates(e)}}const Zn=W_;class Lh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Lh({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const ge=Lh,Qt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Fh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=be(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Fh({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return et()}getImage(t){return et()}getHitDetectionImage(){return et()}getPixelRatio(t){return 1}getImageState(){return et()}getImageSize(){return et()}getOrigin(){return et()}getSize(){return et()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t)}listenImageChange(t){et()}load(){et()}unlistenImageChange(t){et()}}const lf=Fh;function hf(i,t,e){const n=i;let r=!0,o=!1,s=!1;const a=[Ps(n,tt.LOAD,function(){s=!0,o||t()})];return n.src&&r0?(o=!0,n.decode().then(function(){r&&t()}).catch(function(l){r&&(s?t():e())})):a.push(Ps(n,tt.ERROR,e)),function(){r=!1,a.forEach(Ot)}}let Do=null;class l1 extends Is{constructor(t,e,n,r,o,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=o,this.size_=n,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Qt.LOADED){Do||(Do=Pe(1,1)),Do.drawImage(this.image_,0,0);try{Do.getImageData(0,0,1,1),this.tainted_=!1}catch{Do=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(tt.CHANGE)}handleImageError_(){this.imageState_=Qt.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Qt.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Pe(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Qt.IDLE){this.image_||this.initializeImage_(),this.imageState_=Qt.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Qt.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const r=n.getContext("2d");r.scale(t,t),r.drawImage(e,0,0),r.globalCompositeOperation="multiply",r.fillStyle=Yl(this.color_),r.fillRect(0,0,n.width/t,n.height/t),r.globalCompositeOperation="destination-in",r.drawImage(e,0,0),this.canvas_[t]=n}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function h1(i,t,e,n,r,o){let s=Ks.get(t,n,o);return s||(s=new l1(i,t,e,n,r,o),Ks.set(t,n,o,s)),s}class Oh extends lf{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,r=t.scale!==void 0?t.scale:1,o=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:r,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:o,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const s=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;ft(!(a!==void 0&&s),4),ft(!s||s&&this.imgSize_,5),(a===void 0||a.length===0)&&s&&(a=s.src||K(s)),ft(a!==void 0&&a.length>0,6);const l=t.src!==void 0?Qt.IDLE:Qt.LOADED;this.color_=t.color!==void 0?wo(t.color):null,this.iconImage_=h1(s,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null}clone(){const t=this.getScale();return new Oh({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const r=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!r)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=r[0]),this.anchorYUnits_=="fraction"&&(t[1]*=r[1])}if(this.anchorOrigin_!="top-left"){if(!r)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+r[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+r[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}listenImageChange(t){this.iconImage_.addEventListener(tt.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(tt.CHANGE,t)}}const ga=Oh;class Nh{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Nh({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const ke=Nh;function di(i){return Array.isArray(i)?xc(i):i}class Gh extends lf{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new Gh({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const n=this.renderOptions_,r=Pe(n.size*t,n.size*t);this.draw_(n,r,t),e=r.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return Qt.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let r=this.radius_,o=this.radius2_===void 0?r:this.radius2_;if(r<o){const w=r;r=o,o=w}const s=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/s,l=o*Math.sin(a),h=Math.sqrt(o*o-l*l),u=r-h,d=Math.sqrt(l*l+u*u),c=d/l;if(t==="miter"&&c<=n)return c*e;const f=e/2/c,g=e/2*(u/d),p=Math.sqrt((r+f)*(r+f)+g*g)-r;if(this.radius2_===void 0||t==="bevel")return p*2;const _=r*Math.sin(a),v=Math.sqrt(r*r-_*_),y=o-v,k=Math.sqrt(_*_+y*y)/_;if(k<=n){const w=k*e/2-o-r;return 2*Math.max(p,w)}return p*2}createRenderOptions(){let t=Sr,e=0,n=null,r=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=So),o=di(o),s=this.stroke_.getWidth(),s===void 0&&(s=zo),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Sr),e=this.stroke_.getMiterLimit(),e===void 0&&(e=Co));const a=this.calculateLineJoinSize_(t,s,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:o,strokeWidth:s,size:h,lineDash:n,lineDashOffset:r,lineJoin:t,miterLimit:e}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let r=this.fill_.getColor();r===null&&(r=Ei),e.fillStyle=di(r),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),n=0;if(typeof e=="string"&&(e=wo(e)),e===null?n=1:Array.isArray(e)&&(n=e.length===4?e[3]:1),n===0){const r=Pe(t.size,t.size);this.hitDetectionCanvas_=r.canvas,this.drawHitDetectionCanvas_(t,r)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const r=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const o=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let a=0;a<e;a++){const l=o+a*s,h=a%2===0?n:r;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Ei,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ma=Gh;class jh extends ma{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new jh({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Hn=jh;class rn{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=df,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new rn({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=df,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function u1(i){let t;if(typeof i=="function")t=i;else{let e;Array.isArray(i)?e=i:(ft(typeof i.getZIndex=="function",41),e=[i]),t=function(){return e}}return t}let Bh=null;function d1(i,t){if(!Bh){const e=new ge({color:"rgba(255,255,255,0.4)"}),n=new ke({color:"#3399CC",width:1.25});Bh=[new rn({image:new Hn({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Bh}function uf(){const i={},t=[255,255,255,1],e=[0,153,255,1],n=3;return i.Polygon=[new rn({fill:new ge({color:[255,255,255,.5]})})],i.MultiPolygon=i.Polygon,i.LineString=[new rn({stroke:new ke({color:t,width:n+2})}),new rn({stroke:new ke({color:e,width:n})})],i.MultiLineString=i.LineString,i.Circle=i.Polygon.concat(i.LineString),i.Point=[new rn({image:new Hn({radius:n*2,fill:new ge({color:e}),stroke:new ke({color:t,width:n/2})}),zIndex:1/0})],i.MultiPoint=i.Point,i.GeometryCollection=i.Polygon.concat(i.LineString,i.Point),i}function df(i){return i.getGeometry()}const le=rn,c1="#333";class Uh{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=be(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new ge({color:c1}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Uh({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=be(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const cf=Uh;function f1(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Vh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Vh.read=function(i,t,e,n,r){var o,s,a=r*8-n-1,l=(1<<a)-1,h=l>>1,u=-7,d=e?r-1:0,c=e?-1:1,f=i[t+d];for(d+=c,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=o*256+i[t+d],d+=c,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=s*256+i[t+d],d+=c,u-=8);if(o===0)o=1-h;else{if(o===l)return s?NaN:(f?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-h}return(f?-1:1)*s*Math.pow(2,o-n)},Vh.write=function(i,t,e,n,r,o){var s,a,l,h=o*8-r-1,u=(1<<h)-1,d=u>>1,c=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,g=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=c/l:t+=c*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;i[e+f]=a&255,f+=g,a/=256,r-=8);for(s=s<<r|a,h+=r;h>0;i[e+f]=s&255,f+=g,s/=256,h-=8);i[e+f-g]|=m*128};var g1=Tt,pa=Vh;function Tt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Tt.Varint=0,Tt.Fixed64=1,Tt.Bytes=2,Tt.Fixed32=5;var qh=(1<<16)*(1<<16),ff=1/qh,m1=12,gf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Tt.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos<e;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=n&7,i(r,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=va(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=pf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=va(this.buf,this.pos)+va(this.buf,this.pos+4)*qh;return this.pos+=8,i},readSFixed64:function(){var i=va(this.buf,this.pos)+pf(this.buf,this.pos+4)*qh;return this.pos+=8,i},readFloat:function(){var i=pa.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=pa.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t=this.buf,e,n;return n=t[this.pos++],e=n&127,n<128||(n=t[this.pos++],e|=(n&127)<<7,n<128)||(n=t[this.pos++],e|=(n&127)<<14,n<128)||(n=t[this.pos++],e|=(n&127)<<21,n<128)?e:(n=t[this.pos],e|=(n&15)<<28,p1(e,i,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2===1?(i+1)/-2:i/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=m1&&gf?R1(this.buf,t,i):z1(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t},readPackedVarint:function(i,t){if(this.type!==Tt.Bytes)return i.push(this.readVarint(t));var e=zi(this);for(i=i||[];this.pos<e;)i.push(this.readVarint(t));return i},readPackedSVarint:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSVarint());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSVarint());return i},readPackedBoolean:function(i){if(this.type!==Tt.Bytes)return i.push(this.readBoolean());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readBoolean());return i},readPackedFloat:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFloat());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFloat());return i},readPackedDouble:function(i){if(this.type!==Tt.Bytes)return i.push(this.readDouble());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readDouble());return i},readPackedFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed32());return i},readPackedSFixed32:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed32());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed32());return i},readPackedFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readFixed64());return i},readPackedSFixed64:function(i){if(this.type!==Tt.Bytes)return i.push(this.readSFixed64());var t=zi(this);for(i=i||[];this.pos<t;)i.push(this.readSFixed64());return i},skip:function(i){var t=i&7;if(t===Tt.Varint)for(;this.buf[this.pos++]>127;);else if(t===Tt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Tt.Fixed32)this.pos+=4;else if(t===Tt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t<this.pos+i;)t*=2;if(t!==this.length){var e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeSFixed32:function(i){this.realloc(4),Ar(this.buf,i,this.pos),this.pos+=4},writeFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeSFixed64:function(i){this.realloc(8),Ar(this.buf,i&-1,this.pos),Ar(this.buf,Math.floor(i*ff),this.pos+4),this.pos+=8},writeVarint:function(i){if(i=+i||0,i>268435455||i<0){v1(i,this);return}this.realloc(4),this.buf[this.pos++]=i&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=i>>>7&127)))},writeSVarint:function(i){this.writeVarint(i<0?-i*2-1:i*2)},writeBoolean:function(i){this.writeVarint(Boolean(i))},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var t=this.pos;this.pos=I1(this.buf,i,this.pos);var e=this.pos-t;e>=128&&mf(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),pa.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),pa.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var e=0;e<t;e++)this.buf[this.pos++]=i[e]},writeRawMessage:function(i,t){this.pos++;var e=this.pos;i(t,this);var n=this.pos-e;n>=128&&mf(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,Tt.Bytes),this.writeRawMessage(t,e)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,x1,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,b1,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,M1,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,k1,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,w1,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,E1,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,C1,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,S1,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,T1,t)},writeBytesField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,Tt.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,Tt.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,Tt.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,Tt.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,Boolean(t))}};function p1(i,t,e){var n=e.buf,r,o;if(o=n[e.pos++],r=(o&112)>>4,o<128||(o=n[e.pos++],r|=(o&127)<<3,o<128)||(o=n[e.pos++],r|=(o&127)<<10,o<128)||(o=n[e.pos++],r|=(o&127)<<17,o<128)||(o=n[e.pos++],r|=(o&127)<<24,o<128)||(o=n[e.pos++],r|=(o&1)<<31,o<128))return Pr(i,r,t);throw new Error("Expected varint not more than 10 bytes")}function zi(i){return i.type===Tt.Bytes?i.readVarint()+i.pos:i.pos+1}function Pr(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function v1(i,t){var e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),_1(e,n,t),y1(n,t)}function _1(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function y1(i,t){var e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function mf(i,t,e){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(var r=e.pos-1;r>=i;r--)e.buf[r+n]=e.buf[r]}function x1(i,t){for(var e=0;e<i.length;e++)t.writeVarint(i[e])}function b1(i,t){for(var e=0;e<i.length;e++)t.writeSVarint(i[e])}function k1(i,t){for(var e=0;e<i.length;e++)t.writeFloat(i[e])}function w1(i,t){for(var e=0;e<i.length;e++)t.writeDouble(i[e])}function M1(i,t){for(var e=0;e<i.length;e++)t.writeBoolean(i[e])}function E1(i,t){for(var e=0;e<i.length;e++)t.writeFixed32(i[e])}function C1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed32(i[e])}function S1(i,t){for(var e=0;e<i.length;e++)t.writeFixed64(i[e])}function T1(i,t){for(var e=0;e<i.length;e++)t.writeSFixed64(i[e])}function va(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+i[t+3]*16777216}function Ar(i,t,e){i[e]=t,i[e+1]=t>>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function pf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function z1(i,t,e){for(var n="",r=t;r<e;){var o=i[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a>e)break;var l,h,u;a===1?o<128&&(s=o):a===2?(l=i[r+1],(l&192)===128&&(s=(o&31)<<6|l&63,s<=127&&(s=null))):a===3?(l=i[r+1],h=i[r+2],(l&192)===128&&(h&192)===128&&(s=(o&15)<<12|(l&63)<<6|h&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):a===4&&(l=i[r+1],h=i[r+2],u=i[r+3],(l&192)===128&&(h&192)===128&&(u&192)===128&&(s=(o&15)<<18|(l&63)<<12|(h&63)<<6|u&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,a=1):s>65535&&(s-=65536,n+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),n+=String.fromCharCode(s),r+=a}return n}function R1(i,t,e){return gf.decode(i.subarray(t,e))}function I1(i,t,e){for(var n=0,r,o;n<t.length;n++){if(r=t.charCodeAt(n),r>55295&&r<57344)if(o)if(r<56320){i[e++]=239,i[e++]=191,i[e++]=189,o=r;continue}else r=o-55296<<10|r-56320|65536,o=null;else{r>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):o=r;continue}else o&&(i[e++]=239,i[e++]=191,i[e++]=189,o=null);r<128?i[e++]=r:(r<2048?i[e++]=r>>6|192:(r<65536?i[e++]=r>>12|224:(i[e++]=r>>18|240,i[e++]=r>>12&63|128),i[e++]=r>>6&63|128),i[e++]=r&63|128)}return e}const vf=Ye();class Lo{constructor(t,e,n,r,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?xo(this.flatCoordinates_):Rl(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Yi(this.getExtent());this.flatInteriorPoints_=fh(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=sf(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=jc(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=ha(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let r=0,o=n.length;r<o;++r){const s=n[r],a=ha(t,e,s,2,.5);li(this.flatMidpoints_,a),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Gt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const r=$e(n)/$e(e);Mi(vf,n[0],n[3],r,-r,0,0,0),Ji(this.flatCoordinates_,0,this.flatCoordinates_.length,2,vf,this.flatCoordinates_)}}getEnds(){return this.ends_}}Lo.prototype.getEndss=Lo.prototype.getEnds,Lo.prototype.getFlatCoordinates=Lo.prototype.getOrientedFlatCoordinates;const Xh=Lo;class P1 extends af{constructor(t){super(),t=t||{},this.dataProjection=new Ns({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Xh,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,n,r){t.pos=e.geometry;const o=t.readVarint()+t.pos;let s=1,a=0,l=0,h=0,u=0,d=0;for(;t.pos<o;){if(!a){const c=t.readVarint();s=c&7,a=c>>3}a--,s===1||s===2?(l+=t.readSVarint(),h+=t.readSVarint(),s===1&&u>d&&(r.push(u),d=u),n.push(l,h),u+=2):s===7?u>d&&(n.push(n[d],n[d+1]),u+=2):ft(!1,59)}u>d&&(r.push(u),d=u)}createFeature_(t,e,n){const r=e.type;if(r===0)return null;let o;const s=e.properties;let a;this.idProperty_?(a=s[this.idProperty_],delete s[this.idProperty_]):a=e.id,s[this.layerName_]=e.layer.name;const l=[],h=[];this.readRawGeometry_(t,e,l,h);const u=O1(r,h.length);if(this.featureClass_===Xh)o=new this.featureClass_(u,l,h,s,a),o.transform(n.dataProjection);else{let d;if(u=="Polygon"){const g=Xv(l,h);d=g.length>1?new Rh(l,"XY",g):new Wn(l,"XY",h)}else d=u==="Point"?new ni(l,"XY"):u==="LineString"?new Kn(l,"XY"):u==="MultiPoint"?new Ao(l,"XY"):u==="MultiLineString"?new Th(l,"XY",h):null;const c=this.featureClass_;o=new c,this.geometryName_&&o.setGeometryName(this.geometryName_);const f=Ph(d,!1,n);o.setGeometry(f),a!==void 0&&o.setId(a),o.setProperties(s,!0)}return o}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const r=Gt(e.dataProjection);r.setWorldExtent(e.extent),e.dataProjection=r;const o=new g1(t),s=o.readFields(A1,{}),a=[];for(const l in s){if(n&&!n.includes(l))continue;const h=s[l],u=h?[0,0,h.extent,h.extent]:null;r.setExtent(u);for(let d=0,c=h.length;d<c;++d){const f=F1(o,h,d),g=this.createFeature_(o,f,e);g!==null&&a.push(g)}}return a}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}}function A1(i,t,e){if(i===3){const n={keys:[],values:[],features:[]},r=e.readVarint()+e.pos;e.readFields(D1,n,r),n.length=n.features.length,n.length&&(t[n.name]=n)}}function D1(i,t,e){if(i===15)t.version=e.readVarint();else if(i===1)t.name=e.readString();else if(i===5)t.extent=e.readVarint();else if(i===2)t.features.push(e.pos);else if(i===3)t.keys.push(e.readString());else if(i===4){let n=null;const r=e.readVarint()+e.pos;for(;e.pos<r;)i=e.readVarint()>>3,n=i===1?e.readString():i===2?e.readFloat():i===3?e.readDouble():i===4?e.readVarint64():i===5?e.readVarint():i===6?e.readSVarint():i===7?e.readBoolean():null;t.values.push(n)}}function L1(i,t,e){if(i==1)t.id=e.readVarint();else if(i==2){const n=e.readVarint()+e.pos;for(;e.pos<n;){const r=t.layer.keys[e.readVarint()],o=t.layer.values[e.readVarint()];t.properties[r]=o}}else i==3?t.type=e.readVarint():i==4&&(t.geometry=e.pos)}function F1(i,t,e){i.pos=t.features[e];const n=i.readVarint()+i.pos,r={layer:t,type:0,properties:{}};return i.readFields(L1,r,n),r}function O1(i,t){let e;return i===1?e=t===1?"Point":"MultiPoint":i===2?e=t===1?"LineString":"MultiLineString":i===3&&(e="Polygon"),e}const N1=P1;function G1(i,t,e,n,r){_f(i,t,e||0,n||i.length-1,r||j1)}function _f(i,t,e,n,r){for(;n>e;){if(n-e>600){var o=n-e+1,s=t-e+1,a=Math.log(o),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1),u=Math.max(e,Math.floor(t-s*l/o+h)),d=Math.min(n,Math.floor(t+(o-s)*l/o+h));_f(i,t,u,d,r)}var c=i[t],f=e,g=n;for(Fo(i,e,t),r(i[n],c)>0&&Fo(i,e,n);f<g;){for(Fo(i,f,g),f++,g--;r(i[f],c)<0;)f++;for(;r(i[g],c)>0;)g--}r(i[e],c)===0?Fo(i,e,g):(g++,Fo(i,g,n)),g<=t&&(e=g+1),t<=g&&(n=g-1)}}function Fo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function j1(i,t){return i<t?-1:i>t?1:0}class yf{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const n=[];if(!ya(t,e))return n;const r=this.toBBox,o=[];for(;e;){for(let s=0;s<e.children.length;s++){const a=e.children[s],l=e.leaf?r(a):a;ya(t,l)&&(e.leaf?n.push(a):Wh(t,l)?this._all(a,n):o.push(a))}e=o.pop()}return n}collides(t){let e=this.data;if(!ya(t,e))return!1;const n=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],s=e.leaf?this.toBBox(o):o;if(ya(t,s)){if(e.leaf||Wh(t,s))return!0;n.push(o)}}e=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const n=this.data;this.data=e,e=n}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Lr([]),this}remove(t,e){if(!t)return this;let n=this.data;const r=this.toBBox(t),o=[],s=[];let a,l,h;for(;n||o.length;){if(n||(n=o.pop(),l=o[o.length-1],a=s.pop(),h=!0),n.leaf){const u=B1(t,n.children,e);if(u!==-1)return n.children.splice(u,1),o.push(n),this._condense(o),this}!h&&!n.leaf&&Wh(n,r)?(o.push(n),s.push(a),a=0,l=n,n=n.children[0]):l?(a++,n=l.children[a],h=!1):n=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const n=[];for(;t;)t.leaf?e.push(...t.children):n.push(...t.children),t=n.pop();return e}_build(t,e,n,r){const o=n-e+1;let s=this._maxEntries,a;if(o<=s)return a=Lr(t.slice(e,n+1)),Dr(a,this.toBBox),a;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),a=Lr([]),a.leaf=!1,a.height=r;const l=Math.ceil(o/s),h=l*Math.ceil(Math.sqrt(s));xf(t,e,n,h,this.compareMinX);for(let u=e;u<=n;u+=h){const d=Math.min(u+h-1,n);xf(t,u,d,l,this.compareMinY);for(let c=u;c<=d;c+=l){const f=Math.min(c+l-1,d);a.children.push(this._build(t,c,f,r-1))}}return Dr(a,this.toBBox),a}_chooseSubtree(t,e,n,r){for(;r.push(e),!(e.leaf||r.length-1===n);){let o=1/0,s=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],u=$h(h),d=q1(t,h)-u;d<s?(s=d,o=u<o?u:o,a=h):d===s&&u<o&&(o=u,a=h)}e=a||e.children[0]}return e}_insert(t,e,n){const r=n?t:this.toBBox(t),o=[],s=this._chooseSubtree(r,this.data,e,o);for(s.children.push(t),No(s,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)}_split(t,e){const n=t[e],r=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,r);const s=this._chooseSplitIndex(n,o,r),a=Lr(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,Dr(n,this.toBBox),Dr(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this.data=Lr([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Dr(this.data,this.toBBox)}_chooseSplitIndex(t,e,n){let r,o=1/0,s=1/0;for(let a=e;a<=n-e;a++){const l=Oo(t,0,a,this.toBBox),h=Oo(t,a,n,this.toBBox),u=X1(l,h),d=$h(l)+$h(h);u<o?(o=u,r=a,s=d<s?d:s):u===o&&d<s&&(s=d,r=a)}return r||n-e}_chooseSplitAxis(t,e,n){const r=t.leaf?this.compareMinX:U1,o=t.leaf?this.compareMinY:V1,s=this._allDistMargin(t,e,n,r),a=this._allDistMargin(t,e,n,o);s<a&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const o=this.toBBox,s=Oo(t,0,e,o),a=Oo(t,n-e,n,o);let l=_a(s)+_a(a);for(let h=e;h<n-e;h++){const u=t.children[h];No(s,t.leaf?o(u):u),l+=_a(s)}for(let h=n-e-1;h>=e;h--){const u=t.children[h];No(a,t.leaf?o(u):u),l+=_a(a)}return l}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)No(e[r],t)}_condense(t){for(let e=t.length-1,n;e>=0;e--)t[e].children.length===0?e>0?(n=t[e-1].children,n.splice(n.indexOf(t[e]),1)):this.clear():Dr(t[e],this.toBBox)}}function B1(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n<t.length;n++)if(e(i,t[n]))return n;return-1}function Dr(i,t){Oo(i,0,i.children.length,t,i)}function Oo(i,t,e,n,r){r||(r=Lr(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=t;o<e;o++){const s=i.children[o];No(r,i.leaf?n(s):s)}return r}function No(i,t){return i.minX=Math.min(i.minX,t.minX),i.minY=Math.min(i.minY,t.minY),i.maxX=Math.max(i.maxX,t.maxX),i.maxY=Math.max(i.maxY,t.maxY),i}function U1(i,t){return i.minX-t.minX}function V1(i,t){return i.minY-t.minY}function $h(i){return(i.maxX-i.minX)*(i.maxY-i.minY)}function _a(i){return i.maxX-i.minX+(i.maxY-i.minY)}function q1(i,t){return(Math.max(t.maxX,i.maxX)-Math.min(t.minX,i.minX))*(Math.max(t.maxY,i.maxY)-Math.min(t.minY,i.minY))}function X1(i,t){const e=Math.max(i.minX,t.minX),n=Math.max(i.minY,t.minY),r=Math.min(i.maxX,t.maxX),o=Math.min(i.maxY,t.maxY);return Math.max(0,r-e)*Math.max(0,o-n)}function Wh(i,t){return i.minX<=t.minX&&i.minY<=t.minY&&t.maxX<=i.maxX&&t.maxY<=i.maxY}function ya(i,t){return t.minX<=i.maxX&&t.minY<=i.maxY&&t.maxX>=i.minX&&t.maxY>=i.minY}function Lr(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function xf(i,t,e,n,r){const o=[t,e];for(;o.length;){if(e=o.pop(),t=o.pop(),e-t<=n)continue;const s=t+Math.ceil((e-t)/n/2)*n;G1(i,s,t,e,r),o.push(t,s,s,e)}}function bf(i){return new le({fill:Go(i,""),stroke:jo(i,""),text:$1(i),image:W1(i)})}function Go(i,t){const e=i[t+"fill-color"];if(!!e)return new ge({color:e})}function jo(i,t){const e=i[t+"stroke-width"],n=i[t+"stroke-color"];if(!(!e&&!n))return new ke({width:e,color:n,lineCap:i[t+"stroke-line-cap"],lineJoin:i[t+"stroke-line-join"],lineDash:i[t+"stroke-line-dash"],lineDashOffset:i[t+"stroke-line-dash-offset"],miterLimit:i[t+"stroke-miter-limit"]})}function $1(i){const t=i["text-value"];return t?new cf({text:t,font:i["text-font"],maxAngle:i["text-max-angle"],offsetX:i["text-offset-x"],offsetY:i["text-offset-y"],overflow:i["text-overflow"],placement:i["text-placement"],scale:i["text-scale"],rotateWithView:i["text-rotate-with-view"],rotation:i["text-rotation"],textAlign:i["text-align"],justify:i["text-justify"],textBaseline:i["text-baseline"],padding:i["text-padding"],fill:Go(i,"text-"),backgroundFill:Go(i,"text-background-"),stroke:jo(i,"text-"),backgroundStroke:jo(i,"text-background-")}):void 0}function W1(i){const t=i["icon-src"],e=i["icon-img"];if(t||e)return new ga({src:t,img:e,imgSize:i["icon-img-size"],anchor:i["icon-anchor"],anchorOrigin:i["icon-anchor-origin"],anchorXUnits:i["icon-anchor-x-units"],anchorYUnits:i["icon-anchor-y-units"],color:i["icon-color"],crossOrigin:i["icon-cross-origin"],offset:i["icon-offset"],displacement:i["icon-displacement"],opacity:i["icon-opacity"],scale:i["icon-scale"],rotation:i["icon-rotation"],rotateWithView:i["icon-rotate-with-view"],size:i["icon-size"],declutterMode:i["icon-declutter-mode"]});const n=i["shape-points"];if(n){const o="shape-";return new ma({points:n,fill:Go(i,o),stroke:jo(i,o),radius:i["shape-radius"],radius1:i["shape-radius1"],radius2:i["shape-radius2"],angle:i["shape-angle"],displacement:i["shape-displacement"],rotation:i["shape-rotation"],rotateWithView:i["shape-rotate-with-view"],scale:i["shape-scale"],declutterMode:i["shape-declutter-mode"]})}const r=i["circle-radius"];if(r){const o="circle-";return new Hn({radius:r,fill:Go(i,o),stroke:jo(i,o),displacement:i["circle-displacement"],scale:i["circle-scale"],rotation:i["circle-rotation"],rotateWithView:i["circle-rotate-with-view"],declutterMode:i["circle-declutter-mode"]})}}const kf={RENDER_ORDER:"renderOrder"};class Y1 extends Os{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(kf.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new yf(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(kf.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=d1;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof le)e=t;else if(Array.isArray(t)){const n=t.length,r=new Array(n);for(let o=0;o<n;++o){const s=t[o];s instanceof le?r[o]=s:r[o]=bf(s)}e=r}else e=bf(t);this.style_=e,this.styleFunction_=t===null?void 0:u1(this.style_),this.changed()}}const wf=Y1,Bo={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},xa=[Bo.FILL],on=[Bo.STROKE],Jn=[Bo.BEGIN_PATH],Mf=[Bo.CLOSE_PATH],Q=Bo;class K1{drawCustom(t,e,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const Ef=K1;class Z1 extends Ef{constructor(t,e,n,r){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=r,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,o=this.coordinates;let s=o.length;for(let a=0,l=t.length;a<l;a+=e)r[0]=t[a],r[1]=t[a+1],js(n,r)&&(o[s++]=r[0],o[s++]=r[1]);return s}appendFlatLineCoordinates(t,e,n,r,o,s){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();s&&(e+=r);let u=t[e],d=t[e+1];const c=this.tmpCoordinate_;let f=!0,g,m,p;for(g=e+r;g<n;g+=r)c[0]=t[g],c[1]=t[g+1],p=zl(h,c),p!==m?(f&&(a[l++]=u,a[l++]=d,f=!1),a[l++]=c[0],a[l++]=c[1]):p===ne.INTERSECTING?(a[l++]=c[0],a[l++]=c[1],f=!1):f=!0,u=c[0],d=c[1],m=p;return(o&&f||g===e+r)&&(a[l++]=u,a[l++]=d),l}drawCustomCoordinates_(t,e,n,r,o){for(let s=0,a=n.length;s<a;++s){const l=n[s],h=this.appendFlatLineCoordinates(t,e,l,r,!1,!1);o.push(h),e=l}return e}drawCustom(t,e,n,r){this.beginGeometry(t,e);const o=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,u,d,c;switch(o){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const f=t.getEndss();c=0;for(let g=0,m=f.length;g<m;++g){const p=[];c=this.drawCustomCoordinates_(l,c,f[g],s,p),d.push(p)}this.instructions.push([Q.CUSTOM,a,d,t,n,uh]),this.hitDetectionInstructions.push([Q.CUSTOM,a,d,t,r||n,uh]);break;case"Polygon":case"MultiLineString":u=[],l=o=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(l,0,t.getEnds(),s,u),this.instructions.push([Q.CUSTOM,a,u,t,n,Ro]),this.hitDetectionInstructions.push([Q.CUSTOM,a,u,t,r||n,Ro]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([Q.CUSTOM,a,h,t,n,tn]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n,tn]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Q.CUSTOM,a,h,t,n]),this.hitDetectionInstructions.push([Q.CUSTOM,a,h,t,r||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Q.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Q.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let r,o,s=-1;for(e=0;e<n;++e)r=t[e],o=r[0],o==Q.END_GEOMETRY?s=e:o==Q.BEGIN_GEOMETRY&&(r[2]=e,Wp(this.hitDetectionInstructions,s,e),s=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const r=t.getColor();n.fillStyle=di(r||Ei)}else n.fillStyle=void 0;if(e){const r=e.getColor();n.strokeStyle=di(r||So);const o=e.getLineCap();n.lineCap=o!==void 0?o:Zs;const s=e.getLineDash();n.lineDash=s?s.slice():Mo;const a=e.getLineDashOffset();n.lineDashOffset=a||Eo;const l=e.getLineJoin();n.lineJoin=l!==void 0?l:Sr;const h=e.getWidth();n.lineWidth=h!==void 0?h:zo;const u=e.getMiterLimit();n.miterLimit=u!==void 0?u:Co,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[Q.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Q.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,r=t.lineCap,o=t.lineDash,s=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||o!=t.currentLineDash&&!Vi(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Q.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ec(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;ui(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Uo=Z1;class H1 extends Uo{constructor(t,e,n,r){super(t,e,n,r),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Q.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Q.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const n=t.getAnchor(),r=t.getSize(),o=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=o[0],this.originY_=o[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const J1=H1;class Q1 extends Uo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinates_(t,e,n,r){const o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),a=[Q.MOVE_TO_LINE_TO,o,s];return this.instructions.push(a),this.hitDetectionInstructions.push(a),n}drawLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Mo,Eo],Jn);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(on),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(r===void 0||o===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],Jn);const s=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinates_(a,h,s[u],l);this.hitDetectionInstructions.push(on),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(on),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(on),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Jn)}}const ty=Q1;class ey extends Uo{constructor(t,e,n,r){super(t,e,n,r)}drawFlatCoordinatess_(t,e,n,r){const o=this.state,s=o.fillStyle!==void 0,a=o.strokeStyle!==void 0,l=n.length;this.instructions.push(Jn),this.hitDetectionInstructions.push(Jn);for(let h=0;h<l;++h){const u=n[h],d=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,r,!0,!a),f=[Q.MOVE_TO_LINE_TO,d,c];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Mf),this.hitDetectionInstructions.push(Mf)),e=u}return s&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),a&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),e}drawCircle(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ei]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,a,!1,!1);const h=[Q.CIRCLE,l];this.instructions.push(Jn,h),this.hitDetectionInstructions.push(Jn,h),n.fillStyle!==void 0&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),n.strokeStyle!==void 0&&(this.instructions.push(on),this.hitDetectionInstructions.push(on)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ei]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,s,l),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(r===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_FILL_STYLE,Ei]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Q.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);const s=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let u=0,d=s.length;u<d;++u)h=this.drawFlatCoordinatess_(a,h,s[u],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,r=e.length;n<r;++n)e[n]=Xn(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const Cf=ey;function iy(i,t,e,n,r){let o=e,s=e,a=0,l=0,h=e,u,d,c,f,g,m,p,_,v,y;for(d=e;d<n;d+=r){const x=t[d],k=t[d+1];g!==void 0&&(v=x-g,y=k-m,f=Math.sqrt(v*v+y*y),p!==void 0&&(l+=c,u=Math.acos((p*v+_*y)/(c*f)),u>i&&(l>a&&(a=l,o=h,s=d),l=0,h=d-r)),c=f,p=v,_=y),g=x,m=k}return l+=f,l>a?[h,d]:[o,s]}const Vo={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class ny extends Uo{constructor(t,e,n,r){super(t,e,n,r),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!n&&!r)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,u=t.getStride();if(o.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!Kt(this.getBufferedMaxExtent(),t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),l=="LineString")d=[h.length];else if(l=="MultiLineString")d=t.getEnds();else if(l=="Polygon")d=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,_=m.length;p<_;++p)d.push(m[p][0])}this.beginGeometry(t,e);const c=o.textAlign;let f=0,g;for(let m=0,p=d.length;m<p;++m){if(c==null){const v=iy(o.maxAngle,h,f,d[m],u);f=v[0],g=v[1]}else g=d[m];for(let v=f;v<g;v+=u)s.push(h[v],h[v+1]);const _=s.length;f=d[m],this.drawChars_(a,_),a=_}this.endGeometry(e)}else{let d=o.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),u=2;break;case"Polygon":h=t.getFlatInteriorPoint(),o.overflow||d.push(h[2]/this.resolution),u=3;break;case"MultiPolygon":const p=t.getFlatInteriorPoints();h=[];for(let _=0,v=p.length;_<v;_+=3)o.overflow||d.push(p[_+2]/this.resolution),h.push(p[_],p[_+1]);if(h.length===0)return;u=2;break}const c=this.appendFlatPointCoordinates(h,u);if(c===a)return;if(d&&(c-a)/2!==h.length/u){let p=a/2;d=d.filter((_,v)=>{const y=s[(p+v)*2]===h[v*u]&&s[(p+v)*2+1]===h[v*u+1];return y||--p,y})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let f=o.padding;if(f!=qn&&(o.scale[0]<0||o.scale[1]<0)){let p=o.padding[0],_=o.padding[1],v=o.padding[2],y=o.padding[3];o.scale[0]<0&&(_=-_,y=-y),o.scale[1]<0&&(p=-p,v=-v),f=[p,_,v,y]}const g=this.pixelRatio;this.instructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==qn?qn:f.map(function(p){return p*g}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/g;this.hitDetectionInstructions.push([Q.DRAW_IMAGE,a,c,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,void 0,this.declutterImageWithText_,f,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,r=this.strokeKey_;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const o=this.textKey_;o in this.textStates||(this.textStates[o]={font:e.font,textAlign:e.textAlign||To,justify:e.justify,textBaseline:e.textBaseline||Hs,scale:e.scale});const s=this.fillKey_;n&&(s in this.fillStates||(this.fillStates[s]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,r=this.textState_,o=this.strokeKey_,s=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=Vo[r.textBaseline],u=this.textOffsetY_*l,d=this.text_,c=n?n.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,l,u,o,c*l,d,s,1]),this.hitDetectionInstructions.push([Q.DRAW_CHARS,t,e,h,r.overflow,a,r.maxAngle,1,u,o,c,d,s,1/l])}setTextStyle(t,e){let n,r,o;if(!t)this.text_="";else{const s=t.getFill();s?(r=this.textFillState_,r||(r={},this.textFillState_=r),r.fillStyle=di(s.getColor()||Ei)):(r=null,this.textFillState_=r);const a=t.getStroke();if(!a)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);const g=a.getLineDash(),m=a.getLineDashOffset(),p=a.getWidth(),_=a.getMiterLimit();o.lineCap=a.getLineCap()||Zs,o.lineDash=g?g.slice():Mo,o.lineDashOffset=m===void 0?Eo:m,o.lineJoin=a.getLineJoin()||Sr,o.lineWidth=p===void 0?zo:p,o.miterLimit=_===void 0?Co:_,o.strokeStyle=di(a.getColor()||So)}n=this.textState_;const l=t.getFont()||wc;rv(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Hs,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||qn,n.scale=h===void 0?[1,1]:h;const u=t.getOffsetX(),d=t.getOffsetY(),c=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=c===void 0?!1:c,this.textRotation_=f===void 0?0:f,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:K(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=r?typeof r.fillStyle=="string"?r.fillStyle:"|"+K(r.fillStyle):""}this.declutterImageWithText_=e}}const ry={Circle:Cf,Default:Uo,Image:J1,LineString:ty,Polygon:Cf,Text:ny};class oy{constructor(t,e,n,r){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=r,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const r in n){const o=n[r].finish();t[e][r]=o}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let r=this.buildersByZIndex_[n];r===void 0&&(r={},this.buildersByZIndex_[n]=r);let o=r[e];if(o===void 0){const s=ry[e];o=new s(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),r[e]=o}return o}}const ba=oy;class sy extends jd{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return et()}getData(t){return null}prepareFrame(t){return et()}renderFrame(t,e){return et()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return function(r,o){const s=this.loadedTileCallback.bind(this,n,r);return t.forEachLoadedTile(e,r,o,s)}.bind(this)}forEachFeatureAtCoordinate(t,e,n,r,o){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===Qt.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Qt.LOADED&&e!=Qt.ERROR&&t.addEventListener(tt.CHANGE,this.boundHandleImageChange_),e==Qt.IDLE&&(t.load(),e=t.getState()),e==Qt.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const ay=sy,Sf=[];let Fr=null;function ly(){const i=document.createElement("canvas");i.width=1,i.height=1,Fr=i.getContext("2d")}class hy extends ay{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ye(),this.pixelTransform=Ye(),this.inversePixelTransform=Ye(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){Fr||ly(),Fr.clearRect(0,0,1,1);let r;try{Fr.drawImage(t,e,n,1,1,0,0,1,1),r=Fr.getImageData(0,0,1,1).data}catch{return Fr=null,null}return r}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const r=this.getLayer().getClassName();let o,s;if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&Vi(wo(t.style.backgroundColor),wo(n)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){o=document.createElement("div"),o.className=r;let a=o.style;a.position="absolute",a.width="100%",a.height="100%",s=Pe();const l=s.canvas;o.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=o,this.context=s}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const r=Ki(n),o=Vs(n),s=Us(n),a=Bs(n);Jt(e.coordinateToPixelTransform,r),Jt(e.coordinateToPixelTransform,o),Jt(e.coordinateToPixelTransform,s),Jt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;Jt(l,r),Jt(l,o),Jt(l,s),Jt(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,n){const r=this.getLayer();if(r.hasListener(t)){const o=new kc(t,this.inversePixelTransform,n,e);r.dispatchEvent(o)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Wi.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Wi.POSTRENDER,t,e)}getRenderTransform(t,e,n,r,o,s,a){const l=o/2,h=s/2,u=r/e,d=-u,c=-t[0]+a,f=-t[1];return Mi(this.tempTransform,l,h,u,d,-n,c,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Tf=hy;function uy(i,t,e,n,r,o,s,a,l,h,u,d){let c=i[t],f=i[t+1],g=0,m=0,p=0,_=0;function v(){g=c,m=f,t+=n,c=i[t],f=i[t+1],_+=p,p=Math.sqrt((c-g)*(c-g)+(f-m)*(f-m))}do v();while(t<e-n&&_+p<o);let y=p===0?0:(o-_)/p;const x=ki(g,c,y),k=ki(m,f,y),w=t-n,C=_,M=o+a*l(h,r,u);for(;t<e-n&&_+p<M;)v();y=p===0?0:(M-_)/p;const S=ki(g,c,y),R=ki(m,f,y);let A;if(d){const U=[x,k,S,R];nh(U,0,4,2,d,U,U),A=U[0]>U[2]}else A=x>S;const G=Math.PI,P=[],at=w+n===t;t=w,p=0,_=C,c=i[t],f=i[t+1];let j;if(at){v(),j=Math.atan2(f-m,c-g),A&&(j+=j>0?-G:G);const U=(S+x)/2,O=(R+k)/2;return P[0]=[U,O,(M-o)/2,j,r],P}r=r.replace(/\n/g," ");for(let U=0,O=r.length;U<O;){v();let W=Math.atan2(f-m,c-g);if(A&&(W+=W>0?-G:G),j!==void 0){let b=W-j;if(b+=b>G?-2*G:b<-G?2*G:0,Math.abs(b)>s)return null}j=W;const D=U;let Z=0;for(;U<O;++U){const b=A?O-U-1:U,T=a*l(h,r[b],u);if(t+n<e&&_+p<o+Z+T/2)break;Z+=T}if(U===D)continue;const V=A?r.substring(O-D,O-U):r.substring(D,U);y=p===0?0:(o+Z/2-_)/p;const z=ki(g,c,y),ot=ki(m,f,y);P.push([z,ot,Z/2,W,V]),o+=Z}return P}const Or=Ge(),sn=[],Ri=[],Ii=[],an=[];function zf(i){return i[3].declutterBox}const dy=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Rf(i,t){return(t==="start"||t==="end")&&!dy.test(i)&&(t=t==="start"?"left":"right"),Vo[t]}function cy(i,t,e){return e>0&&i.push(`
43
+ `,""),i.push(t,""),i}class fy{constructor(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Ye(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,n,r){const o=t+e+n+r;if(this.labels_[o])return this.labels_[o];const s=r?this.strokeStates[r]:null,a=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,u=[l.scale[0]*h,l.scale[1]*h],d=Array.isArray(t),c=l.justify?Vo[l.justify]:Rf(Array.isArray(t)?t[0]:t,l.textAlign||To),f=r&&s.lineWidth?s.lineWidth:0,g=d?t:t.split(`
44
+ `).reduce(cy,[]),{width:m,height:p,widths:_,heights:v,lineWidths:y}=sv(l,g),x=m+f,k=[],w=(x+2)*u[0],C=(p+f)*u[1],M={width:w<0?Math.floor(w):Math.ceil(w),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:k};(u[0]!=1||u[1]!=1)&&k.push("scale",u),r&&(k.push("strokeStyle",s.strokeStyle),k.push("lineWidth",f),k.push("lineCap",s.lineCap),k.push("lineJoin",s.lineJoin),k.push("miterLimit",s.miterLimit),k.push("setLineDash",[s.lineDash]),k.push("lineDashOffset",s.lineDashOffset)),n&&k.push("fillStyle",a.fillStyle),k.push("textBaseline","middle"),k.push("textAlign","center");const S=.5-c;let R=c*x+S*f;const A=[],G=[];let P=0,at=0,j=0,U=0,O;for(let W=0,D=g.length;W<D;W+=2){const Z=g[W];if(Z===`
45
+ `){at+=P,P=0,R=c*x+S*f,++U;continue}const V=g[W+1]||l.font;V!==O&&(r&&A.push("font",V),n&&G.push("font",V),O=V),P=Math.max(P,v[j]);const z=[Z,R+S*_[j]+c*(_[j]-y[U]),.5*(f+P)+at];R+=_[j],r&&A.push("strokeText",z),n&&G.push("fillText",z),++j}return Array.prototype.push.apply(k,A),Array.prototype.push.apply(k,G),this.labels_[o]=M,M}replayTextBackground_(t,e,n,r,o,s,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,o),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p){a*=c[0],l*=c[1];let _=n-a,v=r-l;const y=o+h>t?t-h:o,x=s+u>e?e-u:s,k=g[3]+y*c[0]+g[1],w=g[0]+x*c[1]+g[2],C=_-g[3],M=v-g[0];(m||d!==0)&&(sn[0]=C,an[0]=C,sn[1]=M,Ri[1]=M,Ri[0]=C+k,Ii[0]=Ri[0],Ii[1]=M+w,an[1]=Ii[1]);let S;return d!==0?(S=Mi(Ye(),n,r,1,1,d,-n,-r),Jt(S,sn),Jt(S,Ri),Jt(S,Ii),Jt(S,an),ti(Math.min(sn[0],Ri[0],Ii[0],an[0]),Math.min(sn[1],Ri[1],Ii[1],an[1]),Math.max(sn[0],Ri[0],Ii[0],an[0]),Math.max(sn[1],Ri[1],Ii[1],an[1]),Or)):ti(Math.min(C,C+k),Math.min(M,M+w),Math.max(C,C+k),Math.max(M,M+w),Or),f&&(_=Math.round(_),v=Math.round(v)),{drawImageX:_,drawImageY:v,drawImageW:y,drawImageH:x,originX:h,originY:u,declutterBox:{minX:Or[0],minY:Or[1],maxX:Or[2],maxY:Or[3],value:p},canvasTransform:S,scale:c}}replayImageOrLabel_(t,e,n,r,o,s,a){const l=!!(s||a),h=r.declutterBox,u=t.canvas,d=a?a[2]*r.scale[0]/2:0;return h.minX-d<=u.width/e&&h.maxX+d>=0&&h.minY-d<=u.height/e&&h.maxY+d>=0&&(l&&this.replayTextBackground_(t,sn,Ri,Ii,an,s,a),av(t,r.canvasTransform,o,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(t){if(this.alignFill_){const e=Jt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,r){const o=this.textStates[e],s=this.createLabel(t,e,r,n),a=this.strokeStates[n],l=this.pixelRatio,h=Rf(Array.isArray(t)?t[0]:t,o.textAlign||To),u=Vo[o.textBaseline||Hs],d=a&&a.lineWidth?a.lineWidth:0,c=s.width/l-2*o.scale[0],f=h*c+2*(.5-h)*d,g=u*s.height/l+2*(.5-u)*d;return{label:s,anchorX:f,anchorY:g}}execute_(t,e,n,r,o,s,a,l){let h;this.pixelCoordinates_&&Vi(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Ji(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),q0(this.renderedTransform_,n));let u=0;const d=r.length;let c=0,f,g,m,p,_,v,y,x,k,w,C,M,S=0,R=0,A=null,G=null;const P=this.coordinateCache_,at=this.viewRotation_,j=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,U={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},O=this.instructions!=r||this.overlaps?0:200;let W,D,Z,V;for(;u<d;){const z=r[u];switch(z[0]){case Q.BEGIN_GEOMETRY:W=z[1],V=z[3],W.getGeometry()?a!==void 0&&!Kt(a,V.getExtent())?u=z[2]+1:++u:u=z[2];break;case Q.BEGIN_PATH:S>O&&(this.fill_(t),S=0),R>O&&(t.stroke(),R=0),!S&&!R&&(t.beginPath(),p=NaN,_=NaN),++u;break;case Q.CIRCLE:c=z[1];const b=h[c],T=h[c+1],Y=h[c+2],E=h[c+3],H=Y-b,$=E-T,vt=Math.sqrt(H*H+$*$);t.moveTo(b+vt,T),t.arc(b,T,vt,0,2*Math.PI,!0),++u;break;case Q.CLOSE_PATH:t.closePath(),++u;break;case Q.CUSTOM:c=z[1],f=z[2];const Ct=z[3],_t=z[4],Et=z.length==6?z[5]:void 0;U.geometry=Ct,U.feature=W,u in P||(P[u]=[]);const Lt=P[u];Et?Et(h,c,f,2,Lt):(Lt[0]=h[c],Lt[1]=h[c+1],Lt.length=2),_t(Lt,U),++u;break;case Q.DRAW_IMAGE:c=z[1],f=z[2],x=z[3],g=z[4],m=z[5];let Dt=z[6];const jt=z[7],F=z[8],ut=z[9],pt=z[10];let kt=z[11];const yt=z[12];let st=z[13];const nt=z[14],wt=z[15];if(!x&&z.length>=20){k=z[19],w=z[20],C=z[21],M=z[22];const de=this.drawLabelWithPointPlacement_(k,w,C,M);x=de.label,z[3]=x;const bi=z[23];g=(de.anchorX-bi)*this.pixelRatio,z[4]=g;const _e=z[24];m=(de.anchorY-_e)*this.pixelRatio,z[5]=m,Dt=x.height,z[6]=Dt,st=x.width,z[13]=st}let zt;z.length>25&&(zt=z[25]);let Bt,xt,dt;z.length>17?(Bt=z[16],xt=z[17],dt=z[18]):(Bt=qn,xt=!1,dt=!1),pt&&j?kt+=at:!pt&&!j&&(kt-=at);let Ft=0;for(;c<f;c+=2){if(zt&&zt[Ft++]<st/this.pixelRatio)continue;const de=this.calculateImageOrLabelDimensions_(x.width,x.height,h[c],h[c+1],st,Dt,g,m,F,ut,kt,yt,o,Bt,xt||dt,W),bi=[t,e,x,de,jt,xt?A:null,dt?G:null];if(l){if(nt==="none")continue;if(nt==="obstacle"){l.insert(de.declutterBox);continue}else{let _e,Xe;if(wt){const Re=f-c;if(!wt[Re]){wt[Re]=bi;continue}if(_e=wt[Re],delete wt[Re],Xe=zf(_e),l.collides(Xe))continue}if(l.collides(de.declutterBox))continue;_e&&(l.insert(Xe),this.replayImageOrLabel_.apply(this,_e)),l.insert(de.declutterBox)}}this.replayImageOrLabel_.apply(this,bi)}++u;break;case Q.DRAW_CHARS:const St=z[1],ct=z[2],ue=z[3],Ve=z[4];M=z[5];const $t=z[6],ze=z[7],Ut=z[8];C=z[9];const Ht=z[10];k=z[11],w=z[12];const Tn=[z[13],z[13]],ae=this.textStates[w],qe=ae.font,ve=[ae.scale[0]*ze,ae.scale[1]*ze];let Oe;qe in this.widths_?Oe=this.widths_[qe]:(Oe={},this.widths_[qe]=Oe);const Ni=of(h,St,ct,2),sl=Math.abs(ve[0])*Ec(qe,k,Oe);if(Ve||sl<=Ni){const de=this.textStates[w].textAlign,bi=(Ni-sl)*Vo[de],_e=uy(h,St,ct,2,k,bi,$t,Math.abs(ve[0]),Ec,qe,Oe,j?0:this.viewRotation_);t:if(_e){const Xe=[];let Re,oo,so,ye,Ie;if(C)for(Re=0,oo=_e.length;Re<oo;++Re){Ie=_e[Re],so=Ie[4],ye=this.createLabel(so,w,"",C),g=Ie[2]+(ve[0]<0?-Ht:Ht),m=ue*ye.height+(.5-ue)*2*Ht*ve[1]/ve[0]-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Ie[0],Ie[1],ye.width,ye.height,g,m,0,0,Ie[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}if(M)for(Re=0,oo=_e.length;Re<oo;++Re){Ie=_e[Re],so=Ie[4],ye=this.createLabel(so,w,M,""),g=Ie[2],m=ue*ye.height-Ut;const ee=this.calculateImageOrLabelDimensions_(ye.width,ye.height,Ie[0],Ie[1],ye.width,ye.height,g,m,0,0,Ie[3],Tn,!1,qn,!1,W);if(l&&l.collides(ee.declutterBox))break t;Xe.push([t,e,ye,ee,1,null,null])}l&&l.load(Xe.map(zf));for(let ee=0,xs=Xe.length;ee<xs;++ee)this.replayImageOrLabel_.apply(this,Xe[ee])}}++u;break;case Q.END_GEOMETRY:if(s!==void 0){W=z[1];const de=s(W,V);if(de)return de}++u;break;case Q.FILL:O?S++:this.fill_(t),++u;break;case Q.MOVE_TO_LINE_TO:for(c=z[1],f=z[2],D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(v!==p||y!==_)&&(t.moveTo(D,Z),p=v,_=y),c+=2;c<f;c+=2)D=h[c],Z=h[c+1],v=D+.5|0,y=Z+.5|0,(c==f-2||v!==p||y!==_)&&(t.lineTo(D,Z),p=v,_=y);++u;break;case Q.SET_FILL_STYLE:A=z,this.alignFill_=z[2],S&&(this.fill_(t),S=0,R&&(t.stroke(),R=0)),t.fillStyle=z[1],++u;break;case Q.SET_STROKE_STYLE:G=z,R&&(t.stroke(),R=0),this.setStrokeStyle_(t,z),++u;break;case Q.STROKE:O?R++:t.stroke(),++u;break;default:++u;break}}S&&this.fill_(t),R&&t.stroke()}execute(t,e,n,r,o,s){this.viewRotation_=r,this.execute_(t,e,n,this.instructions,o,void 0,void 0,s)}executeHitDetection(t,e,n,r,o){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,r,o)}}const gy=fy,Yh=["Polygon","Circle","LineString","Image","Text","Default"];class my{constructor(t,e,n,r,o,s){this.maxExtent_=t,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ye(),this.createExecutors_(o)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const r=t[e];for(const o in r){const s=r[o];n[o]=new gy(this.resolution_,this.pixelRatio_,this.overlaps_,s)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let r=0,o=t.length;r<o;++r)if(t[r]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,r,o,s){r=Math.round(r);const a=r*2+1,l=Mi(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Pe(a,a));const u=this.hitDetectionContext_;u.canvas.width!==a||u.canvas.height!==a?(u.canvas.width=a,u.canvas.height=a):h||u.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=Ge(),bo(d,t),ui(d,e*(this.renderBuffer_+r),d));const c=py(r);let f;function g(k,w){const C=u.getImageData(0,0,a,a).data;for(let M=0,S=c.length;M<S;M++)if(C[c[M]]>0){if(!s||f!=="Image"&&f!=="Text"||s.includes(k)){const R=(c[M]-3)/4,A=r-R%a,G=r-(R/a|0),P=o(k,w,A*A+G*G);if(P)return P}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(An);let p,_,v,y,x;for(p=m.length-1;p>=0;--p){const k=m[p].toString();for(v=this.executorsByZIndex_[k],_=Yh.length-1;_>=0;--_)if(f=Yh[_],y=v[f],y!==void 0&&(x=y.executeHitDetection(u,l,n,g,d),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],r=e[1],o=e[2],s=e[3],a=[n,r,n,s,o,s,o,r];return Ji(a,0,8,2,t,a),a}isEmpty(){return Fn(this.executorsByZIndex_)}execute(t,e,n,r,o,s,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(An),this.maxExtent_&&(t.save(),this.clip(t,n)),s=s||Yh;let h,u,d,c,f,g;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){const m=l[h].toString();for(f=this.executorsByZIndex_[m],d=0,c=s.length;d<c;++d){const p=s[d];g=f[p],g!==void 0&&g.execute(t,e,n,r,o,a)}}this.maxExtent_&&t.restore()}}const Kh={};function py(i){if(Kh[i]!==void 0)return Kh[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let o=0;o<=i;++o)for(let s=0;s<=i;++s){const a=o*o+s*s;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+o)*t+(i+s))*4+3),o>0&&l.push(((i-o)*t+(i+s))*4+3),s>0&&(l.push(((i+o)*t+(i-s))*4+3),o>0&&l.push(((i-o)*t+(i-s))*4+3))}const r=[];for(let o=0,s=n.length;o<s;++o)n[o]&&r.push(...n[o]);return Kh[i]=r,r}const ka=my;class vy extends Ef{constructor(t,e,n,r,o,s,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=r,this.viewRotation_=o,this.squaredTolerance_=s,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Ye()}drawImages_(t,e,n,r){if(!this.image_)return;const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_,a=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(let u=0,d=o.length;u<d;u+=2){const c=o[u]-this.imageAnchorX_,f=o[u+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=c+this.imageAnchorX_,m=f+this.imageAnchorY_;Mi(a,g,m,1,1,h,-g,-m),s.setTransform.apply(s,a),s.translate(g,m),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}drawText_(t,e,n,r){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const o=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_),s=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<n;e+=r){const l=o[e]+this.textOffsetX_,h=o[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(s.translate(l-this.textOffsetX_,h-this.textOffsetY_),s.rotate(a),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&s.strokeText(this.text_,l,h),this.textFillState_&&s.fillText(this.text_,l,h))}}moveToLineTo_(t,e,n,r,o){const s=this.context_,a=Ji(t,e,n,r,this.transform_,this.pixelCoordinates_);s.moveTo(a[0],a[1]);let l=a.length;o&&(l-=2);for(let h=2;h<l;h+=2)s.lineTo(a[h],a[h+1]);return o&&s.closePath(),n}drawRings_(t,e,n,r){for(let o=0,s=n.length;o<s;++o)e=this.moveToLineTo_(t,e,n[o],r,!0);return e}drawCircle(t){if(!!Kt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Iv(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],r=e[3]-e[1],o=Math.sqrt(n*n+r*r),s=this.context_;s.beginPath(),s.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);!n||!Kt(this.extent_,n.getExtent())||(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,r=e.length;n<r;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(!!Kt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=t.getFlatCoordinates();let o=0;const s=t.getEnds(),a=t.getStride();n.beginPath();for(let l=0,h=s.length;l<h;++l)o=this.moveToLineTo_(r,o,s[l],a,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Kt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let r=0;const o=t.getEndss(),s=t.getStride();e.beginPath();for(let a=0,l=o.length;a<l;++a){const h=o[a];r=this.drawRings_(n,r,h,s)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),Vi(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,r=t.textAlign?t.textAlign:To;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=r&&(n.textAlign=r,e.textAlign=r),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:di(n||Ei)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),r=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=o||Mo;this.strokeState_={lineCap:r!==void 0?r:Zs,lineDash:this.pixelRatio_===1?u:u.map(d=>d*this.pixelRatio_),lineDashOffset:(s||Eo)*this.pixelRatio_,lineJoin:a!==void 0?a:Sr,lineWidth:(l!==void 0?l:zo)*this.pixelRatio_,miterLimit:h!==void 0?h:Co,strokeStyle:di(n||So)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),r=t.getAnchor(),o=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*n,this.imageAnchorY_=r[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=o[0],this.imageOriginY_=o[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/n,s[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:di(f||Ei)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),g=n.getLineCap(),m=n.getLineDash(),p=n.getLineDashOffset(),_=n.getLineJoin(),v=n.getWidth(),y=n.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:Zs,lineDash:m||Mo,lineDashOffset:p||Eo,lineJoin:_!==void 0?_:Sr,lineWidth:v!==void 0?v:zo,miterLimit:y!==void 0?y:Co,strokeStyle:di(f||So)}}const r=t.getFont(),o=t.getOffsetX(),s=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),c=t.getTextBaseline();this.textState_={font:r!==void 0?r:wc,textAlign:d!==void 0?d:To,textBaseline:c!==void 0?c:Hs},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,g,m)=>f+=m%2?" ":g,""):u:"",this.textOffsetX_=o!==void 0?this.pixelRatio_*o:0,this.textOffsetY_=s!==void 0?this.pixelRatio_*s:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const _y=vy,je=.5;function If(i,t,e,n,r,o,s){const a=i[0]*je,l=i[1]*je,h=Pe(a,l);h.imageSmoothingEnabled=!1;const u=h.canvas,d=new _y(h,je,r,null,s),c=e.length,f=Math.floor((256*256*256-1)/c),g={};for(let p=1;p<=c;++p){const _=e[p-1],v=_.getStyleFunction()||n;if(!n)continue;let y=v(_,o);if(!y)continue;Array.isArray(y)||(y=[y]);const x=p*f,k="#"+("000000"+x.toString(16)).slice(-6);for(let w=0,C=y.length;w<C;++w){const M=y[w],S=M.getGeometryFunction()(_);if(!S||!Kt(r,S.getExtent()))continue;const R=M.clone(),A=R.getFill();A&&A.setColor(k);const G=R.getStroke();G&&(G.setColor(k),G.setLineDash(null)),R.setText(void 0);const P=M.getImage();if(P&&P.getOpacity()!==0){const U=P.getImageSize();if(!U)continue;const O=Pe(U[0],U[1],void 0,{alpha:!1}),W=O.canvas;O.fillStyle=k,O.fillRect(0,0,W.width,W.height),R.setImage(new ga({img:W,imgSize:U,anchor:P.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:P.getOrigin(),opacity:1,size:P.getSize(),scale:P.getScale(),rotation:P.getRotation(),rotateWithView:P.getRotateWithView()}))}const at=R.getZIndex()||0;let j=g[at];j||(j={},g[at]=j,j.Polygon=[],j.Circle=[],j.LineString=[],j.Point=[]),j[S.getType().replace("Multi","")].push(S,R)}}const m=Object.keys(g).map(Number).sort(An);for(let p=0,_=m.length;p<_;++p){const v=g[m[p]];for(const y in v){const x=v[y];for(let k=0,w=x.length;k<w;k+=2){d.setStyle(x[k+1]);for(let C=0,M=t.length;C<M;++C)d.setTransform(t[C]),d.drawGeometry(x[k])}}}return h.getImageData(0,0,u.width,u.height)}function Pf(i,t,e){const n=[];if(e){const r=Math.floor(Math.round(i[0])*je),o=Math.floor(Math.round(i[1])*je),s=(Wt(r,0,e.width-1)+Wt(o,0,e.height-1)*e.width)*4,a=e.data[s],l=e.data[s+1],u=e.data[s+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/t.length);u&&u%d===0&&n.push(t[u/d-1])}return n}const yy=.5,Af={Point:Sy,LineString:My,Polygon:zy,MultiPoint:Ty,MultiLineString:Ey,MultiPolygon:Cy,GeometryCollection:wy,Circle:by};function xy(i,t){return parseInt(K(i),10)-parseInt(K(t),10)}function Df(i,t){const e=Zh(i,t);return e*e}function Zh(i,t){return yy*i/t}function by(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(o,s),l.drawCircle(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function wa(i,t,e,n,r,o,s){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==Qt.LOADED||h==Qt.ERROR?l.unlistenImageChange(r):(h==Qt.IDLE&&l.load(),l.listenImageChange(r),a=!0)}return ky(i,t,e,n,o,s),a}function ky(i,t,e,n,r,o){const s=e.getGeometryFunction()(t);if(!s)return;const a=s.simplifyTransformed(n,r);if(e.getRenderer())Lf(i,a,e,t);else{const h=Af[a.getType()];h(i,a,e,t,o)}}function Lf(i,t,e,n){if(t.getType()=="GeometryCollection"){const o=t.getGeometries();for(let s=0,a=o.length;s<a;++s)Lf(i,o[s],e,n);return}i.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function wy(i,t,e,n,r){const o=t.getGeometriesArray();let s,a;for(s=0,a=o.length;s<a;++s){const l=Af[o[s].getType()];l(i,o[s],e,n,r)}}function My(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Ey(i,t,e,n,r){const o=e.getStroke();if(o){const a=i.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,o),a.drawMultiLineString(t,n)}const s=e.getText();if(s&&s.getText()){const a=(r||i).getBuilder(e.getZIndex(),"Text");a.setTextStyle(s),a.drawText(t,n)}}function Cy(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(s||o){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawMultiPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}function Sy(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function Ty(i,t,e,n,r){const o=e.getImage(),s=e.getText();let a;if(o){if(o.getImageState()!=Qt.LOADED)return;let l=i;if(r){const u=o.getDeclutterMode();if(u!=="none")if(l=r,u==="obstacle"){const d=i.getBuilder(e.getZIndex(),"Image");d.setImageStyle(o,a),d.drawMultiPoint(t,n)}else s&&s.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(o,a),h.drawMultiPoint(t,n)}if(s&&s.getText()){let l=i;r&&(l=r);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(s,a),h.drawText(t,n)}}function zy(i,t,e,n,r){const o=e.getFill(),s=e.getStroke();if(o||s){const l=i.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(o,s),l.drawPolygon(t,n)}const a=e.getText();if(a&&a.getText()){const l=(r||i).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,n)}}class Ry extends Tf{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Ge(),this.wrappedRenderedExtent_=Ge(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,n){const r=e.extent,o=e.viewState,s=o.center,a=o.resolution,l=o.projection,h=o.rotation,u=l.getExtent(),d=this.getLayer().getSource(),c=e.pixelRatio,f=e.viewHints,g=!(f[Yt.ANIMATING]||f[Yt.INTERACTING]),m=this.compositionContext_,p=Math.round(e.size[0]*c),_=Math.round(e.size[1]*c),v=d.getWrapX()&&l.canWrapX(),y=v?Nt(u):null,x=v?Math.ceil((r[2]-u[2])/y)+1:1;let k=v?Math.floor((r[0]-u[0])/y):0;do{const w=this.getRenderTransform(s,a,h,c,p,_,k*y);t.execute(m,1,w,h,g,void 0,n)}while(++k<x)}setupCompositionContext_(){if(this.opacity_!==1){const t=Pe(this.context.canvas.width,this.context.canvas.height,Sf);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,kl(this.compositionContext_),Sf.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];X0(this.pixelTransform,1/n,1/n),Wl(this.inversePixelTransform,this.pixelTransform);const o=_c(this.pixelTransform);this.useContainer(e,o,this.getBackground(t));const s=this.context,a=s.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const u=Math.round(t.size[0]*n),d=Math.round(t.size[1]*n);a.width!=u||a.height!=d?(a.width=u,a.height=d,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||s.clearRect(0,0,u,d),this.preRender(s,t);const c=t.viewState;c.projection,this.opacity_=r.opacity,this.setupCompositionContext_();let f=!1,g=!0;if(r.extent&&this.clipping){const m=Zi(r.extent);g=Kt(m,t.extent),f=g&&!Bn(m,t.extent),f&&this.clipUnrotated(this.compositionContext_,t,m)}return g&&this.renderWorlds(l,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Jt(this.pixelTransform,n);const r=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],d=n[0]*je,c=n[1]*je;u.push(this.getRenderTransform(r,o,s,je,d,c,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Bn(g,l)){let m=l[0];const p=Nt(g);let _=0,v;for(;m<g[0];)--_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m+=p;for(_=0,m=l[2];m>g[2];)++_,v=p*_,u.push(this.getRenderTransform(r,o,s,je,d,c,v).slice()),m-=p}this.hitDetectionImageData_=If(n,u,this.renderedFeatures_,h.getStyleFunction(),l,o,s)}e(Pf(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,n,r,o){if(!this.replayGroup_)return;const s=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},u=function(f,g,m){const p=K(f),_=h[p];if(_){if(_!==!0&&m<_.distanceSq){if(m===0)return h[p]=!0,o.splice(o.lastIndexOf(_),1),r(f,l,g);_.geometry=g,_.distanceSq=m}}else{if(m===0)return h[p]=!0,r(f,l,g);o.push(h[p]={feature:f,layer:l,geometry:g,distanceSq:m,callback:r})}};let d;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some(f=>d=f.forEachFeatureAtCoordinate(t,s,a,n,u,f===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(g=>g.value):null)),d}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const r=t.viewHints[Yt.ANIMATING],o=t.viewHints[Yt.INTERACTING],s=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!s&&r||!a&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,u=h.projection,d=h.resolution,c=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let m=e.getRenderOrder();m===void 0&&(m=xy);const p=h.center.slice(),_=ui(l,g*d),v=_.slice(),y=[_.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!Bn(x,t.extent)){const j=Nt(x),U=Math.max(Nt(_)/2,j);_[0]=x[0]-U,_[2]=x[2]+U,Nl(p,u);const O=rc(y[0],u);O[0]<x[0]&&O[2]<x[2]?y.push([O[0]+j,O[1],O[2]+j,O[3]]):O[0]>x[0]&&O[2]>x[2]&&y.push([O[0]-j,O[1],O[2]-j,O[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&Bn(this.wrappedRenderedExtent_,_))return Vi(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const k=new ba(Zh(d,c),_,d,c);let w;this.getLayer().getDeclutter()&&(w=new ba(Zh(d,c),_,d,c));let C;for(let j=0,U=y.length;j<U;++j)n.loadFeatures(y[j],d,u);const M=Df(d,c);let S=!0;const R=function(j){let U;const O=j.getStyleFunction()||e.getStyleFunction();if(O&&(U=O(j,d)),U){const W=this.renderFeature(j,M,U,k,C,w);S=S&&!W}}.bind(this),A=ql(_),G=n.getFeaturesInExtent(A);m&&G.sort(m);for(let j=0,U=G.length;j<U;++j)R(G[j]);this.renderedFeatures_=G,this.ready=S;const P=k.finish(),at=new ka(_,d,c,n.getOverlaps(),P,e.getRenderBuffer());return w&&(this.declutterExecutorGroup=new ka(_,d,c,n.getOverlaps(),w.finish(),e.getRenderBuffer())),this.renderedResolution_=d,this.renderedRevision_=f,this.renderedRenderOrder_=m,this.renderedExtent_=v,this.wrappedRenderedExtent_=_,this.renderedCenter_=p,this.renderedProjection_=u,this.replayGroup_=at,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,r,o,s){if(!n)return!1;let a=!1;if(Array.isArray(n))for(let l=0,h=n.length;l<h;++l)a=wa(r,t,n[l],e,this.boundHandleStyleImageChange_,o,s)||a;else a=wa(r,t,n,e,this.boundHandleStyleImageChange_,o,s);return a}}const Iy=Ry;class Py extends wf{constructor(t){super(t)}createRenderer(){return new Iy(this)}}const Qn=Py;class Ay{constructor(t){this.rbush_=new yf(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[K(e)]=n}load(t,e){const n=new Array(e.length);for(let r=0,o=e.length;r<o;r++){const s=t[r],a=e[r],l={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};n[r]=l,this.items_[K(a)]=l}this.rbush_.load(n)}remove(t){const e=K(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[K(e)],r=[n.minX,n.minY,n.maxX,n.maxY];Er(r,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(r){return r.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let r=0,o=t.length;r<o;r++)if(n=e(t[r]),n)return n;return n}isEmpty(){return Fn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ti(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const Ma=Ay;class Dy extends hi{constructor(t){super(),this.projection=Gt(t.projection),this.attributions_=Ff(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,r){e.viewResolver=n,e.viewRejector=r})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return et()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Ff(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Ff(i){return i?Array.isArray(i)?function(t){return i}:typeof i=="function"?i:function(t){return[i]}:null}const Of=Dy,we={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Ly(i,t){return[[-1/0,-1/0,1/0,1/0]]}let Fy=!1;function Nf(i,t,e,n,r,o,s){const a=new XMLHttpRequest;a.open("GET",typeof i=="function"?i(e,n,r):i,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=Fy,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let u;h=="json"||h=="text"?u=a.responseText:h=="xml"?(u=a.responseXML,u||(u=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(u=a.response),u?o(t.readFeatures(u,{extent:e,featureProjection:r}),t.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function Gf(i,t){return function(e,n,r,o,s){const a=this;Nf(i,t,e,n,r,function(l,h){a.addFeatures(l),o!==void 0&&o(l)},s||Ln)}}class ln extends Qe{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class Oy extends Of{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ln,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(ft(this.format_,7),this.loader_=Gf(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Ly;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Ma:null,this.loadedExtentsRtree_=new Ma,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,r;Array.isArray(t.features)?r=t.features:t.features&&(n=t.features,r=n.getArray()),!e&&n===void 0&&(n=new We(r)),r!==void 0&&this.addFeaturesInternal(r),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=K(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new ln(we.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[gt(e,tt.CHANGE,this.handleFeatureChange_,this),gt(e,_r.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let n=!0;const r=e.getId();return r!==void 0&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(ft(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],r=[];for(let o=0,s=t.length;o<s;o++){const a=t[o],l=K(a);this.addToIndex_(l,a)&&n.push(a)}for(let o=0,s=n.length;o<s;o++){const a=n[o],l=K(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const u=h.getExtent();e.push(u),r.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,r),this.hasListener(we.ADDFEATURE))for(let o=0,s=n.length;o<s;o++)this.dispatchEvent(new ln(we.ADDFEATURE,n[o]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(we.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(we.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(re.ADD,function(n){e||(e=!0,this.addFeature(n.element),e=!1)}.bind(this)),t.addEventListener(re.REMOVE,function(n){e||(e=!0,this.removeFeature(n.element),e=!1)}.bind(this)),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Ot);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=function(r){this.removeFeatureInternal(r)}.bind(this);this.featuresRtree_.forEach(n);for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new ln(we.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(r){if(r.getGeometry().intersectsCoordinate(t))return e(r)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){if(n.getGeometry().intersectsExtent(t)){const o=e(n);if(o)return o}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Fn(this.nullGeometryFeatures_)||li(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const r=I0(t,e);return[].concat(...r.map(o=>this.featuresRtree_.getInExtent(o)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],r=t[1];let o=null;const s=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Dn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const u=h.getGeometry(),d=a;if(a=u.closestPointXY(n,r,s,a),a<d){o=h;const c=Math.sqrt(a);l[0]=n-c,l[1]=r-c,l[2]=n+c,l[3]=r+c}}}),o}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=K(e),r=e.getGeometry();if(!r)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const s=r.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(s,e)):this.featuresRtree_&&this.featuresRtree_.update(s,e)}const o=e.getId();if(o!==void 0){const s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new ln(we.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:K(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Fn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const r=this.loadedExtentsRtree_,o=this.strategy_(t,e,n);for(let s=0,a=o.length;s<a;++s){const l=o[s];r.forEachInExtent(l,function(u){return Bn(u.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADSTART)),this.loader_.call(this,l,e,n,function(u){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADEND,void 0,u))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new ln(we.FEATURESLOADERROR))}.bind(this)),r.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(r){if(Er(r.extent,t))return n=r,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=K(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=K(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Ot),delete this.featureChangeKeys_[e];const r=t.getId();return r!==void 0&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new ln(we.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){ft(this.format_,7),this.url_=t,this.setLoader(Gf(t,this.format_))}}const hn=Oy;class Ny extends Is{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(tt.CHANGE)}release(){this.state===N.ERROR&&this.setState(N.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==N.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==N.LOADED){t.interimTile=null;break}else t.getState()==N.LOADING?e=t:t.getState()==N.IDLE?e.interimTile=t.interimTile:e=t;t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==N.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){et()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const r=e-n+1e3/60;return r>=this.transition_?1:Rc(r/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Ea=Ny;class Gy extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.crossOrigin_=r,this.src_=n,this.key=n,this.image_=new Image,r!==null&&(this.image_.crossOrigin=r),this.unlisten_=null,this.tileLoadFunction_=o}getImage(){return this.image_}setImage(t){this.image_=t,this.state=N.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=N.ERROR,this.unlistenImage_(),this.image_=jy(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=N.LOADED:this.state=N.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==N.ERROR&&(this.state=N.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==N.IDLE&&(this.state=N.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=hf(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function jy(){const i=Pe(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}const jf=Gy;class By{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return ft(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return ft(e!==void 0,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(!!this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){ft(!(t in this.entries_),16);const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const Uy=By;function Bf(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function Nr(i,t,e){return i+"/"+t+"/"+e}function Uf(i){return Nr(i[0],i[1],i[2])}function Vy(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return Nr(t,e,n)}function Vf(i){return i.split("/").map(Number)}function qy(i){return(i[1]<<i[0])+i[2]}function Xy(i,t){const e=i[0],n=i[1],r=i[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const o=t.getFullTileRange(e);return o?o.containsXY(n,r):!0}class $y extends Uy{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=Vf(t)[0];this.forEach(function(r){r.tileCoord[0]!==n&&(this.remove(Uf(r.tileCoord)),r.release())}.bind(this))}}const Hh=$y;class qf{constructor(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Gr(i,t,e,n,r){return r!==void 0?(r.minX=i,r.maxX=t,r.minY=e,r.maxY=n,r):new qf(i,t,e,n)}const Xf=qf,$f=[];class Wy extends Ea{constructor(t,e,n,r){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=K(t);return e in this.context_||(this.context_[e]=Pe(1,1,$f)),this.context_[e]}hasContext(t){return K(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=K(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];kl(e),$f.push(e.canvas),delete this.context_[t]}super.release()}}const Yy=Wy;class Ky extends Ea{constructor(t,e,n,r,o,s){super(t,e,s),this.extent=null,this.format_=r,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=o,this.url_=n,this.key=n}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==N.IDLE&&(this.setState(N.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(N.ERROR)}setFeatures(t){this.features_=t,this.setState(N.LOADED)}setLoader(t){this.loader_=t}}const Zy=Ky,Ca={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Sa extends Qe{constructor(t,e){super(t),this.feature=e}}class Hy extends nn{constructor(t){const e=t;e.stopDown||(e.stopDown=yr),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=Qy(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:Dn,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let n=t.geometryFunction;if(!n){const r=this.mode_;if(r==="Circle")n=function(o,s,a){const l=s||new B_([NaN,NaN]),h=Vt(o[0]),u=wi(h,Vt(o[o.length-1]));return l.setCenterAndRadius(h,Math.sqrt(u),this.geometryLayout_),l};else{let o;r==="Point"?o=ni:r==="LineString"?o=Kn:r==="Polygon"&&(o=Wn),n=function(s,a,l){return a?r==="Polygon"?s[0].length?a.setCoordinates([s[0].concat([s[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(s,this.geometryLayout_):a=new o(s,this.geometryLayout_),a}}}this.geometryFunction_=n,this.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Jy(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:wh,this.freehandCondition_,t.freehand?this.freehandCondition_=kh:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Zc,this.addChangeListener(_h.ACTIVE,this.updateState_)}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===tt.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(t);let e=t.type===Mt.POINTERMOVE,n=!0;return!this.freehand_&&this.lastDragTime_&&t.type===Mt.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===Mt.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),n=!1):this.freehand_&&t.type===Mt.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=t.type===Mt.POINTERMOVE,n&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===Mt.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===Mt.DBLCLICK&&(n=!1),super.handleEvent(t)&&n}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Si(Mt.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}handleUpEvent(t){let e=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():!this.freehand_&&(!n||this.mode_==="Point")&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,n=t.pixel,r=e[0]-n[0],o=e[1]-n[1],s=r*r+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t){let e=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")e=!0;else if(o==="Circle")e=this.sketchCoords_.length===2;else if(o==="LineString")n=this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const s=this.sketchCoords_;n=s[0].length>this.minPoints_,r=[s[0][0],s[0][s[0].length-2]]}if(n){const s=this.getMap();for(let a=0,l=r.length;a<l;a++){const h=r[a],u=s.getPixelFromCoordinate(h),d=t[0]-u[0],c=t[1]-u[1],f=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(d*d+c*c)<=f,e){this.finishCoordinate_=h;break}}}}return e}createOrUpdateSketchPoint_(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new Ti(new ni(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new Ti);const e=t.getLinearRing(0);let n=this.sketchLine_.getGeometry();n?(n.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),n.changed()):(n=new Kn(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(n))}startDrawing_(t){const e=this.getMap().getView().getProjection(),n=ea(this.geometryLayout_);for(;t.length<n;)t.push(0);this.finishCoordinate_=t,this.mode_==="Point"?this.sketchCoords_=t.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Ti(new Kn(this.sketchLineCoords_)));const r=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new Ti,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new Sa(Ca.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),n=this.sketchFeature_.getGeometry(),r=e.getView().getProjection(),o=ea(this.geometryLayout_);let s,a;for(;t.length<o;)t.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(s=this.sketchCoords_[0],a=s[s.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(s=this.sketchCoords_,a=s[s.length-1]),a[0]=t[0],a[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,r),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),n.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection();let r,o;const s=this.mode_;s==="LineString"||s==="Circle"?(this.finishCoordinate_=t.slice(),o=this.sketchCoords_,o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),this.geometryFunction_(o,e,n)):s==="Polygon"&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():r=!0),o.push(t.slice()),r&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,e,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),r&&this.finishDrawing()}removeLastPoint(){if(!this.sketchFeature_)return;const t=this.sketchFeature_.getGeometry(),e=this.getMap().getView().getProjection();let n;const r=this.mode_;if(r==="LineString"||r==="Circle"){if(n=this.sketchCoords_,n.splice(-2,1),n.length>=2){this.finishCoordinate_=n[n.length-2].slice();const o=this.finishCoordinate_.slice();n[n.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(n,t,e),t.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(r==="Polygon"){n=this.sketchCoords_[0],n.splice(-2,1);const o=this.sketchLine_.getGeometry();if(n.length>=2){const s=n[n.length-2].slice();n[n.length-1]=s,this.createOrUpdateSketchPoint_(s)}o.setCoordinates(n),this.geometryFunction_(this.sketchCoords_,t,e)}n.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const n=t.getGeometry(),r=this.getMap().getView().getProjection();this.mode_==="LineString"?(e.pop(),this.geometryFunction_(e,n,r)):this.mode_==="Polygon"&&(e[0].pop(),this.geometryFunction_(e,n,r),e=n.getCoordinates()),this.type_==="MultiPoint"?t.setGeometry(new Ao([e])):this.type_==="MultiLineString"?t.setGeometry(new Th([e])):this.type_==="MultiPolygon"&&t.setGeometry(new Rh([e])),this.dispatchEvent(new Sa(Ca.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new Sa(Ca.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,n=!this.sketchFeature_;n&&this.startDrawing_(t[0]);let r;if(e==="LineString"||e==="Circle")r=this.sketchCoords_;else if(e==="Polygon")r=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;n&&r.shift(),r.pop();for(let s=0;s<t.length;s++)this.addToDrawing_(t[s]);const o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)}extend(t){const n=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=n.getCoordinates();const r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.sketchPoint_=new Ti(new ni(r)),this.updateSketchFeatures_(),this.dispatchEvent(new Sa(Ca.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();(!t||!e)&&this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function Jy(){const i=uf();return function(t,e){return i[t.getGeometry().getType()]}}function Qy(i){switch(i){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+i)}}const tx=Hy,Wf=0,qo=1,Yf=[0,0,0,0],jr=[],Jh={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class Qh extends Qe{constructor(t,e,n){super(t),this.features=e,this.mapBrowserEvent=n}}class ex extends nn{constructor(t){super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:Jc,this.defaultDeleteCondition_=function(n){return l_(n)&&d_(n)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:kh,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new Ma,this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new Qn({source:new hn({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:nx(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null;let e;if(t.features?e=t.features:t.source&&(this.source_=t.source,e=new We(this.source_.getFeatures()),this.source_.addEventListener(we.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(we.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(re.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(re.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=t.snapToPointer===void 0?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}const n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new We;const n=this.featuresBeingModified_.getArray();for(let r=0,o=e.length;r<o;++r){const s=e[r];for(let a=0,l=s.length;a<l;++a){const h=s[a].feature;h&&!n.includes(h)&&this.featuresBeingModified_.push(h)}}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new Qh(Jh.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(tt.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,n=[];e.forEach(function(r){t===r.feature&&n.push(r)});for(let r=n.length-1;r>=0;--r){const o=n[r];for(let s=this.dragSegments_.length-1;s>=0;--s)this.dragSegments_[s][0]===o&&this.dragSegments_.splice(s,1);e.remove(o)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const n=e.getCoordinates(),r={feature:t,geometry:e,segment:[n,n]};this.rBush_.insert(e.getExtent(),r)}writeMultiPointGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r],a={feature:t,geometry:e,depth:[r],index:r,segment:[s,s]};this.rBush_.insert(e.getExtent(),a)}}writeLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r){const s=n.slice(r,r+2),a={feature:t,geometry:e,index:r,segment:s};this.rBush_.insert(xe(s),a)}}writeMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writePolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a){const h=s.slice(a,a+2),u={feature:t,geometry:e,depth:[r],index:a,segment:h};this.rBush_.insert(xe(h),u)}}}writeMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u){const c=h.slice(u,u+2),f={feature:t,geometry:e,depth:[a,r],index:u,segment:c};this.rBush_.insert(xe(c),f)}}}}writeCircleGeometry_(t,e){const n=e.getCenter(),r={feature:t,geometry:e,index:Wf,segment:[n,n]},o={feature:t,geometry:e,index:qo,segment:[n,n]},s=[r,o];r.featureSegments=s,o.featureSegments=s,this.rBush_.insert(xo(n),r);let a=e;this.rBush_.insert(a.getExtent(),o)}writeGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=n[r],s=this.SEGMENT_WRITERS_[o.getType()];s(t,o)}}createOrUpdateVertexFeature_(t,e,n){let r=this.vertexFeature_;return r?r.getGeometry().setCoordinates(t):(r=new Ti(new ni(t)),this.vertexFeature_=r,this.overlay_.getSource().addFeature(r)),r.set("features",e),r.set("geometries",n),r}handleEvent(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;let e;return!t.map.getView().getInteracting()&&t.type==Mt.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=Mt.SINGLECLICK||!this.ignoreNextSingleClick_?e=this.removePoint():e=!0),t.type==Mt.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],n=[],r=[];for(let o=0,s=this.dragSegments_.length;o<s;++o){const a=this.dragSegments_[o],l=a[0],h=l.feature;n.includes(h)||n.push(h);const u=l.geometry;r.includes(u)||r.push(u);const d=l.depth;let c;const f=l.segment,g=a[1];for(;e.length<u.getStride();)e.push(f[g][e.length]);switch(u.getType()){case"Point":c=e,f[0]=e,f[1]=e;break;case"MultiPoint":c=u.getCoordinates(),c[l.index]=e,f[0]=e,f[1]=e;break;case"LineString":c=u.getCoordinates(),c[l.index+g]=e,f[g]=e;break;case"MultiLineString":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"Polygon":c=u.getCoordinates(),c[d[0]][l.index+g]=e,f[g]=e;break;case"MultiPolygon":c=u.getCoordinates(),c[d[1]][d[0]][l.index+g]=e,f[g]=e;break;case"Circle":if(f[0]=e,f[1]=e,l.index===Wf)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0,t.map.getView().getProjection();let m=oc(Vt(u.getCenter()),Vt(e));u.setRadius(m),this.changingFeature_=!1}break}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,n,r)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const n=this.vertexFeature_;if(n){t.map.getView().getProjection();const r=[],o=n.getGeometry().getCoordinates(),s=xe([o]),a=this.rBush_.getInExtent(s),l={};a.sort(ix);for(let h=0,u=a.length;h<u;++h){const d=a[h],c=d.segment;let f=K(d.geometry);const g=d.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),d.geometry.getType()==="Circle"&&d.index===qo){const m=Zf(e,d);ei(m,o)&&!l[f][0]&&(this.dragSegments_.push([d,0]),l[f][0]=d);continue}if(ei(c[0],o)&&!l[f][0]){this.dragSegments_.push([d,0]),l[f][0]=d;continue}if(ei(c[1],o)&&!l[f][1]){if(l[f][0]&&l[f][0].index===0){let m=d.geometry.getCoordinates();switch(d.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":m=m[g[1]];case"Polygon":if(d.index!==m[g[0]].length-2)continue;break}}this.dragSegments_.push([d,1]),l[f][1]=d;continue}K(c)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&r.push(d)}r.length&&this.willModifyFeatures_(t,[r]);for(let h=r.length-1;h>=0;--h)this.insertVertex_(r[h],o)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const n=this.dragSegments_[e][0],r=n.geometry;if(r.getType()==="Circle"){const o=r.getCenter(),s=n.featureSegments[0],a=n.featureSegments[1];s.segment[0]=o,s.segment[1]=o,a.segment[0]=o,a.segment[1]=o,this.rBush_.update(xo(o),s);let l=r;this.rBush_.update(l.getExtent(),a)}else this.rBush_.update(xe(n.segment),n)}return this.featuresBeingModified_&&(this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,n){const r=n||e.getCoordinateFromPixel(t);e.getView().getProjection();const o=function(l,h){return Kf(r,l)-Kf(r,h)};let s,a;if(this.hitDetection_){const l=typeof this.hitDetection_=="object"?h=>h===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,(h,u,d)=>{if(d=d||h.getGeometry(),d.getType()==="Point"&&this.features_.getArray().includes(h)){a=d;const c=d.getFlatCoordinates().slice(0,2);s=[{feature:h,geometry:d,segment:[c,c]}]}return!0},{layerFilter:l})}if(!s){const l=Zi(xo(r,Yf)),h=e.getView().getResolution()*this.pixelTolerance_,u=ql(ui(l,h,Yf));s=this.rBush_.getInExtent(u)}if(s&&s.length>0){const l=s.sort(o)[0],h=l.segment;let u=Zf(r,l);const d=e.getPixelFromCoordinate(u);let c=oc(t,d);if(a||c<=this.pixelTolerance_){const f={};if(f[K(h)]=!0,this.snapToPointer_||(this.delta_[0]=u[0]-r[0],this.delta_[1]=u[1]-r[1]),l.geometry.getType()==="Circle"&&l.index===qo)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);else{const g=e.getPixelFromCoordinate(h[0]),m=e.getPixelFromCoordinate(h[1]),p=wi(d,g),_=wi(d,m);c=Math.sqrt(Math.min(p,_)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(u=p>_?h[1]:h[0]),this.createOrUpdateVertexFeature_(u,[l.feature],[l.geometry]);const v={};v[K(l.geometry)]=!0;for(let y=1,x=s.length;y<x;++y){const k=s[y].segment;if(ei(h[0],k[0])&&ei(h[1],k[1])||ei(h[0],k[1])&&ei(h[1],k[0])){const w=K(s[y].geometry);w in v||(v[w]=!0,f[K(k)]=!0)}else break}}this.vertexSegments_=f;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const n=t.segment,r=t.feature,o=t.geometry,s=t.depth,a=t.index;let l;for(;e.length<o.getStride();)e.push(0);switch(o.getType()){case"MultiLineString":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"Polygon":l=o.getCoordinates(),l[s[0]].splice(a+1,0,e);break;case"MultiPolygon":l=o.getCoordinates(),l[s[1]][s[0]].splice(a+1,0,e);break;case"LineString":l=o.getCoordinates(),l.splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,l);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(o,a,s,1);const u={segment:[n[0],e],feature:r,geometry:o,depth:s,index:a};h.insert(xe(u.segment),u),this.dragSegments_.push([u,1]);const d={segment:[e,n[1]],feature:r,geometry:o,depth:s,index:a+1};h.insert(xe(d.segment),d),this.dragSegments_.push([d,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Mt.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Qh(Jh.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let n=!1,r,o,s,a,l,h,u,d,c,f,g;for(l=t.length-1;l>=0;--l)s=t[l],f=s[0],g=K(f.feature),f.depth&&(g+="-"+f.depth.join("-")),g in e||(e[g]={}),s[1]===0?(e[g].right=f,e[g].index=f.index):s[1]==1&&(e[g].left=f,e[g].index=f.index+1);for(g in e){switch(c=e[g].right,u=e[g].left,h=e[g].index,d=h-1,u!==void 0?f=u:f=c,d<0&&(d=0),a=f.geometry,o=a.getCoordinates(),r=o,n=!1,a.getType()){case"MultiLineString":o[f.depth[0]].length>2&&(o[f.depth[0]].splice(h,1),n=!0);break;case"LineString":o.length>2&&(o.splice(h,1),n=!0);break;case"MultiPolygon":r=r[f.depth[1]];case"Polygon":r=r[f.depth[0]],r.length>4&&(h==r.length-1&&(h=0),r.splice(h,1),n=!0,h===0&&(r.pop(),r.push(r[0]),d=r.length-1));break}if(n){this.setGeometryCoordinates_(a,o);const m=[];if(u!==void 0&&(this.rBush_.remove(u),m.push(u.segment[0])),c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[1])),u!==void 0&&c!==void 0){const p={depth:f.depth,feature:f.feature,geometry:f.geometry,index:d,segment:m};this.rBush_.insert(xe(p.segment),p)}this.updateSegmentIndices_(a,h,f.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return n}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,n,r){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(n===void 0||o.depth===void 0||Vi(o.depth,n))&&o.index>e&&(o.index+=r)})}}function ix(i,t){return i.index-t.index}function Kf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"){let o=n;if(t.index===qo){const s=wi(o.getCenter(),Vt(i)),a=Math.sqrt(s)-o.getRadius();return a*a}}const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),L0(r,jr)}function Zf(i,t,e){const n=t.geometry;if(n.getType()==="Circle"&&t.index===qo)return Cr(n.getClosestPoint(Vt(i)));const r=Vt(i);return jr[0]=Vt(t.segment[0]),jr[1]=Vt(t.segment[1]),Cr(Fl(r,jr))}function nx(){const i=uf();return function(t,e){return i.Point}}const rx=ex;function Hf(i){if(i.feature)return i.feature;if(i.element)return i.element}const tu=[];class ox extends nn{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=Dn),e.stopDown||(e.stopDown=yr),super(e),this.source_=t.source?t.source:null,this.vertex_=t.vertex!==void 0?t.vertex:!0,this.edge_=t.edge!==void 0?t.edge:!0,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,this.rBush_=new Ma,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=e!==void 0?e:!0;const n=K(t),r=t.getGeometry();if(r){const o=this.GEOMETRY_SEGMENTERS_[r.getType()];if(o){this.indexedFeaturesExtents_[n]=r.getExtent(Ge());const s=[];if(o(s,r),s.length===1)this.rBush_.insert(xe(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const a=s.map(h=>xe(h)),l=s.map(h=>({feature:t,segment:h}));this.rBush_.load(a,l)}}}e&&(this.featureChangeListenerKeys_[n]=gt(t,tt.CHANGE,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=Hf(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Hf(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const n=K(e);n in this.pendingFeatures_||(this.pendingFeatures_[n]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const n=e!==void 0?e:!0,r=K(t),o=this.indexedFeaturesExtents_[r];if(o){const s=this.rBush_,a=[];s.forEachInExtent(o,function(l){t===l.feature&&a.push(l)});for(let l=a.length-1;l>=0;--l)s.remove(a[l])}n&&(Ot(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])}setMap(t){const e=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();e&&(n.forEach(Ot),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?n.push(gt(this.features_,re.ADD,this.handleFeatureAdd_,this),gt(this.features_,re.REMOVE,this.handleFeatureRemove_,this)):this.source_&&n.push(gt(this.source_,we.ADDFEATURE,this.handleFeatureAdd_,this),gt(this.source_,we.REMOVEFEATURE,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,n){const r=n.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=n.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=xe([r,o]),a=this.rBush_.getInExtent(s),l=a.length;if(l===0)return null;n.getView().getProjection();const h=Vt(e);let u,d=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,f=()=>{if(u){const g=n.getPixelFromCoordinate(u);if(wi(t,g)<=c)return{vertex:u,vertexPixel:[Math.round(g[0]),Math.round(g[1])]}}return null};if(this.vertex_){for(let m=0;m<l;++m){const p=a[m];p.feature.getGeometry().getType()!=="Circle"&&p.segment.forEach(_=>{const v=Vt(_),y=wi(h,v);y<d&&(u=_,d=y)})}const g=f();if(g)return g}if(this.edge_){for(let m=0;m<l;++m){let p=null;const _=a[m];if(_.feature.getGeometry().getType()==="Circle"){let v=_.feature.getGeometry();p=Cr(A0(h,v))}else{const[v,y]=_.segment;y&&(tu[0]=Vt(v),tu[1]=Vt(y),p=Fl(h,tu))}if(p){const v=wi(h,p);v<d&&(u=p,d=v)}}const g=f();if(g)return g}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){this.getMap().getView().getProjection();const o=$v(e).getCoordinates()[0];for(let s=0,a=o.length-1;s<a;++s)t.push(o.slice(s,s+2))}segmentGeometryCollectionGeometry_(t,e){const n=e.getGeometriesArray();for(let r=0;r<n.length;++r){const o=this.GEOMETRY_SEGMENTERS_[n[r].getType()];o&&o(t,n[r])}}segmentLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length-1;r<o;++r)t.push(n.slice(r,r+2))}segmentMultiLineStringGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach(n=>{t.push([n])})}segmentMultiPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length;a<l;++a){const h=s[a];for(let u=0,d=h.length-1;u<d;++u)t.push(h.slice(u,u+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const n=e.getCoordinates();for(let r=0,o=n.length;r<o;++r){const s=n[r];for(let a=0,l=s.length-1;a<l;++a)t.push(s.slice(a,a+2))}}}const sx=ox,ax=.5,lx=10,Jf=.25;class hx{constructor(t,e,n,r,o,s){this.sourceProj_=t,this.targetProj_=e;let a={};const l=ko(this.targetProj_,this.sourceProj_);this.transformInv_=function(v){const y=v[0]+"/"+v[1];return a[y]||(a[y]=l(v)),a[y]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Nt(r)==Nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Nt(this.targetProj_.getExtent()):null;const h=Ki(n),u=Vs(n),d=Us(n),c=Bs(n),f=this.transformInv_(h),g=this.transformInv_(u),m=this.transformInv_(d),p=this.transformInv_(c),_=lx+(s?Math.max(0,Math.ceil(Math.log2(Pl(n)/(s*s*256*256)))):0);if(this.addQuad_(h,u,d,c,f,g,m,p,_),this.wrapsXInSource_){let v=1/0;this.triangles_.forEach(function(y,x,k){v=Math.min(v,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(function(y){if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-v>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-v>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-v>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-v>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const k=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-k<this.sourceWorldWidth_/2&&(y.source=x)}}.bind(this))}a={}}addTriangle_(t,e,n,r,o,s){this.triangles_.push({source:[r,o,s],target:[t,e,n]})}addQuad_(t,e,n,r,o,s,a,l,h){const u=xe([o,s,a,l]),d=this.sourceWorldWidth_?Nt(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&d>.5&&d<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const p=xe([t,e,n,r]);g=Nt(p)/this.targetWorldWidth_>Jf||g}!f&&this.sourceProj_.isGlobal()&&d&&(g=d>Jf||g)}if(!g&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Kt(u,this.maxSourceExtent_))return;let m=0;if(!g&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(m=(!isFinite(o[0])||!isFinite(o[1])?8:0)+(!isFinite(s[0])||!isFinite(s[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(h>0){if(!g){const p=[(t[0]+n[0])/2,(t[1]+n[1])/2],_=this.transformInv_(p);let v;f?v=($i(o[0],c)+$i(a[0],c))/2-$i(_[0],c):v=(o[0]+a[0])/2-_[0];const y=(o[1]+a[1])/2-_[1];g=v*v+y*y>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const p=[(e[0]+n[0])/2,(e[1]+n[1])/2],_=this.transformInv_(p),v=[(r[0]+t[0])/2,(r[1]+t[1])/2],y=this.transformInv_(v);this.addQuad_(t,e,p,v,o,s,_,y,h-1),this.addQuad_(v,p,n,r,y,_,a,l,h-1)}else{const p=[(t[0]+e[0])/2,(t[1]+e[1])/2],_=this.transformInv_(p),v=[(n[0]+r[0])/2,(n[1]+r[1])/2],y=this.transformInv_(v);this.addQuad_(t,p,v,r,o,_,y,l,h-1),this.addQuad_(p,e,n,v,_,s,a,y,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,n,r,o,a,l),(m&14)==0&&this.addTriangle_(t,n,e,o,a,s),m&&((m&13)==0&&this.addTriangle_(e,r,t,s,l,o),(m&7)==0&&this.addTriangle_(e,r,n,s,l,a))}calculateSourceExtent(){const t=Ge();return this.triangles_.forEach(function(e,n,r){const o=e.source;bo(t,o[0]),bo(t,o[1]),bo(t,o[2])}),t}getTriangles(){return this.triangles_}}const ux=hx;let eu;const Qf=[];function tg(i,t,e,n,r){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,r),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,r)),i.restore()}function iu(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function dx(){if(eu===void 0){const i=document.createElement("canvas").getContext("2d");i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",tg(i,4,5,4,0),tg(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;eu=iu(t,0)||iu(t,4)||iu(t,8)}return eu}function eg(i,t,e,n){const r=$s(e,t,i);let o=Xs(t,n,e);const s=t.getMetersPerUnit();s!==void 0&&(o*=s);const a=i.getMetersPerUnit();a!==void 0&&(o/=a);const l=i.getExtent();if(!l||js(l,r)){const h=Xs(i,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}function cx(i,t,e,n){const r=Yi(e);let o=eg(i,t,r,n);return(!isFinite(o)||o<=0)&&Il(e,function(s){return o=eg(i,t,s,n),isFinite(o)&&o>0}),o}function fx(i,t,e,n,r,o,s,a,l,h,u,d){const c=Pe(Math.round(e*i),Math.round(e*t),Qf);if(d||(c.imageSmoothingEnabled=!1),l.length===0)return c.canvas;c.scale(e,e);function f(x){return Math.round(x*e)/e}c.globalCompositeOperation="lighter";const g=Ge();l.forEach(function(x,k,w){ic(g,x.extent)});const m=Nt(g),p=$e(g),_=Pe(Math.round(e*m/n),Math.round(e*p/n));d||(_.imageSmoothingEnabled=!1);const v=e/n;l.forEach(function(x,k,w){const C=x.extent[0]-g[0],M=-(x.extent[3]-g[3]),S=Nt(x.extent),R=$e(x.extent);x.image.width>0&&x.image.height>0&&_.drawImage(x.image,h,h,x.image.width-2*h,x.image.height-2*h,C*v,M*v,S*v,R*v)});const y=Ki(s);return a.getTriangles().forEach(function(x,k,w){const C=x.source,M=x.target;let S=C[0][0],R=C[0][1],A=C[1][0],G=C[1][1],P=C[2][0],at=C[2][1];const j=f((M[0][0]-y[0])/o),U=f(-(M[0][1]-y[1])/o),O=f((M[1][0]-y[0])/o),W=f(-(M[1][1]-y[1])/o),D=f((M[2][0]-y[0])/o),Z=f(-(M[2][1]-y[1])/o),V=S,z=R;S=0,R=0,A-=V,G-=z,P-=V,at-=z;const ot=[[A,G,0,0,O-j],[P,at,0,0,D-j],[0,0,A,G,W-U],[0,0,P,at,Z-U]],b=d0(ot);if(!!b){if(c.save(),c.beginPath(),dx()||!d){c.moveTo(O,W);const T=4,Y=j-O,E=U-W;for(let H=0;H<T;H++)c.lineTo(O+f((H+1)*Y/T),W+f(H*E/(T-1))),H!=T-1&&c.lineTo(O+f((H+1)*Y/T),W+f((H+1)*E/(T-1)));c.lineTo(D,Z)}else c.moveTo(O,W),c.lineTo(j,U),c.lineTo(D,Z);c.clip(),c.transform(b[0],b[2],b[1],b[3],j,U),c.translate(g[0]-V,g[3]-z),c.scale(n/e,-n/e),c.drawImage(_.canvas,0,0),c.restore()}}),u&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach(function(x,k,w){const C=x.target,M=(C[0][0]-y[0])/o,S=-(C[0][1]-y[1])/o,R=(C[1][0]-y[0])/o,A=-(C[1][1]-y[1])/o,G=(C[2][0]-y[0])/o,P=-(C[2][1]-y[1])/o;c.beginPath(),c.moveTo(R,A),c.lineTo(M,S),c.lineTo(G,P),c.closePath(),c.stroke()}),c.restore()),c.canvas}class gx extends Ea{constructor(t,e,n,r,o,s,a,l,h,u,d,c){super(o,N.IDLE,{interpolate:!!c}),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=s||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=r.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const p=g?Un(f,g):f;if(Pl(p)===0){this.state=N.EMPTY;return}const _=t.getExtent();_&&(m?m=Un(m,_):m=_);const v=r.getResolution(this.wrappedTileCoord_[0]),y=cx(t,n,p,v);if(!isFinite(y)||y<=0){this.state=N.EMPTY;return}const x=u!==void 0?u:ax;if(this.triangulation_=new ux(t,n,p,m,y*x,v),this.triangulation_.getTriangles().length===0){this.state=N.EMPTY;return}this.sourceZ_=e.getZForResolution(y);let k=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(k[1]=Wt(k[1],m[1],m[3]),k[3]=Wt(k[3],m[1],m[3])):k=Un(k,m)),!Pl(k))this.state=N.EMPTY;else{const w=e.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let C=w.minX;C<=w.maxX;C++)for(let M=w.minY;M<=w.maxY;M++){const S=h(this.sourceZ_,C,M,a);S&&this.sourceTiles_.push(S)}this.sourceTiles_.length===0&&(this.state=N.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,n,r){e&&e.getState()==N.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=N.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),r=typeof n=="number"?n:n[0],o=typeof n=="number"?n:n[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=fx(r,o,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=N.LOADED}this.changed()}load(){if(this.state==N.IDLE){this.state=N.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,r){const o=e.getState();if(o==N.IDLE||o==N.LOADING){t++;const s=gt(e,tt.CHANGE,function(a){const l=e.getState();(l==N.LOADED||l==N.ERROR||l==N.EMPTY)&&(Ot(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,r){e.getState()==N.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ot),this.sourcesListenerKeys_=null}release(){this.canvas_&&(kl(this.canvas_.getContext("2d")),Qf.push(this.canvas_),this.canvas_=null),super.release()}}const ig=gx;class mx extends Tf{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Ge(),this.tmpTileRange_=new Xf(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),r=e.getUseInterimTilesOnError();return n==N.LOADED||n==N.EMPTY||n==N.ERROR&&!r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,n,o,s);return h.getState()==N.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),r=Jt(e.pixelToCoordinateTransform,t.slice()),o=n.getExtent();if(o&&!js(o,r))return null;const s=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),u=h.getTileGridForProjection(l.projection),d=h.getTilePixelRatio(e.pixelRatio);for(let c=u.getZForResolution(l.resolution);c>=u.getMinZoom();--c){const f=u.getTileCoordForCoordAndZ(r,c),g=h.getTile(c,f[1],f[2],s,a);if(!(g instanceof jf||g instanceof ig))return null;if(g.getState()!==N.LOADED)continue;const m=u.getOrigin(c),p=be(u.getTileSize(c)),_=u.getResolution(c),v=Math.floor(d*((r[0]-m[0])/_-f[1]*p[0])),y=Math.floor(d*((m[1]-r[1])/_-f[2]*p[1])),x=Math.round(d*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),v+x,y+x)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),d=u.getSource(),c=d.getRevision(),f=d.getTileGridForProjection(o),g=f.getZForResolution(s,d.zDirection),m=f.getResolution(g);let p=t.extent;const _=t.viewState.resolution,v=d.getTilePixelRatio(h),y=Math.round(Nt(p)/_*h),x=Math.round($e(p)/_*h),k=n.extent&&Zi(n.extent);k&&(p=Un(p,Zi(n.extent)));const w=m*y/2/v,C=m*x/2/v,M=[a[0]-w,a[1]-C,a[0]+w,a[1]+C],S=f.getTileRangeForExtentAndZ(p,g),R={};R[g]={};const A=this.createLoadedTileFinder(d,o,R),G=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;const at=l?Dl(r.center,_,l,t.size):void 0;for(let ot=S.minX;ot<=S.maxX;++ot)for(let b=S.minY;b<=S.maxY;++b){if(l&&!f.tileCoordIntersectsViewport([g,ot,b],at))continue;const T=this.getTile(g,ot,b,t);if(this.isDrawableTile(T)){const H=K(this);if(T.getState()==N.LOADED){R[g][T.tileCoord.toString()]=T;let $=T.inTransition(H);$&&n.opacity!==1&&(T.endTransition(H),$=!1),!this.newTiles_&&($||!this.renderedTiles.includes(T))&&(this.newTiles_=!0)}if(T.getAlpha(H,t.time)===1)continue}const Y=f.getTileCoordChildTileRange(T.tileCoord,P,G);let E=!1;Y&&(E=A(g+1,Y)),E||f.forEachTileCoordParentTileRange(T.tileCoord,A,P,G)}const j=m/s*h/v;Mi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-y/2,-x/2);const U=_c(this.pixelTransform);this.useContainer(e,U,this.getBackground(t));const O=this.context,W=O.canvas;Wl(this.inversePixelTransform,this.pixelTransform),Mi(this.tempTransform,y/2,x/2,j,j,0,-y/2,-x/2),W.width!=y||W.height!=x?(W.width=y,W.height=x):this.containerReused||O.clearRect(0,0,y,x),k&&this.clipUnrotated(O,t,k),d.getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,t),this.renderedTiles.length=0;let D=Object.keys(R).map(Number);D.sort(An);let Z,V,z;n.opacity===1&&(!this.containerReused||d.getOpaque(t.viewState.projection))?D=D.reverse():(Z=[],V=[]);for(let ot=D.length-1;ot>=0;--ot){const b=D[ot],T=d.getTilePixelSize(b,h,o),E=f.getResolution(b)/m,H=T[0]*E*j,$=T[1]*E*j,vt=f.getTileCoordForCoordAndZ(Ki(M),b),Ct=f.getTileCoordExtent(vt),_t=Jt(this.tempTransform,[v*(Ct[0]-M[0])/m,v*(M[3]-Ct[3])/m]),Et=v*d.getGutterForProjection(o),Lt=R[b];for(const Dt in Lt){const jt=Lt[Dt],F=jt.tileCoord,ut=vt[1]-F[1],pt=Math.round(_t[0]-(ut-1)*H),kt=vt[2]-F[2],yt=Math.round(_t[1]-(kt-1)*$),st=Math.round(_t[0]-ut*H),nt=Math.round(_t[1]-kt*$),wt=pt-st,zt=yt-nt,Bt=g===b,xt=Bt&&jt.getAlpha(K(this),t.time)!==1;let dt=!1;if(!xt)if(Z){z=[st,nt,st+wt,nt,st+wt,nt+zt,st,nt+zt];for(let Ft=0,St=Z.length;Ft<St;++Ft)if(g!==b&&b<V[Ft]){const ct=Z[Ft];Kt([st,nt,st+wt,nt+zt],[ct[0],ct[3],ct[4],ct[7]])&&(dt||(O.save(),dt=!0),O.beginPath(),O.moveTo(z[0],z[1]),O.lineTo(z[2],z[3]),O.lineTo(z[4],z[5]),O.lineTo(z[6],z[7]),O.moveTo(ct[6],ct[7]),O.lineTo(ct[4],ct[5]),O.lineTo(ct[2],ct[3]),O.lineTo(ct[0],ct[1]),O.clip())}Z.push(z),V.push(b)}else O.clearRect(st,nt,wt,zt);this.drawTileImage(jt,t,st,nt,wt,zt,Et,Bt),Z&&!xt?(dt&&O.restore(),this.renderedTiles.unshift(jt)):this.renderedTiles.push(jt),this.updateUsedTiles(t.usedTiles,d,jt)}}return this.renderedRevision=c,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!Er(this.renderedExtent_,M),this.renderedExtent_=M,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,d,f,h,o,p,g,u.getPreload()),this.scheduleExpireCache(t,d),this.postRender(O,t),n.extent&&O.restore(),O.imageSmoothingEnabled=!0,U!==W.style.transform&&(W.style.transform=U),this.container}drawTileImage(t,e,n,r,o,s,a,l){const h=this.getTileImage(t);if(!h)return;const u=K(this),d=e.layerStatesArray[e.layerIndex],c=d.opacity*(l?t.getAlpha(u,e.time):1),f=c!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,n,r,o,s),f&&this.context.restore(),c!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=function(r,o,s){const a=K(r);a in s.usedTiles&&r.expireCache(s.viewState.projection,s.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const r=K(e);r in t||(t[r]={}),t[r][n.getKey()]=!0}manageTilePyramid(t,e,n,r,o,s,a,l,h){const u=K(e);u in t.wantedTiles||(t.wantedTiles[u]={});const d=t.wantedTiles[u],c=t.tileQueue,f=n.getMinZoom(),g=t.viewState.rotation,m=g?Dl(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let p=0,_,v,y,x,k,w;for(w=f;w<=a;++w)for(v=n.getTileRangeForExtentAndZ(s,w,v),y=n.getResolution(w),x=v.minX;x<=v.maxX;++x)for(k=v.minY;k<=v.maxY;++k)g&&!n.tileCoordIntersectsViewport([w,x,k],m)||(a-w<=l?(++p,_=e.getTile(w,x,k,r,o),_.getState()==N.IDLE&&(d[_.getKey()]=!0,c.isKeyQueued(_.getKey())||c.enqueue([_,u,n.getTileCoordCenter(_.tileCoord),y])),h!==void 0&&h(_)):e.useTile(w,x,k,o));e.updateCacheSize(p,o)}}const ng=mx,px={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},vx={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class _x extends ng{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=Ye()}prepareTile(t,e,n){let r;const o=t.getState();return(o===N.LOADED||o===N.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(r=!0)),r}getTile(t,e,n,r){const o=r.pixelRatio,s=r.viewState,a=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,n,o,l),d=r.viewHints,c=!(d[Yt.ANIMATING]||d[Yt.INTERACTING]);return(c||!u.wantedResolution)&&(u.wantedResolution=a),this.prepareTile(u,o,l)&&(c||Date.now()-r.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(u,r),super.getTile(t,e,n,r)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?K(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,n){const r=this.getLayer(),o=r.getRevision(),s=r.getRenderOrder()||null,a=t.wantedResolution,l=t.getReplayState(r);if(!l.dirty&&l.renderedResolution===a&&l.renderedRevision==o&&l.renderedRenderOrder==s)return;const h=r.getSource(),u=r.getDeclutter(),d=h.getTileGrid(),f=h.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),g=h.getSourceTiles(e,n,t),m=K(r);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],u&&(t.declutterExecutorGroups[m]=[]),l.dirty=!1;for(let p=0,_=g.length;p<_;++p){const v=g[p];if(v.getState()!=N.LOADED)continue;const y=v.tileCoord,x=d.getTileCoordExtent(y),k=Un(f,x),w=ui(k,r.getRenderBuffer()*a,this.tmpExtent),C=Er(x,k)?null:w,M=new ba(0,w,a,e),S=u?new ba(0,k,a,e):void 0,R=Df(a,e),A=function(U){let O;const W=U.getStyleFunction()||r.getStyleFunction();if(W&&(O=W(U,a)),O){const D=this.renderFeature(U,R,O,M,S);l.dirty=l.dirty||D}},G=v.getFeatures();s&&s!==l.renderedRenderOrder&&G.sort(s);for(let U=0,O=G.length;U<O;++U){const W=G[U];(!C||Kt(C,W.getGeometry().getExtent()))&&A.call(this,W)}const P=M.finish(),at=r.getRenderMode()!=="vector"&&u&&g.length===1?null:k,j=new ka(at,a,e,h.getOverlaps(),P,r.getRenderBuffer());if(t.executorGroups[m].push(j),S){const U=new ka(null,a,e,h.getOverlaps(),S.finish(),r.getRenderBuffer());t.declutterExecutorGroups[m].push(U)}}l.renderedRevision=o,l.renderedRenderOrder=s,l.renderedResolution=a}forEachFeatureAtCoordinate(t,e,n,r,o){const s=e.viewState.resolution,a=e.viewState.rotation;n=n==null?0:n;const l=this.getLayer(),u=l.getSource().getTileGridForProjection(e.viewState.projection),d=xe([t]);ui(d,s*n,d);const c={},f=function(p,_,v){let y=p.getId();y===void 0&&(y=K(p));const x=c[y];if(x){if(x!==!0&&v<x.distanceSq){if(v===0)return c[y]=!0,o.splice(o.lastIndexOf(x),1),r(p,l,_);x.geometry=_,x.distanceSq=v}}else{if(v===0)return c[y]=!0,r(p,l,_);o.push(c[y]={feature:p,layer:l,geometry:_,distanceSq:v,callback:r})}},g=this.renderedTiles;let m;for(let p=0,_=g.length;!m&&p<_;++p){const v=g[p],y=u.getTileCoordExtent(v.wrappedTileCoord);if(!Kt(y,d))continue;const x=K(l),k=[v.executorGroups[x]],w=v.declutterExecutorGroups[x];w&&k.push(w),k.some(C=>{const M=C===w?e.declutterTree.all().map(S=>S.value):null;for(let S=0,R=C.length;S<R;++S)if(m=C[S].forEachFeatureAtCoordinate(t,s,a,n,f,M),m)return!0})}return m}getFeatures(t){return new Promise(function(e,n){const r=this.getLayer(),o=K(r),s=r.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,u=s.getTileGridForProjection(a),d=Jt(this.renderedPixelToCoordinateTransform_,t.slice()),c=u.getTileCoordForCoordAndResolution(d,h);let f;for(let y=0,x=this.renderedTiles.length;y<x;++y)if(c.toString()===this.renderedTiles[y].tileCoord.toString()){if(f=this.renderedTiles[y],f.getState()===N.LOADED){const k=u.getTileCoordExtent(f.tileCoord);s.getWrapX()&&a.canWrapX()&&!Bn(l,k)&&Nl(d,a);break}f=void 0}if(!f||f.loadingSourceTiles>0){e([]);return}const g=u.getTileCoordExtent(f.wrappedTileCoord),m=Ki(g),p=[(d[0]-m[0])/h,(m[1]-d[1])/h],_=f.getSourceTiles().reduce(function(y,x){return y.concat(x.getFeatures())},[]);let v=f.hitDetectionImageData[o];if(!v&&!this.animatingOrInteracting_){const y=be(u.getTileSize(u.getZForResolution(h,s.zDirection))),x=this.renderedRotation_,k=[this.getRenderTransform(u.getTileCoordCenter(f.wrappedTileCoord),h,0,je,y[0]*je,y[1]*je,0)];v=If(y,k,_,r.getStyleFunction(),u.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(r).renderedResolution,x),f.hitDetectionImageData[o]=v}e(Pf(p,_,v))}.bind(this))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,n=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const r=t.viewHints,o=!(r[Yt.ANIMATING]||r[Yt.INTERACTING]),s=this.renderedTiles;for(let a=0,l=s.length;a<l;++a){const h=s[a],u=h.declutterExecutorGroups[K(this.getLayer())];if(u)for(let d=u.length-1;d>=0;--d)u[d].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,o,void 0,t.declutterTree)}e.globalAlpha=n}getTileRenderTransform(t,e){const n=e.pixelRatio,r=e.viewState,o=r.center,s=r.resolution,a=r.rotation,l=e.size,h=Math.round(l[0]*n),u=Math.round(l[1]*n),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),f=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),m=c.getTileCoordExtent(f,this.tmpExtent)[0]-g[0];return Xl($l(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(o,s,a,n,h,u,m))}postRender(t,e){const n=e.viewHints,r=!(n[Yt.ANIMATING]||n[Yt.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const o=this.getLayer(),s=o.getRenderMode(),a=t.globalAlpha;t.globalAlpha=o.getOpacity();const l=vx[s],h=e.viewState,u=h.rotation,d=o.getSource(),f=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,m=[],p=[];let _=!0;for(let v=g.length-1;v>=0;--v){const y=g[v];_=_&&!y.getReplayState(o).dirty;const x=y.executorGroups[K(o)].filter(S=>S.hasExecutors(l));if(x.length===0)continue;const k=this.getTileRenderTransform(y,e),w=y.tileCoord[0];let C=!1;const M=x[0].getClipCoords(k);if(M){for(let S=0,R=m.length;S<R;++S)if(f!==w&&w<p[S]){const A=m[S];Kt([M[0],M[3],M[4],M[7]],[A[0],A[3],A[4],A[7]])&&(C||(t.save(),C=!0),t.beginPath(),t.moveTo(M[0],M[1]),t.lineTo(M[2],M[3]),t.lineTo(M[4],M[5]),t.lineTo(M[6],M[7]),t.moveTo(A[6],A[7]),t.lineTo(A[4],A[5]),t.lineTo(A[2],A[3]),t.lineTo(A[0],A[1]),t.clip())}m.push(M),p.push(w)}for(let S=0,R=x.length;S<R;++S)x[S].execute(t,1,k,u,r,l);C&&t.restore()}t.globalAlpha=a,this.ready=_,super.postRender(t,e)}renderFeature(t,e,n,r,o){if(!n)return!1;let s=!1;if(Array.isArray(n))for(let a=0,l=n.length;a<l;++a)s=wa(r,t,n[a],e,this.boundHandleStyleImageChange_,void 0,o)||s;else s=wa(r,t,n,e,this.boundHandleStyleImageChange_,void 0,o);return s}tileImageNeedsRender_(t){const e=this.getLayer();if(e.getRenderMode()==="vector")return!1;const n=t.getReplayState(e),r=e.getRevision(),o=t.wantedResolution;return n.renderedTileResolution!==o||n.renderedTileRevision!==r}renderTileImage_(t,e){const n=this.getLayer(),r=t.getReplayState(n),o=n.getRevision(),s=t.executorGroups[K(n)];r.renderedTileRevision=o;const a=t.wrappedTileCoord,l=a[0],h=n.getSource();let u=e.pixelRatio;const c=e.viewState.projection,f=h.getTileGridForProjection(c),g=f.getResolution(t.tileCoord[0]),m=e.pixelRatio/t.wantedResolution*g,p=f.getResolution(l),_=t.getContext(n);u=Math.round(Math.max(u,m/u));const v=h.getTilePixelSize(l,u,c);_.canvas.width=v[0],_.canvas.height=v[1];const y=u/m;if(y!==1){const C=pc(this.tmpTransform_);$l(C,y,y),_.setTransform.apply(_,C)}const x=f.getTileCoordExtent(a,this.tmpExtent),k=m/p,w=pc(this.tmpTransform_);$l(w,k,-k),$0(w,-x[0],-x[3]);for(let C=0,M=s.length;C<M;++C)s[C].execute(_,y,w,0,!0,px[n.getRenderMode()]);r.renderedTileResolution=t.wantedResolution}}const yx=_x,un={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class xx extends wf{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un;const n=t.renderMode||"hybrid";ft(n=="hybrid"||n=="vector",28),this.renderMode_=n,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new yx(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(un.PRELOAD)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(un.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}}const bx=xx,kx=[0,0,0],dn=5;class wx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,ft(Yp(this.resolutions_,function(r,o){return o-r},!0),17);let e;if(!t.origins){for(let r=0,o=this.resolutions_.length-1;r<o;++r)if(!e)e=this.resolutions_[r]/this.resolutions_[r+1];else if(this.resolutions_[r]/this.resolutions_[r+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,ft(this.origins_.length==this.resolutions_.length,20));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ki(n)),ft(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,ft(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Ql,ft(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=n!==void 0?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(r,o){const s=new Xf(Math.min(0,r[0]),Math.max(r[0]-1,-1),Math.min(0,r[1]),Math.max(r[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,o);s.minX=Math.max(a.minX,s.minX),s.maxX=Math.min(a.maxX,s.maxX),s.minY=Math.max(a.minY,s.minY),s.maxY=Math.min(a.maxY,s.maxY)}return s},this):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const r=this.getTileRangeForExtentAndZ(t,e);for(let o=r.minX,s=r.maxX;o<=s;++o)for(let a=r.minY,l=r.maxY;a<=l;++a)n([e,o,a])}forEachTileCoordParentTileRange(t,e,n,r){let o,s,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(s=t[1],a=t[2]):l=this.getTileCoordExtent(t,r);h>=this.minZoom;){if(this.zoomFactor_===2?(s=Math.floor(s/2),a=Math.floor(a/2),o=Gr(s,s,a,a,n)):o=this.getTileRangeForExtentAndZ(l,h,n),e(h,o))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){const o=t[1]*2,s=t[2]*2;return Gr(o,o+1,s,s+1,e)}const r=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const r=t[0],o=t[1],s=t[2];if(e===r)return Gr(o,s,o,s,n);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-r),h=Math.floor(o*l),u=Math.floor(s*l);if(e<r)return Gr(h,h,u,u,n);const d=Math.floor(l*(o+1))-1,c=Math.floor(l*(s+1))-1;return Gr(h,d,u,c,n)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,n)}getTileRangeExtent(t,e,n){const r=this.getOrigin(t),o=this.getResolution(t),s=be(this.getTileSize(t),this.tmpSize_),a=r[0]+e.minX*s[0]*o,l=r[0]+(e.maxX+1)*s[0]*o,h=r[1]+e.minY*s[1]*o,u=r[1]+(e.maxY+1)*s[1]*o;return ti(a,h,l,u,n)}getTileRangeForExtentAndZ(t,e,n){const r=kx;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,r);const o=r[1],s=r[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,r),Gr(o,r[1],s,r[2],n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=be(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*n,e[1]-(t[2]+.5)*r[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),r=this.getResolution(t[0]),o=be(this.getTileSize(t[0]),this.tmpSize_),s=n[0]+t[1]*o[0]*r,a=n[1]-(t[2]+1)*o[1]*r,l=s+o[0]*r,h=a+o[1]*r;return ti(s,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,r,o){const s=this.getZForResolution(n),a=n/this.getResolution(s),l=this.getOrigin(s),h=be(this.getTileSize(s),this.tmpSize_);let u=a*(t-l[0])/n/h[0],d=a*(l[1]-e)/n/h[1];return r?(u=Fs(u,dn)-1,d=Fs(d,dn)-1):(u=Ls(u,dn),d=Ls(d,dn)),Bf(s,u,d,o)}getTileCoordForXYAndZ_(t,e,n,r,o){const s=this.getOrigin(n),a=this.getResolution(n),l=be(this.getTileSize(n),this.tmpSize_);let h=(t-s[0])/a/l[0],u=(s[1]-e)/a/l[1];return r?(h=Fs(h,dn)-1,u=Fs(u,dn)-1):(h=Ls(h,dn),u=Ls(u,dn)),Bf(n,h,u,o)}getTileCoordForCoordAndZ(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const n=xl(this.resolutions_,t,e||0);return Wt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Uc(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let r=this.minZoom;r<e;++r)n[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=n}}const nu=wx,ru={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function rg(i){let t=i.getDefaultTileGrid();return t||(t=Cx(i),i.setDefaultTileGrid(t)),t}function Mx(i,t,e){const n=t[0],r=i.getTileCoordCenter(t),o=Ta(e);if(js(o,r))return t;{const s=Nt(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,i.getTileCoordForCoordAndZ(r,n)}}function Ex(i,t,e,n){n=n!==void 0?n:"top-left";const r=sg(i,t,e);return new nu({extent:i,origin:S0(i,n),resolutions:r,tileSize:e})}function og(i){const t=i||{},e=t.extent||Gt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:sg(e,t.maxZoom,t.tileSize,t.maxResolution)};return new nu(n)}function sg(i,t,e,n){t=t!==void 0?t:Cc,e=be(e!==void 0?e:Ql);const r=$e(i),o=Nt(i);n=n>0?n:Math.max(o/e[0],r/e[1]);const s=t+1,a=new Array(s);for(let l=0;l<s;++l)a[l]=n/Math.pow(2,l);return a}function Cx(i,t,e,n){const r=Ta(i);return Ex(r,t,e,n)}function Ta(i){i=Gt(i);let t=i.getExtent();if(!t){const e=180*xr.degrees/i.getMetersPerUnit();t=ti(-e,-e,e,e)}return t}class Sx extends Of{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&be(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Hh(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const n=this.getTileCacheForProjection(t);n&&n.expireCache(e)}forEachLoadedTile(t,e,n,r){const o=this.getTileCacheForProjection(t);if(!o)return!1;let s=!0,a,l,h;for(let u=n.minX;u<=n.maxX;++u)for(let d=n.minY;d<=n.maxY;++d)l=Nr(e,u,d),h=!1,o.containsKey(l)&&(a=o.get(l),h=a.getState()===N.LOADED,h&&(h=r(a)!==!1)),h||(s=!1);return s}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(t,e,n,r,o){return et()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:rg(t)}getTileCacheForProjection(t){const e=this.getProjection();return ft(e===null||Vn(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=this.getTilePixelRatio(e),s=be(r.getTileSize(t),this.tmpSize);return o==1?s:D_(s,o,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=Mx(n,t,e)),Xy(t,n)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,r){}}class Tx extends Qe{constructor(t,e){super(t),this.tile=e}}const zx=Sx;function Rx(i,t){const e=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){if(s)return i.replace(e,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,function(){const h=s[0],u=t.getFullTileRange(h);return ft(u,55),(u.getHeight()-s[2]-1).toString()})}}function Ix(i,t){const e=i.length,n=new Array(e);for(let r=0;r<e;++r)n[r]=Rx(i[r],t);return Px(n)}function Px(i){return i.length===1?i[0]:function(t,e,n){if(t){const r=qy(t),o=$i(r,i.length);return i[o](t,e,n)}else return}}function Ax(i){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(i);if(e){const n=e[1].charCodeAt(0),r=e[2].charCodeAt(0);let o;for(o=n;o<=r;++o)t.push(i.replace(e[0],String.fromCharCode(o)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(i),e){const n=parseInt(e[2],10);for(let r=parseInt(e[1],10);r<=n;r++)t.push(i.replace(e[0],r.toString()));return t}return t.push(i),t}class ou extends zx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===ou.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,n=K(e),r=e.getState();let o;r==N.LOADING?(this.tileLoadingKeys_[n]=!0,o=ru.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],o=r==N.ERROR?ru.TILELOADERROR:r==N.LOADED?ru.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Tx(o,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Ax(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
46
+ `);this.generateTileUrlFunction_?this.setTileUrlFunction(Ix(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const r=Nr(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)}}const ag=ou;class Dx extends ag{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||Ta(e),r=t.tileGrid||og({extent:n,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:r,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Fx,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Hh(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:Zy,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const r=Vf(n.peekFirstKey())[0],o=this.tileGrid;return n.forEach(function(s){if(s.tileCoord[0]!==r||s.getState()!==N.LOADED)return;const a=s.getSourceTiles();for(let l=0,h=a.length;l<h;++l){const u=a[l],d=u.tileCoord;if(Kt(t,o.getTileCoordExtent(d))){const c=u.getFeatures();if(c)for(let f=0,g=c.length;f<g;++f){const m=c[f],p=m.getGeometry();Kt(t,p.getExtent())&&e.push(m)}}}}),e}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(t,e){const n=this.getTileCacheForProjection(t),r=Object.keys(e).reduce((o,s)=>{const a=Vy(s),l=n.peek(a);if(l){const h=l.sourceTiles;for(let u=0,d=h.length;u<d;++u)o[h[u].getKey()]=!0}return o},{});super.expireCache(t,e),this.sourceTileCache.expireCache(r)}getSourceTiles(t,e,n){if(n.getState()===N.IDLE){n.setState(N.LOADING);const r=n.wrappedTileCoord,o=this.getTileGridForProjection(e),s=o.getTileCoordExtent(r),a=r[0],l=o.getResolution(a);ui(s,-l,s);const h=this.tileGrid,u=h.getExtent();u&&Un(s,u,s);const d=h.getZForResolution(l,this.zDirection);h.forEachTileCoord(s,d,c=>{const f=this.tileUrlFunction(c,t,e),g=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(c,f?N.IDLE:N.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(g);const m=g.getState();if(m<N.LOADED){const p=_=>{this.handleTileChange(_);const v=g.getState();if(v===N.LOADED||v===N.ERROR){const y=g.getKey();y in n.errorTileKeys?g.getState()===N.LOADED&&delete n.errorTileKeys[y]:n.loadingSourceTiles--,v===N.ERROR?n.errorTileKeys[y]=!0:g.removeEventListener(tt.CHANGE,p),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?N.LOADED:N.ERROR)}};g.addEventListener(tt.CHANGE,p),n.loadingSourceTiles++}m===N.IDLE&&(g.extent=h.getTileCoordExtent(c),g.projection=e,g.resolution=h.getResolution(c[0]),this.sourceTileCache.set(f,g),g.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(c=>c.getState()===N.ERROR)?N.ERROR:N.LOADED)}return n.sourceTiles}getTile(t,e,n,r,o){const s=Nr(t,e,n),a=this.getKey();let l;if(this.tileCache.containsKey(s)&&(l=this.tileCache.get(s),l.key===a))return l;const h=[t,e,n];let u=this.getTileCoordForTileUrlFunction(h,o);const d=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(o);if(u&&d){const m=c.getTileCoordExtent(u);ui(m,-c.getResolution(t),m),Kt(d,m)||(u=null)}let f=!0;if(u!==null){const m=this.tileGrid,p=c.getResolution(t),_=m.getZForResolution(p,1),v=c.getTileCoordExtent(u);ui(v,-p,v),m.forEachTileCoord(v,_,function(y){f=f&&!this.tileUrlFunction(y,r,o)}.bind(this))}const g=new Yy(h,f?N.EMPTY:N.IDLE,u,this.getSourceTiles.bind(this,r,o));return g.key=a,l?(g.interimTile=l,g.refreshInterimChain(),this.tileCache.replace(s,g)):this.tileCache.set(s,g),g}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const r=this.tileGrid,o=r.getResolutions().slice(),s=o.map(function(h,u){return r.getOrigin(u)}),a=o.map(function(h,u){return r.getTileSize(u)}),l=Cc+1;for(let h=o.length;h<l;++h)o.push(o[h-1]/2),s.push(s[h-1]),a.push(a[h-1]);n=new nu({extent:r.getExtent(),origins:s,resolutions:o,tileSizes:a}),this.tileGrids_[e]=n}return n}getTilePixelRatio(t){return t}getTilePixelSize(t,e,n){const r=this.getTileGridForProjection(n),o=be(r.getTileSize(t),this.tmpSize);return[Math.round(o[0]*e),Math.round(o[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(t*2,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const Lx=Dx;function Fx(i,t){i.setLoader(function(e,n,r){Nf(t,i.getFormat(),e,n,r,i.onLoad.bind(i),i.onError.bind(i))})}class Ox extends ag{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Nx,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:jf,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const r in this.tileCacheForProjection){const o=this.tileCacheForProjection[r];o.expireCache(o==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!Vn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Vn(e,t)))return this.tileGrid;{const n=K(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=rg(t)),this.tileGridForProjection[n]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Vn(e,t))return this.tileCache;{const n=K(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Hh(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}}createTile_(t,e,n,r,o,s){const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,o),h=l?this.tileUrlFunction(l,r,o):void 0,u=new this.tileClass(a,h!==void 0?N.IDLE:N.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=s,u.addEventListener(tt.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,n,r,o){const s=this.getProjection();if(!s||!o||Vn(s,o))return this.getTileInternal(t,e,n,r,s||o);{const a=this.getTileCacheForProjection(o),l=[t,e,n];let h;const u=Uf(l);a.containsKey(u)&&(h=a.get(u));const d=this.getKey();if(h&&h.key==d)return h;{const c=this.getTileGridForProjection(s),f=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(l,o),m=new ig(s,c,o,f,l,g,this.getTilePixelRatio(r),this.getGutter(),function(p,_,v,y){return this.getTileInternal(p,_,v,y,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=d,h?(m.interimTile=h,m.refreshInterimChain(),a.replace(u,m)):a.set(u,m),m}}}getTileInternal(t,e,n,r,o){let s=null;const a=Nr(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))s=this.createTile_(t,e,n,r,o,l),this.tileCache.set(a,s);else if(s=this.tileCache.get(a),s.key!=l){const h=s;s=this.createTile_(t,e,n,r,o,l),h.getState()==N.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(a,s)}return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=Gt(t);if(n){const r=K(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function Nx(i,t){i.getImage().src=t}const Gx=Ox;class jx extends Os{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(un.PRELOAD)}setPreload(t){this.set(un.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(un.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(un.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const Bx=jx;class Ux extends Bx{constructor(t){super(t)}createRenderer(){return new ng(this)}}const Vx=Ux;var qx={},lg,hg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Xo(i){return i=Math.round(i),i<0?0:i>255?255:i}function ug(i){return i<0?0:i>1?1:i}function su(i){return i[i.length-1]==="%"?Xo(parseFloat(i)/100*255):Xo(parseInt(i))}function za(i){return i[i.length-1]==="%"?ug(parseFloat(i)/100):ug(parseFloat(i))}function au(i,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?i+(t-i)*e*6:e*2<1?t:e*3<2?i+(t-i)*(2/3-e)*6:i}function Xx(i){var t=i.replace(/ /g,"").toLowerCase();if(t in hg)return hg[t].slice();if(t[0]==="#"){if(t.length===4){var e=parseInt(t.substr(1),16);return e>=0&&e<=4095?[(e&3840)>>4|(e&3840)>>8,e&240|(e&240)>>4,e&15|(e&15)<<4,1]:null}else if(t.length===7){var e=parseInt(t.substr(1),16);return e>=0&&e<=16777215?[(e&16711680)>>16,(e&65280)>>8,e&255,1]:null}return null}var n=t.indexOf("("),r=t.indexOf(")");if(n!==-1&&r+1===t.length){var o=t.substr(0,n),s=t.substr(n+1,r-(n+1)).split(","),a=1;switch(o){case"rgba":if(s.length!==4)return null;a=za(s.pop());case"rgb":return s.length!==3?null:[su(s[0]),su(s[1]),su(s[2]),a];case"hsla":if(s.length!==4)return null;a=za(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,h=za(s[1]),u=za(s[2]),d=u<=.5?u*(h+1):u+h-u*h,c=u*2-d;return[Xo(au(c,d,l+1/3)*255),Xo(au(c,d,l)*255),Xo(au(c,d,l-1/3)*255),a];default:return null}}return null}try{lg=qx.parseCSSColor=Xx}catch{}var Rt=function(t,e,n,r){r===void 0&&(r=1),this.r=t,this.g=e,this.b=n,this.a=r};Rt.parse=function(t){if(!!t){if(t instanceof Rt)return t;if(typeof t=="string"){var e=lg(t);if(!!e)return new Rt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Rt.prototype.toString=function(){var t=this.toArray(),e=t[0],n=t[1],r=t[2],o=t[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(r)+","+o+")"},Rt.prototype.toArray=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e*255/o,n*255/o,r*255/o,o]},Rt.prototype.toArray01=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return o===0?[0,0,0,0]:[e/o,n/o,r/o,o]},Rt.prototype.toArray01PremultipliedAlpha=function(){var t=this,e=t.r,n=t.g,r=t.b,o=t.a;return[e,n,r,o]},Rt.black=new Rt(0,0,0,1),Rt.white=new Rt(1,1,1,1),Rt.transparent=new Rt(0,0,0,0),Rt.red=new Rt(1,0,0,1),Rt.blue=new Rt(0,0,1,1);function $o(i){return typeof i=="object"?["literal",i]:i}function $x(i,t){var e=i.stops;if(!e)return Wx(i,t);var n=e&&typeof e[0][0]=="object",r=n||i.property!==void 0,o=n||!r;return e=e.map(function(s){return!r&&t.tokens&&typeof s[1]=="string"?[s[0],Hx(s[1])]:[s[0],$o(s[1])]}),n?Yx(i,t,e):o?Zx(i,t,e):hu(i,t,e)}function Wx(i,t){var e=["get",i.property];if(i.default===void 0)return t.type==="string"?["string",e]:e;if(t.type==="enum")return["match",e,Object.keys(t.values),e,i.default];var n=[t.type==="color"?"to-color":t.type,e,$o(i.default)];return t.type==="array"&&n.splice(1,0,t.value,t.length||null),n}function lu(i){switch(i.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Yx(i,t,e){for(var n={},r={},o=[],s=0;s<e.length;s++){var a=e[s],l=a[0].zoom;n[l]===void 0&&(n[l]={zoom:l,type:i.type,property:i.property,default:i.default},r[l]=[],o.push(l)),r[l].push([a[0].value,a[1]])}var h=du({},t);if(h==="exponential"){for(var u=[lu(i),["linear"],["zoom"]],d=0,c=o;d<c.length;d+=1){var f=c[d],g=hu(n[f],t,r[f]);Br(u,f,g,!1)}return u}else{for(var m=["step",["zoom"]],p=0,_=o;p<_.length;p+=1){var v=_[p],y=hu(n[v],t,r[v]);Br(m,v,y,!0)}return uu(m),m}}function Kx(i,t){if(i!==void 0)return i;if(t!==void 0)return t}function dg(i,t){var e=$o(Kx(i.default,t.default));return e===void 0&&t.type==="resolvedImage"?"":e}function hu(i,t,e){var n=du(i,t),r=["get",i.property];if(n==="categorical"&&typeof e[0][0]=="boolean"){for(var o=["case"],s=0,a=e;s<a.length;s+=1){var l=a[s];o.push(["==",r,l[0]],l[1])}return o.push(dg(i,t)),o}else if(n==="categorical"){for(var h=["match",r],u=0,d=e;u<d.length;u+=1){var c=d[u];Br(h,c[0],c[1],!1)}return h.push(dg(i,t)),h}else if(n==="interval"){for(var f=["step",["number",r]],g=0,m=e;g<m.length;g+=1){var p=m[g];Br(f,p[0],p[1],!0)}return uu(f),i.default===void 0?f:["case",["==",["typeof",r],"number"],f,$o(i.default)]}else if(n==="exponential"){for(var _=i.base!==void 0?i.base:1,v=[lu(i),_===1?["linear"]:["exponential",_],["number",r]],y=0,x=e;y<x.length;y+=1){var k=x[y];Br(v,k[0],k[1],!1)}return i.default===void 0?v:["case",["==",["typeof",r],"number"],v,$o(i.default)]}else throw new Error("Unknown property function type "+n)}function Zx(i,t,e,n){n===void 0&&(n=["zoom"]);var r=du(i,t),o,s=!1;if(r==="interval")o=["step",n],s=!0;else if(r==="exponential"){var a=i.base!==void 0?i.base:1;o=[lu(i),a===1?["linear"]:["exponential",a],n]}else throw new Error('Unknown zoom function type "'+r+'"');for(var l=0,h=e;l<h.length;l+=1){var u=h[l];Br(o,u[0],u[1],s)}return uu(o),o}function uu(i){i[0]==="step"&&i.length===3&&(i.push(0),i.push(i[3]))}function Br(i,t,e,n){i.length>3&&t===i[i.length-2]||(n&&i.length===2||i.push(t),i.push(e))}function du(i,t){return i.type?i.type:t.expression.interpolated?"exponential":"interval"}function Hx(i){for(var t=["concat"],e=/{([^{}]+)}/g,n=0,r=e.exec(i);r!==null;r=e.exec(i)){var o=i.slice(n,e.lastIndex-r[0].length);n=e.lastIndex,o.length>0&&t.push(o),t.push(["get",r[1]])}if(t.length===1)return i;if(n<i.length)t.push(i.slice(n));else if(t.length===2)return["to-string",t[1]];return t}var ci=function(i){function t(e,n){i.call(this,n),this.message=n,this.key=e}return i&&(t.__proto__=i),t.prototype=Object.create(i&&i.prototype),t.prototype.constructor=t,t}(Error),Wo=function(t,e){e===void 0&&(e=[]),this.parent=t,this.bindings={};for(var n=0,r=e;n<r.length;n+=1){var o=r[n],s=o[0],a=o[1];this.bindings[s]=a}};Wo.prototype.concat=function(t){return new Wo(this,t)},Wo.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Wo.prototype.has=function(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1};var Ra={kind:"null"},L={kind:"number"},mt={kind:"string"},lt={kind:"boolean"},Pi={kind:"color"},Ur={kind:"object"},ht={kind:"value"},Jx={kind:"error"},Ia={kind:"collator"},Pa={kind:"formatted"},Yo={kind:"resolvedImage"};function Ke(i,t){return{kind:"array",itemType:i,N:t}}function qt(i){if(i.kind==="array"){var t=qt(i.itemType);return typeof i.N=="number"?"array<"+t+", "+i.N+">":i.itemType.kind==="value"?"array":"array<"+t+">"}else return i.kind}var Qx=[Ra,L,mt,lt,Pi,Pa,Ur,Ke(ht),Yo];function Ko(i,t){if(t.kind==="error")return null;if(i.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Ko(i.itemType,t.itemType))&&(typeof i.N!="number"||i.N===t.N))return null}else{if(i.kind===t.kind)return null;if(i.kind==="value")for(var e=0,n=Qx;e<n.length;e+=1){var r=n[e];if(!Ko(r,t))return null}}return"Expected "+qt(i)+" but found "+qt(t)+" instead."}function cu(i,t){return t.some(function(e){return e.kind===i.kind})}function Zo(i,t){return t.some(function(e){return e==="null"?i===null:e==="array"?Array.isArray(i):e==="object"?i&&!Array.isArray(i)&&typeof i=="object":e===typeof i})}var Ho=function(t,e,n){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ho.prototype.compare=function(t,e){return this.collator.compare(t,e)},Ho.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=function(t,e,n,r,o){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=n,this.fontStack=r,this.textColor=o},Ae=function(t){this.sections=t};Ae.fromString=function(t){return new Ae([new fu(t,null,null,null,null)])},Ae.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(t){return t.text.length!==0||t.image&&t.image.name.length!==0})},Ae.factory=function(t){return t instanceof Ae?t:Ae.fromString(t)},Ae.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(t){return t.text}).join("")},Ae.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];if(r.image){t.push(["image",r.image.name]);continue}t.push(r.text);var o={};r.fontStack&&(o["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(o["font-scale"]=r.scale),r.textColor&&(o["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(o)}return t};var fi=function(t){this.name=t.name,this.available=t.available};fi.prototype.toString=function(){return this.name},fi.fromString=function(t){return t?new fi({name:t,available:!1}):null},fi.prototype.serialize=function(){return["image",this.name]};function cg(i,t,e,n){if(!(typeof i=="number"&&i>=0&&i<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255)){var r=typeof n=="number"?[i,t,e,n]:[i,t,e];return"Invalid rgba value ["+r.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof n>"u"||typeof n=="number"&&n>=0&&n<=1?null:"Invalid rgba value ["+[i,t,e,n].join(", ")+"]: 'a' must be between 0 and 1."}function Aa(i){if(i===null)return!0;if(typeof i=="string")return!0;if(typeof i=="boolean")return!0;if(typeof i=="number")return!0;if(i instanceof Rt)return!0;if(i instanceof Ho)return!0;if(i instanceof Ae)return!0;if(i instanceof fi)return!0;if(Array.isArray(i)){for(var t=0,e=i;t<e.length;t+=1){var n=e[t];if(!Aa(n))return!1}return!0}else if(typeof i=="object"){for(var r in i)if(!Aa(i[r]))return!1;return!0}else return!1}function te(i){if(i===null)return Ra;if(typeof i=="string")return mt;if(typeof i=="boolean")return lt;if(typeof i=="number")return L;if(i instanceof Rt)return Pi;if(i instanceof Ho)return Ia;if(i instanceof Ae)return Pa;if(i instanceof fi)return Yo;if(Array.isArray(i)){for(var t=i.length,e,n=0,r=i;n<r.length;n+=1){var o=r[n],s=te(o);if(!e)e=s;else{if(e===s)continue;e=ht;break}}return Ke(e||ht,t)}else return Ur}function Jo(i){var t=typeof i;return i===null?"":t==="string"||t==="number"||t==="boolean"?String(i):i instanceof Rt||i instanceof Ae||i instanceof fi?i.toString():JSON.stringify(i)}var gi=function(t,e){this.type=t,this.value=e};gi.parse=function(t,e){if(t.length!==2)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Aa(t[1]))return e.error("invalid value");var n=t[1],r=te(n),o=e.expectedType;return r.kind==="array"&&r.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(r=o),new gi(r,n)},gi.prototype.evaluate=function(){return this.value},gi.prototype.eachChild=function(){},gi.prototype.outputDefined=function(){return!0},gi.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Rt?["rgba"].concat(this.value.toArray()):this.value instanceof Ae?this.value.serialize():this.value};var oe=function(t){this.name="ExpressionEvaluationError",this.message=t};oe.prototype.toJSON=function(){return this.message};var gu={string:mt,number:L,boolean:lt,object:Ur},Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=1,r,o=t[0];if(o==="array"){var s;if(t.length>2){var a=t[1];if(typeof a!="string"||!(a in gu)||a==="object")return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=gu[a],n++}else s=ht;var l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);l=t[2],n++}r=Ke(s,l)}else r=gu[o];for(var h=[];n<t.length;n++){var u=e.parse(t[n],n,ht);if(!u)return null;h.push(u)}return new Me(r,h)},Me.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var n=this.args[e].evaluate(t),r=Ko(this.type,te(n));if(r){if(e===this.args.length-1)throw new oe("Expected value to be of type "+qt(this.type)+", but found "+qt(te(n))+" instead.")}else return n}return null},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Me.prototype.serialize=function(){var t=this.type,e=[t.kind];if(t.kind==="array"){var n=t.itemType;if(n.kind==="string"||n.kind==="number"||n.kind==="boolean"){e.push(n.kind);var r=t.N;(typeof r=="number"||this.args.length>1)&&e.push(r)}}return e.concat(this.args.map(function(o){return o.serialize()}))};var cn=function(t){this.type=Pa,this.sections=t};cn.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[1];if(!Array.isArray(n)&&typeof n=="object")return e.error("First argument must be an image or text section.");for(var r=[],o=!1,s=1;s<=t.length-1;++s){var a=t[s];if(o&&typeof a=="object"&&!Array.isArray(a)){o=!1;var l=null;if(a["font-scale"]&&(l=e.parse(a["font-scale"],1,L),!l))return null;var h=null;if(a["text-font"]&&(h=e.parse(a["text-font"],1,Ke(mt)),!h))return null;var u=null;if(a["text-color"]&&(u=e.parse(a["text-color"],1,Pi),!u))return null;var d=r[r.length-1];d.scale=l,d.font=h,d.textColor=u}else{var c=e.parse(t[s],1,ht);if(!c)return null;var f=c.type.kind;if(f!=="string"&&f!=="value"&&f!=="null"&&f!=="resolvedImage")return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new cn(r)},cn.prototype.evaluate=function(t){var e=function(n){var r=n.content.evaluate(t);return te(r)===Yo?new fu("",r,null,null,null):new fu(Jo(r),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)};return new Ae(this.sections.map(e))},cn.prototype.eachChild=function(t){for(var e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},cn.prototype.outputDefined=function(){return!1},cn.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e<n.length;e+=1){var r=n[e];t.push(r.content.serialize());var o={};r.scale&&(o["font-scale"]=r.scale.serialize()),r.font&&(o["text-font"]=r.font.serialize()),r.textColor&&(o["text-color"]=r.textColor.serialize()),t.push(o)}return t};var fn=function(t){this.type=Yo,this.input=t};fn.parse=function(t,e){if(t.length!==2)return e.error("Expected two arguments.");var n=e.parse(t[1],1,mt);return n?new fn(n):e.error("No image name provided.")},fn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=fi.fromString(e);return n&&t.availableImages&&(n.available=t.availableImages.indexOf(e)>-1),n},fn.prototype.eachChild=function(t){t(this.input)},fn.prototype.outputDefined=function(){return!1},fn.prototype.serialize=function(){return["image",this.input.serialize()]};var tb={"to-boolean":lt,"to-color":Pi,"to-number":L,"to-string":mt},Ze=function(t,e){this.type=t,this.args=e};Ze.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var n=t[0];if((n==="to-boolean"||n==="to-string")&&t.length!==2)return e.error("Expected one argument.");for(var r=tb[n],o=[],s=1;s<t.length;s++){var a=e.parse(t[s],s,ht);if(!a)return null;o.push(a)}return new Ze(r,o)},Ze.prototype.evaluate=function(t){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(t));if(this.type.kind==="color"){for(var e,n,r=0,o=this.args;r<o.length;r+=1){var s=o[r];if(e=s.evaluate(t),n=null,e instanceof Rt)return e;if(typeof e=="string"){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&(e.length<3||e.length>4?n="Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":n=cg(e[0],e[1],e[2],e[3]),!n))return new Rt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new oe(n||"Could not parse color from value '"+(typeof e=="string"?e:String(JSON.stringify(e)))+"'")}else if(this.type.kind==="number"){for(var l=null,h=0,u=this.args;h<u.length;h+=1){var d=u[h];if(l=d.evaluate(t),l===null)return 0;var c=Number(l);if(!isNaN(c))return c}throw new oe("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Ae.fromString(Jo(this.args[0].evaluate(t))):this.type.kind==="resolvedImage"?fi.fromString(Jo(this.args[0].evaluate(t))):Jo(this.args[0].evaluate(t))},Ze.prototype.eachChild=function(t){this.args.forEach(t)},Ze.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Ze.prototype.serialize=function(){if(this.type.kind==="formatted")return new cn([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new fn(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var eb=["Unknown","Point","LineString","Polygon"],Ai=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Ai.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Ai.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?eb[this.feature.type]:this.feature.type:null},Ai.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ai.prototype.canonicalID=function(){return this.canonical},Ai.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ai.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,n=this.featureTileCoord,r=n.x,o=n.y,s=r*e-t[0],a=o*e-t[1],l=this.featureDistanceData.bearing[0],h=this.featureDistanceData.bearing[1],u=l*s+h*a;return u}return 0},Ai.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Rt.parse(t)),e};var me=function(t,e,n,r){this.name=t,this.type=e,this._evaluate=n,this.args=r};me.prototype.evaluate=function(t){return this._evaluate(t,this.args)},me.prototype.eachChild=function(t){this.args.forEach(t)},me.prototype.outputDefined=function(){return!1},me.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},me.parse=function(t,e){var n,r=t[0],o=me.definitions[r];if(!o)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(o)?o[0]:o.type,a=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,l=a.filter(function(P){var at=P[0];return!Array.isArray(at)||at.length===t.length-1}),h=null,u=0,d=l;u<d.length;u+=1){var c=d[u],f=c[0],g=c[1];h=new vn(e.registry,e.path,null,e.scope);for(var m=[],p=!1,_=1;_<t.length;_++){var v=t[_],y=Array.isArray(f)?f[_-1]:f.type,x=h.parse(v,1+m.length,y);if(!x){p=!0;break}m.push(x)}if(!p){if(Array.isArray(f)&&f.length!==m.length){h.error("Expected "+f.length+" arguments, but found "+m.length+" instead.");continue}for(var k=0;k<m.length;k++){var w=Array.isArray(f)?f[k]:f.type,C=m[k];h.concat(k+1).checkSubtype(w,C.type)}if(h.errors.length===0)return new me(r,s,g,m)}}if(l.length===1)(n=e.errors).push.apply(n,h.errors);else{for(var M=l.length?l:a,S=M.map(function(P){var at=P[0];return ib(at)}).join(" | "),R=[],A=1;A<t.length;A++){var G=e.parse(t[A],1+R.length);if(!G)return null;R.push(qt(G.type))}e.error("Expected arguments of type "+S+", but found ("+R.join(", ")+") instead.")}return null},me.register=function(t,e){me.definitions=e;for(var n in e)t[n]=me};function ib(i){return Array.isArray(i)?"("+i.map(qt).join(", ")+")":"("+qt(i.type)+"...)"}var gn=function(t,e,n){this.type=Ia,this.locale=n,this.caseSensitive=t,this.diacriticSensitive=e};gn.parse=function(t,e){if(t.length!==2)return e.error("Expected one argument.");var n=t[1];if(typeof n!="object"||Array.isArray(n))return e.error("Collator options argument must be an object.");var r=e.parse(n["case-sensitive"]===void 0?!1:n["case-sensitive"],1,lt);if(!r)return null;var o=e.parse(n["diacritic-sensitive"]===void 0?!1:n["diacritic-sensitive"],1,lt);if(!o)return null;var s=null;return n.locale&&(s=e.parse(n.locale,1,mt),!s)?null:new gn(r,o,s)},gn.prototype.evaluate=function(t){return new Ho(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},gn.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var mn=8192;function mu(i,t){i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.max(i[2],t[0]),i[3]=Math.max(i[3],t[1])}function nb(i){return(180+i)/360}function rb(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Da(i,t){return!(i[0]<=t[0]||i[2]>=t[2]||i[1]<=t[1]||i[3]>=t[3])}function ob(i,t){var e=nb(i[0]),n=rb(i[1]),r=Math.pow(2,t.z);return[Math.round(e*r*mn),Math.round(n*r*mn)]}function sb(i,t,e){var n=i[0]-t[0],r=i[1]-t[1],o=i[0]-e[0],s=i[1]-e[1];return n*s-o*r===0&&n*o<=0&&r*s<=0}function ab(i,t,e){return t[1]>i[1]!=e[1]>i[1]&&i[0]<(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1])+t[0]}function pu(i,t){for(var e=!1,n=0,r=t.length;n<r;n++)for(var o=t[n],s=0,a=o.length;s<a-1;s++){if(sb(i,o[s],o[s+1]))return!1;ab(i,o[s],o[s+1])&&(e=!e)}return e}function lb(i,t){for(var e=0;e<t.length;e++)if(pu(i,t[e]))return!0;return!1}function hb(i,t){return i[0]*t[1]-i[1]*t[0]}function fg(i,t,e,n){var r=i[0]-e[0],o=i[1]-e[1],s=t[0]-e[0],a=t[1]-e[1],l=n[0]-e[0],h=n[1]-e[1],u=r*h-l*o,d=s*h-l*a;return u>0&&d<0||u<0&&d>0}function ub(i,t,e,n){var r=[t[0]-i[0],t[1]-i[1]],o=[n[0]-e[0],n[1]-e[1]];return hb(o,r)===0?!1:!!(fg(i,t,e,n)&&fg(e,n,i,t))}function db(i,t,e){for(var n=0,r=e;n<r.length;n+=1)for(var o=r[n],s=0;s<o.length-1;++s)if(ub(i,t,o[s],o[s+1]))return!0;return!1}function gg(i,t){for(var e=0;e<i.length;++e)if(!pu(i[e],t))return!1;for(var n=0;n<i.length-1;++n)if(db(i[n],i[n+1],t))return!1;return!0}function cb(i,t){for(var e=0;e<t.length;e++)if(gg(i,t[e]))return!0;return!1}function vu(i,t,e){for(var n=[],r=0;r<i.length;r++){for(var o=[],s=0;s<i[r].length;s++){var a=ob(i[r][s],e);mu(t,a),o.push(a)}n.push(o)}return n}function mg(i,t,e){for(var n=[],r=0;r<i.length;r++){var o=vu(i[r],t,e);n.push(o)}return n}function pg(i,t,e,n){if(i[0]<e[0]||i[0]>e[2]){var r=n*.5,o=i[0]-e[0]>r?-n:e[0]-i[0]>r?n:0;o===0&&(o=i[0]-e[2]>r?-n:e[2]-i[0]>r?n:0),i[0]+=o}mu(t,i)}function fb(i){i[0]=i[1]=1/0,i[2]=i[3]=-1/0}function vg(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1)for(var h=l[a],u=0,d=h;u<d.length;u+=1){var c=d[u],f=[c.x+o[0],c.y+o[1]];pg(f,t,e,r),s.push(f)}return s}function _g(i,t,e,n){var r=Math.pow(2,n.z)*mn,o=[n.x*mn,n.y*mn],s=[];if(!i)return s;for(var a=0,l=i;a<l.length;a+=1){for(var h=l[a],u=[],d=0,c=h;d<c.length;d+=1){var f=c[d],g=[f.x+o[0],f.y+o[1]];mu(t,g),u.push(g)}s.push(u)}if(t[2]-t[0]<=r/2){fb(t);for(var m=0,p=s;m<p.length;m+=1)for(var _=p[m],v=0,y=_;v<y.length;v+=1){var x=y[v];pg(x,t,e,r)}}return s}function gb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=vg(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!pu(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=vg(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!lb(g,u))return!1}}return!0}function mb(i,t){var e=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=i.canonicalID();if(!r)return!1;if(t.type==="Polygon"){var o=vu(t.coordinates,n,r),s=_g(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var a=0,l=s;a<l.length;a+=1){var h=l[a];if(!gg(h,o))return!1}}if(t.type==="MultiPolygon"){var u=mg(t.coordinates,n,r),d=_g(i.geometry(),e,n,r);if(!Da(e,n))return!1;for(var c=0,f=d;c<f.length;c+=1){var g=f[c];if(!cb(g,u))return!1}}return!0}var ri=function(t,e){this.type=lt,this.geojson=t,this.geometries=e};ri.parse=function(t,e){if(t.length!==2)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Aa(t[1])){var n=t[1];if(n.type==="FeatureCollection")for(var r=0;r<n.features.length;++r){var o=n.features[r].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new ri(n,n.features[r].geometry)}else if(n.type==="Feature"){var s=n.geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new ri(n,n.geometry)}else if(n.type==="Polygon"||n.type==="MultiPolygon")return new ri(n,n)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},ri.prototype.evaluate=function(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return gb(t,this.geometries);if(t.geometryType()==="LineString")return mb(t,this.geometries)}return!1},ri.prototype.eachChild=function(){},ri.prototype.outputDefined=function(){return!0},ri.prototype.serialize=function(){return["within",this.geojson]};function La(i){if(i instanceof me){if(i.name==="get"&&i.args.length===1)return!1;if(i.name==="feature-state")return!1;if(i.name==="has"&&i.args.length===1)return!1;if(i.name==="properties"||i.name==="geometry-type"||i.name==="id")return!1;if(/^filter-/.test(i.name))return!1}if(i instanceof ri)return!1;var t=!0;return i.eachChild(function(e){t&&!La(e)&&(t=!1)}),t}function _u(i){if(i instanceof me&&i.name==="feature-state")return!1;var t=!0;return i.eachChild(function(e){t&&!_u(e)&&(t=!1)}),t}function yu(i,t){if(i instanceof me&&t.indexOf(i.name)>=0)return!1;var e=!0;return i.eachChild(function(n){e&&!yu(n,t)&&(e=!1)}),e}var pn=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};pn.parse=function(t,e){if(t.length!==2||typeof t[1]!="string")return e.error("'var' expression requires exactly one string literal argument.");var n=t[1];return e.scope.has(n)?new pn(n,e.scope.get(n)):e.error('Unknown variable "'+n+'". Make sure "'+n+'" has been bound in an enclosing "let" expression before using it.',1)},pn.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},pn.prototype.eachChild=function(){},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["var",this.name]};var vn=function(t,e,n,r,o){e===void 0&&(e=[]),r===void 0&&(r=new Wo),o===void 0&&(o=[]),this.registry=t,this.path=e,this.key=e.map(function(s){return"["+s+"]"}).join(""),this.scope=r,this.errors=o,this.expectedType=n};vn.prototype.parse=function(t,e,n,r,o){return o===void 0&&(o={}),e?this.concat(e,n,r)._parse(t,o):this._parse(t,o)},vn.prototype._parse=function(t,e){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);function n(u,d,c){return c==="assert"?new Me(d,[u]):c==="coerce"?new Ze(d,[u]):u}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if(typeof r!="string")return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var o=this.registry[r];if(o){var s=o.parse(t,this);if(!s)return null;if(this.expectedType){var a=this.expectedType,l=s.type;if((a.kind==="string"||a.kind==="number"||a.kind==="boolean"||a.kind==="object"||a.kind==="array")&&l.kind==="value")s=n(s,a,e.typeAnnotation||"assert");else if((a.kind==="color"||a.kind==="formatted"||a.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))s=n(s,a,e.typeAnnotation||"coerce");else if(this.checkSubtype(a,l))return null}if(!(s instanceof gi)&&s.type.kind!=="resolvedImage"&&xu(s)){var h=new Ai;try{s=new gi(s.type,s.evaluate(h))}catch(u){return this.error(u.message),null}}return s}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof t>"u"?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},vn.prototype.concat=function(t,e,n){var r=typeof t=="number"?this.path.concat(t):this.path,o=n?this.scope.concat(n):this.scope;return new vn(this.registry,r,e||null,o,this.errors)},vn.prototype.error=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=""+this.key+e.map(function(o){return"["+o+"]"}).join("");this.errors.push(new ci(r,t))},vn.prototype.checkSubtype=function(t,e){var n=Ko(t,e);return n&&this.error(n),n};function xu(i){if(i instanceof pn)return xu(i.boundExpression);if(i instanceof me&&i.name==="error")return!1;if(i instanceof gn)return!1;if(i instanceof ri)return!1;var t=i instanceof Ze||i instanceof Me,e=!0;return i.eachChild(function(n){t?e=e&&xu(n):e=e&&n instanceof gi}),e?La(i)&&yu(i,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function yg(i,t){for(var e=i.length-1,n=0,r=e,o=0,s,a;n<=r;)if(o=Math.floor((n+r)/2),s=i[o],a=i[o+1],s<=t){if(o===e||t<a)return o;n=o+1}else if(s>t)r=o-1;else throw new oe("Input is not a number.");return 0}var _n=function(t,e,n){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var r=0,o=n;r<o.length;r+=1){var s=o[r],a=s[0],l=s[1];this.labels.push(a),this.outputs.push(l)}};_n.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=[],o=null;e.expectedType&&e.expectedType.kind!=="value"&&(o=e.expectedType);for(var s=1;s<t.length;s+=2){var a=s===1?-1/0:t[s],l=t[s+1],h=s,u=s+1;if(typeof a!="number")return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(r.length&&r[r.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',h);var d=e.parse(l,u,o);if(!d)return null;o=o||d.type,r.push([a,d])}return new _n(o,n,r)},_n.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r);return n[s].evaluate(t)},_n.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},_n.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},_n.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var pb=Vr;function Vr(i,t,e,n){this.cx=3*i,this.bx=3*(e-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=n,this.p2x=e,this.p2y=n}Vr.prototype.sampleCurveX=function(i){return((this.ax*i+this.bx)*i+this.cx)*i},Vr.prototype.sampleCurveY=function(i){return((this.ay*i+this.by)*i+this.cy)*i},Vr.prototype.sampleCurveDerivativeX=function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},Vr.prototype.solveCurveX=function(i,t){typeof t>"u"&&(t=1e-6);var e,n,r,o,s;for(r=i,s=0;s<8;s++){if(o=this.sampleCurveX(r)-i,Math.abs(o)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r=r-o/a}if(e=0,n=1,r=i,r<e)return e;if(r>n)return n;for(;e<n;){if(o=this.sampleCurveX(r),Math.abs(o-i)<t)return r;i>o?e=r:n=r,r=(n-e)*.5+e}return r},Vr.prototype.solve=function(i,t){return this.sampleCurveY(this.solveCurveX(i,t))};function Be(i,t,e){return i*(1-e)+t*e}function vb(i,t,e){return new Rt(Be(i.r,t.r,e),Be(i.g,t.g,e),Be(i.b,t.b,e),Be(i.a,t.a,e))}function _b(i,t,e){return i.map(function(n,r){return Be(n,t[r],e)})}var yb=Object.freeze({__proto__:null,number:Be,color:vb,array:_b}),xg=.95047,bg=1,kg=1.08883,wg=4/29,qr=6/29,Mg=3*qr*qr,xb=qr*qr*qr,bb=Math.PI/180,kb=180/Math.PI;function bu(i){return i>xb?Math.pow(i,1/3):i/Mg+wg}function ku(i){return i>qr?i*i*i:Mg*(i-wg)}function wu(i){return 255*(i<=.0031308?12.92*i:1.055*Math.pow(i,1/2.4)-.055)}function Mu(i){return i/=255,i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Eg(i){var t=Mu(i.r),e=Mu(i.g),n=Mu(i.b),r=bu((.4124564*t+.3575761*e+.1804375*n)/xg),o=bu((.2126729*t+.7151522*e+.072175*n)/bg),s=bu((.0193339*t+.119192*e+.9503041*n)/kg);return{l:116*o-16,a:500*(r-o),b:200*(o-s),alpha:i.a}}function Cg(i){var t=(i.l+16)/116,e=isNaN(i.a)?t:t+i.a/500,n=isNaN(i.b)?t:t-i.b/200;return t=bg*ku(t),e=xg*ku(e),n=kg*ku(n),new Rt(wu(3.2404542*e-1.5371385*t-.4985314*n),wu(-.969266*e+1.8760108*t+.041556*n),wu(.0556434*e-.2040259*t+1.0572252*n),i.alpha)}function wb(i,t,e){return{l:Be(i.l,t.l,e),a:Be(i.a,t.a,e),b:Be(i.b,t.b,e),alpha:Be(i.alpha,t.alpha,e)}}function Mb(i){var t=Eg(i),e=t.l,n=t.a,r=t.b,o=Math.atan2(r,n)*kb;return{h:o<0?o+360:o,c:Math.sqrt(n*n+r*r),l:e,alpha:i.a}}function Eb(i){var t=i.h*bb,e=i.c,n=i.l;return Cg({l:n,a:Math.cos(t)*e,b:Math.sin(t)*e,alpha:i.alpha})}function Cb(i,t,e){var n=t-i;return i+e*(n>180||n<-180?n-360*Math.round(n/360):n)}function Sb(i,t,e){return{h:Cb(i.h,t.h,e),c:Be(i.c,t.c,e),l:Be(i.l,t.l,e),alpha:Be(i.alpha,t.alpha,e)}}var Fa={forward:Eg,reverse:Cg,interpolate:wb},Oa={forward:Mb,reverse:Eb,interpolate:Sb},Ee=function(t,e,n,r,o){this.type=t,this.operator=e,this.interpolation=n,this.input=r,this.labels=[],this.outputs=[];for(var s=0,a=o;s<a.length;s+=1){var l=a[s],h=l[0],u=l[1];this.labels.push(h),this.outputs.push(u)}};Ee.interpolationFactor=function(t,e,n,r){var o=0;if(t.name==="exponential")o=Eu(e,t.base,n,r);else if(t.name==="linear")o=Eu(e,1,n,r);else if(t.name==="cubic-bezier"){var s=t.controlPoints,a=new pb(s[0],s[1],s[2],s[3]);o=a.solve(Eu(e,1,n,r))}return o},Ee.parse=function(t,e){var n=t[0],r=t[1],o=t[2],s=t.slice(3);if(!Array.isArray(r)||r.length===0)return e.error("Expected an interpolation type expression.",1);if(r[0]==="linear")r={name:"linear"};else if(r[0]==="exponential"){var a=r[1];if(typeof a!="number")return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:a}}else if(r[0]==="cubic-bezier"){var l=r.slice(1);if(l.length!==4||l.some(function(_){return typeof _!="number"||_<0||_>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:l}}else return e.error("Unknown interpolation type "+String(r[0]),1,0);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(o=e.parse(o,2,L),!o)return null;var h=[],u=null;n==="interpolate-hcl"||n==="interpolate-lab"?u=Pi:e.expectedType&&e.expectedType.kind!=="value"&&(u=e.expectedType);for(var d=0;d<s.length;d+=2){var c=s[d],f=s[d+1],g=d+3,m=d+4;if(typeof c!="number")return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(h.length&&h[h.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',g);var p=e.parse(f,m,u);if(!p)return null;u=u||p.type,h.push([c,p])}return u.kind!=="number"&&u.kind!=="color"&&!(u.kind==="array"&&u.itemType.kind==="number"&&typeof u.N=="number")?e.error("Type "+qt(u)+" is not interpolatable."):new Ee(u,n,r,o,h)},Ee.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(e.length===1)return n[0].evaluate(t);var r=this.input.evaluate(t);if(r<=e[0])return n[0].evaluate(t);var o=e.length;if(r>=e[o-1])return n[o-1].evaluate(t);var s=yg(e,r),a=e[s],l=e[s+1],h=Ee.interpolationFactor(this.interpolation,r,a,l),u=n[s].evaluate(t),d=n[s+1].evaluate(t);return this.operator==="interpolate"?yb[this.type.kind.toLowerCase()](u,d,h):this.operator==="interpolate-hcl"?Oa.reverse(Oa.interpolate(Oa.forward(u),Oa.forward(d),h)):Fa.reverse(Fa.interpolate(Fa.forward(u),Fa.forward(d),h))},Ee.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e<n.length;e+=1){var r=n[e];t(r)}},Ee.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Ee.prototype.serialize=function(){var t;this.interpolation.name==="linear"?t=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?t=["linear"]:t=["exponential",this.interpolation.base]:t=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],n=0;n<this.labels.length;n++)e.push(this.labels[n],this.outputs[n].serialize());return e};function Eu(i,t,e,n){var r=n-e,o=i-e;return r===0?0:t===1?o/r:(Math.pow(t,o)-1)/(Math.pow(t,r)-1)}var Di=function(t,e){this.type=t,this.args=e};Di.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var n=null,r=e.expectedType;r&&r.kind!=="value"&&(n=r);for(var o=[],s=0,a=t.slice(1);s<a.length;s+=1){var l=a[s],h=e.parse(l,1+o.length,n,void 0,{typeAnnotation:"omit"});if(!h)return null;n=n||h.type,o.push(h)}var u=r&&o.some(function(d){return Ko(r,d.type)});return u?new Di(ht,o):new Di(n,o)},Di.prototype.evaluate=function(t){for(var e=null,n=0,r,o=0,s=this.args;o<s.length;o+=1){var a=s[o];if(n++,e=a.evaluate(t),e&&e instanceof fi&&!e.available&&(r||(r=e),e=null,n===this.args.length))return r;if(e!==null)break}return e},Di.prototype.eachChild=function(t){this.args.forEach(t)},Di.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},Di.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var yn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};yn.prototype.evaluate=function(t){return this.result.evaluate(t)},yn.prototype.eachChild=function(t){for(var e=0,n=this.bindings;e<n.length;e+=1){var r=n[e];t(r[1])}t(this.result)},yn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var n=[],r=1;r<t.length-1;r+=2){var o=t[r];if(typeof o!="string")return e.error("Expected string, but found "+typeof o+" instead.",r);if(/[^a-zA-Z0-9_]/.test(o))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);var s=e.parse(t[r+1],r+1);if(!s)return null;n.push([o,s])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,n);return a?new yn(n,a):null},yn.prototype.outputDefined=function(){return this.result.outputDefined()},yn.prototype.serialize=function(){for(var t=["let"],e=0,n=this.bindings;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t.push(o,s.serialize())}return t.push(this.result.serialize()),t};var tr=function(t,e,n){this.type=t,this.index=e,this.input=n};tr.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,L),r=e.parse(t[2],2,Ke(e.expectedType||ht));if(!n||!r)return null;var o=r.type;return new tr(o.itemType,n,r)},tr.prototype.evaluate=function(t){var e=this.index.evaluate(t),n=this.input.evaluate(t);if(e<0)throw new oe("Array index out of bounds: "+e+" < 0.");if(e>=n.length)throw new oe("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new oe("Array index must be an integer, but found "+e+" instead.");return n[e]},tr.prototype.eachChild=function(t){t(this.index),t(this.input)},tr.prototype.outputDefined=function(){return!1},tr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var er=function(t,e){this.type=lt,this.needle=t,this.haystack=e};er.parse=function(t,e){if(t.length!==3)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);return!n||!r?null:cu(n.type,[lt,mt,L,Ra,ht])?new er(n,r):e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead")},er.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(n==null)return!1;if(!Zo(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Zo(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");return n.indexOf(e)>=0},er.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},er.prototype.outputDefined=function(){return!0},er.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var xn=function(t,e,n){this.type=L,this.needle=t,this.haystack=e,this.fromIndex=n};xn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,ht);if(!n||!r)return null;if(!cu(n.type,[lt,mt,L,Ra,ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new xn(n,r,o):null}else return new xn(n,r)},xn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!Zo(e,["boolean","string","number","null"]))throw new oe("Expected first argument to be of type boolean, string, number or null, but found "+qt(te(e))+" instead.");if(!Zo(n,["string","array"]))throw new oe("Expected second argument to be of type array or string, but found "+qt(te(n))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return n.indexOf(e,r)}return n.indexOf(e)},xn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ir=function(t,e,n,r,o,s){this.inputType=t,this.type=e,this.input=n,this.cases=r,this.outputs=o,this.otherwise=s};ir.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!==1)return e.error("Expected an even number of arguments.");var n,r;e.expectedType&&e.expectedType.kind!=="value"&&(r=e.expectedType);for(var o={},s=[],a=2;a<t.length-1;a+=2){var l=t[a],h=t[a+1];Array.isArray(l)||(l=[l]);var u=e.concat(a);if(l.length===0)return u.error("Expected at least one branch label.");for(var d=0,c=l;d<c.length;d+=1){var f=c[d];if(typeof f!="number"&&typeof f!="string")return u.error("Branch labels must be numbers or strings.");if(typeof f=="number"&&Math.abs(f)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof f=="number"&&Math.floor(f)!==f)return u.error("Numeric branch labels must be integer values.");if(!n)n=te(f);else if(u.checkSubtype(n,te(f)))return null;if(typeof o[String(f)]<"u")return u.error("Branch labels must be unique.");o[String(f)]=s.length}var g=e.parse(h,a,r);if(!g)return null;r=r||g.type,s.push(g)}var m=e.parse(t[1],1,ht);if(!m)return null;var p=e.parse(t[t.length-1],t.length-1,r);return!p||m.type.kind!=="value"&&e.concat(1).checkSubtype(n,m.type)?null:new ir(n,r,m,o,s,p)},ir.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=te(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise;return n.evaluate(t)},ir.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ir.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},ir.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],n=Object.keys(this.cases).sort(),r=[],o={},s=0,a=n;s<a.length;s+=1){var l=a[s],h=o[this.cases[l]];h===void 0?(o[this.cases[l]]=r.length,r.push([this.cases[l],[l]])):r[h][1].push(l)}for(var u=function(m){return t.inputType.kind==="number"?Number(m):m},d=0,c=r;d<c.length;d+=1){var f=c[d],h=f[0],g=f[1];g.length===1?e.push(u(g[0])):e.push(g.map(u)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var nr=function(t,e,n){this.type=t,this.branches=e,this.otherwise=n};nr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!==0)return e.error("Expected an odd number of arguments.");var n;e.expectedType&&e.expectedType.kind!=="value"&&(n=e.expectedType);for(var r=[],o=1;o<t.length-1;o+=2){var s=e.parse(t[o],o,lt);if(!s)return null;var a=e.parse(t[o+1],o+1,n);if(!a)return null;r.push([s,a]),n=n||a.type}var l=e.parse(t[t.length-1],t.length-1,n);return l?new nr(n,r,l):null},nr.prototype.evaluate=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];if(o.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},nr.prototype.eachChild=function(t){for(var e=0,n=this.branches;e<n.length;e+=1){var r=n[e],o=r[0],s=r[1];t(o),t(s)}t(this.otherwise)},nr.prototype.outputDefined=function(){return this.branches.every(function(t){t[0];var e=t[1];return e.outputDefined()})&&this.otherwise.outputDefined()},nr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var bn=function(t,e,n,r){this.type=t,this.input=e,this.beginIndex=n,this.endIndex=r};bn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,ht),r=e.parse(t[2],2,L);if(!n||!r)return null;if(!cu(n.type,[Ke(ht),mt,ht]))return e.error("Expected first argument to be of type array or string, but found "+qt(n.type)+" instead");if(t.length===4){var o=e.parse(t[3],3,L);return o?new bn(n.type,n,r,o):null}else return new bn(n.type,n,r)},bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),n=this.beginIndex.evaluate(t);if(!Zo(e,["string","array"]))throw new oe("Expected first argument to be of type array or string, but found "+qt(te(e))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return e.slice(n,r)}return e.slice(n)},bn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},bn.prototype.outputDefined=function(){return!1},bn.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Sg(i,t){return i==="=="||i==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Tb(i,t,e){return t===e}function zb(i,t,e){return t!==e}function Rb(i,t,e){return t<e}function Ib(i,t,e){return t>e}function Pb(i,t,e){return t<=e}function Ab(i,t,e){return t>=e}function Tg(i,t,e,n){return n.compare(t,e)===0}function Db(i,t,e,n){return!Tg(i,t,e,n)}function Lb(i,t,e,n){return n.compare(t,e)<0}function Fb(i,t,e,n){return n.compare(t,e)>0}function Ob(i,t,e,n){return n.compare(t,e)<=0}function Nb(i,t,e,n){return n.compare(t,e)>=0}function Xr(i,t,e){var n=i!=="=="&&i!=="!=";return function(){function r(o,s,a){this.type=lt,this.lhs=o,this.rhs=s,this.collator=a,this.hasUntypedArgument=o.type.kind==="value"||s.type.kind==="value"}return r.parse=function(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");var l=s[0],h=a.parse(s[1],1,ht);if(!h)return null;if(!Sg(l,h.type))return a.concat(1).error('"'+l+`" comparisons are not supported for type '`+qt(h.type)+"'.");var u=a.parse(s[2],2,ht);if(!u)return null;if(!Sg(l,u.type))return a.concat(2).error('"'+l+`" comparisons are not supported for type '`+qt(u.type)+"'.");if(h.type.kind!==u.type.kind&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot compare types '"+qt(h.type)+"' and '"+qt(u.type)+"'.");n&&(h.type.kind==="value"&&u.type.kind!=="value"?h=new Me(u.type,[h]):h.type.kind!=="value"&&u.type.kind==="value"&&(u=new Me(h.type,[u])));var d=null;if(s.length===4){if(h.type.kind!=="string"&&u.type.kind!=="string"&&h.type.kind!=="value"&&u.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(d=a.parse(s[3],3,Ia),!d)return null}return new r(h,u,d)},r.prototype.evaluate=function(s){var a=this.lhs.evaluate(s),l=this.rhs.evaluate(s);if(n&&this.hasUntypedArgument){var h=te(a),u=te(l);if(h.kind!==u.kind||!(h.kind==="string"||h.kind==="number"))throw new oe('Expected arguments for "'+i+'" to be (string, string) or (number, number), but found ('+h.kind+", "+u.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var d=te(a),c=te(l);if(d.kind!=="string"||c.kind!=="string")return t(s,a,l)}return this.collator?e(s,a,l,this.collator.evaluate(s)):t(s,a,l)},r.prototype.eachChild=function(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)},r.prototype.outputDefined=function(){return!0},r.prototype.serialize=function(){var s=[i];return this.eachChild(function(a){s.push(a.serialize())}),s},r}()}var Gb=Xr("==",Tb,Tg),jb=Xr("!=",zb,Db),Bb=Xr("<",Rb,Lb),Ub=Xr(">",Ib,Fb),Vb=Xr("<=",Pb,Ob),qb=Xr(">=",Ab,Nb),rr=function(t,e,n,r,o){this.type=mt,this.number=t,this.locale=e,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=o};rr.parse=function(t,e){if(t.length!==3)return e.error("Expected two arguments.");var n=e.parse(t[1],1,L);if(!n)return null;var r=t[2];if(typeof r!="object"||Array.isArray(r))return e.error("NumberFormat options argument must be an object.");var o=null;if(r.locale&&(o=e.parse(r.locale,1,mt),!o))return null;var s=null;if(r.currency&&(s=e.parse(r.currency,1,mt),!s))return null;var a=null;if(r["min-fraction-digits"]&&(a=e.parse(r["min-fraction-digits"],1,L),!a))return null;var l=null;return r["max-fraction-digits"]&&(l=e.parse(r["max-fraction-digits"],1,L),!l)?null:new rr(n,o,s,a,l)},rr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},rr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},rr.prototype.outputDefined=function(){return!1},rr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var or=function(t){this.type=L,this.input=t};or.parse=function(t,e){if(t.length!==2)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?n.type.kind!=="array"&&n.type.kind!=="string"&&n.type.kind!=="value"?e.error("Expected argument of type string or array, but found "+qt(n.type)+" instead."):new or(n):null},or.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(typeof e=="string")return e.length;if(Array.isArray(e))return e.length;throw new oe("Expected value to be of type string or array, but found "+qt(te(e))+" instead.")},or.prototype.eachChild=function(t){t(this.input)},or.prototype.outputDefined=function(){return!1},or.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Cu={"==":Gb,"!=":jb,">":Ub,"<":Bb,">=":qb,"<=":Vb,array:Me,at:tr,boolean:Me,case:nr,coalesce:Di,collator:gn,format:cn,image:fn,in:er,"index-of":xn,interpolate:Ee,"interpolate-hcl":Ee,"interpolate-lab":Ee,length:or,let:yn,literal:gi,match:ir,number:Me,"number-format":rr,object:Me,slice:bn,step:_n,string:Me,"to-boolean":Ze,"to-color":Ze,"to-number":Ze,"to-string":Ze,var:pn,within:ri};function zg(i,t){var e=t[0],n=t[1],r=t[2],o=t[3];e=e.evaluate(i),n=n.evaluate(i),r=r.evaluate(i);var s=o?o.evaluate(i):1,a=cg(e,n,r,s);if(a)throw new oe(a);return new Rt(e/255*s,n/255*s,r/255*s,s)}function Rg(i,t){return i in t}function Su(i,t){var e=t[i];return typeof e>"u"?null:e}function Xb(i,t,e,n){for(;e<=n;){var r=e+n>>1;if(t[r]===i)return!0;t[r]>i?n=r-1:e=r+1}return!1}function sr(i){return{type:i}}me.register(Cu,{error:[Jx,[mt],function(i,t){var e=t[0];throw new oe(e.evaluate(i))}],typeof:[mt,[ht],function(i,t){var e=t[0];return qt(te(e.evaluate(i)))}],"to-rgba":[Ke(L,4),[Pi],function(i,t){var e=t[0];return e.evaluate(i).toArray()}],rgb:[Pi,[L,L,L],zg],rgba:[Pi,[L,L,L,L],zg],has:{type:lt,overloads:[[[mt],function(i,t){var e=t[0];return Rg(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Rg(e.evaluate(i),n.evaluate(i))}]]},get:{type:ht,overloads:[[[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.properties())}],[[mt,Ur],function(i,t){var e=t[0],n=t[1];return Su(e.evaluate(i),n.evaluate(i))}]]},"feature-state":[ht,[mt],function(i,t){var e=t[0];return Su(e.evaluate(i),i.featureState||{})}],properties:[Ur,[],function(i){return i.properties()}],"geometry-type":[mt,[],function(i){return i.geometryType()}],id:[ht,[],function(i){return i.id()}],zoom:[L,[],function(i){return i.globals.zoom}],pitch:[L,[],function(i){return i.globals.pitch||0}],"distance-from-center":[L,[],function(i){return i.distanceFromCenter()}],"heatmap-density":[L,[],function(i){return i.globals.heatmapDensity||0}],"line-progress":[L,[],function(i){return i.globals.lineProgress||0}],"sky-radial-progress":[L,[],function(i){return i.globals.skyRadialProgress||0}],accumulated:[ht,[],function(i){return i.globals.accumulated===void 0?null:i.globals.accumulated}],"+":[L,sr(L),function(i,t){for(var e=0,n=0,r=t;n<r.length;n+=1){var o=r[n];e+=o.evaluate(i)}return e}],"*":[L,sr(L),function(i,t){for(var e=1,n=0,r=t;n<r.length;n+=1){var o=r[n];e*=o.evaluate(i)}return e}],"-":{type:L,overloads:[[[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)-n.evaluate(i)}],[[L],function(i,t){var e=t[0];return-e.evaluate(i)}]]},"/":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)/n.evaluate(i)}],"%":[L,[L,L],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)%n.evaluate(i)}],ln2:[L,[],function(){return Math.LN2}],pi:[L,[],function(){return Math.PI}],e:[L,[],function(){return Math.E}],"^":[L,[L,L],function(i,t){var e=t[0],n=t[1];return Math.pow(e.evaluate(i),n.evaluate(i))}],sqrt:[L,[L],function(i,t){var e=t[0];return Math.sqrt(e.evaluate(i))}],log10:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN10}],ln:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))}],log2:[L,[L],function(i,t){var e=t[0];return Math.log(e.evaluate(i))/Math.LN2}],sin:[L,[L],function(i,t){var e=t[0];return Math.sin(e.evaluate(i))}],cos:[L,[L],function(i,t){var e=t[0];return Math.cos(e.evaluate(i))}],tan:[L,[L],function(i,t){var e=t[0];return Math.tan(e.evaluate(i))}],asin:[L,[L],function(i,t){var e=t[0];return Math.asin(e.evaluate(i))}],acos:[L,[L],function(i,t){var e=t[0];return Math.acos(e.evaluate(i))}],atan:[L,[L],function(i,t){var e=t[0];return Math.atan(e.evaluate(i))}],min:[L,sr(L),function(i,t){return Math.min.apply(Math,t.map(function(e){return e.evaluate(i)}))}],max:[L,sr(L),function(i,t){return Math.max.apply(Math,t.map(function(e){return e.evaluate(i)}))}],abs:[L,[L],function(i,t){var e=t[0];return Math.abs(e.evaluate(i))}],round:[L,[L],function(i,t){var e=t[0],n=e.evaluate(i);return n<0?-Math.round(-n):Math.round(n)}],floor:[L,[L],function(i,t){var e=t[0];return Math.floor(e.evaluate(i))}],ceil:[L,[L],function(i,t){var e=t[0];return Math.ceil(e.evaluate(i))}],"filter-==":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1];return i.properties()[e.value]===n.value}],"filter-id-==":[lt,[ht],function(i,t){var e=t[0];return i.id()===e.value}],"filter-type-==":[lt,[mt],function(i,t){var e=t[0];return i.geometryType()===e.value}],"filter-<":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<o}],"filter-id-<":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<r}],"filter->":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>o}],"filter-id->":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[lt,[mt,ht],function(i,t){var e=t[0],n=t[1],r=i.properties()[e.value],o=n.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[lt,[ht],function(i,t){var e=t[0],n=i.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[lt,[ht],function(i,t){var e=t[0];return e.value in i.properties()}],"filter-has-id":[lt,[],function(i){return i.id()!==null&&i.id()!==void 0}],"filter-type-in":[lt,[Ke(mt)],function(i,t){var e=t[0];return e.value.indexOf(i.geometryType())>=0}],"filter-id-in":[lt,[Ke(ht)],function(i,t){var e=t[0];return e.value.indexOf(i.id())>=0}],"filter-in-small":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return n.value.indexOf(i.properties()[e.value])>=0}],"filter-in-large":[lt,[mt,Ke(ht)],function(i,t){var e=t[0],n=t[1];return Xb(i.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)&&n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(!r.evaluate(i))return!1}return!0}]]},any:{type:lt,overloads:[[[lt,lt],function(i,t){var e=t[0],n=t[1];return e.evaluate(i)||n.evaluate(i)}],[sr(lt),function(i,t){for(var e=0,n=t;e<n.length;e+=1){var r=n[e];if(r.evaluate(i))return!0}return!1}]]},"!":[lt,[lt],function(i,t){var e=t[0];return!e.evaluate(i)}],"is-supported-script":[lt,[mt],function(i,t){var e=t[0],n=i.globals&&i.globals.isSupportedScript;return n?n(e.evaluate(i)):!0}],upcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toUpperCase()}],downcase:[mt,[mt],function(i,t){var e=t[0];return e.evaluate(i).toLowerCase()}],concat:[mt,sr(ht),function(i,t){return t.map(function(e){return Jo(e.evaluate(i))}).join("")}],"resolved-locale":[mt,[Ia],function(i,t){var e=t[0];return e.evaluate(i).resolvedLocale()}]});function Tu(i){return{result:"success",value:i}}function $r(i){return{result:"error",value:i}}function $b(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function Wb(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function Yb(i){return!!i.expression&&i.expression.interpolated}function Ig(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}var zu=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Ai,this._defaultValue=e?Jb(e):null,this._enumValues=e&&e.type==="enum"?e.values:null};zu.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s,a,l){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},zu.prototype.evaluate=function(t,e,n,r,o,s,a,l){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{var h=this.expression.evaluate(this._evaluator);if(h==null||typeof h=="number"&&h!==h)return this._defaultValue;if(this._enumValues&&!(h in this._enumValues))throw new oe("Expected value to be one of "+Object.keys(this._enumValues).map(function(u){return JSON.stringify(u)}).join(", ")+", but found "+JSON.stringify(h)+" instead.");return h}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,typeof console<"u"&&console.warn(u.message)),this._defaultValue}};function Kb(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Cu}function Ru(i,t){var e=new vn(Cu,[],t?Hb(t):void 0),n=e.parse(i,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return n?Tu(new zu(n,t)):$r(e.errors)}var Na=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!_u(e.expression)};Na.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Na.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)};var Qo=function(t,e,n,r){this.kind=t,this.zoomStops=n,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!_u(e.expression),this.interpolationType=r};Qo.prototype.evaluateWithoutErrorHandling=function(t,e,n,r,o,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,n,r,o,s)},Qo.prototype.evaluate=function(t,e,n,r,o,s){return this._styleExpression.evaluate(t,e,n,r,o,s)},Qo.prototype.interpolationFactor=function(t,e,n){return this.interpolationType?Ee.interpolationFactor(this.interpolationType,t,e,n):0};function Zb(i,t){if(i=Ru(i,t),i.result==="error")return i;var e=i.value.expression,n=La(e);if(!n&&!$b(t))return $r([new ci("","data expressions not supported")]);var r=yu(e,["zoom","pitch","distance-from-center"]);if(!r&&!Wb(t))return $r([new ci("","zoom expressions not supported")]);var o=Ga(e);if(!o&&!r)return $r([new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof ci)return $r([o]);if(o instanceof Ee&&!Yb(t))return $r([new ci("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Tu(n?new Na("constant",i.value):new Na("source",i.value));var s=o instanceof Ee?o.interpolation:void 0;return Tu(n?new Qo("camera",i.value,o.labels,s):new Qo("composite",i.value,o.labels,s))}function Ga(i){var t=null;if(i instanceof yn)t=Ga(i.result);else if(i instanceof Di)for(var e=0,n=i.args;e<n.length;e+=1){var r=n[e];if(t=Ga(r),t)break}else(i instanceof _n||i instanceof Ee)&&i.input instanceof me&&i.input.name==="zoom"&&(t=i);return t instanceof ci||i.eachChild(function(o){var s=Ga(o);s instanceof ci?t=s:!t&&s?t=new ci("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new ci("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Hb(i){var t={color:Pi,string:mt,number:L,enum:mt,boolean:lt,formatted:Pa,resolvedImage:Yo};return i.type==="array"?Ke(t[i.value]||ht,i.length):t[i.type]}function Jb(i){return i.type==="color"&&(Ig(i.default)||Array.isArray(i.default))?new Rt(0,0,0,0):i.type==="color"?Rt.parse(i.default)||null:i.default===void 0?null:i.default}function Qb(i){return i instanceof Number||i instanceof String||i instanceof Boolean?i.valueOf():i}function Iu(i){if(Array.isArray(i))return i.map(Iu);if(i instanceof Object&&!(i instanceof Number||i instanceof String||i instanceof Boolean)){var t={};for(var e in i)t[e]=Iu(i[e]);return t}return Qb(i)}var Pg={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Ag(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(var t=0,e=i.slice(1);t<e.length;t+=1){var n=e[t];if(!Ag(n)&&typeof n!="boolean")return!1}return!0;default:return!0}}function tk(i,t){if(t===void 0&&(t="fill"),i==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};Ag(i)||(i=ja(i));var e=i,n=!0;try{n=ek(e)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
47
+ This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
48
+ and paste the contents of this message in the report.
49
+ Thank you!
50
+ Filter Expression:
51
+ `+JSON.stringify(e,null,2)+`
52
+ `)}var r=Pg["filter_"+t],o=Ru(n,r),s=null;if(o.result==="error")throw new Error(o.value.map(function(d){return d.key+": "+d.message}).join(", "));s=function(d,c,f){return o.value.evaluate(d,c,{},f)};var a=null,l=null;if(n!==e){var h=Ru(e,r);if(h.result==="error")throw new Error(h.value.map(function(d){return d.key+": "+d.message}).join(", "));a=function(d,c,f,g,m){return h.value.evaluate(d,c,{},f,void 0,void 0,g,m)},l=!La(h.value.expression)}s=s;var u=Fg(n);return{filter:s,dynamicFilter:a||void 0,needGeometry:u,needFeature:!!l}}function ek(i){if(!Wr(i))return i;var t=Iu(i);return Lg(t),t=Dg(t),t}function Dg(i){if(!Array.isArray(i))return i;var t=rk(i);return t===!0?t:t.map(function(e){return Dg(e)})}function Lg(i){var t=!1,e=[];if(i[0]==="case"){for(var n=1;n<i.length-1;n+=2)t=t||Wr(i[n]),e.push(i[n+1]);e.push(i[i.length-1])}else if(i[0]==="match"){t=t||Wr(i[1]);for(var r=2;r<i.length-1;r+=2)e.push(i[r+1]);e.push(i[i.length-1])}else if(i[0]==="step"){t=t||Wr(i[1]);for(var o=1;o<i.length-1;o+=2)e.push(i[o+1])}t&&(i.length=0,i.push.apply(i,["any"].concat(e)));for(var s=1;s<i.length;s++)Lg(i[s])}function Wr(i){if(!Array.isArray(i))return!1;if(ik(i[0]))return!0;for(var t=1;t<i.length;t++){var e=i[t];if(Wr(e))return!0}return!1}function ik(i){return i==="pitch"||i==="distance-from-center"}var nk=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function rk(i){if(nk.has(i[0]))for(var t=1;t<i.length;t++){var e=i[t];if(Wr(e))return!0}return i}function ok(i,t){return i<t?-1:i>t?1:0}function Fg(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(var t=1;t<i.length;t++)if(Fg(i[t]))return!0;return!1}function ja(i){if(!i)return!0;var t=i[0];if(i.length<=1)return t!=="any";var e=t==="=="?Pu(i[1],i[2],"=="):t==="!="?Ba(Pu(i[1],i[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Pu(i[1],i[2],t):t==="any"?sk(i.slice(1)):t==="all"?["all"].concat(i.slice(1).map(ja)):t==="none"?["all"].concat(i.slice(1).map(ja).map(Ba)):t==="in"?Og(i[1],i.slice(2)):t==="!in"?Ba(Og(i[1],i.slice(2))):t==="has"?Ng(i[1]):t==="!has"?Ba(Ng(i[1])):t==="within"?i:!0;return e}function Pu(i,t,e){switch(i){case"$type":return["filter-type-"+e,t];case"$id":return["filter-id-"+e,t];default:return["filter-"+e,i,t]}}function sk(i){return["any"].concat(i.map(ja))}function Og(i,t){if(t.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(function(e){return typeof e!=typeof t[0]})?["filter-in-large",i,["literal",t.sort(ok)]]:["filter-in-small",i,["literal",t]]}}function Ng(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function Ba(i){return["!",i]}var ak=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function lk(i,t){var e={};for(var n in i)n!=="ref"&&(e[n]=i[n]);return ak.forEach(function(r){r in t&&(e[r]=t[r])}),e}function hk(i){i=i.slice();for(var t=Object.create(null),e=0;e<i.length;e++)t[i[e].id]=i[e];for(var n=0;n<i.length;n++)"ref"in i[n]&&(i[n]=lk(i[n],t[i[n].ref]));return i}var Gg={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},ts=" ",jg=/(italic|oblique)$/i,Bg={},Ug=function(i,t,e){var n=Bg[i];if(!n){Array.isArray(i)||(i=[i]);for(var r=400,o="normal",s=[],a,l,h=0,u=i.length;h<u;++h){var d=i[h],c=d.split(" "),f=c[c.length-1].toLowerCase();f=="normal"||f=="italic"||f=="oblique"?(o=l?o:f,c.pop(),f=c[c.length-1].toLowerCase()):jg.test(f)&&(f=f.replace(jg,""),o=l?o:c[c.length-1].replace(f,""));for(var g in Gg){var m=c.length>1?c[c.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||m+"-"+f==g){r=a?r:Gg[g],c.pop(),m&&g.startsWith(m)&&c.pop();break}}!a&&typeof f=="number"&&(r=f);var p=c.join(ts).replace("Klokantech Noto Sans","Noto Sans");p.indexOf(ts)!==-1&&(p='"'+p+'"'),s.push(p)}n=Bg[i]=[o,r,s]}return n[0]+ts+n[1]+ts+t+"px"+(e?"/"+e:"")+ts+n[2]};function Au(i){return i*Math.PI/180}var uk=function(){for(var i=[],t=78271.51696402048;i.length<=24;t/=2)i.push(t);return i}();function Vg(i,t){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(i,t);var e=document.createElement("canvas");return e.width=i,e.height=t,e}function dk(i,t){for(var e=0,n=t.length;e<n;++e){var r=t[e];if(r<i&&e+1<n){var o=t[e]/t[e+1];return e+Math.log(t[e]/i)/Math.log(o)}}return n-1}var ck=Array(256).join("\u200A");function Du(i,t){if(t>=.05){for(var e="",n=i.split(`
53
+ `),r=ck.slice(0,Math.round(t/.1)),o=0,s=n.length;o<s;++o)o>0&&(e+=`
54
+ `),e+=n[o].split("").join(r);return e}return i}var Lu;function qg(){return Lu||(Lu=Vg(1,1).getContext("2d")),Lu}function ar(i,t){return qg().measureText(i).width+(i.length-1)*t}var Xg={};function Fu(i,t,e,n){if(i.indexOf(`
55
+ `)!==-1){for(var r=i.split(`
56
+ `),o=[],s=0,a=r.length;s<a;++s)o.push(Fu(r[s],t,e,n));return o.join(`
57
+ `)}var l=e+","+t+","+i+","+n,h=Xg[l];if(!h){var u=i.split(" ");if(u.length>1){var d=qg();d.font=t;for(var c=d.measureText("M").width,f=c*e,g="",m=[],p=0,_=u.length;p<_;++p){var v=u[p],y=g+(g?" ":"")+v;ar(y,n)<=f?g=y:(g&&m.push(g),g=v)}g&&m.push(g);for(var x=0,k=m.length;x<k&&k>1;++x){var w=m[x];if(ar(w,n)<f*.35){var C=x>0?ar(m[x-1],n):1/0,M=x<k-1?ar(m[x+1],n):1/0;m.splice(x,1),k-=1,C<M?(m[x-1]+=" "+w,x-=1):m[x]=w+" "+m[x]}}for(var S=0,R=m.length-1;S<R;++S){var A=m[S],G=m[S+1];if(ar(A,n)>f*.7&&ar(G,n)<f*.6){var P=A.split(" "),at=P.pop();ar(at,n)<f*.2&&(m[S]=P.join(" "),m[S+1]=at+" "+G),R-=1}}h=m.join(`
58
+ `)}else h=i;h=Du(h,n),Xg[l]=h}return h}var fk={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},gk={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},mk=function(i,t){var e=Zb(i,t);if(e.result==="error")throw new Error(e.value.map(function(n){return n.key+": "+n.message}).join(", "));return e.value},Ou={},Ua={zoom:0},Va,Nu;function it(i,t,e,n,r,o,s){var a=i.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[a]||(o[a]={});var l=o[a];if(!l[e]){var h=(i[t]||Ou)[e],u=Pg[t+"_"+i.type][e];h===void 0&&(h=u.default);var d=Kb(h);if(!d&&Ig(h)&&(h=$x(h,u),d=!0),d){var c=mk(h,u);l[e]=c.evaluate.bind(c)}else u.type=="color"&&(h=Rt.parse(h)),l[e]=function(){return h}}return Ua.zoom=n,l[e](Ua,r,s)}function pk(i,t,e,n){var r=it(i,"layout","icon-allow-overlap",t,e,n);if(!r)return"declutter";var o=it(i,"layout","icon-ignore-placement",t,e,n);return o?"none":"obstacle"}function vk(i,t,e,n,r){return r||console.warn("No filterCache provided to evaluateFilter()"),i in r||(r[i]=tk(t).filter),Ua.zoom=n,r[i](Ua,e)}function lr(i,t){if(i){if(i.a===0||t===0)return;var e=i.a;return t=t===void 0?1:t,e===0?"transparent":"rgba("+Math.round(i.r*255/e)+","+Math.round(i.g*255/e)+","+Math.round(i.b*255/e)+","+e*t+")"}return i}var _k=/\{[^{}}]*\}/g;function Gu(i,t){return i.replace(_k,function(e){return t[e.slice(1,-1)]||""})}function yk(i,t,e,n,r,o,s){if(n===void 0&&(n=uk),r===void 0&&(r=void 0),o===void 0&&(o=void 0),s===void 0&&(s=void 0),typeof t=="string"&&(t=JSON.parse(t)),t.version!=8)throw new Error("glStyle version 8 required.");var a,l;if(o){if(typeof Image<"u"){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){a=h,l=[h.width,h.height],i.changed(),h.onload=null},h.src=o}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:o}),u.addEventListener("message",function(U){U.data.action==="imageLoaded"&&U.data.src===o&&(a=U.data.image,l=[a.width,a.height])})}}for(var d=hk(t.layers),c={},f=[],g={},m={},p={},_={},v,y=0,x=d.length;y<x;++y){var k=d[y],w=k.id;if(typeof e=="string"&&k.source==e||e.indexOf(w)!==-1){var C=k["source-layer"];if(v){if(k.source!==v)throw new Error('Layer "'+w+'" does not use source "'+v)}else{v=k.source;var M=t.sources[v];if(!M)throw new Error('Source "'+v+'" is not defined');var S=M.type;if(S!=="vector"&&S!=="geojson")throw new Error('Source "'+v+'" is not of type "vector" or "geojson", but "'+S+'"')}var R=c[C];R||(R=[],c[C]=R),R.push({layer:k,index:y}),f.push(w)}}var A=new ke,G=new ge,P=[],at=function(j,U){var O=j.getProperties(),W=c[O.layer];if(!!W){var D=n.indexOf(U);D==-1&&(D=dk(U,n));for(var Z=fk[j.getGeometry().getType()],V={properties:O,type:Z},z=i.get("mapbox-featurestate")[j.getId()],ot=-1,b=0,T=W.length;b<T;++b){var Y=W[b],E=Y.layer,H=E.id,$=E.layout||Ou,vt=E.paint||Ou;if(!($.visibility==="none"||"minzoom"in E&&D<E.minzoom||"maxzoom"in E&&D>=E.maxzoom)){var Ct=E.filter;if(!Ct||vk(H,Ct,V,D,_)){var _t=void 0,Et=void 0,Lt=void 0,Dt=void 0,jt=void 0,F=void 0,ut=Y.index;if(Z==3&&(E.type=="fill"||E.type=="fill-extrusion"))if(Et=it(E,"paint",E.type+"-opacity",D,V,p,z),E.type+"-pattern"in vt){var pt=it(E,"paint",E.type+"-pattern",D,V,p,z);if(pt){var kt=typeof pt=="string"?Gu(pt,O):pt.toString();if(a&&r&&r[kt]){++ot,F=P[ot],(!F||!F.getFill()||F.getStroke()||F.getText())&&(F=new le({fill:new ge}),P[ot]=F),Lt=F.getFill(),F.setZIndex(ut);var yt=kt+"."+Et,st=m[yt];if(!st){var nt=r[kt],wt=Vg(nt.width,nt.height),zt=wt.getContext("2d");zt.globalAlpha=Et,zt.drawImage(a,nt.x,nt.y,nt.width,nt.height,0,0,nt.width,nt.height),st=zt.createPattern(wt,"repeat"),m[yt]=st}Lt.setColor(st)}}}else _t=lr(it(E,"paint",E.type+"-color",D,V,p,z),Et),E.type+"-outline-color"in vt&&(jt=lr(it(E,"paint",E.type+"-outline-color",D,V,p,z),Et)),jt||(jt=_t),(_t||jt)&&(++ot,F=P[ot],(!F||_t&&!F.getFill()||!_t&&F.getFill()||jt&&!F.getStroke()||!jt&&F.getStroke()||F.getText())&&(F=new le({fill:_t?new ge:void 0,stroke:jt?new ke:void 0}),P[ot]=F),_t&&(Lt=F.getFill(),Lt.setColor(_t)),jt&&(Dt=F.getStroke(),Dt.setColor(jt),Dt.setWidth(.5)),F.setZIndex(ut));if(Z!=1&&E.type=="line"){_t=!("line-pattern"in vt)&&"line-color"in vt?lr(it(E,"paint","line-color",D,V,p,z),it(E,"paint","line-opacity",D,V,p,z)):void 0;var Bt=it(E,"paint","line-width",D,V,p,z);_t&&Bt>0&&(++ot,F=P[ot],(!F||!F.getStroke()||F.getFill()||F.getText())&&(F=new le({stroke:new ke}),P[ot]=F),Dt=F.getStroke(),Dt.setLineCap(it(E,"layout","line-cap",D,V,p,z)),Dt.setLineJoin(it(E,"layout","line-join",D,V,p,z)),Dt.setMiterLimit(it(E,"layout","line-miter-limit",D,V,p,z)),Dt.setColor(_t),Dt.setWidth(Bt),Dt.setLineDash(vt["line-dasharray"]?it(E,"paint","line-dasharray",D,V,p,z).map(function(Ne){return Ne*Bt}):null),F.setZIndex(ut))}var xt=!1,dt=null,Ft=0,St=void 0,ct=void 0,ue=void 0;if((Z==1||Z==2)&&"icon-image"in $){var Ve=it(E,"layout","icon-image",D,V,p,z);if(Ve){St=typeof Ve=="string"?Gu(Ve,O):Ve.toString();var $t=void 0;if(a&&r&&r[St]){var ze=it(E,"layout","icon-rotation-alignment",D,V,p,z);if(Z==2){var Ut=j.getGeometry();if(Ut.getFlatMidpoint||Ut.getFlatMidpoints){var Ht=Ut.getExtent(),Tn=Math.sqrt(Math.max(Math.pow((Ht[2]-Ht[0])/U,2),Math.pow((Ht[3]-Ht[1])/U,2)));if(Tn>150){var ae=Ut.getType()==="MultiLineString"?Ut.getFlatMidpoints():Ut.getFlatMidpoint();Nu||(Va=[NaN,NaN],Nu=new Xh("Point",Va,[],{},null)),$t=Nu,Va[0]=ae[0],Va[1]=ae[1];var qe=it(E,"layout","symbol-placement",D,V,p,z);if(qe==="line"&&ze==="map")for(var ve=Ut.getStride(),Oe=Ut.getFlatCoordinates(),Ni=0,sl=Oe.length-ve;Ni<sl;Ni+=ve){var de=Oe[Ni],bi=Oe[Ni+1],_e=Oe[Ni+ve],Xe=Oe[Ni+ve+1],Re=Math.min(de,_e),oo=Math.min(bi,Xe),so=Math.max(de,_e),ye=Math.max(bi,Xe);if(ae[0]>=Re&&ae[0]<=so&&ae[1]>=oo&&ae[1]<=ye){Ft=Math.atan2(bi-Xe,_e-de);break}}}}}if(Z!==2||$t){var Ie=it(E,"layout","icon-size",D,V,p,z),ee=vt["icon-color"]!==void 0?it(E,"paint","icon-color",D,V,p,z):null;if(!ee||ee.a!==0){var xs=St+"."+Ie;if(ee!==null&&(xs+="."+ee),ct=g[xs],!ct){var bs=r[St],fC=pk(E,D,V,p),dd=void 0;"icon-offset"in $&&(dd=it(E,"layout","icon-offset",D,V,p,z),dd[1]*=-1),ct=new ga({color:ee?[ee.r*255,ee.g*255,ee.b*255,ee.a]:void 0,img:a,imgSize:l,size:[bs.width,bs.height],offset:[bs.x,bs.y],rotateWithView:ze==="map",scale:Ie/bs.pixelRatio,displacement:dd,declutterMode:fC}),g[xs]=ct}}ct&&(++ot,F=P[ot],(!F||!F.getImage()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setGeometry($t),ct.setRotation(Ft+Au(it(E,"layout","icon-rotate",D,V,p,z))),ct.setOpacity(it(E,"paint","icon-opacity",D,V,p,z)),ct.setAnchor(gk[it(E,"layout","icon-anchor",D,V,p,z)]),F.setImage(ct),dt=F.getText(),F.setText(void 0),F.setZIndex(ut),xt=!0,ue=!1)}else ue=!0}}}if(Z==1&&E.type==="circle"){++ot,F=P[ot],(!F||!F.getImage()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F);var yp="circle-radius"in vt?it(E,"paint","circle-radius",D,V,p,z):5,cd=lr(it(E,"paint","circle-stroke-color",D,V,p,z),it(E,"paint","circle-stroke-opacity",D,V,p,z)),fd=lr(it(E,"paint","circle-color",D,V,p,z),it(E,"paint","circle-opacity",D,V,p,z)),gd=it(E,"paint","circle-stroke-width",D,V,p,z),xp=yp+"."+cd+"."+fd+"."+gd;ct=g[xp],ct||(ct=new Hn({radius:yp,stroke:cd&&gd>0?new ke({width:gd,color:cd}):void 0,fill:fd?new ge({color:fd}):void 0,declutterMode:"none"}),g[xp]=ct),F.setImage(ct),dt=F.getText(),F.setText(void 0),F.setGeometry(void 0),F.setZIndex(ut),xt=!0}var ce=void 0,ks=void 0,ws=void 0,zn=void 0,Ms=void 0,md=void 0;if("text-field"in $){zn=Math.round(it(E,"layout","text-size",D,V,p,z));var pd=it(E,"layout","text-font",D,V,p,z);ws=it(E,"layout","text-line-height",D,V,p,z),ks=Ug(s?s(pd):pd,zn,ws),ks.includes("sans-serif")||(ks+=",sans-serif"),Ms=it(E,"layout","text-letter-spacing",D,V,p,z),md=it(E,"layout","text-max-width",D,V,p,z);var ao=it(E,"layout","text-field",D,V,p,z);typeof ao=="object"&&ao.sections?ao.sections.length===1?ce=ao.toString():ce=ao.sections.reduce(function(Ne,Rn,yC){var Tp=Rn.fontStack?Rn.fontStack.split(","):pd,kd=Ug(s?s(Tp):Tp,zn*(Rn.scale||1),ws),lo=Rn.text;if(lo===`
59
+ `)return Ne.push(`
60
+ `,""),Ne;if(Z==2){Ne.push(Du(lo,Ms),kd);return}lo=Fu(lo,kd,md,Ms).split(`
61
+ `);for(var ll=0,mC=lo.length;ll<mC;++ll)ll>0&&Ne.push(`
62
+ `,""),Ne.push(lo[ll],kd);return Ne},[]):ce=Gu(ao,O).trim(),Et=it(E,"paint","text-opacity",D,V,p,z)}if(ce&&Et&&!ue){xt||(++ot,F=P[ot],(!F||!F.getText()||F.getFill()||F.getStroke())&&(F=new le,P[ot]=F),F.setImage(void 0),F.setGeometry(void 0)),F.getText()||F.setText(dt||new cf({padding:[2,2,2,2]})),dt=F.getText();var bp=$["text-transform"];bp=="uppercase"?ce=Array.isArray(ce)?ce.map(function(Ne,Rn){return Rn%2?Ne:Ne.toUpperCase()}):ce.toUpperCase():bp=="lowercase"&&(ce=Array.isArray(ce)?ce.map(function(Ne,Rn){return Rn%2?Ne:Ne.toLowerCase()}):ce.toLowerCase());var kp=Array.isArray(ce)?ce:Z==2?Du(ce,Ms):Fu(ce,ks,md,Ms);dt.setText(kp),dt.setFont(ks),dt.setRotation(Au(it(E,"layout","text-rotate",D,V,p,z)));var al=it(E,"layout","text-anchor",D,V,p,z),vd=xt||Z==1?"point":it(E,"layout","symbol-placement",D,V,p,z);dt.setPlacement(vd),dt.setOverflow(vd==="point");var dr=it(E,"paint","text-halo-width",D,V,p,z),wp=it(E,"layout","text-offset",D,V,p,z),Mp=it(E,"paint","text-translate",D,V,p,z),_d=0,yd=0;if(vd=="point"){var xd="center";al.indexOf("left")!==-1?(xd="left",yd=dr):al.indexOf("right")!==-1&&(xd="right",yd=-dr),dt.setTextAlign(xd);var gC=it(E,"layout","text-rotation-alignment",D,V,p,z);dt.setRotateWithView(gC=="map")}else dt.setMaxAngle(Au(it(E,"layout","text-max-angle",D,V,p,z))*ce.length/kp.length),dt.setTextAlign(),dt.setRotateWithView(!1);var bd="middle";al.indexOf("bottom")==0?(bd="bottom",_d=-dr-.5*(ws-1)*zn):al.indexOf("top")==0&&(bd="top",_d=dr+.5*(ws-1)*zn),dt.setTextBaseline(bd);var Ep=it(E,"layout","text-justify",D,V,p,z);dt.setJustify(Ep==="auto"?void 0:Ep),dt.setOffsetX(wp[0]*zn+yd+Mp[0]),dt.setOffsetY(wp[1]*zn+_d+Mp[1]),G.setColor(lr(it(E,"paint","text-color",D,V,p,z),Et)),dt.setFill(G);var Cp=lr(it(E,"paint","text-halo-color",D,V,p,z),Et);if(Cp){A.setColor(Cp),dr*=2;var Sp=.5*zn;A.setWidth(dr<=Sp?dr:Sp),dt.setStroke(A)}else dt.setStroke(void 0);var Es=it(E,"layout","text-padding",D,V,p,z),Cs=dt.getPadding();Es!==Cs[0]&&(Cs[0]=Es,Cs[1]=Es,Cs[2]=Es,Cs[3]=Es),F.setZIndex(ut)}}}}if(ot>-1)return P.length=ot+1,P}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Zn;class xk extends Gx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:og({extent:Ta(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const $g=xk,Wg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class bk extends $g{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Wg];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",r=t.url!==void 0?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:r,wrapX:t.wrapX,zDirection:t.zDirection})}}const kk=bk;function Yg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Yg(i,n))([...t,...e])}const wk=Array.isArray;function Mk(i,t,e){if(!wk(e))throw new TypeError("reduce: list must be array or iterable");let n=0;const r=e.length;for(;n<r;)t=i(t,e[n],n,e),n++;return t}const Ek=Yg(Mk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Kg(i,t){return arguments.length===1?e=>Kg(i,e):i*t}Ek(Kg,1);function Zg(i,t){if(arguments.length===1)return r=>Zg(i,r);if(i<1)throw new Error("First argument to splitEvery must be a positive integer");const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,n+=i));return e}const Yr=new hn({features:[],wrapX:!1}),Sk=new Qn({source:Yr,style:new le({image:new Hn({radius:3,fill:new ge({color:"grey"})})})});function Hg(i,t){var n,r,o;const e=i&&((o=(r=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:r.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:o.flatMap(s=>s.flatCoordinates_));if(e)return Zg(2,e).forEach((s,a)=>{Yr.addFeature(new Ti({geometry:new ni(s),i:a}))})}const Jg={color:"#ff0000",width:3},Tk=new ke(Jg),zk=new ke({...Jg,lineDash:[2,8]}),Qg=new ge({color:"rgba(255, 0, 0, 0.1)"}),tm=new ma({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),em=new Hn({radius:6,fill:new ge({color:"#ff0000"})}),Rk=new le({image:new ma({fill:new ge({color:"#fff"}),stroke:new ke({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof Wn){const e=t.getCoordinates()[0];return new Ao(e)}else return}}),Li=new hn,im=new Qn({source:Li,style:[new le({fill:Qg,stroke:Tk}),Rk]});function Ik(i){return new tx({source:Li,type:"Polygon",style:new le({stroke:zk,fill:Qg,image:i==="crosshair"?tm:em})})}const nm=new sx({source:Yr,pixelTolerance:15});function Pk(i){return new rx({source:Li,style:new le({image:i==="crosshair"?tm:em})})}/**
36
63
  * splaytree v3.1.0
37
64
  * Fast Splay tree for Node and browser
38
65
  *
39
66
  * @author Alexander Milevski <info@w8r.name>
40
67
  * @license MIT
41
68
  * @preserve
42
- */var Bi=function(){function r(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null}return r}();function rb(r,e){return r>e?1:r<e?-1:0}function Ui(r,e,t){for(var i=new Bi(null,null),n=i,o=i;;){var a=t(r,e.key);if(a<0){if(e.left===null)break;if(t(r,e.left.key)<0){var s=e.left;if(e.left=s.right,s.right=e,e=s,e.left===null)break}o.left=e,o=e,e=e.left}else if(a>0){if(e.right===null)break;if(t(r,e.right.key)>0){var s=e.right;if(e.right=s.left,s.left=e,e=s,e.right===null)break}n.right=e,n=e,e=e.right}else break}return n.right=e.left,o.left=e.right,e.left=i.right,e.right=i.left,e}function Zl(r,e,t,i){var n=new Bi(r,e);if(t===null)return n.left=n.right=null,n;t=Ui(r,t,i);var o=i(r,t.key);return o<0?(n.left=t.left,n.right=t,t.left=null):o>=0&&(n.right=t.right,n.left=t,t.right=null),n}function tp(r,e,t){var i=null,n=null;if(e){e=Ui(r,e,t);var o=t(e.key,r);o===0?(i=e.left,n=e.right):o<0?(n=e.right,e.right=null,i=e):(i=e.left,e.left=null,n=e)}return{left:i,right:n}}function ob(r,e,t){return e===null?r:(r===null||(e=Ui(r.key,e,t),e.left=r),e)}function Kl(r,e,t,i,n){if(r){i(""+e+(t?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+n(r)+`
43
- `);var o=e+(t?" ":"\u2502 ");r.left&&Kl(r.left,o,!1,i,n),r.right&&Kl(r.right,o,!0,i,n)}}var Hl=function(){function r(e){e===void 0&&(e=rb),this._root=null,this._size=0,this._comparator=e}return r.prototype.insert=function(e,t){return this._size++,this._root=Zl(e,t,this._root,this._comparator)},r.prototype.add=function(e,t){var i=new Bi(e,t);this._root===null&&(i.left=i.right=null,this._size++,this._root=i);var n=this._comparator,o=Ui(e,this._root,n),a=n(e,o.key);return a===0?this._root=o:(a<0?(i.left=o.left,i.right=o,o.left=null):a>0&&(i.right=o.right,i.left=o,o.right=null),this._size++,this._root=i),this._root},r.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},r.prototype._remove=function(e,t,i){var n;if(t===null)return null;t=Ui(e,t,i);var o=i(e,t.key);return o===0?(t.left===null?n=t.right:(n=Ui(e,t.left,i),n.right=t.right),this._size--,n):t},r.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Ui(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},r.prototype.findStatic=function(e){for(var t=this._root,i=this._comparator;t;){var n=i(e,t.key);if(n===0)return t;n<0?t=t.left:t=t.right}return null},r.prototype.find=function(e){return this._root&&(this._root=Ui(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},r.prototype.contains=function(e){for(var t=this._root,i=this._comparator;t;){var n=i(e,t.key);if(n===0)return!0;n<0?t=t.left:t=t.right}return!1},r.prototype.forEach=function(e,t){for(var i=this._root,n=[],o=!1;!o;)i!==null?(n.push(i),i=i.left):n.length!==0?(i=n.pop(),e.call(t,i),i=i.right):o=!0;return this},r.prototype.range=function(e,t,i,n){for(var o=[],a=this._comparator,s=this._root,l;o.length!==0||s;)if(s)o.push(s),s=s.left;else{if(s=o.pop(),l=a(s.key,t),l>0)break;if(a(s.key,e)>=0&&i.call(n,s))return this;s=s.right}return this},r.prototype.keys=function(){var e=[];return this.forEach(function(t){var i=t.key;return e.push(i)}),e},r.prototype.values=function(){var e=[];return this.forEach(function(t){var i=t.data;return e.push(i)}),e},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},r.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},r.prototype.at=function(e){for(var t=this._root,i=!1,n=0,o=[];!i;)if(t)o.push(t),t=t.left;else if(o.length>0){if(t=o.pop(),n===e)return t;n++,t=t.right}else i=!0;return null},r.prototype.next=function(e){var t=this._root,i=null;if(e.right){for(i=e.right;i.left;)i=i.left;return i}for(var n=this._comparator;t;){var o=n(e.key,t.key);if(o===0)break;o<0?(i=t,t=t.left):t=t.right}return i},r.prototype.prev=function(e){var t=this._root,i=null;if(e.left!==null){for(i=e.left;i.right;)i=i.right;return i}for(var n=this._comparator;t;){var o=n(e.key,t.key);if(o===0)break;o<0?t=t.left:(i=t,t=t.right)}return i},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return sb(this._root)},r.prototype.load=function(e,t,i){t===void 0&&(t=[]),i===void 0&&(i=!1);var n=e.length,o=this._comparator;if(i&&Ql(e,t,0,n-1,o),this._root===null)this._root=$l(e,t,0,n),this._size=n;else{var a=lb(this.toList(),ab(e,t),o);n=this._size+n,this._root=Jl({head:a},0,n)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(e){e===void 0&&(e=function(i){return String(i.key)});var t=[];return Kl(this._root,"",!0,function(i){return t.push(i)},e),t.join("")},r.prototype.update=function(e,t,i){var n=this._comparator,o=tp(e,this._root,n),a=o.left,s=o.right;n(e,t)<0?s=Zl(t,i,s,n):a=Zl(t,i,a,n),this._root=ob(a,s,n)},r.prototype.split=function(e){return tp(e,this._root,this._comparator)},r}();function $l(r,e,t,i){var n=i-t;if(n>0){var o=t+Math.floor(n/2),a=r[o],s=e[o],l=new Bi(a,s);return l.left=$l(r,e,t,o),l.right=$l(r,e,o+1,i),l}return null}function ab(r,e){for(var t=new Bi(null,null),i=t,n=0;n<r.length;n++)i=i.next=new Bi(r[n],e[n]);return i.next=null,t.next}function sb(r){for(var e=r,t=[],i=!1,n=new Bi(null,null),o=n;!i;)e?(t.push(e),e=e.left):t.length>0?(e=o=o.next=t.pop(),e=e.right):i=!0;return o.next=null,n.next}function Jl(r,e,t){var i=t-e;if(i>0){var n=e+Math.floor(i/2),o=Jl(r,e,n),a=r.head;return a.left=o,r.head=r.head.next,a.right=Jl(r,n+1,t),a}return null}function lb(r,e,t){for(var i=new Bi(null,null),n=i,o=r,a=e;o!==null&&a!==null;)t(o.key,a.key)<0?(n.next=o,o=o.next):(n.next=a,a=a.next),n=n.next;return o!==null?n.next=o:a!==null&&(n.next=a),i.next}function Ql(r,e,t,i,n){if(!(t>=i)){for(var o=r[t+i>>1],a=t-1,s=i+1;;){do a++;while(n(r[a],o)<0);do s--;while(n(r[s],o)>0);if(a>=s)break;var l=r[a];r[a]=r[s],r[s]=l,l=e[a],e[a]=e[s],e[s]=l}Ql(r,e,t,s,n),Ql(r,e,s+1,i,n)}}function Re(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function ep(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function pe(r,e,t){return e&&ep(r.prototype,e),t&&ep(r,t),r}var bo=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},tu=function(e,t){if(t.ur.x<e.ll.x||e.ur.x<t.ll.x||t.ur.y<e.ll.y||e.ur.y<t.ll.y)return null;var i=e.ll.x<t.ll.x?t.ll.x:e.ll.x,n=e.ur.x<t.ur.x?e.ur.x:t.ur.x,o=e.ll.y<t.ll.y?t.ll.y:e.ll.y,a=e.ur.y<t.ur.y?e.ur.y:t.ur.y;return{ll:{x:i,y:o},ur:{x:n,y:a}}},Vi=Number.EPSILON;Vi===void 0&&(Vi=Math.pow(2,-52));var ub=Vi*Vi,eu=function(e,t){if(-Vi<e&&e<Vi&&-Vi<t&&t<Vi)return 0;var i=e-t;return i*i<ub*e*t?0:e<t?-1:1},hb=function(){function r(){Re(this,r),this.reset()}return pe(r,[{key:"reset",value:function(){this.xRounder=new ip,this.yRounder=new ip}},{key:"round",value:function(t,i){return{x:this.xRounder.round(t),y:this.yRounder.round(i)}}}]),r}(),ip=function(){function r(){Re(this,r),this.tree=new Hl,this.round(0)}return pe(r,[{key:"round",value:function(t){var i=this.tree.add(t),n=this.tree.prev(i);if(n!==null&&eu(i.key,n.key)===0)return this.tree.remove(t),n.key;var o=this.tree.next(i);return o!==null&&eu(i.key,o.key)===0?(this.tree.remove(t),o.key):t}}]),r}(),ko=new hb,wo=function(e,t){return e.x*t.y-e.y*t.x},np=function(e,t){return e.x*t.x+e.y*t.y},rp=function(e,t,i){var n={x:t.x-e.x,y:t.y-e.y},o={x:i.x-e.x,y:i.y-e.y},a=wo(n,o);return eu(a,0)},Aa=function(e){return Math.sqrt(np(e,e))},fb=function(e,t,i){var n={x:t.x-e.x,y:t.y-e.y},o={x:i.x-e.x,y:i.y-e.y};return wo(o,n)/Aa(o)/Aa(n)},db=function(e,t,i){var n={x:t.x-e.x,y:t.y-e.y},o={x:i.x-e.x,y:i.y-e.y};return np(o,n)/Aa(o)/Aa(n)},op=function(e,t,i){return t.y===0?null:{x:e.x+t.x/t.y*(i-e.y),y:i}},ap=function(e,t,i){return t.x===0?null:{x:i,y:e.y+t.y/t.x*(i-e.x)}},pb=function(e,t,i,n){if(t.x===0)return ap(i,n,e.x);if(n.x===0)return ap(e,t,i.x);if(t.y===0)return op(i,n,e.y);if(n.y===0)return op(e,t,i.y);var o=wo(t,n);if(o==0)return null;var a={x:i.x-e.x,y:i.y-e.y},s=wo(a,t)/o,l=wo(a,n)/o,u=e.x+l*t.x,h=i.x+s*n.x,f=e.y+l*t.y,d=i.y+s*n.y,p=(u+h)/2,c=(f+d)/2;return{x:p,y:c}},Ke=function(){pe(r,null,[{key:"compare",value:function(t,i){var n=r.comparePoints(t.point,i.point);return n!==0?n:(t.point!==i.point&&t.link(i),t.isLeft!==i.isLeft?t.isLeft?1:-1:Fa.compare(t.segment,i.segment))}},{key:"comparePoints",value:function(t,i){return t.x<i.x?-1:t.x>i.x?1:t.y<i.y?-1:t.y>i.y?1:0}}]);function r(e,t){Re(this,r),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=t}return pe(r,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var i=t.point.events,n=0,o=i.length;n<o;n++){var a=i[n];this.point.events.push(a),a.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,i=0;i<t;i++){var n=this.point.events[i];if(n.segment.consumedBy===void 0)for(var o=i+1;o<t;o++){var a=this.point.events[o];a.consumedBy===void 0&&n.otherSE.point.events===a.otherSE.point.events&&n.segment.consume(a.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],i=0,n=this.point.events.length;i<n;i++){var o=this.point.events[i];o!==this&&!o.segment.ringOut&&o.segment.isInResult()&&t.push(o)}return t}},{key:"getLeftmostComparator",value:function(t){var i=this,n=new Map,o=function(s){var l=s.otherSE;n.set(s,{sine:fb(i.point,t.point,l.point),cosine:db(i.point,t.point,l.point)})};return function(a,s){n.has(a)||o(a),n.has(s)||o(s);var l=n.get(a),u=l.sine,h=l.cosine,f=n.get(s),d=f.sine,p=f.cosine;return u>=0&&d>=0?h<p?1:h>p?-1:0:u<0&&d<0?h<p?-1:h>p?1:0:d<u?-1:d>u?1:0}}}]),r}(),cb=0,Fa=function(){pe(r,null,[{key:"compare",value:function(t,i){var n=t.leftSE.point.x,o=i.leftSE.point.x,a=t.rightSE.point.x,s=i.rightSE.point.x;if(s<n)return 1;if(a<o)return-1;var l=t.leftSE.point.y,u=i.leftSE.point.y,h=t.rightSE.point.y,f=i.rightSE.point.y;if(n<o){if(u<l&&u<h)return 1;if(u>l&&u>h)return-1;var d=t.comparePoint(i.leftSE.point);if(d<0)return 1;if(d>0)return-1;var p=i.comparePoint(t.rightSE.point);return p!==0?p:-1}if(n>o){if(l<u&&l<f)return-1;if(l>u&&l>f)return 1;var c=i.comparePoint(t.leftSE.point);if(c!==0)return c;var g=t.comparePoint(i.rightSE.point);return g<0?1:g>0?-1:1}if(l<u)return-1;if(l>u)return 1;if(a<s){var m=i.comparePoint(t.rightSE.point);if(m!==0)return m}if(a>s){var _=t.comparePoint(i.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(a!==s){var v=h-l,y=a-n,x=f-u,k=s-o;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return a>s?1:a<s||h<f?-1:h>f?1:t.id<i.id?-1:t.id>i.id?1:0}}]);function r(e,t,i,n){Re(this,r),this.id=++cb,this.leftSE=e,e.segment=this,e.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=e,this.rings=i,this.windings=n}return pe(r,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,i=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<i?t:i},ur:{x:this.rightSE.point.x,y:t>i?t:i}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var i=this.leftSE.point,n=this.rightSE.point,o=this.vector();if(i.x===n.x)return t.x===i.x?0:t.x<i.x?1:-1;var a=(t.y-i.y)/o.y,s=i.x+a*o.x;if(t.x===s)return 0;var l=(t.x-i.x)/o.x,u=i.y+l*o.y;return t.y===u?0:t.y<u?-1:1}},{key:"getIntersection",value:function(t){var i=this.bbox(),n=t.bbox(),o=tu(i,n);if(o===null)return null;var a=this.leftSE.point,s=this.rightSE.point,l=t.leftSE.point,u=t.rightSE.point,h=bo(i,l)&&this.comparePoint(l)===0,f=bo(n,a)&&t.comparePoint(a)===0,d=bo(i,u)&&this.comparePoint(u)===0,p=bo(n,s)&&t.comparePoint(s)===0;if(f&&h)return p&&!d?s:!p&&d?u:null;if(f)return d&&a.x===u.x&&a.y===u.y?null:a;if(h)return p&&s.x===l.x&&s.y===l.y?null:l;if(p&&d)return null;if(p)return s;if(d)return u;var c=pb(a,this.vector(),l,t.vector());return c===null||!bo(o,c)?null:ko.round(c.x,c.y)}},{key:"split",value:function(t){var i=[],n=t.events!==void 0,o=new Ke(t,!0),a=new Ke(t,!1),s=this.rightSE;this.replaceRightSE(a),i.push(a),i.push(o);var l=new r(o,s,this.rings.slice(),this.windings.slice());return Ke.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),Ke.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(o.checkForConsuming(),a.checkForConsuming()),i}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var i=0,n=this.windings.length;i<n;i++)this.windings[i]*=-1}},{key:"consume",value:function(t){for(var i=this,n=t;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var o=r.compare(i,n);if(o!==0){if(o>0){var a=i;i=n,n=a}if(i.prev===n){var s=i;i=n,n=s}for(var l=0,u=n.rings.length;l<u;l++){var h=n.rings[l],f=n.windings[l],d=i.rings.indexOf(h);d===-1?(i.rings.push(h),i.windings.push(f)):i.windings[d]+=f}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var i=this._afterState.rings,n=this._afterState.windings,o=this._afterState.multiPolys,a=0,s=this.rings.length;a<s;a++){var l=this.rings[a],u=this.windings[a],h=i.indexOf(l);h===-1?(i.push(l),n.push(u)):n[h]+=u}for(var f=[],d=[],p=0,c=i.length;p<c;p++)if(n[p]!==0){var g=i[p],m=g.poly;if(d.indexOf(m)===-1)if(g.isExterior)f.push(m);else{d.indexOf(m)===-1&&d.push(m);var _=f.indexOf(g.poly);_!==-1&&f.splice(_,1)}}for(var v=0,y=f.length;v<y;v++){var x=f[v].multiPoly;o.indexOf(x)===-1&&o.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var t=this.beforeState().multiPolys,i=this.afterState().multiPolys;switch(De.type){case"union":{var n=t.length===0,o=i.length===0;this._isInResult=n!==o;break}case"intersection":{var a,s;t.length<i.length?(a=t.length,s=i.length):(a=i.length,s=t.length),this._isInResult=s===De.numMultiPolys&&a<s;break}case"xor":{var l=Math.abs(t.length-i.length);this._isInResult=l%2===1;break}case"difference":{var u=function(f){return f.length===1&&f[0].isSubject};this._isInResult=u(t)!==u(i);break}default:throw new Error("Unrecognized operation type found ".concat(De.type))}return this._isInResult}}],[{key:"fromRing",value:function(t,i,n){var o,a,s,l=Ke.comparePoints(t,i);if(l<0)o=t,a=i,s=1;else if(l>0)o=i,a=t,s=-1;else throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));var u=new Ke(o,!0),h=new Ke(a,!1);return new r(u,h,[n],[s])}}]),r}(),sp=function(){function r(e,t,i){if(Re(this,r),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=i,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var n=ko.round(e[0][0],e[0][1]);this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};for(var o=n,a=1,s=e.length;a<s;a++){if(typeof e[a][0]!="number"||typeof e[a][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=ko.round(e[a][0],e[a][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Fa.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}(n.x!==o.x||n.y!==o.y)&&this.segments.push(Fa.fromRing(o,n,this))}return pe(r,[{key:"getSweepEvents",value:function(){for(var t=[],i=0,n=this.segments.length;i<n;i++){var o=this.segments[i];t.push(o.leftSE),t.push(o.rightSE)}return t}}]),r}(),gb=function(){function r(e,t){if(Re(this,r),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new sp(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var i=1,n=e.length;i<n;i++){var o=new sp(e[i],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=t}return pe(r,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),i=0,n=this.interiorRings.length;i<n;i++)for(var o=this.interiorRings[i].getSweepEvents(),a=0,s=o.length;a<s;a++)t.push(o[a]);return t}}]),r}(),lp=function(){function r(e,t){if(Re(this,r),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,n=e.length;i<n;i++){var o=new gb(e[i],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=t}return pe(r,[{key:"getSweepEvents",value:function(){for(var t=[],i=0,n=this.polys.length;i<n;i++)for(var o=this.polys[i].getSweepEvents(),a=0,s=o.length;a<s;a++)t.push(o[a]);return t}}]),r}(),mb=function(){pe(r,null,[{key:"factory",value:function(t){for(var i=[],n=0,o=t.length;n<o;n++){var a=t[n];if(!(!a.isInResult()||a.ringOut)){for(var s=null,l=a.leftSE,u=a.rightSE,h=[l],f=l.point,d=[];s=l,l=u,h.push(l),l.point!==f;)for(;;){var p=l.getAvailableLinkedEvents();if(p.length===0){var c=h[0].point,g=h[h.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(c.x,",")+" ".concat(c.y,"]. Last matching segment found ends at")+" [".concat(g.x,", ").concat(g.y,"]."))}if(p.length===1){u=p[0].otherSE;break}for(var m=null,_=0,v=d.length;_<v;_++)if(d[_].point===l.point){m=_;break}if(m!==null){var y=d.splice(m)[0],x=h.splice(y.index);x.unshift(x[0].otherSE),i.push(new r(x.reverse()));continue}d.push({index:h.length,point:l.point});var k=l.getLeftmostComparator(s);u=p.sort(k)[0].otherSE;break}i.push(new r(h))}}return i}}]);function r(e){Re(this,r),this.events=e;for(var t=0,i=e.length;t<i;t++)e[t].segment.ringOut=this;this.poly=null}return pe(r,[{key:"getGeom",value:function(){for(var t=this.events[0].point,i=[t],n=1,o=this.events.length-1;n<o;n++){var a=this.events[n].point,s=this.events[n+1].point;rp(a,t,s)!==0&&(i.push(a),t=a)}if(i.length===1)return null;var l=i[0],u=i[1];rp(l,t,u)===0&&i.shift(),i.push(i[0]);for(var h=this.isExteriorRing()?1:-1,f=this.isExteriorRing()?0:i.length-1,d=this.isExteriorRing()?i.length:-1,p=[],c=f;c!=d;c+=h)p.push([i[c].x,i[c].y]);return p}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],i=1,n=this.events.length;i<n;i++){var o=this.events[i];Ke.compare(t,o)>0&&(t=o)}for(var a=t.segment.prevInResult(),s=a?a.prevInResult():null;;){if(!a)return null;if(!s)return a.ringOut;if(s.ringOut!==a.ringOut)return s.ringOut.enclosingRing()!==a.ringOut?a.ringOut:a.ringOut.enclosingRing();a=s.prevInResult(),s=a?a.prevInResult():null}}}]),r}(),up=function(){function r(e){Re(this,r),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return pe(r,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(var i=0,n=this.interiorRings.length;i<n;i++){var o=this.interiorRings[i].getGeom();o!==null&&t.push(o)}return t}}]),r}(),vb=function(){function r(e){Re(this,r),this.rings=e,this.polys=this._composePolys(e)}return pe(r,[{key:"getGeom",value:function(){for(var t=[],i=0,n=this.polys.length;i<n;i++){var o=this.polys[i].getGeom();o!==null&&t.push(o)}return t}},{key:"_composePolys",value:function(t){for(var i=[],n=0,o=t.length;n<o;n++){var a=t[n];if(!a.poly)if(a.isExteriorRing())i.push(new up(a));else{var s=a.enclosingRing();s.poly||i.push(new up(s)),s.poly.addInterior(a)}}return i}}]),r}(),_b=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fa.compare;Re(this,r),this.queue=e,this.tree=new Hl(t),this.segments=[]}return pe(r,[{key:"process",value:function(t){var i=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(i),n;var o=t.isLeft?this.tree.insert(i):this.tree.find(i);if(!o)throw new Error("Unable to find segment #".concat(i.id," ")+"[".concat(i.leftSE.point.x,", ").concat(i.leftSE.point.y,"] -> ")+"[".concat(i.rightSE.point.x,", ").concat(i.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var a=o,s=o,l=void 0,u=void 0;l===void 0;)a=this.tree.prev(a),a===null?l=null:a.key.consumedBy===void 0&&(l=a.key);for(;u===void 0;)s=this.tree.next(s),s===null?u=null:s.key.consumedBy===void 0&&(u=s.key);if(t.isLeft){var h=null;if(l){var f=l.getIntersection(i);if(f!==null&&(i.isAnEndpoint(f)||(h=f),!l.isAnEndpoint(f)))for(var d=this._splitSafely(l,f),p=0,c=d.length;p<c;p++)n.push(d[p])}var g=null;if(u){var m=u.getIntersection(i);if(m!==null&&(i.isAnEndpoint(m)||(g=m),!u.isAnEndpoint(m)))for(var _=this._splitSafely(u,m),v=0,y=_.length;v<y;v++)n.push(_[v])}if(h!==null||g!==null){var x=null;if(h===null)x=g;else if(g===null)x=h;else{var k=Ke.comparePoints(h,g);x=k<=0?h:g}this.queue.remove(i.rightSE),n.push(i.rightSE);for(var E=i.split(x),T=0,w=E.length;T<w;T++)n.push(E[T])}n.length>0?(this.tree.remove(i),n.push(t)):(this.segments.push(i),i.prev=l)}else{if(l&&u){var C=l.getIntersection(u);if(C!==null){if(!l.isAnEndpoint(C))for(var R=this._splitSafely(l,C),P=0,M=R.length;P<M;P++)n.push(R[P]);if(!u.isAnEndpoint(C))for(var L=this._splitSafely(u,C),U=0,B=L.length;U<B;U++)n.push(L[U])}}this.tree.remove(i)}return n}},{key:"_splitSafely",value:function(t,i){this.tree.remove(t);var n=t.rightSE;this.queue.remove(n);var o=t.split(i);return o.push(n),t.consumedBy===void 0&&this.tree.insert(t),o}}]),r}(),hp=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,yb=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,xb=function(){function r(){Re(this,r)}return pe(r,[{key:"run",value:function(t,i,n){De.type=t,ko.reset();for(var o=[new lp(i,!0)],a=0,s=n.length;a<s;a++)o.push(new lp(n[a],!1));if(De.numMultiPolys=o.length,De.type==="difference")for(var l=o[0],u=1;u<o.length;)tu(o[u].bbox,l.bbox)!==null?u++:o.splice(u,1);if(De.type==="intersection"){for(var h=0,f=o.length;h<f;h++)for(var d=o[h],p=h+1,c=o.length;p<c;p++)if(tu(d.bbox,o[p].bbox)===null)return[]}for(var g=new Hl(Ke.compare),m=0,_=o.length;m<_;m++)for(var v=o[m].getSweepEvents(),y=0,x=v.length;y<x;y++)if(g.insert(v[y]),g.size>hp)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new _b(g),E=g.size,T=g.pop();T;){var w=T.key;if(g.size===E){var C=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(C.id," ")+"[".concat(C.leftSE.point.x,", ").concat(C.leftSE.point.y,"] -> ")+"[".concat(C.rightSE.point.x,", ").concat(C.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(g.size>hp)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>yb)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var R=k.process(w),P=0,M=R.length;P<M;P++){var L=R[P];L.consumedBy===void 0&&g.insert(L)}E=g.size,T=g.pop()}ko.reset();var U=mb.factory(k.segments),B=new vb(U);return B.getGeom()}}]),r}(),De=new xb,bb=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return De.run("union",e,i)},kb=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return De.run("intersection",e,i)},wb=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return De.run("xor",e,i)},Eb=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return De.run("difference",e,i)},Tb={union:bb,intersection:kb,xor:wb,difference:Eb};function fp(r,e,t){t===void 0&&(t={});var i={type:"Feature"};return(t.id===0||t.id)&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.properties=e||{},i.geometry=r,i}function Cb(r,e,t){t===void 0&&(t={});for(var i=0,n=r;i<n.length;i++){var o=n[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var s={type:"Polygon",coordinates:r};return fp(s,e,t)}function Sb(r,e,t){t===void 0&&(t={});var i={type:"MultiPolygon",coordinates:r};return fp(i,e,t)}function dp(r){return r.type==="Feature"?r.geometry:r}function Ob(r,e,t){t===void 0&&(t={});var i=dp(r),n=dp(e),o=Tb.union(i.coordinates,n.coordinates);return o.length===0?null:o.length===1?Cb(o[0],t.properties):Sb(o,t.properties)}function iu(r,e){const t=Yh(r),i=Math.round(t*100)/100,n=i/1e4;let o;return e==="m2"?o=i+" m\xB2":e==="ha"&&(o=n+" ha"),o}function Eo(r,e,t){const i=e.getExtent();return r.getView().fit(Ve(i,t))}function Da(r,e){const[t,i,n]=Array.from(Ys(r));return Vs([t,i,n,e])}const Ib="https://api.os.uk/features/v1/wfs",Or=new Di,He=new Di;function zb(r,e,t){return new Sn({source:He,style:new ye({stroke:t?void 0:new _e({width:3,color:r}),fill:new de({color:e?Da(r,.2):Da(r,0)})})})}function pp(r,e,t){const i=`
69
+ */var kn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Ak(i,t){return i>t?1:i<t?-1:0}function wn(i,t,e){for(var n=new kn(null,null),r=n,o=n;;){var s=e(i,t.key);if(s<0){if(t.left===null)break;if(e(i,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}o.left=t,o=t,t=t.left}else if(s>0){if(t.right===null)break;if(e(i,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}r.right=t,r=t,t=t.right}else break}return r.right=t.left,o.left=t.right,t.left=n.right,t.right=n.left,t}function ju(i,t,e,n){var r=new kn(i,t);if(e===null)return r.left=r.right=null,r;e=wn(i,e,n);var o=n(i,e.key);return o<0?(r.left=e.left,r.right=e,e.left=null):o>=0&&(r.right=e.right,r.left=e,e.right=null),r}function rm(i,t,e){var n=null,r=null;if(t){t=wn(i,t,e);var o=e(t.key,i);o===0?(n=t.left,r=t.right):o<0?(r=t.right,t.right=null,n=t):(n=t.left,t.left=null,r=t)}return{left:n,right:r}}function Dk(i,t,e){return t===null?i:(i===null||(t=wn(i.key,t,e),t.left=i),t)}function Bu(i,t,e,n,r){if(i){n(""+t+(e?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+r(i)+`
70
+ `);var o=t+(e?" ":"\u2502 ");i.left&&Bu(i.left,o,!1,n,r),i.right&&Bu(i.right,o,!0,n,r)}}var Uu=function(){function i(t){t===void 0&&(t=Ak),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=ju(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new kn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=wn(t,this._root,r),s=r(t,o.key);return s===0?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var r;if(e===null)return null;e=wn(t,e,n);var o=n(t,e.key);return o===0?(e.left===null?r=e.right:(r=wn(t,e.left,n),r.right=e.right),this._size--,r):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=wn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return e;r<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=wn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(r===0)return!0;r<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,r=[],o=!1;!o;)n!==null?(r.push(n),n=n.left):r.length!==0?(n=r.pop(),t.call(e,n),n=n.right):o=!0;return this},i.prototype.range=function(t,e,n,r){for(var o=[],s=this._comparator,a=this._root,l;o.length!==0||a;)if(a)o.push(a),a=a.left;else{if(a=o.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,r=0,o=[];!n;)if(e)o.push(e),e=e.left;else if(o.length>0){if(e=o.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var o=r(t.key,e.key);if(o===0)break;o<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return Fk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var r=t.length,o=this._comparator;if(n&&Xu(t,e,0,r-1,o),this._root===null)this._root=Vu(t,e,0,r),this._size=r;else{var s=Ok(this.toList(),Lk(t,e),o);r=this._size+r,this._root=qu({head:s},0,r)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Bu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var r=this._comparator,o=rm(t,this._root,r),s=o.left,a=o.right;r(t,e)<0?a=ju(e,n,a,r):s=ju(e,n,s,r),this._root=Dk(s,a,r)},i.prototype.split=function(t){return rm(t,this._root,this._comparator)},i}();function Vu(i,t,e,n){var r=n-e;if(r>0){var o=e+Math.floor(r/2),s=i[o],a=t[o],l=new kn(s,a);return l.left=Vu(i,t,e,o),l.right=Vu(i,t,o+1,n),l}return null}function Lk(i,t){for(var e=new kn(null,null),n=e,r=0;r<i.length;r++)n=n.next=new kn(i[r],t[r]);return n.next=null,e.next}function Fk(i){for(var t=i,e=[],n=!1,r=new kn(null,null),o=r;!n;)t?(e.push(t),t=t.left):e.length>0?(t=o=o.next=e.pop(),t=t.right):n=!0;return o.next=null,r.next}function qu(i,t,e){var n=e-t;if(n>0){var r=t+Math.floor(n/2),o=qu(i,t,r),s=i.head;return s.left=o,i.head=i.head.next,s.right=qu(i,r+1,e),s}return null}function Ok(i,t,e){for(var n=new kn(null,null),r=n,o=i,s=t;o!==null&&s!==null;)e(o.key,s.key)<0?(r.next=o,o=o.next):(r.next=s,s=s.next),r=r.next;return o!==null?r.next=o:s!==null&&(r.next=s),n.next}function Xu(i,t,e,n,r){if(!(e>=n)){for(var o=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(r(i[s],o)<0);do a--;while(r(i[a],o)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Xu(i,t,e,a,r),Xu(i,t,a+1,n,r)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function om(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ce(i,t,e){return t&&om(i.prototype,t),e&&om(i,e),i}var es=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},$u=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x,o=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:o},ur:{x:r,y:s}}},Mn=Number.EPSILON;Mn===void 0&&(Mn=Math.pow(2,-52));var Nk=Mn*Mn,Wu=function(t,e){if(-Mn<t&&t<Mn&&-Mn<e&&e<Mn)return 0;var n=t-e;return n*n<Nk*t*e?0:t<e?-1:1},Gk=function(){function i(){He(this,i),this.reset()}return Ce(i,[{key:"reset",value:function(){this.xRounder=new sm,this.yRounder=new sm}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),sm=function(){function i(){He(this,i),this.tree=new Uu,this.round(0)}return Ce(i,[{key:"round",value:function(e){var n=this.tree.add(e),r=this.tree.prev(n);if(r!==null&&Wu(n.key,r.key)===0)return this.tree.remove(e),r.key;var o=this.tree.next(n);return o!==null&&Wu(n.key,o.key)===0?(this.tree.remove(e),o.key):e}}]),i}(),is=new Gk,ns=function(t,e){return t.x*e.y-t.y*e.x},am=function(t,e){return t.x*e.x+t.y*e.y},lm=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y},s=ns(r,o);return Wu(s,0)},qa=function(t){return Math.sqrt(am(t,t))},jk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return ns(o,r)/qa(o)/qa(r)},Bk=function(t,e,n){var r={x:e.x-t.x,y:e.y-t.y},o={x:n.x-t.x,y:n.y-t.y};return am(o,r)/qa(o)/qa(r)},hm=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},um=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Uk=function(t,e,n,r){if(e.x===0)return um(n,r,t.x);if(r.x===0)return um(t,e,n.x);if(e.y===0)return hm(n,r,t.y);if(r.y===0)return hm(t,e,n.y);var o=ns(e,r);if(o==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=ns(s,e)/o,l=ns(s,r)/o,h=t.x+l*e.x,u=n.x+a*r.x,d=t.y+l*e.y,c=n.y+a*r.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},mi=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=i.comparePoints(e.point,n.point);return r!==0?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Xa.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){He(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ce(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,o=n.length;r<o;r++){var s=n[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var r=this.point.events[n];if(r.segment.consumedBy===void 0)for(var o=n+1;o<e;o++){var s=this.point.events[o];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,r=this.point.events.length;n<r;n++){var o=this.point.events[n];o!==this&&!o.segment.ringOut&&o.segment.isInResult()&&e.push(o)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,r=new Map,o=function(a){var l=a.otherSE;r.set(a,{sine:jk(n.point,e.point,l.point),cosine:Bk(n.point,e.point,l.point)})};return function(s,a){r.has(s)||o(s),r.has(a)||o(a);var l=r.get(s),h=l.sine,u=l.cosine,d=r.get(a),c=d.sine,f=d.cosine;return h>=0&&c>=0?u<f?1:u>f?-1:0:h<0&&c<0?u<f?-1:u>f?1:0:c<h?-1:c>h?1:0}}}]),i}(),Vk=0,Xa=function(){Ce(i,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,o=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<r)return 1;if(s<o)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(r<o){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(r>o){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var g=n.comparePoint(e.leftSE.point);if(g!==0)return g;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-r,x=d-h,k=a-o;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,r){He(this,i),this.id=++Vk,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}return Ce(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,o=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/o.y,a=n.x+s*o.x;if(e.x===a)return 0;var l=(e.x-n.x)/o.x,h=n.y+l*o.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),r=e.bbox(),o=$u(n,r);if(o===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=es(n,l)&&this.comparePoint(l)===0,d=es(r,s)&&e.comparePoint(s)===0,c=es(n,h)&&this.comparePoint(h)===0,f=es(r,a)&&e.comparePoint(a)===0;if(d&&u)return f&&!c?a:!f&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return f&&a.x===l.x&&a.y===l.y?null:l;if(f&&c)return null;if(f)return a;if(c)return h;var g=Uk(s,this.vector(),l,e.vector());return g===null||!es(o,g)?null:is.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],r=e.events!==void 0,o=new mi(e,!0),s=new mi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(o);var l=new i(o,a,this.rings.slice(),this.windings.slice());return mi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),mi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(o.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n<r;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var o=i.compare(n,r);if(o!==0){if(o>0){var s=n;n=r,r=s}if(n.prev===r){var a=n;n=r,r=a}for(var l=0,h=r.rings.length;l<h;l++){var u=r.rings[l],d=r.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,r=this._afterState.windings,o=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),r.push(h)):r[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(r[f]!==0){var m=n[f],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;o.indexOf(x)===-1&&o.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(oi.type){case"union":{var r=e.length===0,o=n.length===0;this._isInResult=r!==o;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===oi.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(oi.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,r){var o,s,a,l=mi.comparePoints(e,n);if(l<0)o=e,s=n,a=1;else if(l>0)o=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new mi(o,!0),u=new mi(s,!1);return new i(h,u,[r],[a])}}]),i}(),dm=function(){function i(t,e,n){if(He(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var r=is.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};for(var o=r,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=is.round(t[s][0],t[s][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Xa.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}(r.x!==o.x||r.y!==o.y)&&this.segments.push(Xa.fromRing(o,r,this))}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;n<r;n++){var o=this.segments[n];e.push(o.leftSE),e.push(o.rightSE)}return e}}]),i}(),qk=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new dm(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,r=t.length;n<r;n++){var o=new dm(t[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;n<r;n++)for(var o=this.interiorRings[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),cm=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,r=t.length;n<r;n++){var o=new qk(t[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=e}return Ce(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++)for(var o=this.polys[n].getSweepEvents(),s=0,a=o.length;s<a;s++)e.push(o[s]);return e}}]),i}(),Xk=function(){Ce(i,null,[{key:"factory",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var f=l.getAvailableLinkedEvents();if(f.length===0){var g=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(g.x,",")+" ".concat(g.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(f.length===1){h=f[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=f.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){He(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ce(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],r=1,o=this.events.length-1;r<o;r++){var s=this.events[r].point,a=this.events[r+1].point;lm(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];lm(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,f=[],g=d;g!=c;g+=u)f.push([n[g].x,n[g].y]);return f}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,r=this.events.length;n<r;n++){var o=this.events[n];mi.compare(e,o)>0&&(e=o)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),fm=function(){function i(t){He(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ce(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n<r;n++){var o=this.interiorRings[n].getGeom();o!==null&&e.push(o)}return e}}]),i}(),$k=function(){function i(t){He(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ce(i,[{key:"getGeom",value:function(){for(var e=[],n=0,r=this.polys.length;n<r;n++){var o=this.polys[n].getGeom();o!==null&&e.push(o)}return e}},{key:"_composePolys",value:function(e){for(var n=[],r=0,o=e.length;r<o;r++){var s=e[r];if(!s.poly)if(s.isExteriorRing())n.push(new fm(s));else{var a=s.enclosingRing();a.poly||n.push(new fm(a)),a.poly.addInterior(s)}}return n}}]),i}(),Wk=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xa.compare;He(this,i),this.queue=t,this.tree=new Uu(e),this.segments=[]}return Ce(i,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var o=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!o)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=o,a=o,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),f=0,g=c.length;f<g;f++)r.push(c[f])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)r.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=mi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),r.push(n.rightSE);for(var w=n.split(x),C=0,M=w.length;C<M;C++)r.push(w[C])}r.length>0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var R=this._splitSafely(l,S),A=0,G=R.length;A<G;A++)r.push(R[A]);if(!h.isAnEndpoint(S))for(var P=this._splitSafely(h,S),at=0,j=P.length;at<j;at++)r.push(P[at])}}this.tree.remove(n)}return r}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var r=e.rightSE;this.queue.remove(r);var o=e.split(n);return o.push(r),e.consumedBy===void 0&&this.tree.insert(e),o}}]),i}(),gm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Yk=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,Kk=function(){function i(){He(this,i)}return Ce(i,[{key:"run",value:function(e,n,r){oi.type=e,is.reset();for(var o=[new cm(n,!0)],s=0,a=r.length;s<a;s++)o.push(new cm(r[s],!1));if(oi.numMultiPolys=o.length,oi.type==="difference")for(var l=o[0],h=1;h<o.length;)$u(o[h].bbox,l.bbox)!==null?h++:o.splice(h,1);if(oi.type==="intersection"){for(var u=0,d=o.length;u<d;u++)for(var c=o[u],f=u+1,g=o.length;f<g;f++)if($u(c.bbox,o[f].bbox)===null)return[]}for(var m=new Uu(mi.compare),p=0,_=o.length;p<_;p++)for(var v=o[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>gm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new Wk(m),w=m.size,C=m.pop();C;){var M=C.key;if(m.size===w){var S=M.segment;throw new Error("Unable to pop() ".concat(M.isLeft?"left":"right"," SweepEvent ")+"[".concat(M.point.x,", ").concat(M.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>gm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>Yk)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var R=k.process(M),A=0,G=R.length;A<G;A++){var P=R[A];P.consumedBy===void 0&&m.insert(P)}w=m.size,C=m.pop()}is.reset();var at=Xk.factory(k.segments),j=new $k(at);return j.getGeom()}}]),i}(),oi=new Kk,Zk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("union",t,n)},Hk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("intersection",t,n)},Jk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("xor",t,n)},Qk=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return oi.run("difference",t,n)},tw={union:Zk,intersection:Hk,xor:Jk,difference:Qk};function mm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function ew(i,t,e){e===void 0&&(e={});for(var n=0,r=i;n<r.length;n++){var o=r[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return mm(a,t,e)}function iw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return mm(n,t,e)}function pm(i){return i.type==="Feature"?i.geometry:i}function nw(i,t,e){e===void 0&&(e={});var n=pm(i),r=pm(t),o=tw.union(n.coordinates,r.coordinates);return o.length===0?null:o.length===1?ew(o[0],e.properties):iw(o,e.properties)}function Yu(i,t){const e=hc(i),n=Math.round(e*100)/100,r=n/1e4;let o;return t==="m2"?o=n+" m\xB2":t==="ha"&&(o=r+" ha"),o}function rs(i,t,e){const n=t.getExtent();return i.getView().fit(ui(n,e))}function $a(i,t){const[e,n,r]=Array.from(wo(i));return Yl([e,n,r,t])}const rw="https://api.os.uk/features/v1/wfs",Kr=new hn,pi=new hn;function ow(i,t,e){return new Qn({source:pi,style:new le({stroke:e?void 0:new ke({width:3,color:i}),fill:new ge({color:t?$a(i,.2):$a(i,0)})})})}function vm(i,t,e){const n=`
44
71
  <ogc:Filter>
45
72
  <ogc:Contains>
46
73
  <ogc:PropertyName>SHAPE</ogc:PropertyName>
47
74
  <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
48
- <gml:coordinates>${am(r).reverse().join(",")}</gml:coordinates>
75
+ <gml:coordinates>${j0(i).reverse().join(",")}</gml:coordinates>
49
76
  </gml:Point>
50
77
  </ogc:Contains>
51
78
  </ogc:Filter>
52
- `;fetch(Rb({key:e,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:i,count:1})).then(o=>o.json()).then(o=>{if(!o.features.length)return;const a=o.features[0].properties,s=["TOID","DescriptiveGroup"];Object.keys(a).forEach(h=>s.includes(h)||delete a[h]);const l=new Tn,u=l.readFeatures(o,{featureProjection:"EPSG:3857"});t?u.forEach(h=>{const f=h.getProperties().TOID,d=Or.getFeatureById(f);d?Or.removeFeature(d):(h.setId(f),Or.addFeature(h))}):(Or.clear(),u.forEach(h=>{const f=h.getProperties().TOID;h.setId(f),Or.addFeature(h)})),He.clear(),He.addFeature(l.readFeature(Or.getFeatures().reduce((h,f)=>{const d=l.writeFeatureObject(f).geometry;return h?Ob(h,d):d},null)))}).catch(o=>console.log(o))}function Rb(r){const e=Object.keys(r).map(t=>t+"="+encodeURI(r[t])).join("&");return`${Ib}?${e}`}var Pb={},cp,gp={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function To(r){return r=Math.round(r),r<0?0:r>255?255:r}function mp(r){return r<0?0:r>1?1:r}function nu(r){return r[r.length-1]==="%"?To(parseFloat(r)/100*255):To(parseInt(r))}function Na(r){return r[r.length-1]==="%"?mp(parseFloat(r)/100):mp(parseFloat(r))}function ru(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Mb(r){var e=r.replace(/ /g,"").toLowerCase();if(e in gp)return gp[e].slice();if(e[0]==="#"){if(e.length===4){var t=parseInt(e.substr(1),16);return t>=0&&t<=4095?[(t&3840)>>4|(t&3840)>>8,t&240|(t&240)>>4,t&15|(t&15)<<4,1]:null}else if(e.length===7){var t=parseInt(e.substr(1),16);return t>=0&&t<=16777215?[(t&16711680)>>16,(t&65280)>>8,t&255,1]:null}return null}var i=e.indexOf("("),n=e.indexOf(")");if(i!==-1&&n+1===e.length){var o=e.substr(0,i),a=e.substr(i+1,n-(i+1)).split(","),s=1;switch(o){case"rgba":if(a.length!==4)return null;s=Na(a.pop());case"rgb":return a.length!==3?null:[nu(a[0]),nu(a[1]),nu(a[2]),s];case"hsla":if(a.length!==4)return null;s=Na(a.pop());case"hsl":if(a.length!==3)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=Na(a[1]),h=Na(a[2]),f=h<=.5?h*(u+1):h+u-h*u,d=h*2-f;return[To(ru(d,f,l+1/3)*255),To(ru(d,f,l)*255),To(ru(d,f,l-1/3)*255),s];default:return null}}return null}try{cp=Pb.parseCSSColor=Mb}catch{}var ue=function(e,t,i,n){n===void 0&&(n=1),this.r=e,this.g=t,this.b=i,this.a=n};ue.parse=function(e){if(!!e){if(e instanceof ue)return e;if(typeof e=="string"){var t=cp(e);if(!!t)return new ue(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},ue.prototype.toString=function(){var e=this.toArray(),t=e[0],i=e[1],n=e[2],o=e[3];return"rgba("+Math.round(t)+","+Math.round(i)+","+Math.round(n)+","+o+")"},ue.prototype.toArray=function(){var e=this,t=e.r,i=e.g,n=e.b,o=e.a;return o===0?[0,0,0,0]:[t*255/o,i*255/o,n*255/o,o]},ue.black=new ue(0,0,0,1),ue.white=new ue(1,1,1,1),ue.transparent=new ue(0,0,0,0),ue.red=new ue(1,0,0,1),ue.blue=new ue(0,0,1,1);var Ce=ue;function Co(r){return typeof r=="object"?["literal",r]:r}function Lb(r,e){var t=r.stops;if(!t)return Ab(r,e);var i=t&&typeof t[0][0]=="object",n=i||r.property!==void 0,o=i||!n;return t=t.map(function(a){return!n&&e.tokens&&typeof a[1]=="string"?[a[0],Gb(a[1])]:[a[0],Co(a[1])]}),i?Fb(r,e,t):o?Nb(r,e,t):au(r,e,t)}function Ab(r,e){var t=["get",r.property];if(r.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,r.default];var i=[e.type==="color"?"to-color":e.type,t,Co(r.default)];return e.type==="array"&&i.splice(1,0,e.value,e.length||null),i}function ou(r){switch(r.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Fb(r,e,t){for(var i={},n={},o=[],a=0;a<t.length;a++){var s=t[a],l=s[0].zoom;i[l]===void 0&&(i[l]={zoom:l,type:r.type,property:r.property,default:r.default},n[l]=[],o.push(l)),n[l].push([s[0].value,s[1]])}var u=lu({},e);if(u==="exponential"){for(var h=[ou(r),["linear"],["zoom"]],f=0,d=o;f<d.length;f+=1){var p=d[f],c=au(i[p],e,n[p]);Ir(h,p,c,!1)}return h}else{for(var g=["step",["zoom"]],m=0,_=o;m<_.length;m+=1){var v=_[m],y=au(i[v],e,n[v]);Ir(g,v,y,!0)}return su(g),g}}function Db(r,e){if(r!==void 0)return r;if(e!==void 0)return e}function vp(r,e){var t=Co(Db(r.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function au(r,e,t){var i=lu(r,e),n=["get",r.property];if(i==="categorical"&&typeof t[0][0]=="boolean"){for(var o=["case"],a=0,s=t;a<s.length;a+=1){var l=s[a];o.push(["==",n,l[0]],l[1])}return o.push(vp(r,e)),o}else if(i==="categorical"){for(var u=["match",n],h=0,f=t;h<f.length;h+=1){var d=f[h];Ir(u,d[0],d[1],!1)}return u.push(vp(r,e)),u}else if(i==="interval"){for(var p=["step",["number",n]],c=0,g=t;c<g.length;c+=1){var m=g[c];Ir(p,m[0],m[1],!0)}return su(p),r.default===void 0?p:["case",["==",["typeof",n],"number"],p,Co(r.default)]}else if(i==="exponential"){for(var _=r.base!==void 0?r.base:1,v=[ou(r),_===1?["linear"]:["exponential",_],["number",n]],y=0,x=t;y<x.length;y+=1){var k=x[y];Ir(v,k[0],k[1],!1)}return r.default===void 0?v:["case",["==",["typeof",n],"number"],v,Co(r.default)]}else throw new Error("Unknown property function type "+i)}function Nb(r,e,t,i){i===void 0&&(i=["zoom"]);var n=lu(r,e),o,a=!1;if(n==="interval")o=["step",i],a=!0;else if(n==="exponential"){var s=r.base!==void 0?r.base:1;o=[ou(r),s===1?["linear"]:["exponential",s],i]}else throw new Error('Unknown zoom function type "'+n+'"');for(var l=0,u=t;l<u.length;l+=1){var h=u[l];Ir(o,h[0],h[1],a)}return su(o),o}function su(r){r[0]==="step"&&r.length===3&&(r.push(0),r.push(r[3]))}function Ir(r,e,t,i){r.length>3&&e===r[r.length-2]||(i&&r.length===2||r.push(e),r.push(t))}function lu(r,e){return r.type?r.type:e.expression.interpolated?"exponential":"interval"}function Gb(r){for(var e=["concat"],t=/{([^{}]+)}/g,i=0,n=t.exec(r);n!==null;n=t.exec(r)){var o=r.slice(i,t.lastIndex-n[0].length);i=t.lastIndex,o.length>0&&e.push(o),e.push(["get",n[1]])}if(e.length===1)return r;if(i<r.length)e.push(r.slice(i));else if(e.length===2)return["to-string",e[1]];return e}var jb=function(r){function e(t,i){r.call(this,i),this.message=i,this.key=t}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e}(Error),$e=jb,So=function(e,t){t===void 0&&(t=[]),this.parent=e,this.bindings={};for(var i=0,n=t;i<n.length;i+=1){var o=n[i],a=o[0],s=o[1];this.bindings[a]=s}};So.prototype.concat=function(e){return new So(this,e)},So.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},So.prototype.has=function(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1};var Bb=So,Ga={kind:"null"},F={kind:"number"},dt={kind:"string"},nt={kind:"boolean"},ui={kind:"color"},zr={kind:"object"},rt={kind:"value"},Ub={kind:"error"},ja={kind:"collator"},Ba={kind:"formatted"},Oo={kind:"resolvedImage"};function Pe(r,e){return{kind:"array",itemType:r,N:e}}function Bt(r){if(r.kind==="array"){var e=Bt(r.itemType);return typeof r.N=="number"?"array<"+e+", "+r.N+">":r.itemType.kind==="value"?"array":"array<"+e+">"}else return r.kind}var Vb=[Ga,F,dt,nt,ui,Ba,zr,Pe(rt),Oo];function Io(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Io(r.itemType,e.itemType))&&(typeof r.N!="number"||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if(r.kind==="value")for(var t=0,i=Vb;t<i.length;t+=1){var n=i[t];if(!Io(n,e))return null}}return"Expected "+Bt(r)+" but found "+Bt(e)+" instead."}function uu(r,e){return e.some(function(t){return t.kind===r.kind})}function zo(r,e){return e.some(function(t){return t==="null"?r===null:t==="array"?Array.isArray(r):t==="object"?r&&!Array.isArray(r)&&typeof r=="object":t===typeof r})}var hu=function(e,t,i){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};hu.prototype.compare=function(e,t){return this.collator.compare(e,t)},hu.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var fu=hu,du=function(e,t,i,n,o){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=i,this.fontStack=n,this.textColor=o},hi=function(e){this.sections=e};hi.fromString=function(e){return new hi([new du(e,null,null,null,null)])},hi.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(e){return e.text.length!==0||e.image&&e.image.name.length!==0})},hi.factory=function(e){return e instanceof hi?e:hi.fromString(e)},hi.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(e){return e.text}).join("")},hi.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];if(n.image){e.push(["image",n.image.name]);continue}e.push(n.text);var o={};n.fontStack&&(o["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(o["font-scale"]=n.scale),n.textColor&&(o["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(o)}return e};var Rr=hi,Ro=function(e){this.name=e.name,this.available=e.available};Ro.prototype.toString=function(){return this.name},Ro.fromString=function(e){return e?new Ro({name:e,available:!1}):null},Ro.prototype.serialize=function(){return["image",this.name]};var Pr=Ro;function _p(r,e,t,i){if(!(typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255)){var n=typeof i=="number"?[r,e,t,i]:[r,e,t];return"Invalid rgba value ["+n.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof i>"u"||typeof i=="number"&&i>=0&&i<=1?null:"Invalid rgba value ["+[r,e,t,i].join(", ")+"]: 'a' must be between 0 and 1."}function Ua(r){if(r===null)return!0;if(typeof r=="string")return!0;if(typeof r=="boolean")return!0;if(typeof r=="number")return!0;if(r instanceof Ce)return!0;if(r instanceof fu)return!0;if(r instanceof Rr)return!0;if(r instanceof Pr)return!0;if(Array.isArray(r)){for(var e=0,t=r;e<t.length;e+=1){var i=t[e];if(!Ua(i))return!1}return!0}else if(typeof r=="object"){for(var n in r)if(!Ua(r[n]))return!1;return!0}else return!1}function $t(r){if(r===null)return Ga;if(typeof r=="string")return dt;if(typeof r=="boolean")return nt;if(typeof r=="number")return F;if(r instanceof Ce)return ui;if(r instanceof fu)return ja;if(r instanceof Rr)return Ba;if(r instanceof Pr)return Oo;if(Array.isArray(r)){for(var e=r.length,t,i=0,n=r;i<n.length;i+=1){var o=n[i],a=$t(o);if(!t)t=a;else{if(t===a)continue;t=rt;break}}return Pe(t||rt,e)}else return zr}function Po(r){var e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof Ce||r instanceof Rr||r instanceof Pr?r.toString():JSON.stringify(r)}var In=function(e,t){this.type=e,this.value=t};In.parse=function(e,t){if(e.length!==2)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!Ua(e[1]))return t.error("invalid value");var i=e[1],n=$t(i),o=t.expectedType;return n.kind==="array"&&n.N===0&&o&&o.kind==="array"&&(typeof o.N!="number"||o.N===0)&&(n=o),new In(n,i)},In.prototype.evaluate=function(){return this.value},In.prototype.eachChild=function(){},In.prototype.outputDefined=function(){return!0},In.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Ce?["rgba"].concat(this.value.toArray()):this.value instanceof Rr?this.value.serialize():this.value};var Va=In,yp=function(e){this.name="ExpressionEvaluationError",this.message=e};yp.prototype.toJSON=function(){return this.message};var se=yp,pu={string:dt,number:F,boolean:nt,object:zr},zn=function(e,t){this.type=e,this.args=t};zn.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=1,n,o=e[0];if(o==="array"){var a;if(e.length>2){var s=e[1];if(typeof s!="string"||!(s in pu)||s==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=pu[s],i++}else a=rt;var l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);l=e[2],i++}n=Pe(a,l)}else n=pu[o];for(var u=[];i<e.length;i++){var h=t.parse(e[i],i,rt);if(!h)return null;u.push(h)}return new zn(n,u)},zn.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var i=this.args[t].evaluate(e),n=Io(this.type,$t(i));if(n){if(t===this.args.length-1)throw new se("Expected value to be of type "+Bt(this.type)+", but found "+Bt($t(i))+" instead.")}else return i}return null},zn.prototype.eachChild=function(e){this.args.forEach(e)},zn.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},zn.prototype.serialize=function(){var e=this.type,t=[e.kind];if(e.kind==="array"){var i=e.itemType;if(i.kind==="string"||i.kind==="number"||i.kind==="boolean"){t.push(i.kind);var n=e.N;(typeof n=="number"||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map(function(o){return o.serialize()}))};var fi=zn,Rn=function(e){this.type=Ba,this.sections=e};Rn.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[1];if(!Array.isArray(i)&&typeof i=="object")return t.error("First argument must be an image or text section.");for(var n=[],o=!1,a=1;a<=e.length-1;++a){var s=e[a];if(o&&typeof s=="object"&&!Array.isArray(s)){o=!1;var l=null;if(s["font-scale"]&&(l=t.parse(s["font-scale"],1,F),!l))return null;var u=null;if(s["text-font"]&&(u=t.parse(s["text-font"],1,Pe(dt)),!u))return null;var h=null;if(s["text-color"]&&(h=t.parse(s["text-color"],1,ui),!h))return null;var f=n[n.length-1];f.scale=l,f.font=u,f.textColor=h}else{var d=t.parse(e[a],1,rt);if(!d)return null;var p=d.type.kind;if(p!=="string"&&p!=="value"&&p!=="null"&&p!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");o=!0,n.push({content:d,scale:null,font:null,textColor:null})}}return new Rn(n)},Rn.prototype.evaluate=function(e){var t=function(i){var n=i.content.evaluate(e);return $t(n)===Oo?new du("",n,null,null,null):new du(Po(n),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)};return new Rr(this.sections.map(t))},Rn.prototype.eachChild=function(e){for(var t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e(n.content),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},Rn.prototype.outputDefined=function(){return!1},Rn.prototype.serialize=function(){for(var e=["format"],t=0,i=this.sections;t<i.length;t+=1){var n=i[t];e.push(n.content.serialize());var o={};n.scale&&(o["font-scale"]=n.scale.serialize()),n.font&&(o["text-font"]=n.font.serialize()),n.textColor&&(o["text-color"]=n.textColor.serialize()),e.push(o)}return e};var xp=Rn,Pn=function(e){this.type=Oo,this.input=e};Pn.parse=function(e,t){if(e.length!==2)return t.error("Expected two arguments.");var i=t.parse(e[1],1,dt);return i?new Pn(i):t.error("No image name provided.")},Pn.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=Pr.fromString(t);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(t)>-1),i},Pn.prototype.eachChild=function(e){e(this.input)},Pn.prototype.outputDefined=function(){return!1},Pn.prototype.serialize=function(){return["image",this.input.serialize()]};var bp=Pn,Yb={"to-boolean":nt,"to-color":ui,"to-number":F,"to-string":dt},Mn=function(e,t){this.type=e,this.args=t};Mn.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var i=e[0];if((i==="to-boolean"||i==="to-string")&&e.length!==2)return t.error("Expected one argument.");for(var n=Yb[i],o=[],a=1;a<e.length;a++){var s=t.parse(e[a],a,rt);if(!s)return null;o.push(s)}return new Mn(n,o)},Mn.prototype.evaluate=function(e){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(e));if(this.type.kind==="color"){for(var t,i,n=0,o=this.args;n<o.length;n+=1){var a=o[n];if(t=a.evaluate(e),i=null,t instanceof Ce)return t;if(typeof t=="string"){var s=e.parseColor(t);if(s)return s}else if(Array.isArray(t)&&(t.length<3||t.length>4?i="Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":i=_p(t[0],t[1],t[2],t[3]),!i))return new Ce(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new se(i||"Could not parse color from value '"+(typeof t=="string"?t:String(JSON.stringify(t)))+"'")}else if(this.type.kind==="number"){for(var l=null,u=0,h=this.args;u<h.length;u+=1){var f=h[u];if(l=f.evaluate(e),l===null)return 0;var d=Number(l);if(!isNaN(d))return d}throw new se("Could not convert "+JSON.stringify(l)+" to number.")}else return this.type.kind==="formatted"?Rr.fromString(Po(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?Pr.fromString(Po(this.args[0].evaluate(e))):Po(this.args[0].evaluate(e))},Mn.prototype.eachChild=function(e){this.args.forEach(e)},Mn.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},Mn.prototype.serialize=function(){if(this.type.kind==="formatted")return new xp([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new bp(this.args[0]).serialize();var e=["to-"+this.type.kind];return this.eachChild(function(t){e.push(t.serialize())}),e};var Mr=Mn,Xb=["Unknown","Point","LineString","Polygon"],Yi=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Yi.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Yi.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?Xb[this.feature.type]:this.feature.type:null},Yi.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Yi.prototype.canonicalID=function(){return this.canonical},Yi.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Yi.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var e=this.featureDistanceData.center,t=this.featureDistanceData.scale,i=this.featureTileCoord,n=i.x,o=i.y,a=n*t-e[0],s=o*t-e[1],l=this.featureDistanceData.bearing[0],u=this.featureDistanceData.bearing[1],h=l*a+u*s;return h}return 0},Yi.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Ce.parse(e)),t};var kp=Yi,Ne=function(e,t,i,n){this.name=e,this.type=t,this._evaluate=i,this.args=n};Ne.prototype.evaluate=function(e){return this._evaluate(e,this.args)},Ne.prototype.eachChild=function(e){this.args.forEach(e)},Ne.prototype.outputDefined=function(){return!1},Ne.prototype.serialize=function(){return[this.name].concat(this.args.map(function(e){return e.serialize()}))},Ne.parse=function(e,t){var i,n=e[0],o=Ne.definitions[n];if(!o)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var a=Array.isArray(o)?o[0]:o.type,s=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,l=s.filter(function(L){var U=L[0];return!Array.isArray(U)||U.length===e.length-1}),u=null,h=0,f=l;h<f.length;h+=1){var d=f[h],p=d[0],c=d[1];u=new Rp(t.registry,t.path,null,t.scope);for(var g=[],m=!1,_=1;_<e.length;_++){var v=e[_],y=Array.isArray(p)?p[_-1]:p.type,x=u.parse(v,1+g.length,y);if(!x){m=!0;break}g.push(x)}if(!m){if(Array.isArray(p)&&p.length!==g.length){u.error("Expected "+p.length+" arguments, but found "+g.length+" instead.");continue}for(var k=0;k<g.length;k++){var E=Array.isArray(p)?p[k]:p.type,T=g[k];u.concat(k+1).checkSubtype(E,T.type)}if(u.errors.length===0)return new Ne(n,a,c,g)}}if(l.length===1)(i=t.errors).push.apply(i,u.errors);else{for(var w=l.length?l:s,C=w.map(function(L){var U=L[0];return Wb(U)}).join(" | "),R=[],P=1;P<e.length;P++){var M=t.parse(e[P],1+R.length);if(!M)return null;R.push(Bt(M.type))}t.error("Expected arguments of type "+C+", but found ("+R.join(", ")+") instead.")}return null},Ne.register=function(e,t){Ne.definitions=t;for(var i in t)e[i]=Ne};function Wb(r){return Array.isArray(r)?"("+r.map(Bt).join(", ")+")":"("+Bt(r.type)+"...)"}var Lr=Ne,Ln=function(e,t,i){this.type=ja,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=t};Ln.parse=function(e,t){if(e.length!==2)return t.error("Expected one argument.");var i=e[1];if(typeof i!="object"||Array.isArray(i))return t.error("Collator options argument must be an object.");var n=t.parse(i["case-sensitive"]===void 0?!1:i["case-sensitive"],1,nt);if(!n)return null;var o=t.parse(i["diacritic-sensitive"]===void 0?!1:i["diacritic-sensitive"],1,nt);if(!o)return null;var a=null;return i.locale&&(a=t.parse(i.locale,1,dt),!a)?null:new Ln(n,o,a)},Ln.prototype.evaluate=function(e){return new fu(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},Ln.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},Ln.prototype.outputDefined=function(){return!1},Ln.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var wp=Ln,Xi=8192;function cu(r,e){r[0]=Math.min(r[0],e[0]),r[1]=Math.min(r[1],e[1]),r[2]=Math.max(r[2],e[0]),r[3]=Math.max(r[3],e[1])}function qb(r){return(180+r)/360}function Zb(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function Ya(r,e){return!(r[0]<=e[0]||r[2]>=e[2]||r[1]<=e[1]||r[3]>=e[3])}function Kb(r,e){var t=qb(r[0]),i=Zb(r[1]),n=Math.pow(2,e.z);return[Math.round(t*n*Xi),Math.round(i*n*Xi)]}function Hb(r,e,t){var i=r[0]-e[0],n=r[1]-e[1],o=r[0]-t[0],a=r[1]-t[1];return i*a-o*n===0&&i*o<=0&&n*a<=0}function $b(r,e,t){return e[1]>r[1]!=t[1]>r[1]&&r[0]<(t[0]-e[0])*(r[1]-e[1])/(t[1]-e[1])+e[0]}function gu(r,e){for(var t=!1,i=0,n=e.length;i<n;i++)for(var o=e[i],a=0,s=o.length;a<s-1;a++){if(Hb(r,o[a],o[a+1]))return!1;$b(r,o[a],o[a+1])&&(t=!t)}return t}function Jb(r,e){for(var t=0;t<e.length;t++)if(gu(r,e[t]))return!0;return!1}function Qb(r,e){return r[0]*e[1]-r[1]*e[0]}function Ep(r,e,t,i){var n=r[0]-t[0],o=r[1]-t[1],a=e[0]-t[0],s=e[1]-t[1],l=i[0]-t[0],u=i[1]-t[1],h=n*u-l*o,f=a*u-l*s;return h>0&&f<0||h<0&&f>0}function tk(r,e,t,i){var n=[e[0]-r[0],e[1]-r[1]],o=[i[0]-t[0],i[1]-t[1]];return Qb(o,n)===0?!1:!!(Ep(r,e,t,i)&&Ep(t,i,r,e))}function ek(r,e,t){for(var i=0,n=t;i<n.length;i+=1)for(var o=n[i],a=0;a<o.length-1;++a)if(tk(r,e,o[a],o[a+1]))return!0;return!1}function Tp(r,e){for(var t=0;t<r.length;++t)if(!gu(r[t],e))return!1;for(var i=0;i<r.length-1;++i)if(ek(r[i],r[i+1],e))return!1;return!0}function ik(r,e){for(var t=0;t<e.length;t++)if(Tp(r,e[t]))return!0;return!1}function mu(r,e,t){for(var i=[],n=0;n<r.length;n++){for(var o=[],a=0;a<r[n].length;a++){var s=Kb(r[n][a],t);cu(e,s),o.push(s)}i.push(o)}return i}function Cp(r,e,t){for(var i=[],n=0;n<r.length;n++){var o=mu(r[n],e,t);i.push(o)}return i}function Sp(r,e,t,i){if(r[0]<t[0]||r[0]>t[2]){var n=i*.5,o=r[0]-t[0]>n?-i:t[0]-r[0]>n?i:0;o===0&&(o=r[0]-t[2]>n?-i:t[2]-r[0]>n?i:0),r[0]+=o}cu(e,r)}function nk(r){r[0]=r[1]=1/0,r[2]=r[3]=-1/0}function Op(r,e,t,i){var n=Math.pow(2,i.z)*Xi,o=[i.x*Xi,i.y*Xi],a=[];if(!r)return a;for(var s=0,l=r;s<l.length;s+=1)for(var u=l[s],h=0,f=u;h<f.length;h+=1){var d=f[h],p=[d.x+o[0],d.y+o[1]];Sp(p,e,t,n),a.push(p)}return a}function Ip(r,e,t,i){var n=Math.pow(2,i.z)*Xi,o=[i.x*Xi,i.y*Xi],a=[];if(!r)return a;for(var s=0,l=r;s<l.length;s+=1){for(var u=l[s],h=[],f=0,d=u;f<d.length;f+=1){var p=d[f],c=[p.x+o[0],p.y+o[1]];cu(e,c),h.push(c)}a.push(h)}if(e[2]-e[0]<=n/2){nk(e);for(var g=0,m=a;g<m.length;g+=1)for(var _=m[g],v=0,y=_;v<y.length;v+=1){var x=y[v];Sp(x,e,t,n)}}return a}function rk(r,e){var t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=r.canonicalID();if(!n)return!1;if(e.type==="Polygon"){var o=mu(e.coordinates,i,n),a=Op(r.geometry(),t,i,n);if(!Ya(t,i))return!1;for(var s=0,l=a;s<l.length;s+=1){var u=l[s];if(!gu(u,o))return!1}}if(e.type==="MultiPolygon"){var h=Cp(e.coordinates,i,n),f=Op(r.geometry(),t,i,n);if(!Ya(t,i))return!1;for(var d=0,p=f;d<p.length;d+=1){var c=p[d];if(!Jb(c,h))return!1}}return!0}function ok(r,e){var t=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=r.canonicalID();if(!n)return!1;if(e.type==="Polygon"){var o=mu(e.coordinates,i,n),a=Ip(r.geometry(),t,i,n);if(!Ya(t,i))return!1;for(var s=0,l=a;s<l.length;s+=1){var u=l[s];if(!Tp(u,o))return!1}}if(e.type==="MultiPolygon"){var h=Cp(e.coordinates,i,n),f=Ip(r.geometry(),t,i,n);if(!Ya(t,i))return!1;for(var d=0,p=f;d<p.length;d+=1){var c=p[d];if(!ik(c,h))return!1}}return!0}var di=function(e,t){this.type=nt,this.geojson=e,this.geometries=t};di.parse=function(e,t){if(e.length!==2)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Ua(e[1])){var i=e[1];if(i.type==="FeatureCollection")for(var n=0;n<i.features.length;++n){var o=i.features[n].geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new di(i,i.features[n].geometry)}else if(i.type==="Feature"){var a=i.geometry.type;if(a==="Polygon"||a==="MultiPolygon")return new di(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new di(i,i)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")},di.prototype.evaluate=function(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return rk(e,this.geometries);if(e.geometryType()==="LineString")return ok(e,this.geometries)}return!1},di.prototype.eachChild=function(){},di.prototype.outputDefined=function(){return!0},di.prototype.serialize=function(){return["within",this.geojson]};var vu=di;function Xa(r){if(r instanceof Lr){if(r.name==="get"&&r.args.length===1)return!1;if(r.name==="feature-state")return!1;if(r.name==="has"&&r.args.length===1)return!1;if(r.name==="properties"||r.name==="geometry-type"||r.name==="id")return!1;if(/^filter-/.test(r.name))return!1}if(r instanceof vu)return!1;var e=!0;return r.eachChild(function(t){e&&!Xa(t)&&(e=!1)}),e}function _u(r){if(r instanceof Lr&&r.name==="feature-state")return!1;var e=!0;return r.eachChild(function(t){e&&!_u(t)&&(e=!1)}),e}function yu(r,e){if(r instanceof Lr&&e.indexOf(r.name)>=0)return!1;var t=!0;return r.eachChild(function(i){t&&!yu(i,e)&&(t=!1)}),t}var An=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};An.parse=function(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");var i=e[1];return t.scope.has(i)?new An(i,t.scope.get(i)):t.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},An.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},An.prototype.eachChild=function(){},An.prototype.outputDefined=function(){return!1},An.prototype.serialize=function(){return["var",this.name]};var zp=An,Fn=function(e,t,i,n,o){t===void 0&&(t=[]),n===void 0&&(n=new Bb),o===void 0&&(o=[]),this.registry=e,this.path=t,this.key=t.map(function(a){return"["+a+"]"}).join(""),this.scope=n,this.errors=o,this.expectedType=i};Fn.prototype.parse=function(e,t,i,n,o){return o===void 0&&(o={}),t?this.concat(t,i,n)._parse(e,o):this._parse(e,o)},Fn.prototype._parse=function(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function i(h,f,d){return d==="assert"?new fi(f,[h]):d==="coerce"?new Mr(f,[h]):h}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if(typeof n!="string")return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var o=this.registry[n];if(o){var a=o.parse(e,this);if(!a)return null;if(this.expectedType){var s=this.expectedType,l=a.type;if((s.kind==="string"||s.kind==="number"||s.kind==="boolean"||s.kind==="object"||s.kind==="array")&&l.kind==="value")a=i(a,s,t.typeAnnotation||"assert");else if((s.kind==="color"||s.kind==="formatted"||s.kind==="resolvedImage")&&(l.kind==="value"||l.kind==="string"))a=i(a,s,t.typeAnnotation||"coerce");else if(this.checkSubtype(s,l))return null}if(!(a instanceof Va)&&a.type.kind!=="resolvedImage"&&xu(a)){var u=new kp;try{a=new Va(a.type,a.evaluate(u))}catch(h){return this.error(h.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Fn.prototype.concat=function(e,t,i){var n=typeof e=="number"?this.path.concat(e):this.path,o=i?this.scope.concat(i):this.scope;return new Fn(this.registry,n,t||null,o,this.errors)},Fn.prototype.error=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var n=""+this.key+t.map(function(o){return"["+o+"]"}).join("");this.errors.push(new $e(n,e))},Fn.prototype.checkSubtype=function(e,t){var i=Io(e,t);return i&&this.error(i),i};var Rp=Fn;function xu(r){if(r instanceof zp)return xu(r.boundExpression);if(r instanceof Lr&&r.name==="error")return!1;if(r instanceof wp)return!1;if(r instanceof vu)return!1;var e=r instanceof Mr||r instanceof fi,t=!0;return r.eachChild(function(i){e?t=t&&xu(i):t=t&&i instanceof Va}),t?Xa(r)&&yu(r,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function Pp(r,e){for(var t=r.length-1,i=0,n=t,o=0,a,s;i<=n;)if(o=Math.floor((i+n)/2),a=r[o],s=r[o+1],a<=e){if(o===t||e<s)return o;i=o+1}else if(a>e)n=o-1;else throw new se("Input is not a number.");return 0}var Dn=function(e,t,i){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,o=i;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1];this.labels.push(s),this.outputs.push(l)}};Dn.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");var i=t.parse(e[1],1,F);if(!i)return null;var n=[],o=null;t.expectedType&&t.expectedType.kind!=="value"&&(o=t.expectedType);for(var a=1;a<e.length;a+=2){var s=a===1?-1/0:e[a],l=e[a+1],u=a,h=a+1;if(typeof s!="number")return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=s)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var f=t.parse(l,h,o);if(!f)return null;o=o||f.type,n.push([s,f])}return new Dn(o,i,n)},Dn.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var o=t.length;if(n>=t[o-1])return i[o-1].evaluate(e);var a=Pp(t,n);return i[a].evaluate(e)},Dn.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){var n=i[t];e(n)}},Dn.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})},Dn.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Mp=Dn,ak=Ar;function Ar(r,e,t,i){this.cx=3*r,this.bx=3*(t-r)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=r,this.p1y=i,this.p2x=t,this.p2y=i}Ar.prototype.sampleCurveX=function(r){return((this.ax*r+this.bx)*r+this.cx)*r},Ar.prototype.sampleCurveY=function(r){return((this.ay*r+this.by)*r+this.cy)*r},Ar.prototype.sampleCurveDerivativeX=function(r){return(3*this.ax*r+2*this.bx)*r+this.cx},Ar.prototype.solveCurveX=function(r,e){typeof e>"u"&&(e=1e-6);var t,i,n,o,a;for(n=r,a=0;a<8;a++){if(o=this.sampleCurveX(n)-r,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n=n-o/s}if(t=0,i=1,n=r,n<t)return t;if(n>i)return i;for(;t<i;){if(o=this.sampleCurveX(n),Math.abs(o-r)<e)return n;r>o?t=n:i=n,n=(i-t)*.5+t}return n},Ar.prototype.solve=function(r,e){return this.sampleCurveY(this.solveCurveX(r,e))};function Se(r,e,t){return r*(1-t)+e*t}function sk(r,e,t){return new Ce(Se(r.r,e.r,t),Se(r.g,e.g,t),Se(r.b,e.b,t),Se(r.a,e.a,t))}function lk(r,e,t){return r.map(function(i,n){return Se(i,e[n],t)})}var uk=Object.freeze({__proto__:null,number:Se,color:sk,array:lk}),Lp=.95047,Ap=1,Fp=1.08883,Dp=4/29,Fr=6/29,Np=3*Fr*Fr,hk=Fr*Fr*Fr,fk=Math.PI/180,dk=180/Math.PI;function bu(r){return r>hk?Math.pow(r,1/3):r/Np+Dp}function ku(r){return r>Fr?r*r*r:Np*(r-Dp)}function wu(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function Eu(r){return r/=255,r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Gp(r){var e=Eu(r.r),t=Eu(r.g),i=Eu(r.b),n=bu((.4124564*e+.3575761*t+.1804375*i)/Lp),o=bu((.2126729*e+.7151522*t+.072175*i)/Ap),a=bu((.0193339*e+.119192*t+.9503041*i)/Fp);return{l:116*o-16,a:500*(n-o),b:200*(o-a),alpha:r.a}}function jp(r){var e=(r.l+16)/116,t=isNaN(r.a)?e:e+r.a/500,i=isNaN(r.b)?e:e-r.b/200;return e=Ap*ku(e),t=Lp*ku(t),i=Fp*ku(i),new Ce(wu(3.2404542*t-1.5371385*e-.4985314*i),wu(-.969266*t+1.8760108*e+.041556*i),wu(.0556434*t-.2040259*e+1.0572252*i),r.alpha)}function pk(r,e,t){return{l:Se(r.l,e.l,t),a:Se(r.a,e.a,t),b:Se(r.b,e.b,t),alpha:Se(r.alpha,e.alpha,t)}}function ck(r){var e=Gp(r),t=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*dk;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:t,alpha:r.a}}function gk(r){var e=r.h*fk,t=r.c,i=r.l;return jp({l:i,a:Math.cos(e)*t,b:Math.sin(e)*t,alpha:r.alpha})}function mk(r,e,t){var i=e-r;return r+t*(i>180||i<-180?i-360*Math.round(i/360):i)}function vk(r,e,t){return{h:mk(r.h,e.h,t),c:Se(r.c,e.c,t),l:Se(r.l,e.l,t),alpha:Se(r.alpha,e.alpha,t)}}var Wa={forward:Gp,reverse:jp,interpolate:pk},qa={forward:ck,reverse:gk,interpolate:vk},pi=function(e,t,i,n,o){this.type=e,this.operator=t,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var a=0,s=o;a<s.length;a+=1){var l=s[a],u=l[0],h=l[1];this.labels.push(u),this.outputs.push(h)}};pi.interpolationFactor=function(e,t,i,n){var o=0;if(e.name==="exponential")o=Tu(t,e.base,i,n);else if(e.name==="linear")o=Tu(t,1,i,n);else if(e.name==="cubic-bezier"){var a=e.controlPoints,s=new ak(a[0],a[1],a[2],a[3]);o=s.solve(Tu(t,1,i,n))}return o},pi.parse=function(e,t){var i=e[0],n=e[1],o=e[2],a=e.slice(3);if(!Array.isArray(n)||n.length===0)return t.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){var s=n[1];if(typeof s!="number")return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:s}}else if(n[0]==="cubic-bezier"){var l=n.slice(1);if(l.length!==4||l.some(function(_){return typeof _!="number"||_<0||_>1}))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:l}}else return t.error("Unknown interpolation type "+String(n[0]),1,0);if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(o=t.parse(o,2,F),!o)return null;var u=[],h=null;i==="interpolate-hcl"||i==="interpolate-lab"?h=ui:t.expectedType&&t.expectedType.kind!=="value"&&(h=t.expectedType);for(var f=0;f<a.length;f+=2){var d=a[f],p=a[f+1],c=f+3,g=f+4;if(typeof d!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(u.length&&u[u.length-1][0]>=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',c);var m=t.parse(p,g,h);if(!m)return null;h=h||m.type,u.push([d,m])}return h.kind!=="number"&&h.kind!=="color"&&!(h.kind==="array"&&h.itemType.kind==="number"&&typeof h.N=="number")?t.error("Type "+Bt(h)+" is not interpolatable."):new pi(h,i,n,o,u)},pi.prototype.evaluate=function(e){var t=this.labels,i=this.outputs;if(t.length===1)return i[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return i[0].evaluate(e);var o=t.length;if(n>=t[o-1])return i[o-1].evaluate(e);var a=Pp(t,n),s=t[a],l=t[a+1],u=pi.interpolationFactor(this.interpolation,n,s,l),h=i[a].evaluate(e),f=i[a+1].evaluate(e);return this.operator==="interpolate"?uk[this.type.kind.toLowerCase()](h,f,u):this.operator==="interpolate-hcl"?qa.reverse(qa.interpolate(qa.forward(h),qa.forward(f),u)):Wa.reverse(Wa.interpolate(Wa.forward(h),Wa.forward(f),u))},pi.prototype.eachChild=function(e){e(this.input);for(var t=0,i=this.outputs;t<i.length;t+=1){var n=i[t];e(n)}},pi.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})},pi.prototype.serialize=function(){var e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],i=0;i<this.labels.length;i++)t.push(this.labels[i],this.outputs[i].serialize());return t};function Tu(r,e,t,i){var n=i-t,o=r-t;return n===0?0:e===1?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}var Nn=pi,Wi=function(e,t){this.type=e,this.args=t};Wi.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var i=null,n=t.expectedType;n&&n.kind!=="value"&&(i=n);for(var o=[],a=0,s=e.slice(1);a<s.length;a+=1){var l=s[a],u=t.parse(l,1+o.length,i,void 0,{typeAnnotation:"omit"});if(!u)return null;i=i||u.type,o.push(u)}var h=n&&o.some(function(f){return Io(n,f.type)});return h?new Wi(rt,o):new Wi(i,o)},Wi.prototype.evaluate=function(e){for(var t=null,i=0,n,o=0,a=this.args;o<a.length;o+=1){var s=a[o];if(i++,t=s.evaluate(e),t&&t instanceof Pr&&!t.available&&(n||(n=t),t=null,i===this.args.length))return n;if(t!==null)break}return t},Wi.prototype.eachChild=function(e){this.args.forEach(e)},Wi.prototype.outputDefined=function(){return this.args.every(function(e){return e.outputDefined()})},Wi.prototype.serialize=function(){var e=["coalesce"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Bp=Wi,Gn=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};Gn.prototype.evaluate=function(e){return this.result.evaluate(e)},Gn.prototype.eachChild=function(e){for(var t=0,i=this.bindings;t<i.length;t+=1){var n=i[t];e(n[1])}e(this.result)},Gn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var i=[],n=1;n<e.length-1;n+=2){var o=e[n];if(typeof o!="string")return t.error("Expected string, but found "+typeof o+" instead.",n);if(/[^a-zA-Z0-9_]/.test(o))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var a=t.parse(e[n+1],n+1);if(!a)return null;i.push([o,a])}var s=t.parse(e[e.length-1],e.length-1,t.expectedType,i);return s?new Gn(i,s):null},Gn.prototype.outputDefined=function(){return this.result.outputDefined()},Gn.prototype.serialize=function(){for(var e=["let"],t=0,i=this.bindings;t<i.length;t+=1){var n=i[t],o=n[0],a=n[1];e.push(o,a.serialize())}return e.push(this.result.serialize()),e};var Up=Gn,jn=function(e,t,i){this.type=e,this.index=t,this.input=i};jn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,F),n=t.parse(e[2],2,Pe(t.expectedType||rt));if(!i||!n)return null;var o=n.type;return new jn(o.itemType,i,n)},jn.prototype.evaluate=function(e){var t=this.index.evaluate(e),i=this.input.evaluate(e);if(t<0)throw new se("Array index out of bounds: "+t+" < 0.");if(t>=i.length)throw new se("Array index out of bounds: "+t+" > "+(i.length-1)+".");if(t!==Math.floor(t))throw new se("Array index must be an integer, but found "+t+" instead.");return i[t]},jn.prototype.eachChild=function(e){e(this.index),e(this.input)},jn.prototype.outputDefined=function(){return!1},jn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _k=jn,Bn=function(e,t){this.type=nt,this.needle=e,this.haystack=t};Bn.parse=function(e,t){if(e.length!==3)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,rt),n=t.parse(e[2],2,rt);return!i||!n?null:uu(i.type,[nt,dt,F,Ga,rt])?new Bn(i,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+Bt(i.type)+" instead")},Bn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(i==null)return!1;if(!zo(t,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Bt($t(t))+" instead.");if(!zo(i,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Bt($t(i))+" instead.");return i.indexOf(t)>=0},Bn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Bn.prototype.outputDefined=function(){return!0},Bn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var yk=Bn,qi=function(e,t,i){this.type=F,this.needle=e,this.haystack=t,this.fromIndex=i};qi.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,rt),n=t.parse(e[2],2,rt);if(!i||!n)return null;if(!uu(i.type,[nt,dt,F,Ga,rt]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+Bt(i.type)+" instead");if(e.length===4){var o=t.parse(e[3],3,F);return o?new qi(i,n,o):null}else return new qi(i,n)},qi.prototype.evaluate=function(e){var t=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!zo(t,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Bt($t(t))+" instead.");if(!zo(i,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Bt($t(i))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return i.indexOf(t,n)}return i.indexOf(t)},qi.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},qi.prototype.outputDefined=function(){return!1},qi.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var xk=qi,Un=function(e,t,i,n,o,a){this.inputType=e,this.type=t,this.input=i,this.cases=n,this.outputs=o,this.otherwise=a};Un.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!==1)return t.error("Expected an even number of arguments.");var i,n;t.expectedType&&t.expectedType.kind!=="value"&&(n=t.expectedType);for(var o={},a=[],s=2;s<e.length-1;s+=2){var l=e[s],u=e[s+1];Array.isArray(l)||(l=[l]);var h=t.concat(s);if(l.length===0)return h.error("Expected at least one branch label.");for(var f=0,d=l;f<d.length;f+=1){var p=d[f];if(typeof p!="number"&&typeof p!="string")return h.error("Branch labels must be numbers or strings.");if(typeof p=="number"&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof p=="number"&&Math.floor(p)!==p)return h.error("Numeric branch labels must be integer values.");if(!i)i=$t(p);else if(h.checkSubtype(i,$t(p)))return null;if(typeof o[String(p)]<"u")return h.error("Branch labels must be unique.");o[String(p)]=a.length}var c=t.parse(u,s,n);if(!c)return null;n=n||c.type,a.push(c)}var g=t.parse(e[1],1,rt);if(!g)return null;var m=t.parse(e[e.length-1],e.length-1,n);return!m||g.type.kind!=="value"&&t.concat(1).checkSubtype(i,g.type)?null:new Un(i,n,g,o,a,m)},Un.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=$t(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise;return i.evaluate(e)},Un.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Un.prototype.outputDefined=function(){return this.outputs.every(function(e){return e.outputDefined()})&&this.otherwise.outputDefined()},Un.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),n=[],o={},a=0,s=i;a<s.length;a+=1){var l=s[a],u=o[this.cases[l]];u===void 0?(o[this.cases[l]]=n.length,n.push([this.cases[l],[l]])):n[u][1].push(l)}for(var h=function(g){return e.inputType.kind==="number"?Number(g):g},f=0,d=n;f<d.length;f+=1){var p=d[f],u=p[0],c=p[1];c.length===1?t.push(h(c[0])):t.push(c.map(h)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var bk=Un,Vn=function(e,t,i){this.type=e,this.branches=t,this.otherwise=i};Vn.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!==0)return t.error("Expected an odd number of arguments.");var i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);for(var n=[],o=1;o<e.length-1;o+=2){var a=t.parse(e[o],o,nt);if(!a)return null;var s=t.parse(e[o+1],o+1,i);if(!s)return null;n.push([a,s]),i=i||s.type}var l=t.parse(e[e.length-1],e.length-1,i);return l?new Vn(i,n,l):null},Vn.prototype.evaluate=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],o=n[0],a=n[1];if(o.evaluate(e))return a.evaluate(e)}return this.otherwise.evaluate(e)},Vn.prototype.eachChild=function(e){for(var t=0,i=this.branches;t<i.length;t+=1){var n=i[t],o=n[0],a=n[1];e(o),e(a)}e(this.otherwise)},Vn.prototype.outputDefined=function(){return this.branches.every(function(e){e[0];var t=e[1];return t.outputDefined()})&&this.otherwise.outputDefined()},Vn.prototype.serialize=function(){var e=["case"];return this.eachChild(function(t){e.push(t.serialize())}),e};var kk=Vn,Zi=function(e,t,i,n){this.type=e,this.input=t,this.beginIndex=i,this.endIndex=n};Zi.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1,rt),n=t.parse(e[2],2,F);if(!i||!n)return null;if(!uu(i.type,[Pe(rt),dt,rt]))return t.error("Expected first argument to be of type array or string, but found "+Bt(i.type)+" instead");if(e.length===4){var o=t.parse(e[3],3,F);return o?new Zi(i.type,i,n,o):null}else return new Zi(i.type,i,n)},Zi.prototype.evaluate=function(e){var t=this.input.evaluate(e),i=this.beginIndex.evaluate(e);if(!zo(t,["string","array"]))throw new se("Expected first argument to be of type array or string, but found "+Bt($t(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(i,n)}return t.slice(i)},Zi.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Zi.prototype.outputDefined=function(){return!1},Zi.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var wk=Zi;function Vp(r,e){return r==="=="||r==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Ek(r,e,t){return e===t}function Tk(r,e,t){return e!==t}function Ck(r,e,t){return e<t}function Sk(r,e,t){return e>t}function Ok(r,e,t){return e<=t}function Ik(r,e,t){return e>=t}function Yp(r,e,t,i){return i.compare(e,t)===0}function zk(r,e,t,i){return!Yp(r,e,t,i)}function Rk(r,e,t,i){return i.compare(e,t)<0}function Pk(r,e,t,i){return i.compare(e,t)>0}function Mk(r,e,t,i){return i.compare(e,t)<=0}function Lk(r,e,t,i){return i.compare(e,t)>=0}function Dr(r,e,t){var i=r!=="=="&&r!=="!=";return function(){function n(o,a,s){this.type=nt,this.lhs=o,this.rhs=a,this.collator=s,this.hasUntypedArgument=o.type.kind==="value"||a.type.kind==="value"}return n.parse=function(a,s){if(a.length!==3&&a.length!==4)return s.error("Expected two or three arguments.");var l=a[0],u=s.parse(a[1],1,rt);if(!u)return null;if(!Vp(l,u.type))return s.concat(1).error('"'+l+`" comparisons are not supported for type '`+Bt(u.type)+"'.");var h=s.parse(a[2],2,rt);if(!h)return null;if(!Vp(l,h.type))return s.concat(2).error('"'+l+`" comparisons are not supported for type '`+Bt(h.type)+"'.");if(u.type.kind!==h.type.kind&&u.type.kind!=="value"&&h.type.kind!=="value")return s.error("Cannot compare types '"+Bt(u.type)+"' and '"+Bt(h.type)+"'.");i&&(u.type.kind==="value"&&h.type.kind!=="value"?u=new fi(h.type,[u]):u.type.kind!=="value"&&h.type.kind==="value"&&(h=new fi(u.type,[h])));var f=null;if(a.length===4){if(u.type.kind!=="string"&&h.type.kind!=="string"&&u.type.kind!=="value"&&h.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(f=s.parse(a[3],3,ja),!f)return null}return new n(u,h,f)},n.prototype.evaluate=function(a){var s=this.lhs.evaluate(a),l=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){var u=$t(s),h=$t(l);if(u.kind!==h.kind||!(u.kind==="string"||u.kind==="number"))throw new se('Expected arguments for "'+r+'" to be (string, string) or (number, number), but found ('+u.kind+", "+h.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var f=$t(s),d=$t(l);if(f.kind!=="string"||d.kind!=="string")return e(a,s,l)}return this.collator?t(a,s,l,this.collator.evaluate(a)):e(a,s,l)},n.prototype.eachChild=function(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)},n.prototype.outputDefined=function(){return!0},n.prototype.serialize=function(){var a=[r];return this.eachChild(function(s){a.push(s.serialize())}),a},n}()}var Ak=Dr("==",Ek,Yp),Fk=Dr("!=",Tk,zk),Dk=Dr("<",Ck,Rk),Nk=Dr(">",Sk,Pk),Gk=Dr("<=",Ok,Mk),jk=Dr(">=",Ik,Lk),Yn=function(e,t,i,n,o){this.type=dt,this.number=e,this.locale=t,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=o};Yn.parse=function(e,t){if(e.length!==3)return t.error("Expected two arguments.");var i=t.parse(e[1],1,F);if(!i)return null;var n=e[2];if(typeof n!="object"||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var o=null;if(n.locale&&(o=t.parse(n.locale,1,dt),!o))return null;var a=null;if(n.currency&&(a=t.parse(n.currency,1,dt),!a))return null;var s=null;if(n["min-fraction-digits"]&&(s=t.parse(n["min-fraction-digits"],1,F),!s))return null;var l=null;return n["max-fraction-digits"]&&(l=t.parse(n["max-fraction-digits"],1,F),!l)?null:new Yn(i,o,a,s,l)},Yn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Yn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Yn.prototype.outputDefined=function(){return!1},Yn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Bk=Yn,Xn=function(e){this.type=F,this.input=e};Xn.parse=function(e,t){if(e.length!==2)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var i=t.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?t.error("Expected argument of type string or array, but found "+Bt(i.type)+" instead."):new Xn(i):null},Xn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if(typeof t=="string")return t.length;if(Array.isArray(t))return t.length;throw new se("Expected value to be of type string or array, but found "+Bt($t(t))+" instead.")},Xn.prototype.eachChild=function(e){e(this.input)},Xn.prototype.outputDefined=function(){return!1},Xn.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Uk=Xn,Xp={"==":Ak,"!=":Fk,">":Nk,"<":Dk,">=":jk,"<=":Gk,array:fi,at:_k,boolean:fi,case:kk,coalesce:Bp,collator:wp,format:xp,image:bp,in:yk,"index-of":xk,interpolate:Nn,"interpolate-hcl":Nn,"interpolate-lab":Nn,length:Uk,let:Up,literal:Va,match:bk,number:fi,"number-format":Bk,object:fi,slice:wk,step:Mp,string:fi,"to-boolean":Mr,"to-color":Mr,"to-number":Mr,"to-string":Mr,var:zp,within:vu};function Wp(r,e){var t=e[0],i=e[1],n=e[2],o=e[3];t=t.evaluate(r),i=i.evaluate(r),n=n.evaluate(r);var a=o?o.evaluate(r):1,s=_p(t,i,n,a);if(s)throw new se(s);return new Ce(t/255*a,i/255*a,n/255*a,a)}function qp(r,e){return r in e}function Cu(r,e){var t=e[r];return typeof t>"u"?null:t}function Vk(r,e,t,i){for(;t<=i;){var n=t+i>>1;if(e[n]===r)return!0;e[n]>r?i=n-1:t=n+1}return!1}function Wn(r){return{type:r}}Lr.register(Xp,{error:[Ub,[dt],function(r,e){var t=e[0];throw new se(t.evaluate(r))}],typeof:[dt,[rt],function(r,e){var t=e[0];return Bt($t(t.evaluate(r)))}],"to-rgba":[Pe(F,4),[ui],function(r,e){var t=e[0];return t.evaluate(r).toArray()}],rgb:[ui,[F,F,F],Wp],rgba:[ui,[F,F,F,F],Wp],has:{type:nt,overloads:[[[dt],function(r,e){var t=e[0];return qp(t.evaluate(r),r.properties())}],[[dt,zr],function(r,e){var t=e[0],i=e[1];return qp(t.evaluate(r),i.evaluate(r))}]]},get:{type:rt,overloads:[[[dt],function(r,e){var t=e[0];return Cu(t.evaluate(r),r.properties())}],[[dt,zr],function(r,e){var t=e[0],i=e[1];return Cu(t.evaluate(r),i.evaluate(r))}]]},"feature-state":[rt,[dt],function(r,e){var t=e[0];return Cu(t.evaluate(r),r.featureState||{})}],properties:[zr,[],function(r){return r.properties()}],"geometry-type":[dt,[],function(r){return r.geometryType()}],id:[rt,[],function(r){return r.id()}],zoom:[F,[],function(r){return r.globals.zoom}],pitch:[F,[],function(r){return r.globals.pitch||0}],"distance-from-center":[F,[],function(r){return r.distanceFromCenter()}],"heatmap-density":[F,[],function(r){return r.globals.heatmapDensity||0}],"line-progress":[F,[],function(r){return r.globals.lineProgress||0}],"sky-radial-progress":[F,[],function(r){return r.globals.skyRadialProgress||0}],accumulated:[rt,[],function(r){return r.globals.accumulated===void 0?null:r.globals.accumulated}],"+":[F,Wn(F),function(r,e){for(var t=0,i=0,n=e;i<n.length;i+=1){var o=n[i];t+=o.evaluate(r)}return t}],"*":[F,Wn(F),function(r,e){for(var t=1,i=0,n=e;i<n.length;i+=1){var o=n[i];t*=o.evaluate(r)}return t}],"-":{type:F,overloads:[[[F,F],function(r,e){var t=e[0],i=e[1];return t.evaluate(r)-i.evaluate(r)}],[[F],function(r,e){var t=e[0];return-t.evaluate(r)}]]},"/":[F,[F,F],function(r,e){var t=e[0],i=e[1];return t.evaluate(r)/i.evaluate(r)}],"%":[F,[F,F],function(r,e){var t=e[0],i=e[1];return t.evaluate(r)%i.evaluate(r)}],ln2:[F,[],function(){return Math.LN2}],pi:[F,[],function(){return Math.PI}],e:[F,[],function(){return Math.E}],"^":[F,[F,F],function(r,e){var t=e[0],i=e[1];return Math.pow(t.evaluate(r),i.evaluate(r))}],sqrt:[F,[F],function(r,e){var t=e[0];return Math.sqrt(t.evaluate(r))}],log10:[F,[F],function(r,e){var t=e[0];return Math.log(t.evaluate(r))/Math.LN10}],ln:[F,[F],function(r,e){var t=e[0];return Math.log(t.evaluate(r))}],log2:[F,[F],function(r,e){var t=e[0];return Math.log(t.evaluate(r))/Math.LN2}],sin:[F,[F],function(r,e){var t=e[0];return Math.sin(t.evaluate(r))}],cos:[F,[F],function(r,e){var t=e[0];return Math.cos(t.evaluate(r))}],tan:[F,[F],function(r,e){var t=e[0];return Math.tan(t.evaluate(r))}],asin:[F,[F],function(r,e){var t=e[0];return Math.asin(t.evaluate(r))}],acos:[F,[F],function(r,e){var t=e[0];return Math.acos(t.evaluate(r))}],atan:[F,[F],function(r,e){var t=e[0];return Math.atan(t.evaluate(r))}],min:[F,Wn(F),function(r,e){return Math.min.apply(Math,e.map(function(t){return t.evaluate(r)}))}],max:[F,Wn(F),function(r,e){return Math.max.apply(Math,e.map(function(t){return t.evaluate(r)}))}],abs:[F,[F],function(r,e){var t=e[0];return Math.abs(t.evaluate(r))}],round:[F,[F],function(r,e){var t=e[0],i=t.evaluate(r);return i<0?-Math.round(-i):Math.round(i)}],floor:[F,[F],function(r,e){var t=e[0];return Math.floor(t.evaluate(r))}],ceil:[F,[F],function(r,e){var t=e[0];return Math.ceil(t.evaluate(r))}],"filter-==":[nt,[dt,rt],function(r,e){var t=e[0],i=e[1];return r.properties()[t.value]===i.value}],"filter-id-==":[nt,[rt],function(r,e){var t=e[0];return r.id()===t.value}],"filter-type-==":[nt,[dt],function(r,e){var t=e[0];return r.geometryType()===t.value}],"filter-<":[nt,[dt,rt],function(r,e){var t=e[0],i=e[1],n=r.properties()[t.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[nt,[rt],function(r,e){var t=e[0],i=r.id(),n=t.value;return typeof i==typeof n&&i<n}],"filter->":[nt,[dt,rt],function(r,e){var t=e[0],i=e[1],n=r.properties()[t.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[nt,[rt],function(r,e){var t=e[0],i=r.id(),n=t.value;return typeof i==typeof n&&i>n}],"filter-<=":[nt,[dt,rt],function(r,e){var t=e[0],i=e[1],n=r.properties()[t.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[nt,[rt],function(r,e){var t=e[0],i=r.id(),n=t.value;return typeof i==typeof n&&i<=n}],"filter->=":[nt,[dt,rt],function(r,e){var t=e[0],i=e[1],n=r.properties()[t.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[nt,[rt],function(r,e){var t=e[0],i=r.id(),n=t.value;return typeof i==typeof n&&i>=n}],"filter-has":[nt,[rt],function(r,e){var t=e[0];return t.value in r.properties()}],"filter-has-id":[nt,[],function(r){return r.id()!==null&&r.id()!==void 0}],"filter-type-in":[nt,[Pe(dt)],function(r,e){var t=e[0];return t.value.indexOf(r.geometryType())>=0}],"filter-id-in":[nt,[Pe(rt)],function(r,e){var t=e[0];return t.value.indexOf(r.id())>=0}],"filter-in-small":[nt,[dt,Pe(rt)],function(r,e){var t=e[0],i=e[1];return i.value.indexOf(r.properties()[t.value])>=0}],"filter-in-large":[nt,[dt,Pe(rt)],function(r,e){var t=e[0],i=e[1];return Vk(r.properties()[t.value],i.value,0,i.value.length-1)}],all:{type:nt,overloads:[[[nt,nt],function(r,e){var t=e[0],i=e[1];return t.evaluate(r)&&i.evaluate(r)}],[Wn(nt),function(r,e){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(!n.evaluate(r))return!1}return!0}]]},any:{type:nt,overloads:[[[nt,nt],function(r,e){var t=e[0],i=e[1];return t.evaluate(r)||i.evaluate(r)}],[Wn(nt),function(r,e){for(var t=0,i=e;t<i.length;t+=1){var n=i[t];if(n.evaluate(r))return!0}return!1}]]},"!":[nt,[nt],function(r,e){var t=e[0];return!t.evaluate(r)}],"is-supported-script":[nt,[dt],function(r,e){var t=e[0],i=r.globals&&r.globals.isSupportedScript;return i?i(t.evaluate(r)):!0}],upcase:[dt,[dt],function(r,e){var t=e[0];return t.evaluate(r).toUpperCase()}],downcase:[dt,[dt],function(r,e){var t=e[0];return t.evaluate(r).toLowerCase()}],concat:[dt,Wn(rt),function(r,e){return e.map(function(t){return Po(t.evaluate(r))}).join("")}],"resolved-locale":[dt,[ja],function(r,e){var t=e[0];return t.evaluate(r).resolvedLocale()}]});var Zp=Xp;function Su(r){return{result:"success",value:r}}function Nr(r){return{result:"error",value:r}}function Yk(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function Xk(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function Wk(r){return!!r.expression&&r.expression.interpolated}function Kp(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var Ou=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new kp,this._defaultValue=t?Hk(t):null,this._enumValues=t&&t.type==="enum"?t.values:null};Ou.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,o,a,s,l){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=i,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)},Ou.prototype.evaluate=function(e,t,i,n,o,a,s,l){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=i||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=o||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=l||null;try{var u=this.expression.evaluate(this._evaluator);if(u==null||typeof u=="number"&&u!==u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new se("Expected value to be one of "+Object.keys(this._enumValues).map(function(h){return JSON.stringify(h)}).join(", ")+", but found "+JSON.stringify(u)+" instead.");return u}catch(h){return this._warningHistory[h.message]||(this._warningHistory[h.message]=!0,typeof console<"u"&&console.warn(h.message)),this._defaultValue}};function qk(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in Zp}function Iu(r,e){var t=new Rp(Zp,[],e?Kk(e):void 0),i=t.parse(r,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return i?Su(new Ou(i,e)):Nr(t.errors)}var Za=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!_u(t.expression)};Za.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,o,a)},Za.prototype.evaluate=function(e,t,i,n,o,a){return this._styleExpression.evaluate(e,t,i,n,o,a)};var Mo=function(e,t,i,n){this.kind=e,this.zoomStops=i,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!_u(t.expression),this.interpolationType=n};Mo.prototype.evaluateWithoutErrorHandling=function(e,t,i,n,o,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,i,n,o,a)},Mo.prototype.evaluate=function(e,t,i,n,o,a){return this._styleExpression.evaluate(e,t,i,n,o,a)},Mo.prototype.interpolationFactor=function(e,t,i){return this.interpolationType?Nn.interpolationFactor(this.interpolationType,e,t,i):0};function Zk(r,e){if(r=Iu(r,e),r.result==="error")return r;var t=r.value.expression,i=Xa(t);if(!i&&!Yk(e))return Nr([new $e("","data expressions not supported")]);var n=yu(t,["zoom","pitch","distance-from-center"]);if(!n&&!Xk(e))return Nr([new $e("","zoom expressions not supported")]);var o=Ka(t);if(!o&&!n)return Nr([new $e("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof $e)return Nr([o]);if(o instanceof Nn&&!Wk(e))return Nr([new $e("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Su(i?new Za("constant",r.value):new Za("source",r.value));var a=o instanceof Nn?o.interpolation:void 0;return Su(i?new Mo("camera",r.value,o.labels,a):new Mo("composite",r.value,o.labels,a))}function Ka(r){var e=null;if(r instanceof Up)e=Ka(r.result);else if(r instanceof Bp)for(var t=0,i=r.args;t<i.length;t+=1){var n=i[t];if(e=Ka(n),e)break}else(r instanceof Mp||r instanceof Nn)&&r.input instanceof Lr&&r.input.name==="zoom"&&(e=r);return e instanceof $e||r.eachChild(function(o){var a=Ka(o);a instanceof $e?e=a:!e&&a?e=new $e("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&a&&e!==a&&(e=new $e("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function Kk(r){var e={color:ui,string:dt,number:F,enum:dt,boolean:nt,formatted:Ba,resolvedImage:Oo};return r.type==="array"?Pe(e[r.value]||rt,r.length):e[r.type]}function Hk(r){return r.type==="color"&&Kp(r.default)?new Ce(0,0,0,0):r.type==="color"?Ce.parse(r.default)||null:r.default===void 0?null:r.default}function $k(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function zu(r){if(Array.isArray(r))return r.map(zu);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){var e={};for(var t in r)e[t]=zu(r[t]);return e}return $k(r)}var Hp={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function $p(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(var e=0,t=r.slice(1);e<t.length;e+=1){var i=t[e];if(!$p(i)&&typeof i!="boolean")return!1}return!0;default:return!0}}function Jk(r,e){if(e===void 0&&(e="fill"),r==null)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};$p(r)||(r=Ha(r));var t=r,i=!0;try{i=Qk(t)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
53
- This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
54
- and paste the contents of this message in the report.
55
- Thank you!
56
- Filter Expression:
57
- `+JSON.stringify(t,null,2)+`
58
- `)}var n=Hp["filter_"+e],o=Iu(i,n),a=null;if(o.result==="error")throw new Error(o.value.map(function(f){return f.key+": "+f.message}).join(", "));a=function(f,d,p){return o.value.evaluate(f,d,{},p)};var s=null,l=null;if(i!==t){var u=Iu(t,n);if(u.result==="error")throw new Error(u.value.map(function(f){return f.key+": "+f.message}).join(", "));s=function(f,d,p,c,g){return u.value.evaluate(f,d,{},p,void 0,void 0,c,g)},l=!Xa(u.value.expression)}a=a;var h=tc(i);return{filter:a,dynamicFilter:s||void 0,needGeometry:h,needFeature:!!l}}function Qk(r){if(!Gr(r))return r;var e=zu(r);return Qp(e),e=Jp(e),e}function Jp(r){if(!Array.isArray(r))return r;var e=iw(r);return e===!0?e:e.map(function(t){return Jp(t)})}function Qp(r){var e=!1,t=[];if(r[0]==="case"){for(var i=1;i<r.length-1;i+=2)e=e||Gr(r[i]),t.push(r[i+1]);t.push(r[r.length-1])}else if(r[0]==="match"){e=e||Gr(r[1]);for(var n=2;n<r.length-1;n+=2)t.push(r[n+1]);t.push(r[r.length-1])}else if(r[0]==="step"){e=e||Gr(r[1]);for(var o=1;o<r.length-1;o+=2)t.push(r[o+1])}e&&(r.length=0,r.push.apply(r,["any"].concat(t)));for(var a=1;a<r.length;a++)Qp(r[a])}function Gr(r){if(!Array.isArray(r))return!1;if(tw(r[0]))return!0;for(var e=1;e<r.length;e++){var t=r[e];if(Gr(t))return!0}return!1}function tw(r){return r==="pitch"||r==="distance-from-center"}var ew=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function iw(r){if(ew.has(r[0]))for(var e=1;e<r.length;e++){var t=r[e];if(Gr(t))return!0}return r}function nw(r,e){return r<e?-1:r>e?1:0}function tc(r){if(!Array.isArray(r))return!1;if(r[0]==="within")return!0;for(var e=1;e<r.length;e++)if(tc(r[e]))return!0;return!1}function Ha(r){if(!r)return!0;var e=r[0];if(r.length<=1)return e!=="any";var t=e==="=="?Ru(r[1],r[2],"=="):e==="!="?$a(Ru(r[1],r[2],"==")):e==="<"||e===">"||e==="<="||e===">="?Ru(r[1],r[2],e):e==="any"?rw(r.slice(1)):e==="all"?["all"].concat(r.slice(1).map(Ha)):e==="none"?["all"].concat(r.slice(1).map(Ha).map($a)):e==="in"?ec(r[1],r.slice(2)):e==="!in"?$a(ec(r[1],r.slice(2))):e==="has"?ic(r[1]):e==="!has"?$a(ic(r[1])):e==="within"?r:!0;return t}function Ru(r,e,t){switch(r){case"$type":return["filter-type-"+t,e];case"$id":return["filter-id-"+t,e];default:return["filter-"+t,r,e]}}function rw(r){return["any"].concat(r.map(Ha))}function ec(r,e){if(e.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",r,["literal",e.sort(nw)]]:["filter-in-small",r,["literal",e]]}}function ic(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function $a(r){return["!",r]}var ow=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function aw(r,e){var t={};for(var i in r)i!=="ref"&&(t[i]=r[i]);return ow.forEach(function(n){n in e&&(t[n]=e[n])}),t}function sw(r){r=r.slice();for(var e=Object.create(null),t=0;t<r.length;t++)e[r[t].id]=r[t];for(var i=0;i<r.length;i++)"ref"in r[i]&&(r[i]=aw(r[i],e[r[i].ref]));return r}var nc={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},Lo=" ",rc=/(italic|oblique)$/i,oc={},ac=function(r,e,t){var i=oc[r];if(!i){Array.isArray(r)||(r=[r]);for(var n=400,o="normal",a=[],s,l,u=0,h=r.length;u<h;++u){var f=r[u],d=f.split(" "),p=d[d.length-1].toLowerCase();p=="normal"||p=="italic"||p=="oblique"?(o=l?o:p,d.pop(),p=d[d.length-1].toLowerCase()):rc.test(p)&&(p=p.replace(rc,""),o=l?o:d[d.length-1].replace(p,""));for(var c in nc){var g=d.length>1?d[d.length-2].toLowerCase():"";if(p==c||p==c.replace("-","")||g+"-"+p==c){n=s?n:nc[c],d.pop(),g&&c.startsWith(g)&&d.pop();break}}!s&&typeof p=="number"&&(n=p);var m=d.join(Lo).replace("Klokantech Noto Sans","Noto Sans");m.indexOf(Lo)!==-1&&(m='"'+m+'"'),a.push(m)}i=oc[r]=[o,n,a]}return i[0]+Lo+i[1]+Lo+e+"px"+(t?"/"+t:"")+Lo+i[2]};function Pu(r){return r*Math.PI/180}var lw=function(){for(var r=[],e=78271.51696402048;r.length<=24;e/=2)r.push(e);return r}();function sc(r,e){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(r,e);var t=document.createElement("canvas");return t.width=r,t.height=e,t}function uw(r,e){for(var t=0,i=e.length;t<i;++t){var n=e[t];if(n<r&&t+1<i){var o=e[t]/e[t+1];return t+Math.log(e[t]/r)/Math.log(o)}}return i-1}var hw=Array(256).join("\u200A");function Mu(r,e){if(e>=.05){for(var t="",i=r.split(`
59
- `),n=hw.slice(0,Math.round(e/.1)),o=0,a=i.length;o<a;++o)o>0&&(t+=`
60
- `),t+=i[o].split("").join(n);return t}return r}var Lu;function lc(){return Lu||(Lu=sc(1,1).getContext("2d")),Lu}function qn(r,e){return lc().measureText(r).width+(r.length-1)*e}var uc={};function Au(r,e,t,i){if(r.indexOf(`
61
- `)!==-1){for(var n=r.split(`
62
- `),o=[],a=0,s=n.length;a<s;++a)o.push(Au(n[a],e,t,i));return o.join(`
63
- `)}var l=t+","+e+","+r+","+i,u=uc[l];if(!u){var h=r.split(" ");if(h.length>1){var f=lc();f.font=e;for(var d=f.measureText("M").width,p=d*t,c="",g=[],m=0,_=h.length;m<_;++m){var v=h[m],y=c+(c?" ":"")+v;qn(y,i)<=p?c=y:(c&&g.push(c),c=v)}c&&g.push(c);for(var x=0,k=g.length;x<k&&k>1;++x){var E=g[x];if(qn(E,i)<p*.35){var T=x>0?qn(g[x-1],i):1/0,w=x<k-1?qn(g[x+1],i):1/0;g.splice(x,1),k-=1,T<w?(g[x-1]+=" "+E,x-=1):g[x]=E+" "+g[x]}}for(var C=0,R=g.length-1;C<R;++C){var P=g[C],M=g[C+1];if(qn(P,i)>p*.7&&qn(M,i)<p*.6){var L=P.split(" "),U=L.pop();qn(U,i)<p*.2&&(g[C]=L.join(" "),g[C+1]=U+" "+M),R-=1}}u=g.join(`
64
- `)}else u=r;u=Mu(u,i),uc[l]=u}return u}var fw={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},dw={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},pw=function(r,e){var t=Zk(r,e);if(t.result==="error")throw new Error(t.value.map(function(i){return i.key+": "+i.message}).join(", "));return t.value},Fu={},Ja={zoom:0},Qa,Du;function it(r,e,t,i,n,o,a){var s=r.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[s]||(o[s]={});var l=o[s];if(!l[t]){var u=(r[e]||Fu)[t],h=Hp[e+"_"+r.type][t];u===void 0&&(u=h.default);var f=qk(u);if(!f&&Kp(u)&&(u=Lb(u,h),f=!0),f){var d=pw(u,h);l[t]=d.evaluate.bind(d)}else h.type=="color"&&(u=Ce.parse(u)),l[t]=function(){return u}}return Ja.zoom=i,l[t](Ja,n,a)}function cw(r,e,t,i,n){return n||console.warn("No filterCache provided to evaluateFilter()"),r in n||(n[r]=Jk(e).filter),Ja.zoom=i,n[r](Ja,t)}function Zn(r,e){if(r){if(r.a===0||e===0)return;var t=r.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(r.r*255/t)+","+Math.round(r.g*255/t)+","+Math.round(r.b*255/t)+","+t*e+")"}return r}var gw=/^([^]*)\{(.*)\}([^]*)$/;function Nu(r,e){var t;do if(t=r.match(gw),t){var i=e[t[2]]||"";r=t[1]+i+t[3]}while(t);return r}function mw(r,e,t,i,n,o,a){if(i===void 0&&(i=lw),n===void 0&&(n=void 0),o===void 0&&(o=void 0),a===void 0&&(a=void 0),typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");var s,l;if(o){if(typeof Image<"u"){var u=new Image;u.crossOrigin="anonymous",u.onload=function(){s=u,l=[u.width,u.height],r.changed(),u.onload=null},u.src=o}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",function(Y){Y.data.action==="imageLoaded"&&Y.data.src===o&&(s=Y.data.image,l=[s.width,s.height])})}}for(var f=sw(e.layers),d={},p=[],c={},g={},m={},_={},v,y=0,x=f.length;y<x;++y){var k=f[y],E=k.id;if(typeof t=="string"&&k.source==t||t.indexOf(E)!==-1){var T=k["source-layer"];if(v){if(k.source!==v)throw new Error('Layer "'+E+'" does not use source "'+v)}else{v=k.source;var w=e.sources[v];if(!w)throw new Error('Source "'+v+'" is not defined');var C=w.type;if(C!=="vector"&&C!=="geojson")throw new Error('Source "'+v+'" is not of type "vector" or "geojson", but "'+C+'"')}var R=d[T];R||(R=[],d[T]=R),R.push({layer:k,index:y}),p.push(E)}}var P=new _e,M=new de,L=[],U=function(B,Y){var X=B.getProperties(),et=d[X.layer];if(!!et){var A=i.indexOf(Y);A==-1&&(A=uw(Y,i));for(var q=fw[B.getGeometry().getType()],N={properties:X,type:q},O=r.get("mapbox-featurestate")[B.getId()],tt=-1,b=0,z=et.length;b<z;++b){var W=et[b],S=W.layer,K=S.id,V=S.layout||Fu,gt=S.paint||Fu;if(!(V.visibility==="none"||"minzoom"in S&&A<S.minzoom||"maxzoom"in S&&A>=S.maxzoom)){var ut=S.filter;if(!ut||cw(K,ut,N,A,_)){var _t=void 0,bt=void 0,Pt=void 0,It=void 0,Ut=void 0,D=void 0,at=W.index;if(q==3&&(S.type=="fill"||S.type=="fill-extrusion"))if(bt=it(S,"paint",S.type+"-opacity",A,N,m,O),S.type+"-pattern"in gt){var ot=it(S,"paint",S.type+"-pattern",A,N,m,O);if(ot){var kt=typeof ot=="string"?Nu(ot,X):ot.toString();if(s&&n&&n[kt]){++tt,D=L[tt],(!D||!D.getFill()||D.getStroke()||D.getText())&&(D=new ye({fill:new de}),L[tt]=D),Pt=D.getFill(),D.setZIndex(at);var pt=kt+"."+bt,yt=g[pt];if(!yt){var st=n[kt],St=sc(st.width,st.height),Nt=St.getContext("2d");Nt.globalAlpha=bt,Nt.drawImage(s,st.x,st.y,st.width,st.height,0,0,st.width,st.height),yt=Nt.createPattern(St,"repeat"),g[pt]=yt}Pt.setColor(yt)}}}else _t=Zn(it(S,"paint",S.type+"-color",A,N,m,O),bt),S.type+"-outline-color"in gt&&(Ut=Zn(it(S,"paint",S.type+"-outline-color",A,N,m,O),bt)),Ut||(Ut=_t),(_t||Ut)&&(++tt,D=L[tt],(!D||_t&&!D.getFill()||!_t&&D.getFill()||Ut&&!D.getStroke()||!Ut&&D.getStroke()||D.getText())&&(D=new ye({fill:_t?new de:void 0,stroke:Ut?new _e:void 0}),L[tt]=D),_t&&(Pt=D.getFill(),Pt.setColor(_t)),Ut&&(It=D.getStroke(),It.setColor(Ut),It.setWidth(.5)),D.setZIndex(at));if(q!=1&&S.type=="line"){_t=!("line-pattern"in gt)&&"line-color"in gt?Zn(it(S,"paint","line-color",A,N,m,O),it(S,"paint","line-opacity",A,N,m,O)):void 0;var Gt=it(S,"paint","line-width",A,N,m,O);_t&&Gt>0&&(++tt,D=L[tt],(!D||!D.getStroke()||D.getFill()||D.getText())&&(D=new ye({stroke:new _e}),L[tt]=D),It=D.getStroke(),It.setLineCap(it(S,"layout","line-cap",A,N,m,O)),It.setLineJoin(it(S,"layout","line-join",A,N,m,O)),It.setMiterLimit(it(S,"layout","line-miter-limit",A,N,m,O)),It.setColor(_t),It.setWidth(Gt),It.setLineDash(gt["line-dasharray"]?it(S,"paint","line-dasharray",A,N,m,O).map(function(fe){return fe*Gt}):null),D.setZIndex(at))}var wt=!1,ht=null,Ot=0,mt=void 0,Tt=void 0,jt=void 0;if((q==1||q==2)&&"icon-image"in V){var Vt=it(S,"layout","icon-image",A,N,m,O);if(Vt){mt=typeof Vt=="string"?Nu(Vt,X):Vt.toString();var zt=void 0;if(s&&n&&n[mt]){var Jt=it(S,"layout","icon-rotation-alignment",A,N,m,O);if(q==2){var Mt=B.getGeometry();if(Mt.getFlatMidpoint||Mt.getFlatMidpoints){var Qt=Mt.getExtent(),Ki=Math.sqrt(Math.max(Math.pow((Qt[2]-Qt[0])/Y,2),Math.pow((Qt[3]-Qt[1])/Y,2)));if(Ki>150){var re=Mt.getType()==="MultiLineString"?Mt.getFlatMidpoints():Mt.getFlatMidpoint();Du||(Qa=[NaN,NaN],Du=new Sl("Point",Qa,[],{},null)),zt=Du,Qa[0]=re[0],Qa[1]=re[1];var ci=it(S,"layout","symbol-placement",A,N,m,O);if(ci==="line"&&Jt==="map")for(var Me=Mt.getStride(),Ge=Mt.getFlatCoordinates(),gi=0,Do=Ge.length-Me;gi<Do;gi+=Me){var jr=Ge[gi],Kn=Ge[gi+1],mi=Ge[gi+Me],vi=Ge[gi+Me+1],Hn=Math.min(jr,mi),ts=Math.min(Kn,vi),es=Math.max(jr,mi),Yu=Math.max(Kn,vi);if(re[0]>=Hn&&re[0]<=es&&re[1]>=ts&&re[1]<=Yu){Ot=Math.atan2(Kn-vi,mi-jr);break}}}}}if(q!==2||zt){var is=it(S,"layout","icon-size",A,N,m,O),ce=gt["icon-color"]!==void 0?it(S,"paint","icon-color",A,N,m,O):null;if(!ce||ce.a!==0){var _i=mt+"."+is;if(ce!==null&&(_i+="."+ce),Tt=c[_i],!Tt){var ge=n[mt];Tt=new kl({color:ce?[ce.r*255,ce.g*255,ce.b*255,ce.a]:void 0,img:s,imgSize:l,size:[ge.width,ge.height],offset:[ge.x,ge.y],rotateWithView:Jt==="map",scale:is/ge.pixelRatio,displacement:"icon-offset"in V?it(S,"layout","icon-offset",A,N,m,O).map(function(fe){return-fe*ge.pixelRatio}):void 0}),c[_i]=Tt}}Tt&&(++tt,D=L[tt],(!D||!D.getImage()||D.getFill()||D.getStroke())&&(D=new ye,L[tt]=D),D.setGeometry(zt),Tt.setRotation(Ot+Pu(it(S,"layout","icon-rotate",A,N,m,O))),Tt.setOpacity(it(S,"paint","icon-opacity",A,N,m,O)),Tt.setAnchor(dw[it(S,"layout","icon-anchor",A,N,m,O)]),D.setImage(Tt),ht=D.getText(),D.setText(void 0),D.setZIndex(at),wt=!0,jt=!1)}else jt=!0}}}if(q==1&&S.type==="circle"){++tt,D=L[tt],(!D||!D.getImage()||D.getFill()||D.getStroke())&&(D=new ye,L[tt]=D);var $n="circle-radius"in gt?it(S,"paint","circle-radius",A,N,m,O):5,Hi=Zn(it(S,"paint","circle-stroke-color",A,N,m,O),it(S,"paint","circle-stroke-opacity",A,N,m,O)),oe=Zn(it(S,"paint","circle-color",A,N,m,O),it(S,"paint","circle-opacity",A,N,m,O)),he=it(S,"paint","circle-stroke-width",A,N,m,O),Br=$n+"."+Hi+"."+oe+"."+he;Tt=c[Br],Tt||(Tt=new mr({radius:$n,stroke:Hi&&he>0?new _e({width:he,color:Hi}):void 0,fill:oe?new de({color:oe}):void 0}),c[Br]=Tt),D.setImage(Tt),ht=D.getText(),D.setText(void 0),D.setGeometry(void 0),D.setZIndex(at),wt=!0}var te=void 0,$i=void 0,No=void 0,Ji=void 0,Go=void 0,Xu=void 0;if("text-field"in V){Ji=Math.round(it(S,"layout","text-size",A,N,m,O));var Wu=it(S,"layout","text-font",A,N,m,O);No=it(S,"layout","text-line-height",A,N,m,O),$i=ac(a?a(Wu):Wu,Ji,No),$i.includes("sans-serif")||($i+=",sans-serif"),Go=it(S,"layout","text-letter-spacing",A,N,m,O),Xu=it(S,"layout","text-max-width",A,N,m,O);var Ur=it(S,"layout","text-field",A,N,m,O);typeof Ur=="object"&&Ur.sections?Ur.sections.length===1?te=Ur.toString():te=Ur.sections.reduce(function(fe,Qi,Kw){var Ic=Qi.fontStack?Qi.fontStack.split(","):Wu,Ju=ac(a?a(Ic):Ic,Ji*(Qi.scale||1),No),Vr=Qi.text;if(Vr===`
65
- `)return fe.push(`
66
- `,""),fe;if(q==2){fe.push(Mu(Vr,Go),Ju);return}Vr=Au(Vr,Ju,Xu,Go).split(`
67
- `);for(var rs=0,Ww=Vr.length;rs<Ww;++rs)rs>0&&fe.push(`
68
- `,""),fe.push(Vr[rs],Ju);return fe},[]):te=Nu(Ur,X).trim(),bt=it(S,"paint","text-opacity",A,N,m,O)}if(te&&bt&&!jt){wt||(++tt,D=L[tt],(!D||!D.getText()||D.getFill()||D.getStroke())&&(D=new ye,L[tt]=D),D.setImage(void 0),D.setGeometry(void 0)),D.getText()||D.setText(ht||new q0({padding:[2,2,2,2]})),ht=D.getText();var wc=V["text-transform"];wc=="uppercase"?te=Array.isArray(te)?te.map(function(fe,Qi){return Qi%2?fe:fe.toUpperCase()}):te.toUpperCase():wc=="lowercase"&&(te=Array.isArray(te)?te.map(function(fe,Qi){return Qi%2?fe:fe.toLowerCase()}):te.toLowerCase());var Ec=Array.isArray(te)?te:q==2?Mu(te,Go):Au(te,$i,Xu,Go);ht.setText(Ec),ht.setFont($i),ht.setRotation(Pu(it(S,"layout","text-rotate",A,N,m,O)));var ns=it(S,"layout","text-anchor",A,N,m,O),qu=wt||q==1?"point":it(S,"layout","symbol-placement",A,N,m,O);ht.setPlacement(qu),ht.setOverflow(qu==="point");var Jn=it(S,"paint","text-halo-width",A,N,m,O),Tc=it(S,"layout","text-offset",A,N,m,O),Cc=it(S,"paint","text-translate",A,N,m,O),Zu=0,Ku=0;if(qu=="point"){var Hu="center";ns.indexOf("left")!==-1?(Hu="left",Ku=Jn):ns.indexOf("right")!==-1&&(Hu="right",Ku=-Jn),ht.setTextAlign(Hu);var Xw=it(S,"layout","text-rotation-alignment",A,N,m,O);ht.setRotateWithView(Xw=="map")}else ht.setMaxAngle(Pu(it(S,"layout","text-max-angle",A,N,m,O))*te.length/Ec.length),ht.setTextAlign(),ht.setRotateWithView(!1);var $u="middle";ns.indexOf("bottom")==0?($u="bottom",Zu=-Jn-.5*(No-1)*Ji):ns.indexOf("top")==0&&($u="top",Zu=Jn+.5*(No-1)*Ji),ht.setTextBaseline($u),ht.setOffsetX(Tc[0]*Ji+Ku+Cc[0]),ht.setOffsetY(Tc[1]*Ji+Zu+Cc[1]),M.setColor(Zn(it(S,"paint","text-color",A,N,m,O),bt)),ht.setFill(M);var Sc=Zn(it(S,"paint","text-halo-color",A,N,m,O),bt);if(Sc){P.setColor(Sc),Jn*=2;var Oc=.5*Ji;P.setWidth(Jn<=Oc?Jn:Oc),ht.setStroke(P)}else ht.setStroke(void 0);var jo=it(S,"layout","text-padding",A,N,m,O),Bo=ht.getPadding();jo!==Bo[0]&&(Bo[0]=jo,Bo[1]=jo,Bo[2]=jo,Bo[3]=jo),D.setZIndex(at)}}}}if(tt>-1)return L.length=tt+1,L}};return r.setStyle(U),r.set("mapbox-source",v),r.set("mapbox-layers",p),r.set("mapbox-featurestate",{}),U}new Tn;const vw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",_w="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",yw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function xw(r,e){return new U1({source:e?new Ud({url:vw+e,attributions:[r],attributionsCollapsible:!1,maxZoom:20}):new q1({attributions:[Vd]})})}function bw(r,e){let t=new a1({declutter:!0,source:new k1({format:new x_,url:_w+e,attributions:[r],attributionsCollapsible:!1})});return e&&fetch(yw+e).then(i=>i.json()).then(i=>mw(t,i,"esri")).catch(i=>console.log(i)),t}const Zw=zc``;function kw(r){return new Yv({units:"metric",bar:r,steps:4,text:!0,minWidth:140})}const ww=`:host{display:block;width:650px;height:650px;position:relative}.map{height:100%;opacity:0;transition:opacity .25s;overflow:hidden;border:#000000 solid .15em}.map:focus{outline:#FFDD00 solid .25em}.ol-control button{border-radius:0!important;background-color:#2c2c2c!important;cursor:pointer;min-width:44px;min-height:44px;font-size:1.75rem}.ol-control button:hover{background-color:#2c2c2cd9!important}.reset-control{top:114px;left:.5em}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
69
- `,Ew="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjJweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjcgMzciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMy41MDA3IDAuNTgzMzc0QzYuNTY2OSAwLjU4MzM3NCAwLjk1ODk4NCA2LjE5MTI5IDAuOTU4OTg0IDEzLjEyNUMwLjk1ODk4NCAxNi4yNDI1IDEuODU0ODIgMTkuMTYzIDMuNDg1MjMgMjEuNzk2N0M1LjE4NzMyIDI0LjU1NTkgNy40MjY5IDI2LjkyMDkgOS4xNDY5IDI5LjY4QzkuOTg4OTggMzEuMDIzOCAxMC41OTgyIDMyLjI3OCAxMS4yNDMyIDMzLjcyOTJDMTEuNzA5IDM0LjcxNDYgMTIuMDg1MiAzNi40MTY3IDEzLjUwMDcgMzYuNDE2N0MxNC45MTYxIDM2LjQxNjcgMTUuMjkyMyAzNC43MTQ2IDE1Ljc0MDIgMzMuNzI5MkMxNi40MDMyIDMyLjI3OCAxNi45OTQ0IDMxLjAyMzggMTcuODM2NSAyOS42OEMxOS41NTY1IDI2LjkzODggMjEuNzk2MSAyNC41NzM4IDIzLjQ5ODIgMjEuNzk2N0MyNS4xNDY1IDE5LjE2MyAyNi4wNDIzIDE2LjI0MjUgMjYuMDQyMyAxMy4xMjVDMjYuMDQyMyA2LjE5MTI5IDIwLjQzNDQgMC41ODMzNzQgMTMuNTAwNyAwLjU4MzM3NFpNMTMuNTAwNyAxOC4wNTIxQzExLjAyODIgMTguMDUyMSA5LjAyMTQ4IDE2LjA0NTUgOS4wMjE0OCAxMy41NzNDOS4wMjE0OCAxMS4xMDA1IDExLjAyODIgOS4wOTM3OSAxMy41MDA3IDkuMDkzNzlDMTUuOTczMiA5LjA5Mzc5IDE3Ljk3OTggMTEuMTAwNSAxNy45Nzk4IDEzLjU3M0MxNy45Nzk4IDE2LjA0NTUgMTUuOTczMiAxOC4wNTIxIDEzLjUwMDcgMTguMDUyMVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=";var hc=Object.freeze,fc=Object.defineProperty,Tw=Object.getOwnPropertyDescriptor,xt=(r,e,t,i)=>{for(var n=i>1?void 0:i?Tw(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&fc(e,t,n),n},Cw=(r,e)=>hc(fc(r,"raw",{value:hc(e||r.slice())})),dc;j.MyMap=class extends nn{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBorderNone=!1,this.featureBuffer=40,this.showMarker=!1,this.markerLatitude=this.latitude,this.markerLongitude=this.longitude,this.markerColor="#000000",this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osFeaturesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osCopyright=`\xA9 Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.markerImage="circle",this.dispatch=(r,e)=>this.dispatchEvent(new CustomEvent(r,{detail:e}))}firstUpdated(){var _;const r=this.renderRoot.querySelector(`#${this.id}`),e=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),t=xw(this.osCopyright,this.osVectorTilesApiKey),i=bw(this.osCopyright,this.osVectorTilesApiKey),n=new Dx({target:r,layers:[e?i:t],view:new Ri({projection:"EPSG:3857",extent:sm([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:sa([this.longitude,this.latitude]),zoom:this.zoom,enableRotation:!1}),controls:Sf({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[kw(this.useScaleBarStyle)]:[]),interactions:kd({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=n;const o=ib(this.drawPointer),a=nb(this.drawPointer),s=document.createElement("button");s.innerHTML="\u21BB",s.title="Reset map view";const l=()=>{this.showFeaturesAtPoint?Eo(n,He,this.featureBuffer):d.getFeatures().length>0?Eo(n,d,this.geojsonBuffer):(n.getView().setCenter(sa([this.longitude,this.latitude])),n.getView().setZoom(this.zoom)),this.drawMode&&(li.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m\xB2":this.areaUnit}`),n.addInteraction(o),n.addInteraction(Qd))};s.addEventListener("click",l,!1);const u=document.createElement("div");u.className="reset-control ol-unselectable ol-control",u.appendChild(s);var h=new Kr({element:u});this.hideResetControl||n.addControl(h);const f=(_=this.renderRoot)==null?void 0:_.querySelectorAll(".ol-control button");f==null||f.forEach(v=>v.setAttribute("aria-label",v.getAttribute("title")||"")),n.on("pointerdrag",()=>{n.getViewport().style.cursor="grabbing"}),n.on("pointermove",()=>{n.getViewport().style.cursor="grab"});const d=new Di;if(this.geojsonData.type==="FeatureCollection"){let v=new Tn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});d.addFeatures(v)}else if(this.geojsonData.type==="Feature"){let v=new Tn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});d.addFeature(v)}const p=new Sn({source:d,style:new ye({stroke:new _e({color:this.geojsonColor,width:3}),fill:new de({color:this.geojsonFill?Da(this.geojsonColor,.2):Da(this.geojsonColor,0)})})});if(n.addLayer(p),d.getFeatures().length>0){Eo(n,d,this.geojsonBuffer);const v=d.getFeatures()[0].getGeometry();v&&this.dispatch("geojsonDataArea",iu(v,this.areaUnit))}if(this.drawMode){li.clear();const v=Object.keys(this.drawGeojsonData.geometry).length>0;if(v){let y=new Tn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});li.addFeature(y),Eo(n,li,this.drawGeojsonDataBuffer)}n.addLayer(Jd),v||n.addInteraction(o),n.addInteraction(a),n.addInteraction(Qd),li.on("change",()=>{var x;const y=li.getFeatures();if(y.length>0){const k=(x=$1(y))==null?void 0:x.getGeometry();this.dispatch("geojsonChange",new Tn().writeFeaturesObject(y,{featureProjection:"EPSG:3857"})),k&&this.dispatch("areaChange",iu(k,this.areaUnit)),n.removeInteraction(o)}})}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){if(n.addLayer(J1),Jd.setZIndex(1001),this.zoom<20){Sr.clear();const y=n.getView().calculateExtent(n.getSize());qd(i,y)}n.on("moveend",()=>{const y=n.getView().getZoom();if(y&&y<20){Sr.clear();return}setTimeout(()=>{Sr.clear();const x=n.getView().calculateExtent(n.getSize());qd(i,x)},200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){pp(sa([this.longitude,this.latitude]),this.osFeaturesApiKey,!1),this.clickFeatures&&n.on("singleclick",y=>{pp(y.coordinate,this.osFeaturesApiKey,!0)});const v=zb(this.featureColor,this.featureFill,this.featureBorderNone);n.addLayer(v),He.on("change",()=>{if(He.getState()==="ready"&&He.getFeatures().length>0){Eo(n,He,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Tn().writeFeaturesObject(He.getFeatures(),{featureProjection:"EPSG:3857"}));const y=He.getFeatures()[0].getGeometry();y&&this.dispatch("featuresAreaChange",iu(y,this.areaUnit))}})}const c=new mr({radius:9,fill:new de({color:this.markerColor})}),g=new kl({src:Ew}),m=()=>{switch(this.markerImage){case"circle":return c;case"pin":return g}};if(this.showMarker){const v=new Fe(sa([this.markerLongitude,this.markerLatitude])),y=new Sn({source:new Di({features:[new ni(v)]}),style:new ye({image:m()})});n.addLayer(y)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),r.style.opacity="1",this.dispatch("ready")},500)}render(){return xi(dc||(dc=Cw([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
79
+ `;fetch(sw({key:t,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:n,count:1})).then(o=>o.json()).then(o=>{if(!o.features.length)return;const s=o.features[0].properties,a=["TOID","DescriptiveGroup"];Object.keys(s).forEach(u=>a.includes(u)||delete s[u]);const l=new Zn,h=l.readFeatures(o,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});e?h.forEach(u=>{const d=u.getProperties().TOID,c=Kr.getFeatureById(d);c?Kr.removeFeature(c):(u.setId(d),Kr.addFeature(u))}):(Kr.clear(),h.forEach(u=>{const d=u.getProperties().TOID;u.setId(d),Kr.addFeature(u)})),pi.clear(),pi.addFeature(l.readFeature(Kr.getFeatures().reduce((u,d)=>{const c=l.writeFeatureObject(d).geometry;return u?nw(u,c):c},null)))}).catch(o=>console.log(o))}function sw(i){const t=Object.keys(i).map(e=>e+"="+encodeURI(i[e])).join("&");return`${rw}?${t}`}const aw="https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=",lw="https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=",hw="https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=";function uw(i,t){return new Vx({source:t?new $g({url:aw+t,attributions:[i],attributionsCollapsible:!1,maxZoom:20}):new kk({attributions:[Wg]})})}function dw(i,t){let e=new bx({declutter:!0,source:new Lx({format:new N1,url:lw+t,attributions:[i],attributionsCollapsible:!1})});return t&&fetch(hw+t).then(n=>n.json()).then(n=>yk(e,n,"esri")).catch(n=>console.log(n)),e}function cw(i){const t=Object.keys(i.defs),e=t.length;let n,r;for(n=0;n<e;++n){const o=t[n];if(!Gt(o)){const s=i.defs(o);let a=s.units;!a&&s.projName==="longlat"&&(a="degrees"),dc(new Ns({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:a}))}}for(n=0;n<e;++n){const o=t[n],s=Gt(o);for(r=0;r<e;++r){const a=t[r],l=Gt(a);if(!tc(o,a))if(i.defs[o]===i.defs[a])Bl([s,l]);else{const h=i(o,a);G0(s,l,fc(s,l,h.forward),fc(l,s,h.inverse))}}}}function fw(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var hr=1,ur=2,Wa=3,gw=4,Ku=5,_m=6378137,mw=6356752314e-3,ym=.0066943799901413165,os=484813681109536e-20,I=Math.PI/2,pw=.16666666666666666,vw=.04722222222222222,_w=.022156084656084655,B=1e-10,he=.017453292519943295,vi=57.29577951308232,It=Math.PI/4,ss=Math.PI*2,Zt=3.14159265359,De={};De.greenwich=0,De.lisbon=-9.131906111111,De.paris=2.337229166667,De.bogota=-74.080916666667,De.madrid=-3.687938888889,De.rome=12.452333333333,De.bern=7.439583333333,De.jakarta=106.807719444444,De.ferro=-17.666666666667,De.brussels=4.367975,De.stockholm=18.058277777778,De.athens=23.7163375,De.oslo=10.722916666667;const yw={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var xm=/[\s_\-\/\(\)]/g;function En(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(xm,""),r=-1,o,s;++r<e.length;)if(o=e[r],s=o.toLowerCase().replace(xm,""),s===n)return i[o]}function Zu(i){var t={},e=i.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,l){var h=l.split("=");return h.push(!0),a[h[0].toLowerCase()]=h[1],a},{}),n,r,o,s={proj:"projName",datum:"datumCode",rf:function(a){t.rf=parseFloat(a)},lat_0:function(a){t.lat0=a*he},lat_1:function(a){t.lat1=a*he},lat_2:function(a){t.lat2=a*he},lat_ts:function(a){t.lat_ts=a*he},lon_0:function(a){t.long0=a*he},lon_1:function(a){t.long1=a*he},lon_2:function(a){t.long2=a*he},alpha:function(a){t.alpha=parseFloat(a)*he},gamma:function(a){t.rectified_grid_angle=parseFloat(a)},lonc:function(a){t.longc=a*he},x_0:function(a){t.x0=parseFloat(a)},y_0:function(a){t.y0=parseFloat(a)},k_0:function(a){t.k0=parseFloat(a)},k:function(a){t.k0=parseFloat(a)},a:function(a){t.a=parseFloat(a)},b:function(a){t.b=parseFloat(a)},r_a:function(){t.R_A=!0},zone:function(a){t.zone=parseInt(a,10)},south:function(){t.utmSouth=!0},towgs84:function(a){t.datum_params=a.split(",").map(function(l){return parseFloat(l)})},to_meter:function(a){t.to_meter=parseFloat(a)},units:function(a){t.units=a;var l=En(yw,a);l&&(t.to_meter=l.to_meter)},from_greenwich:function(a){t.from_greenwich=a*he},pm:function(a){var l=En(De,a);t.from_greenwich=(l||parseFloat(a))*he},nadgrids:function(a){a==="@null"?t.datumCode="none":t.nadgrids=a},axis:function(a){var l="ewnsud";a.length===3&&l.indexOf(a.substr(0,1))!==-1&&l.indexOf(a.substr(1,1))!==-1&&l.indexOf(a.substr(2,1))!==-1&&(t.axis=a)},approx:function(){t.approx=!0}};for(n in e)r=e[n],n in s?(o=s[n],typeof o=="function"?o(r):t[o]=r):t[n]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var as=1,bm=2,km=3,Ya=4,wm=5,Hu=-1,xw=/\s/,bw=/[A-Za-z]/,kw=/[A-Za-z84_]/,Ka=/[,\]]/,Mm=/[\d\.E\-\+]/;function Fi(i){if(typeof i!="string")throw new Error("not a string");this.text=i.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=as}Fi.prototype.readCharicter=function(){var i=this.text[this.place++];if(this.state!==Ya)for(;xw.test(i);){if(this.place>=this.text.length)return;i=this.text[this.place++]}switch(this.state){case as:return this.neutral(i);case bm:return this.keyword(i);case Ya:return this.quoted(i);case wm:return this.afterquote(i);case km:return this.number(i);case Hu:return}},Fi.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=Ya;return}if(Ka.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)},Fi.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=as;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=as,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Hu);return}},Fi.prototype.number=function(i){if(Mm.test(i)){this.word+=i;return}if(Ka.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)},Fi.prototype.quoted=function(i){if(i==='"'){this.state=wm;return}this.word+=i},Fi.prototype.keyword=function(i){if(kw.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=as;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)},Fi.prototype.neutral=function(i){if(bw.test(i)){this.word=i,this.state=bm;return}if(i==='"'){this.word="",this.state=Ya;return}if(Mm.test(i)){this.word=i,this.state=km;return}if(Ka.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)},Fi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Hu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ww(i){var t=new Fi(i);return t.output()}function Em(i,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:i,r=e.reduce(function(o,s){return Zr(s,o),o},n);t&&(i[t]=r)}function Zr(i,t){if(!Array.isArray(i)){t[i]=!0;return}var e=i.shift();if(e==="PARAMETER"&&(e=i.shift()),i.length===1){if(Array.isArray(i[0])){t[e]={},Zr(i[0],t[e]);return}t[e]=i[0];return}if(!i.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=i;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(i);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:i[0].toLowerCase(),convert:i[1]},i.length===3&&Zr(i[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:i[0],a:i[1],rf:i[2]},i.length===4&&Zr(i[3],t[e]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":i[0]=["name",i[0]],Em(t,e,i);return;default:for(n=-1;++n<i.length;)if(!Array.isArray(i[n]))return Zr(i,t[e]);return Em(t,e,i)}}var Mw=.017453292519943295;function Ew(i,t){var e=t[0],n=t[1];!(e in i)&&n in i&&(i[e]=i[n],t.length===3&&(i[e]=t[2](i[e])))}function Oi(i){return i*Mw}function Cw(i){if(i.type==="GEOGCS"?i.projName="longlat":i.type==="LOCAL_CS"?(i.projName="identity",i.local=!0):typeof i.PROJECTION=="object"?i.projName=Object.keys(i.PROJECTION)[0]:i.projName=i.PROJECTION,i.AXIS){for(var t="",e=0,n=i.AXIS.length;e<n;++e){var r=[i.AXIS[e][0].toLowerCase(),i.AXIS[e][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(i.axis=t)}i.UNIT&&(i.units=i.UNIT.name.toLowerCase(),i.units==="metre"&&(i.units="meter"),i.UNIT.convert&&(i.type==="GEOGCS"?i.DATUM&&i.DATUM.SPHEROID&&(i.to_meter=i.UNIT.convert*i.DATUM.SPHEROID.a):i.to_meter=i.UNIT.convert));var o=i.GEOGCS;i.type==="GEOGCS"&&(o=i),o&&(o.DATUM?i.datumCode=o.DATUM.name.toLowerCase():i.datumCode=o.name.toLowerCase(),i.datumCode.slice(0,2)==="d_"&&(i.datumCode=i.datumCode.slice(2)),(i.datumCode==="new_zealand_geodetic_datum_1949"||i.datumCode==="new_zealand_1949")&&(i.datumCode="nzgd49"),(i.datumCode==="wgs_1984"||i.datumCode==="world_geodetic_system_1984")&&(i.PROJECTION==="Mercator_Auxiliary_Sphere"&&(i.sphere=!0),i.datumCode="wgs84"),i.datumCode.slice(-6)==="_ferro"&&(i.datumCode=i.datumCode.slice(0,-6)),i.datumCode.slice(-8)==="_jakarta"&&(i.datumCode=i.datumCode.slice(0,-8)),~i.datumCode.indexOf("belge")&&(i.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(i.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),i.ellps.toLowerCase().slice(0,13)==="international"&&(i.ellps="intl"),i.a=o.DATUM.SPHEROID.a,i.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(i.datum_params=o.DATUM.TOWGS84),~i.datumCode.indexOf("osgb_1936")&&(i.datumCode="osgb36"),~i.datumCode.indexOf("osni_1952")&&(i.datumCode="osni52"),(~i.datumCode.indexOf("tm65")||~i.datumCode.indexOf("geodetic_datum_of_1965"))&&(i.datumCode="ire65"),i.datumCode==="ch1903+"&&(i.datumCode="ch1903"),~i.datumCode.indexOf("israel")&&(i.datumCode="isr93")),i.b&&!isFinite(i.b)&&(i.b=i.a);function s(h){var u=i.to_meter||1;return h*u}var a=function(h){return Ew(i,h)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Oi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Oi],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",Oi],["lat0","latitude_of_origin",Oi],["lat0","standard_parallel_1",Oi],["lat1","standard_parallel_1",Oi],["lat2","standard_parallel_2",Oi],["azimuth","Azimuth"],["alpha","azimuth",Oi],["srsCode","name"]];l.forEach(a),!i.long0&&i.longc&&(i.projName==="Albers_Conic_Equal_Area"||i.projName==="Lambert_Azimuthal_Equal_Area")&&(i.long0=i.longc),!i.lat_ts&&i.lat1&&(i.projName==="Stereographic_South_Pole"||i.projName==="Polar Stereographic (variant B)")&&(i.lat0=Oi(i.lat1>0?90:-90),i.lat_ts=i.lat1)}function Cm(i){var t=ww(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var r={};return Zr(t,r),Cw(r),r}function Se(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Se[i]=Zu(arguments[1]):Se[i]=Cm(arguments[1]):Se[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?Se.apply(t,n):Se(n)});if(typeof i=="string"){if(i in Se)return Se[i]}else"EPSG"in i?Se["EPSG:"+i.EPSG]=i:"ESRI"in i?Se["ESRI:"+i.ESRI]=i:"IAU2000"in i?Se["IAU2000:"+i.IAU2000]=i:console.log(i);return}}fw(Se);function Sw(i){return typeof i=="string"}function Tw(i){return i in Se}var zw=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Rw(i){return zw.some(function(t){return i.indexOf(t)>-1})}var Iw=["3857","900913","3785","102113"];function Pw(i){var t=En(i,"authority");if(!!t){var e=En(t,"epsg");return e&&Iw.indexOf(e)>-1}}function Aw(i){var t=En(i,"extension");if(!!t)return En(t,"proj4")}function Dw(i){return i[0]==="+"}function Lw(i){if(Sw(i)){if(Tw(i))return Se[i];if(Rw(i)){var t=Cm(i);if(Pw(t))return Se["EPSG:3857"];var e=Aw(t);return e?Zu(e):t}if(Dw(i))return Zu(i)}else return i}function Sm(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function _i(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function ls(i){return i<0?-1:1}function X(i){return Math.abs(i)<=Zt?i:i-ls(i)*ss}function si(i,t,e){var n=i*e,r=.5*i;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(I-t))/n}function hs(i,t){for(var e=.5*i,n,r,o=I-2*Math.atan(t),s=0;s<=15;s++)if(n=i*Math.sin(o),r=I-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-o,o+=r,Math.abs(r)<=1e-10)return o;return-9999}function Fw(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Ow(i){var t=i.x,e=i.y;if(e*vi>90&&e*vi<-90&&t*vi>180&&t*vi<-180)return null;var n,r;if(Math.abs(Math.abs(e)-I)<=B)return null;if(this.sphere)n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(It+.5*e));else{var o=Math.sin(e),s=si(this.e,e,o);n=this.x0+this.a*this.k0*X(t-this.long0),r=this.y0-this.a*this.k0*Math.log(s)}return i.x=n,i.y=r,i}function Nw(i){var t=i.x-this.x0,e=i.y-this.y0,n,r;if(this.sphere)r=I-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var o=Math.exp(-e/(this.a*this.k0));if(r=hs(this.e,o),r===-9999)return null}return n=X(this.long0+t/(this.a*this.k0)),i.x=n,i.y=r,i}var Gw=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const jw={init:Fw,forward:Ow,inverse:Nw,names:Gw};function Bw(){}function Tm(i){return i}var Uw=["longlat","identity"],Vw=[jw,{init:Bw,forward:Tm,inverse:Tm,names:Uw}],Za={},Ha=[];function zm(i,t){var e=Ha.length;return i.names?(Ha[e]=i,i.names.forEach(function(n){Za[n.toLowerCase()]=e}),this):(console.log(t),!0)}function qw(i){if(!i)return!1;var t=i.toLowerCase();if(typeof Za[t]<"u"&&Ha[Za[t]])return Ha[Za[t]]}function Xw(){Vw.forEach(zm)}const $w={start:Xw,add:zm,get:qw};var rt={};rt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},rt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},rt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},rt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},rt.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},rt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},rt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},rt.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},rt.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},rt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},rt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},rt.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},rt.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},rt.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},rt.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},rt.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},rt.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},rt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},rt.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},rt.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},rt.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},rt.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},rt.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},rt.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},rt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},rt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},rt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},rt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},rt.hough={a:6378270,rf:297,ellipseName:"Hough"},rt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},rt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},rt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},rt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},rt.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},rt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},rt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},rt.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},rt.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},rt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},rt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},rt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Ww=rt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};rt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Yw(i,t,e,n){var r=i*i,o=t*t,s=(r-o)/r,a=0;n?(i*=1-s*(pw+s*(vw+s*_w)),r=i*i,s=0):a=Math.sqrt(s);var l=(r-o)/o;return{es:s,e:a,ep2:l}}function Kw(i,t,e,n,r){if(!i){var o=En(rt,n);o||(o=Ww),i=o.a,t=o.b,e=o.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)<B)&&(r=!0,t=i),{a:i,b:t,rf:e,sphere:r}}var se={};se.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},se.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},se.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},se.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},se.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},se.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},se.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},se.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},se.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},se.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},se.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},se.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},se.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},se.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},se.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},se.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},se.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function Zw(i,t,e,n,r,o,s){var a={};return i===void 0||i==="none"?a.datum_type=Ku:a.datum_type=gw,t&&(a.datum_params=t.map(parseFloat),(a.datum_params[0]!==0||a.datum_params[1]!==0||a.datum_params[2]!==0)&&(a.datum_type=hr),a.datum_params.length>3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=ur,a.datum_params[3]*=os,a.datum_params[4]*=os,a.datum_params[5]*=os,a.datum_params[6]=a.datum_params[6]/1e6+1)),s&&(a.datum_type=Wa,a.grids=s),a.a=e,a.b=n,a.es=r,a.ep2=o,a}var Rm={};function Hw(i,t){var e=new DataView(t),n=t2(e),r=e2(e,n);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=i2(e,r,n),s={header:r,subgrids:o};return Rm[i]=s,s}function Jw(i){if(i===void 0)return null;var t=i.split(",");return t.map(Qw)}function Qw(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:Rm[i]||null,isNull:!1}}function Hr(i){return i/3600*Math.PI/180}function t2(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function e2(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Ju(i,56,56+8).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function Ju(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function i2(i,t,e){for(var n=176,r=[],o=0;o<t.nSubgrids;o++){var s=r2(i,n,e),a=o2(i,n,s,e),l=Math.round(1+(s.upperLongitude-s.lowerLongitude)/s.longitudeInterval),h=Math.round(1+(s.upperLatitude-s.lowerLatitude)/s.latitudeInterval);r.push({ll:[Hr(s.lowerLongitude),Hr(s.lowerLatitude)],del:[Hr(s.longitudeInterval),Hr(s.latitudeInterval)],lim:[l,h],count:s.gridNodeCount,cvs:n2(a)})}return r}function n2(i){return i.map(function(t){return[Hr(t.longitudeShift),Hr(t.latitudeShift)]})}function r2(i,t,e){return{name:Ju(i,t+8,t+16).trim(),parent:Ju(i,t+24,t+24+8).trim(),lowerLatitude:i.getFloat64(t+72,e),upperLatitude:i.getFloat64(t+88,e),lowerLongitude:i.getFloat64(t+104,e),upperLongitude:i.getFloat64(t+120,e),latitudeInterval:i.getFloat64(t+136,e),longitudeInterval:i.getFloat64(t+152,e),gridNodeCount:i.getInt32(t+168,e)}}function o2(i,t,e,n){for(var r=t+176,o=16,s=[],a=0;a<e.gridNodeCount;a++){var l={latitudeShift:i.getFloat32(r+a*o,n),longitudeShift:i.getFloat32(r+a*o+4,n),latitudeAccuracy:i.getFloat32(r+a*o+8,n),longitudeAccuracy:i.getFloat32(r+a*o+12,n)};s.push(l)}return s}function yi(i,t){if(!(this instanceof yi))return new yi(i);t=t||function(h){if(h)throw h};var e=Lw(i);if(typeof e!="object"){t(i);return}var n=yi.projections.get(e.projName);if(!n){t(i);return}if(e.datumCode&&e.datumCode!=="none"){var r=En(se,e.datumCode);r&&(e.datum_params=e.datum_params||(r.towgs84?r.towgs84.split(","):null),e.ellps=r.ellipse,e.datumName=r.datumName?r.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var o=Kw(e.a,e.b,e.rf,e.ellps,e.sphere),s=Yw(o.a,o.b,o.rf,e.R_A),a=Jw(e.nadgrids),l=e.datum||Zw(e.datumCode,e.datum_params,o.a,o.b,s.es,s.ep2,a);Sm(this,e),Sm(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=s.es,this.e=s.e,this.ep2=s.ep2,this.datum=l,this.init(),t(null,this)}yi.projections=$w,yi.projections.start();function s2(i,t){return i.datum_type!==t.datum_type||i.a!==t.a||Math.abs(i.es-t.es)>5e-11?!1:i.datum_type===hr?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===ur?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function Im(i,t,e){var n=i.x,r=i.y,o=i.z?i.z:0,s,a,l,h;if(r<-I&&r>-1.001*I)r=-I;else if(r>I&&r<1.001*I)r=I;else{if(r<-I)return{x:-1/0,y:-1/0,z:i.z};if(r>I)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(r),h=Math.cos(r),l=a*a,s=e/Math.sqrt(1-t*l),{x:(s+o)*h*Math.cos(n),y:(s+o)*h*Math.sin(n),z:(s*(1-t)+o)*a}}function Pm(i,t,e,n){var r=1e-12,o=r*r,s=30,a,l,h,u,d,c,f,g,m,p,_,v,y,x=i.x,k=i.y,w=i.z?i.z:0,C,M,S;if(a=Math.sqrt(x*x+k*k),l=Math.sqrt(x*x+k*k+w*w),a/e<r){if(C=0,l/e<r)return M=I,S=-n,{x:i.x,y:i.y,z:i.z}}else C=Math.atan2(k,x);h=w/l,u=a/l,d=1/Math.sqrt(1-t*(2-t)*u*u),g=u*(1-t)*d,m=h*d,y=0;do y++,f=e/Math.sqrt(1-t*m*m),S=a*g+w*m-f*(1-t*m*m),c=t*f/(f+S),d=1/Math.sqrt(1-c*(2-c)*u*u),p=u*(1-c)*d,_=h*d,v=_*g-p*m,g=p,m=_;while(v*v>o&&y<s);return M=Math.atan(_/Math.abs(p)),{x:C,y:M,z:S}}function a2(i,t,e){if(t===hr)return{x:i.x+e[0],y:i.y+e[1],z:i.z+e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6];return{x:h*(i.x-l*i.y+a*i.z)+n,y:h*(l*i.x+i.y-s*i.z)+r,z:h*(-a*i.x+s*i.y+i.z)+o}}}function l2(i,t,e){if(t===hr)return{x:i.x-e[0],y:i.y-e[1],z:i.z-e[2]};if(t===ur){var n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5],h=e[6],u=(i.x-n)/h,d=(i.y-r)/h,c=(i.z-o)/h;return{x:u+l*d-a*c,y:-l*u+d+s*c,z:a*u-s*d+c}}}function Ja(i){return i===hr||i===ur}function h2(i,t,e){if(s2(i,t)||i.datum_type===Ku||t.datum_type===Ku)return e;var n=i.a,r=i.es;if(i.datum_type===Wa){var o=Am(i,!1,e);if(o!==0)return;n=_m,r=ym}var s=t.a,a=t.b,l=t.es;if(t.datum_type===Wa&&(s=_m,a=mw,l=ym),r===l&&n===s&&!Ja(i.datum_type)&&!Ja(t.datum_type))return e;if(e=Im(e,r,n),Ja(i.datum_type)&&(e=a2(e,i.datum_type,i.datum_params)),Ja(t.datum_type)&&(e=l2(e,t.datum_type,t.datum_params)),e=Pm(e,l,s,a),t.datum_type===Wa){var h=Am(t,!0,e);if(h!==0)return}return e}function Am(i,t,e){if(i.grids===null||i.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},o=[],s=0;s<i.grids.length;s++){var a=i.grids[s];if(o.push(a.name),a.isNull){r=n;break}if(a.mandatory,a.grid===null){if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1;continue}var l=a.grid.subgrids[0],h=(Math.abs(l.del[1])+Math.abs(l.del[0]))/1e4,u=l.ll[0]-h,d=l.ll[1]-h,c=l.ll[0]+(l.lim[0]-1)*l.del[0]+h,f=l.ll[1]+(l.lim[1]-1)*l.del[1]+h;if(!(d>n.y||u>n.x||f<n.y||c<n.x)&&(r=u2(n,t,l),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*vi+" "+n.y*vi+" tried: '"+o+"'"),-1):(e.x=-r.x,e.y=r.y,0)}function u2(i,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(i.x))return n;var r={x:i.x,y:i.y};r.x-=e.ll[0],r.y-=e.ll[1],r.x=X(r.x-Math.PI)+Math.PI;var o=Dm(r,e);if(t){if(isNaN(o.x))return n;o.x=r.x-o.x,o.y=r.y-o.y;var s=9,a=1e-12,l,h;do{if(h=Dm(o,e),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(h.x+o.x),y:r.y-(h.y+o.y)},o.x+=l.x,o.y+=l.y}while(s--&&Math.abs(l.x)>a&&Math.abs(l.y)>a);if(s<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=X(o.x+e.ll[0]),n.y=o.y+e.ll[1]}else isNaN(o.x)||(n.x=i.x+o.x,n.y=i.y+o.y);return n}function Dm(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},r={x:e.x-1*n.x,y:e.y-1*n.y},o={x:Number.NaN,y:Number.NaN},s;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return o;s=n.y*t.lim[0]+n.x;var a={x:t.cvs[s][0],y:t.cvs[s][1]};s++;var l={x:t.cvs[s][0],y:t.cvs[s][1]};s+=t.lim[0];var h={x:t.cvs[s][0],y:t.cvs[s][1]};s--;var u={x:t.cvs[s][0],y:t.cvs[s][1]},d=r.x*r.y,c=r.x*(1-r.y),f=(1-r.x)*(1-r.y),g=(1-r.x)*r.y;return o.x=f*a.x+c*l.x+g*u.x+d*h.x,o.y=f*a.y+c*l.y+g*u.y+d*h.y,o}function Lm(i,t,e){var n=e.x,r=e.y,o=e.z||0,s,a,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(s=n,"ew".indexOf(i.axis[l])!==-1?a="x":a="y"):l===1?(s=r,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(s=o,a="z"),i.axis[l]){case"e":h[a]=s;break;case"w":h[a]=-s;break;case"n":h[a]=s;break;case"s":h[a]=-s;break;case"u":e[a]!==void 0&&(h.z=s);break;case"d":e[a]!==void 0&&(h.z=-s);break;default:return null}return h}function Fm(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function d2(i){Om(i.x),Om(i.y)}function Om(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function c2(i,t){return(i.datum.datum_type===hr||i.datum.datum_type===ur)&&t.datumCode!=="WGS84"||(t.datum.datum_type===hr||t.datum.datum_type===ur)&&i.datumCode!=="WGS84"}function Qa(i,t,e,n){var r;if(Array.isArray(e)&&(e=Fm(e)),d2(e),i.datum&&t.datum&&c2(i,t)&&(r=new yi("WGS84"),e=Qa(i,r,e,n),i=r),n&&i.axis!=="enu"&&(e=Lm(i,!1,e)),i.projName==="longlat")e={x:e.x*he,y:e.y*he,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=h2(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*vi,y:e.y*vi,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Lm(t,!0,e):e}var Nm=yi("WGS84");function Qu(i,t,e,n){var r,o,s;return Array.isArray(e)?(r=Qa(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(e.splice(3)):[r.x,r.y,e[2]].concat(e.splice(3)):[r.x,r.y].concat(e.splice(2)):[r.x,r.y]):(o=Qa(i,t,e,n),s=Object.keys(e),s.length===2||s.forEach(function(a){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;o[a]=e[a]}),o)}function Gm(i){return i instanceof yi?i:i.oProj?i.oProj:yi(i)}function Le(i,t,e){i=Gm(i);var n=!1,r;return typeof t>"u"?(t=i,i=Nm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Nm,n=!0),t=Gm(t),e?Qu(i,t,e):(r={forward:function(o,s){return Qu(i,t,o,s)},inverse:function(o,s){return Qu(t,i,o,s)}},n&&(r.oProj=t),r)}var jm=6,Bm="AJSAJS",Um="AFAFAF",Jr=65,Fe=73,Je=79,us=86,ds=90;const f2={forward:Vm,inverse:g2,toPoint:qm};function Vm(i,t){return t=t||5,v2(m2({lat:i[1],lon:i[0]}),t)}function g2(i){var t=ed(Wm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function qm(i){var t=ed(Wm(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function td(i){return i*(Math.PI/180)}function Xm(i){return 180*(i/Math.PI)}function m2(i){var t=i.lat,e=i.lon,n=6378137,r=.00669438,o=.9996,s,a,l,h,u,d,c,f=td(t),g=td(e),m,p;p=Math.floor((e+180)/6)+1,e===180&&(p=60),t>=56&&t<64&&e>=3&&e<12&&(p=32),t>=72&&t<84&&(e>=0&&e<9?p=31:e>=9&&e<21?p=33:e>=21&&e<33?p=35:e>=33&&e<42&&(p=37)),s=(p-1)*6-180+3,m=td(s),a=r/(1-r),l=n/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),u=a*Math.cos(f)*Math.cos(f),d=Math.cos(f)*(g-m),c=n*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var _=o*l*(d+(1-h+u)*d*d*d/6+(5-18*h+h*h+72*u-58*a)*d*d*d*d*d/120)+5e5,v=o*(c+l*Math.tan(f)*(d*d/2+(5-h+9*u+4*u*u)*d*d*d*d/24+(61-58*h+h*h+600*u-330*a)*d*d*d*d*d*d/720));return t<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:p,zoneLetter:p2(t)}}function ed(i){var t=i.northing,e=i.easting,n=i.zoneLetter,r=i.zoneNumber;if(r<0||r>60)return null;var o=.9996,s=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),u,d,c,f,g,m,p,_,v,y=e-5e5,x=t;n<"N"&&(x-=1e7),p=(r-1)*6-180+3,l=a/(1-a),m=x/o,_=m/(s*(1-a/4-3*a*a/64-5*a*a*a/256)),v=_+(3*h/2-27*h*h*h/32)*Math.sin(2*_)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*_)+151*h*h*h/96*Math.sin(6*_),u=s/Math.sqrt(1-a*Math.sin(v)*Math.sin(v)),d=Math.tan(v)*Math.tan(v),c=l*Math.cos(v)*Math.cos(v),f=s*(1-a)/Math.pow(1-a*Math.sin(v)*Math.sin(v),1.5),g=y/(u*o);var k=v-u*Math.tan(v)/f*(g*g/2-(5+3*d+10*c-4*c*c-9*l)*g*g*g*g/24+(61+90*d+298*c+45*d*d-252*l-3*c*c)*g*g*g*g*g*g/720);k=Xm(k);var w=(g-(1+2*d+c)*g*g*g/6+(5-2*c+28*d-3*c*c+8*l+24*d*d)*g*g*g*g*g/120)/Math.cos(v);w=p+Xm(w);var C;if(i.accuracy){var M=ed({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:M.lat,right:M.lon,bottom:k,left:w}}else C={lat:k,lon:w};return C}function p2(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function v2(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+_2(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function _2(i,t,e){var n=$m(e),r=Math.floor(i/1e5),o=Math.floor(t/1e5)%20;return y2(r,o,n)}function $m(i){var t=i%jm;return t===0&&(t=jm),t}function y2(i,t,e){var n=e-1,r=Bm.charCodeAt(n),o=Um.charCodeAt(n),s=r+i-1,a=o+t,l=!1;s>ds&&(s=s-ds+Jr-1,l=!0),(s===Fe||r<Fe&&s>Fe||(s>Fe||r<Fe)&&l)&&s++,(s===Je||r<Je&&s>Je||(s>Je||r<Je)&&l)&&(s++,s===Fe&&s++),s>ds&&(s=s-ds+Jr-1),a>us?(a=a-us+Jr-1,l=!0):l=!1,(a===Fe||o<Fe&&a>Fe||(a>Fe||o<Fe)&&l)&&a++,(a===Je||o<Je&&a>Je||(a>Je||o<Je)&&l)&&(a++,a===Fe&&a++),a>us&&(a=a-us+Jr-1);var h=String.fromCharCode(s)+String.fromCharCode(a);return h}function Wm(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",r,o=0;!/[A-Z]/.test(r=i.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+i;n+=r,o++}var s=parseInt(n,10);if(o===0||o+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(o++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(o,o+=2);for(var l=$m(s),h=x2(e.charAt(0),l),u=b2(e.charAt(1),l);u<k2(a);)u+=2e6;var d=t-o;if(d%2!==0)throw`MGRSPoint has to have an even number
80
+ of digits after the zone letter and two 100km letters - front
81
+ half for easting meters, second half for
82
+ northing meters`+i;var c=d/2,f=0,g=0,m,p,_,v,y;return c>0&&(m=1e5/Math.pow(10,c),p=i.substring(o,o+c),f=parseFloat(p)*m,_=i.substring(o+c),g=parseFloat(_)*m),v=f+h,y=g+u,{easting:v,northing:y,zoneLetter:a,zoneNumber:s,accuracy:m}}function x2(i,t){for(var e=Bm.charCodeAt(t-1),n=1e5,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>ds){if(r)throw"Bad character: "+i;e=Jr,r=!0}n+=1e5}return n}function b2(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=Um.charCodeAt(t-1),n=0,r=!1;e!==i.charCodeAt(0);){if(e++,e===Fe&&e++,e===Je&&e++,e>us){if(r)throw"Bad character: "+i;e=Jr,r=!0}n+=1e5}return n}function k2(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function Qr(i,t,e){if(!(this instanceof Qr))return new Qr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Qr.fromMGRS=function(i){return new Qr(qm(i))},Qr.prototype.toMGRS=function(i){return Vm([this.x,this.y],i)};var w2=1,M2=.25,Ym=.046875,Km=.01953125,Zm=.01068115234375,E2=.75,C2=.46875,S2=.013020833333333334,T2=.007120768229166667,z2=.3645833333333333,R2=.005696614583333333,I2=.3076171875;function Hm(i){var t=[];t[0]=w2-i*(M2+i*(Ym+i*(Km+i*Zm))),t[1]=i*(E2-i*(Ym+i*(Km+i*Zm)));var e=i*i;return t[2]=e*(C2-i*(S2+i*T2)),e*=i,t[3]=e*(z2-i*R2),t[4]=e*i*I2,t}function tl(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var P2=20;function Jm(i,t,e){for(var n=1/(1-t),r=i,o=P2;o;--o){var s=Math.sin(r),a=1-t*s*s;if(a=(tl(r,s,Math.cos(r),e)-i)*(a*Math.sqrt(a))*n,r-=a,Math.abs(a)<B)return r}return r}function A2(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Hm(this.es),this.ml0=tl(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function D2(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o,s,a=Math.sin(e),l=Math.cos(e);if(this.es){var u=l*n,d=Math.pow(u,2),c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),g=Math.abs(l)>B?Math.tan(e):0,m=Math.pow(g,2),p=Math.pow(m,2);r=1-this.es*Math.pow(a,2),u=u/Math.sqrt(r);var _=tl(e,a,l,this.en);o=this.a*(this.k0*u*(1+d/6*(1-m+c+d/20*(5-18*m+p+14*c-58*m*c+d/42*(61+179*p-p*m-479*m)))))+this.x0,s=this.a*(this.k0*(_-this.ml0+a*n*u/2*(1+d/12*(5-m+9*c+4*f+d/30*(61+p-58*m+270*c-330*m*c+d/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var h=l*Math.sin(n);if(Math.abs(Math.abs(h)-1)<B)return 93;if(o=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,s=l*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(s),h>=1){if(h-1>B)return 93;s=0}else s=Math.acos(s);e<0&&(s=-s),s=this.a*this.k0*(s-this.lat0)+this.y0}return i.x=o,i.y=s,i}function L2(i){var t,e,n,r,o=(i.x-this.x0)*(1/this.a),s=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+s/this.k0,e=Jm(t,this.es,this.en),Math.abs(e)<I){var d=Math.sin(e),c=Math.cos(e),f=Math.abs(c)>B?Math.tan(e):0,g=this.ep2*Math.pow(c,2),m=Math.pow(g,2),p=Math.pow(f,2),_=Math.pow(p,2);t=1-this.es*Math.pow(d,2);var v=o*Math.sqrt(t)/this.k0,y=Math.pow(v,2);t=t*f,n=e-t*y/(1-this.es)*.5*(1-y/12*(5+3*p-9*g*p+g-4*m-y/30*(61+90*p-252*g*p+45*_+46*g-y/56*(1385+3633*p+4095*_+1574*_*p)))),r=X(this.long0+v*(1-y/6*(1+2*p+g-y/20*(5+28*p+24*_+8*g*p+6*g-y/42*(61+662*p+1320*_+720*_*p))))/c)}else n=I*ls(s),r=0;else{var a=Math.exp(o/this.k0),l=.5*(a-1/a),h=this.lat0+s/this.k0,u=Math.cos(h);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),s<0&&(n=-n),l===0&&u===0?r=0:r=X(Math.atan2(l,u)+this.long0)}return i.x=r,i.y=n,i}var F2=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const el={init:A2,forward:D2,inverse:L2,names:F2};function Qm(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function ai(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function O2(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function N2(i){var t=Math.abs(i);return t=O2(t*(1+t/(ai(1,t)+1))),i<0?-t:t}function id(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return t+s*Math.sin(2*t)}function G2(i,t){for(var e=2*Math.cos(t),n=i.length-1,r=i[n],o=0,s;--n>=0;)s=-o+e*r+i[n],o=r,r=s;return Math.sin(t)*s}function j2(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function tp(i,t,e){for(var n=Math.sin(t),r=Math.cos(t),o=Qm(e),s=j2(e),a=2*r*s,l=-2*n*o,h=i.length-1,u=i[h],d=0,c=0,f=0,g,m;--h>=0;)g=c,m=d,c=u,d=f,u=-g+a*c-l*d+i[h],f=-m+l*c+a*d;return a=n*s,l=r*o,[a*u-l*f,a*f+l*u]}function B2(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(el.init.apply(this),this.forward=el.forward,this.inverse=el.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=id(this.cbg,this.lat0);this.Zb=-this.Qn*(n+G2(this.gtu,2*n))}function U2(i){var t=X(i.x-this.long0),e=i.y;e=id(this.cbg,e);var n=Math.sin(e),r=Math.cos(e),o=Math.sin(t),s=Math.cos(t);e=Math.atan2(n,s*r),t=Math.atan2(o*r,ai(n,r*s)),t=N2(Math.tan(t));var a=tp(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function V2(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,r;if(Math.abs(t)<=2.623395162778){var o=tp(this.utg,2*e,2*t);e=e+o[0],t=t+o[1],t=Math.atan(Qm(t));var s=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(s*h,ai(l,h*a)),t=Math.atan2(l,h*a),n=X(t+this.long0),r=id(this.cgb,e)}else n=1/0,r=1/0;return i.x=n,i.y=r,i}var q2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const il={init:B2,forward:U2,inverse:V2,names:q2};function X2(i,t){if(i===void 0){if(i=Math.floor((X(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var $2="etmerc";function W2(){var i=X2(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*he,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,il.init.apply(this),this.forward=il.forward,this.inverse=il.inverse}var Y2=["Universal Transverse Mercator System","utm"];const K2={init:W2,names:Y2,dependsOn:$2};function nd(i,t){return Math.pow((1-i)/(1+i),t)}var Z2=20;function H2(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+It)/(Math.pow(Math.tan(.5*this.lat0+It),this.C)*nd(this.e*i,this.ratexp))}function J2(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+It),this.C)*nd(this.e*Math.sin(e),this.ratexp))-I,i.x=this.C*t,i}function Q2(i){for(var t=1e-14,e=i.x/this.C,n=i.y,r=Math.pow(Math.tan(.5*n+It)/this.K,1/this.C),o=Z2;o>0&&(n=2*Math.atan(r*nd(this.e*Math.sin(i.y),-.5*this.e))-I,!(Math.abs(n-i.y)<t));--o)i.y=n;return o?(i.x=e,i.y=n,i):null}var t5=["gauss"];const rd={init:H2,forward:J2,inverse:Q2,names:t5};function e5(){rd.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function i5(i){var t,e,n,r;return i.x=X(i.x-this.long0),rd.forward.apply(this,[i]),t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),i.x=r*e*Math.sin(i.x),i.y=r*(this.cosc0*t-this.sinc0*e*n),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function n5(i){var t,e,n,r,o;if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,o=Math.sqrt(i.x*i.x+i.y*i.y)){var s=2*Math.atan2(o,this.R2);t=Math.sin(s),e=Math.cos(s),r=Math.asin(e*this.sinc0+i.y*t*this.cosc0/o),n=Math.atan2(i.x*t,o*this.cosc0*e-i.y*this.sinc0*t)}else r=this.phic0,n=0;return i.x=n,i.y=r,rd.inverse.apply(this,[i]),i.x=X(i.x+this.long0),i}var r5=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const o5={init:e5,forward:i5,inverse:n5,names:r5};function s5(i,t,e){return t*=e,Math.tan(.5*(I+i))*Math.pow((1-t)/(1+t),.5*e)}function a5(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*(1+ls(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=B&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=B&&(this.k0=.5*this.cons*_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/si(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=_i(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-I,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function l5(i){var t=i.x,e=i.y,n=Math.sin(e),r=Math.cos(e),o,s,a,l,h,u,d=X(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=B&&Math.abs(e+this.lat0)<=B?(i.x=NaN,i.y=NaN,i):this.sphere?(o=2*this.k0/(1+this.sinlat0*n+this.coslat0*r*Math.cos(d)),i.x=this.a*o*r*Math.sin(d)+this.x0,i.y=this.a*o*(this.coslat0*n-this.sinlat0*r*Math.cos(d))+this.y0,i):(s=2*Math.atan(this.ssfn_(e,n,this.e))-I,l=Math.cos(s),a=Math.sin(s),Math.abs(this.coslat0)<=B?(h=si(this.e,e*this.con,this.con*n),u=2*this.a*this.k0*h/this.cons,i.x=this.x0+u*Math.sin(t-this.long0),i.y=this.y0-this.con*u*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)<B?(o=2*this.a*this.k0/(1+l*Math.cos(d)),i.y=o*a):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*l*Math.cos(d))),i.y=o*(this.cosX0*a-this.sinX0*l*Math.cos(d))+this.y0),i.x=o*l*Math.sin(d)+this.x0,i))}function h5(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s=Math.sqrt(i.x*i.x+i.y*i.y);if(this.sphere){var a=2*Math.atan(s/(2*this.a*this.k0));return t=this.long0,e=this.lat0,s<=B?(i.x=t,i.y=e,i):(e=Math.asin(Math.cos(a)*this.sinlat0+i.y*Math.sin(a)*this.coslat0/s),Math.abs(this.coslat0)<B?this.lat0>0?t=X(this.long0+Math.atan2(i.x,-1*i.y)):t=X(this.long0+Math.atan2(i.x,i.y)):t=X(this.long0+Math.atan2(i.x*Math.sin(a),s*this.coslat0*Math.cos(a)-i.y*this.sinlat0*Math.sin(a))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=B){if(s<=B)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=s*this.cons/(2*this.a*this.k0),e=this.con*hs(this.e,n),t=this.con*X(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,s<=B?o=this.X0:(o=Math.asin(Math.cos(r)*this.sinX0+i.y*Math.sin(r)*this.cosX0/s),t=X(this.long0+Math.atan2(i.x*Math.sin(r),s*this.cosX0*Math.cos(r)-i.y*this.sinX0*Math.sin(r)))),e=-1*hs(this.e,Math.tan(.5*(I+o)));return i.x=t,i.y=e,i}var u5=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const d5={init:a5,forward:l5,inverse:h5,names:u5,ssfn_:s5};function c5(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,r=1/n,o=2*r-Math.pow(r,2),s=this.e=Math.sqrt(o);this.R=this.k0*e*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+s*t)/(1-s*t));this.K=a-this.alpha*l+this.alpha*s/2*h}function f5(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(i.x-this.lambda0),s=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(o))),a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(o));return i.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,i.x=this.R*s+this.x0,i}function g5(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),a=this.lambda0+s/this.alpha,l=0,h=o,u=-1e3,d=0;Math.abs(h-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=a,i.y=h,i}var m5=["somerc"];const p5={init:c5,forward:f5,inverse:g5,names:m5};var to=1e-7;function v5(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function _5(){var i,t,e,n,r,o,s,a,l,h,u=0,d,c=0,f=0,g=0,m=0,p=0,_=0;this.no_off=v5(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(u=this.rectified_grid_angle*he),v||y)c=this.longc;else if(f=this.long1,m=this.lat1,g=this.long2,p=this.lat2,Math.abs(m-p)<=to||(i=Math.abs(m))<=to||Math.abs(i-I)<=to||Math.abs(Math.abs(this.lat0)-I)<=to||Math.abs(Math.abs(p)-I)<=to)throw new Error;var x=1-this.es;t=Math.sqrt(x),Math.abs(this.lat0)>B?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/x),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),r=n*n-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(si(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=r=1),v||y?(v?(d=Math.asin(Math.sin(_)/n),y||(u=_)):(d=u,_=Math.asin(n*Math.sin(d))),this.lam0=c-Math.asin(.5*(r-1/r)*Math.tan(d))/this.B):(o=Math.pow(si(this.e,m,Math.sin(m)),this.B),s=Math.pow(si(this.e,p,Math.sin(p)),this.B),r=this.E/o,l=(s-o)/(s+o),h=this.E*this.E,h=(h-s*o)/(h+s*o),i=f-g,i<-Math.pi?g-=ss:i>Math.pi&&(g+=ss),this.lam0=X(.5*(f+g)-Math.atan(h*Math.tan(.5*this.B*(f-g))/l)/this.B),d=Math.atan(2*Math.sin(this.B*X(f-this.lam0))/(r-1/r)),u=_=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(It-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(It+r))}function y5(i){var t={},e,n,r,o,s,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-I)>B){if(s=this.E/Math.pow(si(this.e,i.y,Math.sin(i.y)),this.B),a=1/s,e=.5*(s-a),n=.5*(s+a),o=Math.sin(this.B*i.x),r=(e*this.singam-o*this.cosgam)/n,Math.abs(Math.abs(r)-1)<B)throw new Error;h=.5*this.ArB*Math.log((1-r)/(1+r)),a=Math.cos(this.B*i.x),Math.abs(a)<to?l=this.A*i.x:l=this.ArB*Math.atan2(e*this.cosgam+o*this.singam,a)}else h=i.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function x5(i){var t,e,n,r,o,s,a,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),r=.5*(n-1/n),o=.5*(n+1/n),s=Math.sin(this.BrA*t),a=(s*this.cosgam+r*this.singam)/o,Math.abs(Math.abs(a)-1)<B)l.x=0,l.y=a<0?-I:I;else{if(l.y=this.E/Math.sqrt((1+a)/(1-a)),l.y=hs(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(r*this.cosgam-s*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var b5=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const k5={init:_5,forward:y5,inverse:x5,names:b5};function w5(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<B)){var i=this.b/this.a;this.e=Math.sqrt(1-i*i);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=_i(this.e,t,e),r=si(this.e,this.lat1,t),o=Math.sin(this.lat2),s=Math.cos(this.lat2),a=_i(this.e,o,s),l=si(this.e,this.lat2,o),h=si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>B?this.ns=Math.log(n/a)/Math.log(r/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function M5(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=B&&(e=ls(e)*(I-2*B));var n=Math.abs(Math.abs(e)-I),r,o;if(n>B)r=si(this.e,e,Math.sin(e)),o=this.a*this.f0*Math.pow(r,this.ns);else{if(n=e*this.ns,n<=0)return null;o=0}var s=this.ns*X(t-this.long0);return i.x=this.k0*(o*Math.sin(s))+this.x0,i.y=this.k0*(this.rh-o*Math.cos(s))+this.y0,i}function E5(i){var t,e,n,r,o,s=(i.x-this.x0)/this.k0,a=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(s*s+a*a),e=1):(t=-Math.sqrt(s*s+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*s,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),r=hs(this.e,n),r===-9999)return null}else r=-I;return o=X(l/this.ns+this.long0),i.x=o,i.y=r,i}var C5=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const S5={init:w5,forward:M5,inverse:E5,names:C5};function T5(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function z5(i){var t,e,n,r,o,s,a,l=i.x,h=i.y,u=X(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),o=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(r)),s=this.n*o,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),i.y=a*Math.cos(s)/1,i.x=a*Math.sin(s)/1,this.czech||(i.y*=-1,i.x*=-1),i}function R5(i){var t,e,n,r,o,s,a,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),s=Math.sqrt(i.x*i.x+i.y*i.y),o=Math.atan2(i.y,i.x),r=o/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),e=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),i.x=this.long0-e/this.alfa,a=t,l=0;var u=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-i.y)<1e-10&&(l=1),a=i.y,u+=1;while(l===0&&u<15);return u>=15?null:i}var I5=["Krovak","krovak"];const P5={init:T5,forward:z5,inverse:R5,names:I5};function Te(i,t,e,n,r){return i*r-t*Math.sin(2*r)+e*Math.sin(4*r)-n*Math.sin(6*r)}function cs(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function fs(i){return .375*i*(1+.25*i*(1+.46875*i))}function gs(i){return .05859375*i*i*(1+.75*i)}function ms(i){return i*i*i*(35/3072)}function eo(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function io(i){return Math.abs(i)<I?i:i-ls(i)*Math.PI}function nl(i,t,e,n,r){var o,s;o=i/t;for(var a=0;a<15;a++)if(s=(i-(t*o-e*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)))/(t-2*e*Math.cos(2*o)+4*n*Math.cos(4*o)-6*r*Math.cos(6*o)),o+=s,Math.abs(s)<=1e-10)return o;return NaN}function A5(){this.sphere||(this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0))}function D5(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var o=Math.sin(r),s=Math.cos(r),a=eo(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),h=n*Math.cos(r),u=h*h,d=this.es*s*s/(1-this.es),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,r);t=a*h*(1-u*l*(1/6-(8-l+8*d)*u/120)),e=c-this.ml0+a*o/s*u*(.5+(5-l+6*d)*u/24)}return i.x=t+this.x0,i.y=e+this.y0,i}function L5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r;if(this.sphere){var o=e+this.lat0;n=Math.asin(Math.sin(o)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(o))}else{var s=this.ml0/this.a+e,a=nl(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-I)<=B)return i.x=this.long0,i.y=I,e<0&&(i.y*=-1),i;var l=eo(this.a,this.e,Math.sin(a)),h=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(a),2),d=t*this.a/l,c=d*d;n=a-l*Math.tan(a)/h*d*d*(.5-(1+3*u)*d*d/24),r=d*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(a)}return i.x=X(r+this.long0),i.y=io(n),i}var F5=["Cassini","Cassini_Soldner","cass"];const O5={init:A5,forward:D5,inverse:L5,names:F5};function Cn(i,t){var e;return i>1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var N5=1,G5=2,j5=3,B5=4;function U5(){var i=Math.abs(this.lat0);if(Math.abs(i-I)<B?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<B?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=Cn(this.e,1),this.mmf=.5/(1-this.es),this.apa=H5(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Cn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function V5(i){var t,e,n,r,o,s,a,l,h,u,d=i.x,c=i.y;if(d=X(d-this.long0),this.sphere){if(o=Math.sin(c),u=Math.cos(c),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+u*n:1+this.sinph0*o+this.cosph0*u*n,e<=B)return null;e=Math.sqrt(2/e),t=e*u*Math.sin(d),e*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(c+this.lat0)<B)return null;e=It-c*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(d),e*=n}}else{switch(a=0,l=0,h=0,n=Math.cos(d),r=Math.sin(d),o=Math.sin(c),s=Cn(this.e,o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(a=s/this.qp,l=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:h=1+this.sinb1*a+this.cosb1*l*n;break;case this.EQUIT:h=1+l*n;break;case this.N_POLE:h=I+c,s=this.qp-s;break;case this.S_POLE:h=c-I,s=this.qp+s;break}if(Math.abs(h)<B)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?e=this.ymf*h*(this.cosb1*a-this.sinb1*l*n):e=(h=Math.sqrt(2/(1+l*n)))*a*this.ymf,t=this.xmf*h*l*r;break;case this.N_POLE:case this.S_POLE:s>=0?(t=(h=Math.sqrt(s))*r,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function q5(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,r,o,s,a,l,h;if(this.sphere){var u=0,d,c=0;if(d=Math.sqrt(t*t+e*e),r=d*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(r),u=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=B?0:Math.asin(e*c/d),t*=c,e=u*d;break;case this.OBLIQ:r=Math.abs(d)<=B?this.lat0:Math.asin(u*this.sinph0+e*c*this.cosph0/d),t*=c*this.cosph0,e=(u-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:e=-e,r=I-r;break;case this.S_POLE:r-=I;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<B)return i.x=this.long0,i.y=this.lat0,i;s=2*Math.asin(.5*l/this.rq),o=Math.cos(s),t*=s=Math.sin(s),this.mode===this.OBLIQ?(h=o*this.sinb1+e*s*this.cosb1/l,a=this.qp*h,e=l*this.cosb1*o-e*this.sinb1*s):(h=e*s/l,a=this.qp*h,e=l*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),a=t*t+e*e,!a)return i.x=this.long0,i.y=this.lat0,i;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,e),r=J5(Math.asin(h),this.apa)}return i.x=X(this.long0+n),i.y=r,i}var X5=.3333333333333333,$5=.17222222222222222,W5=.10257936507936508,Y5=.06388888888888888,K5=.0664021164021164,Z5=.016415012942191543;function H5(i){var t,e=[];return e[0]=i*X5,t=i*i,e[0]+=t*$5,e[1]=t*Y5,t*=i,e[0]+=t*W5,e[1]+=t*K5,e[2]=t*Z5,e}function J5(i,t){var e=i+i;return i+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var Q5=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const tM={init:U5,forward:V5,inverse:q5,names:Q5,S_POLE:N5,N_POLE:G5,EQUIT:j5,OBLIQ:B5};function Sn(i){return Math.abs(i)>1&&(i=i>1?1:-1),Math.asin(i)}function eM(){Math.abs(this.lat1+this.lat2)<B||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=_i(this.e3,this.sin_po,this.cos_po),this.qs1=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=_i(this.e3,this.sin_po,this.cos_po),this.qs2=Cn(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Cn(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>B?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function iM(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Cn(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*X(t-this.long0),s=r*Math.sin(o)+this.x0,a=this.rh-r*Math.cos(o)+this.y0;return i.x=s,i.y=a,i}function nM(i){var t,e,n,r,o,s;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),r=0,t!==0&&(r=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,e)),o=X(r/this.ns0+this.long0),i.x=o,i.y=s,i}function rM(i,t){var e,n,r,o,s,a=Sn(.5*t);if(i<B)return a;for(var l=i*i,h=1;h<=25;h++)if(e=Math.sin(a),n=Math.cos(a),r=i*e,o=1-r*r,s=.5*o*o/n*(t/(1-l)-e/o+.5/i*Math.log((1-r)/(1+r))),a=a+s,Math.abs(s)<=1e-7)return a;return null}var oM=["Albers_Conic_Equal_Area","Albers","aea"];const sM={init:eM,forward:iM,inverse:nM,names:oM,phi1z:rM};function aM(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function lM(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,s>0||Math.abs(s)<=B?(a=this.x0+this.a*o*e*Math.sin(n)/s,l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)/s):(a=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function hM(i){var t,e,n,r,o,s;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(r=Math.atan2(t,this.rc),e=Math.sin(r),n=Math.cos(r),s=Sn(n*this.sin_p14+i.y*e*this.cos_p14/t),o=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),o=X(this.long0+o)):(s=this.phic0,o=0),i.x=o,i.y=s,i}var uM=["gnom"];const dM={init:aM,forward:lM,inverse:hM,names:uM};function cM(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*I:I;for(var n=Math.asin(.5*t),r,o,s,a,l=0;l<30;l++)if(o=Math.sin(n),s=Math.cos(n),a=i*o,r=Math.pow(1-a*a,2)/(2*s)*(t/(1-i*i)-o/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=r,Math.abs(r)<=1e-10)return n;return NaN}function fM(){this.sphere||(this.k0=_i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function gM(i){var t=i.x,e=i.y,n,r,o=X(t-this.long0);if(this.sphere)n=this.x0+this.a*o*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var s=Cn(this.e,Math.sin(e));n=this.x0+this.a*this.k0*o,r=this.y0+this.a*s*.5/this.k0}return i.x=n,i.y=r,i}function mM(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=X(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=cM(this.e,2*i.y*this.k0/this.a),t=X(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var pM=["cea"];const vM={init:fM,forward:gM,inverse:mM,names:pM};function _M(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function yM(i){var t=i.x,e=i.y,n=X(t-this.long0),r=io(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*r,i}function xM(i){var t=i.x,e=i.y;return i.x=X(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=io(this.lat0+(e-this.y0)/this.a),i}var bM=["Equirectangular","Equidistant_Cylindrical","eqc"];const kM={init:_M,forward:yM,inverse:xM,names:bM};var ep=20;function wM(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.ml0=this.a*Te(this.e0,this.e1,this.e2,this.e3,this.lat0)}function MM(i){var t=i.x,e=i.y,n,r,o,s=X(t-this.long0);if(o=s*Math.sin(e),this.sphere)Math.abs(e)<=B?(n=this.a*s,r=-1*this.a*this.lat0):(n=this.a*Math.sin(o)/Math.tan(e),r=this.a*(io(e-this.lat0)+(1-Math.cos(o))/Math.tan(e)));else if(Math.abs(e)<=B)n=this.a*s,r=-1*this.ml0;else{var a=eo(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(o),r=this.a*Te(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(o))}return i.x=n+this.x0,i.y=r+this.y0,i}function EM(i){var t,e,n,r,o,s,a,l,h;if(n=i.x-this.x0,r=i.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=B)t=X(n/this.a+this.long0),e=0;else{s=this.lat0+r/this.a,a=n*n/this.a/this.a+s*s,l=s;var u;for(o=ep;o;--o)if(u=Math.tan(l),h=-1*(s*(l*u+1)-l-.5*(l*l+a)*u)/((l-s)/u-1),l+=h,Math.abs(h)<=B){e=l;break}t=X(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(r+this.ml0)<=B)e=0,t=X(this.long0+n/this.a);else{s=(this.ml0+r)/this.a,a=n*n/this.a/this.a+s*s,l=s;var d,c,f,g,m;for(o=ep;o;--o)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),c=this.a*Te(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),g=c/this.a,h=(s*(d*g+1)-g-.5*d*(g*g+a))/(this.es*Math.sin(2*l)*(g*g+a-2*s*g)/(4*d)+(s-g)*(d*f-2/Math.sin(2*l))-f),l-=h,Math.abs(h)<=B){e=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=X(this.long0+Math.asin(n*d/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var CM=["Polyconic","poly"];const SM={init:wM,forward:MM,inverse:EM,names:CM};function TM(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function zM(i){var t,e=i.x,n=i.y,r=n-this.lat0,o=e-this.long0,s=r/os*1e-5,a=o,l=1,h=0;for(t=1;t<=10;t++)l=l*s,h=h+this.A[t]*l;var u=h,d=a,c=1,f=0,g,m,p=0,_=0;for(t=1;t<=6;t++)g=c*u-f*d,m=f*u+c*d,c=g,f=m,p=p+this.B_re[t]*c-this.B_im[t]*f,_=_+this.B_im[t]*c+this.B_re[t]*f;return i.x=_*this.a+this.x0,i.y=p*this.a+this.y0,i}function RM(i){var t,e=i.x,n=i.y,r=e-this.x0,o=n-this.y0,s=o/this.a,a=r/this.a,l=1,h=0,u,d,c=0,f=0;for(t=1;t<=6;t++)u=l*s-h*a,d=h*s+l*a,l=u,h=d,c=c+this.C_re[t]*l-this.C_im[t]*h,f=f+this.C_im[t]*l+this.C_re[t]*h;for(var g=0;g<this.iterations;g++){var m=c,p=f,_,v,y=s,x=a;for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,y=y+(t-1)*(this.B_re[t]*m-this.B_im[t]*p),x=x+(t-1)*(this.B_im[t]*m+this.B_re[t]*p);m=1,p=0;var k=this.B_re[1],w=this.B_im[1];for(t=2;t<=6;t++)_=m*c-p*f,v=p*c+m*f,m=_,p=v,k=k+t*(this.B_re[t]*m-this.B_im[t]*p),w=w+t*(this.B_im[t]*m+this.B_re[t]*p);var C=k*k+w*w;c=(y*k+x*w)/C,f=(x*k-y*w)/C}var M=c,S=f,R=1,A=0;for(t=1;t<=9;t++)R=R*M,A=A+this.D[t]*R;var G=this.lat0+A*os*1e5,P=this.long0+S;return i.x=P,i.y=G,i}var IM=["New_Zealand_Map_Grid","nzmg"];const PM={init:TM,forward:zM,inverse:RM,names:IM};function AM(){}function DM(i){var t=i.x,e=i.y,n=X(t-this.long0),r=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return i.x=r,i.y=o,i}function LM(i){i.x-=this.x0,i.y-=this.y0;var t=X(this.long0+i.x/this.a),e=2.5*(Math.atan(Math.exp(.8*i.y/this.a))-Math.PI/4);return i.x=t,i.y=e,i}var FM=["Miller_Cylindrical","mill"];const OM={init:AM,forward:DM,inverse:LM,names:FM};var NM=20;function GM(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Hm(this.es)}function jM(i){var t,e,n=i.x,r=i.y;if(n=X(n-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var o=this.n*Math.sin(r),s=NM;s;--s){var a=(this.m*r+Math.sin(r)-o)/(this.m+Math.cos(r));if(r-=a,Math.abs(a)<B)break}t=this.a*this.C_x*n*(this.m+Math.cos(r)),e=this.a*this.C_y*r}else{var l=Math.sin(r),h=Math.cos(r);e=this.a*tl(r,l,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*l*l)}return i.x=t,i.y=e,i}function BM(i){var t,e,n,r;return i.x-=this.x0,n=i.x/this.a,i.y-=this.y0,t=i.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=Sn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=Sn(Math.sin(t)/this.n)),n=X(n+this.long0),t=io(t)):(t=Jm(i.y/this.a,this.es,this.en),r=Math.abs(t),r<I?(r=Math.sin(t),e=this.long0+i.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=X(e)):r-B<I&&(n=this.long0)),i.x=n,i.y=t,i}var UM=["Sinusoidal","sinu"];const VM={init:GM,forward:jM,inverse:BM,names:UM};function qM(){}function XM(i){for(var t=i.x,e=i.y,n=X(t-this.long0),r=e,o=Math.PI*Math.sin(e);;){var s=-(r+Math.sin(r)-o)/(1+Math.cos(r));if(r+=s,Math.abs(s)<B)break}r/=2,Math.PI/2-Math.abs(e)<B&&(n=0);var a=.900316316158*this.a*n*Math.cos(r)+this.x0,l=1.4142135623731*this.a*Math.sin(r)+this.y0;return i.x=a,i.y=l,i}function $M(i){var t,e;i.x-=this.x0,i.y-=this.y0,e=i.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=X(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var r=Math.asin(e);return i.x=n,i.y=r,i}var WM=["Mollweide","moll"];const YM={init:qM,forward:XM,inverse:$M,names:WM};function KM(){Math.abs(this.lat1+this.lat2)<B||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=cs(this.es),this.e1=fs(this.es),this.e2=gs(this.es),this.e3=ms(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=_i(this.e,this.sinphi,this.cosphi),this.ml1=Te(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<B?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=_i(this.e,this.sinphi,this.cosphi),this.ml2=Te(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Te(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function ZM(i){var t=i.x,e=i.y,n;if(this.sphere)n=this.a*(this.g-e);else{var r=Te(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-r)}var o=this.ns*X(t-this.long0),s=this.x0+n*Math.sin(o),a=this.y0+this.rh-n*Math.cos(o);return i.x=s,i.y=a,i}function HM(i){i.x-=this.x0,i.y=this.rh-i.y+this.y0;var t,e,n,r;this.ns>=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var o=0;if(e!==0&&(o=Math.atan2(t*i.x,t*i.y)),this.sphere)return r=X(this.long0+o/this.ns),n=io(this.g-e/this.a),i.x=r,i.y=n,i;var s=this.g-e/this.a;return n=nl(s,this.e0,this.e1,this.e2,this.e3),r=X(this.long0+o/this.ns),i.x=r,i.y=n,i}var JM=["Equidistant_Conic","eqdc"];const QM={init:KM,forward:ZM,inverse:HM,names:JM};function tE(){this.R=this.a}function eE(i){var t=i.x,e=i.y,n=X(t-this.long0),r,o;Math.abs(e)<=B&&(r=this.x0+this.R*n,o=this.y0);var s=Sn(2*Math.abs(e/Math.PI));(Math.abs(n)<=B||Math.abs(Math.abs(e)-I)<=B)&&(r=this.x0,e>=0?o=this.y0+Math.PI*this.R*Math.tan(.5*s):o=this.y0+Math.PI*this.R*-Math.tan(.5*s));var a=.5*Math.abs(Math.PI/n-n/Math.PI),l=a*a,h=Math.sin(s),u=Math.cos(s),d=u/(h+u-1),c=d*d,f=d*(2/h-1),g=f*f,m=Math.PI*this.R*(a*(d-g)+Math.sqrt(l*(d-g)*(d-g)-(g+l)*(c-g)))/(g+l);n<0&&(m=-m),r=this.x0+m;var p=l+d;return m=Math.PI*this.R*(f*p-a*Math.sqrt((g+l)*(l+1)-p*p))/(g+l),e>=0?o=this.y0+m:o=this.y0-m,i.x=r,i.y=o,i}function iE(i){var t,e,n,r,o,s,a,l,h,u,d,c,f;return i.x-=this.x0,i.y-=this.y0,d=Math.PI*this.R,n=i.x/d,r=i.y/d,o=n*n+r*r,s=-Math.abs(r)*(1+o),a=s-2*r*r+n*n,l=-2*s+1+2*r*r+o*o,f=r*r/l+(2*a*a*a/l/l/l-9*s*a/l/l)/27,h=(s-a*a/3/l)/l,u=2*Math.sqrt(-h/3),d=3*f/h/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),c=Math.acos(d)/3,i.y>=0?e=(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI:e=-(-u*Math.cos(c+Math.PI/3)-a/3/l)*Math.PI,Math.abs(n)<B?t=this.long0:t=X(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-r*r)+o*o))/2/n),i.x=t,i.y=e,i}var nE=["Van_der_Grinten_I","VanDerGrinten","vandg"];const rE={init:tE,forward:eE,inverse:iE,names:nE};function oE(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function sE(i){var t=i.x,e=i.y,n=Math.sin(i.y),r=Math.cos(i.y),o=X(t-this.long0),s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,M,S,R,A,G;return this.sphere?Math.abs(this.sin_p12-1)<=B?(i.x=this.x0+this.a*(I-e)*Math.sin(o),i.y=this.y0-this.a*(I-e)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(i.x=this.x0+this.a*(I+e)*Math.sin(o),i.y=this.y0+this.a*(I+e)*Math.cos(o),i):(C=this.sin_p12*n+this.cos_p12*r*Math.cos(o),k=Math.acos(C),w=k?k/Math.sin(k):1,i.x=this.x0+this.a*w*r*Math.sin(o),i.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*r*Math.cos(o)),i):(s=cs(this.es),a=fs(this.es),l=gs(this.es),h=ms(this.es),Math.abs(this.sin_p12-1)<=B?(u=this.a*Te(s,a,l,h,I),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u-d)*Math.sin(o),i.y=this.y0-(u-d)*Math.cos(o),i):Math.abs(this.sin_p12+1)<=B?(u=this.a*Te(s,a,l,h,I),d=this.a*Te(s,a,l,h,e),i.x=this.x0+(u+d)*Math.sin(o),i.y=this.y0+(u+d)*Math.cos(o),i):(c=n/r,f=eo(this.a,this.e,this.sin_p12),g=eo(this.a,this.e,n),m=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(g*r)),p=Math.atan2(Math.sin(o),this.cos_p12*Math.tan(m)-this.sin_p12*Math.cos(o)),p===0?M=Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):Math.abs(Math.abs(p)-Math.PI)<=B?M=-Math.asin(this.cos_p12*Math.sin(m)-this.sin_p12*Math.cos(m)):M=Math.asin(Math.sin(o)*Math.cos(m)/Math.sin(p)),_=this.e*this.sin_p12/Math.sqrt(1-this.es),v=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es),y=_*v,x=v*v,S=M*M,R=S*M,A=R*M,G=A*M,k=f*M*(1-S*x*(1-x)/6+R/8*y*(1-2*x)+A/120*(x*(4-7*x)-3*_*_*(1-7*x))-G/48*y),i.x=this.x0+k*Math.sin(p),i.y=this.y0+k*Math.cos(p),i))}function aE(i){i.x-=this.x0,i.y-=this.y0;var t,e,n,r,o,s,a,l,h,u,d,c,f,g,m,p,_,v,y,x,k,w,C,M;return this.sphere?(t=Math.sqrt(i.x*i.x+i.y*i.y),t>2*I*this.a?void 0:(e=t/this.a,n=Math.sin(e),r=Math.cos(e),o=this.long0,Math.abs(t)<=B?s=this.lat0:(s=Sn(r*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-I,Math.abs(a)<=B?this.lat0>=0?o=X(this.long0+Math.atan2(i.x,-i.y)):o=X(this.long0-Math.atan2(-i.x,i.y)):o=X(this.long0+Math.atan2(i.x*n,t*this.cos_p12*r-i.y*this.sin_p12*n))),i.x=o,i.y=s,i)):(l=cs(this.es),h=fs(this.es),u=gs(this.es),d=ms(this.es),Math.abs(this.sin_p12-1)<=B?(c=this.a*Te(l,h,u,d,I),t=Math.sqrt(i.x*i.x+i.y*i.y),f=c-t,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,-1*i.y)),i.x=o,i.y=s,i):Math.abs(this.sin_p12+1)<=B?(c=this.a*Te(l,h,u,d,I),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-c,s=nl(f/this.a,l,h,u,d),o=X(this.long0+Math.atan2(i.x,i.y)),i.x=o,i.y=s,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),p=Math.atan2(i.x,i.y),g=eo(this.a,this.e,this.sin_p12),_=Math.cos(p),v=this.e*this.cos_p12*_,y=-v*v/(1-this.es),x=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),k=t/g,w=k-y*(1+y)*Math.pow(k,3)/6-x*(1+3*y)*Math.pow(k,4)/24,C=1-y*w*w/2-k*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),o=X(this.long0+Math.asin(Math.sin(p)*Math.sin(w)/Math.cos(m))),M=Math.sin(m),s=Math.atan2((M-this.es*C*this.sin_p12)*Math.tan(m),M*(1-this.es)),i.x=o,i.y=s,i))}var lE=["Azimuthal_Equidistant","aeqd"];const hE={init:oE,forward:sE,inverse:aE,names:lE};function uE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function dE(i){var t,e,n,r,o,s,a,l,h=i.x,u=i.y;return n=X(h-this.long0),t=Math.sin(u),e=Math.cos(u),r=Math.cos(n),s=this.sin_p14*t+this.cos_p14*e*r,o=1,(s>0||Math.abs(s)<=B)&&(a=this.a*o*e*Math.sin(n),l=this.y0+this.a*o*(this.cos_p14*t-this.sin_p14*e*r)),i.x=a,i.y=l,i}function cE(i){var t,e,n,r,o,s,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=Sn(t/this.a),n=Math.sin(e),r=Math.cos(e),s=this.long0,Math.abs(t)<=B?(a=this.lat0,i.x=s,i.y=a,i):(a=Sn(r*this.sin_p14+i.y*n*this.cos_p14/t),o=Math.abs(this.lat0)-I,Math.abs(o)<=B?(this.lat0>=0?s=X(this.long0+Math.atan2(i.x,-i.y)):s=X(this.long0-Math.atan2(-i.x,i.y)),i.x=s,i.y=a,i):(s=X(this.long0+Math.atan2(i.x*n,t*this.cos_p14*r-i.y*this.sin_p14*n)),i.x=s,i.y=a,i))}var fE=["ortho"];const gE={init:uE,forward:dE,inverse:cE,names:fE};var Xt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Pt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function mE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=I-It/2?this.face=Xt.TOP:this.lat0<=-(I-It/2)?this.face=Xt.BOTTOM:Math.abs(this.long0)<=It?this.face=Xt.FRONT:Math.abs(this.long0)<=I+It?this.face=this.long0>0?Xt.RIGHT:Xt.LEFT:this.face=Xt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function pE(i){var t={x:0,y:0},e,n,r,o,s,a,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===Xt.TOP)o=I-e,n>=It&&n<=I+It?(l.value=Pt.AREA_0,r=n-I):n>I+It||n<=-(I+It)?(l.value=Pt.AREA_1,r=n>0?n-Zt:n+Zt):n>-(I+It)&&n<=-It?(l.value=Pt.AREA_2,r=n+I):(l.value=Pt.AREA_3,r=n);else if(this.face===Xt.BOTTOM)o=I+e,n>=It&&n<=I+It?(l.value=Pt.AREA_0,r=-n+I):n<It&&n>=-It?(l.value=Pt.AREA_1,r=-n):n<-It&&n>=-(I+It)?(l.value=Pt.AREA_2,r=-n-I):(l.value=Pt.AREA_3,r=n>0?-n+Zt:-n-Zt);else{var h,u,d,c,f,g,m;this.face===Xt.RIGHT?n=no(n,+I):this.face===Xt.BACK?n=no(n,+Zt):this.face===Xt.LEFT&&(n=no(n,-I)),c=Math.sin(e),f=Math.cos(e),g=Math.sin(n),m=Math.cos(n),h=f*m,u=f*g,d=c,this.face===Xt.FRONT?(o=Math.acos(h),r=rl(o,d,u,l)):this.face===Xt.RIGHT?(o=Math.acos(u),r=rl(o,d,-h,l)):this.face===Xt.BACK?(o=Math.acos(-h),r=rl(o,d,-u,l)):this.face===Xt.LEFT?(o=Math.acos(-u),r=rl(o,d,h,l)):(o=r=0,l.value=Pt.AREA_0)}return a=Math.atan(12/Zt*(r+Math.acos(Math.sin(r)*Math.cos(It))-I)),s=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(r))))),l.value===Pt.AREA_1?a+=I:l.value===Pt.AREA_2?a+=Zt:l.value===Pt.AREA_3&&(a+=1.5*Zt),t.x=s*Math.cos(a),t.y=s*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function vE(i){var t={lam:0,phi:0},e,n,r,o,s,a,l,h,u,d={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?d.value=Pt.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(d.value=Pt.AREA_1,e-=I):i.x<0&&-i.x>=Math.abs(i.y)?(d.value=Pt.AREA_2,e=e<0?e+Zt:e-Zt):(d.value=Pt.AREA_3,e+=I),u=Zt/12*Math.tan(e),s=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(s),r=Math.cos(e),o=Math.tan(n),l=1-r*r*o*o*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===Xt.TOP)h=Math.acos(l),t.phi=I-h,d.value===Pt.AREA_0?t.lam=a+I:d.value===Pt.AREA_1?t.lam=a<0?a+Zt:a-Zt:d.value===Pt.AREA_2?t.lam=a-I:t.lam=a;else if(this.face===Xt.BOTTOM)h=Math.acos(l),t.phi=h-I,d.value===Pt.AREA_0?t.lam=-a+I:d.value===Pt.AREA_1?t.lam=-a:d.value===Pt.AREA_2?t.lam=-a-I:t.lam=a<0?-a-Zt:-a+Zt;else{var c,f,g;c=l,u=c*c,u>=1?g=0:g=Math.sqrt(1-u)*Math.sin(a),u+=g*g,u>=1?f=0:f=Math.sqrt(1-u),d.value===Pt.AREA_1?(u=f,f=-g,g=u):d.value===Pt.AREA_2?(f=-f,g=-g):d.value===Pt.AREA_3&&(u=f,f=g,g=-u),this.face===Xt.RIGHT?(u=c,c=-f,f=u):this.face===Xt.BACK?(c=-c,f=-f):this.face===Xt.LEFT&&(u=c,c=f,f=-u),t.phi=Math.acos(-g)-I,t.lam=Math.atan2(f,c),this.face===Xt.RIGHT?t.lam=no(t.lam,-I):this.face===Xt.BACK?t.lam=no(t.lam,-Zt):this.face===Xt.LEFT&&(t.lam=no(t.lam,+I))}if(this.es!==0){var m,p,_;m=t.phi<0?1:0,p=Math.tan(t.phi),_=this.b/Math.sqrt(p*p+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-_*_)/(this.one_minus_f*_)),m&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function rl(i,t,e,n){var r;return i<B?(n.value=Pt.AREA_0,r=0):(r=Math.atan2(t,e),Math.abs(r)<=It?n.value=Pt.AREA_0:r>It&&r<=I+It?(n.value=Pt.AREA_1,r-=I):r>I+It||r<=-(I+It)?(n.value=Pt.AREA_2,r=r>=0?r-Zt:r+Zt):(n.value=Pt.AREA_3,r+=I)),r}function no(i,t){var e=i+t;return e<-Zt?e+=ss:e>+Zt&&(e-=ss),e}var _E=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const yE={init:mE,forward:pE,inverse:vE,names:_E};var od=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ps=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ip=.8487,np=1.3523,rp=vi/5,xE=1/rp,ro=18,ol=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},bE=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function kE(i,t,e,n){for(var r=t;n;--n){var o=i(r);if(r-=o,Math.abs(o)<e)break}return r}function wE(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function ME(i){var t=X(i.x-this.long0),e=Math.abs(i.y),n=Math.floor(e*rp);n<0?n=0:n>=ro&&(n=ro-1),e=vi*(e-xE*n);var r={x:ol(od[n],e)*t,y:ol(ps[n],e)};return i.y<0&&(r.y=-r.y),r.x=r.x*this.a*ip+this.x0,r.y=r.y*this.a*np+this.y0,r}function EE(i){var t={x:(i.x-this.x0)/(this.a*ip),y:Math.abs(i.y-this.y0)/(this.a*np)};if(t.y>=1)t.x/=od[ro][0],t.y=i.y<0?-I:I;else{var e=Math.floor(t.y*ro);for(e<0?e=0:e>=ro&&(e=ro-1);;)if(ps[e][0]>t.y)--e;else if(ps[e+1][0]<=t.y)++e;else break;var n=ps[e],r=5*(t.y-n[0])/(ps[e+1][0]-n[0]);r=kE(function(o){return(ol(n,o)-t.y)/bE(n,o)},r,B,100),t.x/=ol(od[e],r),t.y=(5*e+r)*he,i.y<0&&(t.y=-t.y)}return t.x=X(t.x+this.long0),t}var CE=["Robinson","robin"];const SE={init:wE,forward:ME,inverse:EE,names:CE};function TE(){this.name="geocent"}function zE(i){var t=Im(i,this.es,this.a);return t}function RE(i){var t=Pm(i,this.es,this.a,this.b);return t}var IE=["Geocentric","geocentric","geocent","Geocent"];const PE={init:TE,forward:zE,inverse:RE,names:IE};var pe={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},vs={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function AE(){if(Object.keys(vs).forEach(function(e){if(typeof this[e]>"u")this[e]=vs[e].def;else{if(vs[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);vs[e].num&&(this[e]=parseFloat(this[e]))}vs[e].degrees&&(this[e]=this[e]*he)}.bind(this)),Math.abs(Math.abs(this.lat0)-I)<B?this.mode=this.lat0<0?pe.S_POLE:pe.N_POLE:Math.abs(this.lat0)<B?this.mode=pe.EQUIT:(this.mode=pe.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function DE(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),r,o;switch(this.mode){case pe.OBLIQ:o=this.sinph0*t+this.cosph0*e*n;break;case pe.EQUIT:o=e*n;break;case pe.S_POLE:o=-t;break;case pe.N_POLE:o=t;break}switch(o=this.pn1/(this.p-o),r=o*e*Math.sin(i.x),this.mode){case pe.OBLIQ:o*=this.cosph0*t-this.sinph0*e*n;break;case pe.EQUIT:o*=t;break;case pe.N_POLE:o*=-(e*n);break;case pe.S_POLE:o*=e*n;break}var s,a;return s=o*this.cg+r*this.sg,a=1/(s*this.sw*this.h1+this.cw),r=(r*this.cg-o*this.sg)*this.cw*a,o=s*a,i.x=r*this.a,i.y=o*this.a,i}function LE(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,r;r=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*r,n=this.pn1*i.y*this.cw*r,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var o=ai(i.x,i.y);if(Math.abs(o)<B)t.x=0,t.y=i.y;else{var s,a;switch(a=1-o*o*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/o+o/this.pn1),s=Math.sqrt(1-a*a),this.mode){case pe.OBLIQ:t.y=Math.asin(s*this.sinph0+i.y*a*this.cosph0/o),i.y=(s-this.sinph0*Math.sin(t.y))*o,i.x*=a*this.cosph0;break;case pe.EQUIT:t.y=Math.asin(i.y*a/o),i.y=s*o,i.x*=a;break;case pe.N_POLE:t.y=Math.asin(s),i.y=-i.y;break;case pe.S_POLE:t.y=-Math.asin(s);break}t.x=Math.atan2(i.x,i.y)}return i.x=t.x+this.long0,i.y=t.y,i}var FE=["Tilted_Perspective","tpers"];const OE={init:AE,forward:DE,inverse:LE,names:FE};function NE(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function GE(i){var t=i.x,e=i.y,n,r,o,s;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/ai(this.radius_p*Math.cos(e),Math.sin(e));if(r=a*Math.cos(t)*Math.cos(e),o=a*Math.sin(t)*Math.cos(e),s=a*Math.sin(e),(this.radius_g-r)*r-o*o-s*s*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n)))}else this.shape==="sphere"&&(n=Math.cos(e),r=Math.cos(t)*n,o=Math.sin(t)*n,s=Math.sin(e),n=this.radius_g-r,this.flip_axis?(i.x=this.radius_g_1*Math.atan(o/ai(s,n)),i.y=this.radius_g_1*Math.atan(s/n)):(i.x=this.radius_g_1*Math.atan(o/n),i.y=this.radius_g_1*Math.atan(s/ai(o,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function jE(i){var t=-1,e=0,n=0,r,o,s,a;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*ai(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*ai(1,e));var l=n/this.radius_p;if(r=e*e+l*l+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),r=e*e+n*n+t*t,o=2*this.radius_g*t,s=o*o-4*r*this.C,s<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-o-Math.sqrt(s))/(2*r),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var BE=["Geostationary Satellite View","Geostationary_Satellite","geos"];const UE={init:NE,forward:GE,inverse:jE,names:BE};function VE(i){i.Proj.projections.add(el),i.Proj.projections.add(il),i.Proj.projections.add(K2),i.Proj.projections.add(o5),i.Proj.projections.add(d5),i.Proj.projections.add(p5),i.Proj.projections.add(k5),i.Proj.projections.add(S5),i.Proj.projections.add(P5),i.Proj.projections.add(O5),i.Proj.projections.add(tM),i.Proj.projections.add(sM),i.Proj.projections.add(dM),i.Proj.projections.add(vM),i.Proj.projections.add(kM),i.Proj.projections.add(SM),i.Proj.projections.add(PM),i.Proj.projections.add(OM),i.Proj.projections.add(VM),i.Proj.projections.add(YM),i.Proj.projections.add(QM),i.Proj.projections.add(rE),i.Proj.projections.add(hE),i.Proj.projections.add(gE),i.Proj.projections.add(yE),i.Proj.projections.add(SE),i.Proj.projections.add(PE),i.Proj.projections.add(OE),i.Proj.projections.add(UE)}Le.defaultDatum="WGS84",Le.Proj=yi,Le.WGS84=new Le.Proj("WGS84"),Le.Point=Qr,Le.toPoint=Fm,Le.defs=Se,Le.nadgrid=Hw,Le.transform=Qa,Le.mgrs=f2,Le.version="__VERSION__",VE(Le),Le.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"),cw(Le);const op=Gt("EPSG:27700"),_C=zp``;function qE(i){return new j_({units:"metric",bar:i,steps:4,text:!0,minWidth:140})}const XE=`:host{display:block;width:650px;height:650px;position:relative}.map{height:100%;opacity:0;transition:opacity .25s;overflow:hidden;border:#000000 solid .15em}.map:focus{outline:#ffdd00 solid .25em}.ol-control button{border-radius:0!important;background-color:#2c2c2c!important;cursor:pointer;min-width:44px;min-height:44px;font-size:1.75rem}.ol-control button:hover{background-color:#2c2c2cd9!important}.reset-control{top:114px;left:.5em}#area{position:absolute;bottom:0;left:0;z-index:100;background:white}
83
+ `,$E="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjJweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjcgMzciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMy41MDA3IDAuNTgzMzc0QzYuNTY2OSAwLjU4MzM3NCAwLjk1ODk4NCA2LjE5MTI5IDAuOTU4OTg0IDEzLjEyNUMwLjk1ODk4NCAxNi4yNDI1IDEuODU0ODIgMTkuMTYzIDMuNDg1MjMgMjEuNzk2N0M1LjE4NzMyIDI0LjU1NTkgNy40MjY5IDI2LjkyMDkgOS4xNDY5IDI5LjY4QzkuOTg4OTggMzEuMDIzOCAxMC41OTgyIDMyLjI3OCAxMS4yNDMyIDMzLjcyOTJDMTEuNzA5IDM0LjcxNDYgMTIuMDg1MiAzNi40MTY3IDEzLjUwMDcgMzYuNDE2N0MxNC45MTYxIDM2LjQxNjcgMTUuMjkyMyAzNC43MTQ2IDE1Ljc0MDIgMzMuNzI5MkMxNi40MDMyIDMyLjI3OCAxNi45OTQ0IDMxLjAyMzggMTcuODM2NSAyOS42OEMxOS41NTY1IDI2LjkzODggMjEuNzk2MSAyNC41NzM4IDIzLjQ5ODIgMjEuNzk2N0MyNS4xNDY1IDE5LjE2MyAyNi4wNDIzIDE2LjI0MjUgMjYuMDQyMyAxMy4xMjVDMjYuMDQyMyA2LjE5MTI5IDIwLjQzNDQgMC41ODMzNzQgMTMuNTAwNyAwLjU4MzM3NFpNMTMuNTAwNyAxOC4wNTIxQzExLjAyODIgMTguMDUyMSA5LjAyMTQ4IDE2LjA0NTUgOS4wMjE0OCAxMy41NzNDOS4wMjE0OCAxMS4xMDA1IDExLjAyODIgOS4wOTM3OSAxMy41MDA3IDkuMDkzNzlDMTUuOTczMiA5LjA5Mzc5IDE3Ljk3OTggMTEuMTAwNSAxNy45Nzk4IDEzLjU3M0MxNy45Nzk4IDE2LjA0NTUgMTUuOTczMiAxOC4wNTIxIDEzLjUwMDcgMTguMDUyMVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=";var sp=Object.freeze,ap=Object.defineProperty,WE=Object.getOwnPropertyDescriptor,bt=(i,t,e,n)=>{for(var r=n>1?void 0:n?WE(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&ap(t,e,r),r},YE=(i,t)=>sp(ap(i,"raw",{value:sp(t||i.slice())})),lp;q.MyMap=class extends Pn{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.projection="EPSG:4326",this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBorderNone=!1,this.featureBuffer=40,this.showMarker=!1,this.markerLatitude=this.latitude,this.markerLongitude=this.longitude,this.markerColor="#000000",this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osFeaturesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.osCopyright=`\xA9 Crown copyright and database rights ${new Date().getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.markerImage="circle",this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}firstUpdated(){var y;const i=this.renderRoot.querySelector(`#${this.id}`),t=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),e=uw(this.osCopyright,this.osVectorTilesApiKey),n=dw(this.osCopyright,this.osVectorTilesApiKey),r=this.projection==="EPSG:27700"&&Boolean(op)?op:this.projection,o=$s([this.longitude,this.latitude],r,"EPSG:3857"),s=new O_({target:i,layers:[t?n:e],view:new en({projection:"EPSG:3857",extent:B0([-10.76418,49.528423,1.9134116,61.331151],"EPSG:4326","EPSG:3857"),minZoom:this.minZoom,maxZoom:this.maxZoom,center:o,zoom:this.zoom,enableRotation:!1}),controls:Wc({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[qE(this.useScaleBarStyle)]:[]),interactions:Qc({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});this.map=s;const a=Ik(this.drawPointer),l=Pk(this.drawPointer),h=document.createElement("button");h.innerHTML="\u21BB",h.title="Reset map view";const u=()=>{this.showFeaturesAtPoint?rs(s,pi,this.featureBuffer):g.getFeatures().length>0?rs(s,g,this.geojsonBuffer):(s.getView().setCenter(o),s.getView().setZoom(this.zoom)),this.drawMode&&(Li.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${this.areaUnit==="m2"?"m\xB2":this.areaUnit}`),s.addInteraction(a),s.addInteraction(nm))};h.addEventListener("click",u,!1);const d=document.createElement("div");d.className="reset-control ol-unselectable ol-control",d.appendChild(h);var c=new po({element:d});this.hideResetControl||s.addControl(c);const f=(y=this.renderRoot)==null?void 0:y.querySelectorAll(".ol-control button");f==null||f.forEach(x=>x.setAttribute("aria-label",x.getAttribute("title")||"")),s.on("pointerdrag",()=>{s.getViewport().style.cursor="grabbing"}),s.on("pointermove",()=>{s.getViewport().style.cursor="grab"});const g=new hn;if(this.geojsonData.type==="FeatureCollection"){let x=new Zn().readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});g.addFeatures(x)}else if(this.geojsonData.type==="Feature"){let x=new Zn().readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});g.addFeature(x)}const m=new Qn({source:g,style:new le({stroke:new ke({color:this.geojsonColor,width:3}),fill:new ge({color:this.geojsonFill?$a(this.geojsonColor,.2):$a(this.geojsonColor,0)})})});if(s.addLayer(m),g.getFeatures().length>0){rs(s,g,this.geojsonBuffer);const x=g.getFeatures()[0].getGeometry();x&&this.dispatch("geojsonDataArea",Yu(x,this.areaUnit))}if(this.drawMode){Li.clear();const x=Object.keys(this.drawGeojsonData.geometry).length>0;if(x){let k=new Zn().readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Li.addFeature(k),rs(s,Li,this.drawGeojsonDataBuffer)}s.addLayer(im),x||s.addInteraction(a),s.addInteraction(l),s.addInteraction(nm),Li.on("change",()=>{var w;const k=Li.getFeatures();if(k.length>0){const C=(w=Ck(k))==null?void 0:w.getGeometry();this.dispatch("geojsonChange",new Zn().writeFeaturesObject(k,{featureProjection:"EPSG:3857"})),C&&this.dispatch("areaChange",Yu(C,this.areaUnit)),s.removeInteraction(a)}})}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){if(s.addLayer(Sk),im.setZIndex(1001),this.zoom<20){Yr.clear();const k=s.getView().calculateExtent(s.getSize());Hg(n,k)}s.on("moveend",()=>{const k=s.getView().getZoom();if(k&&k<20){Yr.clear();return}setTimeout(()=>{Yr.clear();const w=s.getView().calculateExtent(s.getSize());Hg(n,w)},200)})}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){vm(o,this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",k=>{vm(k.coordinate,this.osFeaturesApiKey,!0)});const x=ow(this.featureColor,this.featureFill,this.featureBorderNone);s.addLayer(x),pi.on("change",()=>{if(pi.getState()==="ready"&&pi.getFeatures().length>0){rs(s,pi,this.featureBuffer),this.dispatch("featuresGeojsonChange",new Zn().writeFeaturesObject(pi.getFeatures(),{featureProjection:"EPSG:3857"}));const k=pi.getFeatures()[0].getGeometry();k&&this.dispatch("featuresAreaChange",Yu(k,this.areaUnit))}})}const p=new Hn({radius:9,fill:new ge({color:this.markerColor})}),_=new ga({src:$E}),v=()=>{switch(this.markerImage){case"circle":return p;case"pin":return _}};if(this.showMarker){const x=new ni($s([this.markerLongitude,this.markerLatitude],r,"EPSG:3857")),k=new Qn({source:new hn({features:[new Ti(x)]}),style:new le({image:v()})});s.addLayer(k)}setTimeout(()=>{window.dispatchEvent(new Event("resize")),i.style.opacity="1",this.dispatch("ready")},500)}render(){return Bi(lp||(lp=YE([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
70
84
  <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />
71
- <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.map)==null||r.dispose()}},j.MyMap.styles=Uo(ww),xt([Q({type:String})],j.MyMap.prototype,"id",2),xt([Q({type:Number})],j.MyMap.prototype,"latitude",2),xt([Q({type:Number})],j.MyMap.prototype,"longitude",2),xt([Q({type:Number})],j.MyMap.prototype,"zoom",2),xt([Q({type:Number})],j.MyMap.prototype,"minZoom",2),xt([Q({type:Number})],j.MyMap.prototype,"maxZoom",2),xt([Q({type:Boolean})],j.MyMap.prototype,"drawMode",2),xt([Q({type:Object})],j.MyMap.prototype,"drawGeojsonData",2),xt([Q({type:Number})],j.MyMap.prototype,"drawGeojsonDataBuffer",2),xt([Q({type:String})],j.MyMap.prototype,"drawPointer",2),xt([Q({type:Boolean})],j.MyMap.prototype,"showFeaturesAtPoint",2),xt([Q({type:Boolean})],j.MyMap.prototype,"clickFeatures",2),xt([Q({type:String})],j.MyMap.prototype,"featureColor",2),xt([Q({type:Boolean})],j.MyMap.prototype,"featureFill",2),xt([Q({type:Boolean})],j.MyMap.prototype,"featureBorderNone",2),xt([Q({type:Number})],j.MyMap.prototype,"featureBuffer",2),xt([Q({type:Boolean})],j.MyMap.prototype,"showMarker",2),xt([Q({type:Number})],j.MyMap.prototype,"markerLatitude",2),xt([Q({type:Number})],j.MyMap.prototype,"markerLongitude",2),xt([Q({type:String})],j.MyMap.prototype,"markerColor",2),xt([Q({type:Object})],j.MyMap.prototype,"geojsonData",2),xt([Q({type:String})],j.MyMap.prototype,"geojsonColor",2),xt([Q({type:Boolean})],j.MyMap.prototype,"geojsonFill",2),xt([Q({type:Number})],j.MyMap.prototype,"geojsonBuffer",2),xt([Q({type:Boolean})],j.MyMap.prototype,"disableVectorTiles",2),xt([Q({type:String})],j.MyMap.prototype,"osVectorTilesApiKey",2),xt([Q({type:String})],j.MyMap.prototype,"osFeaturesApiKey",2),xt([Q({type:String})],j.MyMap.prototype,"osCopyright",2),xt([Q({type:Boolean})],j.MyMap.prototype,"hideResetControl",2),xt([Q({type:Boolean})],j.MyMap.prototype,"staticMode",2),xt([Q({type:String})],j.MyMap.prototype,"areaUnit",2),xt([Q({type:Boolean})],j.MyMap.prototype,"showScale",2),xt([Q({type:Boolean})],j.MyMap.prototype,"useScaleBarStyle",2),xt([Q({type:String})],j.MyMap.prototype,"markerImage",2),j.MyMap=xt([cs("my-map")],j.MyMap);var pc={exports:{}};(function(r,e){(function(i,n){r.exports=n()})(window,function(){return function(t){var i={};function n(o){if(i[o])return i[o].exports;var a=i[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=i,n.d=function(o,a,s){n.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:s})},n.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.t=function(o,a){if(1&a&&(o=n(o)),8&a||4&a&&typeof o=="object"&&o&&o.__esModule)return o;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:o}),2&a&&typeof o!="string")for(var l in o)n.d(s,l,function(u){return o[u]}.bind(null,l));return s},n.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(a,"a",a),a},n.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},n.p="/",n(n.s=37)}([function(t,i,n){var o=n(1),a=n(6),s=n(7),l=n(16),u=n(18),h="prototype",f=function(d,p,c){var g,m,_,v,y=d&f.F,x=d&f.G,k=d&f.S,E=d&f.P,T=d&f.B,w=x?o:k?o[p]||(o[p]={}):(o[p]||{})[h],C=x?a:a[p]||(a[p]={}),R=C[h]||(C[h]={});for(g in x&&(c=p),c)_=((m=!y&&w&&w[g]!==void 0)?w:c)[g],v=T&&m?u(_,o):E&&typeof _=="function"?u(Function.call,_):_,w&&l(w,g,_,d&f.U),C[g]!=_&&s(C,g,v),E&&R[g]!=_&&(R[g]=_)};o.core=a,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,i){var n=t.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=n)},function(t,i){t.exports=function(n){return typeof n=="object"?n!==null:typeof n=="function"}},function(t,i,n){t.exports=!n(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(t,i){t.exports=function(n){try{return!!n()}catch{return!0}}},function(t,i,n){n.r(i),n.d(i,"h",function(){return u}),n.d(i,"createElement",function(){return u}),n.d(i,"cloneElement",function(){return d}),n.d(i,"Component",function(){return N}),n.d(i,"render",function(){return O}),n.d(i,"rerender",function(){return m}),n.d(i,"options",function(){return a});var o=function(){},a={},s=[],l=[];function u(b,z){var W,S,K,V,gt=l;for(V=arguments.length;2<V--;)s.push(arguments[V]);for(z&&z.children!=null&&(s.length||s.push(z.children),delete z.children);s.length;)if((S=s.pop())&&S.pop!==void 0)for(V=S.length;V--;)s.push(S[V]);else typeof S=="boolean"&&(S=null),(K=typeof b!="function")&&(S==null?S="":typeof S=="number"?S=String(S):typeof S!="string"&&(K=!1)),K&&W?gt[gt.length-1]+=S:gt===l?gt=[S]:gt.push(S),W=K;var ut=new o;return ut.nodeName=b,ut.children=gt,ut.attributes=z==null?void 0:z,ut.key=z==null?void 0:z.key,a.vnode!==void 0&&a.vnode(ut),ut}function h(b,z){for(var W in z)b[W]=z[W];return b}var f=typeof Promise=="function"?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function d(b,z){return u(b.nodeName,h(h({},b.attributes),z),2<arguments.length?[].slice.call(arguments,2):b.children)}var p=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,c=[];function g(b){!b._dirty&&(b._dirty=!0)&&c.push(b)==1&&(a.debounceRendering||f)(m)}function m(){var b,z=c;for(c=[];b=z.pop();)b._dirty&&A(b)}function _(b,z){return b.normalizedNodeName===z||b.nodeName.toLowerCase()===z.toLowerCase()}function v(b){var z=h({},b.attributes);z.children=b.children;var W=b.nodeName.defaultProps;if(W!==void 0)for(var S in W)z[S]===void 0&&(z[S]=W[S]);return z}function y(b){var z=b.parentNode;z&&z.removeChild(b)}function x(b,z,W,S,K){if(z==="className"&&(z="class"),z!=="key")if(z==="ref")W&&W(null),S&&S(b);else if(z!=="class"||K)if(z==="style"){if(S&&typeof S!="string"&&typeof W!="string"||(b.style.cssText=S||""),S&&typeof S=="object"){if(typeof W!="string")for(var V in W)V in S||(b.style[V]="");for(var V in S)b.style[V]=typeof S[V]=="number"&&p.test(V)===!1?S[V]+"px":S[V]}}else if(z==="dangerouslySetInnerHTML")S&&(b.innerHTML=S.__html||"");else if(z[0]=="o"&&z[1]=="n"){var gt=z!==(z=z.replace(/Capture$/,""));z=z.toLowerCase().substring(2),S?W||b.addEventListener(z,k,gt):b.removeEventListener(z,k,gt),(b._listeners||(b._listeners={}))[z]=S}else if(z!=="list"&&z!=="type"&&!K&&z in b){try{b[z]=S==null?"":S}catch{}S!=null&&S!==!1||z=="spellcheck"||b.removeAttribute(z)}else{var ut=K&&z!==(z=z.replace(/^xlink:?/,""));S==null||S===!1?ut?b.removeAttributeNS("http://www.w3.org/1999/xlink",z.toLowerCase()):b.removeAttribute(z):typeof S!="function"&&(ut?b.setAttributeNS("http://www.w3.org/1999/xlink",z.toLowerCase(),S):b.setAttribute(z,S))}else b.className=S||""}function k(b){return this._listeners[b.type](a.event&&a.event(b)||b)}var E=[],T=0,w=!1,C=!1;function R(){for(var b;b=E.pop();)a.afterMount&&a.afterMount(b),b.componentDidMount&&b.componentDidMount()}function P(b,z,W,S,K,V){T++||(w=K!=null&&K.ownerSVGElement!==void 0,C=b!=null&&!("__preactattr_"in b));var gt=M(b,z,W,S,V);return K&&gt.parentNode!==K&&K.appendChild(gt),--T||(C=!1,V||R()),gt}function M(b,z,W,S,K){var V=b,gt=w;if(z!=null&&typeof z!="boolean"||(z=""),typeof z=="string"||typeof z=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||K)?b.nodeValue!=z&&(b.nodeValue=z):(V=document.createTextNode(z),b&&(b.parentNode&&b.parentNode.replaceChild(V,b),L(b,!0))),V.__preactattr_=!0,V;var ut=z.nodeName;if(typeof ut=="function")return function(at,ot,kt,pt){for(var yt=at&&at._component,st=yt,St=at,Nt=yt&&at._componentConstructor===ot.nodeName,Gt=Nt,wt=v(ot);yt&&!Gt&&(yt=yt._parentComponent);)Gt=yt.constructor===ot.nodeName;return yt&&Gt&&(!pt||yt._component)?(et(yt,wt,3,kt,pt),at=yt.base):(st&&!Nt&&(q(st),at=St=null),yt=Y(ot.nodeName,wt,kt),at&&!yt.nextBase&&(yt.nextBase=at,St=null),et(yt,wt,1,kt,pt),at=yt.base,St&&at!==St&&(St._component=null,L(St,!1))),at}(b,z,W,S);if(w=ut==="svg"||ut!=="foreignObject"&&w,ut=String(ut),(!b||!_(b,ut))&&(V=function(at,ot){var kt=ot?document.createElementNS("http://www.w3.org/2000/svg",at):document.createElement(at);return kt.normalizedNodeName=at,kt}(ut,w),b)){for(;b.firstChild;)V.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild(V,b),L(b,!0)}var _t=V.firstChild,bt=V.__preactattr_,Pt=z.children;if(bt==null){bt=V.__preactattr_={};for(var It=V.attributes,Ut=It.length;Ut--;)bt[It[Ut].name]=It[Ut].value}return!C&&Pt&&Pt.length===1&&typeof Pt[0]=="string"&&_t!=null&&_t.splitText!==void 0&&_t.nextSibling==null?_t.nodeValue!=Pt[0]&&(_t.nodeValue=Pt[0]):(Pt&&Pt.length||_t!=null)&&function(at,ot,kt,pt,yt){var st,St,Nt,Gt,wt,ht=at.childNodes,Ot=[],mt={},Tt=0,jt=0,Vt=ht.length,zt=0,Jt=ot?ot.length:0;if(Vt!==0)for(var Mt=0;Mt<Vt;Mt++){var Qt=ht[Mt],Ki=Qt.__preactattr_,re=Jt&&Ki?Qt._component?Qt._component.__key:Ki.key:null;re!=null?(Tt++,mt[re]=Qt):(Ki||(Qt.splitText!==void 0?!yt||Qt.nodeValue.trim():yt))&&(Ot[zt++]=Qt)}if(Jt!==0)for(var Mt=0;Mt<Jt;Mt++){Gt=ot[Mt],wt=null;var re=Gt.key;if(re!=null)Tt&&mt[re]!==void 0&&(wt=mt[re],mt[re]=void 0,Tt--);else if(jt<zt){for(st=jt;st<zt;st++)if(Ot[st]!==void 0&&(ci=St=Ot[st],Ge=yt,typeof(Me=Gt)=="string"||typeof Me=="number"?ci.splitText!==void 0:typeof Me.nodeName=="string"?!ci._componentConstructor&&_(ci,Me.nodeName):Ge||ci._componentConstructor===Me.nodeName)){wt=St,Ot[st]=void 0,st===zt-1&&zt--,st===jt&&jt++;break}}wt=M(wt,Gt,kt,pt),Nt=ht[Mt],wt&&wt!==at&&wt!==Nt&&(Nt==null?at.appendChild(wt):wt===Nt.nextSibling?y(Nt):at.insertBefore(wt,Nt))}var ci,Me,Ge;if(Tt)for(var Mt in mt)mt[Mt]!==void 0&&L(mt[Mt],!1);for(;jt<=zt;)(wt=Ot[zt--])!==void 0&&L(wt,!1)}(V,Pt,W,S,C||bt.dangerouslySetInnerHTML!=null),function(at,ot,kt){var pt;for(pt in kt)ot&&ot[pt]!=null||kt[pt]==null||x(at,pt,kt[pt],kt[pt]=void 0,w);for(pt in ot)pt==="children"||pt==="innerHTML"||pt in kt&&ot[pt]===(pt==="value"||pt==="checked"?at[pt]:kt[pt])||x(at,pt,kt[pt],kt[pt]=ot[pt],w)}(V,z.attributes,bt),w=gt,V}function L(b,z){var W=b._component;W?q(W):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),z!==!1&&b.__preactattr_!=null||y(b),U(b))}function U(b){for(b=b.lastChild;b;){var z=b.previousSibling;L(b,!0),b=z}}var B=[];function Y(b,z,W){var S,K=B.length;for(b.prototype&&b.prototype.render?(S=new b(z,W),N.call(S,z,W)):((S=new N(z,W)).constructor=b,S.render=X);K--;)if(B[K].constructor===b)return S.nextBase=B[K].nextBase,B.splice(K,1),S;return S}function X(b,z,W){return this.constructor(b,W)}function et(b,z,W,S,K){b._disable||(b._disable=!0,b.__ref=z.ref,b.__key=z.key,delete z.ref,delete z.key,typeof b.constructor.getDerivedStateFromProps>"u"&&(!b.base||K?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(z,S)),S&&S!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=S),b.prevProps||(b.prevProps=b.props),b.props=z,b._disable=!1,W!==0&&(W!==1&&a.syncComponentUpdates===!1&&b.base?g(b):A(b,1,K)),b.__ref&&b.__ref(b))}function A(b,z,W,S){if(!b._disable){var K,V,gt,ut=b.props,_t=b.state,bt=b.context,Pt=b.prevProps||ut,It=b.prevState||_t,Ut=b.prevContext||bt,D=b.base,at=b.nextBase,ot=D||at,kt=b._component,pt=!1,yt=Ut;if(b.constructor.getDerivedStateFromProps&&(_t=h(h({},_t),b.constructor.getDerivedStateFromProps(ut,_t)),b.state=_t),D&&(b.props=Pt,b.state=It,b.context=Ut,z!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(ut,_t,bt)===!1?pt=!0:b.componentWillUpdate&&b.componentWillUpdate(ut,_t,bt),b.props=ut,b.state=_t,b.context=bt),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!pt){K=b.render(ut,_t,bt),b.getChildContext&&(bt=h(h({},bt),b.getChildContext())),D&&b.getSnapshotBeforeUpdate&&(yt=b.getSnapshotBeforeUpdate(Pt,It));var st,St,Nt=K&&K.nodeName;if(typeof Nt=="function"){var Gt=v(K);(V=kt)&&V.constructor===Nt&&Gt.key==V.__key?et(V,Gt,1,bt,!1):(st=V,b._component=V=Y(Nt,Gt,bt),V.nextBase=V.nextBase||at,V._parentComponent=b,et(V,Gt,0,bt,!1),A(V,1,W,!0)),St=V.base}else gt=ot,(st=kt)&&(gt=b._component=null),(ot||z===1)&&(gt&&(gt._component=null),St=function(Tt,jt,Vt,zt,Jt,Mt){T++||(w=Jt!=null&&Jt.ownerSVGElement!==void 0,C=Tt!=null&&!("__preactattr_"in Tt));var Qt=M(Tt,jt,Vt,zt,Mt);return Jt&&Qt.parentNode!==Jt&&Jt.appendChild(Qt),--T||(C=!1,Mt||R()),Qt}(gt,K,bt,W||!D,ot&&ot.parentNode,!0));if(ot&&St!==ot&&V!==kt){var wt=ot.parentNode;wt&&St!==wt&&(wt.replaceChild(St,ot),st||(ot._component=null,L(ot,!1)))}if(st&&q(st),(b.base=St)&&!S){for(var ht=b,Ot=b;Ot=Ot._parentComponent;)(ht=Ot).base=St;St._component=ht,St._componentConstructor=ht.constructor}}for(!D||W?E.unshift(b):pt||(b.componentDidUpdate&&b.componentDidUpdate(Pt,It,yt),a.afterUpdate&&a.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);T||S||R()}}function q(b){a.beforeUnmount&&a.beforeUnmount(b);var z=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var W=b._component;W?q(W):z&&(z.__preactattr_&&z.__preactattr_.ref&&z.__preactattr_.ref(null),y(b.nextBase=z),B.push(b),U(z)),b.__ref&&b.__ref(null)}function N(b,z){this._dirty=!0,this.context=z,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function O(b,z,W){return P(W,b,{},!1,z,!1)}h(N.prototype,{setState:function(b,z){this.prevState||(this.prevState=this.state),this.state=h(h({},this.state),typeof b=="function"?b(this.state,this.props):b),z&&this._renderCallbacks.push(z),g(this)},forceUpdate:function(b){b&&this._renderCallbacks.push(b),A(this,2)},render:function(){}});var tt={h:u,createElement:u,cloneElement:d,Component:N,render:O,rerender:m,options:a};i.default=tt},function(t,i){var n=t.exports={version:"2.5.7"};typeof __e=="number"&&(__e=n)},function(t,i,n){var o=n(8),a=n(40);t.exports=n(3)?function(s,l,u){return o.f(s,l,a(1,u))}:function(s,l,u){return s[l]=u,s}},function(t,i,n){var o=n(9),a=n(38),s=n(39),l=Object.defineProperty;i.f=n(3)?Object.defineProperty:function(u,h,f){if(o(u),h=s(h,!0),o(f),a)try{return l(u,h,f)}catch{}if("get"in f||"set"in f)throw TypeError("Accessors not supported!");return"value"in f&&(u[h]=f.value),u}},function(t,i,n){var o=n(2);t.exports=function(a){if(!o(a))throw TypeError(a+" is not an object!");return a}},function(t,i){var n=0,o=Math.random();t.exports=function(a){return"Symbol(".concat(a===void 0?"":a,")_",(++n+o).toString(36))}},function(t,i,n){var o=n(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return o(a)=="String"?a.split(""):Object(a)}},function(t,i){t.exports=function(n){if(n==null)throw TypeError("Can't call method on "+n);return n}},function(t,i,n){var o=n(4);t.exports=function(a,s){return!!a&&o(function(){s?a.call(null,function(){},1):a.call(null)})}},function(t,i,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(41)})},function(t,i,n){var o=n(2),a=n(1).document,s=o(a)&&o(a.createElement);t.exports=function(l){return s?a.createElement(l):{}}},function(t,i,n){var o=n(1),a=n(7),s=n(17),l=n(10)("src"),u="toString",h=Function[u],f=(""+h).split(u);n(6).inspectSource=function(d){return h.call(d)},(t.exports=function(d,p,c,g){var m=typeof c=="function";m&&(s(c,"name")||a(c,"name",p)),d[p]!==c&&(m&&(s(c,l)||a(c,l,d[p]?""+d[p]:f.join(String(p)))),d===o?d[p]=c:g?d[p]?d[p]=c:a(d,p,c):(delete d[p],a(d,p,c)))})(Function.prototype,u,function(){return typeof this=="function"&&this[l]||h.call(this)})},function(t,i){var n={}.hasOwnProperty;t.exports=function(o,a){return n.call(o,a)}},function(t,i,n){var o=n(19);t.exports=function(a,s,l){if(o(a),s===void 0)return a;switch(l){case 1:return function(u){return a.call(s,u)};case 2:return function(u,h){return a.call(s,u,h)};case 3:return function(u,h,f){return a.call(s,u,h,f)}}return function(){return a.apply(s,arguments)}}},function(t,i){t.exports=function(n){if(typeof n!="function")throw TypeError(n+" is not a function!");return n}},function(t,i,n){var o=n(42),a=n(28);t.exports=Object.keys||function(s){return o(s,a)}},function(t,i,n){var o=n(11),a=n(12);t.exports=function(s){return o(a(s))}},function(t,i){var n={}.toString;t.exports=function(o){return n.call(o).slice(8,-1)}},function(t,i,n){var o=n(21),a=n(24),s=n(43);t.exports=function(l){return function(u,h,f){var d,p=o(u),c=a(p.length),g=s(f,c);if(l&&h!=h){for(;g<c;)if((d=p[g++])!=d)return!0}else for(;g<c;g++)if((l||g in p)&&p[g]===h)return l||g||0;return!l&&-1}}},function(t,i,n){var o=n(25),a=Math.min;t.exports=function(s){return 0<s?a(o(s),9007199254740991):0}},function(t,i){var n=Math.ceil,o=Math.floor;t.exports=function(a){return isNaN(a=+a)?0:(0<a?o:n)(a)}},function(t,i,n){var o=n(27)("keys"),a=n(10);t.exports=function(s){return o[s]||(o[s]=a(s))}},function(t,i,n){var o=n(6),a=n(1),s="__core-js_shared__",l=a[s]||(a[s]={});(t.exports=function(u,h){return l[u]||(l[u]=h!==void 0?h:{})})("versions",[]).push({version:o.version,mode:n(44)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(t,i){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,i,n){var o=n(12);t.exports=function(a){return Object(o(a))}},function(t,i,n){var o=n(8).f,a=Function.prototype,s=/^\s*function ([^ (]*)/;"name"in a||n(3)&&o(a,"name",{configurable:!0,get:function(){try{return(""+this).match(s)[1]}catch{return""}}})},function(t,i,n){var o=n(0),a=n(32)(1);o(o.P+o.F*!n(13)([].map,!0),"Array",{map:function(s){return a(this,s,arguments[1])}})},function(t,i,n){var o=n(18),a=n(11),s=n(29),l=n(24),u=n(47);t.exports=function(h,f){var d=h==1,p=h==2,c=h==3,g=h==4,m=h==6,_=h==5||m,v=f||u;return function(y,x,k){for(var E,T,w=s(y),C=a(w),R=o(x,k,3),P=l(C.length),M=0,L=d?v(y,P):p?v(y,0):void 0;M<P;M++)if((_||M in C)&&(T=R(E=C[M],M,w),h)){if(d)L[M]=T;else if(T)switch(h){case 3:return!0;case 5:return E;case 6:return M;case 2:L.push(E)}else if(g)return!1}return m?-1:c||g?g:L}}},function(t,i,n){var o=n(22);t.exports=Array.isArray||function(a){return o(a)=="Array"}},function(t,i,n){var o=n(27)("wks"),a=n(10),s=n(1).Symbol,l=typeof s=="function";(t.exports=function(u){return o[u]||(o[u]=l&&s[u]||(l?s:a)("Symbol."+u))}).store=o},function(t,i,n){var o=n(0),a=n(23)(!1),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(l||!n(13)(s)),"Array",{indexOf:function(u){return l?s.apply(this,arguments)||0:a(this,u,arguments[1])}})},function(t,i,n){var o=n(0);o(o.S,"Object",{create:n(52)})},function(t,i,n){i.__esModule=!0,i.default=void 0,n(14),n(30),n(31),n(35),n(49),n(50);var o=n(5),a=function(f){return f&&f.__esModule?f:{default:f}}(n(51));function s(h){if(!h.element)throw new Error("element is not defined");if(!h.id)throw new Error("id is not defined");if(!h.source)throw new Error("source is not defined");Array.isArray(h.source)&&(h.source=l(h.source)),(0,o.render)((0,o.createElement)(a.default,h),h.element)}var l=function(f){return function(d,p){p(f.filter(function(c){return c.toLowerCase().indexOf(d.toLowerCase())!==-1}))}};s.enhanceSelectElement=function(h){if(!h.selectElement)throw new Error("selectElement is not defined");if(!h.source){var f=[].filter.call(h.selectElement.options,function(c){return c.value||h.preserveNullOptions});h.source=f.map(function(c){return c.textContent||c.innerText})}if(h.onConfirm=h.onConfirm||function(c){var g=[].filter.call(h.selectElement.options,function(m){return(m.textContent||m.innerText)===c})[0];g&&(g.selected=!0)},h.selectElement.value||h.defaultValue===void 0){var d=h.selectElement.options[h.selectElement.options.selectedIndex];h.defaultValue=d.textContent||d.innerText}h.name===void 0&&(h.name=""),h.id===void 0&&(h.selectElement.id===void 0?h.id="":h.id=h.selectElement.id),h.autoselect===void 0&&(h.autoselect=!0);var p=document.createElement("div");h.selectElement.parentNode.insertBefore(p,h.selectElement),s(Object.assign({},h,{element:p})),h.selectElement.style.display="none",h.selectElement.id=h.selectElement.id+"-select"};var u=s;i.default=u},function(t,i,n){t.exports=!n(3)&&!n(4)(function(){return Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(t,i,n){var o=n(2);t.exports=function(a,s){if(!o(a))return a;var l,u;if(s&&typeof(l=a.toString)=="function"&&!o(u=l.call(a))||typeof(l=a.valueOf)=="function"&&!o(u=l.call(a))||!s&&typeof(l=a.toString)=="function"&&!o(u=l.call(a)))return u;throw TypeError("Can't convert object to primitive value")}},function(t,i){t.exports=function(n,o){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:o}}},function(t,i,n){var o=n(20),a=n(45),s=n(46),l=n(29),u=n(11),h=Object.assign;t.exports=!h||n(4)(function(){var f={},d={},p=Symbol(),c="abcdefghijklmnopqrst";return f[p]=7,c.split("").forEach(function(g){d[g]=g}),h({},f)[p]!=7||Object.keys(h({},d)).join("")!=c})?function(f,d){for(var p=l(f),c=arguments.length,g=1,m=a.f,_=s.f;g<c;)for(var v,y=u(arguments[g++]),x=m?o(y).concat(m(y)):o(y),k=x.length,E=0;E<k;)_.call(y,v=x[E++])&&(p[v]=y[v]);return p}:h},function(t,i,n){var o=n(17),a=n(21),s=n(23)(!1),l=n(26)("IE_PROTO");t.exports=function(u,h){var f,d=a(u),p=0,c=[];for(f in d)f!=l&&o(d,f)&&c.push(f);for(;h.length>p;)o(d,f=h[p++])&&(~s(c,f)||c.push(f));return c}},function(t,i,n){var o=n(25),a=Math.max,s=Math.min;t.exports=function(l,u){return(l=o(l))<0?a(l+u,0):s(l,u)}},function(t,i){t.exports=!1},function(t,i){i.f=Object.getOwnPropertySymbols},function(t,i){i.f={}.propertyIsEnumerable},function(t,i,n){var o=n(48);t.exports=function(a,s){return new(o(a))(s)}},function(t,i,n){var o=n(2),a=n(33),s=n(34)("species");t.exports=function(l){var u;return a(l)&&(typeof(u=l.constructor)!="function"||u!==Array&&!a(u.prototype)||(u=void 0),o(u)&&(u=u[s])===null&&(u=void 0)),u===void 0?Array:u}},function(t,i,n){var o=n(0),a=n(32)(2);o(o.P+o.F*!n(13)([].filter,!0),"Array",{filter:function(s){return a(this,s,arguments[1])}})},function(t,i,n){var o=n(0);o(o.S,"Array",{isArray:n(33)})},function(t,i,n){i.__esModule=!0,i.default=void 0,n(14),n(36),n(30),n(31),n(35),n(55),n(58);var o=n(5),a=l(n(60)),s=l(n(61));function l(c){return c&&c.__esModule?c:{default:c}}function u(){return(u=Object.assign||function(c){for(var g=1;g<arguments.length;g++){var m=arguments[g];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(c[_]=m[_])}return c}).apply(this,arguments)}function h(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}var f={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function d(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var p=function(c){function g(_){var v;return(v=c.call(this,_)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:_.defaultValue?[_.defaultValue]:[],query:_.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(h(h(v))),v.handleKeyDown=v.handleKeyDown.bind(h(h(v))),v.handleUpArrow=v.handleUpArrow.bind(h(h(v))),v.handleDownArrow=v.handleDownArrow.bind(h(h(v))),v.handleEnter=v.handleEnter.bind(h(h(v))),v.handlePrintableKey=v.handlePrintableKey.bind(h(h(v))),v.handleListMouseLeave=v.handleListMouseLeave.bind(h(h(v))),v.handleOptionBlur=v.handleOptionBlur.bind(h(h(v))),v.handleOptionClick=v.handleOptionClick.bind(h(h(v))),v.handleOptionFocus=v.handleOptionFocus.bind(h(h(v))),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(h(h(v))),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(h(h(v))),v.handleInputBlur=v.handleInputBlur.bind(h(h(v))),v.handleInputChange=v.handleInputChange.bind(h(h(v))),v.handleInputFocus=v.handleInputFocus.bind(h(h(v))),v.pollInputElement=v.pollInputElement.bind(h(h(v))),v.getDirectInputChanges=v.getDirectInputChanges.bind(h(h(v))),v}(function(v,y){v.prototype=Object.create(y.prototype),(v.prototype.constructor=v).__proto__=y})(g,c);var m=g.prototype;return m.isQueryAnOption=function(_,v){var y=this;return v.map(function(x){return y.templateInputValue(x).toLowerCase()}).indexOf(_.toLowerCase())!==-1},m.componentDidMount=function(){this.pollInputElement()},m.componentWillUnmount=function(){clearTimeout(this.$pollInput)},m.pollInputElement=function(){var _=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){_.pollInputElement()},100)},m.getDirectInputChanges=function(){var _=this.elementReferences[-1];_&&_.value!==this.state.query&&this.handleInputChange({target:{value:_.value}})},m.componentDidUpdate=function(_,v){var y=this.state.focused,x=y===null,k=v.focused!==y;k&&!x&&this.elementReferences[y].focus();var E=y===-1,T=k&&v.focused===null;if(E&&T){var w=this.elementReferences[y];w.setSelectionRange(0,w.value.length)}},m.hasAutoselect=function(){return!d()&&this.props.autoselect},m.templateInputValue=function(_){var v=this.props.templates&&this.props.templates.inputValue;return v?v(_):_},m.templateSuggestion=function(_){var v=this.props.templates&&this.props.templates.suggestion;return v?v(_):_},m.handleComponentBlur=function(_){var v,y=this.state,x=y.options,k=y.query,E=y.selected;this.props.confirmOnBlur?(v=_.query||k,this.props.onConfirm(x[E])):v=k,this.setState({focused:null,menuOpen:_.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,x)})},m.handleListMouseLeave=function(_){this.setState({hovered:null})},m.handleOptionBlur=function(_,v){var y=this.state,x=y.focused,k=y.menuOpen,E=y.options,T=y.selected,w=_.relatedTarget===null,C=_.relatedTarget===this.elementReferences[-1],R=x!==v&&x!==-1;if(!R&&w||!(R||C)){var P=k&&d();this.handleComponentBlur({menuOpen:P,query:this.templateInputValue(E[T])})}},m.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,E=v.query,T=v.selected;if(y===-1){var w=x&&d(),C=d()?E:this.templateInputValue(k[T]);this.handleComponentBlur({menuOpen:w,query:C})}},m.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,E=y.showAllValues,T=this.hasAutoselect(),w=_.target.value,C=w.length===0,R=this.state.query.length!==w.length,P=w.length>=x;this.setState({query:w,ariaHint:C}),E||!C&&R&&P?k(w,function(M){var L=0<M.length;v.setState({menuOpen:L,options:M,selected:T&&L?0:-1,validChoiceMade:!1})}):!C&&P||this.setState({menuOpen:!1,options:[]})},m.handleInputClick=function(_){this.handleInputChange(_)},m.handleInputFocus=function(_){var v=this.state,y=v.query,x=v.validChoiceMade,k=v.options,E=this.props.minLength,T=!x&&y.length>=E&&0<k.length;T?this.setState(function(w){var C=w.menuOpen;return{focused:-1,menuOpen:T||C,selected:-1}}):this.setState({focused:-1})},m.handleOptionFocus=function(_){this.setState({focused:_,hovered:null,selected:_})},m.handleOptionMouseEnter=function(_,v){d()||this.setState({hovered:v})},m.handleOptionClick=function(_,v){var y=this.state.options[v],x=this.templateInputValue(y);this.props.onConfirm(y),this.setState({focused:-1,hovered:null,menuOpen:!1,query:x,selected:-1,validChoiceMade:!0}),this.forceUpdate()},m.handleOptionMouseDown=function(_){_.preventDefault()},m.handleUpArrow=function(_){_.preventDefault();var v=this.state,y=v.menuOpen,x=v.selected;x!==-1&&y&&this.handleOptionFocus(x-1)},m.handleDownArrow=function(_){var v=this;if(_.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)_.preventDefault(),this.props.source("",function(T){v.setState({menuOpen:!0,options:T,selected:0,focused:0,hovered:null})});else if(this.state.menuOpen===!0){var y=this.state,x=y.menuOpen,k=y.options,E=y.selected;E!==k.length-1&&x&&this.handleOptionFocus(E+1)}},m.handleSpace=function(_){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(_.preventDefault(),this.props.source("",function(y){v.setState({menuOpen:!0,options:y})})),this.state.focused!==-1&&(_.preventDefault(),this.handleOptionClick(_,this.state.focused))},m.handleEnter=function(_){this.state.menuOpen&&(_.preventDefault(),0<=this.state.selected&&this.handleOptionClick(_,this.state.selected))},m.handlePrintableKey=function(_){var v=this.elementReferences[-1];_.target===v||v.focus()},m.handleKeyDown=function(_){switch(f[_.keyCode]){case"up":this.handleUpArrow(_);break;case"down":this.handleDownArrow(_);break;case"space":this.handleSpace(_);break;case"enter":this.handleEnter(_);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(y){return 47<y&&y<58||y===32||y===8||64<y&&y<91||95<y&&y<112||185<y&&y<193||218<y&&y<223})(_.keyCode)&&this.handlePrintableKey(_)}},m.render=function(){var _,v=this,y=this.props,x=y.cssNamespace,k=y.displayMenu,E=y.id,T=y.minLength,w=y.name,C=y.placeholder,R=y.required,P=y.showAllValues,M=y.tNoResults,L=y.tStatusQueryTooShort,U=y.tStatusNoResults,B=y.tStatusSelectedOption,Y=y.tStatusResults,X=y.tAssistiveHint,et=y.dropdownArrow,A=this.state,q=A.focused,N=A.hovered,O=A.menuOpen,tt=A.options,b=A.query,z=A.selected,W=A.ariaHint,S=A.validChoiceMade,K=this.hasAutoselect(),V=q===-1,gt=tt.length===0,ut=b.length!==0,_t=b.length>=T,bt=this.props.showNoOptionsFound&&V&&gt&&ut&&_t,Pt=x+"__wrapper",It=x+"__input",Ut=q!==null?" "+It+"--focused":"",D=this.props.showAllValues?" "+It+"--show-all-values":" "+It+"--default",at=x+"__dropdown-arrow-down",ot=q!==-1&&q!==null,kt=x+"__menu",pt=kt+"--"+k,yt=kt+"--"+(O||bt?"visible":"hidden"),st=x+"__option",St=x+"__hint",Nt=this.templateInputValue(tt[z]),Gt=Nt&&Nt.toLowerCase().indexOf(b.toLowerCase())===0&&K?b+Nt.substr(b.length):"",wt=E+"__assistiveHint",ht=W?{"aria-describedby":wt}:null;return P&&typeof(_=et({className:at}))=="string"&&(_=(0,o.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,o.createElement)("div",{className:Pt,onKeyDown:this.handleKeyDown},(0,o.createElement)(a.default,{id:E,length:tt.length,queryLength:b.length,minQueryLength:T,selectedOption:this.templateInputValue(tt[z]),selectedOptionIndex:z,validChoiceMade:S,isInFocus:this.state.focused!==null,tQueryTooShort:L,tNoResults:U,tSelectedOption:B,tResults:Y}),Gt&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:St,readonly:!0,tabIndex:"-1",value:Gt})),(0,o.createElement)("input",u({"aria-expanded":O?"true":"false","aria-activedescendant":!!ot&&E+"__option--"+q,"aria-owns":E+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},ht,{autoComplete:"off",className:""+It+Ut+D,id:E,onClick:function(Ot){return v.handleInputClick(Ot)},onBlur:this.handleInputBlur},function(mt){return{onInput:mt}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:w,placeholder:C,ref:function(Ot){v.elementReferences[-1]=Ot},type:"text",role:"combobox",required:R,value:b})),_,(0,o.createElement)("ul",{className:kt+" "+pt+" "+yt,onMouseLeave:function(Ot){return v.handleListMouseLeave(Ot)},id:E+"__listbox",role:"listbox"},tt.map(function(Ot,mt){var Tt=(q===-1?z===mt:q===mt)&&N===null?" "+st+"--focused":"",jt=mt%2?" "+st+"--odd":"",Vt=d()?"<span id="+E+"__option-suffix--"+mt+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(mt+1)+" of "+tt.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":q===mt?"true":"false",className:""+st+Tt+jt,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ot)+Vt},id:E+"__option--"+mt,key:mt,onBlur:function(zt){return v.handleOptionBlur(zt,mt)},onClick:function(zt){return v.handleOptionClick(zt,mt)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(zt){return v.handleOptionMouseEnter(zt,mt)},ref:function(zt){v.elementReferences[mt]=zt},role:"option",tabIndex:"-1","aria-posinset":mt+1,"aria-setsize":tt.length})}),bt&&(0,o.createElement)("li",{className:st+" "+st+"--no-results"},M())),(0,o.createElement)("span",{id:wt,style:{display:"none"}},X()))},g}(o.Component);(i.default=p).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:s.default}},function(t,i,n){var o=n(9),a=n(53),s=n(28),l=n(26)("IE_PROTO"),u=function(){},h="prototype",f=function(){var d,p=n(15)("iframe"),c=s.length;for(p.style.display="none",n(54).appendChild(p),p.src="javascript:",(d=p.contentWindow.document).open(),d.write("<script>document.F=Object<\/script>"),d.close(),f=d.F;c--;)delete f[h][s[c]];return f()};t.exports=Object.create||function(d,p){var c;return d!==null?(u[h]=o(d),c=new u,u[h]=null,c[l]=d):c=f(),p===void 0?c:a(c,p)}},function(t,i,n){var o=n(8),a=n(9),s=n(20);t.exports=n(3)?Object.defineProperties:function(l,u){a(l);for(var h,f=s(u),d=f.length,p=0;p<d;)o.f(l,h=f[p++],u[h]);return l}},function(t,i,n){var o=n(1).document;t.exports=o&&o.documentElement},function(t,i,n){var o=n(0);o(o.P,"Function",{bind:n(56)})},function(t,i,n){var o=n(19),a=n(2),s=n(57),l=[].slice,u={};t.exports=Function.bind||function(h){var f=o(this),d=l.call(arguments,1),p=function(){var c=d.concat(l.call(arguments));return this instanceof p?function(g,m,_){if(!(m in u)){for(var v=[],y=0;y<m;y++)v[y]="a["+y+"]";u[m]=Function("F,a","return new F("+v.join(",")+")")}return u[m](g,_)}(f,c.length,c):s(f,c,h)};return a(f.prototype)&&(p.prototype=f.prototype),p}},function(t,i){t.exports=function(n,o,a){var s=a===void 0;switch(o.length){case 0:return s?n():n.call(a);case 1:return s?n(o[0]):n.call(a,o[0]);case 2:return s?n(o[0],o[1]):n.call(a,o[0],o[1]);case 3:return s?n(o[0],o[1],o[2]):n.call(a,o[0],o[1],o[2]);case 4:return s?n(o[0],o[1],o[2],o[3]):n.call(a,o[0],o[1],o[2],o[3])}return n.apply(a,o)}},function(t,i,n){n(59)("match",1,function(o,a,s){return[function(l){var u=o(this),h=l==null?void 0:l[a];return h!==void 0?h.call(l,u):new RegExp(l)[a](String(u))},s]})},function(t,i,n){var o=n(7),a=n(16),s=n(4),l=n(12),u=n(34);t.exports=function(h,f,d){var p=u(h),c=d(l,p,""[h]),g=c[0],m=c[1];s(function(){var _={};return _[p]=function(){return 7},""[h](_)!=7})&&(a(String.prototype,h,g),o(RegExp.prototype,p,f==2?function(_,v){return m.call(_,this,v)}:function(_){return m.call(_,this)}))}},function(t,i,n){i.__esModule=!0,i.default=void 0,n(36);var o=n(5),a=function(u,h,f){var d;return function(){var p=this,c=arguments,g=function(){d=null,f||u.apply(p,c)},m=f&&!d;clearTimeout(d),d=setTimeout(g,h),m&&u.apply(p,c)}},s=function(l){function u(){for(var f,d=arguments.length,p=new Array(d),c=0;c<d;c++)p[c]=arguments[c];return(f=l.call.apply(l,[this].concat(p))||this).state={bump:!1,debounced:!1},f}(function(d,p){d.prototype=Object.create(p.prototype),(d.prototype.constructor=d).__proto__=p})(u,l);var h=u.prototype;return h.componentWillMount=function(){var f=this;this.debounceStatusUpdate=a(function(){if(!f.state.debounced){var d=!f.props.isInFocus||f.props.validChoiceMade;f.setState(function(p){return{bump:!p.bump,debounced:!0,silenced:d}})}},1400)},h.componentWillReceiveProps=function(f){f.queryLength,this.setState({debounced:!1})},h.render=function(){var f=this.props,d=f.id,p=f.length,c=f.queryLength,g=f.minQueryLength,m=f.selectedOption,_=f.selectedOptionIndex,v=f.tQueryTooShort,y=f.tNoResults,x=f.tSelectedOption,k=f.tResults,E=this.state,T=E.bump,w=E.debounced,C=E.silenced,R=c<g,P=p===0,M=m?x(m,p,_):"",L=null;return L=R?v(g):P?y():k(p,M),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:d+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!C&&w&&T?L:""),(0,o.createElement)("div",{id:d+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},C||!w||T?"":L))},u}(o.Component);(i.default=s).defaultProps={tQueryTooShort:function(l){return"Type in "+l+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(l,u,h){return l+" "+(h+1)+" of "+u+" is highlighted"},tResults:function(l,u){return l+" "+(l===1?"result":"results")+" "+(l===1?"is":"are")+" available. "+u}}},function(t,i,n){i.__esModule=!0,i.default=void 0;var o=n(5),a=function(l){var u=l.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:u,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};i.default=a}]).default})})(pc);const Sw=Z0(pc.exports),Ow=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif)}:host .govuk-label--static{font-size:var(--autocomplete__label__font-size, 19px)}:host .autocomplete__input{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);height:var(--autocomplete__input__height, 35px);padding:var(--autocomplete__input__padding, 5px 34px 5px 5px);z-index:calc(var(--autocomplete__dropdown-arrow-down__z-index, 1) + 1)}:host .autocomplete__dropdown-arrow-down{z-index:var(--autocomplete__dropdown-arrow-down__z-index, 1);top:calc((var(--autocomplete__input__height, 35px) - 17px) / 2)}:host .autocomplete__option{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);padding:var(--autocomplete__option__padding, 5px);border-bottom:var(--autocomplete__option__border-bottom, solid 1px #b1b4b6)}:host .autocomplete__option--focused,:host .autocomplete__option:hover,.autocomplete__option--focused :host .autocomplete__option:hover{border-color:var(--autocomplete__option__hover-border-color, #1d70b8);background-color:var(--autocomplete__option__hover-background-color, #1d70b8)}:host .autocomplete__menu{max-height:var(--autocomplete__menu__max-height, 342px)}
72
- `;var cc=Object.freeze,gc=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,Oe=(r,e,t,i)=>{for(var n=i>1?void 0:i?Iw(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&gc(e,t,n),n},zw=(r,e)=>cc(gc(r,"raw",{value:cc(e||r.slice())})),mc;j.AddressAutocomplete=class extends nn{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(r,e)=>this.dispatchEvent(new CustomEvent(r,{detail:e}))}connectedCallback(){super.connectedCallback(),this._fetchData()}disconnectedCallback(){super.disconnectedCallback()}_getLightDropdownArrow(){return'<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>'}firstUpdated(){Sw({element:this.renderRoot.querySelector(`#${this.id}-container`),id:this.id,required:!0,source:this._options,defaultValue:this.initialAddress,showAllValues:!0,displayMenu:"overlay",dropdownArrow:this.arrowStyle==="light"?this._getLightDropdownArrow:void 0,tNoResults:()=>"No addresses found",onConfirm:r=>{this._selectedAddress=this._addressesInPostcode.filter(e=>e.LPI.ADDRESS.split(`, ${e.LPI.ADMINISTRATIVE_AREA}`)[0]===r)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(r=0,e=[]){const t={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},i=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(t)}`;await fetch(i+`&offset=${r}`).then(n=>n.json()).then(n=>{var a,s,l;(n.error||n.fault)&&(this._osError=((a=n.error)==null?void 0:a.message)||((s=n.fault)==null?void 0:s.faultstring)||"Something went wrong"),this._totalAddresses=(l=n.header)==null?void 0:l.totalresults;const o=e.concat(n.results||[]);if(this._addressesInPostcode=o,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),n.results){n.results.filter(h=>h.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(h=>{this._options.push(h.LPI.ADDRESS.split(`, ${h.LPI.ADMINISTRATIVE_AREA}`)[0])});const u=new Intl.Collator([],{numeric:!0});this._options.sort((h,f)=>u.compare(h,f))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(n=>console.log(n))}_getLabelClasses(){let r="govuk-label";return this.labelStyle==="static"&&(r+=" govuk-label--static"),r}_getErrorMessageContainer(r){const e=r?"govuk-warning-text":"",t=r?xi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
85
+ <div id="`,'" class="map" tabindex="0" />'])),this.id)}disconnectedCallback(){var i;super.disconnectedCallback(),(i=this.map)==null||i.dispose()}},q.MyMap.styles=Ss(XE),bt([J({type:String})],q.MyMap.prototype,"id",2),bt([J({type:Number})],q.MyMap.prototype,"latitude",2),bt([J({type:Number})],q.MyMap.prototype,"longitude",2),bt([J({type:String})],q.MyMap.prototype,"projection",2),bt([J({type:Number})],q.MyMap.prototype,"zoom",2),bt([J({type:Number})],q.MyMap.prototype,"minZoom",2),bt([J({type:Number})],q.MyMap.prototype,"maxZoom",2),bt([J({type:Boolean})],q.MyMap.prototype,"drawMode",2),bt([J({type:Object})],q.MyMap.prototype,"drawGeojsonData",2),bt([J({type:Number})],q.MyMap.prototype,"drawGeojsonDataBuffer",2),bt([J({type:String})],q.MyMap.prototype,"drawPointer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showFeaturesAtPoint",2),bt([J({type:Boolean})],q.MyMap.prototype,"clickFeatures",2),bt([J({type:String})],q.MyMap.prototype,"featureColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureFill",2),bt([J({type:Boolean})],q.MyMap.prototype,"featureBorderNone",2),bt([J({type:Number})],q.MyMap.prototype,"featureBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"showMarker",2),bt([J({type:Number})],q.MyMap.prototype,"markerLatitude",2),bt([J({type:Number})],q.MyMap.prototype,"markerLongitude",2),bt([J({type:String})],q.MyMap.prototype,"markerColor",2),bt([J({type:Object})],q.MyMap.prototype,"geojsonData",2),bt([J({type:String})],q.MyMap.prototype,"geojsonColor",2),bt([J({type:Boolean})],q.MyMap.prototype,"geojsonFill",2),bt([J({type:Number})],q.MyMap.prototype,"geojsonBuffer",2),bt([J({type:Boolean})],q.MyMap.prototype,"disableVectorTiles",2),bt([J({type:String})],q.MyMap.prototype,"osVectorTilesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osFeaturesApiKey",2),bt([J({type:String})],q.MyMap.prototype,"osCopyright",2),bt([J({type:Boolean})],q.MyMap.prototype,"hideResetControl",2),bt([J({type:Boolean})],q.MyMap.prototype,"staticMode",2),bt([J({type:String})],q.MyMap.prototype,"areaUnit",2),bt([J({type:Boolean})],q.MyMap.prototype,"showScale",2),bt([J({type:Boolean})],q.MyMap.prototype,"useScaleBarStyle",2),bt([J({type:String})],q.MyMap.prototype,"markerImage",2),q.MyMap=bt([vl("my-map")],q.MyMap);var hp={exports:{}};(function(i,t){(function(n,r){i.exports=r()})(window,function(){return function(e){var n={};function r(o){if(n[o])return n[o].exports;var s=n[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=e,r.c=n,r.d=function(o,s,a){r.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:a})},r.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},r.t=function(o,s){if(1&s&&(o=r(o)),8&s||4&s&&typeof o=="object"&&o&&o.__esModule)return o;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:o}),2&s&&typeof o!="string")for(var l in o)r.d(a,l,function(h){return o[h]}.bind(null,l));return a},r.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(s,"a",s),s},r.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},r.p="/",r(r.s=37)}([function(e,n,r){var o=r(1),s=r(6),a=r(7),l=r(16),h=r(18),u="prototype",d=function(c,f,g){var m,p,_,v,y=c&d.F,x=c&d.G,k=c&d.S,w=c&d.P,C=c&d.B,M=x?o:k?o[f]||(o[f]={}):(o[f]||{})[u],S=x?s:s[f]||(s[f]={}),R=S[u]||(S[u]={});for(m in x&&(g=f),g)_=((p=!y&&M&&M[m]!==void 0)?M:g)[m],v=C&&p?h(_,o):w&&typeof _=="function"?h(Function.call,_):_,M&&l(M,m,_,c&d.U),S[m]!=_&&a(S,m,v),w&&R[m]!=_&&(R[m]=_)};o.core=s,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,n){var r=e.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=r)},function(e,n){e.exports=function(r){return typeof r=="object"?r!==null:typeof r=="function"}},function(e,n,r){e.exports=!r(4)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(e,n){e.exports=function(r){try{return!!r()}catch{return!0}}},function(e,n,r){r.r(n),r.d(n,"h",function(){return h}),r.d(n,"createElement",function(){return h}),r.d(n,"cloneElement",function(){return c}),r.d(n,"Component",function(){return V}),r.d(n,"render",function(){return z}),r.d(n,"rerender",function(){return p}),r.d(n,"options",function(){return s});var o=function(){},s={},a=[],l=[];function h(b,T){var Y,E,H,$,vt=l;for($=arguments.length;2<$--;)a.push(arguments[$]);for(T&&T.children!=null&&(a.length||a.push(T.children),delete T.children);a.length;)if((E=a.pop())&&E.pop!==void 0)for($=E.length;$--;)a.push(E[$]);else typeof E=="boolean"&&(E=null),(H=typeof b!="function")&&(E==null?E="":typeof E=="number"?E=String(E):typeof E!="string"&&(H=!1)),H&&Y?vt[vt.length-1]+=E:vt===l?vt=[E]:vt.push(E),Y=H;var Ct=new o;return Ct.nodeName=b,Ct.children=vt,Ct.attributes=T==null?void 0:T,Ct.key=T==null?void 0:T.key,s.vnode!==void 0&&s.vnode(Ct),Ct}function u(b,T){for(var Y in T)b[Y]=T[Y];return b}var d=typeof Promise=="function"?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function c(b,T){return h(b.nodeName,u(u({},b.attributes),T),2<arguments.length?[].slice.call(arguments,2):b.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,g=[];function m(b){!b._dirty&&(b._dirty=!0)&&g.push(b)==1&&(s.debounceRendering||d)(p)}function p(){var b,T=g;for(g=[];b=T.pop();)b._dirty&&D(b)}function _(b,T){return b.normalizedNodeName===T||b.nodeName.toLowerCase()===T.toLowerCase()}function v(b){var T=u({},b.attributes);T.children=b.children;var Y=b.nodeName.defaultProps;if(Y!==void 0)for(var E in Y)T[E]===void 0&&(T[E]=Y[E]);return T}function y(b){var T=b.parentNode;T&&T.removeChild(b)}function x(b,T,Y,E,H){if(T==="className"&&(T="class"),T!=="key")if(T==="ref")Y&&Y(null),E&&E(b);else if(T!=="class"||H)if(T==="style"){if(E&&typeof E!="string"&&typeof Y!="string"||(b.style.cssText=E||""),E&&typeof E=="object"){if(typeof Y!="string")for(var $ in Y)$ in E||(b.style[$]="");for(var $ in E)b.style[$]=typeof E[$]=="number"&&f.test($)===!1?E[$]+"px":E[$]}}else if(T==="dangerouslySetInnerHTML")E&&(b.innerHTML=E.__html||"");else if(T[0]=="o"&&T[1]=="n"){var vt=T!==(T=T.replace(/Capture$/,""));T=T.toLowerCase().substring(2),E?Y||b.addEventListener(T,k,vt):b.removeEventListener(T,k,vt),(b._listeners||(b._listeners={}))[T]=E}else if(T!=="list"&&T!=="type"&&!H&&T in b){try{b[T]=E==null?"":E}catch{}E!=null&&E!==!1||T=="spellcheck"||b.removeAttribute(T)}else{var Ct=H&&T!==(T=T.replace(/^xlink:?/,""));E==null||E===!1?Ct?b.removeAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase()):b.removeAttribute(T):typeof E!="function"&&(Ct?b.setAttributeNS("http://www.w3.org/1999/xlink",T.toLowerCase(),E):b.setAttribute(T,E))}else b.className=E||""}function k(b){return this._listeners[b.type](s.event&&s.event(b)||b)}var w=[],C=0,M=!1,S=!1;function R(){for(var b;b=w.pop();)s.afterMount&&s.afterMount(b),b.componentDidMount&&b.componentDidMount()}function A(b,T,Y,E,H,$){C++||(M=H!=null&&H.ownerSVGElement!==void 0,S=b!=null&&!("__preactattr_"in b));var vt=G(b,T,Y,E,$);return H&&vt.parentNode!==H&&H.appendChild(vt),--C||(S=!1,$||R()),vt}function G(b,T,Y,E,H){var $=b,vt=M;if(T!=null&&typeof T!="boolean"||(T=""),typeof T=="string"||typeof T=="number")return b&&b.splitText!==void 0&&b.parentNode&&(!b._component||H)?b.nodeValue!=T&&(b.nodeValue=T):($=document.createTextNode(T),b&&(b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0))),$.__preactattr_=!0,$;var Ct=T.nodeName;if(typeof Ct=="function")return function(ut,pt,kt,yt){for(var st=ut&&ut._component,nt=st,wt=ut,zt=st&&ut._componentConstructor===pt.nodeName,Bt=zt,xt=v(pt);st&&!Bt&&(st=st._parentComponent);)Bt=st.constructor===pt.nodeName;return st&&Bt&&(!yt||st._component)?(W(st,xt,3,kt,yt),ut=st.base):(nt&&!zt&&(Z(nt),ut=wt=null),st=U(pt.nodeName,xt,kt),ut&&!st.nextBase&&(st.nextBase=ut,wt=null),W(st,xt,1,kt,yt),ut=st.base,wt&&ut!==wt&&(wt._component=null,P(wt,!1))),ut}(b,T,Y,E);if(M=Ct==="svg"||Ct!=="foreignObject"&&M,Ct=String(Ct),(!b||!_(b,Ct))&&($=function(ut,pt){var kt=pt?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut);return kt.normalizedNodeName=ut,kt}(Ct,M),b)){for(;b.firstChild;)$.appendChild(b.firstChild);b.parentNode&&b.parentNode.replaceChild($,b),P(b,!0)}var _t=$.firstChild,Et=$.__preactattr_,Lt=T.children;if(Et==null){Et=$.__preactattr_={};for(var Dt=$.attributes,jt=Dt.length;jt--;)Et[Dt[jt].name]=Dt[jt].value}return!S&&Lt&&Lt.length===1&&typeof Lt[0]=="string"&&_t!=null&&_t.splitText!==void 0&&_t.nextSibling==null?_t.nodeValue!=Lt[0]&&(_t.nodeValue=Lt[0]):(Lt&&Lt.length||_t!=null)&&function(ut,pt,kt,yt,st){var nt,wt,zt,Bt,xt,dt=ut.childNodes,Ft=[],St={},ct=0,ue=0,Ve=dt.length,$t=0,ze=pt?pt.length:0;if(Ve!==0)for(var Ut=0;Ut<Ve;Ut++){var Ht=dt[Ut],Tn=Ht.__preactattr_,ae=ze&&Tn?Ht._component?Ht._component.__key:Tn.key:null;ae!=null?(ct++,St[ae]=Ht):(Tn||(Ht.splitText!==void 0?!st||Ht.nodeValue.trim():st))&&(Ft[$t++]=Ht)}if(ze!==0)for(var Ut=0;Ut<ze;Ut++){Bt=pt[Ut],xt=null;var ae=Bt.key;if(ae!=null)ct&&St[ae]!==void 0&&(xt=St[ae],St[ae]=void 0,ct--);else if(ue<$t){for(nt=ue;nt<$t;nt++)if(Ft[nt]!==void 0&&(qe=wt=Ft[nt],Oe=st,typeof(ve=Bt)=="string"||typeof ve=="number"?qe.splitText!==void 0:typeof ve.nodeName=="string"?!qe._componentConstructor&&_(qe,ve.nodeName):Oe||qe._componentConstructor===ve.nodeName)){xt=wt,Ft[nt]=void 0,nt===$t-1&&$t--,nt===ue&&ue++;break}}xt=G(xt,Bt,kt,yt),zt=dt[Ut],xt&&xt!==ut&&xt!==zt&&(zt==null?ut.appendChild(xt):xt===zt.nextSibling?y(zt):ut.insertBefore(xt,zt))}var qe,ve,Oe;if(ct)for(var Ut in St)St[Ut]!==void 0&&P(St[Ut],!1);for(;ue<=$t;)(xt=Ft[$t--])!==void 0&&P(xt,!1)}($,Lt,Y,E,S||Et.dangerouslySetInnerHTML!=null),function(ut,pt,kt){var yt;for(yt in kt)pt&&pt[yt]!=null||kt[yt]==null||x(ut,yt,kt[yt],kt[yt]=void 0,M);for(yt in pt)yt==="children"||yt==="innerHTML"||yt in kt&&pt[yt]===(yt==="value"||yt==="checked"?ut[yt]:kt[yt])||x(ut,yt,kt[yt],kt[yt]=pt[yt],M)}($,T.attributes,Et),M=vt,$}function P(b,T){var Y=b._component;Y?Z(Y):(b.__preactattr_!=null&&b.__preactattr_.ref&&b.__preactattr_.ref(null),T!==!1&&b.__preactattr_!=null||y(b),at(b))}function at(b){for(b=b.lastChild;b;){var T=b.previousSibling;P(b,!0),b=T}}var j=[];function U(b,T,Y){var E,H=j.length;for(b.prototype&&b.prototype.render?(E=new b(T,Y),V.call(E,T,Y)):((E=new V(T,Y)).constructor=b,E.render=O);H--;)if(j[H].constructor===b)return E.nextBase=j[H].nextBase,j.splice(H,1),E;return E}function O(b,T,Y){return this.constructor(b,Y)}function W(b,T,Y,E,H){b._disable||(b._disable=!0,b.__ref=T.ref,b.__key=T.key,delete T.ref,delete T.key,typeof b.constructor.getDerivedStateFromProps>"u"&&(!b.base||H?b.componentWillMount&&b.componentWillMount():b.componentWillReceiveProps&&b.componentWillReceiveProps(T,E)),E&&E!==b.context&&(b.prevContext||(b.prevContext=b.context),b.context=E),b.prevProps||(b.prevProps=b.props),b.props=T,b._disable=!1,Y!==0&&(Y!==1&&s.syncComponentUpdates===!1&&b.base?m(b):D(b,1,H)),b.__ref&&b.__ref(b))}function D(b,T,Y,E){if(!b._disable){var H,$,vt,Ct=b.props,_t=b.state,Et=b.context,Lt=b.prevProps||Ct,Dt=b.prevState||_t,jt=b.prevContext||Et,F=b.base,ut=b.nextBase,pt=F||ut,kt=b._component,yt=!1,st=jt;if(b.constructor.getDerivedStateFromProps&&(_t=u(u({},_t),b.constructor.getDerivedStateFromProps(Ct,_t)),b.state=_t),F&&(b.props=Lt,b.state=Dt,b.context=jt,T!==2&&b.shouldComponentUpdate&&b.shouldComponentUpdate(Ct,_t,Et)===!1?yt=!0:b.componentWillUpdate&&b.componentWillUpdate(Ct,_t,Et),b.props=Ct,b.state=_t,b.context=Et),b.prevProps=b.prevState=b.prevContext=b.nextBase=null,b._dirty=!1,!yt){H=b.render(Ct,_t,Et),b.getChildContext&&(Et=u(u({},Et),b.getChildContext())),F&&b.getSnapshotBeforeUpdate&&(st=b.getSnapshotBeforeUpdate(Lt,Dt));var nt,wt,zt=H&&H.nodeName;if(typeof zt=="function"){var Bt=v(H);($=kt)&&$.constructor===zt&&Bt.key==$.__key?W($,Bt,1,Et,!1):(nt=$,b._component=$=U(zt,Bt,Et),$.nextBase=$.nextBase||ut,$._parentComponent=b,W($,Bt,0,Et,!1),D($,1,Y,!0)),wt=$.base}else vt=pt,(nt=kt)&&(vt=b._component=null),(pt||T===1)&&(vt&&(vt._component=null),wt=function(ct,ue,Ve,$t,ze,Ut){C++||(M=ze!=null&&ze.ownerSVGElement!==void 0,S=ct!=null&&!("__preactattr_"in ct));var Ht=G(ct,ue,Ve,$t,Ut);return ze&&Ht.parentNode!==ze&&ze.appendChild(Ht),--C||(S=!1,Ut||R()),Ht}(vt,H,Et,Y||!F,pt&&pt.parentNode,!0));if(pt&&wt!==pt&&$!==kt){var xt=pt.parentNode;xt&&wt!==xt&&(xt.replaceChild(wt,pt),nt||(pt._component=null,P(pt,!1)))}if(nt&&Z(nt),(b.base=wt)&&!E){for(var dt=b,Ft=b;Ft=Ft._parentComponent;)(dt=Ft).base=wt;wt._component=dt,wt._componentConstructor=dt.constructor}}for(!F||Y?w.unshift(b):yt||(b.componentDidUpdate&&b.componentDidUpdate(Lt,Dt,st),s.afterUpdate&&s.afterUpdate(b));b._renderCallbacks.length;)b._renderCallbacks.pop().call(b);C||E||R()}}function Z(b){s.beforeUnmount&&s.beforeUnmount(b);var T=b.base;b._disable=!0,b.componentWillUnmount&&b.componentWillUnmount(),b.base=null;var Y=b._component;Y?Z(Y):T&&(T.__preactattr_&&T.__preactattr_.ref&&T.__preactattr_.ref(null),y(b.nextBase=T),j.push(b),at(T)),b.__ref&&b.__ref(null)}function V(b,T){this._dirty=!0,this.context=T,this.props=b,this.state=this.state||{},this._renderCallbacks=[]}function z(b,T,Y){return A(Y,b,{},!1,T,!1)}u(V.prototype,{setState:function(b,T){this.prevState||(this.prevState=this.state),this.state=u(u({},this.state),typeof b=="function"?b(this.state,this.props):b),T&&this._renderCallbacks.push(T),m(this)},forceUpdate:function(b){b&&this._renderCallbacks.push(b),D(this,2)},render:function(){}});var ot={h,createElement:h,cloneElement:c,Component:V,render:z,rerender:p,options:s};n.default=ot},function(e,n){var r=e.exports={version:"2.5.7"};typeof __e=="number"&&(__e=r)},function(e,n,r){var o=r(8),s=r(40);e.exports=r(3)?function(a,l,h){return o.f(a,l,s(1,h))}:function(a,l,h){return a[l]=h,a}},function(e,n,r){var o=r(9),s=r(38),a=r(39),l=Object.defineProperty;n.f=r(3)?Object.defineProperty:function(h,u,d){if(o(h),u=a(u,!0),o(d),s)try{return l(h,u,d)}catch{}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[u]=d.value),h}},function(e,n,r){var o=r(2);e.exports=function(s){if(!o(s))throw TypeError(s+" is not an object!");return s}},function(e,n){var r=0,o=Math.random();e.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++r+o).toString(36))}},function(e,n,r){var o=r(22);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(s){return o(s)=="String"?s.split(""):Object(s)}},function(e,n){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},function(e,n,r){var o=r(4);e.exports=function(s,a){return!!s&&o(function(){a?s.call(null,function(){},1):s.call(null)})}},function(e,n,r){var o=r(0);o(o.S+o.F,"Object",{assign:r(41)})},function(e,n,r){var o=r(2),s=r(1).document,a=o(s)&&o(s.createElement);e.exports=function(l){return a?s.createElement(l):{}}},function(e,n,r){var o=r(1),s=r(7),a=r(17),l=r(10)("src"),h="toString",u=Function[h],d=(""+u).split(h);r(6).inspectSource=function(c){return u.call(c)},(e.exports=function(c,f,g,m){var p=typeof g=="function";p&&(a(g,"name")||s(g,"name",f)),c[f]!==g&&(p&&(a(g,l)||s(g,l,c[f]?""+c[f]:d.join(String(f)))),c===o?c[f]=g:m?c[f]?c[f]=g:s(c,f,g):(delete c[f],s(c,f,g)))})(Function.prototype,h,function(){return typeof this=="function"&&this[l]||u.call(this)})},function(e,n){var r={}.hasOwnProperty;e.exports=function(o,s){return r.call(o,s)}},function(e,n,r){var o=r(19);e.exports=function(s,a,l){if(o(s),a===void 0)return s;switch(l){case 1:return function(h){return s.call(a,h)};case 2:return function(h,u){return s.call(a,h,u)};case 3:return function(h,u,d){return s.call(a,h,u,d)}}return function(){return s.apply(a,arguments)}}},function(e,n){e.exports=function(r){if(typeof r!="function")throw TypeError(r+" is not a function!");return r}},function(e,n,r){var o=r(42),s=r(28);e.exports=Object.keys||function(a){return o(a,s)}},function(e,n,r){var o=r(11),s=r(12);e.exports=function(a){return o(s(a))}},function(e,n){var r={}.toString;e.exports=function(o){return r.call(o).slice(8,-1)}},function(e,n,r){var o=r(21),s=r(24),a=r(43);e.exports=function(l){return function(h,u,d){var c,f=o(h),g=s(f.length),m=a(d,g);if(l&&u!=u){for(;m<g;)if((c=f[m++])!=c)return!0}else for(;m<g;m++)if((l||m in f)&&f[m]===u)return l||m||0;return!l&&-1}}},function(e,n,r){var o=r(25),s=Math.min;e.exports=function(a){return 0<a?s(o(a),9007199254740991):0}},function(e,n){var r=Math.ceil,o=Math.floor;e.exports=function(s){return isNaN(s=+s)?0:(0<s?o:r)(s)}},function(e,n,r){var o=r(27)("keys"),s=r(10);e.exports=function(a){return o[a]||(o[a]=s(a))}},function(e,n,r){var o=r(6),s=r(1),a="__core-js_shared__",l=s[a]||(s[a]={});(e.exports=function(h,u){return l[h]||(l[h]=u!==void 0?u:{})})("versions",[]).push({version:o.version,mode:r(44)?"pure":"global",copyright:"\xA9 2018 Denis Pushkarev (zloirock.ru)"})},function(e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,n,r){var o=r(12);e.exports=function(s){return Object(o(s))}},function(e,n,r){var o=r(8).f,s=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in s||r(3)&&o(s,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch{return""}}})},function(e,n,r){var o=r(0),s=r(32)(1);o(o.P+o.F*!r(13)([].map,!0),"Array",{map:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(18),s=r(11),a=r(29),l=r(24),h=r(47);e.exports=function(u,d){var c=u==1,f=u==2,g=u==3,m=u==4,p=u==6,_=u==5||p,v=d||h;return function(y,x,k){for(var w,C,M=a(y),S=s(M),R=o(x,k,3),A=l(S.length),G=0,P=c?v(y,A):f?v(y,0):void 0;G<A;G++)if((_||G in S)&&(C=R(w=S[G],G,M),u)){if(c)P[G]=C;else if(C)switch(u){case 3:return!0;case 5:return w;case 6:return G;case 2:P.push(w)}else if(m)return!1}return p?-1:g||m?m:P}}},function(e,n,r){var o=r(22);e.exports=Array.isArray||function(s){return o(s)=="Array"}},function(e,n,r){var o=r(27)("wks"),s=r(10),a=r(1).Symbol,l=typeof a=="function";(e.exports=function(h){return o[h]||(o[h]=l&&a[h]||(l?a:s)("Symbol."+h))}).store=o},function(e,n,r){var o=r(0),s=r(23)(!1),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(l||!r(13)(a)),"Array",{indexOf:function(h){return l?a.apply(this,arguments)||0:s(this,h,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Object",{create:r(52)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(30),r(31),r(35),r(49),r(50);var o=r(5),s=function(d){return d&&d.__esModule?d:{default:d}}(r(51));function a(u){if(!u.element)throw new Error("element is not defined");if(!u.id)throw new Error("id is not defined");if(!u.source)throw new Error("source is not defined");Array.isArray(u.source)&&(u.source=l(u.source)),(0,o.render)((0,o.createElement)(s.default,u),u.element)}var l=function(d){return function(c,f){f(d.filter(function(g){return g.toLowerCase().indexOf(c.toLowerCase())!==-1}))}};a.enhanceSelectElement=function(u){if(!u.selectElement)throw new Error("selectElement is not defined");if(!u.source){var d=[].filter.call(u.selectElement.options,function(g){return g.value||u.preserveNullOptions});u.source=d.map(function(g){return g.textContent||g.innerText})}if(u.onConfirm=u.onConfirm||function(g){var m=[].filter.call(u.selectElement.options,function(p){return(p.textContent||p.innerText)===g})[0];m&&(m.selected=!0)},u.selectElement.value||u.defaultValue===void 0){var c=u.selectElement.options[u.selectElement.options.selectedIndex];u.defaultValue=c.textContent||c.innerText}u.name===void 0&&(u.name=""),u.id===void 0&&(u.selectElement.id===void 0?u.id="":u.id=u.selectElement.id),u.autoselect===void 0&&(u.autoselect=!0);var f=document.createElement("div");u.selectElement.parentNode.insertBefore(f,u.selectElement),a(Object.assign({},u,{element:f})),u.selectElement.style.display="none",u.selectElement.id=u.selectElement.id+"-select"};var h=a;n.default=h},function(e,n,r){e.exports=!r(3)&&!r(4)(function(){return Object.defineProperty(r(15)("div"),"a",{get:function(){return 7}}).a!=7})},function(e,n,r){var o=r(2);e.exports=function(s,a){if(!o(s))return s;var l,h;if(a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s))||typeof(l=s.valueOf)=="function"&&!o(h=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!o(h=l.call(s)))return h;throw TypeError("Can't convert object to primitive value")}},function(e,n){e.exports=function(r,o){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:o}}},function(e,n,r){var o=r(20),s=r(45),a=r(46),l=r(29),h=r(11),u=Object.assign;e.exports=!u||r(4)(function(){var d={},c={},f=Symbol(),g="abcdefghijklmnopqrst";return d[f]=7,g.split("").forEach(function(m){c[m]=m}),u({},d)[f]!=7||Object.keys(u({},c)).join("")!=g})?function(d,c){for(var f=l(d),g=arguments.length,m=1,p=s.f,_=a.f;m<g;)for(var v,y=h(arguments[m++]),x=p?o(y).concat(p(y)):o(y),k=x.length,w=0;w<k;)_.call(y,v=x[w++])&&(f[v]=y[v]);return f}:u},function(e,n,r){var o=r(17),s=r(21),a=r(23)(!1),l=r(26)("IE_PROTO");e.exports=function(h,u){var d,c=s(h),f=0,g=[];for(d in c)d!=l&&o(c,d)&&g.push(d);for(;u.length>f;)o(c,d=u[f++])&&(~a(g,d)||g.push(d));return g}},function(e,n,r){var o=r(25),s=Math.max,a=Math.min;e.exports=function(l,h){return(l=o(l))<0?s(l+h,0):a(l,h)}},function(e,n){e.exports=!1},function(e,n){n.f=Object.getOwnPropertySymbols},function(e,n){n.f={}.propertyIsEnumerable},function(e,n,r){var o=r(48);e.exports=function(s,a){return new(o(s))(a)}},function(e,n,r){var o=r(2),s=r(33),a=r(34)("species");e.exports=function(l){var h;return s(l)&&(typeof(h=l.constructor)!="function"||h!==Array&&!s(h.prototype)||(h=void 0),o(h)&&(h=h[a])===null&&(h=void 0)),h===void 0?Array:h}},function(e,n,r){var o=r(0),s=r(32)(2);o(o.P+o.F*!r(13)([].filter,!0),"Array",{filter:function(a){return s(this,a,arguments[1])}})},function(e,n,r){var o=r(0);o(o.S,"Array",{isArray:r(33)})},function(e,n,r){n.__esModule=!0,n.default=void 0,r(14),r(36),r(30),r(31),r(35),r(55),r(58);var o=r(5),s=l(r(60)),a=l(r(61));function l(g){return g&&g.__esModule?g:{default:g}}function h(){return(h=Object.assign||function(g){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(g[_]=p[_])}return g}).apply(this,arguments)}function u(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}var d={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function c(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(g){function m(_){var v;return(v=g.call(this,_)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:_.defaultValue?[_.defaultValue]:[],query:_.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(u(u(v))),v.handleKeyDown=v.handleKeyDown.bind(u(u(v))),v.handleUpArrow=v.handleUpArrow.bind(u(u(v))),v.handleDownArrow=v.handleDownArrow.bind(u(u(v))),v.handleEnter=v.handleEnter.bind(u(u(v))),v.handlePrintableKey=v.handlePrintableKey.bind(u(u(v))),v.handleListMouseLeave=v.handleListMouseLeave.bind(u(u(v))),v.handleOptionBlur=v.handleOptionBlur.bind(u(u(v))),v.handleOptionClick=v.handleOptionClick.bind(u(u(v))),v.handleOptionFocus=v.handleOptionFocus.bind(u(u(v))),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(u(u(v))),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(u(u(v))),v.handleInputBlur=v.handleInputBlur.bind(u(u(v))),v.handleInputChange=v.handleInputChange.bind(u(u(v))),v.handleInputFocus=v.handleInputFocus.bind(u(u(v))),v.pollInputElement=v.pollInputElement.bind(u(u(v))),v.getDirectInputChanges=v.getDirectInputChanges.bind(u(u(v))),v}(function(v,y){v.prototype=Object.create(y.prototype),(v.prototype.constructor=v).__proto__=y})(m,g);var p=m.prototype;return p.isQueryAnOption=function(_,v){var y=this;return v.map(function(x){return y.templateInputValue(x).toLowerCase()}).indexOf(_.toLowerCase())!==-1},p.componentDidMount=function(){this.pollInputElement()},p.componentWillUnmount=function(){clearTimeout(this.$pollInput)},p.pollInputElement=function(){var _=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){_.pollInputElement()},100)},p.getDirectInputChanges=function(){var _=this.elementReferences[-1];_&&_.value!==this.state.query&&this.handleInputChange({target:{value:_.value}})},p.componentDidUpdate=function(_,v){var y=this.state.focused,x=y===null,k=v.focused!==y;k&&!x&&this.elementReferences[y].focus();var w=y===-1,C=k&&v.focused===null;if(w&&C){var M=this.elementReferences[y];M.setSelectionRange(0,M.value.length)}},p.hasAutoselect=function(){return!c()&&this.props.autoselect},p.templateInputValue=function(_){var v=this.props.templates&&this.props.templates.inputValue;return v?v(_):_},p.templateSuggestion=function(_){var v=this.props.templates&&this.props.templates.suggestion;return v?v(_):_},p.handleComponentBlur=function(_){var v,y=this.state,x=y.options,k=y.query,w=y.selected;this.props.confirmOnBlur?(v=_.query||k,this.props.onConfirm(x[w])):v=k,this.setState({focused:null,menuOpen:_.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,x)})},p.handleListMouseLeave=function(_){this.setState({hovered:null})},p.handleOptionBlur=function(_,v){var y=this.state,x=y.focused,k=y.menuOpen,w=y.options,C=y.selected,M=_.relatedTarget===null,S=_.relatedTarget===this.elementReferences[-1],R=x!==v&&x!==-1;if(!R&&M||!(R||S)){var A=k&&c();this.handleComponentBlur({menuOpen:A,query:this.templateInputValue(w[C])})}},p.handleInputBlur=function(_){var v=this.state,y=v.focused,x=v.menuOpen,k=v.options,w=v.query,C=v.selected;if(y===-1){var M=x&&c(),S=c()?w:this.templateInputValue(k[C]);this.handleComponentBlur({menuOpen:M,query:S})}},p.handleInputChange=function(_){var v=this,y=this.props,x=y.minLength,k=y.source,w=y.showAllValues,C=this.hasAutoselect(),M=_.target.value,S=M.length===0,R=this.state.query.length!==M.length,A=M.length>=x;this.setState({query:M,ariaHint:S}),w||!S&&R&&A?k(M,function(G){var P=0<G.length;v.setState({menuOpen:P,options:G,selected:C&&P?0:-1,validChoiceMade:!1})}):!S&&A||this.setState({menuOpen:!1,options:[]})},p.handleInputClick=function(_){this.handleInputChange(_)},p.handleInputFocus=function(_){var v=this.state,y=v.query,x=v.validChoiceMade,k=v.options,w=this.props.minLength,C=!x&&y.length>=w&&0<k.length;C?this.setState(function(M){var S=M.menuOpen;return{focused:-1,menuOpen:C||S,selected:-1}}):this.setState({focused:-1})},p.handleOptionFocus=function(_){this.setState({focused:_,hovered:null,selected:_})},p.handleOptionMouseEnter=function(_,v){c()||this.setState({hovered:v})},p.handleOptionClick=function(_,v){var y=this.state.options[v],x=this.templateInputValue(y);this.props.onConfirm(y),this.setState({focused:-1,hovered:null,menuOpen:!1,query:x,selected:-1,validChoiceMade:!0}),this.forceUpdate()},p.handleOptionMouseDown=function(_){_.preventDefault()},p.handleUpArrow=function(_){_.preventDefault();var v=this.state,y=v.menuOpen,x=v.selected;x!==-1&&y&&this.handleOptionFocus(x-1)},p.handleDownArrow=function(_){var v=this;if(_.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)_.preventDefault(),this.props.source("",function(C){v.setState({menuOpen:!0,options:C,selected:0,focused:0,hovered:null})});else if(this.state.menuOpen===!0){var y=this.state,x=y.menuOpen,k=y.options,w=y.selected;w!==k.length-1&&x&&this.handleOptionFocus(w+1)}},p.handleSpace=function(_){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(_.preventDefault(),this.props.source("",function(y){v.setState({menuOpen:!0,options:y})})),this.state.focused!==-1&&(_.preventDefault(),this.handleOptionClick(_,this.state.focused))},p.handleEnter=function(_){this.state.menuOpen&&(_.preventDefault(),0<=this.state.selected&&this.handleOptionClick(_,this.state.selected))},p.handlePrintableKey=function(_){var v=this.elementReferences[-1];_.target===v||v.focus()},p.handleKeyDown=function(_){switch(d[_.keyCode]){case"up":this.handleUpArrow(_);break;case"down":this.handleDownArrow(_);break;case"space":this.handleSpace(_);break;case"enter":this.handleEnter(_);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(y){return 47<y&&y<58||y===32||y===8||64<y&&y<91||95<y&&y<112||185<y&&y<193||218<y&&y<223})(_.keyCode)&&this.handlePrintableKey(_)}},p.render=function(){var _,v=this,y=this.props,x=y.cssNamespace,k=y.displayMenu,w=y.id,C=y.minLength,M=y.name,S=y.placeholder,R=y.required,A=y.showAllValues,G=y.tNoResults,P=y.tStatusQueryTooShort,at=y.tStatusNoResults,j=y.tStatusSelectedOption,U=y.tStatusResults,O=y.tAssistiveHint,W=y.dropdownArrow,D=this.state,Z=D.focused,V=D.hovered,z=D.menuOpen,ot=D.options,b=D.query,T=D.selected,Y=D.ariaHint,E=D.validChoiceMade,H=this.hasAutoselect(),$=Z===-1,vt=ot.length===0,Ct=b.length!==0,_t=b.length>=C,Et=this.props.showNoOptionsFound&&$&&vt&&Ct&&_t,Lt=x+"__wrapper",Dt=x+"__input",jt=Z!==null?" "+Dt+"--focused":"",F=this.props.showAllValues?" "+Dt+"--show-all-values":" "+Dt+"--default",ut=x+"__dropdown-arrow-down",pt=Z!==-1&&Z!==null,kt=x+"__menu",yt=kt+"--"+k,st=kt+"--"+(z||Et?"visible":"hidden"),nt=x+"__option",wt=x+"__hint",zt=this.templateInputValue(ot[T]),Bt=zt&&zt.toLowerCase().indexOf(b.toLowerCase())===0&&H?b+zt.substr(b.length):"",xt=w+"__assistiveHint",dt=Y?{"aria-describedby":xt}:null;return A&&typeof(_=W({className:ut}))=="string"&&(_=(0,o.createElement)("div",{className:x+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:_}})),(0,o.createElement)("div",{className:Lt,onKeyDown:this.handleKeyDown},(0,o.createElement)(s.default,{id:w,length:ot.length,queryLength:b.length,minQueryLength:C,selectedOption:this.templateInputValue(ot[T]),selectedOptionIndex:T,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:P,tNoResults:at,tSelectedOption:j,tResults:U}),Bt&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:wt,readonly:!0,tabIndex:"-1",value:Bt})),(0,o.createElement)("input",h({"aria-expanded":z?"true":"false","aria-activedescendant":!!pt&&w+"__option--"+Z,"aria-owns":w+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},dt,{autoComplete:"off",className:""+Dt+jt+F,id:w,onClick:function(Ft){return v.handleInputClick(Ft)},onBlur:this.handleInputBlur},function(St){return{onInput:St}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:M,placeholder:S,ref:function(Ft){v.elementReferences[-1]=Ft},type:"text",role:"combobox",required:R,value:b})),_,(0,o.createElement)("ul",{className:kt+" "+yt+" "+st,onMouseLeave:function(Ft){return v.handleListMouseLeave(Ft)},id:w+"__listbox",role:"listbox"},ot.map(function(Ft,St){var ct=(Z===-1?T===St:Z===St)&&V===null?" "+nt+"--focused":"",ue=St%2?" "+nt+"--odd":"",Ve=c()?"<span id="+w+"__option-suffix--"+St+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(St+1)+" of "+ot.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Z===St?"true":"false",className:""+nt+ct+ue,dangerouslySetInnerHTML:{__html:v.templateSuggestion(Ft)+Ve},id:w+"__option--"+St,key:St,onBlur:function($t){return v.handleOptionBlur($t,St)},onClick:function($t){return v.handleOptionClick($t,St)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function($t){return v.handleOptionMouseEnter($t,St)},ref:function($t){v.elementReferences[St]=$t},role:"option",tabIndex:"-1","aria-posinset":St+1,"aria-setsize":ot.length})}),Et&&(0,o.createElement)("li",{className:nt+" "+nt+"--no-results"},G())),(0,o.createElement)("span",{id:xt,style:{display:"none"}},O()))},m}(o.Component);(n.default=f).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:a.default}},function(e,n,r){var o=r(9),s=r(53),a=r(28),l=r(26)("IE_PROTO"),h=function(){},u="prototype",d=function(){var c,f=r(15)("iframe"),g=a.length;for(f.style.display="none",r(54).appendChild(f),f.src="javascript:",(c=f.contentWindow.document).open(),c.write("<script>document.F=Object<\/script>"),c.close(),d=c.F;g--;)delete d[u][a[g]];return d()};e.exports=Object.create||function(c,f){var g;return c!==null?(h[u]=o(c),g=new h,h[u]=null,g[l]=c):g=d(),f===void 0?g:s(g,f)}},function(e,n,r){var o=r(8),s=r(9),a=r(20);e.exports=r(3)?Object.defineProperties:function(l,h){s(l);for(var u,d=a(h),c=d.length,f=0;f<c;)o.f(l,u=d[f++],h[u]);return l}},function(e,n,r){var o=r(1).document;e.exports=o&&o.documentElement},function(e,n,r){var o=r(0);o(o.P,"Function",{bind:r(56)})},function(e,n,r){var o=r(19),s=r(2),a=r(57),l=[].slice,h={};e.exports=Function.bind||function(u){var d=o(this),c=l.call(arguments,1),f=function(){var g=c.concat(l.call(arguments));return this instanceof f?function(m,p,_){if(!(p in h)){for(var v=[],y=0;y<p;y++)v[y]="a["+y+"]";h[p]=Function("F,a","return new F("+v.join(",")+")")}return h[p](m,_)}(d,g.length,g):a(d,g,u)};return s(d.prototype)&&(f.prototype=d.prototype),f}},function(e,n){e.exports=function(r,o,s){var a=s===void 0;switch(o.length){case 0:return a?r():r.call(s);case 1:return a?r(o[0]):r.call(s,o[0]);case 2:return a?r(o[0],o[1]):r.call(s,o[0],o[1]);case 3:return a?r(o[0],o[1],o[2]):r.call(s,o[0],o[1],o[2]);case 4:return a?r(o[0],o[1],o[2],o[3]):r.call(s,o[0],o[1],o[2],o[3])}return r.apply(s,o)}},function(e,n,r){r(59)("match",1,function(o,s,a){return[function(l){var h=o(this),u=l==null?void 0:l[s];return u!==void 0?u.call(l,h):new RegExp(l)[s](String(h))},a]})},function(e,n,r){var o=r(7),s=r(16),a=r(4),l=r(12),h=r(34);e.exports=function(u,d,c){var f=h(u),g=c(l,f,""[u]),m=g[0],p=g[1];a(function(){var _={};return _[f]=function(){return 7},""[u](_)!=7})&&(s(String.prototype,u,m),o(RegExp.prototype,f,d==2?function(_,v){return p.call(_,this,v)}:function(_){return p.call(_,this)}))}},function(e,n,r){n.__esModule=!0,n.default=void 0,r(36);var o=r(5),s=function(h,u,d){var c;return function(){var f=this,g=arguments,m=function(){c=null,d||h.apply(f,g)},p=d&&!c;clearTimeout(c),c=setTimeout(m,u),p&&h.apply(f,g)}},a=function(l){function h(){for(var d,c=arguments.length,f=new Array(c),g=0;g<c;g++)f[g]=arguments[g];return(d=l.call.apply(l,[this].concat(f))||this).state={bump:!1,debounced:!1},d}(function(c,f){c.prototype=Object.create(f.prototype),(c.prototype.constructor=c).__proto__=f})(h,l);var u=h.prototype;return u.componentWillMount=function(){var d=this;this.debounceStatusUpdate=s(function(){if(!d.state.debounced){var c=!d.props.isInFocus||d.props.validChoiceMade;d.setState(function(f){return{bump:!f.bump,debounced:!0,silenced:c}})}},1400)},u.componentWillReceiveProps=function(d){d.queryLength,this.setState({debounced:!1})},u.render=function(){var d=this.props,c=d.id,f=d.length,g=d.queryLength,m=d.minQueryLength,p=d.selectedOption,_=d.selectedOptionIndex,v=d.tQueryTooShort,y=d.tNoResults,x=d.tSelectedOption,k=d.tResults,w=this.state,C=w.bump,M=w.debounced,S=w.silenced,R=g<m,A=f===0,G=p?x(p,f,_):"",P=null;return P=R?v(m):A?y():k(f,G),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:c+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!S&&M&&C?P:""),(0,o.createElement)("div",{id:c+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},S||!M||C?"":P))},h}(o.Component);(n.default=a).defaultProps={tQueryTooShort:function(l){return"Type in "+l+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(l,h,u){return l+" "+(u+1)+" of "+h+" is highlighted"},tResults:function(l,h){return l+" "+(l===1?"result":"results")+" "+(l===1?"is":"are")+" available. "+h}}},function(e,n,r){n.__esModule=!0,n.default=void 0;var o=r(5),s=function(l){var h=l.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:h,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};n.default=s}]).default})})(hp);const KE=f1(hp.exports),ZE=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif)}:host .govuk-label--static{font-size:var(--autocomplete__label__font-size, 19px)}:host .autocomplete__input{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);height:var(--autocomplete__input__height, 35px);padding:var(--autocomplete__input__padding, 5px 34px 5px 5px);z-index:calc(var(--autocomplete__dropdown-arrow-down__z-index, 1) + 1)}:host .autocomplete__dropdown-arrow-down{z-index:var(--autocomplete__dropdown-arrow-down__z-index, 1);top:calc((var(--autocomplete__input__height, 35px) - 17px) / 2)}:host .autocomplete__option{font-family:var(--autocomplete__font-family, "GDS Transport", arial, sans-serif);font-size:var(--autocomplete__input__font-size, 19px);padding:var(--autocomplete__option__padding, 5px);border-bottom:var(--autocomplete__option__border-bottom, solid 1px #b1b4b6)}:host .autocomplete__option--focused,:host .autocomplete__option:hover,.autocomplete__option--focused :host .autocomplete__option:hover{border-color:var(--autocomplete__option__hover-border-color, #1d70b8);background-color:var(--autocomplete__option__hover-background-color, #1d70b8)}:host .autocomplete__menu{max-height:var(--autocomplete__menu__max-height, 342px)}
86
+ `;var up=Object.freeze,dp=Object.defineProperty,HE=Object.getOwnPropertyDescriptor,Ue=(i,t,e,n)=>{for(var r=n>1?void 0:n?HE(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&dp(t,e,r),r},JE=(i,t)=>up(dp(i,"raw",{value:up(t||i.slice())})),cp;q.AddressAutocomplete=class extends Pn{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="a69TM3Yjy4YUiAXFAyI6KyadBPrwYqex",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}connectedCallback(){super.connectedCallback(),this._fetchData()}disconnectedCallback(){super.disconnectedCallback()}_getLightDropdownArrow(){return'<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>'}firstUpdated(){KE({element:this.renderRoot.querySelector(`#${this.id}-container`),id:this.id,required:!0,source:this._options,defaultValue:this.initialAddress,showAllValues:!0,displayMenu:"overlay",dropdownArrow:this.arrowStyle==="light"?this._getLightDropdownArrow:void 0,tNoResults:()=>"No addresses found",onConfirm:i=>{this._selectedAddress=this._addressesInPostcode.filter(t=>t.LPI.ADDRESS.split(`, ${t.LPI.ADMINISTRATIVE_AREA}`)[0]===i)[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(i=0,t=[]){const e={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},n=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(e)}`;await fetch(n+`&offset=${i}`).then(r=>r.json()).then(r=>{var s,a,l;(r.error||r.fault)&&(this._osError=((s=r.error)==null?void 0:s.message)||((a=r.fault)==null?void 0:a.faultstring)||"Something went wrong"),this._totalAddresses=(l=r.header)==null?void 0:l.totalresults;const o=t.concat(r.results||[]);if(this._addressesInPostcode=o,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),r.results){r.results.filter(u=>u.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION==="APPROVED").map(u=>{this._options.push(u.LPI.ADDRESS.split(`, ${u.LPI.ADMINISTRATIVE_AREA}`)[0])});const h=new Intl.Collator([],{numeric:!0});this._options.sort((u,d)=>h.compare(u,d))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)}).catch(r=>console.log(r))}_getLabelClasses(){let i="govuk-label";return this.labelStyle==="static"&&(i+=" govuk-label--static"),i}_getErrorMessageContainer(i){const t=i?"govuk-warning-text":"",e=i?Bi` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
73
87
  <strong class="govuk-warning-text__text">
74
88
  <span class="govuk-warning-text__assistive">Warning</span>
75
- ${r}
76
- </strong>`:null;return xi`<div class="${e}" role="status">${t}</div>`}_getAutocomplete(r){return r?null:xi`
89
+ ${i}
90
+ </strong>`:null;return Bi`<div
91
+ id="error-message-container"
92
+ class="${t}"
93
+ role="status"
94
+ >
95
+ ${e}
96
+ </div>`}_getAutocomplete(i){return i?null:Bi`
77
97
  <link
78
98
  rel="stylesheet"
79
99
  href="https://cdn.jsdelivr.net/npm/accessible-autocomplete@2.0.4/dist/accessible-autocomplete.min.css"
@@ -82,16 +102,16 @@ Filter Expression:
82
102
  ${this.label}
83
103
  </label>
84
104
  <div id="${this.id}-container" spellcheck="false"></div>
85
- `}render(){let r;return this.osPlacesApiKey?this._osError?r=this._osError:this._totalAddresses===0&&(r=`No addresses found in postcode ${this.postcode}`):r="Missing OS Places API key",xi(mc||(mc=zw([`
105
+ `}render(){let i;return this.osPlacesApiKey?this._osError?i=this._osError:this._totalAddresses===0&&(i=`No addresses found in postcode ${this.postcode}`):i="Missing OS Places API key",Bi(cp||(cp=JE([`
86
106
  <script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
87
107
  `,`
88
108
  `,`
89
- `])),this._getErrorMessageContainer(r),this._getAutocomplete(r))}},j.AddressAutocomplete.styles=Uo(Ow),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"id",2),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"postcode",2),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"label",2),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"initialAddress",2),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"osPlacesApiKey",2),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"arrowStyle",2),Oe([Q({type:String})],j.AddressAutocomplete.prototype,"labelStyle",2),Oe([bi()],j.AddressAutocomplete.prototype,"_totalAddresses",2),Oe([bi()],j.AddressAutocomplete.prototype,"_addressesInPostcode",2),Oe([bi()],j.AddressAutocomplete.prototype,"_options",2),Oe([bi()],j.AddressAutocomplete.prototype,"_selectedAddress",2),Oe([bi()],j.AddressAutocomplete.prototype,"_osError",2),j.AddressAutocomplete=Oe([cs("address-autocomplete")],j.AddressAutocomplete);var Gu=globalThis&&globalThis.__assign||function(){return Gu=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},Gu.apply(this,arguments)},vc=/^([a-z]{1,2}\d)([a-z])$/i,Rw=/[a-z]{2}$/i,_c=/\d[a-z]{2}$/i,Pw=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,Mw=/^[a-z]{1,2}/i,Lw={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ju=function(r){return r===null?null:r[0]},Aw=/\s+/gi,yc=function(r){return r.replace(Aw,"").toUpperCase()},Bu=function(r,e){return yc(r).match(e)},Ao=function(r){return r.match(Pw)!==null},Uu=function(r){var e=Fo(r);if(e===null)return null;var t=Vu(r);return t===null?null:e+" "+t},Fo=function(r){return Ao(r)?yc(r).replace(_c,""):null},Vu=function(r){if(!Ao(r))return null;var e=Bu(r,_c);return ju(e)},Fw=function(r){if(!Ao(r))return null;var e=Bu(r,Mw);return ju(e)},Dw=function(r){var e=Fo(r);if(e===null)return null;var t=Vu(r);return t===null?null:e+" "+t[0]},Nw=function(r){if(!Ao(r))return null;var e=Bu(r,Rw);return ju(e)},Gw=function(r){var e=Fo(r);if(e===null)return null;var t=e.match(vc);return t===null?e:t[1]},jw=function(r){var e=Fo(r);if(e===null)return null;var t=e.match(vc);return t===null?null:e},Bw=function(r){return Ao(r)?{valid:!0,postcode:Uu(r),incode:Vu(r),outcode:Fo(r),area:Fw(r),district:Gw(r),subDistrict:jw(r),sector:Dw(r),unit:Nw(r)}:Gu({},Lw)};const Uw=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label,:host .govuk-hint,:host .govuk-error-message{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__font-size, 19px)}:host .govuk-input{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__input__font-size, 19px);height:var(--postcode__input__height, 35px);padding:var(--postcode__input__padding, 5px 34px 5px 5px)}
90
- `;var xc=Object.freeze,bc=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,Je=(r,e,t,i)=>{for(var n=i>1?void 0:i?Vw(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(n=(i?a(e,t,n):a(n))||n);return i&&n&&bc(e,t,n),n},Yw=(r,e)=>xc(bc(r,"raw",{value:xc(e||r.slice())})),kc;j.PostcodeSearch=class extends nn{constructor(){super(...arguments),this.id="postcode",this.errorId="postcode-error",this.label="Postcode",this.hintText="",this.errorMessage="Enter a valid UK postcode",this.onlyQuestionOnPage=!1,this._postcode="",this._sanitizedPostcode=null,this._showPostcodeError=!1,this.dispatch=(r,e)=>this.dispatchEvent(new CustomEvent(r,{detail:e}))}_onInputChange(r){const e=r.target.value,t=Bw(e.trim()).valid;t?(this._sanitizedPostcode=Uu(e.trim()),this._postcode=Uu(e.trim())||e,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=e.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||e,isValid:t})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(r){r.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var t,i;const r=(t=this.shadowRoot)==null?void 0:t.querySelector(`#${this.errorId}`);r&&(r.style.display="none"),r&&this._showPostcodeError&&(r.style.display="");const e=(i=this.shadowRoot)==null?void 0:i.querySelector(".govuk-form-group");e&&this._showPostcodeError&&e.classList.add("govuk-form-group--error"),e&&!this._showPostcodeError&&e.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?xi`<h1 class="govuk-label-wrapper">
109
+ `])),this._getErrorMessageContainer(i),this._getAutocomplete(i))}},q.AddressAutocomplete.styles=Ss(ZE),Ue([J({type:String})],q.AddressAutocomplete.prototype,"id",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"postcode",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"label",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"initialAddress",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"osPlacesApiKey",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"arrowStyle",2),Ue([J({type:String})],q.AddressAutocomplete.prototype,"labelStyle",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_totalAddresses",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_addressesInPostcode",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_options",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_selectedAddress",2),Ue([Ui()],q.AddressAutocomplete.prototype,"_osError",2),q.AddressAutocomplete=Ue([vl("address-autocomplete")],q.AddressAutocomplete);var sd=globalThis&&globalThis.__assign||function(){return sd=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},sd.apply(this,arguments)},fp=/^([a-z]{1,2}\d)([a-z])$/i,QE=/[a-z]{2}$/i,gp=/\d[a-z]{2}$/i,tC=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,eC=/^[a-z]{1,2}/i,iC={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},ad=function(i){return i===null?null:i[0]},nC=/\s+/gi,mp=function(i){return i.replace(nC,"").toUpperCase()},ld=function(i,t){return mp(i).match(t)},_s=function(i){return i.match(tC)!==null},hd=function(i){var t=ys(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e},ys=function(i){return _s(i)?mp(i).replace(gp,""):null},ud=function(i){if(!_s(i))return null;var t=ld(i,gp);return ad(t)},rC=function(i){if(!_s(i))return null;var t=ld(i,eC);return ad(t)},oC=function(i){var t=ys(i);if(t===null)return null;var e=ud(i);return e===null?null:t+" "+e[0]},sC=function(i){if(!_s(i))return null;var t=ld(i,QE);return ad(t)},aC=function(i){var t=ys(i);if(t===null)return null;var e=t.match(fp);return e===null?t:e[1]},lC=function(i){var t=ys(i);if(t===null)return null;var e=t.match(fp);return e===null?null:t},hC=function(i){return _s(i)?{valid:!0,postcode:hd(i),incode:ud(i),outcode:ys(i),area:rC(i),district:aC(i),subDistrict:lC(i),sector:oC(i),unit:sC(i)}:sd({},iC)};const uC=`@charset "UTF-8";.govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:GDS Transport;font-style:normal;font-weight:400;src:url(/assets/fonts/light-94a07e06a1-v2.woff2) format("woff2"),url(/assets/fonts/light-f591b13f7d-v2.woff) format("woff");font-display:fallback}@font-face{font-family:GDS Transport;font-style:normal;font-weight:700;src:url(/assets/fonts/bold-b542beb274-v2.woff2) format("woff2"),url(/assets/fonts/bold-affa96571d-v2.woff) format("woff");font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-link:link{color:#1d70b8}.govuk-link:visited{color:#4c2c92}.govuk-link:hover{color:#003078}.govuk-link:active{color:#0b0c0c}.govuk-link:focus{color:#0b0c0c}@media print{[href^="/"].govuk-link:after,[href^="http://"].govuk-link:after,[href^="https://"].govuk-link:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:link,.govuk-link--muted:visited{color:#505a5f}.govuk-link--muted:hover,.govuk-link--muted:active{color:#0b0c0c}.govuk-link--muted:focus{color:#0b0c0c}.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:hover{color:#0b0c0cfc}.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus{color:#000}}.govuk-link--inverse:link,.govuk-link--inverse:visited{color:#fff}.govuk-link--inverse:hover,.govuk-link--inverse:active{color:#fffffffc}.govuk-link--inverse:focus{color:#0b0c0c}.govuk-link--no-underline:not(:hover):not(:active){text-decoration:none}.govuk-link--no-visited-state:link,.govuk-link--no-visited-state:visited{color:#1d70b8}.govuk-link--no-visited-state:hover{color:#003078}.govuk-link--no-visited-state:active{color:#0b0c0c}.govuk-link--no-visited-state:focus{color:#0b0c0c}.govuk-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-list{font-size:14pt;line-height:1.15}}@media print{.govuk-list{color:#000}}@media (min-width: 40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:0}@media (min-width: 40.0625em){.govuk-list--bullet>li,.govuk-list--number>li{margin-bottom:5px}}.govuk-list--spaced>li{margin-bottom:10px}@media (min-width: 40.0625em){.govuk-list--spaced>li{margin-bottom:15px}}.govuk-heading-xl{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000}}@media print{.govuk-heading-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000}}@media print{.govuk-heading-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width: 40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000}}@media print{.govuk-heading-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000}}@media print{.govuk-heading-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-heading-s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-xl{font-size:27px;font-size:1.6875rem;line-height:1.1111111111}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;display:block;margin-bottom:5px;color:#505a5f}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;color:#505a5f}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-caption-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-lead,.govuk-body-l{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:20px}@media print{.govuk-body-lead,.govuk-body-l{color:#000}}@media print{.govuk-body-lead,.govuk-body-l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-body-lead,.govuk-body-l{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body-lead,.govuk-body-l{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000}}@media print{.govuk-body,.govuk-body-m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000}}@media print{.govuk-body-s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-s{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;font-size:.75rem;line-height:1.25;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000}}@media print{.govuk-body-xs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-body-xs{font-size:14px;font-size:.875rem;line-height:1.4285714286}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-l,.govuk-body+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width: 40.0625em){.govuk-body-m+.govuk-heading-m,.govuk-body+.govuk-heading-m,.govuk-body-s+.govuk-heading-m,.govuk-list+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body+.govuk-heading-s,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-top:50px}}@media (min-width: 40.0625em){.govuk-section-break--xl{margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-section-break--l{margin-top:30px}}@media (min-width: 40.0625em){.govuk-section-break--l{margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-section-break--m{margin-top:20px}}@media (min-width: 40.0625em){.govuk-section-break--m{margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #b1b4b6}.govuk-button-group{margin-bottom:5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}@media (min-width: 40.0625em){.govuk-button-group{margin-bottom:15px}}.govuk-button-group .govuk-link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;display:inline-block;max-width:100%;margin-top:5px;margin-bottom:20px;text-align:center}@media print{.govuk-button-group .govuk-link{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button-group .govuk-link{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button-group .govuk-link{font-size:14pt;line-height:19px}}.govuk-button-group .govuk-button{margin-bottom:17px}@media (min-width: 40.0625em){.govuk-button-group{margin-right:-15px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.govuk-button-group .govuk-button,.govuk-button-group .govuk-link{margin-right:15px}.govuk-button-group .govuk-link{text-align:left}}.govuk-form-group{margin-bottom:20px}.govuk-form-group:after{content:"";display:block;clear:both}@media (min-width: 40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #d4351c}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{box-sizing:border-box;width:100%;padding:0 15px}@media (min-width: 40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-grid-column-one-quarter-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-quarter-from-desktop{width:25%;float:left}}.govuk-grid-column-one-third-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-third-from-desktop{width:33.3333%;float:left}}.govuk-grid-column-one-half-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-one-half-from-desktop{width:50%;float:left}}.govuk-grid-column-two-thirds-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-two-thirds-from-desktop{width:66.6666%;float:left}}.govuk-grid-column-three-quarters-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-three-quarters-from-desktop{width:75%;float:left}}.govuk-grid-column-full-from-desktop{box-sizing:border-box;padding:0 15px}@media (min-width: 48.0625em){.govuk-grid-column-full-from-desktop{width:100%;float:left}}.govuk-main-wrapper{display:block;padding-top:20px;padding-bottom:20px}@media (min-width: 40.0625em){.govuk-main-wrapper{padding-top:40px;padding-bottom:40px}}.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:30px}@media (min-width: 40.0625em){.govuk-main-wrapper--auto-spacing:first-child,.govuk-main-wrapper--l{padding-top:50px}}.govuk-template{background-color:#f3f2f1;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}@media screen{.govuk-template{overflow-y:scroll}}.govuk-template__body{margin:0;background-color:#fff}.govuk-width-container{max-width:960px;margin-right:15px;margin-left:15px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(15px,calc(15px + env(safe-area-inset-right)));margin-left:max(15px,calc(15px + env(safe-area-inset-left)))}}@media (min-width: 40.0625em){.govuk-width-container{margin-right:30px;margin-left:30px}@supports (margin: max(0px)){.govuk-width-container{margin-right:max(30px,calc(15px + env(safe-area-inset-right)));margin-left:max(30px,calc(15px + env(safe-area-inset-left)))}}}@media (min-width: 1020px){.govuk-width-container{margin-right:auto;margin-left:auto}@supports (margin: max(0px)){.govuk-width-container{margin-right:auto;margin-left:auto}}}.govuk-accordion{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-accordion{margin-bottom:30px}}.govuk-accordion__section{padding-top:15px}.govuk-accordion__section-heading{margin-top:0;margin-bottom:0;padding-top:15px;padding-bottom:15px}.govuk-accordion__section-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;color:#0b0c0c;display:block;margin-bottom:0;padding-top:15px}@media print{.govuk-accordion__section-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-accordion__section-button{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-accordion__section-button{font-size:18pt;line-height:1.15}}@media print{.govuk-accordion__section-button{color:#000}}.govuk-accordion__section-content>:last-child{margin-bottom:0}.js-enabled .govuk-accordion{border-bottom:1px solid #b1b4b6}.js-enabled .govuk-accordion__section{padding-top:0}.js-enabled .govuk-accordion__section-content{display:none;padding-bottom:30px}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-content{padding-bottom:50px}}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-content{display:block}.js-enabled .govuk-accordion__show-all{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;position:relative;z-index:1;margin-bottom:9px;padding:5px 2px 5px 0;border-width:0;color:#1d70b8;background:none;cursor:pointer;-webkit-appearance:none}@media print{.js-enabled .govuk-accordion__show-all{font-family:sans-serif}}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__show-all{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__show-all{font-size:14pt;line-height:1.15}}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__show-all{margin-bottom:14px}}.js-enabled .govuk-accordion__show-all::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__show-all:hover{color:#0b0c0c;background:#f3f2f1;box-shadow:0 -2px #f3f2f1,0 4px #f3f2f1}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__show-all:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron{background:#0b0c0c}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-heading{padding:0}.js-enabled .govuk-accordion-nav__chevron{box-sizing:border-box;display:inline-block;position:relative;width:1.25rem;height:1.25rem;border:.0625rem solid;border-radius:50%;vertical-align:middle}.js-enabled .govuk-accordion-nav__chevron:after{content:"";box-sizing:border-box;display:block;position:absolute;bottom:.3125rem;left:.375rem;width:.375rem;height:.375rem;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border-top:.125rem solid;border-right:.125rem solid}.js-enabled .govuk-accordion-nav__chevron--down{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.js-enabled .govuk-accordion__section-button{width:100%;padding:10px 0 0;border:0;border-top:1px solid #b1b4b6;border-bottom:10px solid transparent;color:#0b0c0c;background:none;text-align:left;cursor:pointer;-webkit-appearance:none}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-button{padding-bottom:10px}}.js-enabled .govuk-accordion__section-button:active{color:#0b0c0c;background:none}.js-enabled .govuk-accordion__section-button:hover{color:#0b0c0c;background:#f3f2f1}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion__section-toggle-text{color:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron:after{color:#f3f2f1}.js-enabled .govuk-accordion__section-button:focus{outline:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{color:#0b0c0c;background:#0b0c0c}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron:after{color:#fd0}.js-enabled .govuk-accordion__section-button::-moz-focus-inner{padding:0;border:0}.js-enabled .govuk-accordion__section--expanded .govuk-accordion__section-button{padding-bottom:20px;border-bottom:0}.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:3px}@media (min-width: 48.0625em){.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus{padding-bottom:2px}}.js-enabled .govuk-accordion__section-toggle,.js-enabled .govuk-accordion__section-heading-text,.js-enabled .govuk-accordion__section-summary{display:block;margin-bottom:13px}.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-toggle .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-heading-text .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-summary .govuk-accordion__section-toggle-focus{display:inline}.js-enabled .govuk-accordion__section-toggle{font-size:16px;font-size:1rem;line-height:1.25;font-weight:400;color:#1d70b8}@media (min-width: 40.0625em){.js-enabled .govuk-accordion__section-toggle{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.js-enabled .govuk-accordion__section-toggle{font-size:14pt;line-height:1.15}}.js-enabled .govuk-accordion__show-all-text,.js-enabled .govuk-accordion__section-toggle-text{margin-left:5px;vertical-align:middle}@media screen and (forced-colors: active){.js-enabled .govuk-accordion__show-all:hover .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:hover .govuk-accordion-nav__chevron{background-color:transparent}.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__show-all:focus .govuk-accordion-nav__chevron,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-heading-text-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-summary-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion__section-toggle-focus,.js-enabled .govuk-accordion__section-button:focus .govuk-accordion-nav__chevron{background:transparent;background-color:transparent}}@media (hover: none){.js-enabled .govuk-accordion__section-header:hover{border-top-color:#b1b4b6;box-shadow:inset 0 3px #1d70b8}.js-enabled .govuk-accordion__section-header:hover .govuk-accordion__section-button{border-top-color:#b1b4b6}}.govuk-back-link{font-size:14px;font-size:.875rem;line-height:1.1428571429;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px}@media (min-width: 40.0625em){.govuk-back-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2}}@media print{.govuk-back-link{font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:hover{color:#0b0c0cfc}.govuk-back-link:active,.govuk-back-link:focus{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus{color:#000}}.govuk-back-link:before{content:"";display:block;position:absolute;top:0;bottom:0;left:3px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-back-link:focus:before{border-color:#0b0c0c}.govuk-back-link:after{content:"";position:absolute;top:-14px;right:0;bottom:-14px;left:0}.govuk-breadcrumbs{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-breadcrumbs{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2}}@media print{.govuk-breadcrumbs{color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:0;bottom:0;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#505a5f}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:hover{color:#0b0c0cfc}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus{color:#000}}@media (max-width: 40.0525em){.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item{display:none}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:first-child,.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:last-child{display:inline-block}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list-item:before{top:6px;margin:0}.govuk-breadcrumbs--collapse-on-mobile .govuk-breadcrumbs__list{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.govuk-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.1875;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin:0 0 22px;padding:8px 10px 7px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00703c;box-shadow:0 2px #002d18;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-button{font-size:19px;font-size:1.1875rem;line-height:1}}@media print{.govuk-button{font-size:14pt;line-height:19px}}@media (min-width: 40.0625em){.govuk-button{margin-bottom:32px}}@media (min-width: 40.0625em){.govuk-button{width:auto}}.govuk-button:link,.govuk-button:visited,.govuk-button:active,.govuk-button:hover{color:#fff;text-decoration:none}.govuk-button::-moz-focus-inner{padding:0;border:0}.govuk-button:hover{background-color:#005a30}.govuk-button:active{top:2px}.govuk-button:focus{border-color:#fd0;outline:3px solid transparent;box-shadow:inset 0 0 0 1px #fd0}.govuk-button:focus:not(:active):not(:hover){border-color:#fd0;color:#0b0c0c;background-color:#fd0;box-shadow:0 2px #0b0c0c}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00703c;cursor:default}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;box-shadow:0 2px #002d18}.govuk-button--secondary{background-color:#f3f2f1;box-shadow:0 2px #929191}.govuk-button--secondary,.govuk-button--secondary:link,.govuk-button--secondary:visited,.govuk-button--secondary:active,.govuk-button--secondary:hover{color:#0b0c0c}.govuk-button--secondary:hover{background-color:#dbdad9}.govuk-button--secondary:hover[disabled]{background-color:#f3f2f1}.govuk-button--warning{background-color:#d4351c;box-shadow:0 2px #55150b}.govuk-button--warning,.govuk-button--warning:link,.govuk-button--warning:visited,.govuk-button--warning:active,.govuk-button--warning:hover{color:#fff}.govuk-button--warning:hover{background-color:#aa2a16}.govuk-button--warning:hover[disabled]{background-color:#d4351c}.govuk-button--start{font-weight:700;font-size:18px;font-size:1.125rem;line-height:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;min-height:auto;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}@media (min-width: 40.0625em){.govuk-button--start{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}.govuk-button__start-icon{margin-left:5px;vertical-align:middle;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;forced-color-adjust:auto}@media (min-width: 48.0625em){.govuk-button__start-icon{margin-left:10px}}.govuk-error-message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;display:block;margin-top:0;margin-bottom:15px;clear:both;color:#d4351c}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-message{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{min-width:0;margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}@supports not (caret-color: auto){.govuk-fieldset,x:-moz-any-link{display:table-cell}}.govuk-fieldset__legend{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;box-sizing:border-box;display:table;max-width:100%;margin-bottom:10px;padding:0;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15}}@media print{.govuk-fieldset__legend{color:#000}}.govuk-fieldset__legend--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-fieldset__legend--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:15px;color:#505a5f}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-hint{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl)+.govuk-hint{margin-bottom:10px}.govuk-fieldset__legend+.govuk-hint{margin-top:-5px}.govuk-label{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label{font-size:14pt;line-height:1.15}}@media print{.govuk-label{color:#000}}.govuk-label--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-label--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-checkboxes__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__label:after{content:"";box-sizing:border-box;position:absolute;top:11px;left:9px;width:23px;height:12px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__hint{display:block;padding-right:15px;padding-left:15px}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 3px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{outline-color:Highlight}}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-checkboxes__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-checkboxes__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-checkboxes__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-checkboxes__divider{color:#000}}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.js-enabled .govuk-checkboxes__conditional--hidden{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-checkboxes--small .govuk-checkboxes__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-checkboxes--small .govuk-checkboxes__item:after{content:"";display:block;clear:both}.govuk-checkboxes--small .govuk-checkboxes__input{left:-10px}.govuk-checkboxes--small .govuk-checkboxes__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-checkboxes--small .govuk-checkboxes__label{padding:11px 15px 10px 1px}}.govuk-checkboxes--small .govuk-checkboxes__label:before{top:8px;width:24px;height:24px}.govuk-checkboxes--small .govuk-checkboxes__label:after{top:15px;left:6px;width:12px;height:6.5px;border-width:0 0 3px 3px}.govuk-checkboxes--small .govuk-checkboxes__hint{padding:0;clear:both}.govuk-checkboxes--small .govuk-checkboxes__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:not(:disabled)+.govuk-checkboxes__label:before{box-shadow:initial}.govuk-checkboxes--small .govuk-checkboxes__item:hover .govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{box-shadow:0 0 0 3px #fd0}}.govuk-textarea{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:block;width:100%;min-height:40px;margin-bottom:20px;padding:5px;resize:vertical;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-textarea{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}@media (min-width: 40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-textarea--error{border-color:#d4351c}.govuk-textarea--error:focus{border-color:#0b0c0c}.govuk-character-count{margin-bottom:20px}@media (min-width: 40.0625em){.govuk-character-count{margin-bottom:30px}}.govuk-character-count .govuk-form-group,.govuk-character-count .govuk-textarea{margin-bottom:5px}.govuk-character-count__message{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400;margin-top:0;margin-bottom:0}@media print{.govuk-character-count__message{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-character-count__message{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-character-count__message--disabled{visibility:hidden}.govuk-cookie-banner{padding-top:20px;border-bottom:10px solid transparent;background-color:#f3f2f1}.govuk-cookie-banner[hidden]{display:none}.govuk-cookie-banner__message{margin-bottom:-10px}.govuk-cookie-banner__message[hidden]{display:none}.govuk-cookie-banner__message:focus{outline:none}.govuk-summary-list{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin:0 0 20px}@media print{.govuk-summary-list{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-summary-list{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-summary-list{font-size:14pt;line-height:1.15}}@media print{.govuk-summary-list{color:#000}}@media (min-width: 40.0625em){.govuk-summary-list{display:table;width:100%;table-layout:fixed;border-collapse:collapse}}@media (min-width: 40.0625em){.govuk-summary-list{margin-bottom:30px}}.govuk-summary-list__row{border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-summary-list__row{margin-bottom:15px}}@media (min-width: 40.0625em){.govuk-summary-list__row{display:table-row}}@media (min-width: 40.0625em){.govuk-summary-list__row--no-actions:after{content:"";display:table-cell;width:20%}}.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{margin:0}@media (min-width: 40.0625em){.govuk-summary-list__key,.govuk-summary-list__value,.govuk-summary-list__actions{display:table-cell;padding-top:10px;padding-right:20px;padding-bottom:10px}}.govuk-summary-list__actions{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-summary-list__actions{width:20%;padding-right:0;text-align:right}}.govuk-summary-list__key,.govuk-summary-list__value{word-wrap:break-word;overflow-wrap:break-word}.govuk-summary-list__key{margin-bottom:5px;font-weight:700}@media (min-width: 40.0625em){.govuk-summary-list__key{width:30%}}@media (max-width: 40.0525em){.govuk-summary-list__value{margin-bottom:15px}}.govuk-summary-list__value>p{margin-bottom:10px}.govuk-summary-list__value>:last-child{margin-bottom:0}.govuk-summary-list__actions-list{width:100%;margin:0;padding:0}.govuk-summary-list__actions-list-item{display:inline;margin-right:10px;padding-right:10px}.govuk-summary-list__actions-list-item:not(:last-child){border-right:1px solid #b1b4b6}.govuk-summary-list__actions-list-item:last-child{margin-right:0;padding-right:0;border:0}.govuk-summary-list--no-border .govuk-summary-list__row{border:0}@media (min-width: 40.0625em){.govuk-summary-list--no-border .govuk-summary-list__key,.govuk-summary-list--no-border .govuk-summary-list__value,.govuk-summary-list--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-summary-list__row--no-border{border:0}@media (min-width: 40.0625em){.govuk-summary-list__row--no-border .govuk-summary-list__key,.govuk-summary-list__row--no-border .govuk-summary-list__value,.govuk-summary-list__row--no-border .govuk-summary-list__actions{padding-bottom:11px}}.govuk-input{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;width:100%;height:40px;height:2.5rem;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-input::-webkit-outer-spin-button,.govuk-input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border-color:#d4351c}.govuk-input--error:focus{border-color:#0b0c0c}.govuk-input--width-30{max-width:59ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-input--width-5{max-width:10.8ex}.govuk-input--width-4{max-width:9ex}.govuk-input--width-3{max-width:7.2ex}.govuk-input--width-2{max-width:5.4ex}.govuk-input__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.govuk-input__wrapper .govuk-input{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.govuk-input__wrapper .govuk-input:focus{z-index:1}@media (max-width: 19.99em){.govuk-input__wrapper{display:block}.govuk-input__wrapper .govuk-input{max-width:100%}}.govuk-input__prefix,.govuk-input__suffix{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;display:inline-block;min-width:40px;min-width:2.5rem;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;background-color:#f3f2f1;text-align:center;white-space:nowrap;cursor:default;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}@media print{.govuk-input__prefix,.govuk-input__suffix{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-input__prefix,.govuk-input__suffix{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-input__prefix,.govuk-input__suffix{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-input__prefix,.govuk-input__suffix{line-height:1.6}}@media (max-width: 19.99em){.govuk-input__prefix,.govuk-input__suffix{display:block;height:100%;white-space:normal}}@media (max-width: 19.99em){.govuk-input__prefix{border-bottom:0}}@media (min-width: 20em){.govuk-input__prefix{border-right:0}}@media (max-width: 19.99em){.govuk-input__suffix{border-top:0}}@media (min-width: 20em){.govuk-input__suffix{border-left:0}}.govuk-date-input{font-size:0}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{display:inline-block;margin-right:20px;margin-bottom:0}.govuk-date-input__label{display:block}.govuk-date-input__input{margin-bottom:0}.govuk-details{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-details{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-details{font-size:14pt;line-height:1.15}}@media print{.govuk-details{color:#000}}@media (min-width: 40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#1d70b8;cursor:pointer}.govuk-details__summary:hover{color:#003078}.govuk-details__summary:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:focus .govuk-details__summary-text{text-decoration:none}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:-1px;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,100% 50%,0% 100%);clip-path:polygon(0% 0%,100% 50%,0% 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:12.124px 7px 0 7px;border-top-color:inherit}.govuk-details__text{padding-top:15px;padding-bottom:15px;padding-left:20px;border-left:5px solid #b1b4b6}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text>:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:5px solid #d4351c}@media print{.govuk-error-summary{color:#000}}@media (min-width: 40.0625em){.govuk-error-summary{padding:20px}}@media (min-width: 40.0625em){.govuk-error-summary{margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffdd00}.govuk-error-summary__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__title{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-error-summary__body{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width: 40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-error-summary__list a{font-family:sans-serif}}.govuk-error-summary__list a:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#d4351c}.govuk-error-summary__list a:hover{color:#942514}.govuk-error-summary__list a:active{color:#d4351c}.govuk-error-summary__list a:focus{color:#0b0c0c}.govuk-file-upload{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;max-width:100%;margin-left:-5px;padding:5px}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-file-upload{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15}}@media print{.govuk-file-upload{color:#000}}.govuk-file-upload::-webkit-file-upload-button{-webkit-appearance:button;color:inherit;font:inherit}.govuk-file-upload:focus{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-file-upload:focus-within{outline:3px solid #ffdd00;box-shadow:inset 0 0 0 4px #0b0c0c}.govuk-footer{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;padding-top:25px;padding-bottom:15px;border-top:1px solid #b1b4b6;color:#0b0c0c;background:#f3f2f1}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-footer{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width: 40.0625em){.govuk-footer{padding-top:40px}}@media (min-width: 40.0625em){.govuk-footer{padding-bottom:25px}}.govuk-footer__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-footer__link{font-family:sans-serif}}.govuk-footer__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-footer__link:link,.govuk-footer__link:visited{color:#0b0c0c}@media print{.govuk-footer__link:link,.govuk-footer__link:visited{color:#000}}.govuk-footer__link:hover{color:#0b0c0cfc}.govuk-footer__link:active,.govuk-footer__link:focus{color:#0b0c0c}@media print{.govuk-footer__link:active,.govuk-footer__link:focus{color:#000}}.govuk-footer__section-break{margin:0 0 30px;border:0;border-bottom:1px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}@media (max-width: 40.0525em){.govuk-footer__meta-item--grow{-webkit-flex-basis:320px;-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top;forced-color-adjust:auto}@media (max-width: 48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0%;background-size:125px 102px;text-align:center;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__meta-custom{margin-bottom:20px}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:30px;padding-bottom:20px;border-bottom:1px solid #b1b4b6}@media (max-width: 40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{margin-right:-15px;margin-left:-15px}.govuk-footer__navigation:after{content:"";display:block;clear:both}.govuk-footer__section{display:inline-block;margin-bottom:30px;vertical-align:top}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list .govuk-footer__link:hover{text-decoration-thickness:auto}@media (min-width: 48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width: 40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;border-bottom:10px solid #ffffff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header__container--full-width{padding:0 15px;border-color:#1d70b8}.govuk-header__container--full-width .govuk-header__menu-button{right:15px}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #1d70b8}.govuk-header__container:after{content:"";display:block;clear:both}.govuk-header__logotype{display:inline-block;margin-right:5px}@media (forced-colors: active){.govuk-header__logotype{forced-color-adjust:none;color:linktext}}.govuk-header__logotype:last-child{margin-right:0}.govuk-header__logotype-crown{position:relative;top:-1px;margin-right:1px;fill:currentColor;vertical-align:top}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:bottom}.govuk-header__product-name{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;font-size:1.125rem;line-height:1;display:inline-table}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__product-name{font-size:24px;font-size:1.5rem;line-height:1}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1}}.govuk-header__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none}@media print{.govuk-header__link{font-family:sans-serif}}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover,.govuk-header__link:active{color:#fffffffc}.govuk-header__link:focus{color:#0b0c0c}.govuk-header__link:hover{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.1em}.govuk-header__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__link--homepage{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;margin-right:10px;font-size:30px;line-height:1}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{text-decoration:none}.govuk-header__link--homepage:hover,.govuk-header__link--homepage:active{margin-bottom:-3px;border-bottom:3px solid}.govuk-header__link--homepage:focus{margin-bottom:0;border-bottom:0}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__link--service-name{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo,.govuk-header__content{box-sizing:border-box}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width: 40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width: 48.0625em){.govuk-header__logo{width:33.33%;padding-right:15px;float:left;vertical-align:top}}@media (min-width: 48.0625em){.govuk-header__content{width:66.66%;padding-left:15px;float:left}}.govuk-header__menu-button{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;cursor:pointer}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__menu-button{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{-webkit-text-decoration:solid underline 3px;text-decoration:solid underline 3px;text-underline-offset:.1em}.govuk-header__menu-button:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0% 0%,50% 100%,100% 0%);clip-path:polygon(0% 0%,50% 100%,100% 0%);border-width:8.66px 5px 0 5px;border-top-color:inherit;content:"";margin-left:5px}@media (min-width: 40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0%,0% 100%,100% 100%);clip-path:polygon(50% 0%,0% 100%,100% 100%);border-width:0 5px 8.66px 5px;border-bottom-color:inherit}@media (min-width: 48.0625em){.govuk-header__navigation{margin-bottom:10px}}.govuk-header__navigation-list{margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button{display:block}@media (min-width: 48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation-list{display:none}@media (min-width: 48.0625em){.js-enabled .govuk-header__navigation-list{display:block}}.js-enabled .govuk-header__navigation-list--open{display:block}@media (min-width: 48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width: 48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1.1428571429;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-header__navigation-item a{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item--active a:focus{color:#0b0c0c}.govuk-header__navigation-item:last-child{margin-right:0;border-bottom:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-inset-text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #b1b4b6}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-inset-text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15}}@media print{.govuk-inset-text{color:#000}}@media (min-width: 40.0625em){.govuk-inset-text{margin-top:30px}}@media (min-width: 40.0625em){.govuk-inset-text{margin-bottom:30px}}.govuk-inset-text>:first-child{margin-top:0}.govuk-inset-text>:only-child,.govuk-inset-text>:last-child{margin-bottom:0}.govuk-notification-banner{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-bottom:30px;border:5px solid #1d70b8;background-color:#1d70b8}@media print{.govuk-notification-banner{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner{font-size:14pt;line-height:1.15}}@media (min-width: 40.0625em){.govuk-notification-banner{margin-bottom:50px}}.govuk-notification-banner:focus{outline:3px solid #ffdd00}.govuk-notification-banner__header{padding:2px 15px 5px;border-bottom:1px solid transparent}@media (min-width: 40.0625em){.govuk-notification-banner__header{padding:2px 20px 5px}}.govuk-notification-banner__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;margin:0;padding:0;color:#fff}@media print{.govuk-notification-banner__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-notification-banner__title{font-size:14pt;line-height:1.15}}.govuk-notification-banner__content{color:#0b0c0c;padding:15px;background-color:#fff}@media print{.govuk-notification-banner__content{color:#000}}@media (min-width: 40.0625em){.govuk-notification-banner__content{padding:20px}}.govuk-notification-banner__content>*{box-sizing:border-box;max-width:605px}.govuk-notification-banner__content>:last-child{margin-bottom:0}.govuk-notification-banner__heading{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin:0 0 15px;padding:0}@media print{.govuk-notification-banner__heading{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-notification-banner__heading{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-notification-banner__heading{font-size:18pt;line-height:1.15}}.govuk-notification-banner__link{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline}@media print{.govuk-notification-banner__link{font-family:sans-serif}}.govuk-notification-banner__link:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-notification-banner__link:link,.govuk-notification-banner__link:visited{color:#1d70b8}.govuk-notification-banner__link:hover{color:#003078}.govuk-notification-banner__link:active{color:#0b0c0c}.govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-notification-banner--success{border-color:#00703c;background-color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:link,.govuk-notification-banner--success .govuk-notification-banner__link:visited{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:hover{color:#004e2a}.govuk-notification-banner--success .govuk-notification-banner__link:active{color:#00703c}.govuk-notification-banner--success .govuk-notification-banner__link:focus{color:#0b0c0c}.govuk-panel{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width: 40.0525em){.govuk-panel{padding:10px;overflow-wrap:break-word;word-wrap:break-word}}.govuk-panel--confirmation{color:#fff;background:#00703c}@media print{.govuk-panel--confirmation{border-color:currentColor;color:#000;background:none}}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__title{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__title:last-child{margin-bottom:0}.govuk-panel__body{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;font-size:1.5rem;line-height:1.0416666667}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-panel__body{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{display:inline-block;outline:2px solid transparent;outline-offset:-2px;color:#fff;background-color:#1d70b8;letter-spacing:1px;text-decoration:none;text-transform:uppercase;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:.875rem;line-height:1;padding:5px 8px 4px}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tag{font-size:16px;font-size:1rem;line-height:1}}@media print{.govuk-tag{font-size:14pt;line-height:1}}.govuk-tag--grey{color:#383f43;background:#eeefef}.govuk-tag--purple{color:#3d2375;background:#dbd5e9}.govuk-tag--turquoise{color:#10403c;background:#bfe3e0}.govuk-tag--blue{color:#144e81;background:#d2e2f1}.govuk-tag--yellow{color:#594d00;background:#fff7bf}.govuk-tag--orange{color:#6e3619;background:#fcd6c3}.govuk-tag--red{color:#942514;background:#f6d7d2}.govuk-tag--pink{color:#80224d;background:#f7d7e6}.govuk-tag--green{color:#005a30;background:#cce2d8}.govuk-phase-banner{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #b1b4b6}.govuk-phase-banner__content{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;font-size:.875rem;line-height:1.1428571429;color:#0b0c0c;display:table;margin:0}@media print{.govuk-phase-banner__content{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-phase-banner__content{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-phase-banner__content{font-size:14pt;line-height:1.2}}@media print{.govuk-phase-banner__content{color:#000}}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:middle}.govuk-tabs{margin-top:5px;margin-bottom:20px}@media (min-width: 40.0625em){.govuk-tabs{margin-top:5px}}@media (min-width: 40.0625em){.govuk-tabs{margin-bottom:30px}}.govuk-tabs__title{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;margin-bottom:10px}@media print{.govuk-tabs__title{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__title{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__title{font-size:14pt;line-height:1.15}}@media print{.govuk-tabs__title{color:#000}}.govuk-tabs__list{margin:0 0 20px;padding:0;list-style:none}@media (min-width: 40.0625em){.govuk-tabs__list{margin-bottom:30px}}.govuk-tabs__list-item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;margin-left:25px}@media print{.govuk-tabs__list-item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-tabs__list-item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-tabs__list-item{font-size:14pt;line-height:1.15}}.govuk-tabs__list-item:before{color:#0b0c0c;content:"\\2014";margin-left:-25px;padding-right:5px}@media print{.govuk-tabs__list-item:before{color:#000}}.govuk-tabs__tab{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;display:inline-block;margin-bottom:10px}@media print{.govuk-tabs__tab{font-family:sans-serif}}.govuk-tabs__tab:focus{outline:3px solid transparent;color:#0b0c0c;background-color:#fd0;box-shadow:0 -2px #fd0,0 4px #0b0c0c;text-decoration:none}.govuk-tabs__tab:link{color:#1d70b8}.govuk-tabs__tab:visited{color:#4c2c92}.govuk-tabs__tab:hover{color:#003078}.govuk-tabs__tab:active{color:#0b0c0c}.govuk-tabs__tab:focus{color:#0b0c0c}.govuk-tabs__panel{margin-bottom:30px}@media (min-width: 40.0625em){.govuk-tabs__panel{margin-bottom:50px}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__list{margin-bottom:0;border-bottom:1px solid #b1b4b6}.js-enabled .govuk-tabs__list:after{content:"";display:block;clear:both}.js-enabled .govuk-tabs__title{display:none}.js-enabled .govuk-tabs__list-item{position:relative;margin-right:5px;margin-bottom:0;margin-left:0;padding:10px 20px;float:left;background-color:#f3f2f1;text-align:center}.js-enabled .govuk-tabs__list-item:before{content:none}.js-enabled .govuk-tabs__list-item--selected{position:relative;margin-top:-5px;margin-bottom:-1px;padding:14px 19px 16px;border:1px solid #b1b4b6;border-bottom:0;background-color:#fff}.js-enabled .govuk-tabs__list-item--selected .govuk-tabs__tab{text-decoration:none}.js-enabled .govuk-tabs__tab{margin-bottom:0}.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:link,.js-enabled .govuk-tabs__tab:visited{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:hover{color:#0b0c0cfc}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#0b0c0c}}@media print and (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:active,.js-enabled .govuk-tabs__tab:focus{color:#000}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__tab:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0;padding:30px 20px;border:1px solid #b1b4b6;border-top:0}}@media (min-width: 40.0625em) and (min-width: 40.0625em){.js-enabled .govuk-tabs__panel{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel>:last-child{margin-bottom:0}}@media (min-width: 40.0625em){.js-enabled .govuk-tabs__panel--hidden{display:none}}.govuk-radios__item{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;display:block;position:relative;min-height:40px;margin-bottom:10px;padding-left:40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__item{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{cursor:pointer;position:absolute;z-index:1;top:-2px;left:-2px;width:44px;height:44px;margin:0;opacity:0}.govuk-radios__label{display:inline-block;margin-bottom:0;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__label:before{content:"";box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__hint{display:block;padding-right:15px;padding-left:15px}.govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;outline:3px solid transparent;outline-offset:1px;box-shadow:0 0 0 4px #fd0}@media screen and (forced-colors: active),(-ms-high-contrast: active){.govuk-radios__input:focus+.govuk-radios__label:before{outline-color:Highlight}}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width: 40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__divider{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:40px;margin-bottom:10px;text-align:center}@media print{.govuk-radios__divider{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-radios__divider{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-radios__divider{font-size:14pt;line-height:1.15}}@media print{.govuk-radios__divider{color:#000}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #b1b4b6}@media (min-width: 40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.js-enabled .govuk-radios__conditional--hidden{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-radios--small .govuk-radios__item{min-height:0;margin-bottom:0;padding-left:34px;float:left}.govuk-radios--small .govuk-radios__item:after{content:"";display:block;clear:both}.govuk-radios--small .govuk-radios__input{left:-10px}.govuk-radios--small .govuk-radios__label{margin-top:-2px;padding:13px 15px 13px 1px;float:left}@media (min-width: 40.0625em){.govuk-radios--small .govuk-radios__label{padding:11px 15px 10px 1px}}.govuk-radios--small .govuk-radios__label:before{top:8px;width:24px;height:24px}.govuk-radios--small .govuk-radios__label:after{top:15px;left:7px;border-width:5px}.govuk-radios--small .govuk-radios__hint{padding:0;clear:both;pointer-events:none}.govuk-radios--small .govuk-radios__conditional{margin-left:10px;padding-left:20px;clear:both}.govuk-radios--small .govuk-radios__divider{width:24px;margin-bottom:5px}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:0 0 0 10px #b1b4b6}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0,0 0 0 10px #b1b4b6}@media (hover: none),(pointer: coarse){.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:not(:disabled)+.govuk-radios__label:before{box-shadow:initial}.govuk-radios--small .govuk-radios__item:hover .govuk-radios__input:focus+.govuk-radios__label:before{box-shadow:0 0 0 4px #fd0}}.govuk-select{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;box-sizing:border-box;max-width:100%;height:40px;height:2.5rem;padding:5px;border:2px solid #0b0c0c;color:#0b0c0c;background-color:#fff}@media print{.govuk-select{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-select{font-size:19px;font-size:1.1875rem;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffdd00;outline-offset:0;box-shadow:inset 0 0 0 2px}.govuk-select option:active,.govuk-select option:checked,.govuk-select:focus::-ms-value{color:#fff;background-color:#1d70b8}.govuk-select--error{border-color:#d4351c}.govuk-select--error:focus{border-color:#0b0c0c}.govuk-skip-link{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:underline;font-size:14px;font-size:.875rem;line-height:1.1428571429;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:hover{color:#0b0c0cfc}.govuk-skip-link:active,.govuk-skip-link:focus{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus{color:#000}}@media (min-width: 40.0625em){.govuk-skip-link{font-size:16px;font-size:1rem;line-height:1.25}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}@supports (padding: max(0px)){.govuk-skip-link{padding-right:max(15px,calc(15px + env(safe-area-inset-right)));padding-left:max(15px,calc(15px + env(safe-area-inset-left)))}}.govuk-skip-link:focus{outline:3px solid #ffdd00;outline-offset:0;background-color:#fd0}.govuk-skip-link-focused-element:focus{outline:none}.govuk-table{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table{font-size:14pt;line-height:1.15}}@media print{.govuk-table{color:#000}}@media (min-width: 40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__header,.govuk-table__cell{padding:10px 20px 10px 0;border-bottom:1px solid #b1b4b6;text-align:left;vertical-align:top}.govuk-table__cell--numeric{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:"tnum" 1;font-feature-settings:"tnum" 1;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}@supports (font-variant-numeric: tabular-nums){.govuk-table__cell--numeric{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant-numeric:tabular-nums}}.govuk-table__header--numeric,.govuk-table__cell--numeric{text-align:right}.govuk-table__header:last-child,.govuk-table__cell:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-table__caption--xl{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;font-size:2rem;line-height:1.09375;margin-bottom:15px}@media print{.govuk-table__caption--xl{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--xl{font-size:48px;font-size:3rem;line-height:1.0416666667}}@media print{.govuk-table__caption--xl{font-size:32pt;line-height:1.15}}.govuk-table__caption--l{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;font-size:1.5rem;line-height:1.0416666667;margin-bottom:15px}@media print{.govuk-table__caption--l{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--l{font-size:36px;font-size:2.25rem;line-height:1.1111111111}}@media print{.govuk-table__caption--l{font-size:24pt;line-height:1.05}}.govuk-table__caption--m{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;font-size:1.125rem;line-height:1.1111111111;margin-bottom:15px}@media print{.govuk-table__caption--m{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--m{font-size:24px;font-size:1.5rem;line-height:1.25}}@media print{.govuk-table__caption--m{font-size:18pt;line-height:1.15}}.govuk-table__caption--s{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25}@media print{.govuk-table__caption--s{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-table__caption--s{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-table__caption--s{font-size:14pt;line-height:1.15}}.govuk-warning-text{position:relative;margin-bottom:20px;padding:10px 0}@media (min-width: 40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-warning-text__icon{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;box-sizing:border-box;display:inline-block;position:absolute;left:0;min-width:35px;min-height:35px;margin-top:-7px;border:3px solid #0b0c0c;border-radius:50%;color:#fff;background:#0b0c0c;font-size:30px;line-height:29px;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;forced-color-adjust:none}@media print{.govuk-warning-text__icon{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__icon{margin-top:-5px}}@media screen and (forced-colors: active){.govuk-warning-text__icon{border-color:windowText;color:windowText;background:transparent}}.govuk-warning-text__text{font-family:GDS Transport,arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;font-size:1rem;line-height:1.25;color:#0b0c0c;display:block;padding-left:45px}@media print{.govuk-warning-text__text{font-family:sans-serif}}@media (min-width: 40.0625em){.govuk-warning-text__text{font-size:19px;font-size:1.1875rem;line-height:1.3157894737}}@media print{.govuk-warning-text__text{font-size:14pt;line-height:1.15}}@media print{.govuk-warning-text__text{color:#000}}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;border:0!important;white-space:nowrap!important}.govuk-visually-hidden-focusable{position:absolute!important;width:1px!important;height:1px!important;margin:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important}.govuk-visually-hidden-focusable:active,.govuk-visually-hidden-focusable:focus{position:static!important;width:auto!important;height:auto!important;margin:inherit!important;overflow:visible!important;clip:auto!important;-webkit-clip-path:none!important;clip-path:none!important;white-space:inherit!important}.govuk-\\!-display-inline{display:inline!important}.govuk-\\!-display-inline-block{display:inline-block!important}.govuk-\\!-display-block{display:block!important}.govuk-\\!-display-none{display:none!important}@media print{.govuk-\\!-display-none-print{display:none!important}}.govuk-\\!-margin-0{margin:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-0{margin:0!important}}.govuk-\\!-margin-top-0{margin-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-0{margin-top:0!important}}.govuk-\\!-margin-right-0{margin-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-0{margin-right:0!important}}.govuk-\\!-margin-bottom-0{margin-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\\!-margin-left-0{margin-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-0{margin-left:0!important}}.govuk-\\!-margin-1{margin:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-1{margin:5px!important}}.govuk-\\!-margin-top-1{margin-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-1{margin-top:5px!important}}.govuk-\\!-margin-right-1{margin-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-1{margin-right:5px!important}}.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\\!-margin-left-1{margin-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-1{margin-left:5px!important}}.govuk-\\!-margin-2{margin:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-2{margin:10px!important}}.govuk-\\!-margin-top-2{margin-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-2{margin-top:10px!important}}.govuk-\\!-margin-right-2{margin-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-2{margin-right:10px!important}}.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\\!-margin-left-2{margin-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-2{margin-left:10px!important}}.govuk-\\!-margin-3{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-3{margin:15px!important}}.govuk-\\!-margin-top-3{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-3{margin-top:15px!important}}.govuk-\\!-margin-right-3{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-3{margin-right:15px!important}}.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\\!-margin-left-3{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-3{margin-left:15px!important}}.govuk-\\!-margin-4{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-4{margin:20px!important}}.govuk-\\!-margin-top-4{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-4{margin-top:20px!important}}.govuk-\\!-margin-right-4{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-4{margin-right:20px!important}}.govuk-\\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\\!-margin-left-4{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-4{margin-left:20px!important}}.govuk-\\!-margin-5{margin:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-5{margin:25px!important}}.govuk-\\!-margin-top-5{margin-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-5{margin-top:25px!important}}.govuk-\\!-margin-right-5{margin-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-5{margin-right:25px!important}}.govuk-\\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\\!-margin-left-5{margin-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-5{margin-left:25px!important}}.govuk-\\!-margin-6{margin:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-6{margin:30px!important}}.govuk-\\!-margin-top-6{margin-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-6{margin-top:30px!important}}.govuk-\\!-margin-right-6{margin-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-6{margin-right:30px!important}}.govuk-\\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\\!-margin-left-6{margin-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-6{margin-left:30px!important}}.govuk-\\!-margin-7{margin:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-7{margin:40px!important}}.govuk-\\!-margin-top-7{margin-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-7{margin-top:40px!important}}.govuk-\\!-margin-right-7{margin-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-7{margin-right:40px!important}}.govuk-\\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\\!-margin-left-7{margin-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-7{margin-left:40px!important}}.govuk-\\!-margin-8{margin:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-8{margin:50px!important}}.govuk-\\!-margin-top-8{margin-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-8{margin-top:50px!important}}.govuk-\\!-margin-right-8{margin-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-8{margin-right:50px!important}}.govuk-\\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\\!-margin-left-8{margin-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-8{margin-left:50px!important}}.govuk-\\!-margin-9{margin:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-9{margin:60px!important}}.govuk-\\!-margin-top-9{margin-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-top-9{margin-top:60px!important}}.govuk-\\!-margin-right-9{margin-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-right-9{margin-right:60px!important}}.govuk-\\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\\!-margin-left-9{margin-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-margin-left-9{margin-left:60px!important}}.govuk-\\!-padding-0{padding:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-0{padding:0!important}}.govuk-\\!-padding-top-0{padding-top:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-0{padding-top:0!important}}.govuk-\\!-padding-right-0{padding-right:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-0{padding-right:0!important}}.govuk-\\!-padding-bottom-0{padding-bottom:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\\!-padding-left-0{padding-left:0!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-0{padding-left:0!important}}.govuk-\\!-padding-1{padding:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-1{padding:5px!important}}.govuk-\\!-padding-top-1{padding-top:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-1{padding-top:5px!important}}.govuk-\\!-padding-right-1{padding-right:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-1{padding-right:5px!important}}.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\\!-padding-left-1{padding-left:5px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-1{padding-left:5px!important}}.govuk-\\!-padding-2{padding:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-2{padding:10px!important}}.govuk-\\!-padding-top-2{padding-top:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-2{padding-top:10px!important}}.govuk-\\!-padding-right-2{padding-right:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-2{padding-right:10px!important}}.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\\!-padding-left-2{padding-left:10px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-2{padding-left:10px!important}}.govuk-\\!-padding-3{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-3{padding:15px!important}}.govuk-\\!-padding-top-3{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-3{padding-top:15px!important}}.govuk-\\!-padding-right-3{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-3{padding-right:15px!important}}.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\\!-padding-left-3{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-3{padding-left:15px!important}}.govuk-\\!-padding-4{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-4{padding:20px!important}}.govuk-\\!-padding-top-4{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-4{padding-top:20px!important}}.govuk-\\!-padding-right-4{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-4{padding-right:20px!important}}.govuk-\\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\\!-padding-left-4{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-4{padding-left:20px!important}}.govuk-\\!-padding-5{padding:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-5{padding:25px!important}}.govuk-\\!-padding-top-5{padding-top:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-5{padding-top:25px!important}}.govuk-\\!-padding-right-5{padding-right:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-5{padding-right:25px!important}}.govuk-\\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\\!-padding-left-5{padding-left:15px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-5{padding-left:25px!important}}.govuk-\\!-padding-6{padding:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-6{padding:30px!important}}.govuk-\\!-padding-top-6{padding-top:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-6{padding-top:30px!important}}.govuk-\\!-padding-right-6{padding-right:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-6{padding-right:30px!important}}.govuk-\\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\\!-padding-left-6{padding-left:20px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-6{padding-left:30px!important}}.govuk-\\!-padding-7{padding:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-7{padding:40px!important}}.govuk-\\!-padding-top-7{padding-top:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-7{padding-top:40px!important}}.govuk-\\!-padding-right-7{padding-right:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-7{padding-right:40px!important}}.govuk-\\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\\!-padding-left-7{padding-left:25px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-7{padding-left:40px!important}}.govuk-\\!-padding-8{padding:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-8{padding:50px!important}}.govuk-\\!-padding-top-8{padding-top:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-8{padding-top:50px!important}}.govuk-\\!-padding-right-8{padding-right:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-8{padding-right:50px!important}}.govuk-\\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\\!-padding-left-8{padding-left:30px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-8{padding-left:50px!important}}.govuk-\\!-padding-9{padding:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-9{padding:60px!important}}.govuk-\\!-padding-top-9{padding-top:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-top-9{padding-top:60px!important}}.govuk-\\!-padding-right-9{padding-right:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-right-9{padding-right:60px!important}}.govuk-\\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\\!-padding-left-9{padding-left:40px!important}@media (min-width: 40.0625em){.govuk-\\!-padding-left-9{padding-left:60px!important}}.govuk-\\!-text-align-left{text-align:left!important}.govuk-\\!-text-align-centre{text-align:center!important}.govuk-\\!-text-align-right{text-align:right!important}.govuk-\\!-font-size-80{font-size:53px!important;font-size:3.3125rem!important;line-height:1.0377358491!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-80{font-size:80px!important;font-size:5rem!important;line-height:1!important}}@media print{.govuk-\\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\\!-font-size-48{font-size:32px!important;font-size:2rem!important;line-height:1.09375!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-48{font-size:48px!important;font-size:3rem!important;line-height:1.0416666667!important}}@media print{.govuk-\\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\\!-font-size-36{font-size:24px!important;font-size:1.5rem!important;line-height:1.0416666667!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-36{font-size:36px!important;font-size:2.25rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\\!-font-size-27{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-27{font-size:27px!important;font-size:1.6875rem!important;line-height:1.1111111111!important}}@media print{.govuk-\\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-24{font-size:18px!important;font-size:1.125rem!important;line-height:1.1111111111!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-24{font-size:24px!important;font-size:1.5rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\\!-font-size-19{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-19{font-size:19px!important;font-size:1.1875rem!important;line-height:1.3157894737!important}}@media print{.govuk-\\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\\!-font-size-16{font-size:14px!important;font-size:.875rem!important;line-height:1.1428571429!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-16{font-size:16px!important;font-size:1rem!important;line-height:1.25!important}}@media print{.govuk-\\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\\!-font-size-14{font-size:12px!important;font-size:.75rem!important;line-height:1.25!important}@media (min-width: 40.0625em){.govuk-\\!-font-size-14{font-size:14px!important;font-size:.875rem!important;line-height:1.4285714286!important}}@media print{.govuk-\\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\\!-font-weight-regular{font-weight:400!important}.govuk-\\!-font-weight-bold{font-weight:700!important}.govuk-\\!-width-full,.govuk-\\!-width-three-quarters{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-three-quarters{width:75%!important}}.govuk-\\!-width-two-thirds{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-two-thirds{width:66.66%!important}}.govuk-\\!-width-one-half{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-half{width:50%!important}}.govuk-\\!-width-one-third{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-third{width:33.33%!important}}.govuk-\\!-width-one-quarter{width:100%!important}@media (min-width: 40.0625em){.govuk-\\!-width-one-quarter{width:25%!important}}:host .govuk-label,:host .govuk-hint,:host .govuk-error-message{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__font-size, 19px)}:host .govuk-input{font-family:var(--postcode__font-family, "GDS Transport", arial, sans-serif);font-size:var(--postcode__input__font-size, 19px);height:var(--postcode__input__height, 35px);padding:var(--postcode__input__padding, 5px 34px 5px 5px)}
110
+ `;var pp=Object.freeze,vp=Object.defineProperty,dC=Object.getOwnPropertyDescriptor,xi=(i,t,e,n)=>{for(var r=n>1?void 0:n?dC(t,e):t,o=i.length-1,s;o>=0;o--)(s=i[o])&&(r=(n?s(t,e,r):s(r))||r);return n&&r&&vp(t,e,r),r},cC=(i,t)=>pp(vp(i,"raw",{value:pp(t||i.slice())})),_p;q.PostcodeSearch=class extends Pn{constructor(){super(...arguments),this.id="postcode",this.errorId="postcode-error",this.label="Postcode",this.hintText="",this.errorMessage="Enter a valid UK postcode",this.onlyQuestionOnPage=!1,this._postcode="",this._sanitizedPostcode=null,this._showPostcodeError=!1,this.dispatch=(i,t)=>this.dispatchEvent(new CustomEvent(i,{detail:t}))}_onInputChange(i){const t=i.target.value,e=hC(t.trim()).valid;e?(this._sanitizedPostcode=hd(t.trim()),this._postcode=hd(t.trim())||t,this._showPostcodeError=!1):(this._sanitizedPostcode=null,this._postcode=t.toUpperCase()),this.dispatch("postcodeChange",{postcode:this._sanitizedPostcode||t,isValid:e})}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(i){i.key==="Enter"&&!this._sanitizedPostcode&&(this._showPostcodeError=!0),this._showError()}_showError(){var e,n;const i=(e=this.shadowRoot)==null?void 0:e.querySelector(`#${this.errorId}`);i&&(i.style.display="none"),i&&this._showPostcodeError&&(i.style.display="");const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".govuk-form-group");t&&this._showPostcodeError&&t.classList.add("govuk-form-group--error"),t&&!this._showPostcodeError&&t.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?Bi`<h1 class="govuk-label-wrapper">
91
111
  <label class="govuk-label govuk-label--l" for=${this.id}>
92
112
  ${this.label}
93
113
  </label>
94
- </h1>`:xi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return xi(kc||(kc=Yw([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
114
+ </h1>`:Bi`<label class="govuk-label" for=${this.id}>${this.label}</label>`}render(){return Bi(_p||(_p=cC([`<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>
95
115
  <div class="govuk-form-group">
96
116
  `,`
97
117
  <div id="postcode-hint" class="govuk-hint">`,`</div>
@@ -117,4 +137,4 @@ Filter Expression:
117
137
  @keyup=`,`
118
138
  tabindex="0"
119
139
  />
120
- </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},j.PostcodeSearch.styles=Uo(Uw),Je([Q({type:String})],j.PostcodeSearch.prototype,"id",2),Je([Q({type:String})],j.PostcodeSearch.prototype,"errorId",2),Je([Q({type:String})],j.PostcodeSearch.prototype,"label",2),Je([Q({type:String})],j.PostcodeSearch.prototype,"hintText",2),Je([Q({type:String})],j.PostcodeSearch.prototype,"errorMessage",2),Je([Q({type:Boolean})],j.PostcodeSearch.prototype,"onlyQuestionOnPage",2),Je([bi()],j.PostcodeSearch.prototype,"_postcode",2),Je([bi()],j.PostcodeSearch.prototype,"_sanitizedPostcode",2),Je([bi()],j.PostcodeSearch.prototype,"_showPostcodeError",2),j.PostcodeSearch=Je([cs("postcode-search")],j.PostcodeSearch),Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
140
+ </div>`])),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp)}},q.PostcodeSearch.styles=Ss(uC),xi([J({type:String})],q.PostcodeSearch.prototype,"id",2),xi([J({type:String})],q.PostcodeSearch.prototype,"errorId",2),xi([J({type:String})],q.PostcodeSearch.prototype,"label",2),xi([J({type:String})],q.PostcodeSearch.prototype,"hintText",2),xi([J({type:String})],q.PostcodeSearch.prototype,"errorMessage",2),xi([J({type:Boolean})],q.PostcodeSearch.prototype,"onlyQuestionOnPage",2),xi([Ui()],q.PostcodeSearch.prototype,"_postcode",2),xi([Ui()],q.PostcodeSearch.prototype,"_sanitizedPostcode",2),xi([Ui()],q.PostcodeSearch.prototype,"_showPostcodeError",2),q.PostcodeSearch=xi([vl("postcode-search")],q.PostcodeSearch),Object.defineProperties(q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});